texlive[66176] Master/texmf-dist/doc/context: ConTeXt LMTX: doc

commits+siepo at tug.org commits+siepo at tug.org
Sun Feb 26 15:44:26 CET 2023


Revision: 66176
          http://tug.org/svn/texlive?view=revision&revision=66176
Author:   siepo
Date:     2023-02-26 15:44:25 +0100 (Sun, 26 Feb 2023)
Log Message:
-----------
ConTeXt LMTX: doc

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/bidi.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/charts-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/cld-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/colors-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/columnsets.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/followingup.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/languages-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-boxes.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-characters.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-conditionals.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-expansion.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-grouping.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-macros.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-registers.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-scope.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-security.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/luametafun.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/luametatex.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/luatex.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/math-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/musings.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/notnow.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/onandon.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/primitives.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/rules-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/spacing-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/templates-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/workflows-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/xml-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/xtables-mkiv.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-de.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-en.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-it.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdf
    trunk/Master/texmf-dist/doc/context/presentations/bachotex/2010/bachotex-2010-clash.tex
    trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.tex
    trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-datatypes.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-implementers.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.tex
    trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.tex
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.html
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/luatools.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-babel.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-base.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-bibtex.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-cache.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-chars.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-check.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-colors.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.html
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-dvi.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-epub.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-evohome.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fcd.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-flac.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.html
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-grep.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.html
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-metapost.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-modules.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-package.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-patterns.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.html
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-plain.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-profile.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-rsync.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-scite.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-server.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-texworks.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-timing.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-tools.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unicode.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unzip.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-update.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.html
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-watch.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-youless.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtxrun.man
    trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0000-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0002-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0006-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0007-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0010-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1101-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1102-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1103-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1104-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1105-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-calls.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-expanding.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-hashing.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-hz.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-luafunctions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mathstackers.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mathstyles.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-metafun.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mobility.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-nodes.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-nuts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-properties.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-speed.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-threequarters.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-fonts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-lua.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-mixed.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-numbering.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-vertical.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/charts/charts-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-abitoflua.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-afewdetails.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-backendcode.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-callbacks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-ctxfunctions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-environment.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-files.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-gettingstarted.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-goodies.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-graphics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-logging.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-luafunctions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-macros.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-moreonfunctions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-nicetoknow.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-scanners.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-somemoreexamples.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-specialcommands.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-summary.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-variables.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-verbatim.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-basics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-environment.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-graphics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-metafun.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-000.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-001.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-002.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-003.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-004.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-005.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-006.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-007.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-101.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-102.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-103.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-201.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-202.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-203.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-204.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-205.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-206.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-301.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-401.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-402.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-403.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-404.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-405.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-601.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-701.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-702.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-703.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-704.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-801.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-802.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-803.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-804.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-805.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-806.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-901.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-902.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-903.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/back-0.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-backpage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-captiontrickery.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-colofon.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-environment.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-finetuningfloats.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-floatingaround.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-frontpage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-gridtrickery.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-index.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-ornaments.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-pseudocolumns.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-snappingheads.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-textbackgrounds.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-tuningformulas.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/detcow.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/epub/epub-mkiv-demo.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/epub/epub-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-expansion.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-fonts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-keywords.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-libraries.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-numbers.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parameters.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parsing.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-pi.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-threesix.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-tokens.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-whattex.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-bitmaps.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-cleanup.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-compilation.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-directions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-evolution.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-feedback.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-fonts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-logging.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-lua.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-mp.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-performance.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-rejected.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-retrospect.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-stripping.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-stubs.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-tex.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-whatsits.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-appendix.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-environment.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-extensions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-features.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-formats.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-hooks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-lookups.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-math.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-methods.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-modes.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-scripts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-tricks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/graphics/graphics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-backend.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-bidi.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-callbacks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-characters.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-codebase.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-ebooks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-export.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-fontnames.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-glocal.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-goodies.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-inserts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-intermezzo.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-italics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-jit.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-languages.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-math.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-mathml.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-merge.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-mkvi.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-optimize.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-parbuilder.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-partests.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-tags.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-weird.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-actions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-annotations.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-attachments.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-bookmarks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-buttons.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-enabling.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-hyperlinks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-importing.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-javascript.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-structure.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-tagging.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-transitions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-appendix.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-basics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-environment.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-goodies.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-hyphenation.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-labels.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-numbering.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-sorting.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/libraries/ecmascript-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/libraries/libraries-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-boxes.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-characters.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-conditionals.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-expansion.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-macros.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-registers.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-scope.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lua/lua-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-arrow.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-axis.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-chart.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-color.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-contour.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-followtext.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-fonts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-function.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-grid.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-groups.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-interface.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-mesh-examples.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-mesh.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-outline.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-placeholder.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-poisson.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-shade.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-surface.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-svg.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-technology.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-text.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-codes.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-firstpage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-libraries.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-math.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-metapost.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-nodes.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-pdf.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-primitives.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-registers.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-statistics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-firstpage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-languages.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-logos.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-lua.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-math.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-preamble.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-registers.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-statistics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luatex/luatex.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/manuals-explaining-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/manuals-explaining-cover.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/manuals-explaining-environment.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/manuals-xml-environment.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-alignments.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-combining.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-definitions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-features.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-framing-001.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-framing.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-input.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-layout.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-numbering.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-oddities.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-spacing-001.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-spacing.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-suboptimal.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-tricks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mathml/envexamp.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mathml/mmlexamp.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mathml/mmlprime.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mcommon.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-backgrounds.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-backpage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-basics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-colofon-paper.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-colofon-screen.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-colofon.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-conventions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-debugging.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-document.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-effects.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-embedding.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment-layout.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment-samples.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment-screen.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-environment.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-examples.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-functions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-gadgets.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-graphics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-index.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-layout.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-lua.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-macros.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-positioning.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-reference.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-sneaky.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-styles.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-syntax.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text-lmtx.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-text.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-titlepage-paper.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-titlepage-screen.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun-welcome.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/metafun.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-700.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-771.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-772.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-773.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-774.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-775.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-776.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-800.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-900.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-901.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/metafun/mfun-902.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-arabic.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-breakingapart.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-calcmath.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-cjk.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-code.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-colors.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-dirtytricks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-environment.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-fallback.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-fonts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-goingbeta.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-goingutf.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-halfway.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-iitoiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-initialization.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-itworks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-last.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-luafitsin.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-math.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-memory.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-mix.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-mplib.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-nicetoknow.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-nodes.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-open.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-optimization.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-order.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-performance.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-plain.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-punk.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-reflection.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-structure.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-timing-1-luatex-progress.lut
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-tokenspeak.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-tracking.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-xml.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk-zapfino.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/mk/mk.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-children.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-names.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-perception.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-plain.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-roadmap.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-stability.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-staygo.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-whytex.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/nodes/nodes.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/notnow/notnow-columns-and-notes.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/notnow/notnow-sidefloats.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/notnow/notnow.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-110.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-53.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-decade.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-editing.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-emoji.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-execute.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-expansion.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-fences.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-ffi.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-media.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-modern.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-performance.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-runtoks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-seguiemj.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon-variable.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/onandon/onandon.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/pagecolumns/pagecolumns-000.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/pagecolumns/pagecolumns-001.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/pagecolumns/pagecolumns-002.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/pagecolumns/pagecolumns-003.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/pagecolumns/pagecolumns-004.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/pagecolumns/pagecolumns-005.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/pagecolumns/pagecolumns-006.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/pagecolumns/pagecolumns-007.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/pagecolumns/pagecolumns.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/primitives/primitives.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/readme/mreadme.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/rules/rules-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/spacing/spacing-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/spacing/spacing-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/spacing/spacing-linecorrection.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/spacing/spacing-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/spacing/spacing-periods.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/spacing/spacing-spaces.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/spacing/spacing-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/spacing/spacing-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/spreadsheets/spreadsheets-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/sql/sql-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/start/en/hasseltbook.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/start/en/ma-cb-en-commands.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/start/en/ma-cb-en-usersetups.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/start/en/ma-cb-en.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/steps/steps-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/still/still-backend.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/still/still-expanding.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/still/still-math.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/still/still-one.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/still/still-opentypemath.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/still/still-profiling.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/still/still-simple.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/still/still-tokens.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/still/still.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/svg/svg-lmtx-mozilla.lua
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/svg/svg-lmtx.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/swiglib/swiglib-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/templates/templates-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/tiptrick/tiptrick.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/tools/tools-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/units/units-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-graphics.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-injectors.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-parallel.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-resources.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-running.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-setups.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-suspects.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-synctex.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-xml.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-commands.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-converter.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-examples.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-expressions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-filtering.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-lookups.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-tricks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xtables/xtables-mkiv.tex

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/canbedone-periods.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-alignments.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-inserts.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-loops.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-marks.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/math-tweaks.pdf
    trunk/Master/texmf-dist/doc/context/documents/general/manuals/ontarget.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.tex
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.tex
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.tex
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.tex
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.tex
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.tex
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.pdf
    trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.tex
    trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.1
    trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man1.pdf
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.html
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.man
    trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.xml
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone-periods.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-bitwise.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-expressions.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-formats.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-hyphenation.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-inserts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-offloading.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-paragraphs.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-memory.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-options.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-alignments.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-inserts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-localboxes.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-loops.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-marks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-building.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-rejected.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luatex-primitives.lua
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luatex-primitives.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-fonts-accents-001.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-fonts-helpers.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-fonts-italics-002.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-fonts-primes-001.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-fonts-radicals-001.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-fonts-scripts-001.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-fonts.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-fun.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-grouping.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-notdone.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/math/math-tweaks.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-speed.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/musings/musings-toocomplex.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-alsomath.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-anchoring.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-binary.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-contents.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-dk.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-eventually.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-gettingridof.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-introduction.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-makesnosense.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-makessense.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-math.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-metapost.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-registers.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-ridofjit.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-style.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget-titlepage.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/ontarget/ontarget.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/workflows/workflows-hashed.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-03.xml

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.xml
    trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.html
    trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.man
    trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.xml
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-preamble.tex
    trunk/Master/texmf-dist/doc/context/sources/general/manuals/xml/xml-mkiv-lpath.tex
    trunk/Master/texmf-dist/doc/context/third/context-notes-zh-cn/
    trunk/Master/texmf-dist/doc/context/third/inifile/

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/bidi.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/canbedone-periods.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/canbedone-periods.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/canbedone-periods.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/canbedone-periods.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/canbedone-periods.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/charts-mkiv.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/cld-mkiv.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/colors-mkiv.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/columnsets.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/followingup.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/languages-mkiv.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-alignments.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-alignments.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-alignments.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-alignments.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-alignments.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-boxes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-characters.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-conditionals.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-expansion.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-grouping.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-inserts.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-inserts.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-inserts.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-inserts.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-inserts.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-loops.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-loops.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-loops.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-loops.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-loops.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-macros.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-marks.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-marks.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-marks.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-marks.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-marks.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-registers.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-scope.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel-security.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/lowlevel.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/luametafun.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/luametatex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/luatex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/math-mkiv.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/math-tweaks.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/math-tweaks.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/math-tweaks.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/math-tweaks.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/math-tweaks.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/musings.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/notnow.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/onandon.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/context/documents/general/manuals/ontarget.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/documents/general/manuals/ontarget.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/documents/general/manuals/ontarget.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/documents/general/manuals/ontarget.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/documents/general/manuals/ontarget.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/primitives.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/rules-mkiv.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/spacing-mkiv.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/templates-mkiv.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/workflows-mkiv.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/xml-mkiv.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/manuals/xtables-mkiv.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-fr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-it.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-de.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-it.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/documents/general/qrcs/setup-nl.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/presentations/bachotex/2010/bachotex-2010-clash.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/bachotex/2010/bachotex-2010-clash.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/bachotex/2010/bachotex-2010-clash.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,6 +1,7 @@
 % \enablemode[paper]
 
 \usemodule[present-stepwise,present-wobbling,abr-02]
+% \usemodule[present-wobbling,abr-02]
 
 \setuppapersize[S6][S6] \setupbodyfont[10pt] \def\METAPOST{MetaPost}
 

Modified: trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-concepts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -2,6 +2,11 @@
 
 \usemodule[present-boring,abbreviations-logos]
 
+% This was a talk about a preliminary mechanism so it has been adapted to run in
+% the current version. I need to check other 2020 files and examples and will do
+% that when I update (especially the low level) manuals. Let me know when there
+% are issues.
+
 \startdocument
   [title={CONCEPTS},
    banner={experiments turned features},
@@ -110,6 +115,10 @@
 
 \typebuffer \startpacked \getbuffer \stoppacked
 
+{\em We can now also enable and disable specific features in the engine that
+control traditional or \OPENTYPE\ approaches. This is only there for experimental
+and educational purposes.}
+
 \stoptitle
 
 \starttitle[title=Macros]
@@ -163,6 +172,9 @@
 #3<-3
 \stoptyping
 
+{\em There are more specifiers and I admit that they are hard to remember. But
+they are mostly used in low level macros anyway.}
+
 \page
 
 Optional tokens (we also show some \TEX-expansion-horror here):
@@ -184,6 +196,9 @@
 
 or as tokens (\type{\showluatokens\doifelseinset}) on the next page:
 
+{\em There are some expansion related extensions that are discussed in the low
+level expansion manual.}
+
 \page
 
 \starttyping
@@ -248,7 +263,7 @@
 
 Hyphenation at work:
 
-\startlinecorrection[line]
+\startlinecorrection[line] \small
 \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}}
@@ -360,6 +375,9 @@
 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).
 
+{\em There is now a plugin mechanism that provides more control over language
+specific hyphenation, e.g.\ compound words combined with ligatures.}
+
 \stoptitle
 
 \starttitle[title=Local control]
@@ -449,9 +467,12 @@
 
 \starttyping
 \protected\def\widthofcontent#1{\beginlocalcontrol
-     \setbox\scratchbox\hbox{#1}\endlocalcontrol   \wd\scratchbox}
+     \setbox\scratchbox\hbox{#1}\endlocalcontrol \wd\scratchbox}
 \stoptyping
 
+{\em These mechanisms can have surprising side effects due to input stacking.
+There is some more info in the low level expansion manual.}
+
 \stoptitle
 
 \starttitle[title=Conditionals]
@@ -544,6 +565,10 @@
 % \setprelistbox0\hbox{BEFORE} \setpostlistbox0\hbox{AFTER}
 % \box0
 
+{\em Everything insert related will always have side effects. It's complicated
+by the fact that the page flow interferes with expectations of where notes
+break cq.\ end up.}
+
 \stoptitle
 
 \starttitle[title=Normalizing lines]
@@ -559,8 +584,8 @@
 Standard (but already with left skips):
 
 \start
-    \bitwiseflip \normalizelinemode -\indentskipmodecode
-    \bitwiseflip \normalizelinemode -\normalizelinemodecode
+    \bitwiseflip \normalizelinemode -\parindentskipnormalizecode
+    \bitwiseflip \normalizelinemode -\normalizelinenormalizecode
     \showmakeup \relax \getbuffer
 \stop
 
@@ -567,8 +592,8 @@
 Normalized (enhanced, no shifts, indent skip):
 
 \start
-    \bitwiseflip \normalizelinemode \indentskipmodecode
-    \bitwiseflip \normalizelinemode \normalizelinemodecode
+    \bitwiseflip \normalizelinemode \parindentskipnormalizecode
+    \bitwiseflip \normalizelinemode \normalizelinenormalizecode
     \showmakeup \relax \getbuffer
 \stop
 
@@ -583,8 +608,8 @@
 Standard:
 
 \start
-    \bitwiseflip \normalizelinemode -\indentskipmodecode
-    \bitwiseflip \normalizelinemode -\normalizelinemodecode
+    \bitwiseflip \normalizelinemode -\parindentskipnormalizecode
+    \bitwiseflip \normalizelinemode -\normalizelinenormalizecode
     \showmakeup \relax \getbuffer
 \stop
 
@@ -591,29 +616,44 @@
 Normalized:
 
 \start
-    \bitwiseflip \normalizelinemode \indentskipmodecode
-    \bitwiseflip \normalizelinemode \normalizelinemodecode
+    \bitwiseflip \normalizelinemode \parindentskipnormalizecode
+    \bitwiseflip \normalizelinemode \normalizelinenormalizecode
     \showmakeup \relax \getbuffer
 \stop
 
 % {\showmakeup \getbuffer}
 
+{\em There might be some more normalization in the future in other subsystems of
+the engine. One should be aware of this when manipulating node lists after they
+come out such subsystems.}
+
 \stoptitle
 
 \starttitle[title=Freezing paragraph properties]
 
-\startbuffer
-\forgetparagraphfreezing \placefigure[left]{}{} {\bf Andrew Cuomo:} \input cuomo
+\startbuffer[sample]
+\startplacefigure[location=left,number=no] \externalfigure[halslegacy.jpg][width=30pt] \stopplacefigure
+
+{\bf David Stork:} \samplefile{stork}
 \stopbuffer
 
-\typebuffer[style=\tt\small] \start \switchtobodyfont[8pt] \getbuffer \par \stop
+\startbuffer[demo]
+\forgetparagraphfreezing \getbuffer[sample]
+\stopbuffer
 
-\startbuffer
-\setparagraphfreezing \placefigure[left]{}{} {\bf Andrew Cuomo:}  \input cuomo
+\typebuffer[demo][style=\tt\small] \start \switchtobodyfont[6pt] \getbuffer[demo] \par \stop
+
+\startbuffer[demo]
+\setparagraphfreezing    \getbuffer[sample]
 \stopbuffer
 
-\typebuffer[style=\tt\small] \start \switchtobodyfont[8pt] \getbuffer \par \stop
+\typebuffer[demo][style=\tt\small] \start \switchtobodyfont[6pt] \getbuffer[demo] \par \stop
 
+Sample: \typebuffer[sample][style=\tt\small\small]
+
+{\em This feature will stepwise be applied to mechanism and might have side effects when
+users have their own hacks around \TEX's limitations (and side effects).}
+
 \stoptitle
 
 \starttitle[title=Wrapping up paragraphs]
@@ -689,6 +729,9 @@
 
 \startcolumns  \startpacked \getbuffer \stoppacked \stopcolumns
 
+{\em These are just weird examples, but you can expect more interesting features to
+show up. Beware of stacking because order matters.}
+
 \stoptitle
 
 \stopdocument

Modified: trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-datatypes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-implementers.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-luametatex.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -526,4 +526,6 @@
 
 \stopitemize
 
+\stoptitle
+
 \stopdocument

Modified: trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2020/context-2020-tokens.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -40,6 +40,8 @@
 
 \stopitemize
 
+\stoptitle
+
 \starttitle[title=Some implementation details]
 
 \startitemize
@@ -127,7 +129,7 @@
     \eTABLE
 \stoplinecorrection
 
-\stoptable
+\stoptitle
 
 \starttitle[title=The hash table (simplified)]
 
@@ -170,9 +172,9 @@
 \starttitle[title=Other data management]
 
 \startitemize
-\startitem Grouping is handles by a nesting stack. \stopitem
+\startitem Grouping is handled by a nesting stack. \stopitem
 \startitem Nested conditionals (\type {\if...}) have their own stack. \stopitem
-\startitem The values before assignments are saved ion the save stack. \stopitem
+\startitem The values before assignments are saved on the save stack. \stopitem
 \startitem Also other local changes (housekeeping) ends up in the save stack. \stopitem
 \startitem Token lists and macro aliases have references pointers (reuse). \stopitem
 \startitem Attributes, being linked node lists, have their own management. \stopitem
@@ -190,7 +192,7 @@
 
 \stoptitle
 
-\starttitle[title=Example 1: in the input]
+\starttitle[title=Example 2: in the input]
 
 \startbuffer
 \luatokentable{a \the\scratchcounter b \the\parindent \hbox to 10pt{x}}
@@ -200,7 +202,7 @@
 
 \stoptitle
 
-\starttitle[title=Example 2: user registers]
+\starttitle[title=Example 3: user registers]
 
 \startbuffer
 \scratchtoks{foo \framed{\red 123}456}
@@ -212,7 +214,7 @@
 
 \stoptitle
 
-\starttitle[title=Example 3: internal variables]
+\starttitle[title=Example 4: internal variables]
 
 \startbuffer
 \luatokentable\everypar
@@ -222,7 +224,7 @@
 
 \stoptitle
 
-\starttitle[title=Example 4: macro definitions]
+\starttitle[title=Example 5: macro definitions]
 
 \startbuffer
 \protected\def\whatever#1[#2](#3)\relax{oeps #1 and #2 & #3 done ## error}
@@ -234,7 +236,7 @@
 
 \stoptitle
 
-\starttitle[title=Example 5: commands]
+\starttitle[title=Example 6: commands]
 
 \startbuffer
 \luatokentable\startitemize
@@ -244,7 +246,7 @@
 
 \stoptitle
 
-\starttitle[title=Example 6: commands]
+\starttitle[title=Example 7: commands]
 
 \startbuffer
 \luatokentable\doifelse
@@ -254,7 +256,7 @@
 
 \stoptitle
 
-\starttitle[title=Example 7: nothing]
+\starttitle[title=Example 8: nothing]
 
 \startbuffer
 \luatokentable\relax
@@ -264,7 +266,7 @@
 
 \stoptitle
 
-\starttitle[title=Example 8: Hashes]
+\starttitle[title=Example 9: hashes]
 
 \startbuffer
 \edef\foo#1#2{(#1)(\letterhash)(#2)}  \luatokentable\foo
@@ -274,7 +276,7 @@
 
 \stoptitle
 
-\starttitle[title=Example 9: Nesting]
+\starttitle[title=Example 10: nesting]
 
 \startbuffer
 \def\foo#1{\def\foo##1{(#1)(##1)}}  \luatokentable\foo

Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,609 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+
+\definehighlight[nb][style=bold,color=middlegray,define=no]
+
+\definecolor[maincolor][g=.3]
+
+\startdocument
+  [title={COMPACT FONTS},
+   banner={a different approach to scaling},
+   location={context\enspace {\bf 2021}\enspace meeting}]
+
+\starttitle[title=How \TEX\ uses fonts]
+
+\startitemize
+    \startitem
+        In a \TEX\ engine there is a 1-to-1 mapping from characters in the input
+        to a slot in a font.
+    \stopitem
+    \startitem
+        Combinations of characters can be mapped onto one shape: ligatures.
+    \stopitem
+    \startitem
+        Hyphenation is (also) controlled by the input encoding of a font which
+        imposes some limitations.
+    \stopitem
+    \startitem
+        In the typeset result characters (glyphs) can be (re)positioned relatively: kerns.
+    \stopitem
+    \startitem
+        This all happens in a very interwoven way (e.g. inside the par builder).
+    \stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=How traditional \TEX\ sees fonts]
+
+\startitemize
+    \startitem
+        A font is just a (binary) blob of data with information where characters
+        have a width, height, depth and italic correction.
+    \stopitem
+    \startitem
+        The engine only needs the dimensions and when the same font is used with a
+        different scale a copy with scaled dimensions is used.
+    \stopitem
+    \startitem
+        There can be recipes for ligatures and (more complex) so called math extensible
+        shapes (like arrows, wide accents, fences and radicals)
+    \stopitem
+    \startitem
+        There are pairwise specification for kerning.
+    \stopitem
+    \startitem
+        A handful of font parameters is provided in order to control for instance spacing.
+    \stopitem
+    \startitem
+        Virtual fonts are just normal fonts but they have recipes for the backend to
+        construct shapes: \TEX\ uses the normal metric file, the backend also the virtual
+        specification file.
+    \stopitem
+\stopitemize
+
+\blank[2*big]
+
+An example of a definition and usage:
+
+\starttyping
+\font\cs somename [somescale]  test {\cs test} test
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=\UNICODE\ engines]
+
+\startitemize
+    \startitem
+        There are no fundamental differences between a traditional engine and an
+        \UNICODE\ aware one with respect to what \TEX\ needs from fonts:
+        dimensions.
+    \stopitem
+    \startitem
+        There can be more than 256 characters in a font.
+    \stopitem
+    \startitem
+        Some mechanisms have to be present for applying font features (like ligaturing and
+        kerning).
+    \stopitem
+    \startitem
+        In \LUATEX\ hyphenation, ligaturing and kerning are clearly separate steps.
+    \stopitem
+    \startitem
+        In \LUATEX\ callbacks can do lots of things with fonts and characters.
+    \stopitem
+    \startitem
+        Math fonts are handled differently and there is more info that comes from the font.
+    \stopitem
+    \startitem
+        In \LUATEX\ features like expansion are implemented differently, i.e.\ no
+        copies of fonts are made and applied expansion travels with the glyphs.
+    \stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Overhead]
+
+\startitemize
+    \startitem
+        In all engines scales copies are used. For traditional \TEX\ a copy is cheap, but a
+        font that supports more of \UNICODE\ cna be quite large.
+    \stopitem
+    \startitem
+        Different feature sets in principle make for a different font (this can be different
+        per macro package).
+    \stopitem
+    \startitem
+        Every math scale needs three font instances: text, script and scriptscript.
+    \stopitem
+    \startitem
+        In \CONTEXT\ lots of sharing takes place and a lot of low level
+        optimizations happens (memory, performance). We always made sure (already
+        in \MKII) that the font system was not the bottleneck.
+    \stopitem
+    \startitem
+        In most cases font definitions are dynamic, and we delay initialization
+        as much as possible.
+    \stopitem
+    \startitem
+        In \MKIV\ font features can be dynamic which saves a lot of memory at the
+        cost of some extra processing overhead.
+    \stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Design sizes]
+
+\startitemize
+    \startitem
+        A macro package's font handling is complicated by design sizes. The low level
+        code can look complex too.
+    \stopitem
+    \startitem
+        There are hardly any fonts that come in design sizes (basically only Computer
+        Modern) so we need to support that.
+    \stopitem
+    \startitem
+        Design sizes make sense for math fonts where very small characters and
+        symbols are used in scripts.
+    \stopitem
+    \startitem
+        In \OPENTYPE\ fonts smaller math design sizes are part of the font (that
+        then gets loaded three times with different \type {ssty} settings).
+    \stopitem
+\stopitemize
+
+\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
+
+\stoptitle
+
+\starttitle[title=The system]
+
+\startitemize
+    \startitem
+        Each bodyfont size (often a few are defined) has regular, bold, italic,
+        bold italic, slanted, bold slanted, etc. There can be unscaled instances
+        (design size) or scaled ones.
+    \stopitem
+    \startitem
+        Within a bodyfont size we have size variants: smaller {\tx x} and {\tx xx},
+        larger {\tfa a}, {\tfb b}, {\tfc c} and {\tfd d}.
+    \stopitem
+    \startitem
+        In \MKII\ we inherit smallcap and oldstyle setups but in \MKIV\ one can either
+        do that dynamic or define an additional bodyfont instance.
+    \stopitem
+    \startitem
+        A document can use a mix of fonts mixed setup, so there is a namespace
+        used per family.
+    \stopitem
+    \startitem
+        In \OPENTYPE\ symbols are more naturally part of a font, as are emoji and
+        colored shapes.
+    \stopitem
+    \startitem
+        Lack of variants can result in artificially slanted of boldened fonts (more
+        advanced in \MKIV). Variable fonts are not special, but demand some work
+        when loading and embedding.
+    \stopitem
+    \startitem
+        Runtime virtual fonts are part of \MKIV\ as are fallback shapes.
+    \stopitem
+    \startitem
+        Languages and scripts can introduce an extra dimension to operate on.
+    \stopitem
+    \startitem
+        Math is greatly simplified by the fact that families are part of a font.
+    \stopitem
+    \startitem
+        Bold math fonts are provided by the boldening feature.
+    \stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title={Practice}]
+
+\startitemize
+    \startitem
+        Due to optimizations the actual number of loaded instances is normally
+        small but there are exceptions.
+    \stopitem
+    \startitem
+        The \LUAMETATEX\ manual has 158 instances most of which are math (six per
+        used bodyfont for math plus a regular: Lucida, Pagella, Latin Modern,
+        Dejavu, Cambria).
+    \stopitem
+    \startitem
+        The final \PDF\ file has 21 embedded fonts (subsets).
+    \stopitem
+    \startitem
+        The fact that different sizes each have an instance and that for math
+        we need three per size plus one for r2l, while the only difference
+        is scale, makes one think of other solutions.
+    \stopitem
+    \startitem
+        Using duplicates of huge \CJK\ fonts makes it even more noticeable.
+    \stopitem
+\stopitemize
+
+But there is a way out!
+
+\stoptitle
+
+\starttitle[title=Glyph scaling]
+
+We can scale glyphs in three ways:
+
+\startbuffer
+\definedfont[lmroman10-regular*default]%
+test {\glyphxscale 2500 test} test
+test {\glyphyscale 2500 test} test
+test {\glyphscale  2500 test} test
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+We do need to honor grouping:
+
+\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}
+
+These scales can also be part of a font definition so we can do with less
+instances.
+
+\stoptitle
+
+\starttitle[title=Implications]
+
+\startitemize
+    \startitem
+        The text processing part of the engine has to scale on the fly (e.g.\
+        when dimensions are needed in paragraph building and (box) packing.
+    \stopitem
+    \startitem
+        Font processing (features) already distinguishes per instance but now also
+        has to differentiate by (upto three) scales (we use the same font id
+        for scaled instances).
+    \stopitem
+    \startitem
+        The math machinery has to check for smaller sizes and also scale
+        dimensions on the fly.
+    \stopitem
+    \startitem
+        For math that means two times scaling: the main scale (like glyph scale) plus
+        the relative scaling of script and scriptscript.
+    \stopitem
+    \startitem
+        When they are used font dimensions and math parameters are to be scaled as are
+        rules in some math extensibles.
+    \stopitem
+    \startitem
+        This all has to be done efficiently so that there is no significant drop in
+        performance.
+    \stopitem
+    \startitem
+        But quite a bit less memory is used and loading time has become less too.
+    \stopitem
+\stopitemize
+
+Some day this will become default (which means a sentimental process of dropping
+ancient code):
+
+\starttyping
+\enableexperiments[fonts.compact]
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=Details]
+
+The tricks shown on this page and following pages have been in place and tested
+for a while now. Because \TEX\ uses integers a scale value of 1000 means 1.000,
+as in other mechanisms:
+
+\startbuffer
+\definedfont[lmroman10-regular*default]%
+test {\glyphscale 2500 test} test
+\stopbuffer
+
+\typebuffer {\getbuffer}
+
+% \glyphtextscale
+% \glyphscriptscale
+% \glyphscriptscriptscale
+
+\page
+
+The font definition mechanism supports horizontal and vertical scaling:
+
+\startbuffer
+\definefont[FooA][Serif*default @ 12pt 1800 500]
+\definefont[FooB][Serif*default @ 12pt 0.85 0.4]
+\definefont[FooC][Serif*default @ 12pt]
+
+There is also a new command:
+
+\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
+
+\getbuffer
+
+\page
+
+Tweaking also works in math:
+
+\startbuffer
+\definetweakedfont[squeezed][xscale=0.9]
+\definetweakedfont[squoozed][xscale=0.7]
+
+\startlines
+$a = b^2 + \sqrt{c}$
+{\squeezed $a = b^2 + \sqrt{c}$}
+{\squoozed $a = b^2 + \sqrt{c}$}
+{$\squoozed a = b^2 + \sqrt{c}$}
+{$\scriptstyle a = b^2 + \sqrt{c}$}
+\stoplines
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\page
+
+\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\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
+
+\page
+
+Tweaking can be combined with styles:
+
+\startbuffer
+\definetweakedfont[MyLargerFontA][scale=2000,style=bold]
+test {\MyLargerFontA test} test
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\page
+
+We can use negative scale values:
+
+\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
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+\page
+
+There are more glyph properties:
+
+\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 \scale[width=\textwidth]{\getbuffer}
+
+\page
+
+Glyph scales are internal counter values, like any other:
+
+\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
+
+\getbuffer
+
+\page
+
+There is a helper for real (float) scales:
+
+\startbuffer
+1200 : \the\numericscale1200
+1.20 : \the\numericscale1.200
+\stopbuffer
+
+\typebuffer
+
+These lines produce the same integer:
+
+\startlines\tttf
+\getbuffer
+\stoplines
+
+\page
+
+You can do this but it's not always predictable (depends on outer scales too):
+
+\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]
+
+\startnarrower
+    \getbuffer[definition,example]
+\stopnarrower
+
+Marks and cursive features can interfere, so this is an alternative:
+
+\startbuffer[definition]
+\def\UnKernedTeX
+  {T\glyph left .2ex raise -.4ex `E\glyph left .2ex `X\relax}
+\stopbuffer
+
+\typebuffer[definition]
+
+\startnarrower
+    \getbuffer[definition,example]
+\stopnarrower
+
+\page
+
+Yet another glyph option:
+
+\starttyping
+\multiply\glyphscale by 2 <{\darkgray \glyph                      `M}>
+\multiply\glyphscale by 2 <{\darkgray \glyph raise 3pt            `M}>
+\multiply\glyphscale by 2 <{\darkgray \glyph raise -3pt           `M}>
+\multiply\glyphscale by 2 <{\darkgray \glyph left  3pt            `M}>
+\multiply\glyphscale by 2 <{\darkgray \glyph           right  2pt `M}>
+\multiply\glyphscale by 2 <{\darkgray \glyph left  3pt right  2pt `M}>
+\multiply\glyphscale by 2 <{\darkgray \glyph left -3pt            `M}>
+\multiply\glyphscale by 2 <{\darkgray \glyph           right -2pt `M}>
+\multiply\glyphscale by 2 <{\darkgray \glyph left -3pt right -2pt `M}>
+\stoptyping
+
+\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
+
+\page
+
+A larger example:
+
+\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
+
+{\getbuffer}
+
+\stoptitle
+
+\stopdocument


Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-compactfonts.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,369 @@
+% language=us
+
+% TAKE FROM LOWLEVEL-EXPANSION.TEX
+
+\usemodule[system-tokens]
+
+\usemodule[present-boring,abbreviations-logos]
+
+\definehighlight[nb][style=bold,color=middlegray,define=no]
+
+\startdocument
+  [title={PROGRAMMING},
+   banner={local control},
+   location={context\enspace {\bf 2021}\enspace meeting}]
+
+\starttitle[title=Expansion]
+
+\TEX\ can be in several so called input reading modes:
+
+Users mostly see it reading from the source file(s). Characters are picked up and
+interpreted. Depending on what token it becomes some action takes place.
+
+\starttyping
+1 \setbox0\hbox to 10pt{2} \count0=3 \the\count0 \multiply\count0 by 4
+\stoptyping
+
+\startitemize
+
+\startitem
+    The \type {1} gets typeset because characters like that are seen as text.
+\stopitem
+
+\startitem
+    The \type {\setbox} primitive triggers picking up a register number, then
+    goes on scanning for a box specification and that itself will typeset a
+    sequence of whatever until the group ends.
+\stopitem
+
+\startitem
+    The \type {count} primitive triggers scanning for a register number (or
+    reference) and then scans for a number; the equal sign is optional.
+\stopitem
+
+\startitem
+    The \type {the} primitive injects some value into the current input stream
+    (it does so by entering a new input level).
+\stopitem
+
+\startitem
+    The \type {multiply} primitive picks up a register specification and
+    multiplies that by the next scanned number. The \type {by} is optional.
+\stopitem
+
+\startitem
+    Printing from \LUA\ and scanning tokens with e.g.\ \type {\scantokens} is like
+    reading (pseudo) files.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Expansion]
+
+\startbuffer[def]
+\def\TestA {1 \setbox0\hbox{2} \count0=3 \the\count0}
+\stopbuffer
+
+\startbuffer[edef]
+\edef\TestB{1 \setbox0\hbox{2} \count0=3 \the\count0}
+\stopbuffer
+
+\typebuffer[def]
+\typebuffer[edef]
+
+\getbuffer[def]
+\getbuffer[edef]
+
+\blank[2*big]
+
+\startcolumns[n=2] \switchtobodyfont[8pt]
+\luatokentable\TestA
+\column
+\luatokentable\TestB
+\stopcolumns
+
+\stoptitle
+
+\starttitle[title=Local control]
+
+\startbuffer[edef]
+\edef\TestB{1 \setbox0\hbox{2} \count0=3 \the\count0}
+\stopbuffer
+
+\startbuffer[ldef]
+\edef\TestC{1 \setbox0\hbox{2} \localcontrolled{\count0=3} \the\count0}
+\stopbuffer
+
+\typebuffer[edef]
+\typebuffer[ldef]
+
+\getbuffer[edef]
+\getbuffer[ldef]
+
+\blank[2*big]
+
+\startcolumns[n=2] \switchtobodyfont[8pt]
+\luatokentable\TestB
+\column
+\luatokentable\TestC
+\stopcolumns
+
+\stoptitle
+
+\starttitle[title=Side effects]
+
+\startbuffer[edef]
+\edef\TestB{1 \setbox0\hbox{2} \count0=3 \the\count0}
+\stopbuffer
+
+\startbuffer[ldef]
+\edef\TestD{\localcontrolled{1 \setbox0\hbox{2} \count0=3 \the\count0}}
+\stopbuffer
+
+\typebuffer[edef]
+\typebuffer[ldef]
+
+\getbuffer[edef]\getbuffer[ldef]\quad{\darkgray\leftarrow\space Watch how the results end up here!}
+
+\blank[2*big]
+
+\startcolumns[n=2] \switchtobodyfont[8pt]
+\luatokentable\TestB
+\column
+\luatokentable\TestD
+\stopcolumns
+
+\stoptitle
+
+\starttitle[title=Usage]
+
+\startbuffer[def]
+\def\WidthOf#1%
+  {\beginlocalcontrol
+   \setbox0\hbox{#1}%
+   \endlocalcontrol
+   \wd0 }
+\stopbuffer
+
+\startbuffer[use]
+\scratchdimen\WidthOf{The Rite Of Spring}
+
+\the\scratchdimen
+\stopbuffer
+
+\typebuffer[def]
+\typebuffer[use]
+
+\getbuffer[def]\getbuffer[use]
+
+\stoptitle
+
+\starttitle[title=Not always pretty]
+
+\startbuffer[def]
+\def\WidthOf#1%
+  {\dimexpr
+      \beginlocalcontrol
+        \begingroup
+          \setbox0\hbox{#1}%
+          \expandafter
+        \endgroup
+      \expandafter
+      \endlocalcontrol
+      \the\wd0
+   \relax}
+\stopbuffer
+
+\startbuffer[use]
+\scratchdimen\WidthOf{The Rite Of Spring}
+
+\the\scratchdimen
+\stopbuffer
+
+\typebuffer[def]
+\typebuffer[use]
+
+\getbuffer[def]\getbuffer[use]
+
+\stoptitle
+
+\starttitle[title=The \LUA\ end]
+
+Right from the start the way to get something into \TEX\ from \LUA\ has been the
+print functions. But we can also go local (immediate). There are several methods:
+
+\startitemize
+\startitem via a set token register \stopitem
+\startitem via a defined macro \stopitem
+\startitem via a string \stopitem
+\stopitemize
+
+Among the things to keep in mind are catcodes, scope and expansion (especially in
+when the result itself ends up in macros).
+
+\stoptitle
+
+\starttitle[title=Via a token register]
+
+% runlocal : macro|toks expand group
+
+\startbuffer[set]
+\toks0={\setbox0\hbox{The Rite Of Spring (Igor Stravinsky)}}
+\toks2={\setbox0\hbox{The Rite Of Spring (Joe Parrish)}}
+\stopbuffer
+
+\typebuffer[set]
+
+\startbuffer[run]
+\startluacode
+tex.runlocal(0) context("[1: %p]",tex.box[0].width)
+tex.runlocal(2) context("[2: %p]",tex.box[0].width)
+\stopluacode
+\stopbuffer
+
+\typebuffer[run]
+
+\start \getbuffer[set,run] \stop
+
+\stoptitle
+
+\starttitle[title=Via a token macro]
+
+\startbuffer[set]
+\def\TestA{\setbox0\hbox{The Rite Of Spring (Igor Stravinsky)}}
+\def\TestB{\setbox0\hbox{The Rite Of Spring (Joe Parrish)}}
+\stopbuffer
+
+\typebuffer[set]
+
+\startbuffer[run]
+\startluacode
+tex.runlocal("TestA") context("[3: %p]",tex.box[0].width)
+tex.runlocal("TestB") context("[4: %p]",tex.box[0].width)
+\stopluacode
+\stopbuffer
+
+\typebuffer[run]
+
+\start \getbuffer[set,run] \stop
+
+\stoptitle
+
+\starttitle[title=Via a string]
+
+\startbuffer[run]
+\startluacode
+tex.runstring([[\setbox0\hbox{The Rite Of Spring (Igor Stravinsky)}]])
+
+context("[5: %p]",tex.box[0].width)
+
+tex.runstring([[\setbox0\hbox{The Rite Of Spring (Joe Parrish)}]])
+
+context("[6: %p]",tex.box[0].width)
+\stopluacode
+\stopbuffer
+
+\typebuffer[run]
+
+\start \getbuffer[run] \stop
+
+\blank[2*big]
+
+A bit more high level:
+
+\starttyping
+context.runstring([[\setbox0\hbox{(Here \bf 1.2345)}]])
+context.runstring([[\setbox0\hbox{(Here \bf   %.3f)}]],1.2345)
+\stoptyping
+
+\stoptitle
+
+\starttitle[title=Locked in \LUA]
+
+\startbuffer[run]
+\startluacode
+token.setmacro("TestX",[[\setbox0\hbox{The Rite Of Spring (Igor)}]])
+tex.runlocal("TestX")
+context("[7: %p]",tex.box[0].width)
+\stopluacode
+\stopbuffer
+
+\typebuffer[run]
+
+\start \getbuffer[run] \stop
+
+\startbuffer[run]
+\startluacode
+tex.scantoks(0,tex.ctxcatcodes,[[\setbox0\hbox{The Rite Of Spring (Joe)}]])
+tex.runlocal(0)
+context("[8: %p]",tex.box[0].width)
+\stopluacode
+\stopbuffer
+
+\typebuffer[run]
+
+\start \getbuffer[run] \stop
+
+\stoptitle
+
+\starttitle[title=Order matters]
+
+A lot this relates to pushing stuff into the input which is stacked. Compare:
+
+\startbuffer[run]
+\startluacode
+context("[HERE 1]")
+context("[HERE 2]")
+\stopluacode
+\stopbuffer
+
+\typebuffer[run]
+
+\start \getbuffer[run] \stop
+
+with this:
+
+\startbuffer[run]
+\startluacode
+tex.pushlocal() context("[HERE 1]") tex.poplocal()
+tex.pushlocal() context("[HERE 2]") tex.poplocal()
+\stopluacode
+\stopbuffer
+
+\typebuffer[run]
+
+\start \getbuffer[run] \stop
+
+% \startluacode
+% tex.runlocal(function() context("[Here 1]") end)
+% context("[Here 12]")
+% tex.runlocal(function() context("[Here 2]") end)
+% \stopluacode
+
+% tex.pushlocal % swaps order
+% tex.poplocal
+% tex.quitlocal
+
+% token.expandmacro
+
+% str   : serialized
+% true  : wrap next {}
+% table : {serialzed} {serialzed} {serialzed}
+% token : inject
+% number: catcode table
+
+% tex.expandasvalue:
+%     (kind, like expand_macro)
+
+% tex.runstring:
+%  [catcode] string expand grouped
+
+% tex.runlocal
+%     function|number(register)|string(macro)|userdata(token) / expand / grouped
+
+% mplib.expandtex
+%     mpx, kind, macro, arguments
+
+\stopdocument


Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-localcontrol.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,362 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+\setuptolerance[verytolerant,stretch]
+
+\startdocument
+  [title={LUAMETAFUN},
+   banner={the new interfaces},
+   location={context\enspace {\bf 2021}\enspace meeting}]
+
+\starttitle[title=Three subsystems]
+
+\startitemize
+
+\startitem
+    The core of the engine in still \TEX. It all starts there.
+\stopitem
+
+\startitem
+    The \TEX\ internals are opened up via \LUA. We can call out to \LUA\ from
+    \TEX\ and to some extend from \LUA\ to \TEX. Quite often we push back
+    something via the input channels.
+\stopitem
+
+\startitem
+    The \METAPOST\ library is accessed from \LUA. So from within \TEX\ there is
+    always \LUA\ in between. Results go back via \LUA. The library can also call
+    out to \LUA\ and from there to \TEX.
+\stopitem
+
+\startitem
+    This means that all three major components of \LUAMETATEX\ can talk to each
+    other and use each others capabilities.
+\stopitem
+
+\startitem
+    With \LUA\ in the center, we also have access to other mechanism, for instance
+    fonts, graphics and libraries.
+\stopitem
+
+\startitem
+    In \CONTEXT\ the \LUA\ language also permits using \XML, \JSON, \CSV, \SQL\
+    databases and other input that can be dealt with programmatically.
+\stopitem
+
+\startitem
+    All has been reasonably optimized for efficiency and performance.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The (\LUATEX) library]
+
+\startitemize
+
+\startitem
+    Turning \METAPOST\ into a library has been a subproject of the \LUATEX\ project. The
+    semi|-|official team (Taco, Jacko, Hans, Luigi) got John Hobbies blessing.
+\stopitem
+
+\startitem
+    This was a rather massive (and impressive) operation by Taco because multiple
+    number models were to be supported and the internals had to be made such that
+    different backends were possible. All with remaining perfect (DEK) compatibility.
+\stopitem
+
+\startitem
+    The \METAPOST\ library serves both the stand alone program and \LUATEX.
+\stopitem
+
+\startitem
+    That means the \POSTSCRIPT\ backend is built in plus some basic (\TYPEONE)
+    font handling. We support \PDF\ output via the \METAPOST\ \LUA\ backend (in
+    \MKII\ that is done by parsing the \POSTSCRIPT\ and specials).
+\stopitem
+
+\startitem
+    In addition there is \PNG\ and \SVG\ output. It helps that \METAPOST\ output is
+    rather simple.
+\stopitem
+
+\startitem
+    The \LUATEX\ engine uses the \LUA\ backend which represents the result in \LUA\ tables
+    resembling the \METAPOST\ internal representation.
+\stopitem
+
+\startitem
+    The library supports scaled and double (internal) but also binary and decimal
+    number models that use (linked in) libraries.
+\stopitem
+
+% this would force a page
+%
+% \startitem
+%     The library is quite stable and Taco transferred maintenance to Luigi.
+% \stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The (\LUAMETATEX) library]
+
+\startitemize
+
+\startitem
+    We don't need the \POSTSCRIPT\ backend (which only does \TYPEONE\ anyway).
+\stopitem
+
+\startitem
+    We also have no use for \SVG\ and \PNG\ output.
+\stopitem
+
+\startitem
+    The binary number model has no advantages over the decimal one but brings
+    quite some dependency with it (library code).
+\stopitem
+
+\startitem
+    The \TYPEONE\ font support is not used in \CONTEXT\ because we handle text
+    differently.
+\stopitem
+
+\startitem
+    All this means that we can do with a smaller (simplified) \METAPOST\ library.
+\stopitem
+
+\startitem
+    The codebase has been overhauled. We still have \type {.w} files (\CWEB) but
+    use a \LUA\ script to convert that to \CCODE\ which means that we have better
+    control over how it comes out.
+\stopitem
+
+\startitem
+    As with \LUATEX\ the file \IO, message handling etc.\ now largely goes via \LUA;
+    it is more integrated.
+\stopitem
+
+\startitem
+    The same is true for scanning interfaces and return values (injectors). That also
+    made for more symbolic coding.
+\stopitem
+
+\startitem
+    Memory management (allocation) is under engine control (as with \TEX\ and \LUA);
+    we use a common high performance allocator library.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The (\LUAMETATEX) library]
+
+\startitemize
+
+\startitem
+    Some already present mechanism have been extended, for instance clips have
+    pre- and postscripts.
+\stopitem
+
+\startitem
+    A grouping wrapper has been added (handy for some graphic trickery supported in the
+    backend.)
+\stopitem
+
+\startitem
+    The \type {runscript} primitive supports symbolic references to functions (of course to
+    be provided at the \LUA\ end).
+\stopitem
+
+\startitem
+    The \type {runscript} return values can be more native, in addition to the already
+    present (default) \type {scantokens} support.
+\stopitem
+
+\startitem
+    Internals are extended with booleans and strings.
+\stopitem
+
+\startitem
+    Output (paths, clips etc) can be stacked in a different order.
+\stopitem
+
+\startitem
+    There are additional statistics available.
+\stopitem
+
+\startitem
+    In some places performance could be improved.
+\stopitem
+
+\startitem
+    In the meantime it can be considered a major upgrade and (for various
+    reasons) backporting to \LUATEX\ makes no sense. And yes, all errors are
+    mine.
+\stopitem
+
+\stopitemize
+
+\starttitle[title=The \LUA fication]
+
+    {\em See Taco's presentation where he gives some examples.}
+
+\stoptitle
+
+\starttitle[title=Callbacks]
+
+We need to hook in some functions: \blank[2*big]
+
+\starttabulate[|T|T|T|p|]
+    \HL
+    \NC   \NC find_file    \NC (name,mode,kind)           \NC locate a file (usually within the \TDS\ setup) \NC \NR
+    \NC f \NC open_file    \NC (name,mode,kind)           \NC open given file \NC \NR
+    \NC   \NC close_file   \NC (handle)                   \NC close opened file \NC \NR
+    \NC s \NC read_file    \NC (handle,size)              \NC read from file \NC \NR
+    \NC   \NC write_file   \NC (handle,str)               \NC write to file \NC \NR
+    \HL
+    \NC s \NC run_script   \NC (code,size,index)          \NC run the given string as \LUA\ script \NC \NR
+    \NC s \NC make_text    \NC (str,size,mode)            \NC process btex/etex \NC \NR
+    \HL
+    \NC   \NC run_internal \NC (action,index,kind,name)   \NC act on internal definition \NC \NR
+    \HL
+    \NC n \NC run_overload \NC (property,name,mode)       \NC process overload check \NC \NR
+    \HL
+    \NC   \NC run_logger   \NC (target,str,size)          \NC process log message \NC \NR
+    \NC   \NC run_error    \NC (message,help,interaction) \NC handle error (message) \NC \NR
+    \NC   \NC run_warning  \NC (message)                  \NC handle warning \NC \NR
+    \HL
+\stoptabulate
+
+% check_overload shipout_backend
+
+\stoptitle
+
+\starttitle[title=Two calling methods]
+
+The runner can be called as:
+
+\starttyping
+runscript("mp.MyFunction()")
+\stoptyping
+
+which implies at the \LUA\ end:
+
+\starttyping
+function mp.MyFunction()
+    ...
+end
+\stoptyping
+
+Here the callback function is responsible for loading the string and executing it.
+
+Alternatively one can say:
+
+\starttyping
+runscript <number>
+\stoptyping
+
+The number can be intercepted at the \LUA\ end to do some associated action.
+
+\stoptitle
+
+\starttitle[title=Variables]
+
+We can do:
+
+\starttyping
+lua.mp.MyFunction("foo",123,true)
+\stoptyping
+
+which in the end is equivalent to:
+
+\starttyping
+runscript("mp.MyFunction('foo',123,true)")
+\stoptyping
+
+Alternatively one can pick up values by scanning: like \type {scannext}, \type
+{scanexpression}, \type {scantoken}, \type {scansymbol}, \type {scannumeric},
+\type {scaninteger}, \type {scanboolean}, \type {scanstring}, \type {scanpair},
+\type {scancolor}, \type {scancmykcolor}, \type {scantransform}, \type
+{scanpath}, \type {scanpen}, etc.
+
+\stoptitle
+
+\starttitle[title=Return values]
+
+The runner can return:
+
+\startitemize
+
+\startitem
+    a string that gets fed into the \type {scantokens} primitive
+\stopitem
+
+\startitem
+    a numeric or boolean that gets injected as native \METAPOST\ object
+\stopitem
+
+\startitem
+    a table that gets concatenated and fed into the \type {scantokens} primitive
+\stopitem
+
+\startitem
+    \type {true} and a second argument that gets converted into a native \METAPOST\ object
+\stopitem
+
+\startitem
+    in the last case the number of table elements determines the object
+\stopitem
+
+\stopitemize
+
+Instead of returning a value one can inject: \type {injectnumeric}, \type
+{injectinteger}, \type {injectboolean}, \type {injectstring}, \type {injectpair},
+\type {injectcolor}, \type {injectcmykcolor}, \type {injecttransform}, \type
+{injectpath}, \type {injectwhatever}, etc.\ and these accept one or more values
+and|/|or tables.
+
+These mechanisms might evolve a bit over time. Lots of examples can be found in
+the \type {mlib-*.lmt} files.
+
+\stoptitle
+
+\starttitle[title=Parameters]
+
+\startitemize
+    \startitem
+        The new interfaces permit us to program quite robust parameter driven
+        interfaces that (sort of) match the way we do things at the \TEX\ end.
+    \stopitem
+    \startitem
+        The distribution has several examples of usage and more will be added.
+    \stopitem
+    \startitem
+        Macros that use the new mechanisms can be recognized by the \type {lmt_}
+        prefix.
+    \stopitem
+\stopitemize
+
+\starttyping
+lmt_mytrick [
+    somestring  = "test",
+    somenumeric = 123,
+    someboolean = true,
+    somecolor   = (1, 0, 1),
+    somepath    = fullsquare scaled 10cm,
+    somelist    = { (0, 0), (1, 3), (8, 9) },
+    sometable   = [
+        somenumeric = 321,
+   ],
+] ;
+\stoptyping
+
+{\em Show the pattern of defining these at the \LUA\ end and in \METAPOST\ files.}
+
+\stoptitle
+
+\stopdocument


Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-luametafun.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,236 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+\definecolor[maincolor] [r=.4]
+\definecolor[extracolor][s=.1]
+
+\startdocument
+  [title={MATH},
+   banner={complete control},
+   location={context\enspace {\bf 2021}\enspace meeting}]
+
+\starttitle[title=The benchmark]
+
+\startitemize
+
+\startitem
+    Traditional \TEX\ has set the benchmark for typesetting math.
+\stopitem
+
+\startitem
+    It uses three categories of fonts: alphabet, symbol, extensible.
+\stopitem
+
+\startitem
+    Limitations in fonts have lead to some curious handling of dimensions.
+\stopitem
+
+\startitem
+    The fact that there is \type {\over} makes for multipass scanning and
+    processing.
+\stopitem
+
+\startitem
+    The last family counts (when entering the second pass) so one has to use very
+    controlled font switching.
+\stopitem
+
+\startitem
+    Some features (limits, integrals, primes) rely on special macros and parsing.
+\stopitem
+
+\startitem
+    One can end up in tricky font switching. Also, quite some fonts are loaded in
+    order to set up the machinery.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Todays reality]
+
+\startitemize
+
+\startitem
+    We now use \OPENTYPE\ math fonts. In fact, in \MKIV\ we always used only one
+    font instance (unless we mix font families).
+\stopitem
+
+\startitem
+    We operate in the \UNICODE\ domain, so in the end there was no need to bump the
+    number of families in \LUATEX.
+\stopitem
+
+\startitem
+    In \CONTEXT\ we use only a few font families: regular, regular r2l, bold, bold r2l.
+\stopitem
+
+\startitem
+    All the tricky stuff is done with the help of \LUA. This already started very
+    early in the \LUATEX\ project and has not changed.
+\stopitem
+
+\startitem
+    But we still run into issues because the available fonts are inconsistent,
+    incompatible, have issues and that is unlikely to change.
+\stopitem
+
+\startitem
+    We have a virtual font system in place that was used during the transition (when no
+    fonts were available).
+\stopitem
+
+\startitem
+    In \CONTEXT\ there are various ways to deal with shortcomings in or extensions to fonts.
+\stopitem
+
+\startitem
+    At some point we need to make up our minds, accept the issues with fonts, and
+    just fix things runtime.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The engine]
+
+\startitemize
+
+\startitem
+    In \LUATEX\ we started with a hybrid approach but eventually ended up with
+    more split code paths.
+\stopitem
+
+\startitem
+    In \LUAMETATEX\ nearly all aspects of the engine had made configurable and are under
+    user control.
+\stopitem
+
+\startitem
+    This permits experiments where we can apply old methods onto new fonts.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=The tricky things]
+
+\startitemize
+
+\startitem
+    Spacing in traditional math is a combination of widths and italic correction:
+    we need to add them and sometimes afterwards subtract the italic correction.
+    In \OPENTYPE\ math we don't lie about dimensions and apply italic correction
+    selectively (as we have staircase kerns).
+\stopitem
+
+\startitem
+    Special symbols like primes are quite inconsistent wrt dimensions and positioning
+    and we need to catch that. We also need robust ways to collapse them to the proper
+    \UNICODE\ symbol.
+\stopitem
+
+\startitem
+    Larger variants (these \type {\bigg} things) needs some attention too.
+\stopitem
+
+\startitem
+    We need to map characters onto the right shaped (alphabets) because hardly
+    anyone will enter the \UNICODE\ math characters directly.
+\stopitem
+
+\startitem
+    We might want to fix scripts, italics, kern pairs etc.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Implementation]
+
+Among the new features (introduced over a period of time) are:
+
+\startitemize
+
+\startitem
+    All kind of inter|-|class spacing parameters (in addition to what \LUATEX\
+    already provides).
+\stopitem
+
+\startitem
+    Dozens of \OPENTYPE\ font related spacing parameters (more that traditional
+    \TEX).
+\stopitem
+
+\startitem
+    Opened up additional font (and taste) related parameters (hard coded in
+    traditional \TEX).
+\stopitem
+
+\startitem
+    Opened up style related parameters (hard coded in traditional \TEX).
+\stopitem
+
+\startitem
+    Control codes that make the engine follow a different (the traditional) code
+    path (which can come in handy when testing or writing manuals).
+\stopitem
+
+\startitem
+    The ability to simplify the result a bit wrt characters (the engine loves to
+    box a lot).
+\stopitem
+
+\startitem
+    Efficient font, style and parameter scaling by reusing fonts and thereby
+    limiting the number of instances.
+\stopitem
+
+\startitem
+    More options to special (constructed) symbols.
+\stopitem
+
+\startitem
+    Let math related nodes carry around more control properties and states.
+\stopitem
+
+\startitem
+    Support of local changes to math parameters.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+\stopdocument
+
+% mml
+% vf chars for extensibles
+
+% noads.handlers.showtree
+% noads.handlers.unscript
+% noads.handlers.unstack
+% noads.handlers.variants
+% noads.handlers.relocate
+% noads.handlers.families
+% noads.handlers.render
+% noads.handlers.collapse
+% noads.handlers.fixscripts
+% noads.handlers.domains
+% noads.handlers.autofences
+% noads.handlers.resize
+% noads.handlers.respace
+% noads.handlers.alternates
+% noads.handlers.tags
+% noads.handlers.italics
+% noads.handlers.kernpairs
+% noads.handlers.classes
+
+% builders.kernel.mlisttohlist
+% noads.handlers.makeup
+% noads.handlers.align


Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-math.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,298 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+
+\definehighlight[nb][style=bold,color=middlegray,define=no]
+
+\setuptolerance[verytolerant,stretch]
+
+\definecolor[maincolor][r=.3,b=.3]
+
+\startdocument
+  [title={OVERLOAD PROTECTION},
+   banner={the downside of macros},
+   location={context\enspace {\bf 2021}\enspace meeting}]
+
+% TEX MP
+
+\starttitle[title=Primitives]
+
+A \TEX\ engine comes with a whole set of primitive operations for:
+
+\startitemize[packed]
+    \startitem
+        accessing internal variables
+    \stopitem
+    \startitem
+        defining macros
+    \stopitem
+    \startitem
+        controlling expansion
+    \stopitem
+    \startitem
+        constructing boxes
+    \stopitem
+    \startitem
+        finalizing pages
+    \stopitem
+    \startitem
+        defining characters (text and math)
+    \stopitem
+    \startitem
+        inserting kerns, glue and penalties
+    \stopitem
+    \startitem
+        defining fonts
+    \stopitem
+    \startitem
+        dealing with languages (hyphenation)
+    \stopitem
+    \startitem
+        testing properties
+    \stopitem
+    \startitem
+        manipulating tokens
+    \stopitem
+    \startitem
+        managing inserts
+    \stopitem
+    \startitem
+        handling marks
+    \stopitem
+    \startitem
+        grouping
+    \stopitem
+    \startitem
+        mathematics
+    \stopitem
+    \startitem
+        tracing
+    \stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Macros]
+
+\startitemize
+    \startitem
+        Macros are commands defined by the user and/or a macro package.
+    \stopitem
+    \startitem
+        They can overload a primitive which then can confuse the whole machinery.
+    \stopitem
+    \startitem
+        A macro package can alias primitives for instance \type {\relax} can be
+        replaced by \type {\foo_relax} after \typ {\let \foo_relax \relax}.
+    \stopitem
+    \startitem
+        That only when (at definition time) the \type {_} is a letter. By using such
+        a character some protection against overload is provided.
+    \stopitem
+    \startitem
+        In \CONTEXT\ we often use(d) aliases like \type {\normalrelax} but of course
+        these can also be overloaded.
+    \stopitem
+    \startitem
+        We only overload a very few primitives, for instance \type {\language}.
+    \stopitem
+    \startitem
+        Users who overload primitives are \quote {on their own} and \quote {without
+        support}.
+    \stopitem
+    \startitem
+        An easy way to protect yourself is using \type {\CamelCase} names.
+    \stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Overload protection]
+
+\startitemize
+    \startitem
+        The \LUAMETATEX\ engine has overload protection built in for the \TEX\ engine
+        as well as provides means to do that for \METAPOST.
+    \stopitem
+    \startitem
+        In \LMTX\ all commands have been tagged accordingly (which was quite some work).
+    \stopitem
+    \startitem
+        Processing \type {s-system-macros.mkxl} gives an overview.
+    \stopitem
+    \startitem
+        Overload protection is off by default but can be turned on:
+
+\starttyping
+\enabledirectives[overloadmode=warning]
+\enabledirectives[overloadmode=error]
+\stoptyping
+
+    \stopitem
+    \startitem
+        I myself always run with the error variant and make sure that the manuals obey
+        the rules.
+    \stopitem
+    \startitem
+        Modules and/or styles (and in a few cases the core code) can cheat and use:
+
+\starttyping
+\pushoverloadmode
+    ........................
+    ........................
+\popoverloadmode
+\stoptyping
+
+    \stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Details]
+
+\startitemize
+    \startitem
+        Traditional \TEX\ has a few so called prefixes: \type {\global}, \type {\outer},
+        \type {\long}, and type \type {\immediate}.
+    \stopitem
+    \startitem
+        The \ETEX\ engine adds \type {\protected} (because we already had that in
+        \CONTEXT\ we use what we (also already) had: \type {\unexpanded}).
+    \stopitem
+    \startitem
+        In \LUATEX\ we can force macros to be always long, something that we do
+        in \MKIV\ (as in \MKII).
+    \stopitem
+    \startitem
+        In \LUAMETATEX\ the \type {\outer} and \type {\long} prefixes have been
+        dropped (they are ignored).
+    \stopitem
+    \startitem
+        In \LUAMETATEX\ the \type {\protected} prefix acts like in other engines
+        but protection is implemented more naturally.
+    \stopitem
+    \startitem
+        In addition \LUAMETATEX\ has new prefixes: \type {\frozen}, \type
+        {\permanent}, \type {\immutable}, \type {\mutable}, \type {\noaligned},
+        \type {\instance}, \type {\untraced}, \type {\tolerant}, \type
+        {\overloaded}, \type {\aliased}, \type {\immediate} and an experimental
+        \type {\semiprotected},
+    \stopitem
+    \startitem
+        Some prefixes end up as properties of macros, some influence scanning (for instance
+        in alignments and when calling \LUA\ functions). There is no noticeable runtime
+        overhead.
+    \stopitem
+    \startitem
+        The \type {\meaningfull} primitive is like \type {\meaning} but also reports
+        properties set by prefixes; there is also \type {\meaningless}.
+    \stopitem
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Prefixes]
+
+Regular definitions:
+
+\startitemize
+    \startitem
+        \type {\global}: defines a macro or sets a register value out of scope.
+    \stopitem
+    \startitem
+        \type {\outer}: is used to issue a warning when a macro defined as such was
+        used nested (just ignored in \LUAMETATEX).
+    \stopitem
+    \startitem
+        \type {\long}: triggers a warning when an argument of a macro contains a
+        \type {\par} equivalent (just ignored in \LUAMETATEX).
+    \stopitem
+    \startitem
+        \type {\protected}: makes a macro unexpandable (being itself) in an \type
+        {\edef} equivalent situation (where it can get out of hands).
+    \stopitem
+    \startitem
+        \type {\semiprotected}: is like \type {\protected} but the property is
+        ignored when \type {\semiexpanded} is applied.
+    \stopitem
+\stopitemize
+
+Special case:
+
+\startitemize
+    \startitem
+        \type {\immediate}: tells a backend primitive to come into action
+        immediately instead of creating a delayed action (via a whatsit node). In
+        \LUAMETATEX\ we have no built|-|in backend so there is signals a \LUA\
+        interface function this property.
+    \stopitem
+\stopitemize
+
+\page
+
+Scanning related:
+
+\startitemize
+    \startitem
+        \type {\noaligned}: tags a macro as valid peek ahead macro when scanning
+        alignments; normally that only makes sense for \type {\protected} macros.
+        This permits cleaner macros in for instance table mechanisms (no
+        unexpected expansion side effects).
+    \stopitem
+    \startitem
+        \type {\untraced}: this flag makes a macro report itself as primitive in
+        traces which is sometimes nicer that presenting a user with some
+        confusing meaning.
+    \stopitem
+    \startitem
+        \type {\tolerant}: a prefix that makes the macro argument parser accept
+        all kind of new argument parsing options and continue when delimited
+        arguments fail. This makes macros with optional arguments produce less
+        noise when they are traced but more important, it makes for cleaner low
+        level interfaces.
+    \stopitem
+\stopitemize
+
+
+\page
+
+Overload protection (primitives are protected against overloads by default):
+
+\startitemize
+    \startitem
+        \type {\aliased}: create a reference (using \type {\let}) that also inherits the
+        properties.
+    \stopitem
+    \startitem
+        \type {\permanent}: sets a flag that makes a macro (or definition) immune for
+        redefinition.
+    \stopitem
+    \startitem
+        \type {\frozen}: prevents overloading but one can bypass that with some
+        more effort.
+    \stopitem
+    \startitem
+        \type {\immutable}: makes a (normally variable definition) fixed, for instance
+        constants.
+    \stopitem
+    \startitem
+        \type {\mutable}: a flag showing that this macro or definition can be used for
+        anything (so the macro package also has to assume that).
+    \stopitem
+    \startitem
+        \type {\instance}: just a flag that can be used to signal that a macro (or definition)
+        is an instance of a more general concept.
+    \stopitem
+    \startitem
+        \type {\overloaded}: bypass a frozen flag (property).
+    \stopitem
+\stopitemize
+
+\blank[2*big]
+
+{\em Show some examples in the source code and editor.}
+
+\stoptitle
+
+\stopdocument


Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-overloadprotection.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,162 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+\definecolor[maincolor] [r=.4,g=.4]
+\definecolor[extracolor][s=.1]
+
+\startdocument
+  [title={PARAGRAPHS},
+   banner={a bit of an upgrade},
+   location={context\enspace {\bf 2021}\enspace meeting}]
+
+\starttitle[title=Note]
+
+\startitemize
+
+\startitem
+    Some of the following already is present for a while and has been discussed
+    at previous meetings.
+\stopitem
+
+\startitem
+    But \unknown\ occasionally some minor tweak gets added so consider this to be
+    an update.
+\stopitem
+
+\stopitemize
+
+\starttitle[title=Spacing]
+
+\startitemize
+
+\startitem
+    Spaces in \TEX\ become glue nodes (with optional stretch and shrink).
+\stopitem
+
+\startitem
+    In traditional \TEX\ these glue nodes are ref counted copies of the current
+    spacing related variables.
+\stopitem
+
+\startitem
+    In \LUATEX\ we make real copies so that when we mess with the node list
+    changes to glue don't affect other instances.
+\stopitem
+
+\stopitemize
+
+\starttitle[title=Parameters]
+
+\startitemize
+
+\startitem
+    In traditional \TEX\ the paragraphs bound properties that are in effect
+    when \type {\par} happens are used when breaking into lines.
+\stopitem
+
+\startitem
+    In \LUAMETATEX\ the paragraphs bound properties are stored with the
+    paragraph and can be frozen when they are set.
+\stopitem
+
+\startitem
+    This gives a more predictable (and robust) way of manipulating a
+    paragraph.
+\stopitem
+
+\startitem
+    We can for instance get rid of grouping side effects that interfere with
+    \type {\everypar}.
+\stopitem
+
+\startitem
+    Currently three dozen parameters are tracked but they are grouped in
+    categories.
+\stopitem
+
+\blank[2*big] {\em (show code and examples)}
+
+\stopitemize
+
+\stoptitle
+
+\starttitle[title=Wrapping]
+
+\startitemize
+
+\startitem
+    Doing something in front of a paragraph is taken care of by good old
+    \type {\everypar}.
+\stopitem
+
+\startitem
+    In \LUAMETATEX\ we also have \type {\everybeforepar} but so far in \CONTEXT\
+    we haven't used that.
+\stopitem
+
+\startitem
+    Adding something to the end of a paragraph can be tricky so we have
+    a wrapper mechanism: \type {\wrapuppar}.
+\stopitem
+
+\startitem
+    The \type {\wrapuppar} primitive is similar to \type {\atendofgroup} in the
+    sense that it accumulates tokens (so no \type {\endofpar}).
+\stopitem
+
+\startitem
+    Normally these primitives are not used directly but managed by a more general
+    system of handling paragraphs.
+\stopitem
+
+\stopitemize
+
+\blank[2*big] {\em (show code and examples)}
+
+\stoptitle
+
+\starttitle[title=Normalizing]
+
+\startitemize
+
+\startitem
+    In order to see consistent paragraphs at the \LUA\ end in \LUAMETATEX\
+    we can normalize the lines that come from the paragraph builder.
+\stopitem
+
+\startitem
+    Normalization results in:
+
+    \startitemize
+        \startitem
+            the first line having: indent skip
+        \stopitem
+        \startitem
+            each line having: left hang, left skip, right skip, right hang
+        \stopitem
+        \startitem
+            the last line having: left parfill skip, right parfill skip
+        \stopitem
+    \stopitemize
+\stopitem
+
+\startitem
+    It is controlled by \type {\normalizelinemode} which has additional flags for
+    swapping hanging indentation and par shapes, breaking after dir nodes,
+    removing margin kerns and clipping the line width.
+\stopitem
+
+\startitem
+    The clipping options avoids the side effects of \TEX\ using shifts which has
+    the side effect of unreal dimensions. This is one of the tricks|/|properties
+    of the traditional engine that is perfectly fine until we open up things.
+\stopitem
+
+\stopitemize
+
+\blank[2*big] {\em (show code and examples)}
+
+\stoptitle
+
+\stopdocument


Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-paragraphs.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,325 @@
+% language=us
+
+\usemodule[present-boring,abbreviations-logos]
+
+\definehighlight[nb][style=bold,color=middlegray,define=no]
+
+\startdocument
+  [title={PROGRAMMING},
+   banner={the way \CONTEXT\ is set up},
+   location={context\enspace {\bf 2021}\enspace meeting}]
+
+\starttitle[title=Levels]
+
+When you look at \CONTEXT\ bottom|--|up (engine|--|interface) you will notice: \blank[2*big]
+
+\startnarrower
+
+\startitemize[n]
+
+\startitem
+    \highlight[nb]{primitives:} this is what the engine comes with
+\stopitem
+\startitem
+    \highlight[nb]{infrastructure:} basic management of data structures
+\stopitem
+\startitem
+    \highlight[nb]{helpers:} macros that hide complexity
+\stopitem
+\startitem
+    \highlight[nb]{subsystems:} collections of macros that implement functionality
+\stopitem
+\startitem
+    \highlight[nb]{mechanisms:} these combine various subsystems
+\stopitem
+\startitem
+    \highlight[nb]{modules:} extra functionality (uses 1--5)
+\stopitem
+\startitem
+    \highlight[nb]{styles:} handling sources and layout (uses 4--6)
+\stopitem
+
+\stopitemize
+
+\stopnarrower
+
+\blank[2*big] Users normally see \CONTEXT\ top|--|down (usage|--|hacking).
+
+\stoptitle
+
+% % %
+
+\starttitle[title=Styles]
+
+\startitemize
+
+\startitem
+    These are prebuilt solutions for common as well as rare situations.
+\stopitem
+
+\startitem
+    The system comes with some styles: the \type {s-*} files.
+\stopitem
+
+\startitem
+    Right from the start the idea was that you get some reasonable default.
+\stopitem
+
+\startitem
+    And if you want more you stepwise define your style as you go.
+\stopitem
+
+\startitem
+    It really is part of the game: exploration.
+\stopitem
+
+\startitem
+    Solving your problem is a nice challenge.
+\stopitem
+
+\startitem
+    If you want a completely predefined setup, shop somewhere else.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+% % %
+
+\starttitle[title=Modules]
+
+\startitemize
+
+\startitem
+    A lot of functionality is built in.
+\stopitem
+
+\startitem
+    This helps to keep the system consistent.
+\stopitem
+
+\startitem
+    We could cheat and ship thousands of few|--|liner styles but don't do that.
+\stopitem
+
+\startitem
+    There are a few mechanisms that don't really fit into the core, so these are
+    implemented as modules that do fit into the interface: the \type {m-*} and
+    \type {x-*} files.
+\stopitem
+
+\startitem
+    Users can build and share their solutions which has resulted in some
+    third party modules: the \type {t-*} files.
+\stopitem
+
+\startitem
+    For (a few, often old) private files I use \type {p-*} name scheme.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+% % %
+
+\starttitle[title=Mechanisms]
+
+\startitemize
+
+\startitem
+    These are combinations of subsystems but often they cannot really be distinguished.
+\stopitem
+
+\startitem
+    Examples are notes, that combine notations, lists, references, descriptions etc.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+% % %
+
+\starttitle[title=Subsystems]
+
+\startitemize
+
+\startitem
+    This is what users see and can configure
+\stopitem
+
+\startitem
+    Most are (conceptually) rather old but evolved over time. There are no
+    fundamental differences between \MKIV\ and \LMTX, but the later is hopefully
+    a bit cleaner.
+\stopitem
+
+\startitem
+    Examples are fonts, languages, color, structure (sectioning, lists,
+    constructions, itemgroups, references), spacing, graphics, bibliographies,
+    positioning, numbering and layout.
+\stopitem
+
+\startitem
+    More hidden are the backend, export and \XML\ interfaces.
+\stopitem
+
+\startitem
+    Some have subsystems themselves, like widgets that relate to a specific
+    backend.
+\stopitem
+
+\startitem
+    There are often dependencies between subsystems which makes that it's not really a
+    hierarchy. A more strict separation would demand much more overhead.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+% % %
+
+\starttitle[title=Helpers]
+
+\startitemize
+
+\startitem
+    These provide basic programming help.
+\stopitem
+
+\startitem
+    Examples are macros for comparing things, loops, list processing,
+    argument handling.
+\stopitem
+
+\startitem
+    But more abstract box manipulations also fits in here.
+\stopitem
+
+\startitem
+    Some subsystems, like \XML\ and bibliographies provide more specific low
+    level helpers.
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+% % %
+
+\starttitle[title=Infrastructure]
+
+\startitemize
+
+\startitem
+    The engine provides counters, dimension and other registers that need
+    to be managed in order to avoid clashes in usage.
+\stopitem
+
+\startitem
+    Many of the helpers, subsystems and mechanisms fall back on common rather
+    low level functions (\LUA) and macros (using primitives).
+\stopitem
+
+\stopitemize
+
+\stoptitle
+
+% % %
+
+\starttitle[title=Primitives]
+
+\startitemize
+
+\startitem
+    This is what the engine provides: the built|-|in commands and features.
+\stopitem
+
+\startitem
+    In addition to the visible primitives there are \LUA\ interfaces and these
+    permit adding extra primitives.
+\stopitem
+
+\startitem
+    In \LUAMETATEX\ we have the core \TEX\ set but a few were dropped because we
+    don't have a backend and a different \IO\ subsystem (so they have to be
+    emulated).
+\stopitem
+
+\startitem
+    We also have some of the \ETEX\ primitives and very few of the \PDFTEX\ ones
+    but I now consider for instance expansion and protrusion extensions to be
+    kind of \ETEX.
+\stopitem
+
+\startitem
+    There are additional \LUATEX\ primitives but some were dropped, again because
+    of the backend, so we emulate some, and also because some were experimental.
+\stopitem
+
+\startitem
+    There are quite some new primitives and existing mechanisms have been extended,
+    cleaned up and (hopefully) improved.
+\stopitem
+
+\stopitemize
+
+% % %
+
+\starttitle[title=The shift]
+
+\startitemize
+
+\startitem
+    There have always been complaints about \TEX\ as a language (what makes me
+    wonder why those who complain use it.)
+\stopitem
+
+\startitem
+    Although there are some extensions to the language in \ETEX, follow|-|ups have
+    not really succeeded in this area.
+\stopitem
+
+\startitem
+    At some point I decided that code in the categories 1|--|4 cold benefit from
+    extensions.
+\stopitem
+
+\startitem
+    That also meant that we use less of the low helpers. It makes the code look a
+    bit more \TEX.
+\stopitem
+
+\startitem
+    It also means less clutter, in code as well in tracing. Often the code
+    becomes simpler too.
+\stopitem
+
+\startitem
+    The idea is that \TEX\ becomes a bit more a programming language.
+\stopitem
+
+\startitem
+    Of course it takes away the \quotation {Watch me, I can do real dirty \TEX\
+    hacking!} brawling.
+\stopitem
+
+\startitem
+    It also can take away some of the complaints.
+\stopitem
+
+\startitem
+    And it definitely adds some fun.
+\stopitem
+
+\stopitemize
+
+{\em During the week we show some of the implementation (in Visual Studio) and
+examples of applications. We also write a small extension (the {\tttf dk} unit)}
+
+\stoptitle
+
+\stopdocument


Property changes on: trunk/Master/texmf-dist/doc/context/presentations/context/2021/context-2021-programming.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,64 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>CtxTools 1.3.5</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">CtxTools 1.3.5 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--touchcontextfile</th><td></td><td>update context version</td></tr>
-        <tr><th>--contextversion</th><td></td><td>report context version</td></tr>
-        <tr><th>--jeditinterface</th><td></td><td>generate jedit syntax files [--pipe]</td></tr>
-        <tr><th>--bbeditinterface</th><td></td><td>generate bbedit syntax files [--pipe]</td></tr>
-        <tr><th>--sciteinterface</th><td></td><td>generate scite syntax files [--pipe]</td></tr>
-        <tr><th>--rawinterface</th><td></td><td>generate raw syntax files [--pipe]</td></tr>
-        <tr><th>--translateinterface</th><td></td><td>generate interface files (xml) [nl de ..]</td></tr>
-        <tr><th>--purgefiles</th><td></td><td>remove temporary files [--all --recurse] [basename]</td></tr>
-        <tr><th>--documentation  generate documentation [--type</th><td>]</td><td>[filename]</td></tr>
-        <tr><th>--filterpages'</th><td></td><td>) # no help, hidden temporary feature</td></tr>
-        <tr><th>--dpxmapfiles</th><td></td><td>convert pdftex mapfiles to dvipdfmx [--force] [texmfroot]</td></tr>
-        <tr><th>--listentities</th><td></td><td>create doctype entity definition from enco-uc.tex</td></tr>
-        <tr><th>--brandfiles</th><td></td><td>add context copyright notice [--force]</td></tr>
-        <tr><th>--platformize</th><td></td><td>replace line-endings [--recurse --force] [pattern]</td></tr>
-        <tr><th>--dependencies  analyze depedencies within context [--save --compact --filter</th><td>[macros|filenames] ]</td><td>[filename]</td></tr>
-        <tr><th>--updatecontext</th><td></td><td>download latest version and remake formats [--proxy]</td></tr>
-        <tr><th>--disarmutfbom</th><td></td><td>remove utf bom [--force]</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,75 +0,0 @@
-.TH "ctxtools" "1" "01-01-2021" "version 1.3.5" "CtxTools"
-.SH NAME
- ctxtools - CtxTools
-.SH SYNOPSIS
-.B ctxtools [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B CtxTools
-.SH OPTIONS
-.TP
-.B --touchcontextfile
-update context version
-.TP
-.B --contextversion
-report context version
-.TP
-.B --jeditinterface
-generate jedit syntax files [--pipe]
-.TP
-.B --bbeditinterface
-generate bbedit syntax files [--pipe]
-.TP
-.B --sciteinterface
-generate scite syntax files [--pipe]
-.TP
-.B --rawinterface
-generate raw syntax files [--pipe]
-.TP
-.B --translateinterface
-generate interface files (xml) [nl de ..]
-.TP
-.B --purgefiles
-remove temporary files [--all --recurse] [basename]
-.TP
-.B --documentation  generate documentation [--type=]
-[filename]
-.TP
-.B --filterpages'
-) # no help, hidden temporary feature
-.TP
-.B --dpxmapfiles
-convert pdftex mapfiles to dvipdfmx [--force] [texmfroot]
-.TP
-.B --listentities
-create doctype entity definition from enco-uc.tex
-.TP
-.B --brandfiles
-add context copyright notice [--force]
-.TP
-.B --platformize
-replace line-endings [--recurse --force] [pattern]
-.TP
-.B --dependencies  analyze depedencies within context [--save --compact --filter=[macros|filenames] ]
-[filename]
-.TP
-.B --updatecontext
-download latest version and remake formats [--proxy]
-.TP
-.B --disarmutfbom
-remove utf bom [--force]
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/ctxtools.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">ctxtools</entry>
-  <entry name="detail">CtxTools</entry>
-  <entry name="version">1.3.5</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="touchcontextfile"><short>update context version</short></flag>
-    <flag name="contextversion"><short>report context version</short></flag>
-    <flag name="jeditinterface"><short>generate jedit syntax files [<ref name="pipe]"/></short></flag>
-    <flag name="bbeditinterface"><short>generate bbedit syntax files [<ref name="pipe]"/></short></flag>
-    <flag name="sciteinterface"><short>generate scite syntax files [<ref name="pipe]"/></short></flag>
-    <flag name="rawinterface"><short>generate raw syntax files [<ref name="pipe]"/></short></flag>
-    <flag name="translateinterface"><short>generate interface files (xml) [nl de ..]</short></flag>
-    <flag name="purgefiles"><short>remove temporary files [<ref name="all"/> <ref name="recurse]"/> [basename]</short></flag>
-    <flag name="documentation  generate documentation [--type" value="]"><short>[filename]</short></flag>
-    <flag name="filterpages'"><short>) # no help, hidden temporary feature</short></flag>
-    <flag name="dpxmapfiles"><short>convert pdftex mapfiles to dvipdfmx [<ref name="force]"/> [texmfroot]</short></flag>
-    <flag name="listentities"><short>create doctype entity definition from enco-uc.tex</short></flag>
-    <flag name="brandfiles"><short>add context copyright notice [<ref name="force]"/></short></flag>
-    <flag name="platformize"><short>replace line-endings [<ref name="recurse"/> <ref name="force]"/> [pattern]</short></flag>
-    <flag name="dependencies  analyze depedencies within context [--save --compact --filter" value="[macros|filenames] ]"><short>[filename]</short></flag>
-    <flag name="updatecontext"><short>download latest version and remake formats [<ref name="proxy]"/></short></flag>
-    <flag name="disarmutfbom"><short>remove utf bom [<ref name="force]"/></short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,55 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>ImgToPdf 1.1.2</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">ImgToPdf 1.1.2 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--convert</th><td></td><td>convert image into pdf</td></tr>
-        <tr><th>--compression</th><td></td><td>level of compression in percent</td></tr>
-        <tr><th>--depth</th><td></td><td>image depth in bits</td></tr>
-        <tr><th>--colorspace</th><td></td><td> colorspace (rgb,cmyk,gray)</td></tr>
-        <tr><th>--quality</th><td></td><td>quality in percent</td></tr>
-        <tr><th>--inputpath</th><td></td><td>path where files are looked for</td></tr>
-        <tr><th>--outputpath</th><td></td><td>path where files end up</td></tr>
-        <tr><th>--auto</th><td></td><td>determine settings automatically</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,48 +0,0 @@
-.TH "imgtopdf" "1" "01-01-2021" "version 1.1.2" "ImgToPdf"
-.SH NAME
- imgtopdf - ImgToPdf
-.SH SYNOPSIS
-.B imgtopdf [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B ImgToPdf
-.SH OPTIONS
-.TP
-.B --convert
-convert image into pdf
-.TP
-.B --compression
-level of compression in percent
-.TP
-.B --depth
-image depth in bits
-.TP
-.B --colorspace
- colorspace (rgb,cmyk,gray)
-.TP
-.B --quality
-quality in percent
-.TP
-.B --inputpath
-path where files are looked for
-.TP
-.B --outputpath
-path where files end up
-.TP
-.B --auto
-determine settings automatically
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/imgtopdf.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">imgtopdf</entry>
-  <entry name="detail">ImgToPdf</entry>
-  <entry name="version">1.1.2</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="convert"><short>convert image into pdf</short></flag>
-    <flag name="compression"><short>level of compression in percent</short></flag>
-    <flag name="depth"><short>image depth in bits</short></flag>
-    <flag name="colorspace"><short> colorspace (rgb,cmyk,gray)</short></flag>
-    <flag name="quality"><short>quality in percent</short></flag>
-    <flag name="inputpath"><short>path where files are looked for</short></flag>
-    <flag name="outputpath"><short>path where files end up</short></flag>
-    <flag name="auto"><short>determine settings automatically</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>

Added: trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.1
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.1	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.1	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,33 @@
+.TH "mptopdf" "1" "01-01-2023" "version 1.4.1" "convert MetaPost figures to PDF"
+.SH NAME
+ mptopdf - convert MetaPost figures to PDF
+.SH SYNOPSIS
+.B mptopdf [
+.I OPTIONS ...
+.B ] [
+.I FILENAMES
+.B ]
+.SH DESCRIPTION
+.B convert MetaPost figures to PDF
+.SH OPTIONS
+.TP
+.B --metafun
+use the metafun format to process the file (default is mpost)
+.TP
+.B --texexec
+use texexec (context) to process text snippets
+.TP
+.B --latex
+use latex to process text snippets
+.SH AUTHOR
+More information about ConTeXt and the tools that come with it can be found at:
+
+
+.B "maillist:"
+ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
+
+.B "webpage:"
+http://www.pragma-ade.nl / http://tex.aanhet.net
+
+.B "wiki:"
+http://contextgarden.net


Property changes on: trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.1
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,50 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>MPtoPDF 1.4.1</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">MPtoPDF 1.4.1 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--metafun</th><td></td><td>use the metafun format to process the file (default is mpost)</td></tr>
-        <tr><th>--texexec</th><td></td><td>use texexec (context) to process text snippets</td></tr>
-        <tr><th>--latex</th><td></td><td>use latex to process text snippets</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Added: trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man1.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man1.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man1.pdf	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man1.pdf	2023-02-26 14:44:25 UTC (rev 66176)

Property changes on: trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man1.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">mptopdf</entry>
-  <entry name="detail">convert MetaPost figures to PDF</entry>
-  <entry name="version">1.4.1</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="metafun"><short>use the metafun format to process the file (default is mpost)</short></flag>
-    <flag name="texexec"><short>use texexec (context) to process text snippets</short></flag>
-    <flag name="latex"><short>use latex to process text snippets</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,55 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>PDFTools 1.2.1</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">PDFTools 1.2.1 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--spotimage  filename --colorspec</th><td></td><td>--colorname=  [--retain --invert --subpath=]</td></tr>
-        <tr><th>--colorimage  filename --colorspec</th><td></td><td>[--retain --invert --colorname= ]</td></tr>
-        <tr><th>--convertimage</th><td></td><td>filename [--retain --subpath]</td></tr>
-        <tr><th>--downsampleimage</th><td></td><td>filename [--retain --subpath --lowres --normal]</td></tr>
-        <tr><th>--info</th><td></td><td>filename</td></tr>
-        <tr><th>--countpages</th><td></td><td>[--pattern --threshold]</td></tr>
-        <tr><th>--checkembedded</th><td></td><td>[--pattern]</td></tr>
-        <tr><th>--analyzefile</th><td></td><td>filename</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,48 +0,0 @@
-.TH "pdftools" "1" "01-01-2021" "version 1.2.1" "PDFTools"
-.SH NAME
- pdftools - PDFTools
-.SH SYNOPSIS
-.B pdftools [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B PDFTools
-.SH OPTIONS
-.TP
-.B --spotimage  filename --colorspec
---colorname=  [--retain --invert --subpath=]
-.TP
-.B --colorimage  filename --colorspec
-[--retain --invert --colorname= ]
-.TP
-.B --convertimage
-filename [--retain --subpath]
-.TP
-.B --downsampleimage
-filename [--retain --subpath --lowres --normal]
-.TP
-.B --info
-filename
-.TP
-.B --countpages
-[--pattern --threshold]
-.TP
-.B --checkembedded
-[--pattern]
-.TP
-.B --analyzefile
-filename
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/pdftools.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">pdftools</entry>
-  <entry name="detail">PDFTools</entry>
-  <entry name="version">1.2.1</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="spotimage  filename --colorspec" value=""><short><ref name="colorname="/>  [<ref name="retain"/> <ref name="invert"/> <ref name="subpath=]"/></short></flag>
-    <flag name="colorimage  filename --colorspec" value=""><short>[<ref name="retain"/> <ref name="invert"/> <ref name="colorname="/> ]</short></flag>
-    <flag name="convertimage"><short>filename [<ref name="retain"/> <ref name="subpath]"/></short></flag>
-    <flag name="downsampleimage"><short>filename [<ref name="retain"/> <ref name="subpath"/> <ref name="lowres"/> <ref name="normal]"/></short></flag>
-    <flag name="info"><short>filename</short></flag>
-    <flag name="countpages"><short>[<ref name="pattern"/> <ref name="threshold]"/></short></flag>
-    <flag name="checkembedded"><short>[<ref name="pattern]"/></short></flag>
-    <flag name="analyzefile"><short>filename</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,49 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>PStoPDF 2.0.1</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">PStoPDF 2.0.1 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--request</th><td></td><td>handles exa request file</td></tr>
-        <tr><th>--watch</th><td></td><td>watch folders for conversions (untested)</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,30 +0,0 @@
-.TH "pstopdf" "1" "01-01-2021" "version 2.0.1" "PStoPDF"
-.SH NAME
- pstopdf - PStoPDF
-.SH SYNOPSIS
-.B pstopdf [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B PStoPDF
-.SH OPTIONS
-.TP
-.B --request
-handles exa request file
-.TP
-.B --watch
-watch folders for conversions (untested)
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/pstopdf.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">pstopdf</entry>
-  <entry name="detail">PStoPDF</entry>
-  <entry name="version">2.0.1</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="request"><short>handles exa request file</short></flag>
-    <flag name="watch"><short>watch folders for conversions (untested)</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,49 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>RlxTools 1.0.1</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">RlxTools 1.0.1 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--manipulate</th><td></td><td>[--test] manipulatorfile resourselog</td></tr>
-        <tr><th>--identify</th><td></td><td>[--collect] filename</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,30 +0,0 @@
-.TH "rlxtools" "1" "01-01-2021" "version 1.0.1" "RlxTools"
-.SH NAME
- rlxtools - RlxTools
-.SH SYNOPSIS
-.B rlxtools [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B RlxTools
-.SH OPTIONS
-.TP
-.B --manipulate
-[--test] manipulatorfile resourselog
-.TP
-.B --identify
-[--collect] filename
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/rlxtools.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">rlxtools</entry>
-  <entry name="detail">RlxTools</entry>
-  <entry name="version">1.0.1</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="manipulate"><short>[<ref name="test]"/> manipulatorfile resourselog</short></flag>
-    <flag name="identify"><short>[<ref name="collect]"/> filename</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,63 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>TeXExec 6.2.1</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">TeXExec 6.2.1 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--make</th><td></td><td>make formats</td></tr>
-        <tr><th>--check</th><td></td><td>check versions</td></tr>
-        <tr><th>--process</th><td></td><td>process file</td></tr>
-        <tr><th>--mptex</th><td></td><td>process mp file</td></tr>
-        <tr><th>--mpxtex</th><td></td><td>process mpx file</td></tr>
-        <tr><th>--mpgraphic</th><td></td><td>process mp file to stand-alone graphics</td></tr>
-        <tr><th>--mpstatic</th><td></td><td>process mp/ctx file to stand-alone graphics</td></tr>
-        <tr><th>--listing</th><td></td><td>list of file content</td></tr>
-        <tr><th>--figures</th><td></td><td>generate overview of figures</td></tr>
-        <tr><th>--modules</th><td></td><td>generate module documentation</td></tr>
-        <tr><th>--pdfarrange</th><td></td><td>impose pages (booklets)</td></tr>
-        <tr><th>--pdfselect</th><td></td><td>select pages from file(s)</td></tr>
-        <tr><th>--pdfcopy</th><td></td><td>copy pages from file(s)</td></tr>
-        <tr><th>--pdftrim</th><td></td><td>trim pages from file(s)</td></tr>
-        <tr><th>--pdfcombine</th><td></td><td>combine multiple pages</td></tr>
-        <tr><th>--pdfsplit</th><td></td><td>split file in pages</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,72 +0,0 @@
-.TH "texexec" "1" "01-01-2021" "version 6.2.1" "TeXExec"
-.SH NAME
- texexec - TeXExec
-.SH SYNOPSIS
-.B texexec [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B TeXExec
-.SH OPTIONS
-.TP
-.B --make
-make formats
-.TP
-.B --check
-check versions
-.TP
-.B --process
-process file
-.TP
-.B --mptex
-process mp file
-.TP
-.B --mpxtex
-process mpx file
-.TP
-.B --mpgraphic
-process mp file to stand-alone graphics
-.TP
-.B --mpstatic
-process mp/ctx file to stand-alone graphics
-.TP
-.B --listing
-list of file content
-.TP
-.B --figures
-generate overview of figures
-.TP
-.B --modules
-generate module documentation
-.TP
-.B --pdfarrange
-impose pages (booklets)
-.TP
-.B --pdfselect
-select pages from file(s)
-.TP
-.B --pdfcopy
-copy pages from file(s)
-.TP
-.B --pdftrim
-trim pages from file(s)
-.TP
-.B --pdfcombine
-combine multiple pages
-.TP
-.B --pdfsplit
-split file in pages
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/texexec.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">texexec</entry>
-  <entry name="detail">TeXExec</entry>
-  <entry name="version">6.2.1</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="make"><short>make formats</short></flag>
-    <flag name="check"><short>check versions</short></flag>
-    <flag name="process"><short>process file</short></flag>
-    <flag name="mptex"><short>process mp file</short></flag>
-    <flag name="mpxtex"><short>process mpx file</short></flag>
-    <flag name="mpgraphic"><short>process mp file to stand-alone graphics</short></flag>
-    <flag name="mpstatic"><short>process mp/ctx file to stand-alone graphics</short></flag>
-    <flag name="listing"><short>list of file content</short></flag>
-    <flag name="figures"><short>generate overview of figures</short></flag>
-    <flag name="modules"><short>generate module documentation</short></flag>
-    <flag name="pdfarrange"><short>impose pages (booklets)</short></flag>
-    <flag name="pdfselect"><short>select pages from file(s)</short></flag>
-    <flag name="pdfcopy"><short>copy pages from file(s)</short></flag>
-    <flag name="pdftrim"><short>trim pages from file(s)</short></flag>
-    <flag name="pdfcombine"><short>combine multiple pages</short></flag>
-    <flag name="pdfsplit"><short>split file in pages</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,102 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>texmfstart 7.0.0</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">texmfstart 7.0.0 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--script</th><td></td><td>run an mtx script (lua prefered method) (--noquotes), no script gives list</td></tr>
-        <tr><th>--evaluate</th><td></td><td>run code passed on the commandline (between quotes) (=loop) (exit|quit aborts)</td></tr>
-        <tr><th>--execute</th><td></td><td>run a script or program (texmfstart method) (--noquotes)</td></tr>
-        <tr><th>--resolve</th><td></td><td>resolve prefixed arguments</td></tr>
-        <tr><th>--ctxlua</th><td></td><td>run internally (using preloaded libs)</td></tr>
-        <tr><th>--internal</th><td></td><td>run script using built in libraries (same as --ctxlua)</td></tr>
-        <tr><th>--locate</th><td></td><td>locate given filename in database (default) or system (--first --all --detail)</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--tree</th><td>pathtotree</td><td>use given texmf tree (default file: setuptex.tmf)</td></tr>
-        <tr><th>--path</th><td>runpath</td><td>go to given path before execution</td></tr>
-        <tr><th>--ifchanged</th><td>filename</td><td>only execute when given file has changed (md checksum)</td></tr>
-        <tr><th>--iftouched</th><td>old,new</td><td>only execute when given file has changed (time stamp)</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--makestubs</th><td></td><td>create stubs for (context related) scripts</td></tr>
-        <tr><th>--removestubs</th><td></td><td>remove stubs (context related) scripts</td></tr>
-        <tr><th>--stubpath</th><td>binpath</td><td>paths where stubs wil be written</td></tr>
-        <tr><th>--windows</th><td></td><td>create windows (mswin) stubs</td></tr>
-        <tr><th>--unix</th><td></td><td>create unix (linux) stubs</td></tr>
-        <tr><th>--addbinarypath</th><td></td><td>prepend the (found) binarypath to runners</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--verbose</th><td></td><td>give a bit more info</td></tr>
-        <tr><th>--trackers</th><td>list</td><td>enable given trackers</td></tr>
-        <tr><th>--progname</th><td>str</td><td>format or backend</td></tr>
-        <tr><th>--systeminfo</th><td>str</td><td>show current operating system, processor, etc</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--edit</th><td></td><td>launch editor with found file</td></tr>
-        <tr><th>--launch</th><td></td><td>launch files like manuals, assumes os support (--all,--list)</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--timedrun</th><td></td><td>run a script and time its run</td></tr>
-        <tr><th>--autogenerate</th><td></td><td>regenerate databases if needed (handy when used to run context in an editor)</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--usekpse</th><td></td><td>use kpse as fallback (when no mkiv and cache installed, often slower)</td></tr>
-        <tr><th>--forcekpse</th><td></td><td>force using kpse (handy when no mkiv and cache installed but less functionality)</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--prefixes</th><td></td><td>show supported prefixes</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--generate</th><td></td><td>generate file database</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--variables</th><td></td><td>show configuration variables</td></tr>
-        <tr><th>--configurations</th><td></td><td>show configuration order</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--directives</th><td></td><td>show (known) directives</td></tr>
-        <tr><th>--trackers</th><td></td><td>show (known) trackers</td></tr>
-        <tr><th>--experiments</th><td></td><td>show (known) experiments</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--expand-braces</th><td></td><td>expand complex variable</td></tr>
-        <tr><th>--resolve-path</th><td></td><td>expand variable (completely resolve paths)</td></tr>
-        <tr><th>--expand-path</th><td></td><td>expand variable (resolve paths)</td></tr>
-        <tr><th>--expand-var</th><td></td><td>expand variable (resolve references)</td></tr>
-        <tr><th>--show-path</th><td></td><td>show path expansion of ...</td></tr>
-        <tr><th>--var-value</th><td></td><td>report value of variable</td></tr>
-        <tr><th>--find-file</th><td></td><td>report file location</td></tr>
-        <tr><th>--find-path</th><td></td><td>report path of file</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--pattern</th><td>string</td><td>filter variables</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,153 +0,0 @@
-.TH "mtxrun" "1" "01-01-2021" "version 1.33" "ConTeXt TDS Runner Tool"
-.SH NAME
- mtxrun - ConTeXt TDS Runner Tool
-.SH SYNOPSIS
-.B mtxrun [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B ConTeXt TDS Runner Tool
-.SH OPTIONS
-.TP
-.B --script
-run an mtx script (lua prefered method) (--noquotes), no script gives list
-.TP
-.B --evaluate
-run code passed on the commandline (between quotes) (=loop) (exit|quit aborts)
-.TP
-.B --execute
-run a script or program (texmfstart method) (--noquotes)
-.TP
-.B --resolve
-resolve prefixed arguments
-.TP
-.B --ctxlua
-run internally (using preloaded libs)
-.TP
-.B --internal
-run script using built in libraries (same as --ctxlua)
-.TP
-.B --locate
-locate given filename in database (default) or system (--first --all --detail)
-.TP
-.B --tree=pathtotree
-use given texmf tree (default file: setuptex.tmf)
-.TP
-.B --path=runpath
-go to given path before execution
-.TP
-.B --ifchanged=filename
-only execute when given file has changed (md checksum)
-.TP
-.B --iftouched=old,new
-only execute when given file has changed (time stamp)
-.TP
-.B --makestubs
-create stubs for (context related) scripts
-.TP
-.B --removestubs
-remove stubs (context related) scripts
-.TP
-.B --stubpath=binpath
-paths where stubs wil be written
-.TP
-.B --windows
-create windows (mswin) stubs
-.TP
-.B --unix
-create unix (linux) stubs
-.TP
-.B --addbinarypath
-prepend the (found) binarypath to runners
-.TP
-.B --verbose
-give a bit more info
-.TP
-.B --trackers=list
-enable given trackers
-.TP
-.B --progname=str
-format or backend
-.TP
-.B --systeminfo=str
-show current operating system, processor, etc
-.TP
-.B --edit
-launch editor with found file
-.TP
-.B --launch
-launch files like manuals, assumes os support (--all,--list)
-.TP
-.B --timedrun
-run a script and time its run
-.TP
-.B --autogenerate
-regenerate databases if needed (handy when used to run context in an editor)
-.TP
-.B --usekpse
-use kpse as fallback (when no mkiv and cache installed, often slower)
-.TP
-.B --forcekpse
-force using kpse (handy when no mkiv and cache installed but less functionality)
-.TP
-.B --prefixes
-show supported prefixes
-.TP
-.B --generate
-generate file database
-.TP
-.B --variables
-show configuration variables
-.TP
-.B --configurations
-show configuration order
-.TP
-.B --directives
-show (known) directives
-.TP
-.B --trackers
-show (known) trackers
-.TP
-.B --experiments
-show (known) experiments
-.TP
-.B --expand-braces
-expand complex variable
-.TP
-.B --resolve-path
-expand variable (completely resolve paths)
-.TP
-.B --expand-path
-expand variable (resolve paths)
-.TP
-.B --expand-var
-expand variable (resolve references)
-.TP
-.B --show-path
-show path expansion of ...
-.TP
-.B --var-value
-report value of variable
-.TP
-.B --find-file
-report file location
-.TP
-.B --find-path
-report path of file
-.TP
-.B --pattern=string
-filter variables
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/texmfstart.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,80 +0,0 @@
-<?xml version="1.0"?><application>
- <metadata>
-  <entry name="name">mtxrun</entry>
-  <entry name="detail">ConTeXt TDS Runner Tool</entry>
-  <entry name="version">1.33</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="script"><short>run an mtx script (lua prefered method) (<ref name="noquotes"/>), no script gives list</short></flag>
-    <flag name="evaluate"><short>run code passed on the commandline (between quotes) (=loop) (exit|quit aborts)</short></flag>
-    <flag name="execute"><short>run a script or program (texmfstart method) (<ref name="noquotes"/>)</short></flag>
-    <flag name="resolve"><short>resolve prefixed arguments</short></flag>
-    <flag name="ctxlua"><short>run internally (using preloaded libs)</short></flag>
-    <flag name="internal"><short>run script using built in libraries (same as <ref name="ctxlua"/>)</short></flag>
-    <flag name="locate"><short>locate given filename in database (default) or system (<ref name="first"/> <ref name="all"/> <ref name="detail"/>)</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="tree" value="pathtotree"><short>use given texmf tree (default file: setuptex.tmf)</short></flag>
-    <flag name="path" value="runpath"><short>go to given path before execution</short></flag>
-    <flag name="ifchanged" value="filename"><short>only execute when given file has changed (md checksum)</short></flag>
-    <flag name="iftouched" value="old,new"><short>only execute when given file has changed (time stamp)</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="makestubs"><short>create stubs for (context related) scripts</short></flag>
-    <flag name="removestubs"><short>remove stubs (context related) scripts</short></flag>
-    <flag name="stubpath" value="binpath"><short>paths where stubs wil be written</short></flag>
-    <flag name="windows"><short>create windows (mswin) stubs</short></flag>
-    <flag name="unix"><short>create unix (linux) stubs</short></flag>
-    <flag name="addbinarypath"><short>prepend the (found) binarypath to runners</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="verbose"><short>give a bit more info</short></flag>
-    <flag name="trackers" value="list"><short>enable given trackers</short></flag>
-    <flag name="progname" value="str"><short>format or backend</short></flag>
-    <flag name="systeminfo" value="str"><short>show current operating system, processor, etc</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="edit"><short>launch editor with found file</short></flag>
-    <flag name="launch"><short>launch files like manuals, assumes os support (<ref name="all"/>,<ref name="list"/>)</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="timedrun"><short>run a script and time its run</short></flag>
-    <flag name="autogenerate"><short>regenerate databases if needed (handy when used to run context in an editor)</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="usekpse"><short>use kpse as fallback (when no mkiv and cache installed, often slower)</short></flag>
-    <flag name="forcekpse"><short>force using kpse (handy when no mkiv and cache installed but less functionality)</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="prefixes"><short>show supported prefixes</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="generate"><short>generate file database</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="variables"><short>show configuration variables</short></flag>
-    <flag name="configurations"><short>show configuration order</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="directives"><short>show (known) directives</short></flag>
-    <flag name="trackers"><short>show (known) trackers</short></flag>
-    <flag name="experiments"><short>show (known) experiments</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="expand-braces"><short>expand complex variable</short></flag>
-    <flag name="resolve-path"><short>expand variable (completely resolve paths)</short></flag>
-    <flag name="expand-path"><short>expand variable (resolve paths)</short></flag>
-    <flag name="expand-var"><short>expand variable (resolve references)</short></flag>
-    <flag name="show-path"><short>show path expansion of ...</short></flag>
-    <flag name="var-value"><short>report value of variable</short></flag>
-    <flag name="find-file"><short>report file location</short></flag>
-    <flag name="find-path"><short>report path of file</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="pattern" value="string"><short>filter variables</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>
\ No newline at end of file

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,63 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>TeXTools 1.3.1</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">TeXTools 1.3.1 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--removemapnames</th><td></td><td>[pattern]   [--recurse]</td></tr>
-        <tr><th>--restoremapnames</th><td></td><td>[pattern]   [--recurse]</td></tr>
-        <tr><th>--hidemapnames</th><td></td><td>[pattern]   [--recurse]</td></tr>
-        <tr><th>--videmapnames</th><td></td><td>[pattern]   [--recurse]</td></tr>
-        <tr><th>--findfile</th><td></td><td>filename    [--recurse]</td></tr>
-        <tr><th>--unzipfiles</th><td></td><td>[pattern]   [--recurse]</td></tr>
-        <tr><th>--fixafmfiles</th><td></td><td>[pattern]   [--recurse]</td></tr>
-        <tr><th>--mactodos</th><td></td><td>[pattern]   [--recurse]</td></tr>
-        <tr><th>--fixtexmftrees</th><td></td><td>[texmfroot] [--force]</td></tr>
-        <tr><th>--replacefile</th><td></td><td>filename    [--force]</td></tr>
-        <tr><th>--updatetree</th><td></td><td>fromroot toroot [--force --nocheck --merge --delete]</td></tr>
-        <tr><th>--downcasefilenames</th><td></td><td>[--recurse] [--force]</td></tr>
-        <tr><th>--stripformfeeds</th><td></td><td>[--recurse] [--force]</td></tr>
-        <tr><th>--showfont</th><td></td><td>filename</td></tr>
-        <tr><th>--encmake</th><td></td><td>afmfile encodingname</td></tr>
-        <tr><th>--tpmmake</th><td></td><td>tpm file (run in texmf root)</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,72 +0,0 @@
-.TH "textools" "1" "01-01-2021" "version 1.3.1" "TeXTools"
-.SH NAME
- textools - TeXTools
-.SH SYNOPSIS
-.B textools [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B TeXTools
-.SH OPTIONS
-.TP
-.B --removemapnames
-[pattern]   [--recurse]
-.TP
-.B --restoremapnames
-[pattern]   [--recurse]
-.TP
-.B --hidemapnames
-[pattern]   [--recurse]
-.TP
-.B --videmapnames
-[pattern]   [--recurse]
-.TP
-.B --findfile
-filename    [--recurse]
-.TP
-.B --unzipfiles
-[pattern]   [--recurse]
-.TP
-.B --fixafmfiles
-[pattern]   [--recurse]
-.TP
-.B --mactodos
-[pattern]   [--recurse]
-.TP
-.B --fixtexmftrees
-[texmfroot] [--force]
-.TP
-.B --replacefile
-filename    [--force]
-.TP
-.B --updatetree
-fromroot toroot [--force --nocheck --merge --delete]
-.TP
-.B --downcasefilenames
-[--recurse] [--force]
-.TP
-.B --stripformfeeds
-[--recurse] [--force]
-.TP
-.B --showfont
-filename
-.TP
-.B --encmake
-afmfile encodingname
-.TP
-.B --tpmmake
-tpm file (run in texmf root)
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/textools.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">textools</entry>
-  <entry name="detail">TeXTools</entry>
-  <entry name="version">1.3.1</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="removemapnames"><short>[pattern]   [<ref name="recurse]"/></short></flag>
-    <flag name="restoremapnames"><short>[pattern]   [<ref name="recurse]"/></short></flag>
-    <flag name="hidemapnames"><short>[pattern]   [<ref name="recurse]"/></short></flag>
-    <flag name="videmapnames"><short>[pattern]   [<ref name="recurse]"/></short></flag>
-    <flag name="findfile"><short>filename    [<ref name="recurse]"/></short></flag>
-    <flag name="unzipfiles"><short>[pattern]   [<ref name="recurse]"/></short></flag>
-    <flag name="fixafmfiles"><short>[pattern]   [<ref name="recurse]"/></short></flag>
-    <flag name="mactodos"><short>[pattern]   [<ref name="recurse]"/></short></flag>
-    <flag name="fixtexmftrees"><short>[texmfroot] [<ref name="force]"/></short></flag>
-    <flag name="replacefile"><short>filename    [<ref name="force]"/></short></flag>
-    <flag name="updatetree"><short>fromroot toroot [<ref name="force"/> <ref name="nocheck"/> <ref name="merge"/> <ref name="delete]"/></short></flag>
-    <flag name="downcasefilenames"><short>[<ref name="recurse]"/> [<ref name="force]"/></short></flag>
-    <flag name="stripformfeeds"><short>[<ref name="recurse]"/> [<ref name="force]"/></short></flag>
-    <flag name="showfont"><short>filename</short></flag>
-    <flag name="encmake"><short>afmfile encodingname</short></flag>
-    <flag name="tpmmake"><short>tpm file (run in texmf root)</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,54 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>TeXUtil 9.1.0</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">TeXUtil 9.1.0 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--references</th><td></td><td>convert tui file into tuo file</td></tr>
-        <tr><th>--figures</th><td></td><td>generate figure dimensions file</td></tr>
-        <tr><th>--logfile</th><td></td><td>filter essential log messages</td></tr>
-        <tr><th>--purgefiles</th><td></td><td>remove most temporary files</td></tr>
-        <tr><th>--purgeallfiles</th><td></td><td>remove all temporary files</td></tr>
-        <tr><th>--documentation</th><td></td><td>generate documentation file from source</td></tr>
-        <tr><th>--analyzefile</th><td></td><td>analyze pdf file</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,45 +0,0 @@
-.TH "texutil" "1" "01-01-2021" "version 9.1.0" "TeXUtil"
-.SH NAME
- texutil - TeXUtil
-.SH SYNOPSIS
-.B texutil [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B TeXUtil
-.SH OPTIONS
-.TP
-.B --references
-convert tui file into tuo file
-.TP
-.B --figures
-generate figure dimensions file
-.TP
-.B --logfile
-filter essential log messages
-.TP
-.B --purgefiles
-remove most temporary files
-.TP
-.B --purgeallfiles
-remove all temporary files
-.TP
-.B --documentation
-generate documentation file from source
-.TP
-.B --analyzefile
-analyze pdf file
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/texutil.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">texutil</entry>
-  <entry name="detail">TeXUtil</entry>
-  <entry name="version">9.1.0</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="references"><short>convert tui file into tuo file</short></flag>
-    <flag name="figures"><short>generate figure dimensions file</short></flag>
-    <flag name="logfile"><short>filter essential log messages</short></flag>
-    <flag name="purgefiles"><short>remove most temporary files</short></flag>
-    <flag name="purgeallfiles"><short>remove all temporary files</short></flag>
-    <flag name="documentation"><short>generate documentation file from source</short></flag>
-    <flag name="analyzefile"><short>analyze pdf file</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>
\ No newline at end of file

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,50 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>TMFTools 1.2.1</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">TMFTools 1.2.1 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--analyze</th><td></td><td>[--strict --sort --rootpath --treepath --delete --force] [pattern]</td></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--serve</th><td></td><td>act as kpse server</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,30 +0,0 @@
-.TH "tmftools" "1" "01-01-2021" "version 1.1.0" "TMFTools"
-.SH NAME
- tmftools - TMFTools
-.SH SYNOPSIS
-.B tmftools [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B TMFTools
-.SH OPTIONS
-.TP
-.B --analyze
-[--strict --sort --rootpath --treepath --delete --force] [pattern]
-.TP
-.B --serve
-act as kpse server
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/tmftools.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">tmftools</entry>
-  <entry name="detail">TMFTools</entry>
-  <entry name="version">1.1.0</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="analyze"><short>[<ref name="strict"/> <ref name="sort"/> <ref name="rootpath"/> <ref name="treepath"/> <ref name="delete"/> <ref name="force"/>] [pattern]</short></flag>
-   </subcategory>
-   <subcategory>
-    <flag name="serve"><short>act as kpse server</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,54 +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">
-
-<!-- compare with lmx framework variant -->
-
-<!--
-    filename : context-base.xml
-    comment  : companion to mtx-server-ctx-startup.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>
-        <title>XMLTools 1.2.1</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%; } 
-        </style>
-        <style type="text/css">
-                    </style>
-                    </head>
-        <body>
-            <div id="top">            <div id="top-one">
-                <div id="top-two">XMLTools 1.2.1 </div>
-            </div>
-        </div>
-        <div id="bottom">            <div id="bottom-one">
-                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
-            </div>
-        </div>
-        <div id="left"></div>
-        <div id="right"></div>
-        <div id="main">
-            <div id='main-settings'>
-                <h1>Command line options</h1>
-<table>
-    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
-        <tr><th/><td/><td/></tr>
-        <tr><th>--dir</th><td></td><td>generate directory listing</td></tr>
-        <tr><th>--mmlpages</th><td></td><td>generate graphic from mathml</td></tr>
-        <tr><th>--analyze</th><td></td><td>report entities and elements [--utf --process]</td></tr>
-        <tr><th>--cleanup</th><td></td><td>cleanup xml file [--force]</td></tr>
-        <tr><th>--enhance</th><td></td><td>enhance xml file (partial)</td></tr>
-        <tr><th>--filter</th><td></td><td>filter elements from xml file [--element]</td></tr>
-        <tr><th>--dir</th><td></td><td>generate ddirectory listing</td></tr>
-    </table>
-<br/>
-            </div>
-        </div>
-        </body>
-</html>

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,45 +0,0 @@
-.TH "xmltools" "1" "01-01-2021" "version 1.2.2" "XMLTools"
-.SH NAME
- xmltools - XMLTools
-.SH SYNOPSIS
-.B xmltools [
-.I OPTIONS ...
-.B ] [
-.I FILENAMES
-.B ]
-.SH DESCRIPTION
-.B XMLTools
-.SH OPTIONS
-.TP
-.B --dir
-generate directory listing
-.TP
-.B --mmlpages
-generate graphic from mathml
-.TP
-.B --analyze
-report entities and elements [--utf --process]
-.TP
-.B --cleanup
-cleanup xml file [--force]
-.TP
-.B --enhance
-enhance xml file (partial)
-.TP
-.B --filter
-filter elements from xml file [--element]
-.TP
-.B --dir
-generate ddirectory listing
-.SH AUTHOR
-More information about ConTeXt and the tools that come with it can be found at:
-
-
-.B "maillist:"
-ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
-
-.B "webpage:"
-http://www.pragma-ade.nl / http://tex.aanhet.net
-
-.B "wiki:"
-http://contextgarden.net

Deleted: trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/xmltools.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-<application>
- <metadata>
-  <entry name="name">xmltools</entry>
-  <entry name="detail">XMLTools</entry>
-  <entry name="version">1.2.2</entry>
- </metadata>
- <flags>
-  <category name="basic">
-   <subcategory>
-    <flag name="dir"><short>generate directory listing</short></flag>
-    <flag name="mmlpages"><short>generate graphic from mathml</short></flag>
-    <flag name="analyze"><short>report entities and elements [<ref name="utf"/> <ref name="process"/>]</short></flag>
-    <flag name="cleanup"><short>cleanup xml file [<ref name="force"/>]</short></flag>
-    <flag name="enhance"><short>enhance xml file (partial)</short></flag>
-    <flag name="filter"><short>filter elements from xml file [<ref name="element"/>]</short></flag>
-    <flag name="dir"><short>generate ddirectory listing</short></flag>
-   </subcategory>
-  </category>
- </flags>
-</application>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -89,7 +89,7 @@
         <tr><th>--nonstopmode</th><td></td><td>run without stopping</td></tr>
         <tr><th/><td/><td/></tr>
         <tr><th>--nosynctex</th><td></td><td>never initializes synctex (for production runs)</td></tr>
-        <tr><th>--synctex</th><td></td><td>run with synctex enabled (better use \setupsynctex[state=start]</td></tr>
+        <tr><th>--synctex</th><td></td><td>run with synctex enabled (better use \setupsynctex[state=start])</td></tr>
         <tr><th/><td/><td/></tr>
         <tr><th>--nodates</th><td></td><td>omit runtime dates in pdf file (optional value: a number (this 1970 offset time) or string "YYYY-MM-DD HH:MM")</td></tr>
         <tr><th>--nocompression</th><td></td><td>forcefully turns off compression in the backend</td></tr>
@@ -108,6 +108,7 @@
         <tr><th>--profile</th><td></td><td>profile job (use: mtxrun --script profile --analyze)</td></tr>
         <tr><th>--timing</th><td></td><td>generate timing and statistics overview</td></tr>
         <tr><th>--keeptuc</th><td></td><td>keep previous tuc files (jobname-tuc-[run].tmp)</td></tr>
+        <tr><th>--keeppdf</th><td></td><td>keep previous pdf files (jobname-pdf-keep.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>
@@ -114,6 +115,10 @@
         <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>
+        <tr><th/><td/><td/></tr>
+        <tr><th>--ownerpassword</th><td></td><td>encrypt the (pdf) file using this master password</td></tr>
+        <tr><th>--userpassword</th><td></td><td>use an additional password for opening the document</td></tr>
+        <tr><th>--permissions</th><td></td><td>list of: print, modify, extract, add, fillin, assemble, quality</td></tr>
         <tr><th colspan="3">special</th></tr>
         <tr><th/><td/><td/></tr>
         <tr><th>--pdftex</th><td></td><td>process file with texexec using pdftex</td></tr>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-context" "1" "01-01-2021" "version 1.04" "ConTeXt Process Management"
+.TH "mtx-context" "1" "01-01-2023" "version 1.04" "ConTeXt Process Management"
 .SH NAME
  mtx-context - ConTeXt Process Management
 .SH SYNOPSIS
@@ -129,7 +129,7 @@
 never initializes synctex (for production runs)
 .TP
 .B --synctex
-run with synctex enabled (better use \setupsynctex[state=start]
+run with synctex enabled (better use \setupsynctex[state=start])
 .TP
 .B --nodates
 omit runtime dates in pdf file (optional value: a number (this 1970 offset time) or string "YYYY-MM-DD HH:MM")
@@ -171,6 +171,9 @@
 .B --keeptuc
 keep previous tuc files (jobname-tuc-[run].tmp)
 .TP
+.B --keeppdf
+keep previous pdf files (jobname-pdf-keep.tmp)
+.TP
 .B --keeplog
 keep previous log files (jobname-log-[run].tmp)
 .TP
@@ -185,6 +188,15 @@
 .TP
 .B --extras
 show extras
+.TP
+.B --ownerpassword
+encrypt the (pdf) file using this master password
+.TP
+.B --userpassword
+use an additional password for opening the document
+.TP
+.B --permissions
+list of: print, modify, extract, add, fillin, assemble, quality
 .SH OPTIONS: SPECIAL
 .TP
 .B --pdftex

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/context.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -148,7 +148,7 @@
                     <short>never initializes synctex (for production runs)</short>
                 </flag>
                 <flag name="synctex">
-                    <short>run with synctex enabled (better use \setupsynctex[state=start]</short>
+                    <short>run with synctex enabled (better use \setupsynctex[state=start])</short>
                 </flag>
             </subcategory>
             <subcategory>
@@ -202,6 +202,9 @@
                 <flag name="keeptuc">
                     <short>keep previous tuc files (jobname-tuc-[run].tmp)</short>
                 </flag>
+                <flag name="keeppdf">
+                    <short>keep previous pdf files (jobname-pdf-keep.tmp)</short>
+                </flag>
                 <flag name="keeplog">
                     <short>keep previous log files (jobname-log-[run].tmp)</short>
                 </flag>
@@ -220,6 +223,17 @@
                     <short>show extras</short>
                 </flag>
             </subcategory>
+            <subcategory>
+                <flag name="ownerpassword">
+                    <short>encrypt the (pdf) file using this master password</short>
+                </flag>
+                <flag name="userpassword">
+                    <short>use an additional password for opening the document</short>
+                </flag>
+                <flag name="permissions">
+                    <short>list of: print, modify, extract, add, fillin, assemble, quality</short>
+                </flag>
+            </subcategory>
         </category>
         <category name="special">
             <subcategory>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/luatools.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/luatools.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/luatools.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "luatools" "1" "01-01-2021" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
+.TH "luatools" "1" "01-01-2023" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
 .SH NAME
  luatools - ConTeXt TDS Management Tool (aka luatools)
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-babel.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-babel.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-babel.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-babel" "1" "01-01-2021" "version 1.20" "Babel Input To UTF Conversion"
+.TH "mtx-babel" "1" "01-01-2023" "version 1.20" "Babel Input To UTF Conversion"
 .SH NAME
  mtx-babel - Babel Input To UTF Conversion
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-base.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-base.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-base.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-base" "1" "01-01-2021" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
+.TH "mtx-base" "1" "01-01-2023" "version 1.35" "ConTeXt TDS Management Tool (aka luatools)"
 .SH NAME
  mtx-base - ConTeXt TDS Management Tool (aka luatools)
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-bibtex.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-bibtex.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-bibtex.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-bibtex" "1" "01-01-2021" "version 1.00" "bibtex helpers"
+.TH "mtx-bibtex" "1" "01-01-2023" "version 1.00" "bibtex helpers"
 .SH NAME
  mtx-bibtex - bibtex helpers
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-cache.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-cache.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-cache.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-cache" "1" "01-01-2021" "version 1.01" "ConTeXt & MetaTeX Cache Management"
+.TH "mtx-cache" "1" "01-01-2023" "version 1.01" "ConTeXt & MetaTeX Cache Management"
 .SH NAME
  mtx-cache - ConTeXt & MetaTeX Cache Management
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-chars.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-chars.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-chars.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-chars" "1" "01-01-2021" "version 0.10" "MkII Character Table Generators"
+.TH "mtx-chars" "1" "01-01-2023" "version 0.10" "MkII Character Table Generators"
 .SH NAME
  mtx-chars - MkII Character Table Generators
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-check.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-check.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-check.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-check" "1" "01-01-2021" "version 0.10" "Basic ConTeXt Syntax Checking"
+.TH "mtx-check" "1" "01-01-2023" "version 0.10" "Basic ConTeXt Syntax Checking"
 .SH NAME
  mtx-check - Basic ConTeXt Syntax Checking
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-colors.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-colors.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-colors.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-colors" "1" "01-01-2021" "version 0.10" "ConTeXt Color Management"
+.TH "mtx-colors" "1" "01-01-2023" "version 0.10" "ConTeXt Color Management"
 .SH NAME
  mtx-colors - ConTeXt Color Management
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -89,7 +89,7 @@
         <tr><th>--nonstopmode</th><td></td><td>run without stopping</td></tr>
         <tr><th/><td/><td/></tr>
         <tr><th>--nosynctex</th><td></td><td>never initializes synctex (for production runs)</td></tr>
-        <tr><th>--synctex</th><td></td><td>run with synctex enabled (better use \setupsynctex[state=start]</td></tr>
+        <tr><th>--synctex</th><td></td><td>run with synctex enabled (better use \setupsynctex[state=start])</td></tr>
         <tr><th/><td/><td/></tr>
         <tr><th>--nodates</th><td></td><td>omit runtime dates in pdf file (optional value: a number (this 1970 offset time) or string "YYYY-MM-DD HH:MM")</td></tr>
         <tr><th>--nocompression</th><td></td><td>forcefully turns off compression in the backend</td></tr>
@@ -108,6 +108,7 @@
         <tr><th>--profile</th><td></td><td>profile job (use: mtxrun --script profile --analyze)</td></tr>
         <tr><th>--timing</th><td></td><td>generate timing and statistics overview</td></tr>
         <tr><th>--keeptuc</th><td></td><td>keep previous tuc files (jobname-tuc-[run].tmp)</td></tr>
+        <tr><th>--keeppdf</th><td></td><td>keep previous pdf files (jobname-pdf-keep.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>
@@ -114,6 +115,10 @@
         <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>
+        <tr><th/><td/><td/></tr>
+        <tr><th>--ownerpassword</th><td></td><td>encrypt the (pdf) file using this master password</td></tr>
+        <tr><th>--userpassword</th><td></td><td>use an additional password for opening the document</td></tr>
+        <tr><th>--permissions</th><td></td><td>list of: print, modify, extract, add, fillin, assemble, quality</td></tr>
         <tr><th colspan="3">special</th></tr>
         <tr><th/><td/><td/></tr>
         <tr><th>--pdftex</th><td></td><td>process file with texexec using pdftex</td></tr>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-context" "1" "01-01-2021" "version 1.04" "ConTeXt Process Management"
+.TH "mtx-context" "1" "01-01-2023" "version 1.04" "ConTeXt Process Management"
 .SH NAME
  mtx-context - ConTeXt Process Management
 .SH SYNOPSIS
@@ -129,7 +129,7 @@
 never initializes synctex (for production runs)
 .TP
 .B --synctex
-run with synctex enabled (better use \setupsynctex[state=start]
+run with synctex enabled (better use \setupsynctex[state=start])
 .TP
 .B --nodates
 omit runtime dates in pdf file (optional value: a number (this 1970 offset time) or string "YYYY-MM-DD HH:MM")
@@ -171,6 +171,9 @@
 .B --keeptuc
 keep previous tuc files (jobname-tuc-[run].tmp)
 .TP
+.B --keeppdf
+keep previous pdf files (jobname-pdf-keep.tmp)
+.TP
 .B --keeplog
 keep previous log files (jobname-log-[run].tmp)
 .TP
@@ -185,6 +188,15 @@
 .TP
 .B --extras
 show extras
+.TP
+.B --ownerpassword
+encrypt the (pdf) file using this master password
+.TP
+.B --userpassword
+use an additional password for opening the document
+.TP
+.B --permissions
+list of: print, modify, extract, add, fillin, assemble, quality
 .SH OPTIONS: SPECIAL
 .TP
 .B --pdftex

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-context.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -148,7 +148,7 @@
                     <short>never initializes synctex (for production runs)</short>
                 </flag>
                 <flag name="synctex">
-                    <short>run with synctex enabled (better use \setupsynctex[state=start]</short>
+                    <short>run with synctex enabled (better use \setupsynctex[state=start])</short>
                 </flag>
             </subcategory>
             <subcategory>
@@ -202,6 +202,9 @@
                 <flag name="keeptuc">
                     <short>keep previous tuc files (jobname-tuc-[run].tmp)</short>
                 </flag>
+                <flag name="keeppdf">
+                    <short>keep previous pdf files (jobname-pdf-keep.tmp)</short>
+                </flag>
                 <flag name="keeplog">
                     <short>keep previous log files (jobname-log-[run].tmp)</short>
                 </flag>
@@ -220,6 +223,17 @@
                     <short>show extras</short>
                 </flag>
             </subcategory>
+            <subcategory>
+                <flag name="ownerpassword">
+                    <short>encrypt the (pdf) file using this master password</short>
+                </flag>
+                <flag name="userpassword">
+                    <short>use an additional password for opening the document</short>
+                </flag>
+                <flag name="permissions">
+                    <short>list of: print, modify, extract, add, fillin, assemble, quality</short>
+                </flag>
+            </subcategory>
         </category>
         <category name="special">
             <subcategory>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-dvi.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-dvi.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-dvi.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-dvi" "1" "01-01-2021" "version 0.01" "ConTeXt DVI Helpers"
+.TH "mtx-dvi" "1" "01-01-2023" "version 0.01" "ConTeXt DVI Helpers"
 .SH NAME
  mtx-dvi - ConTeXt DVI Helpers
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-epub.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-epub.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-epub.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-epub" "1" "01-01-2021" "version 1.10" "ConTeXt EPUB Helpers"
+.TH "mtx-epub" "1" "01-01-2023" "version 1.10" "ConTeXt EPUB Helpers"
 .SH NAME
  mtx-epub - ConTeXt EPUB Helpers
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-evohome.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-evohome.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-evohome.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-evohome" "1" "01-01-2021" "version 1.00" "Evohome Fetcher"
+.TH "mtx-evohome" "1" "01-01-2023" "version 1.00" "Evohome Fetcher"
 .SH NAME
  mtx-evohome - Evohome Fetcher
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fcd.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fcd.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fcd.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-fcd" "1" "01-01-2021" "version 1.00" "Fast Directory Change"
+.TH "mtx-fcd" "1" "01-01-2023" "version 1.00" "Fast Directory Change"
 .SH NAME
  mtx-fcd - Fast Directory Change
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-flac.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-flac.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-flac.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-flac" "1" "01-01-2021" "version 0.10" "ConTeXt Flac Helpers"
+.TH "mtx-flac" "1" "01-01-2023" "version 0.10" "ConTeXt Flac Helpers"
 .SH NAME
  mtx-flac - ConTeXt Flac Helpers
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -61,6 +61,8 @@
 <br/>
 <h1>Examples</h1>
 <tt>mtxrun --script font --list somename (== --pattern=*somename*)</tt>
+<br/><br/><tt>mtxrun --script font --list --file filename</tt>
+<br/><tt>mtxrun --script font --list --name --pattern=*somefile*</tt>
 <br/><br/><tt>mtxrun --script font --list --name somename</tt>
 <br/><tt>mtxrun --script font --list --name --pattern=*somename*</tt>
 <br/><br/><tt>mtxrun --script font --list --spec somename</tt>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-fonts" "1" "01-01-2021" "version 1.00" "ConTeXt Font Database Management"
+.TH "mtx-fonts" "1" "01-01-2023" "version 1.00" "ConTeXt Font Database Management"
 .SH NAME
  mtx-fonts - ConTeXt Font Database Management
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-fonts.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -39,6 +39,10 @@
     <example><command>mtxrun --script font --list somename (== --pattern=*somename*)</command></example>
    </subcategory>
    <subcategory>
+    <example><command>mtxrun --script font --list --file filename</command></example>
+    <example><command>mtxrun --script font --list --name --pattern=*somefile*</command></example>
+   </subcategory>
+   <subcategory>
     <example><command>mtxrun --script font --list --name somename</command></example>
     <example><command>mtxrun --script font --list --name --pattern=*somename*</command></example>
    </subcategory>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-grep.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-grep.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-grep.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-grep" "1" "01-01-2021" "version 0.10" "Simple Grepper"
+.TH "mtx-grep" "1" "01-01-2023" "version 0.10" "Simple Grepper"
 .SH NAME
  mtx-grep - Simple Grepper
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -47,6 +47,7 @@
         <tr><th>--bbedit</th><td></td><td>generate bbedit interface files</td></tr>
         <tr><th>--jedit</th><td></td><td>generate jedit interface files</td></tr>
         <tr><th>--textpad</th><td></td><td>generate textpad interface files</td></tr>
+        <tr><th>--vim</th><td></td><td>generate vim interface files</td></tr>
         <tr><th>--text</th><td></td><td>create text files for commands and environments</td></tr>
         <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>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-interface" "1" "01-01-2021" "version 0.13" "ConTeXt Interface Related Goodies"
+.TH "mtx-interface" "1" "01-01-2023" "version 0.13" "ConTeXt Interface Related Goodies"
 .SH NAME
  mtx-interface - ConTeXt Interface Related Goodies
 .SH SYNOPSIS
@@ -29,6 +29,9 @@
 .B --textpad
 generate textpad interface files
 .TP
+.B --vim
+generate vim interface files
+.TP
 .B --text
 create text files for commands and environments
 .TP

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-interface.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -18,6 +18,7 @@
     <flag name="bbedit"><short>generate bbedit interface files</short></flag>
     <flag name="jedit"><short>generate jedit interface files</short></flag>
     <flag name="textpad"><short>generate textpad interface files</short></flag>
+    <flag name="vim"><short>generate vim interface files</short></flag>
     <flag name="text"><short>create text files for commands and environments</short></flag>
     <flag name="raw"><short>report commands to the console</short></flag>
     <flag name="check"><short>generate check file</short></flag>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-metapost.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-metapost.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-metapost.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-metapost" "1" "01-01-2021" "version 0.10" "MetaPost to PDF processor"
+.TH "mtx-metapost" "1" "01-01-2023" "version 0.10" "MetaPost to PDF processor"
 .SH NAME
  mtx-metapost - MetaPost to PDF processor
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-modules.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-modules.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-modules.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-modules" "1" "01-01-2021" "version 1.00" "ConTeXt Module Documentation Generators"
+.TH "mtx-modules" "1" "01-01-2023" "version 1.00" "ConTeXt Module Documentation Generators"
 .SH NAME
  mtx-modules - ConTeXt Module Documentation Generators
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-package.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-package.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-package.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-package" "1" "01-01-2021" "version 0.10" "Distribution Related Goodies"
+.TH "mtx-package" "1" "01-01-2023" "version 0.10" "Distribution Related Goodies"
 .SH NAME
  mtx-package - Distribution Related Goodies
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-patterns.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-patterns.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-patterns.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-patterns" "1" "01-01-2021" "version 0.20" "ConTeXt Pattern File Management"
+.TH "mtx-patterns" "1" "01-01-2023" "version 0.20" "ConTeXt Pattern File Management"
 .SH NAME
  mtx-patterns - ConTeXt Pattern File Management
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -43,6 +43,7 @@
         <tr><th>--metadata</th><td></td><td>show metadata xml blob</td></tr>
         <tr><th>--pretty</th><td></td><td>replace newlines in metadata</td></tr>
         <tr><th>--fonts</th><td></td><td>show used fonts (--detail)</td></tr>
+        <tr><th>--object</th><td></td><td>show object"/></td></tr>
         <tr><th/><td/><td/></tr>
     </table>
 <br/>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-pdf" "1" "01-01-2021" "version 0.10" "ConTeXt PDF Helpers"
+.TH "mtx-pdf" "1" "01-01-2023" "version 0.10" "ConTeXt PDF Helpers"
 .SH NAME
  mtx-pdf - ConTeXt PDF Helpers
 .SH SYNOPSIS
@@ -22,6 +22,9 @@
 .TP
 .B --fonts
 show used fonts (--detail)
+.TP
+.B --object
+show object"/>
 .SH AUTHOR
 More information about ConTeXt and the tools that come with it can be found at:
 

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-pdf.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -12,11 +12,13 @@
     <flag name="metadata"><short>show metadata xml blob</short></flag>
     <flag name="pretty"><short>replace newlines in metadata</short></flag>
     <flag name="fonts"><short>show used fonts (<ref name="detail)"/></short></flag>
+    <flag name="object"><short>show object"/></short></flag>
    </subcategory>
    <subcategory>
     <example><command>mtxrun --script pdf --info foo.pdf</command></example>
     <example><command>mtxrun --script pdf --metadata foo.pdf</command></example>
     <example><command>mtxrun --script pdf --metadata --pretty foo.pdf</command></example>
+    <example><command>mtxrun --script pdf --stream=4 foo.pdf</command></example>
    </subcategory>
   </category>
  </flags>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-plain.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-plain.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-plain.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-plain" "1" "01-01-2021" "version 1.00" "Plain TeX Runner"
+.TH "mtx-plain" "1" "01-01-2023" "version 1.00" "Plain TeX Runner"
 .SH NAME
  mtx-plain - Plain TeX Runner
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-profile.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-profile.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-profile.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-profile" "1" "01-01-2021" "version 1.00" "ConTeXt MkIV LuaTeX Profiler"
+.TH "mtx-profile" "1" "01-01-2023" "version 1.00" "ConTeXt MkIV LuaTeX Profiler"
 .SH NAME
  mtx-profile - ConTeXt MkIV LuaTeX Profiler
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-rsync.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-rsync.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-rsync.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-rsync" "1" "01-01-2021" "version 0.10" "Rsync Helpers"
+.TH "mtx-rsync" "1" "01-01-2023" "version 0.10" "Rsync Helpers"
 .SH NAME
  mtx-rsync - Rsync Helpers
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-scite.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-scite.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-scite.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-scite" "1" "01-01-2021" "version 1.00" "Scite Helper Script"
+.TH "mtx-scite" "1" "01-01-2023" "version 1.00" "Scite Helper Script"
 .SH NAME
  mtx-scite - Scite Helper Script
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-server.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-server.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-server.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-server" "1" "01-01-2021" "version 0.10" "Simple Webserver For Helpers"
+.TH "mtx-server" "1" "01-01-2023" "version 0.10" "Simple Webserver For Helpers"
 .SH NAME
  mtx-server - Simple Webserver For Helpers
 .SH SYNOPSIS

Added: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.html	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,53 @@
+<?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">
+
+<!-- compare with lmx framework variant -->
+
+<!--
+    filename : context-base.xml
+    comment  : companion to mtx-server-ctx-startup.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>
+        <title>ConTeXt Word Filtering 0.10</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%; } 
+        </style>
+        <style type="text/css">
+                    </style>
+                    </head>
+        <body>
+            <div id="top">            <div id="top-one">
+                <div id="top-two">ConTeXt Word Filtering 0.10 </div>
+            </div>
+        </div>
+        <div id="bottom">            <div id="bottom-one">
+                <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context at ntg.nl | website: http://www.pragma-ade.nl</div>
+            </div>
+        </div>
+        <div id="left"></div>
+        <div id="right"></div>
+        <div id="main">
+            <div id='main-settings'>
+                <h1>Command line options</h1>
+<table>
+    <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
+        <tr><th/><td/><td/></tr>
+        <tr><th>--expand</th><td></td><td>expand hunspell dics and aff files</td></tr>
+        <tr><th>--dictionary</th><td></td><td>word file (.dics)</td></tr>
+        <tr><th>--specification</th><td></td><td>affix specification file (.aff)</td></tr>
+        <tr><th>--result</th><td></td><td>destination file</td></tr>
+    </table>
+<br/>
+<h1>Examples</h1>
+<tt>mtxrun --script spell --expand --dictionary="en_US.dic" --specification="en_US.txt" --result="data-us.txt"</tt>
+<br/><br/>            </div>
+        </div>
+        </body>
+</html>


Property changes on: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.html
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.man	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,36 @@
+.TH "mtx-spell" "1" "01-01-2023" "version 0.10" "ConTeXt Word Filtering"
+.SH NAME
+ mtx-spell - ConTeXt Word Filtering
+.SH SYNOPSIS
+.B mtxrun --script spell [
+.I OPTIONS ...
+.B ] [
+.I FILENAMES
+.B ]
+.SH DESCRIPTION
+.B ConTeXt Word Filtering
+.SH OPTIONS
+.TP
+.B --expand
+expand hunspell dics and aff files
+.TP
+.B --dictionary
+word file (.dics)
+.TP
+.B --specification
+affix specification file (.aff)
+.TP
+.B --result
+destination file
+.SH AUTHOR
+More information about ConTeXt and the tools that come with it can be found at:
+
+
+.B "maillist:"
+ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
+
+.B "webpage:"
+http://www.pragma-ade.nl / http://tex.aanhet.net
+
+.B "wiki:"
+http://contextgarden.net


Property changes on: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.man
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.xml	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<application>
+ <metadata>
+  <entry name="name">mtx-spell</entry>
+  <entry name="detail">ConTeXt Word Filtering</entry>
+  <entry name="version">0.10</entry>
+ </metadata>
+ <flags>
+  <category name="basic">
+   <subcategory>
+    <flag name="expand"><short>expand hunspell dics and aff files</short></flag>
+    <flag name="dictionary"><short>word file (.dics)</short></flag>
+    <flag name="specification"><short>affix specification file (.aff)</short></flag>
+    <flag name="result"><short>destination file</short></flag>
+   </subcategory>
+  </category>
+ </flags>
+ <examples>
+  <category>
+   <title>Examples</title>
+   <subcategory>
+    <example><command>mtxrun --script spell --expand --dictionary="en_US.dic" --specification="en_US.txt" --result="data-us.txt"</command></example>
+   </subcategory>
+  </category>
+ </examples>
+</application>


Property changes on: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-spell.xml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-texworks.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-texworks.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-texworks.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-texworks" "1" "01-01-2021" "version 1.00" "TeXworks Startup Script"
+.TH "mtx-texworks" "1" "01-01-2023" "version 1.00" "TeXworks Startup Script"
 .SH NAME
  mtx-texworks - TeXworks Startup Script
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-timing.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-timing.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-timing.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-timing" "1" "01-01-2021" "version 0.10" "ConTeXt Timing Tools"
+.TH "mtx-timing" "1" "01-01-2023" "version 0.10" "ConTeXt Timing Tools"
 .SH NAME
  mtx-timing - ConTeXt Timing Tools
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-tools.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-tools.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-tools.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-tools" "1" "01-01-2021" "version 1.01" "Some File Related Goodies"
+.TH "mtx-tools" "1" "01-01-2023" "version 1.01" "Some File Related Goodies"
 .SH NAME
  mtx-tools - Some File Related Goodies
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unicode.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unicode.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unicode.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-unicode" "1" "01-01-2021" "version 1.02" "Checker for char-dat.lua"
+.TH "mtx-unicode" "1" "01-01-2023" "version 1.02" "Checker for char-dat.lua"
 .SH NAME
  mtx-unicode - Checker for char-dat.lua
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unzip.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unzip.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-unzip.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-unzip" "1" "01-01-2021" "version 0.10" "Simple Unzipper"
+.TH "mtx-unzip" "1" "01-01-2023" "version 0.10" "Simple Unzipper"
 .SH NAME
  mtx-unzip - Simple Unzipper
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-update.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-update.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-update.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-update" "1" "01-01-2021" "version 1.03" "ConTeXt Minimals Updater"
+.TH "mtx-update" "1" "01-01-2023" "version 1.03" "ConTeXt Minimals Updater"
 .SH NAME
  mtx-update - ConTeXt Minimals Updater
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.html
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.html	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.html	2023-02-26 14:44:25 UTC (rev 66176)
@@ -40,7 +40,9 @@
     <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr>
         <tr><th/><td/><td/></tr>
         <tr><th>--generate</th><td></td><td>generate extension in sync with current version</td></tr>
+        <tr><th>--program</th><td></td><td>use the given binary (e.g. codium, default: code)</td></tr>
         <tr><th>--start</th><td></td><td>start vscode with extension context</td></tr>
+        <tr><th>--lsfile</th><td></td><td>generate language server file (work in progress)</td></tr>
     </table>
 <br/>
 <h1>Example</h1>
@@ -47,6 +49,7 @@
 <tt>mtxrun --script vscode --generate e:/vscode/extensions</tt>
 <br/><tt>mtxrun --script vscode --generate</tt>
 <br/><tt>mtxrun --script vscode --start</tt>
+<br/><tt>mtxrun --script vscode --program=codium --start</tt>
 <br/><br/>            </div>
         </div>
         </body>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-vscode" "1" "01-01-2021" "version 1.00" "vscode extension generator"
+.TH "mtx-vscode" "1" "01-01-2023" "version 1.00" "vscode extension generator"
 .SH NAME
  mtx-vscode - vscode extension generator
 .SH SYNOPSIS
@@ -14,8 +14,14 @@
 .B --generate
 generate extension in sync with current version
 .TP
+.B --program
+use the given binary (e.g. codium, default: code)
+.TP
 .B --start
 start vscode with extension context
+.TP
+.B --lsfile
+generate language server file (work in progress)
 .SH AUTHOR
 More information about ConTeXt and the tools that come with it can be found at:
 

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.xml
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.xml	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-vscode.xml	2023-02-26 14:44:25 UTC (rev 66176)
@@ -9,7 +9,9 @@
   <category name="basic">
    <subcategory>
     <flag name="generate"><short>generate extension in sync with current version</short></flag>
+    <flag name="program"><short>use the given binary (e.g. codium, default: code)</short></flag>
     <flag name="start"><short>start vscode with extension context</short></flag>
+    <flag name="lsfile"><short>generate language server file (work in progress)</short></flag>
    </subcategory>
   </category>
  </flags>
@@ -20,6 +22,7 @@
     <example><command>mtxrun --script vscode --generate e:/vscode/extensions</command></example>
     <example><command>mtxrun --script vscode --generate</command></example>
     <example><command>mtxrun --script vscode --start</command></example>
+    <example><command>mtxrun --script vscode --program=codium --start</command></example>
    </subcategory>
   </category>
  </examples>

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-watch.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-watch.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-watch.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-watch" "1" "01-01-2021" "version 1.00" "ConTeXt Request Watchdog"
+.TH "mtx-watch" "1" "01-01-2023" "version 1.00" "ConTeXt Request Watchdog"
 .SH NAME
  mtx-watch - ConTeXt Request Watchdog
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-youless.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-youless.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtx-youless.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtx-youless" "1" "01-01-2021" "version 1.100" "youless Fetcher"
+.TH "mtx-youless" "1" "01-01-2023" "version 1.100" "youless Fetcher"
 .SH NAME
  mtx-youless - youless Fetcher
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtxrun.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtxrun.man	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkiv/mtxrun.man	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-.TH "mtxrun" "1" "01-01-2021" "version 1.33" "ConTeXt TDS Runner Tool"
+.TH "mtxrun" "1" "01-01-2023" "version 1.33" "ConTeXt TDS Runner Tool"
 .SH NAME
  mtxrun - ConTeXt TDS Runner Tool
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0000-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0000-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0000-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0002-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0002-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0002-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0006-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0006-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0006-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0007-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0007-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0007-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0010-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0010-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-0010-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1101-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1101-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1101-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1102-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1102-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1102-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1103-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1103-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1103-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1104-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1104-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1104-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,5 +1,5 @@
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1105-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1105-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/magazines/mag-1105-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,5 +1,5 @@
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution
@@ -192,3 +192,25 @@
 \stoplinecorrection
 
 \stopdocument
+
+% \protected\def\guessbestwidth#1#2#3%
+%   {\beginlocalcontrol
+%    \begingroup
+%    \hsize#1\relax
+%    \setbox\scratchboxone\hbox\bgroup#3\egroup
+%    \doloop {%
+%       \setbox\scratchboxtwo\vbox\bgroup\unhcopy\scratchboxone\egroup
+%       \scratchcounter\boxlines\scratchboxtwo
+%       \ifdim\boxlinenw\scratchboxtwo\scratchcounter<\boxlinewd\scratchboxtwo\scratchcounter
+%         \advance\hsize-#2\relax
+%       \else
+%         \exitloop
+%       \fi
+%    }%
+%    \normalexpanded{\endgroup\endlocalcontrol\dimexpr\the\hsize\relax}}
+%
+% \hsize \guessbestwidth{10cm}{1mm}{\input{ward}}
+%
+% \input{ward}
+%
+% \the\guessbestwidth{10cm}{1mm}{\input{ward}}

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-calls.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-calls.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-calls.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-calls
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-contents.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-contents.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-contents
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-expanding.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-expanding.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-expanding.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% engine=luatex macros=mkvi language=uk
+% engine=luatex macros=mkvi language=us
 
 \startcomponent about-exploring
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-hashing.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-hashing.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-hashing.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-hashing
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-hz.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-hz.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-hz.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-hz
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-introduction
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-jitting.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk engine=luajittex
+% language=us engine=luajittex
 
 \startluacode
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-luafunctions.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-luafunctions.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-luafunctions.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-properties
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mathstackers.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mathstackers.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mathstackers.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-mathstackers
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mathstyles.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mathstyles.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mathstyles.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-speed
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-metafun.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-metafun.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-metafun.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-metafun
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mobility.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mobility.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-mobility.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-mobility
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-nodes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-nodes.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-nodes.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \usemodule[nodechart]
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-nuts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-nuts.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-nuts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-calls
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-properties.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-properties.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-properties.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-properties
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-speed.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-speed.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-speed.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-speed
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-threequarters.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-threequarters.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about-threequarters.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent about-calls
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/about/about.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,5 +1,5 @@
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-contents.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-contents.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/bidi
 
 \startcomponent bidi-contents
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-fonts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-fonts.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-fonts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/bidi
 
 \startcomponent bidi-fonts
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/bidi
 
 \startcomponent bidi-introduction
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-lua.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-lua.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-lua.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/bidi
 
 \startcomponent bidi-lua
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-mixed.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-mixed.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-mixed.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/bidi
 
 \startcomponent bidi-mixed
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-numbering.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-numbering.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-numbering.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/bidi
 
 \startcomponent bidi-numbering
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-style.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-style.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-style.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/bidi
+
 \startenvironment bidi-style
 
 \usemodule[abr-04]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-titlepage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-titlepage.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-titlepage.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/bidi
+
 \startcomponent bidi-titlepage
 
 \environment bidi-style

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-vertical.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-vertical.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi-vertical.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/bidi
 
 \startcomponent bidi-vertical
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/bidi/bidi.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,9 @@
-% Because we cross a threshold in the amount of content the sources
-% have been split into components. This is typical a manual that
-% grows. Feel free to send suggestions and improvements.
+% language=us runpath=texruns:manuals/bidi
 
+% Because we cross a threshold in the amount of content the sources have been split
+% into components. This is typical a manual that grows. Feel free to send suggestions
+% and improvements. Future versions might include Idris' long due bidi onthology.
+
 \environment bidi-style
 
 \startdocument

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone-periods.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone-periods.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone-periods.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,157 @@
+% language=us runpath=texruns:manuals/canbedone
+
+\environment canbedone-style
+
+% \showframe
+
+\startdocument
+  [title=periods,
+   color=middlered]
+
+\startsectionlevel[title=Introduction]
+
+When the \TEX\ program showed up there were not many fonts that could be used so
+it came with its own fonts and because the number of slots in the encoding was
+limited (first to 127, later to 255) there was no space characters. It was not
+needed anyway because the engine uses a model of glue between words. So, instead
+of fixed spacing, \TEX\ uses flexible spacing. In addition to what is normally
+considered a word space, spacing is also determined by the so called space factor
+of characters preceding spaces. But, especially after abbreviations with periods
+you might want something different depending on the usage of the period. Here we
+discuss how that can be done.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Font related spacing]
+
+Spacing is controlled by the amount specified in the font in the so called
+font dimensions. In \CONTEXT\ these can be accessed via macros:
+
+\starttabulate[||c|c|c|c|]
+\BC                        \NC \tf normal space
+                           \NC \bf bold space
+                           \NC \it italic space
+                           \NC \bi bolditalic space                    \NC \NR
+\NC \tex{interwordspace}   \NC {\tf \expandafter}\the\interwordspace
+                           \NC {\bf \expandafter}\the\interwordspace
+                           \NC {\it \expandafter}\the\interwordspace
+                           \NC {\bi \expandafter}\the\interwordspace   \NC \NR
+\NC \tex{interwordstretch} \NC {\tf \expandafter}\the\interwordstretch
+                           \NC {\bf \expandafter}\the\interwordstretch
+                           \NC {\it \expandafter}\the\interwordstretch
+                           \NC {\bi \expandafter}\the\interwordstretch \NC \NR
+\NC \tex{interwordshrink}  \NC {\tf \expandafter}\the\interwordshrink
+                           \NC {\it \expandafter}\the\interwordshrink
+                           \NC {\bi \expandafter}\the\interwordshrink
+                           \NC {\bf \expandafter}\the\interwordshrink  \NC \NR
+\stoptabulate
+
+The differences in the three components are subtle but often of no concern to the
+user. Stretch and shrink kicks in when we align the left and right edge,
+otherwise they are basically ignored. These spacing properties are very specific
+for \TEX\ fonts, they don't come with for instance \OPENTYPE\ fonts. There we
+derive the stretch and shrink from the regular font space (\UNICODE\ slot U+00020
+or \ASCII\ value 32).
+
+A user can tweak the interword spacing with \type {\spaceskip} and \type
+{\xspaceskip} which works together with the \type {\spacefactor} and (character
+specific)\type {\sfcode} values. And as it is somewhat hard to explain the
+details involved I just refer to Chapter~25 (Spacing) of \TEX\ by Topic.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Spacing after periods]
+
+For this manual it's only important to know that the space factors influence the
+spacing after uppercase letters and punctuation and the later aspect is what this
+is about.
+
+\startbuffer[a]
+\frenchspacing          This is a t.e.s.t. for periods. Does it work?
+\vskip-.8\lineheight
+\nonfrenchspacing \blue This is a t.e.s.t. for periods. Does it work?
+\stopbuffer
+
+\startbuffer[b]
+\frenchspacing           This is a t.e.s.t.\ for periods. Does it work?
+\vskip-.8\lineheight
+\nonfrenchspacing \green This is a t.e.s.t.\ for periods. Does it work?
+\stopbuffer
+
+\startbuffer[c]
+\frenchspacing         This is a t.e.s.t\fsp. for periods. Does it work?
+\vskip-.8\lineheight
+\nonfrenchspacing \red This is a t.e.s.t\fsp. for periods. Does it work?
+\stopbuffer
+
+\startbuffer[d]
+\setperiodkerning[zerospaceperiods]
+\frenchspacing         This is a t.e.s.t. for periods. Does it work?
+\vskip-.8\lineheight
+\nonfrenchspacing \red This is a t.e.s.t. for periods. Does it work?
+\stopbuffer
+
+\typebuffer[a] \start \forgetall \resetperiodkerning \getbuffer[a] \stop
+
+You will notice that the spacing after \type {t.e.s.t.} is as flexible as
+the space after \type {periods.} but what if you don't want that? There are
+several ways to influence the following space:
+
+\typebuffer[b] \start \forgetall \resetperiodkerning \getbuffer[b] \stop
+
+The \type {\fsp} macro looks ahead and adapts the space factor:
+
+\typebuffer[c] \start \forgetall \resetperiodkerning \getbuffer[c] \stop
+
+\stopsectionlevel
+
+\startsectionlevel[title=Automation]
+
+Where the manual (explicit) making sure we get spacing right is quite
+robust and predictable a user might be willing to delegate the task to
+\CONTEXT, and here is the trick:
+
+\typebuffer[d] \start \forgetall \resetperiodkerning \getbuffer[d] \stop
+
+This features has been present from mid 2017 but I admit that till now I never
+used it. Reasons are that it makes no sense to adapt existing documents and when
+a text is for instance meant for a user group journal too, you cannot expect this
+automatic feature to be present in the macro package used for typesetting it. But
+maybe it's time to change that policy. I also admit that I seldom have this
+situation, probably the only few cases are abbreviations like \type {e.g.} (for
+example) and \type {c.q.} (casu quo).
+
+There are a few predefined period kerning variants and you can define more if you
+want:
+
+\starttyping
+\defineperiodkerning [zerospaceperiods]  [factor=0]
+\defineperiodkerning [smallspaceperiods] [factor=.25]
+\defineperiodkerning [halfspaceperiods]  [factor=.5]
+\stoptyping
+
+\startbuffer[e]
+\setperiodkerning[zerospaceperiods]
+\frenchspacing         How about c.q. and e.g. within a sentence?
+\vskip-.8\lineheight
+\nonfrenchspacing \red How about c.q. and e.g. within a sentence?
+\stopbuffer
+
+\typebuffer[e] \start \forgetall \getbuffer[e] \stop
+
+Of course one needs to keep an eye on the results because one never knows if the
+heuristics are flawed. And if needed it can be improved.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Todo]
+
+{\em more spacing related features}
+
+% optionalspace
+% autoinsertspace
+% ~
+
+\stopsectionlevel
+
+\stopdocument


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone-periods.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone-style.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone-style.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone-style.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,142 @@
+% language=us runpath=texruns:manuals/canbedone
+
+% I started this series in June 2023 when I found for the n\high{th} time that we
+% already had a feature that users requested in the mailing list, but that I had
+% completely forgotten about it being around for about 6 years.
+
+\startenvironment canbedone-style
+
+\usemodule[abbreviations-logos]
+\usemodule[scite]
+
+\setvariables
+  [document]
+  [title=No Title,
+   author=No Author,
+   color=NoColor]
+
+\setupbodyfont
+  [dejavu,11pt]
+
+\setuplayout
+  [width=middle,
+   height=middle,
+   backspace=2cm,
+   topspace=15mm]
+
+\setupwhitespace
+  [big]
+
+\setuphead
+  [chapter]
+  [style=\bfc,
+   color=darkgray]
+
+\setuphead
+  [section]
+  [style=\bfb,
+  %page=right,
+   color=darkgray]
+
+\setuphead
+  [subsection]
+  [style=\bfa,
+   color=darkgray]
+
+\setuplist
+  [chapter]
+  [style=bold]
+
+\setupfootertexts
+  [section] % [\documentvariable{title}]
+
+\setupfooter
+  [style=bold,
+   color=darkgray]
+
+\startuseMPgraphic{titlepage}
+    fill Page
+        withcolor "\documentvariable{color}" ;
+
+    numeric d ; d := 2mm ;
+
+    picture p ; p := textext.llft("!") ;
+    p := p
+        rotatedaround(llcorner p, 30) % different from lowlevel
+        xysized (.1PaperWidth-2d,.1PaperHeight-2d)
+        shifted (.1PaperWidth- d,.1PaperHeight -d)
+        shifted (d,-2d) % different from lowlevel
+    ;
+
+    draw image (
+        for i = 0 step .1 PaperWidth until PaperWidth :
+            for j = 0 step .1 PaperHeight until PaperHeight :
+                draw p shifted (i,j) ;
+            endfor ;
+        endfor ;
+    ) withcolor .4resolvedcolor("middlegray") ; % different from lowlevel
+
+    draw textext.d("\strut it can be done")
+        xsized (.8PaperWidth)
+        shifted center topboundary Page
+        shifted -(0,.2PaperHeight)
+        withcolor "white" ;
+  % draw textext.d("\strut YES")
+    draw textext.d("\strut \TeX")
+        xsized (.4PaperWidth)
+        shifted center topboundary Page
+        shifted -(0,.4PaperHeight)
+        withcolor "white" ;
+    draw textext.d("\strut\documentvariable{title}")
+        ysized 3cm
+        shifted center bottomboundary Page
+        shifted (0,.1PaperHeight)
+        withcolor "white" ;
+\stopuseMPgraphic
+
+\definesectionlevels
+  [default]
+  [%{chapter,title},
+   {section,subject},
+   {subsection,subsubject},
+   {subsubsection,subsubsubject},
+   {subsubsubsection,subsubsubject},
+   {subsubsubsubsection,subsubsubject}]
+
+\startsetups document:start
+
+    \startMPpage
+    StartPage;
+        \includeMPgraphic{titlepage} ;
+    StopPage;
+    \stopMPpage
+
+    \page
+
+    \startsubjectlevel[title=Contents]
+        \placelist[chapter,section] [criterium=previous]
+    \stopsubjectlevel
+
+\stopsetups
+
+\startsetups document:stop
+
+\testpage[6]
+
+%startsubjectlevel[title=Colofon]
+\startsectionlevel[title=Colofon,number=no,saveinlist=no]
+
+    \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
+
+\stopsectionlevel
+%stopsubjectlevel
+
+\stopsetups
+
+\stopenvironment


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone-style.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,29 @@
+% language=us runpath=texruns:manuals/canbedone
+
+\environment canbedone-style
+
+%D This is a bit if a cheat. The can be done manuals are independent but I want an
+%D overview document on the website. Therefore we use sectionlevels in the documents
+%D that we we then overload here (we push the chapter level in front).
+%D
+%D This style is mostly the same as the low level style.
+
+\starttext
+
+    \definesectionlevels
+      [default]
+      [{chapter,title},
+       {section,subject},
+       {subsection,subsubject},
+       {subsubsection,subsubsubject},
+       {subsubsubsection,subsubsubject},
+       {subsubsubsubsection,subsubsubject}]
+
+    \startdocument[title=canbedone,color=middlegray]
+    \stopdocument
+
+    \startsectionlevel[title=Periods] \component [canbedone-periods] \stopsectionlevel
+
+\stoptext
+
+


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/canbedone/canbedone.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/charts/charts-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/charts/charts-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/charts/charts-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,5 +1,7 @@
+% language=us runpath=texruns:manuals/charts
+
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-abitoflua.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-abitoflua.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-abitoflua.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-abitoflua
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-afewdetails.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-afewdetails.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-afewdetails.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-afewdetails
 
@@ -342,7 +342,7 @@
 \startluacode
 local setcolor    = nodes.tracers.colors.setlist
 local getmarker   = nodes.markers.get
-local hlist_code  = nodes.codes.hlist
+local hlist_code  = nodes.nodecodes.hlist
 local traverse_id = node.traverse_id
 
 function userdata.processmystuff(head)

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-backendcode.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-backendcode.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-backendcode.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-backendcode
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-callbacks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-callbacks.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-callbacks.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-callbacks
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-contents.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-contents.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/cld
+
 \startcomponent cld-contents
 
 \environment cld-environment

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-ctxfunctions.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-ctxfunctions.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-ctxfunctions.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-ctxfunctions
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-environment.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-environment.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-environment.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startenvironment cld-environment
 
@@ -221,4 +221,27 @@
   [chapter,section]
   [interaction=all]
 
+% a hack:
+
+\startluacode
+    function document.checkcldresource(filename)
+        if environment.arguments.runpath then
+            -- We're running elsewhere so we can have started fresh.
+            local cldname = file.replacesuffix(filename,"cld")
+            local pdfname = file.replacesuffix(filename,"pdf")
+            if not lfs.isfile(pdfname) then
+                -- We don't have the titlepage yet but need to fetch
+                -- the template from the real path.
+                local path = environment.arguments.path
+                if lfs.isdir(path) then
+                    os.execute('context --global --path="' .. path .. '" ' .. cldname)
+                else
+                    -- bad news
+                end
+            end
+        end
+    end
+\stopluacode
+
+
 \stopenvironment

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-files.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-files.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-files.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-macros
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-gettingstarted.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-gettingstarted.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-gettingstarted.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-gettingstarted
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-goodies.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-goodies.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-goodies.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-macros
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-graphics.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-graphics.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-graphics.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-graphics
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-introduction
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-logging.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-logging.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-logging.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 % maybe this will become a section instead
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-luafunctions.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-luafunctions.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-luafunctions.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 % table.unnest  : only used in special cases
 % table.derive  : set metatable if unset
@@ -68,7 +68,7 @@
 an indexed table.
 
 \starttyping
-table.insert(t,value,position)
+table.insert(t,position,value)
 value = table.remove(t,position)
 \stoptyping
 
@@ -310,7 +310,7 @@
 \startsummary[title={copy fastcopy}]
 
 When copying a table we need to make a real and deep copy. The \type {copy}
-function is an adapted version from the \LUA\ wiki. The \type {fastopy} is faster
+function is an adapted version from the \LUA\ wiki. The \type {fastcopy} is faster
 because it does not check for circular references and does not share tables when
 possible. In practice using the fast variant is okay.
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-macros.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-macros.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-macros.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-macros
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-moreonfunctions.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-moreonfunctions.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-moreonfunctions.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-moreonfunctions
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-nicetoknow.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-nicetoknow.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-nicetoknow.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-nicetoknow
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-scanners.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-scanners.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-scanners.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-ctxscanners
 
@@ -41,6 +41,7 @@
     interfaces.implement {
         name      = "MyMacroA",
         public    = true,
+        permanent = false,
         arguments = "string",
         actions   = function(s)
             context("(%s)",s)
@@ -84,7 +85,12 @@
 
 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.
+{overload} option, we get a warning on the console. However, in \LMTX\ there is
+catch. Implementers by default define macros as permanent unless one explicitly
+disables this so this is why in the previous definition we have done so. The
+overload flag below only makes sense in special cases, when for instance format
+file is made. (Of course overload protection only kicks in when it has been
+enabled.)
 
 \startbuffer[definition]
 \startluacode
@@ -91,7 +97,7 @@
     interfaces.implement {
         name      = "MyMacroA",
         public    = true,
---      overload  = true,
+     -- overload  = true,
         protected = true,
         arguments = "string",
         actions   = function(s)
@@ -407,14 +413,14 @@
 
 \typebuffer[definition] \getbuffer[definition]
 
-Now take this input:
+Now take this input: % we use \C* because \c is already defined
 
 \startbuffer[usage]
-\def\a{A} \def\b{B} \def\c{C}
+\def\Ca{A} \def\Cb{B} \def\Cc{C}
 \MyMacroH{a}{b}{c}
-\MyMacroH{a\a}{b\b}{c\c}
-\MyMacroH\a\b\c\relax
-\MyMacroH\a xx\relax
+\MyMacroH{a\Ca}{b\Cb}{c\Cc}
+\MyMacroH\Ca\Cb\Cc\relax
+\MyMacroH\Ca xx\relax
 \stopbuffer
 
 \typebuffer[usage]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-somemoreexamples.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-somemoreexamples.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-somemoreexamples.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-somemoreexamples
 
@@ -332,6 +332,8 @@
 context.stoptext()
 \stoptyping
 
+\ctxlua{document.checkcldresource("cld-005.cld")}
+
 \placefigure
   [here]
   [fig:lorien]
@@ -627,7 +629,7 @@
 
 \startbuffer
 \defineframed
-  [colored]
+  [coloredframed]
   [foregroundcolor=red,
    foregroundstyle=\underbar,
    offset=.1ex,
@@ -637,7 +639,7 @@
 \typebuffer \getbuffer
 
 \startbuffer
-\processisolatedwords {\input ward \relax} \colored
+\processisolatedwords {\input ward \relax} \coloredframed
 \stopbuffer
 
 \typebuffer \blank \getbuffer \blank
@@ -661,7 +663,7 @@
     else
         context.space()
     end
-    context.colored(words[i])
+    context.coloredframed(words[i])
   end
 
 end
@@ -693,7 +695,7 @@
     done = true
     context.dontleavehmode()
   end
-  context.colored(s)
+  context.coloredframed(s)
 end
 
 local splitter = lpeg.P(reset)
@@ -709,7 +711,7 @@
 
 \starttyping
 local function apply(s)
-  context.colored("%s ",s)
+  context.coloredframed("%s ",s)
 end
 
 local splitter lpeg.splitter(lpeg.patterns.spacer,apply)

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-specialcommands.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-specialcommands.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-specialcommands.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-specialcommands
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-summary.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-summary.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-summary.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-summary
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-titlepage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-titlepage.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-titlepage.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,13 +1,23 @@
+% language=us runpath=texruns:manuals/cld
+
 \startcomponent cld-titlepage
 
 \environment cld-environment
 
-% \cldprocessfile{cld-mkiv-titlepage.cld}
+\iffalse
 
-\startTEXpage
-    \externalfigure[cld-mkiv-titlepage.pdf]%
-\stopTEXpage % faster during writing
+    \cldprocessfile{cld-mkiv-titlepage.cld} % kind of slow each time
 
+\else
+
+    \ctxlua{document.checkcldresource("cld-mkiv-titlepage.cld")}
+
+    \startTEXpage
+        \externalfigure[cld-mkiv-titlepage.pdf]%
+    \stopTEXpage
+
+\fi
+
 \startstandardmakeup[doublesided=no,page=no]
 \stopstandardmakeup
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-variables.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-variables.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-variables.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-variables
 
@@ -156,8 +156,9 @@
 
 \startbuffer[usage]
 \setdatavalue{my-data}{12345}%
-\letdatacode  \MyData  67890
-\thedatavalue{my-data} \the\MyData
+\integerdef   \MyDataI 67890
+\dimensiondef \MyDataD 12345pt
+\thedatavalue{my-data}, \the\MyDataI, \the\MyDataD.
 \stopbuffer
 
 \typebuffer[usage]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-verbatim.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-verbatim.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/cld/cld-verbatim.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/cld
 
 \startcomponent cld-verbatim
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-basics.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-basics.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-basics.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/colors
 
 \startcomponent colors-basics
 
@@ -897,7 +897,7 @@
 outer color gets applied to the box:
 
 \startbuffer[enable]
-\enabledirectives
+\enabledirectives % only mkiv
   [attributes.inheritance]
 \stopbuffer
 
@@ -908,7 +908,7 @@
 \typebuffer
 
 So, we get: \start\inlinebuffer[box]\inlinebuffer[enable]\space\inlinebuffer
-\stop, but only after we have enabled this mechanisms explicitly:
+\stop. In \MKIV\ you need to enable inheritance first with:
 
 \typebuffer[enable]
 
@@ -938,6 +938,12 @@
 flushed the framed content using \type {\attributedbox}, but we don't want to
 enable inheritance by default because it comes with some overhead.
 
+{\em The \type {\attributedbox} command is considered obsolete. In \LMTX\ there
+is a \type {\recolorbox} command that recolors a box. Because these commands are
+probably never needed it made more sense to move the burden to a specific command
+than to add additional overhead to the whole color mechanism. My experience is
+that unboxing and copying is very rare in \CONTEXT.}
+
 \stopsection
 
 \startsection[title=Color intents]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-environment.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-environment.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-environment.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/colors
+
 \startenvironment colors-environment
 
     \environment manuals-explaining-environment

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-graphics.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-graphics.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-graphics.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/colors
 
 \startcomponent colors-basics
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/colors
 
 \startcomponent colors-introduction
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-metafun.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-metafun.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-metafun.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/colors
 
 \startcomponent colors-basics
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/colors/colors-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,5 +1,7 @@
+% language=us runpath=texruns:manuals/colors
+
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-000.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-000.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-000.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \usemodule[visual]
 \usemodule[simulate]
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-001.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-001.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-001.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=2]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-002.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-002.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-002.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][nleft=3,nright=2,width=5cm]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-003.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-003.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-003.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=2,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-004.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-004.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-004.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,13 +1,7 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=3,page=left]
 
-\definecolor[fakerulecolor]
-
 \definecolumnsetspan[wide] [n=2,background=contrast,color=white]
 \definecolumnsetspan[wider][n=4,background=contrast,color=white]
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-005.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-005.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-005.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=3,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-006.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-006.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-006.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=3,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-007.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-007.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-007.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=3,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-101.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-101.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-101.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-102.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-102.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-102.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-103.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-103.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-103.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-201.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-201.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-201.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-202.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-202.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-202.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-203.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-203.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-203.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-204.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-204.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-204.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,9 +1,5 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+\usemodule[oldfun] % really ?
 
-\usemodule[oldfun]
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-205.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-205.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-205.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,13 +1,13 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+\usemodule[oldfun] % really ?
 
-\usemodule[oldfun]
-
 \environment columnsets-000
 
-\unprotected \def\SpreadGapText#1#2{{\def\+{\blackrule[\c!width=#1]}#2}}
+\unprotect
 
+\def\SpreadGapText#1#2{{\def\+{\blackrule[\c!width=#1]}#2}}
+
+\protect
+
 \definecolumnset[example][n=4,page=left]
 
 \definecolumnsetarea

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-206.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-206.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-206.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-301.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-301.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-301.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-401.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-401.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-401.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-402.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-402.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-402.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-403.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-403.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-403.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-404.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-404.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-404.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=3,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-405.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-405.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-405.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-601.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-601.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-601.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left,direction=reverse]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-701.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-701.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-701.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-702.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-702.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-702.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-703.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-703.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-703.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=4,page=left]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-704.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-704.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-704.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \startuseMPgraphic{mpos:par:columns}

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-801.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-801.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-801.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset [example-1] [n=2]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-802.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-802.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-802.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset [example-1] [n=2,balance=yes]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-803.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-803.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-803.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset [example-1] [n=2,balance=yes]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-804.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-804.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-804.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset [example-1] [n=2,balance=yes]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-805.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-805.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-805.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset [example-1] [n=2,balance=yes]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-806.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-806.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-806.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset [example-1] [n=2,balance=yes]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-901.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-901.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-901.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=2,page=left,distance=1cm]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-902.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-902.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-902.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=3,page=left,distance=1cm]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-903.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-903.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets-903.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \environment columnsets-000
 
 \definecolumnset[example][n=3,page=left,distance=1cm]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/columnsets/columnsets.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,5 +1,5 @@
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/back-0.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/back-0.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/back-0.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \startenvironment back-0
 
 \usemodule[simulate]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-backpage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-backpage.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-backpage.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-captiontrickery.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-captiontrickery.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-captiontrickery.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-colofon.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-colofon.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-colofon.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-contents.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-contents.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-environment.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-environment.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-environment.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 % this a rather old style and made for mkii, currently the only adaption to mkiv is
 % with respect to fonts

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-finetuningfloats.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-finetuningfloats.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-finetuningfloats.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 % todo: \setlayeranchored[text-1]{HELLO WORLD}
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-floatingaround.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-floatingaround.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-floatingaround.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-frontpage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-frontpage.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-frontpage.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-gridtrickery.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-gridtrickery.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-gridtrickery.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-index.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-index.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-index.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent details-introduction
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-ornaments.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-ornaments.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-ornaments.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-pseudocolumns.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-pseudocolumns.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-pseudocolumns.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-snappingheads.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-snappingheads.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-snappingheads.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-textbackgrounds.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-textbackgrounds.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-textbackgrounds.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-tuningformulas.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-tuningformulas.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details-tuningformulas.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment details-environment
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/details.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
 % interface=english modes=screen
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/detcow.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/detcow.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/details/detcow.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,3 @@
-% content=tex
-%
-% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
-
 \setupcolors[state=start]
 
 \starttext

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/epub/epub-mkiv-demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/epub/epub-mkiv-demo.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/epub/epub-mkiv-demo.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,3 @@
-
 % \usemodule[luacalls]
 
 \usemodule[mathml]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/epub/epub-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/epub/epub-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/epub/epub-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-bitwise.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-bitwise.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-bitwise.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,194 @@
+% language=us runpath=texruns:manuals/evenmore
+
+\environment evenmore-style
+
+\startcomponent evenmore-bitwise
+
+\startchapter[title={Bitwise operations}]
+
+Occasionally we use a bit set to pass (or store) options and one way of doing
+that is to add up some constants. However, what you would like to do is to set a
+specific bit. Of course one can write macros for that but performance wise one
+can wonder if there are other ways. One solution is to extend the engine but that
+has its own pitfalls. For instance, I played with additions to \type {\numexpr}
+and although they worked okay and brought now performance degradation, I decided
+to remove that experiment. One problem is that we have no real 32 bit cardinals
+(unsigned integers) in \TEX\ and the engine makes sure that we never exceed the
+minima and maxima. Another problem is that in expressions we then need either
+verbose \type {and}, \type {or}, \type {xor}, \type {not} and other verbose
+operators, if only because the usual symbols can have catcodes that are
+unsuitable.
+
+So in the end I decided to come up with a set of primitive like commands that
+do the job. It is no problem to have a set of dedicated verbose commands and we
+can extend the repertoire if needed. So this is what we have now:
+
+\starttabulate[||i2c||]
+\NC command                    \NC operator equivalent  \NC optional     \NC \NR
+\NC \type {\bitwiseset      a} \NC \type {a}            \NC              \NC \NR
+\NC \type {\bitwisenot      a} \NC \type {~a}           \NC              \NC \NR
+\NC \type {\bitwisenil   a  b} \NC \type {a & (~ b)}    \NC \type {with} \NC \NR
+\NC \type {\bitwiseand   a  b} \NC \type {a & b}        \NC \type {with} \NC \NR
+\NC \type {\bitwiseor    a  b} \NC \type {a | b}        \NC \type {with} \NC \NR
+\NC \type {\bitwisexor   a  b} \NC \type {a ~ b}        \NC \type {with} \NC \NR
+\NC \type {\bitwiseshift a  b} \NC \type {a >> b}       \NC \type {by}   \NC \NR
+\NC \type {\bitwiseshift a -b} \NC \type {a << b}       \NC \type {by}   \NC \NR
+\NC \type {\ifbitwiseand a  b} \NC \type {(a & b) ~= 0} \NC              \NC \NR
+\stoptabulate
+
+Here a some examples:
+
+\startbuffer
+\scratchcounter = \bitwiseand "01      "02 \uchexnumbers{\scratchcounter} \quad
+\scratchcounter = \bitwiseand "01 with "02 \uchexnumbers{\scratchcounter} \quad
+\scratchcounter = \bitwiseand "03      "02 \uchexnumbers{\scratchcounter} \qquad
+\scratchcounter = \bitwiseor  "01      "02 \uchexnumbers{\scratchcounter} \quad
+\scratchcounter = \bitwiseor  "01 with "02 \uchexnumbers{\scratchcounter} \quad
+\scratchcounter = \bitwiseor  "03      "02 \uchexnumbers{\scratchcounter} \qquad
+\scratchcounter = \bitwisexor "01      "02 \uchexnumbers{\scratchcounter} \quad
+\scratchcounter = \bitwisexor "01 with "02 \uchexnumbers{\scratchcounter} \quad
+\scratchcounter = \bitwisexor "03      "02 \uchexnumbers{\scratchcounter}
+\stopbuffer
+
+\typebuffer
+
+This gives the nine values:
+
+{\tt\getbuffer}
+
+Because they are numeric operations you can chain them, as in:
+
+\starttyping
+\scratchcounter = \bitwisenil \bitwisenil "0F      "02      "01 \relax
+\scratchcounter = \bitwisenil \bitwisenil "0F with "02 with "01 \relax
+\stoptyping
+
+We try as good as possible to support all bits in the range from zero upto \type
+{0xFFFFFFFF};
+
+\startbuffer
+\scratchcounter \bitwiseset "FFFFFFFF
+
+\ifbitwiseand \scratchcounter "80000000 YES \else NOP \fi
+\ifbitwiseand \scratchcounter "F0000000 YES \else NOP \fi
+\ifbitwiseand \scratchcounter "10000000 YES \else NOP \fi
+
+\scratchcounter \bitwisenot \scratchcounter
+
+\ifbitwiseand \scratchcounter "80000000 YES \else NOP \fi
+\ifbitwiseand \scratchcounter "F0000000 YES \else NOP \fi
+\ifbitwiseand \scratchcounter "10000000 YES \else NOP \fi
+\stopbuffer
+
+\typebuffer
+
+and we get:
+
+\startpacked \tt \getbuffer \stoppacked
+
+Of course you can just use normal counters and \TEX\ integers but using the bit
+commands have the advantage that they do some checking and can do real \type {or}
+etc operations. Here is some food for thought:
+
+\startbuffer
+\scratchcounter \bitwiseand "01 "02
+\scratchcounter \numexpr    "01+"02\relax
+
+\ifcase      \bitwiseand \scratchcounterone \plusone \else \fi
+\ifbitwiseand            \scratchcounterone \plusone \else \fi
+\ifnum                   \scratchcounterone=\plusone \else \fi
+\stopbuffer
+
+\typebuffer
+
+and we get:
+
+\startpacked \tt \getbuffer \stoppacked
+
+You can also go real binary, but we only provide a combined setter|/|getter for
+that, but you can mix that one with the other commands:
+
+\startbuffer
+\scratchcounterone   = \bitwise 1101
+\scratchcountertwo   = \bitwise 11011101110111011101110111011101
+\scratchcounterthree = \bitwiseor \bitwise 0001 \bitwise 1100
+
+{0x\uchexnumber{\scratchcounterone}   \bitwise\scratchcounterone  }\par
+{0x\uchexnumber{\scratchcountertwo}   \bitwise\scratchcountertwo  }\par
+{0x\uchexnumber{\scratchcounterthree} \bitwise\scratchcounterthree}\par
+\stopbuffer
+
+\typebuffer
+
+We get bits back:
+
+\startpacked \tt \getbuffer \stoppacked
+
+The above commands are typical for the things we can do with \LUAMETATEX\ and
+\LMTX\ and are unlikely to become available in \MKIV.
+
+There is a special command for (re)setting a bit in a register:
+
+\startbuffer
+             \scratchcounter  0
+\bitwiseflip \scratchcounter  1 [\the\scratchcounter]
+\bitwiseflip \scratchcounter  4 [\the\scratchcounter]
+\bitwiseflip \scratchcounter  8 [\the\scratchcounter]
+\bitwiseflip \scratchcounter -5 [\the\scratchcounter]
+\stopbuffer
+
+\typebuffer
+
+This gives: \inlinebuffer. Of course a global assignment works too:
+
+\startbuffer
+ \global              \globalscratchcounter  0
+{\global \bitwiseflip \globalscratchcounter  2 } [\the\globalscratchcounter]
+{\global \bitwiseflip \globalscratchcounter  4 } [\the\globalscratchcounter]
+{\global \bitwiseflip \globalscratchcounter  8 } [\the\globalscratchcounter]
+{\global \bitwiseflip \globalscratchcounter -6 } [\the\globalscratchcounter]
+\stopbuffer
+
+\typebuffer
+
+Here we get: \inlinebuffer. A side effect of it being an number makes that
+this is also valid:
+
+\starttyping
+\scratchcounterone\bitwiseflip \scratchcountertwo -16
+\stoptyping
+
+\stopchapter
+
+\stopcomponent
+
+% (\scratchcounterone \bitwiseset "F        \uchexnumber{\scratchcounterone})\par
+% (\scratchcounterone \bitwiseset "FF       \uchexnumber{\scratchcounterone})\par
+% (\scratchcounterone \bitwiseset "FFF      \uchexnumber{\scratchcounterone})\par
+% (\scratchcounterone \bitwiseset "FFFF     \uchexnumber{\scratchcounterone})\par
+% (\scratchcounterone \bitwiseset "FFFFF    \uchexnumber{\scratchcounterone})\par
+% (\scratchcounterone \bitwiseset "FFFFFF   \uchexnumber{\scratchcounterone})\par
+% (\scratchcounterone \bitwiseset "FFFFFFF  \uchexnumber{\scratchcounterone})\par
+% (\scratchcounterone \bitwiseset "FFFFFFFF \uchexnumber{\scratchcounterone})\par
+%
+% (\scratchcounterone \bitwiseset       "0000FFFF
+%  \scratchcounterone \bitwiseshift     \scratchcounterone  -16
+%  \uchexnumber{\scratchcounterone})\par
+%
+% \scratchcounterone \bitwiseset "FFFFFFFF
+% \scratchcountertwo \bitwiseset "FFFFFFFE
+%
+% \the\scratchcounterone : \uchexnumber{\scratchcounterone}\par
+% \the\scratchcountertwo : \uchexnumber{\scratchcountertwo}\par
+
+% I need to check this on the garden run as it looks like that server is some 50%
+% faster than my (in terms of computers) old laptop.
+
+% \testfeatureonce{10000}{\scratchcounter \bitwiseand "01 "02      }                \elapsedtime\par
+% \testfeatureonce{10000}{\scratchcounter \numexpr    "01+"02\relax}                \elapsedtime\par
+% \testfeatureonce{10000}{\ifcase\bitwiseand \scratchcounterone \plusone \else \fi} \elapsedtime\par
+% \testfeatureonce{10000}{\ifbitwiseand      \scratchcounterone \plusone \else \fi} \elapsedtime\par
+% %testfeatureonce{10000}{\ifnum             \scratchcounterone=\plusone \else \fi} \elapsedtime\par
+%
+% \testfeatureonce{100000}{\scratchcounter = \bitwise 1101 } \elapsedtime\par
+% \testfeatureonce{100000}{\scratchcounter = \bitwise 11011101110111011101110111011101 } \elapsedtime\par


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-bitwise.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-contents.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-contents.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/evenmore
+
 \startcomponent evenmore-contents
 
 \environment evenmore-style

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-expansion.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-expansion.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-expansion.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 \environment evenmore-style
 

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-expressions.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-expressions.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-expressions.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,336 @@
+% language=us runpath=texruns:manuals/evenmore
+
+% This one accidentally ended up in the older history document followingup,
+% btu it's now moved here.
+
+\startcomponent evenmore-expressions
+
+\environment evenmore-style
+
+\startchapter[title={Expressions}]
+
+\startsection[title={Introduction}]
+
+Do we need bitwise expressions? Actually the answer is \quotation {no, although
+not until recently}. In \CONTEXT\ \MKII\ and \MKIV\ we just use integer addition
+because we only need to enable things but in \LMTX\ we want to control de
+detailed modes that some mechanisms in the engine provides and in order to not
+have tons of parameters these use bit sets. We manipulate these with the bitwise
+macros that actually are efficient \LUA\ function calls. But, as with some other
+extensions in \LUAMETATEX, one way to prevent tracing clutter is to have a few
+handy primitives. So let's see what we got.
+
+{\em I haven't checked all operators and combinations yet!}
+
+\stopsection
+
+\startsection[title={Exploration}]
+
+Already early in the \LUAMETATEX\ development (2019) the expression parser was
+extended with an integer division operator \type {:} that we actually use in
+\LMTX, and soon after that I added basic bitwise operators but these were never
+activated but kept as comment because I didn't want to impact the scanner (even
+if we can afford to loose some performance because the scanner has been
+optimized). But in the process of cleaning up \quote {todo} comments in the
+source code I eventually arrived at expressions again.
+
+The colon already makes the scanner incompatible because \type {\numexpr 1+2:}
+expects a number (which means that we cannot port back) and more operators only
+make that less likely. In \CONTEXT\ I nearly always use \type {\relax} as
+terminator unless we're sure that lookahead is no issue. \footnote {In the \ETEX\
+expression parser, the normal \type {/} rounds the result. Both the \type {*} and
+\type {/} operator have a dedicated code path that assures no loss of accuracy.
+The \type {:} operator just divides like \LUA's \type {//} which is an integer
+division operator. There are subtle differences between the division variants
+which can be noticeable when you go round trip. That is actually the main reason
+why this was one of the first things added to \LUAMETATEX\ as I wanted to get rid
+of some few scaled point rounding issues. The \ETEX\ expression parser is
+somewhat complicated because it can deal with a mix of integers, dimensions and
+even glue, but always brings the result back to its main operating model. Because
+we adopted some of these \ETEX\ rather early in \CONTEXT\ lookahead pitfalls are
+taken care of already.}
+
+When going over the code in 2021, mostly because I wanted to get rid of some
+commented experiments, I decided that the extension should not go into the
+normal scanner but that a dedicated, simple and integer only scanner made more
+sense, so during a rainy summer weekend I started playing with that. It eventually
+became a bit more than initially intended, although the amount of code is rather
+minimal. The performance was about twice that of the already available bitwise
+macros but operator precedence was not provided (apart from the multiplication
+and division operators). The final implementation was different, not that much
+faster on simple bitwise operations but could do more complex things in one go.
+Performance was not a real reason to provide this anyway because we're talking
+microseconds, it's more about less code and better readability.
+
+The initial primitive command was \type {\bitexpr} and it supported nesting with
+parenthesis as the other expressions do. Because there are many operators, also
+verbose ones, the non|-|optional \type {\relax} token finishes parsing. But
+soon we moved on to two dedicated primitives.
+
+\stopsection
+
+\startsection[title={Operators}]
+
+The set of operators that we have to support is the following. Most have
+alternatives so that we can get around catcode issues.
+
+\starttabulate[||cT|cT|]
+\BC add       \NC +                    \NC        \NC \NR
+\BC subtract  \NC -                    \NC        \NC \NR
+\BC multiply  \NC *                    \NC        \NC \NR
+\BC divide    \NC / :                  \NC        \NC \NR
+\BC mod       \NC \letterpercent       \NC mod    \NC \NR
+\BC band      \NC &                    \NC band   \NC \NR
+\BC bxor      \NC ^                    \NC bxor   \NC \NR
+\BC bor       \NC \letterbar \space v  \NC bor    \NC \NR
+\BC and       \NC &&                   \NC and    \NC \NR
+\BC or        \NC \letterbar\letterbar \NC or     \NC \NR
+\BC setbit    \NC <undecided>          \NC bset   \NC \NR
+\BC resetbit  \NC <undecided>          \NC breset \NC \NR
+\BC left      \NC <<                   \NC        \NC \NR
+\BC right     \NC >>                   \NC        \NC \NR
+\BC less      \NC <                    \NC        \NC \NR
+\BC lessequal \NC <=                   \NC        \NC \NR
+\BC equal     \NC = ==                 \NC        \NC \NR
+\BC moreequal \NC >=                   \NC        \NC \NR
+\BC more      \NC >                    \NC        \NC \NR
+\BC unequal   \NC <> != \lettertilde = \NC        \NC \NR
+\BC not       \NC ! \lettertilde       \NC not    \NC \NR
+\stoptabulate
+
+I considered using \type {++} and type {--} as the \type {bset} and \type
+{bunset} shortcuts but that leads to issues because in \TEX\ \type {-+-++--10} is
+a valid number and one never knows what sequence (without spaces) gets fed into
+an expression.
+
+Originally I'd added some \UNICODE\ characters but for some reason support of
+logical operators is suboptimal so I removed that feature. Because these special
+characters are multi|-|byte \UTF\ sequences they are not that much better than
+verbose words anyway.
+
+% 0x00AC  !    ¬              lua: not
+% 0x00D7  *    ×
+% 0x00F7  /    ÷
+% 0x2227  &&   ∧ c: and       lua: and
+% 0x2228  ||   ∨ c: or        lua: or
+% 0x2229  &    ∩ c: bitand    lua: band
+% 0x222A  |    ∪ c: bitor     lua: bor
+%         ^      c: bitxor    lua: bxor
+% 0x2260  !=   ≠
+% 0x2261  ==   ≡
+% 0x2264  <=   ≤
+% 0x2265  >=   ≥
+% 0x22BB  xor  ⊻
+% 0x22BC  nand ⊼
+% 0x22BD  nor  ⊽
+% 0x22C0  and  ⋀ n-arry logical and
+% 0x22C1  or   ⋁ n-arry logical or
+% 0x2AA1  <<   ⪡
+% 0x2AA2  >>   ⪢
+
+\stopsection
+
+\startsection[title={Integers and dimensions}]
+
+When I was playing a bit with this feature, I wondered if we could mix in some
+dimensions. It was actually not that hard to add this: only explicit (verbose)
+dimensions had to be intercepted because dimen registers and such are seen as
+integers by the integer scanner. Once we're able do handle that, a next step was
+to make sure that \typ {2 * 10pt} was permitted, something that the \ETEX\ \type
+{\dimexpr} primitives can't handle. So, a variant of the dimen parser has to be
+used that makes the unit optional: \type {\dimexpression} and \type
+{\numexpression} were born.
+
+The resulting parsers worked quite well but were about twice as slow as the
+normal expression scanners but that is no surprise because they do more. For
+instance we are case insensitive and need to handle letter and other (and in a
+few cases alignment and superscript) catcodes too. However, with a slightly tuned
+integer parser, also possible because the sentinel \type {\relax} makes parsing
+more predictable, and a dedicated unit scanner, in the end both the integer and
+dimension parser were performing well. It's not like we run them millions of
+times in a document.
+
+\startbuffer
+\scratchcounter = \numexpression
+    "00000 bor "00001 bor "00020 bor "00400 bor "08000 bor "F0000
+\relax
+\stopbuffer
+
+Here is an example that results in {0x\inlinebuffer\uchexnumber\scratchcounter}:
+
+\typebuffer
+
+\startbuffer
+\scratchcounter = \numexpression
+    "FFFFF bxor "10101
+\relax
+\stopbuffer
+
+And this gives {0x\inlinebuffer\uchexnumber\scratchcounter}:
+
+\typebuffer
+
+We can give numerous example but you get the picture. In the above table you can
+see that some operators have equivalents. The reason for this is that a macro
+package can change catcodes and some characters have special meanings. So, the
+scanner is rather tolerant.
+
+\startbuffer
+\scratchcounterone = 10
+\scratchcountertwo = 20
+\ifcase \numexpression
+    (\scratchcounterone > 5) && (\scratchcountertwo > 5)
+\relax yes\else nop\fi
+%
+\space
+%
+\scratchcounterone = 2
+\scratchcountertwo = 4
+\ifcase \numexpression
+    (\scratchcounterone > 5) and (\scratchcountertwo > 5)
+\relax nop\else yes\fi
+\stopbuffer
+
+And this gives \quote {\tttf \inlinebuffer}:
+
+\typebuffer
+
+The normal expansion rules apply, so one can use macros and other symbolic
+numbers. The only difference in handling dimensions is that we don't support
+\type {true} units but these are obsolete in \LUAMETATEX\ anyway.
+
+In the end I decided to also add an extra conditional so that we can say:
+
+\starttyping
+\ifexpression (\scratchcounterone > 5) and (\scratchcountertwo > 5)\relax
+    nop
+\else
+    yes
+\fi
+\stoptyping
+
+which looks more natural. Actually, this is an nowadays alias because we have two
+variants:
+
+\starttyping
+\ifnumexpression ... \relax ... \else ... \fi
+\ifdimexpression ... \relax ... \else ... \fi
+\stoptyping
+
+where the later is equivalent to
+
+\starttyping
+\ifboolean\dimexpression ... \relax ... \else ... \fi
+\stoptyping
+
+\stopsection
+
+\startsection[title={Tracing}]
+
+When \type {\tracingexpressions} is set to one or higher the intermediate \quote
+{reverse polish notation} stack that is used for the calculation is shown, for
+instance:
+
+\starttyping
+4:8: {numexpression rpn: 2 5 > 4 5 > and}
+\stoptyping
+
+When you want the output on your console, you need to say:
+
+\starttyping
+\tracingexpressions 1
+\tracingonline      1
+\stoptyping
+
+The fact that we process the expression in two phases makes it possible to provide this
+kind of tracing.
+
+\stopsection
+
+\startsection[title={Performance}]
+
+The following table shows the results of 100.000 evaluations (per line) so you'll
+notice that there is a difference. But keep in mind that the new variant can so
+more, so it might pay off when we have cases that otherwise demand multiple
+traditional expressions.
+
+\starttabulate[|l|c|]
+\NC \type {\dimexpr       4pt*2 + 6pt\relax}        \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchdimen  \dimexpr       4pt*2 + 6pt\relax} \elapsedtime\fi \NC \NR
+\NC \type {\dimexpression 4pt*2 + 6pt\relax}        \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchdimen  \dimexpression 4pt*2 + 6pt\relax} \elapsedtime\fi \NC \NR
+\NC \type {\dimexpression 2*4pt + 6pt\relax}        \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchdimen  \dimexpression 4pt*2 + 6pt\relax} \elapsedtime\fi \NC \NR
+\TB
+\NC \type {\numexpr       4 * 2 + 6\relax}          \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchcounter\numexpr       4 * 2 + 6\relax}   \elapsedtime\fi \NC \NR
+\NC \type {\numexpression 2 * 4 + 6\relax}          \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchcounter\numexpression 2 * 4 + 6\relax}   \elapsedtime\fi \NC \NR
+\TB
+\NC \type {\numexpr       4*2+6\relax}              \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchcounter\numexpr       4*2+6\relax}       \elapsedtime\fi \NC \NR
+\NC \type {\numexpression 2*4+6\relax}              \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchcounter\numexpression 2*4+6\relax}       \elapsedtime\fi \NC \NR
+\TB
+\NC \type {\numexpr       (1+2)*(3+4)\relax}        \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchcounter\numexpr       (1+2)*(3+4)\relax} \elapsedtime\fi \NC \NR
+\NC \type {\numexpression (1+2)*(3+4)\relax}        \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchcounter\numexpression (1+2)*(3+4)\relax} \elapsedtime\fi \NC \NR
+\TB
+\NC \type {\numexpr       (1 + 2) * (3 + 4) \relax} \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchcounter\numexpr       (1 + 2) * (3 + 4) \relax} \elapsedtime\fi \NC \NR
+\NC \type {\numexpression (1 + 2) * (3 + 4) \relax} \EQ \iftrialtypesetting\else\testfeatureonce{100000}{\scratchcounter\numexpression (1 + 2) * (3 + 4) \relax} \elapsedtime\fi \NC \NR
+\stoptabulate
+
+As usual I'll probably find some way to improve performance a bit but that might
+than also concern the traditional one. When we compare them, the new numeric
+scanner suffers from more options while the new dimension parser gain on the
+units. Also, keep in mind than the \LUAMETATEX\ normal parsers are already
+somewhat faster than the ones in \LUATEX. The numbers above are calculated when
+this document is rendered, so they may change over time and per run. The two
+engines compare as follows (mid 2021):
+
+\starttabulate[|l|c|c|]
+\NC                                           \BC \LUATEX \BC \LUAMETATEX \NC \NR
+\NC \type {\dimexpr 4pt*2 + 6pt\relax}        \NC 0.073   \NC 0.045 \NC \NR
+\NC \type {\numexpr 4 * 2 + 6\relax}          \NC 0.034   \NC 0.028 \NC \NR
+\NC \type {\numexpr 4*2+6\relax}              \NC 0.035   \NC 0.032 \NC \NR
+\NC \type {\numexpr (1+2)*(3+4)\relax}        \NC 0.050   \NC 0.047 \NC \NR
+\NC \type {\numexpr (1 + 2) * (3 + 4) \relax} \NC 0.052   \NC 0.048 \NC \NR
+\stoptabulate
+
+Of course tests like these are dubious because often \CPU\ cache will keep the
+current code accessible, but who knows.
+
+It will probably take a while before I will use this in the source code because
+first I need to make sure that all works as expected and while doing that I might
+adapt some of this. But the basic framework is there.
+
+\stopsection
+
+% \start
+% \nologbuffering
+% \scratchdimen    100pt
+% \scratchdimenone 65.536pt
+% \scratchdimentwo 65.536bp
+
+% \tracingonline1
+% \tracingexpressions1
+% \scratchcounter\bitexpr \scratchdimen / 2   \relax\the\scratchcounter\par
+
+% \scratchcounter\numexpression \scratchdimen / 2sp \relax \the\scratchcounter\par
+% \scratchcounter\numexpression \scratchdimen / 1pt \relax \the\scratchcounter\par
+% \scratchcounter\numexpression \scratchdimenone / 65.536pt \relax \the\scratchcounter\par
+% \scratchcounter\numexpression \scratchdimentwo / 2 \relax \the\scratchcounter\par
+
+% \scratchcounter\numexpression \scratchcounterone / 4 \relax \the\scratchcounter\par
+% \scratchdimen  \dimexpression \scratchcounterone / 4 \relax \the\scratchdimen\par
+
+% \scratchdimen  \dimexpression 2 * 4pt \relax \the\scratchdimen\par
+
+% \tracingexpressions0
+% \tracingonline0
+
+% \startTEXpage
+% \tracingonline1
+% \tracingexpressions1
+% \the\dimexpr -10pt\relax\quad
+% \the\dimexpr  10pt\relax\quad
+% \the\dimexpr  10.12 pt\relax\quad
+% \the\dimexpression -10pt\relax\quad
+% \the\dimexpression  10pt\relax\quad
+% \stopTEXpage
+
+\stopchapter
+
+\stopcomponent


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-expressions.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-fonts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-fonts.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-fonts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 \environment evenmore-style
 

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-formats.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-formats.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-formats.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,362 @@
+% language=us runpath=texruns:manuals/evenmore
+
+% This one accidentally ended up in the older history document followingup,
+% btu it's now moved here.
+
+\environment evenmore-style
+
+\startcomponent  evenmore-format
+
+\startchapter[title={The format file}]
+
+It is interesting when someone compares macro package and used parameters like
+the size of a format file, the output of \type {\tracingall}, or startup time to
+make some point. The point I want to make here is that unless you know exactly
+what goes on in a run that involves a real document, which can itself involve
+multiple runs, such a comparison is rather pointless. For sure I do benchmark but
+I can only draw conclusions of what I (can) know (about). Yes, benchmarking your
+own work makes sense but doing that in comparisons to what you consider
+comparable variants assumes knowledge of more than your own work and objectives.
+
+
+For instance, when you load few fonts, typeset one page and don't do anything
+that demands any processing or multiple runs, you basically don't measure
+anything. More interesting are the differences between 10 or 500 pages, a few
+font calls or tens of thousands, no color of extensive usage of color and other
+properties, interfacing, including inheritance of document constructs, etc. And
+even then, when comparing macro packages, it is kind of tricky to deduce much
+from what you observe. You really need to know what is going on inside and also
+how that relates to for instance adaptive font scaling. You can have a fast start
+up but if a users needs one tikz picture, loading that package alone will make
+you forget the initial startup time. You always pay a price for advanced features
+and integration! And we didn't even talk about the operating system caching
+files, running on a network share, sharing processors among virtual machines,
+etc.
+
+Pointless comparing is also true for looking at the log file when enabling \type
+{\tracingall}. When a macro package loads stuff at startup you can be sure that
+the log file is larger. When a font or language is loaded the first time, or
+maybe when math is set up there can be plenty of lines dumped. Advanced analysis
+of conditions and trial runs come at a price too. And eventually, when a box is
+shown the configured depth and breadth really matter, and it might also be that
+the engine provides much more (verbose) detail. So, a comparison is again
+pointless. It can also backfire. Over the decades of developing \CONTEXT\ I have
+heard people working on systems make claims like \quotation {We prefer not to
+\unknown} or \quotation {It is better to it this way \unknown} or (often about
+operating system) \quotation {It is bad that \unknown} just to see years later
+the same being done in the presumed better alternative. I can have a good laugh
+about that: do this and don't do that backfiring.
+
+That brings us to the format file. When you make a \CONTEXT\ format with the
+English user interface, with interfacing being a feature that itself introduces
+overhead, the \LUATEX\ engine will show this at the end:
+
+\starttyping
+Beginning to dump on file cont-en.fmt
+ (format=cont-en 2021.6.9)
+48605 strings using 784307 bytes
+1050637 memory locations dumped; current usage is 414&523763
+44974 multiletter control sequences
+\font\nullfont=nullfont
+0 preloaded fonts
+\stoptyping
+
+The file itself is quite large: 11,129,903 bytes. However, it is actually much
+larger because the format file is compressed! The real size is 19.399.216. Not
+taking that into account when comparing the size of format files is kind of bad
+because compression directly relates to what resources a format use and how
+usage is distributed over the available memory blobs. The \LUATEX\ engine does
+some optimizations and saves the data sparse but the more holes you create, the
+worse it gets. For instance, the large character vectors are compartmentalized in
+order to handle \UNICODE\ efficiently so the used memory relates to what you
+define: do you set up all catcodes or just a subset. Maybe you delay some
+initialization to after the format is loaded, in which case a smaller format file
+gets compensated by more memory usage and initializaton time afterwards. Maybe
+your temporary macros create holes in the token array. The memory that is
+configured in the configuration files also matter. Some memory blobs are saved at
+their configured size, others dismiss the top part that is not used when saving
+the format but allocate the lot when the format is loaded. That means that memory
+usage in for instance \LUATEX\ can be much larger than a format file suggests.
+Keep in mind that a format file is basically a memory dump.
+
+Now, how does \LUAMETATEX\ compare to \LUATEX. Again we will look at the size of
+the format file, but you need to keep in mind that for various reasons the \LMTX\
+macros are somewhat more efficient than the \MKIV\ ones, in the meantime some new
+mechanism were added, which adds more \TEX\ and \LUA\ code, but I still expect
+(at least for now) a smaller format file. However when we create the format we
+see this (reformatted):
+
+\starttyping
+Dumping format 'cont-en.fmt 2021.6.9' in file 'cont-en.fmt':
+tokenlist compacted from 489733 to 488204 entries,
+1437 potentially aliased lua call/value entries,
+max string length 69, 16 fingerprint
++ 16 engine + 28 preamble
++ 836326 stringpool
++ 10655 nodes + 3905660 tokens
++ 705300 equivalents
++ 23072 math codes + 493024 text codes
++ 38132 primitives + 497352 hashtable
++ 4 fonts + 10272 math + 1008 language + 180 insert
++ 10305643 bytecodes
++ 12 housekeeping = 16826700 total.
+\stoptyping
+
+This looks quite different from the \LUATEX\ output. Here we report more detail:
+for each blob we mention the number of bytes used. The final result is a file
+that takes 16.826.700 bytes. That number should be compared with the 19.399.216
+for \LUATEX. So, we need less indeed. But, when we compress the \LUAMETATEX\
+format we get this: 5,913,932 which is much less than the 11,129,903 compressed
+size that the \LUATEX\ engine makes of it. One reason for using level 3 zip
+compression compression in \LUATEX\ is that (definitely when we started) it loads
+faster. It adds to creating the dump but doesn't really influence loading,
+although that depends a bit on the compiler used. It is not easy to see from
+these numbers what goes on, but when you consider the fact that we mostly store
+32 bit numbers it will also be clear that many can be zero or have two or three
+zero bytes. There's a lot of repetition involved!
+
+So let's look at some of these numbers. The mentioning of token list compaction
+relates to getting rid of holes in memory. Each token takes 8 bytes, 4 for the
+token identifier, internally called a cmd and chr, and 4 for a value like an
+integer or dimension value, or a glue pointer, or a pointer to a next token, etc.
+In our case compaction doesn't save that much.
+
+The mentioning of potentially aliased \LUA\ call|/|value entries is more a warning.
+Because the \LUA\ engine starts fresh each run, you cannot store its \quote
+{pointers} and because hashes are randomized this means that you need to delay
+initialization to startup time, definitely for function tokens.
+
+Strings in \TEX\ can be pretty long but in practice they aren't. In \CONTEXT\ the
+maximum string length is 69. This makes it possible to use one byte for
+registering the string length instead of four which saves quite a bit. Of course
+one large string will spoil this game.
+
+The fingerprint, engine, preamble and later housekeeping bytes can be neglected
+but the string pool not. These are the bytes that make up the strings. The bytes
+are stored in format but when loaded become dynamically allocated. The \LUATEX\
+engine and its successor don't really have a pool.
+
+Now comes a confusing number. There are not tens of thousands of nodes allocated.
+A node is just a pointer into a large array so actually node references are just
+indices. Their size varies from 2 slots to 25; the largest are par nodes, while
+shape nodes are allocated dynamically. So what gets reported are the number of
+bytes that nodes take. each node slot takes 8 bytes, so a glyph node of 12
+bytes takes 96 bytes, while a glue spec node (think skip registers) takes 5 slots
+or 40 bytes. These are amounts of memory that were not realistic when \TEX\ was
+written. For the record: in \LUATEX\ glue spec nodes are not shared, so we have
+many more.
+
+The majority of \TEX\ related dump data is for tokens, and here we need 3905660
+which means 488K tokens (each reported value also includes some overhead). The
+memory used for the table of equivalents makes for some 88K of them. This table
+relates to macros (their names and content). Keep in mind that (math) character
+references are also macros.
+
+The next sections that get loaded are math and text codes. These are the
+mentioned compartimized character properties. The number of math codes is not
+that large (because we delay much of math) but the text codes are plenty, think
+of lc, uc, sf, hj, catcodes, etc. Compared to \LUATEX\ we have more categories
+but use less space because we have an more granular storage model. Optimizing
+that bit really payed off, also because we have more vectors.
+
+The way primitives and macro names get resolved is pretty much the same in all
+engines but by using the fact that we operate in 32 bit I could actually get rid
+of some parallel tables that handle saving and restore. Some optimizations relate
+to the fact that the register ranges are part of the game so basically we have
+some holes in there when they are not used. I guess this is why \ETEX\ uses a
+sparse model for the registers above 255. What also saved a lot is that we don't
+need to store font names, because these are available in another way; even in
+\LUATEX\ that takes a large, basically useless, chunk. The memory that a macro
+without parameters consumes is 8 bytes smaller and in \CONTEXT\ we have lots of
+these.
+We don't really store fonts, so that section is small, but we do store the math
+parameters, and there is not much we can save there. We also have more such
+parameters in \LUAMETATEX\ so there we might actually use more storage. The
+information related to languages is also minimal because patterns and exceptions
+are loaded at runtime. A new category (compared to \LUATEX) is inserts because in
+\LUAMETATEX\ we can use an alternative (not register based) variant. As you can
+see from the 180 bytes used, indeed \CONTEXT\ is using that variant.
+
+That leaves a large block of more than 10 million bytes that relates to \LUA\
+byte code. A large part of that is the huge \LUA\ character table that \CONTEXT\
+uses. The implementation of font handling also takes quite a bit and we're not
+even talking of all the auxiliary \LUA\ modules, \XML\ processing, etc. When
+\CONTEXT\ would load that on demand, which is nearly always, the format file
+would be much smaller but one would pay for it later. Loading the (some 600)
+\LUA\ byte code chunks takes of course some time as does initialization but not
+much.
+
+All that said, the reason why we have a large format file can be understood well
+if one considers what goes in there. The \CONTEXT\ format files for \PDFTEX\ and
+\XETEX\ are 3.3 and 4.7 MB each which is smaller but not that much when you
+consider the fact that there is no \LUA\ code stored and that there are less
+character tables and an \ETEX\ register model used. But a format file is not the
+whole story. Runtime memory usage also comes at a price.
+
+The current memory settings of \CONTEXT\ are as follows; these values get
+reported when a format has been generated and can be queried at runtime an any
+moment:
+
+\starttabulate[|l|r|r|r|r|]
+\BC           \BC       max \BC      min \BC      set \BC     stp \BC \NR
+\HL
+\BC string    \NC   2097152 \NC   150000 \NC   500000 \NC  100000 \NC \NR
+\BC pool      \NC 100000000 \NC 10000000 \NC 20000000 \NC 1000000 \NC \NR
+\BC hash      \NC   2097152 \NC   150000 \NC   250000 \NC  100000 \NC \NR
+\BC lookup    \NC   2097152 \NC   150000 \NC   250000 \NC  100000 \NC \NR
+\BC node      \NC  50000000 \NC  1000000 \NC  5000000 \NC  500000 \NC \NR
+\BC token     \NC  10000000 \NC  1000000 \NC 10000000 \NC  250000 \NC \NR
+\BC buffer    \NC 100000000 \NC  1000000 \NC 10000000 \NC 1000000 \NC \NR
+\BC input     \NC    100000 \NC    10000 \NC   100000 \NC   10000 \NC \NR
+\BC file      \NC      2000 \NC      500 \NC     2000 \NC     250 \NC \NR
+\BC nest      \NC     10000 \NC     1000 \NC    10000 \NC    1000 \NC \NR
+\BC parameter \NC    100000 \NC    20000 \NC   100000 \NC   10000 \NC \NR
+\BC save      \NC    500000 \NC   100000 \NC   500000 \NC   10000 \NC \NR
+\BC font      \NC    100000 \NC      250 \NC      250 \NC     250 \NC \NR
+\BC language  \NC     10000 \NC      250 \NC      250 \NC     250 \NC \NR
+\BC mark      \NC     10000 \NC       50 \NC       50 \NC      50 \NC \NR
+\BC insert    \NC       500 \NC       10 \NC       10 \NC      10 \NC \NR
+\stoptabulate
+
+The maxima is what can be used at most. Apart from the magic number 2097152 all
+these maxima can be bumped at compile time but if you need more, you might wonder
+of your approach to rendering makes sense. The minima are what always gets
+allocated, and again these are hard coded defaults. The size can be configured
+and is normally the same as the minima but we use larger values in \CONTEXT. The
+step is how much an initial memory blob will grow when more is needed than is
+currently available. The last four entries show that we don't start out with many
+fonts (especially when we use the \CONTEXT\ compact font model not that many are
+needed) and because \CONTEXT\ implements marks in a different way we actually
+don't need them. We do use the new insert properties storage model and for now
+the set sizes are enough for what we need.
+
+In practice a \LUAMETATEX\ run uses less memory than a \LUATEX\ one, not only
+because memory allocation is more dynamic, but also because of other
+optimizations. When the compact font model is used (something \CONTEXT) even less
+memory is needed. Even this claim should be made with care. Whenever I discuss
+the use of resources one needs to limit the conclusions to \CONTEXT. I can't
+speak for other macro packages simply because I don't know the internals and the
+design decisions made and their impact on the statistics. As a teaser I show the
+impact of some definitions:
+
+\starttyping
+\chardef     \MyFooA1234
+\Umathchardef\MyFooB"1 "0 "1234
+\Umathcode   1 2 3 4
+\def         \MyFooC{ABC}
+\def         \MyFooD#1{A#1C}
+\def         \MyFooE{\directlua{print("some lua")}}
+\stoptyping
+
+The stringpool grows because we store the names (here they are of equal length).
+Only symbolic definitions bump the hashtable and equivalents. And with
+definitions that have text inside the number of bytes taken by tokens grows fast
+because every character in that linked list takes 8 bytes, 4 for the character
+with its catcode state and 4 for the link to the next token.
+
+\starttabulate[|l||||||]
+\BC                       \BC stringpool \BC tokens  \BC equivalents \BC hashtable \BC total    \NC \NR
+\HL
+\NC                       \NC 836408     \NC 3906124 \NC 705316      \NC 497396    \NC 16828987 \NC \NR
+\NC \type {\chardef}      \NC 836415     \NC 3906116 \NC 705324      \NC 497408    \NC 16829006 \NC \NR
+\NC \type {\Umathchardef} \NC 836422     \NC 3906116 \NC 705324      \NC 497420    \NC 16829025 \NC \NR
+\NC \type {\Umathcode}    \NC 836422     \NC 3906124 \NC 705324      \NC 497420    \NC 16829033 \NC \NR
+\NC \type {\def} (no arg) \NC 836429     \NC 3906148 \NC 705332      \NC 497428    \NC 16829080 \NC \NR
+\NC \type {\def} (arg)    \NC 836436     \NC 3906196 \NC 705340      \NC 497440    \NC 16829155 \NC \NR
+\NC \type {\def} (text)   \NC 836443     \NC 3906372 \NC 705348      \NC 497452    \NC 16829358 \NC \NR
+\stoptabulate
+
+So, every time a user wants some feature (some extra checking, a warning, color
+or font support for some element) that results in a trivial extension to the
+core, it can bump the size fo the format file more than you think. Of course when
+it leads to some overhaul sharing code can actually make the format shrink too. I
+hope it is clear now that there really is not much to deduce from the bare
+numbers. Just try to imagine what:
+
+\starttyping
+\definefilesynonym
+  [type-imp-newcomputermodern-book.mkiv]
+  [type-imp-newcomputermodern.mkiv]
+\stoptyping
+
+adds to the format. Convenience has a price.
+
+\stopchapter
+
+\stopcomponent
+
+% Some bonus content:
+
+When processing thousand paragraphs \type {tufte.tex}, staying below 4 seconds
+(just over 60 pages per second) all|-|in that looks ok. But it doesn't say that
+much. Outputting 1000 pages in 2 seconds tells a bit about the overhead on a page
+but again in practice things work out differently. So what do we need to
+consider?
+
+\startitemize
+
+\startitem
+    Check what macros and resources are preloaded and what gets always loaded at
+    runtime.
+\stopitem
+
+\startitem
+    After a first run it's likely that the operating system has resources in its
+    cache so start measuring after a few runs.
+\stopitem
+
+\startitem
+    Best run a test many times and and take the average runtime.
+\stopitem
+
+\startitem
+    Simple macro performance tests can be faster than in real usage because the
+    related bytes are in \CPU\ cache memory. So one can only use that to test a
+    specific improvement (or hit due to added functionality).
+\stopitem
+
+\startitem
+    The size of the used \TEX\ tree can matter. The file databases need to be
+    loaded and consulted.
+\stopitem
+
+\startitem
+    The binary matters: is it optimized, does it load libraries, is it 64 bit or not.
+\stopitem
+
+\startitem
+    Local and|/|or global font definitions can hit performance and when a style
+    does many redundant switches it might hit performance. Of course that only is
+    the case when font switching is adaptive.
+\stopitem
+
+\startitem
+    The granularity of subsystems impacts performance: advanced color support,
+    inheritance used in mechanisms, abstraction combined with extensive
+    support for features, it all matters.
+\stopitem
+
+\startitem
+    The more features one enables the more it will impact performance as does
+    preprocessing the input (normalizing, bidi checking, etc).
+\stopitem
+
+\startitem
+    It matters how the page (and layout) dimensions are defined. Although
+    language doesn't really play a role (apart from possible hyphenation)
+    specific scripts might.
+\stopitem
+
+\stopitemize
+
+These are just a few points, but it might be clear that I don't take comparisons
+too serious simply because it's real runs that matter. As long as we're in the
+runtime comfort zone we're okay. You can run tests within the domain of a macro
+package but comparing macro package makes not that much sense. It can even
+backfire, especially when claims were made about what should be or not be in a
+kernel (while later violating that) or relying on old stories (or rumors) about a
+variant macro package being slow. (The same is true when comparing one's favorite
+operating system.) Yes, the \CONTEXT\ format file is huge and performance less
+than for instance plain \TEX. If that is a problem and not a virtue then make
+sure your own alternative will never end up like that. And just don't come to
+conclusions about a system that you don't really know.


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-formats.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-hyphenation.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-hyphenation.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-hyphenation.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,426 @@
+% language=us runpath=texruns:manuals/evenmore
+
+\environment evenmore-style
+
+\startcomponent evenmore-hyphenation
+
+\usebodyfont[pagella]
+
+\startchapter[title=Hyphenation]
+
+\startsection[title={Introduction}]
+
+Hyphenation is driven by the character codes. In a traditional \TEX\ such a code
+accesses a glyph in a font, which is why the font encoding mattered, but in
+\LUATEX\ we use \UNICODE\ and when hyphenation is applied. \footnote {In
+\CONTEXT\ \MKII\ we also use \UTF\ patterns, which made it possible to ship
+patterns that didn't depend on a font encoding. Mojca and Arthur made \UTF\ the
+default when the (upgraded) hyphenation pattern project started.} Later, the
+character codes are adapted by the font handler where they become glyphs. There
+are moments when you don't want to hyphenate and a cheap trick is to switch to a
+language that has no hyphenation patterns. But, in a system like \CONTEXT\ that
+doesn't work well because we have lots of language bound properties. Therefore in
+\MKIV\ we set the left- and right hyphen minima to extreme values, something that
+blocks hyphenation quite well. But this is not a pretty solution at all. Even
+worse is that when we have situations where discretionaries (\type
+{\discretionary}), automatic (\type{-}) or explicit (\type {\-}) are used these
+still kick in.
+
+For that reason in \LMTX\ we have a mode variable that controls hyphenation. In
+\LUATEX\ we have primitives like \type {\compoundhyphenmode}, \type
+{\hyphenationbounds} and \type {\hyphenpenaltymode} that controlled how
+hyphenation and discretionary injection is handled but when in \LUAMETATEX\ the
+more generic \type {\hyphenationmode} parameter was introduced the precursors
+were all merged into this one. One can argue that this is a form of regression
+but there are good reasons, most noticeably the fact that we keep these
+properties with glyph nodes so that we have better control over them in grouped
+situations where as some operations happen when the paragraph as whole get
+treated local overloads are lost. \footnote {Of course it also is a wink to those
+who complain that we add primitives to an otherwise leaner variant of \LUATEX,
+but let us not elaborate on that misunderstanding.} It anyway means that in
+\LMTX\ we have to set different parameters but that is no big deal because users
+are supposed to use the more high level interfaces; instead of setting parameters
+to values one flips bits in \type {\hyphenationmode}, which in the end makes more
+sense and also permits extensions later without adding much overhead.
+
+Currently this mode parameter controls the following options:
+
+\starttabulate[|Tr|||]
+\NC \uchexnumber{\normalhyphenationcode}           \NC \type{\normalhyphenationcode}           \NC honour the (normal) \type{\discretionary} primitive \NC \NR
+\NC \uchexnumber{\automatichyphenationcode}        \NC \type{\automatichyphenationcode}        \NC turn \type {-} into (automatic) discretionaries \NC \NR
+\NC \uchexnumber{\explicithyphenationcode}         \NC \type{\explicithyphenationcode}         \NC turn \type {\-} into (explicit) discretionaries \NC \NR
+\NC \uchexnumber{\syllablehyphenationcode}         \NC \type{\syllablehyphenationcode}         \NC hyphenate (syllable) according to language \NC \NR
+\NC \uchexnumber{\uppercasehyphenationcode}        \NC \type{\uppercasehyphenationcode}        \NC hyphenate uppercase characters too \NC \NR
+\NC \uchexnumber{\compoundhyphenationcode}         \NC \type{\compoundhyphenationcode}         \NC permit break at an explicit hyphen (border cases) \NC \NR
+\NC \uchexnumber{\strictstarthyphenationcode}      \NC \type{\strictstarthyphenationcode}      \NC traditional \TEX\ compatibility wrt the start of a word \NC \NR
+\NC \uchexnumber{\strictendhyphenationcode}        \NC \type{\strictendhyphenationcode}        \NC traditional \TEX\ compatibility wrt the end of a word \NC \NR
+\NC \uchexnumber{\automaticpenaltyhyphenationcode} \NC \type{\automaticpenaltyhyphenationcode} \NC use \type {\automatichyphenpenalty} \NC \NR
+\NC \uchexnumber{\explicitpenaltyhyphenationcode}  \NC \type{\explicitpenaltyhyphenationcode}  \NC use \type {\explicithyphenpenalty} \NC \NR
+\NC \uchexnumber{\permitgluehyphenationcode}       \NC \type{\permitgluehyphenationcode}       \NC turn glue in discretionaries into kerns \NC \NR
+\stoptabulate
+
+The default \CONTEXT\ setup is:
+
+\starttyping
+\hyphenationmode \numexpr
+    \normalhyphenationcode
+  + \automatichyphenationcode
+  + \explicithyphenationcode
+  + \syllablehyphenationcode
+  + \uppercasehyphenationcode
+  + \compoundhyphenationcode
+  % \strictstarthyphenationcode
+  % \strictendhyphenationcode
+  + \automaticpenaltyhyphenationcode
+  + \explicitpenaltyhyphenationcode
+  + \permitgluehyphenationcode
+\relax
+\stoptyping
+
+When a discretionary node is created (triggered by \type {\discretionary}) the
+current value is used. Injected glyph nodes on the other hand will store the
+current value and use that when it is needed for hyphenating the list.
+
+\stopsection
+
+\startsection[title={Controlling hyphenation}]
+
+We start with an example that has some Dutch words:
+
+\startbuffer[sample]
+NEDERLANDS\par Nederlands\par nederlands\par
+\CONTEXT  \par test\-test\par test-test \par
+\stopbuffer
+
+\typebuffer[sample]
+
+\startbuffer[result]
+\startlinecorrection
+\dontleavehmode \dorecurse{\boxlines\scratchboxone} {%
+   \setbox\scratchbox\boxline\scratchboxone#1%
+   \ruledhpack{\strut\unhbox\scratchbox}%
+   \kern.25\emwidth
+}
+\stoplinecorrection
+\stopbuffer
+
+When we typeset this with a \type {\hsize} of 2mm we get:
+
+\setbox\scratchboxone\vbox{\dontcomplain \nl \hsize 2mm \getbuffer[sample]}
+
+\getbuffer[result]
+
+But when we block hyphenation with \type {\nohyhens} we see:
+
+\setbox\scratchboxone\vbox{\dontcomplain \nl \hsize 2mm \nohyphens \getbuffer[sample]}
+
+\getbuffer[result]
+
+The \MKIV\ behavior can be emulated by setting the mode as follows
+
+\startbuffer[demo]
+\bitwiseflip \hyphenationmode \syllablehyphenationcode
+\stopbuffer
+
+\setbox\scratchboxone\vbox{\dontcomplain \nl \hsize 2mm \getbuffer[demo] \getbuffer[sample]}
+
+\getbuffer[result]
+
+This time the three non|-|syllable variants get hyphenated and that is not what
+we want. In this case there is a \type {\discretionary} in the definition of the
+macro that generates \CONTEXT\ and, apart from the fact that we might not even
+want to hyphenate logos, we have to block it when we apply \type {\nohyphens}.
+
+This mode setting are directly applied to the three non|-|syllable variants but
+delayed in the syllable discretionaries because hyphenation happens later so the
+state becomes a property of glyph nodes. Doing the same for the other
+discretionaries would demand an adaption of various pieces of the engine code and
+plugged in user (\LUA) code also has to consider it which makes no sense.
+
+\startbuffer[sample]
+\nohyphens nederlands {\dohyphens nederlands} nederlands\par
+\stopbuffer
+
+\typebuffer[sample]
+
+\setbox\scratchboxone\vbox{\dontcomplain \nl \hsize 2mm \getbuffer[sample]}
+\getbuffer[result]
+
+Compare this with:
+
+\startbuffer[sample]
+nederlands {\nohyphens nederlands} nederlands\par
+\stopbuffer
+
+\typebuffer[sample]
+
+\setbox\scratchboxone\vbox{\dontcomplain \nl \hsize 2mm \getbuffer[sample]}
+\getbuffer[result]
+
+\stopsection
+
+\startsection[title={Compound hyphenation}]
+
+Yet another discretionary related issue is with compound words, that is: cases
+where \type {\discretionary} commands sit between words. There are of course
+tricks to deal with it like adding a huge penalty combined with a zero skip. This
+is okay in a traditional \TEX\ engine but in an opened up one you might not want
+this. Just to mention one aspect: when processing \OPENTYPE\ fonts you actually
+need to look into discretionaries in order to deal with glyphs that interact. And
+you don't want to deal with penalties and skips unless they have an explicit
+meaning. We show the four possibilities:
+
+\startbuffer[sample]
+nederlands\discretionary           {!}{!}{!}nederlands\blank
+\stopbuffer
+
+\typebuffer[sample]
+
+\setbox\scratchboxone\vbox{\dontcomplain \nl \hsize 2mm \getbuffer[sample]}
+\getbuffer[result]
+
+\startbuffer[sample]
+nederlands\discretionary options 1 {!}{!}{!}nederlands\blank
+\stopbuffer
+
+\typebuffer[sample]
+
+\setbox\scratchboxone\vbox{\dontcomplain \nl \hsize 2mm \getbuffer[sample]}
+\getbuffer[result]
+
+\startbuffer[sample]
+nederlands\discretionary options 2 {!}{!}{!}nederlands\blank
+\stopbuffer
+
+\typebuffer[sample]
+
+\setbox\scratchboxone\vbox{\dontcomplain \nl \hsize 2mm \getbuffer[sample]}
+\getbuffer[result]
+
+\startbuffer[sample]
+nederlands\discretionary options 3 {!}{!}{!}nederlands\blank
+\stopbuffer
+
+\typebuffer[sample]
+
+\setbox\scratchboxone\vbox{\dontcomplain \nl \hsize 2mm \getbuffer[sample]}
+\getbuffer[result]
+
+Here is an example of such an interference. Of course in practice this happens
+seldom and certainly not with ligatures. Some fonts have kerning between certain
+glyphs and for instance dashes and there it could matter.
+
+\startbuffer
+ef%
+\penalty \plustenthousand
+\hskip   \zeropoint
+\discretionary{-}{f}{f}%
+\penalty \plustenthousand
+\hskip   \zeropoint
+e
+ef\discretionary options 3 {-}{f}{f}e
+\stopbuffer
+
+\typebuffer
+
+As you can see, we only get the ligature when we set the options. In the process
+of processing \OPENTYPE\ features it can be that one actually looses a
+discretionary, although we try to prevent this when possible.
+
+\startlinecorrection
+\scale[height=2cm]{\setupbodyfont[pagella]\showglyphs\getbuffer}
+\stoplinecorrection
+
+But, as said, the fact that we don't need the penalties and glue helps at the
+\LUA\ end: the cleaner the node list, the better.
+
+\stopsection
+
+\startsection[title={Tracing}]
+
+The already present tracker command has been extended so handle the options:
+
+\startbuffer[sample0]
+\enabletrackers[discretionaries]
+\stopbuffer
+\startbuffer[sample1]
+test\discretionary {]} {[} {[]}test
+\stopbuffer
+\startbuffer[sample2]
+testing\discretionary {]} {[} {[]}testing
+\stopbuffer
+\startbuffer[sample3]
+testing\discretionary options 3 {]} {[} {[]}testing
+\stopbuffer
+
+\typebuffer[sample0,sample1,sample2,sample3]
+
+\setbox\scratchboxone\vbox{\dontcomplain            \getbuffer[sample0,sample1]} \getbuffer[result]
+\setbox\scratchboxone\vbox{\dontcomplain \hsize 2mm \getbuffer[sample0,sample2]} \getbuffer[result]
+\setbox\scratchboxone\vbox{\dontcomplain \hsize 2mm \getbuffer[sample0,sample3]} \getbuffer[result]
+
+\stopsection
+
+\startsection[title={Glue in discretionaries}]
+
+In the case you cannot predict what goes into a discretionary you can get run into
+an error message with respect to unsupported glue in a disc node. The mode value
+\number\permitgluehyphenationcode\space makes glue acceptable and turn into
+kern, as demonstrated here;
+
+\startbuffer
+{\hsize 1mm \darkblue \discretionary{potential conspiracy}{prophets}{influencers}\par}
+\stopbuffer
+
+\typebuffer
+
+The line break occurs but the space in the pre part is of course frozen:
+
+{\getbuffer}
+
+As usual \TEX\ users will come up with applications.
+
+\stopsection
+
+\startsection[title={Penalties}]
+
+By default the par builder will use the value of \type {\hyphenpenalty} that gets
+stored in the discretionary node. However, when the \type {\discretionary} is
+followed by a \type {penalty} keyword and a number, that one will.
+
+\stopsection
+
+\startsection[title=Exceptions]
+
+At some point a user on the \CONTEXT\ mailing list wondered how to deal with a case
+like this:
+
+\startbuffer[example]
+\switchtobodyfont[pagella]\mainlanguage[de]auffasse
+\stopbuffer
+
+\typebuffer[example]
+
+\startlinecorrection
+\scale[height=2cm]{\inlinebuffer[example]}
+\stoplinecorrection
+
+\startbuffer
+\startexceptions[de]
+au{f-}{-f}{ff}(f\zwnj f)asse
+\stopexceptions
+\stopbuffer
+
+In \LUAMETATEX\ you can block the unwanted ligature using this trick:
+
+\typebuffer \getbuffer
+
+\startlinecorrection
+\scale[height=2cm]{\inlinebuffer[example]}
+\stoplinecorrection
+
+The exception mechanism in \LUATEX\ and therefore \LUAMETATEX\ works as follows.
+When we have this exception:
+
+\starttyping
+au{f-}{-f}{ff}asse
+\stoptyping
+
+the engine will register that exception under \type {auffasse}, that is: the
+replacement part determines the word. When it runs into that word, it will create
+a so called discretionary node with a pre, post and replace part. However, it
+only uses the \type {ff} for a lookup and keeps the original two glyphs: these
+become the replacement text. However, in \LUAMETATEX\ you can add an alternative
+replacement:
+
+\startbuffer
+\startexceptions[de]
+au{f-}{-f}{ff}(st)asse
+\stopexceptions
+\stopbuffer
+
+\typebuffer \getbuffer
+
+This time the replacement text becomes \type {xx}. So we get \type {austasse} and
+it is that sequence that is seen by the font handler when it applies its tricks.
+On some fonts however
+
+\startbuffer[example]
+\switchtobodyfont[pagella]\mainlanguage[de]auffasse
+\stopbuffer
+
+\startlinecorrection
+\scale[height=2cm]{\showglyphs\showfontkerns\inlinebuffer[example]}
+\stoplinecorrection
+
+But in the Pagella font that we use here, a kern is added between the \type {s} and
+the \type {t}. If you don't want that you can say this:
+
+\startbuffer
+\startexceptions[de]
+au{f-}{-f}{ff}(s\zwnj t)asse
+\stopexceptions
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startlinecorrection
+\scale[height=2cm]{\showglyphs\showfontkerns\inlinebuffer[example]}
+\stoplinecorrection
+
+A \type {zwj} will block a ligature (some fonts have an \type {st} ligature) and a
+\type {zwnj} blocks a ligatures as well as kerns.
+
+You can actually abuse this mechanism for trickery like this:
+
+\startbuffer
+\startexceptions[nl]
+wis-kun-d{e-}{o}{eo}(e-o)n-der-wijs
+\stopexceptions
+\stopbuffer
+
+\typebuffer \getbuffer
+
+The Dutch word \type {wiskundeonderwijs} is found as exception and comes out like
+this:
+
+\startbuffer[example]
+\switchtobodyfont[pagella]\mainlanguage[nl]wiskundeonderwijs
+\stopbuffer
+
+\startlinecorrection
+\scale[height=1cm]{\showglyphs\showfontkerns\inlinebuffer[example]}
+\stoplinecorrection
+
+Watch the hyphen that makes the compound word more visible! The other hyphens in
+the exception are proper hyphenation points and when a break happens there a
+hyphen is automatically added. The \type {\nokerning} and \type {\noligaturing}
+macros can be used grouped:
+
+\startbuffer[example]
+{every}\quad
+{\nokerning every}\quad
+{\noligaturing every}\quad
+{e{\nokerning v}ery}\quad
+{e{\glyphoptions\noleftkernglyphoptioncode  v}ery}\quad
+{e{\glyphoptions\norightkernglyphoptioncode v}ery}\quad
+\stopbuffer
+
+\typebuffer[example]
+
+There are several low level control options. In addition to those shown here we
+have a pair for ligatures: \typ {\noleftligatureglyphoptioncode} and \typ
+{\norightligatureglyphoptioncode}.
+
+\startlinecorrection[blank]
+\scale[width=\textwidth]{\showglyphs\showfontkerns\inlinebuffer[example]}
+\stoplinecorrection
+
+There are alternative mechanism, like a blocker that implements a font feature
+and a replacement mechanism, but these are not discussed here.
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-hyphenation.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-inserts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-inserts.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-inserts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,198 @@
+% language=us runpath=texruns:manuals/evenmore
+
+\environment evenmore-style
+
+\startcomponent evenmore-inserts
+
+\startchapter[title=Inserts]
+
+{\em As in other chapters, this is mostly a wrapup of some developments and nota
+manual. What is described here might actually evolve. Normally \CONTEXT\ users
+will not notice these details, but it might help them to get an idea of what
+complications we're dealing with.}
+
+\startsection[title=Notes]
+
+Quite some \TEX\ users love footnotes. These typographical elements have two
+properties:
+
+\startitemize[n]
+\startitem
+    A blob of text, often placed at the bottom of a page or at the end of a
+    section, chapter or document. A note can be a short one|-|liner but also
+    a paragraph of text.
+\stopitem
+\startitem
+    A symbol in the running text that serves as reference to that blob. It can be
+    a number of just some unique symbol.
+\stopitem
+\stopitemize
+
+When such a note is placed at the bottom of a page, the page builder needs to
+take its dimensions into account when calculating an optimal page break. It might
+even have to split a note over pages. Preferably the reference and note are on
+the same page. In order to achieve this there is a special mechanism that deals
+with this: inserts. In this chapter we only discuss them in the perspective of
+notes but they can also be used for, for instance, top or bottom figures, tables,
+etc.
+
+\stopsection
+
+\startsection[title=Global and local]
+
+Normally notes are placed in the text flow. We call these global inserts. When
+they are attached to a specific typographical element we tend to call them local
+and there is a good reason for that. For instance, when used in a table, one
+might want to keep them with that table when it is moved to a place where it
+fits. When notes are packaged {\em with} the table they are flushed on demand and
+not handled by the page builder. Actually they don't use inserts then. One
+problem with global notes is that the \TEX\ engine has some limitations with
+respect to inserts. In traditional \TEX, the following example will only result
+in note \quote {a} being placed. The other two are buried too deeply.
+
+\startbuffer[insert]
+test \footnote {a} \hbox {test \footnote{b} \hbox {test \footnote {c}} test} test
+\stopbuffer
+
+\typebuffer[insert]
+
+There are a few places where \TEX\ will bubble up the notes: when it constructs
+lines during a breaking a paragraph into lines, and when constructing alignment
+cells. In all other cases they are simply discarded.
+
+In \CONTEXT\ \MKII\ there is a mechanism that can postpone such notes. Normally a
+user will not use boxes directly so when some mechanism is used that does box
+its content, \CONTEXT\ can collect the notes and flush them in a spot that
+exposes them. This works reasonable well be it that we loose some of the
+synchronization with the page builder: flushing can happen after a page break.
+
+Already early in the \CONTEXT\ \MKIV\ development a more advanced mechanism was
+introduced, using \LUA\ callbacks: auto migration. There (optionally) inserts are
+bubbled up to a level where they are visible but even that has its limitations. Users
+explicitly need to enable automigration in \MKIV.
+
+In \CONTEXT\ \LMTX\ we do it a bit different because the \LUAMETATEX\ engine has
+a feature that helps. More about that next.
+
+\stopsection
+
+\startsection[title=Pre and post migration]
+
+There is another mechanism that moves material from the spot: adjusts. Here is an
+example (watch the interline spacing):
+
+\startbuffer[adjust]
+\strut test \vadjust pre {\red \strut before} test \vadjust {\red \strut after}
+\stopbuffer
+
+\typebuffer[adjust]
+
+This gives:
+
+\blank {\bf\showstruts \getbuffer[adjust]} \blank
+
+The \type {pre} variant was introduced in \PDFTEX\ at a time that I actually has
+use for it (think of marginal notes) but in \MKIV\ we don't use this adjust
+mechanism.
+
+Inserts on the other hand always end up \quote {post} where they are injected.
+Some day I might think about what good there is in injecting them \quote {pre}
+where they are injected. It might become an option.
+
+\blank {\bf \showboxes \getbuffer[insert]} \blank
+
+In this already shown example the footnotes (that are implemented using inserts)
+result indeed in text showing up at the bottom of the page, even when they are
+wrapped in boxes. The reason is that we have enabled a mechanism that
+automatically bubble them up:
+
+\starttyping
+\automigrationmode = 3 % \numexpr 1 + 2 \relax
+\stoptyping
+
+Here bit~1 controls migration in lists and bit~2 controls migration in the main
+vertical list (the page flow). In \CONTEXT\ \LMTX\ we enable both.
+
+\startbuffer
+h: \setbox0\hbox{box    \footnote{h:     box}}\setbox2\hbox{\box    0}\box2\quad
+h: \setbox0\hbox{copy   \footnote{h:    copy}}\setbox2\hbox{\copy   0}\box2\quad
+h: \setbox0\hbox{unbox  \footnote{h:  unhbox}}\setbox2\hbox{\unhbox 0}\box2\quad
+h: \setbox0\hbox{uncopy \footnote{h: unhcopy}}\setbox2\hbox{\unhcopy0}\box2\quad
+v: \setbox0\hbox{box    \footnote{v:     box}}\setbox2\vbox{\box    0}\box2\quad
+v: \setbox0\hbox{copy   \footnote{v:    copy}}\setbox2\vbox{\copy   0}\box2\quad
+v: \setbox0\hbox{unbox  \footnote{v:  unhbox}}\setbox2\vbox{\unhbox 0}\box2\quad
+v: \setbox0\hbox{uncopy \footnote{v: unhcopy}}\setbox2\vbox{\unhcopy0}\box2\quad
+\stopbuffer
+
+\typebuffer
+
+This is a kind of torture test:
+
+\blank \hbox{\bf \getbuffer} \blank
+
+It might look kind of trivial to accomplish this but it actually took some
+experimenting to get it right. It also must be noted that because in \LUATEX\ and
+even more in \LUAMETATEX\ the nodes that store a box are much larger than in
+traditional \TEX\ and that the price for adding some additional overhead for
+dealing with pre- and post material had not that much impact on the performance
+of \LUAMETATEX.
+
+On the one hand we need to make sure that the inserts are kept with the box but
+on the other hand they should really migrate when the boxed material gets boxed
+itself. This has to be combined with unboxing and copying. It has to work in
+regular boxes but also in the main vertical list (the page flow).
+
+\stopsection
+
+\startsection[title=Playground]
+
+You can play a bit with this mechanism by getting and setting the pre and post
+material than relates to a box.
+
+\startbuffer
+\setbox0\ruledhbox{\strut content \footnote {footnote}}
+
+[flush  pre\prelistbox    0] % \prelistcopy  0
+[flush post\postlistbox   0] % \postlistcopy 0
+[set    pre\setprelistbox 0\ruledhbox{\strut before}]
+[set   post\setpostlistbox0\ruledhbox{\strut  after}]
+
+\blank \box0 \blank
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+Of course there can be side effects but so far this mechanism works reasonable
+well, given what it has to deal with.
+
+\stopsection
+
+\startsection[title=Marks]
+
+The low level marks mechanism can use the same pre and post mechanisms but I
+didn't test that yet. We have a different approach to marks but eventually might
+revert to using the build in mechanism, be it in adapted form.
+
+\stopsection
+
+% \startsection[title=Maybe]
+%
+% Inserts are implemented in a bit special way. A class of inserts needs a box,
+% dimen, count and skip register. So, the macro package has to allocate these
+% en|-|block. This puts some constraints on the register allocation macros. On the
+% agenda is to investigate if a dedicated compound register makes sense. However,
+% this means that the interfaces change, but because a \CONTEXT\ user doesn't use
+% the low level inserts directly this is not really a problem. Adapting the
+% implementation can have the side effect of using a different insert chaining
+% which can give a better interface to \LUA\ because the current interface is not
+% really useable.
+%
+% \stopsection
+
+\stopchapter
+
+\stopcomponent
+
+


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-inserts.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 \startcomponent evenmore-introduction
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-keywords.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-keywords.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-keywords.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 % 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:

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-libraries.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-libraries.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-libraries.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 \startcomponent evenmore-libraries
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 % \enabletrackers[nodes.directions]
 
@@ -102,8 +102,8 @@
 
 \starttexdefinition Sample #1#2
     \OldNormalizeLineMode\normalizelinemode
-    \bitwiseflip \normalizelinemode \normalizelinemodecode
-    \bitwiseflip \normalizelinemode \indentskipmodecode
+    \bitwiseflip \normalizelinemode \normalizelinenormalizecode
+    \bitwiseflip \normalizelinemode \parindentskipnormalizecode
     \startsubsubject[title={#1}]
         \typebuffer[#2]
         \startlinecorrection

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-numbers.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-numbers.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-numbers.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 \startcomponent evenmore-numbers
 

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-offloading.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-offloading.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-offloading.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,127 @@
+% language=us runpath=texruns:manuals/evenmore
+
+% \showusage
+
+% This chapter was started when I updated some of the dynamic memory management
+% code. The musical timestamp is the discovery (via Sputs & Ghostnote drumming
+% sessions) of DOMI & JS BECK (also see: keyscape, nord) and after that Louis
+% Cole (Live 2019). So much talent around ...
+
+\environment evenmore-style
+
+\startcomponent evenmore-offloading
+
+\startchapter[title={Offloading}]
+
+The \LUAMETATEX\ source code started from \LUATEX\ with the idea to make a lean
+and mean variant. In the process the whole code base has been overhauled. Because
+we develop and maintain \CONTEXT\ in parallel all kind of experiments can be
+conducted. \footnote {To my best knowledge macro packages like \LATEX\ have
+decided to use the (mostly stable) \LUATEX\ in combination with a built in font
+renderer. The wish for stability from developers of other macro packages was one
+of the reasons for starting the \LUAMETATEX\ project: \LUATEX\ could no longer
+evolve without folks complaining. So, \LUAMETATEX, at least in the short run, is
+no reasonable option for other macro packages, unless policies have changed.}
+
+Already early in the process the decision was made to remove the backend code. I
+already had a working \LUATEX\ & \MKIV\ setup with an independent backend so that
+was an easy step. Later I removed that code from \MKIV\ because a dualistic model
+made for a messy \CONTEXT\ code base, and for \LUATEX\ I like to stick to the
+reference implementation. Of course one can wonder if we still have \TEX\ when
+there is no backend but you need to keep in mind that \TEX\ always needs some
+kind of backend program. If \DVI\ was still a used format (with \CONTEXT) I could
+write a \DVI\ backend without much effort, but \PDF\ is kind of the standard now.
+The relevant primitives can easily be defined in \LUA.
+
+What more defines \TEX ? Of course the macro language, but in addition to that we
+have the handling of fonts, hyphenation and building various lists, those that
+eventually make it into paragraphs and pages. The \ETEX, \PDFTEX\ and \OMEGA\
+engines have added bits and pieces and of course \LUATEX\ added its share.
+
+In \LUAMETATEX\ the macro part has been extended. Very few things were dropped,
+most noticeably \type {\long} and \type {\outer} are no longer effective but
+that made for a better \type {\protected} and gave room for \type {\frozen}.
+
+The handling of fonts is mostly delegated to callbacks but we do have the
+original transformation mechanism available. However, loading fonts is now up to
+\LUA. If that is done right, there is no difference with \TEX. One can argue that
+when a missing piece in the binary is complemented by a \LUA\ solution that gets
+plugged in we just are like \TEX. After all, nowhere is said that the engine has
+to be written in one language and in the \CWEB\ setup of \TEXLIVE\ we already mix
+languages anyway.
+
+The language part is also upgraded and because handling hyphenation has been
+extended we're, as with fonts, going beyond what traditional \TEX\ offers. The
+code for hyphenating is slightly different because we permit runtime loading and
+extension, compound and weighted patterns, etc.
+
+Another deviation is the handling of input and output. Although currently the log
+file still happens at the engine end, all the reading and writing from files is
+delegated to \LUA. This means that primitives like \type {\openin} and \type
+{\write} have to be implemented in \LUA, which is not that hard. It makes a lot
+of sense because everything already was driven by callbacks so delegating more to
+\LUA\ in the end gave a simpler input handler. For the user (or macro package) it
+makes no difference.
+
+So, assuming that the primitives not present in the engine are provided by \LUA\
+driven counterparts, we can speak of \TEX. So how about \ETEX ? We kept the macro
+language extensions, but dropped some others, like the direction related code.
+Also the querying of internal codes has been adapted to \LUATEX's internals.
+Expressions have been extended a bit. The \type {\scantokens} primitive now uses
+the same machinery as the \LUA|-|\TEX\ pipe, which made for less code and adds to
+consistency. From the \PDFTEX\ engine we only kept a few things, like protrusion
+and expansion. From \OMEGA\ only the concept of localpar and part of the
+directional model was kept, but because it's the backend that deals with
+directions there is not much there. We also dropped some \LUATEX\ features, for
+instance first class image handling only stays as concept (a special kind of
+rule) but again it is the backend that really needs to deal with it.
+
+So, in the end we end up, as intended, with a simpler code base indeed. Of course
+there is also stuff that is not in a traditional \TEX\ or \LUATEX. In addition to
+\LUA\ some libraries are present, but we avoid dependencies on large third party
+bodies of code. The continuous updating in \LUATEX\ told me that this dependency
+is a bad thing of we want the program to compile in decades from now (as
+libraries come and go and often also politics are involved). There is a small
+canonical set of what we provide and although one can use extra libraries it
+takes some effort. The internals of \LUAMETATEX\ are hidden.
+
+Just for the record. Because I want to keep as working engine and adapt \CONTEXT\
+in parallel, the process is rather time consuming. Every optimization, removal of
+unused code, addition of a feature, etc.\ takes multiple runs of the test suite,
+checking with \CONTEXT, generating binaries, updating the distribution, and so
+on. When we don't use something in \CONTEXT\ it goes on the todo stack, which
+means that testing is delayed to when I wrap up in documentation, which only
+happens when I think it's stable. For instance: when \type {\openin} and friends
+were delegated to \LUA, the \type {\ifeof} primitive was kept around with a
+temporary callback, so that \type {tikz} kept working. We don't use those read
+channels in \CONTEXT\ so that was a compromise. A while later the if test was
+also delegated and the temporary callback removed. There is no way I could do
+this kind of stepwise development were it now within the \CONTEXT\ community
+where users are willing to accept this.
+
+Another example of something that took some time is checking all memory
+allocation code, adding safeguards, make it more dynamic, making sure we have
+more statistics. It needs some experimenting and the \CONTEXT\ tracking code had
+to be extended. The main motivation for this is that there are some users out
+there (most noticeably Massimiliano who is involved in typesetting some scholar
+encyclopedia work) who run really huge jobs and we can run out of memory or even
+crash then. \footnote {I'm not that worried about an occasional bug, because the
+number is small compared to what got added, changed and improved, but of course
+there are always folks who ignore that fact and stress bug(let)s. But, as said,
+the \CONTEXT\ users are a patient lot.} Tracing shows that although \TEX\
+allocates its share of memory, in these thousand plus page documents in small
+print the regular few dozen megabytes can grow to hundreds, most noticeably taken
+up by fonts. Tracing also gives some insight in how fast token and node memory
+grows. Of course in this case \LUA\ takes way more memory, something between 1.5
+and 2~GB. Again this is due to the large amount of font instances and also is a
+side effect of massive \XML\ processing (keep in mind that the whole tree is in
+memory) and the fact that there are plenty of optimizations wrt typesetting
+implemented and multiple large registers are added. It's this kind of
+(regression) tests that help in stepwise improving \LUAMETATEX. \footnote {In the
+process one sometimes find ways to safe memory. For instance, marks used
+preallocated arrays that took 1280 KB memory while of course in practice no one
+needs that many mark registers. By making that more dynamic we saved a lot.}
+
+\stopchapter
+
+\stopcomponent


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-offloading.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-paragraphs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-paragraphs.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-paragraphs.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,397 @@
+% language=us runpath=texruns:manuals/evenmore
+
+% End of July 2020 I decided to look into some of the backlog items and paragraphs
+% are on them, as are inserts and so. The usual musical time stamp is buying the
+% excellent Prince Live at the Aladdin Las Vegas DVD which I ran between the
+% moments that I had enough of coding. Some tracks, like Family Name, fit perfectly
+% in mid 2020.
+
+% https://www.youtube.com/watch?v=f8FAJXPBdOg
+
+\environment evenmore-style
+
+\startcomponent evenmore-paragraphs
+
+\enableexperiments[paragraphs.freeze]
+
+\startchapter[title=Paragraphs]
+
+{\em This is mostly a wrapup of some developments, and definitely not a tutorial.
+What is described here is experimental and successive version of \CONTEXT\ \LMTX\
+will explore their potential. As long a users stay away from the low level
+primitives we can try to guarantee consistent behavior (and catch side effect or
+deal with known issues).}
+
+\startsection[title=Freezing]
+
+A well known property of paragraphs is that when the moment is there to split
+into lines, the current state of variables drives it. There are a lot of quite
+some variables involved. The most significant one is the \type {\hsize}. Take
+this:
+
+\startbuffer
+\bgroup
+    {\bf Ward:}
+    \hsize .25\textwidth
+    {\bf Ward:} \samplefile{ward}
+    \hsize .75\textwidth % last value
+\egroup
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+{\forgetparagraphfreezing \getbuffer}
+
+But wait, why do we get the full text width here? The reason is that by the time
+the paragraph ends, after the \type {\egroup}, the \type {\hsize} is set back to
+what it was before the group started.
+
+\startbuffer
+\bgroup
+    \hsize .25\textwidth
+    {\bf Ward:} \samplefile{ward}
+    \hsize .75\textwidth % last value
+    \par
+\egroup
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+{\forgetparagraphfreezing \getbuffer}
+
+The last \type {\hsize} specified is used. That is not really a problem, but the
+fact that we need to explicitly end a paragraph before the group ends actually
+is, and in a moment we will see an example where that matters a lot. First a
+general solution to this problem is discussed. In the next example, we do group,
+but inside that group we take a snapshot of the \type {\hsize}:
+
+\startbuffer
+\bgroup
+    \hsize .80\textwidth
+    \dontleavehmode
+    \snapshotpar "000001
+    {\bf Ward:} \samplefile{ward}
+\egroup
+\stopbuffer
+
+\typebuffer
+
+This time we get:
+
+{\forgetparagraphfreezing \getbuffer}
+
+The magic number used in the snapshot relates to the \type {\hsize}.
+
+\startcolumns[n=2]
+\starttabulate[|T||]
+\NC 0x\uchexnumbers{\hsizefrozenparcode        } \NC hsize \NC \NR
+\NC 0x\uchexnumbers{\skipfrozenparcode         } \NC leftskip rightskip \NC \NR
+\NC 0x\uchexnumbers{\hangfrozenparcode         } \NC hangindent hangafter \NC \NR
+\NC 0x\uchexnumbers{\indentfrozenparcode       } \NC parindent \NC \NR
+\NC 0x\uchexnumbers{\parfillfrozenparcode      } \NC parfillskip parfillleftskip \NC \NR
+\NC 0x\uchexnumbers{\adjustfrozenparcode       } \NC adjustspacing adjustspacingstep adjustspacingshrink adjustspacingstretch \NC \NR
+\NC 0x\uchexnumbers{\protrudefrozenparcode     } \NC protrudechars \NC \NR
+\NC 0x\uchexnumbers{\tolerancefrozenparcode    } \NC pretolerance tolerance \NC \NR
+\NC 0x\uchexnumbers{\stretchfrozenparcode      } \NC emergencystretch \NC \NR
+\NC 0x\uchexnumbers{\loosenessfrozenparcode    } \NC looseness \NC \NR
+\NC 0x\uchexnumbers{\lastlinefrozenparcode     } \NC lastlinefit \NC \NR
+\NC 0x\uchexnumbers{\linepenaltyfrozenparcode  } \NC linepenalty interlinepenalty interlinepenalties \NC \NR
+\NC 0x\uchexnumbers{\clubpenaltyfrozenparcode  } \NC clubpenalty clubpenalties \NC \NR
+\NC 0x\uchexnumbers{\widowpenaltyfrozenparcode } \NC widowpenalty widowpenalties displaywidowpenalty displaywidowpenalties \NC \NR
+\NC 0x\uchexnumbers{\brokenpenaltyfrozenparcode} \NC brokenpenalty \NC \NR
+\NC 0x\uchexnumbers{\demeritsfrozenparcode     } \NC adjdemerits doublehyphendemerits finalhyphendemerits \NC \NR
+\NC 0x\uchexnumbers{\shapefrozenparcode        } \NC parshape \NC \NR
+\NC 0x\uchexnumbers{\linefrozenparcode         } \NC baselineskip lineskip lineskiplimit \NC \NR
+\NC                                              \NC \NC \NR
+\NC 0xFFFFFFF                                    \BC all of them \NC \NR
+\stoptabulate
+\stopcolumns
+
+In practice you will set them all on one go, so:
+
+\starttyping
+\snapshotpar "FFFFFFF
+\stoptyping
+
+How often do we need such a feature? Actually more often than one thinks,
+especially when we have an unpredictable situation. For instance, when you
+typeset from an \XML\ source you often don't know what you get, and you can have
+cases that end up like this:
+
+\startbuffer
+\placefigure[left,none]{}{} {Ward: \bf  \dorecurse{3}{\samplefile{ward}} } \par
+\placefigure[left,none]{}{} {\bf Ward:} \dorecurse{3}{\samplefile{ward}}   \par
+\stopbuffer
+
+\typebuffer
+
+This might render as:
+
+{\forgetparagraphfreezing \getbuffer} \forgetsidefloats % needed due to interference
+
+The placement of such a figure is hooked into \type {\everypar} and uses hanging
+indentation. Like \type {\hsize}, \type {\hangafter} and \type {\hangindent} can
+be forgotten before the paragraph ends. In \MKII\ and \MKIV\ the recommended
+solution is to always start a paragraph explicitly, with a strut, forced
+indentation of preferably:
+
+\startbuffer
+\dontleavehmode {Ward: \bf  \dorecurse{3}{\samplefile{ward} } } \par
+\dontleavehmode {\bf Ward:} \dorecurse{3}{\samplefile{ward} }   \par
+\stopbuffer
+
+\typebuffer
+
+In an \XML\ mapping we can hide it but in a regular \TEX\ source this is not
+pretty. With little effort we can do the snapping automatically, so that we get:
+
+\placefigure[left,none]{}{} {Ward: \bf  \dorecurse{3}{\samplefile{ward} } } \par
+\placefigure[left,none]{}{} {\bf Ward:} \dorecurse{3}{\samplefile{ward} }   \par
+
+and this is what \CONTEXT\ \LMTX\ will do once we're sure that the snapshot
+feature behaves well and has no side effects. There is of course some overhead
+involved in taking snapshots, keeping track of the values and accessing them
+later, but it is rewarding.
+
+In addition to the numeric \type {\snapshotpar} primitive there is also another
+way to take s snapshot. As with the numeric variant, it only takes a snapshot when
+in horizontal mode: there has to be a so called local par node at the head of the
+current list. The next code shows some how to play with some of what \CONTEXT\
+offers:
+
+\starttyping
+\setuplayout[alternative=doublesided]
+
+\starttext
+
+\startbuffer
+    \dorecurse{8}{
+        \interlinepenalties 1 \maxcard
+        CASE 1: \samplefile{tufte} \par
+    } \page
+
+    \dorecurse{8}{
+        CASE 2: \samplefile{tufte}
+        \interlinepenalties 1 \maxcard \par
+    } \page
+
+    \dorecurse{8}{
+        CASE 3: \samplefile{tufte}
+        \interlinepenalties 1 \maxcard \freezeparagraphproperties \par
+    } \page
+
+    \dorecurse{8}{
+        CASE 4: \samplefile{tufte}
+        \frozen \interlinepenalties 1 \maxcard \par
+    } \page
+
+    \dorecurse{8}{
+        CASE 5: \samplefile{tufte}
+        \frozen \interlinepenalty \maxcard \par
+    } \page
+\stopbuffer
+
+\typebuffer \page \getbuffer
+
+\stoptext
+\stoptyping
+
+When you process this you will notice that the \type {\frozen} prefix also
+snapshots the parameter that gets set. Now, there is a pitfall here: some for
+these settings are persistent, i.e. they are not reset after a paragraph has been
+typeset. For instance, \type {\tolerance} is a general setting, but \type
+{\hangindent} is a one shot setting: it's value gets reset after the paragraph
+has been dealt with.
+
+Here is another test one can run to see what happens:
+
+\starttyping
+\dontleavehmode
+\defrostparagraphproperties
+\writestatus{state}{after  start            \uchexnumbers{\the\snapshotpar}}%
+\writestatus{state}{before set   hangindent \uchexnumbers{\the\snapshotpar}}%
+\frozen\hangindent10pt
+\writestatus{state}{after  set   hangindent \uchexnumbers{\the\snapshotpar}}%
+\writestatus{state}{before set   looseness  \uchexnumbers{\the\snapshotpar}}%
+\frozen\looseness 1
+\writestatus{state}{after  set   looseness  \uchexnumbers{\the\snapshotpar}}%
+\writestatus{state}{before set   hangafter  \uchexnumbers{\the\snapshotpar}}%
+\frozen\hangafter 2
+\writestatus{state}{after  set   hangafter  \uchexnumbers{\the\snapshotpar}}%
+\begingroup
+\writestatus{state}{before set   rightskip  \uchexnumbers{\the\snapshotpar}}%
+\frozen\rightskip2cm
+\writestatus{state}{after  set   rightskip  \uchexnumbers{\the\snapshotpar}}%
+\endgroup
+\writestatus{state}{before reset hangindent \uchexnumbers{\the\snapshotpar}}%
+\snapshotpar-\frozenhangindentcode
+\writestatus{state}{after  reset hangindent \uchexnumbers{\the\snapshotpar}}%
+\writestatus{state}{before reset hangafter  \uchexnumbers{\the\snapshotpar}}%
+\snapshotpar-\frozenhangaftercode
+\writestatus{state}{after  reset hangafter  \uchexnumbers{\the\snapshotpar}}%
+... content ...
+\stoptyping
+
+You can group an assignment and then take a snapshot. That way the change doesn't
+affect following paragraphs, unless of course to did a global assignment. In
+\CONTEXT\ we have a bunch of constants that can be used instead of the hard to
+remember bit positions. The \type {\frozen} prefix can also be used with for
+instance a \type {\advance} operation. Of course it only has effect for those
+(internal) parameters that relate to a paragraph.
+
+Keep in mind that what is show here will evolve: in \CONTEXT\ \LMTX\ we will
+snapshot by default and the core macros are aware of this fact. Although the way
+\CONTEXT\ is set up makes it relatively easy to make this paradigm shift users
+should anyway be aware of this change when they do their own low level tweaking,
+but in that case they probably already are aware of possible interferences.
+
+\stopsection
+
+\startsection[title=Wrapping up]
+
+Another new (low level) feature is wrapping up a paragraph. Traditional \TEX\
+comes with the powerful \type {\everypar} and in \LUAMETATEX\ we now have \type
+{\wrapuppar}. This primitive collects tokens that will be expanded just before
+the paragraph ends. Here is an example:
+
+\startbuffer
+\dontleavehmode
+\wrapuppar{\hfill {\bf ONE}}%
+\wrapuppar{\crlf\strut\hfill {\bf TWO}\hfill\strut}%
+\wrapuppar{\crlf\strut {\bf THREE}\hfill\strut {\bf FOUR}}%
+\samplefile{ward}
+
+\samplefile{ward}
+\stopbuffer
+
+\typebuffer
+
+We can only wrapup when we are in a paragraph although one can of course use the
+\type {\wrapuppar} command inside an \type {\everypar} if needed.
+
+\getbuffer
+
+An more useful example is the following. We leave it to the reader to check it
+out:
+
+\starttyping
+\dorecurse{10}{
+    \bgroup
+        \advance\hsize by -#1cm\relax
+        \dontleavehmode
+        \wrapuppar{\strut\nobreak\hfill\nobreak QED}%
+        \samplefile{ward}
+    \egroup
+    \par
+}
+\stoptyping
+
+\stopsection
+
+\startsection[title=Insertions]
+
+The concept of inserts is kind of complicated. They are nodes in a list that make
+separate streams. An application of inserts are footnotes. In the text flow a
+symbol is typeset (like a raised number) and the note itself becomes an insert.
+When a paragraph is broken into lines, these inserts end up in to be boxed line,
+but when the line is actually wrapped in a box, these inserts are collected and
+injected after the line. The page builder will then take their dimensions into
+account when it comes to breaking pages. Depending on how strict the rules are
+the inserts will end up on the same page, move, of be broken into lines.
+
+This all works well as long as the inserts are not burried into boxes: they then
+are invisible to the mechanism described before. Take the following example:
+
+\starttyping
+\dontleavehmode
+l\hbox{h\footnote{h1} test}
+l\hbox{h\footnote{h2}} test
+l\hbox{h\footnote{h3}} test
+l\footnote{l4} test
+l\footnote{l5} test
+l\hbox{h\footnote{h6} test}
+l\hbox{\hbox{\hbox{h\footnote{h7} test}}}
+l\footnote{l8} test
+\par
+\stoptyping
+
+% \starttabulate
+% \NC test \NC test \footnote{before} \samplefile{tufte} \footnote{after}\NC \NR
+% ...
+% \NC test \NC test \footnote{before} \samplefile{tufte} \footnote{after}\NC \NR
+% \stoptabulate
+
+In the engines used with \MKII\ only a few footnotes actually show up. In \MKIV\
+the situation is slightly better because there we use some trickery to migrate
+these notes to the outer level. But even there it's not perfect because the order
+changes. We can actually fix that (and do so) but it comes at a performance penalty
+so this is why in \MKIV\ dealing with this is optional.
+
+\start
+    \def\Hi#1{\high{\tx#1}}
+    \dontleavehmode
+    \hbox{lh\H1 test lh\H2 test lh\H3 test l\H4 test l\H5 test lh\H6 test lh\H7 test l\H8 test}
+
+    \starttabulate[|||||||||||]
+    \NC \MKII \NC \PDFTEX\ & \XETEX         \NC \Hi4 l4 \NC \Hi5 l5 \NC \Hi8 l8 \NC         \NC         \NC         \NC         \NC         \NC \NR
+    \NC \MKIV \footnote{In older versions.} \NC \LUATEX             \NC \Hi1 h1 \NC \Hi2 h2 \NC \Hi3 h3 \NC \Hi6 h6 \NC \Hi7 h7 \NC \Hi4 l4 \NC \Hi5 l5 \NC \Hi8 l8 \NC \NR
+    \NC \LMTX \NC \LUAMETATEX               \NC \Hi1 h1 \NC \Hi2 h2 \NC \Hi3 h3 \NC \Hi4 l4 \NC \Hi5 l5 \NC \Hi6 h6 \NC \Hi7 h7 \NC \Hi8 l8 \NC \NR
+    \stoptabulate
+\stop
+
+However, when you look at the results of \LMTX\ you will notice that the
+situation is better. This is because we have some code to \LUAMETATEX\ that can
+better deal with some cases. Combined with some \LUA\ magic (as in \MKIV) we get
+the right order at hardly any runtime overhead. It must be noted that the
+original \TEX\ engine for good reason works as it does because there the actual
+typesetting (read: resolving glyphs, hyphenation, applying ligatures and kerns,
+etc.) is interwoven with the main scanning|/|expanding loops in order to be
+efficient on the machines of those times. In \LUATEX\ we have these stages
+separated but the code dealing with inserts is the same, if only because we have
+to be compatible. In \LUAMETATEX\ we have again a bit simpler code because we use
+the fact that lists are double linked, which also makes it possible to add some
+magic code dealing with nested inserts without obscuring the code. It comes of
+course at a bit performance hit and the nodes related to lists also because
+larger but they are already much larger than in other engines, so we don't care
+too much about that. It is anyway a mechanism that need to be enabled explicitly.
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent
+
+% \starttext
+
+%     \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}}}
+
+%     \start
+%         \TestA
+%         \dorecurse{3}{1.#1 before \ruledvbox{\hsize2em\raggedcenter\TestB1 !\par} after\par} \blank
+%         \dorecurse{3}{2.#1 before \ruledvbox{\hsize3em\raggedcenter        !\par} after\par} \blank
+%         \dorecurse{3}{3.#1 before \ruledvbox{\hsize4em\raggedcenter\TestB2 !}     after\par} \blank
+%         \forgetparwrapper
+%         \dorecurse{3}{4.#1 before \ruledvbox{\hsize5em\raggedcenter\TestB3 !}     after\par} \blank
+%         \TestC
+%         \dorecurse{3}{5.#1 before \ruledvbox{\hsize2em\raggedcenter\TestA   !}     after\par} \blank
+%     \stop
+
+
+%     \start
+%         \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
+%     \stop
+
+% \stoptext


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-paragraphs.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parameters.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parameters.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parameters.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 % This feature was done mid May 2020 with Alien Chatter (I really need to find the
 % original cd's) in the background.

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parsing.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parsing.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-parsing.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 \environment evenmore-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-pi.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-pi.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-pi.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 \environment evenmore-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-style.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-style.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-style.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/evenmore
+
 % \enablelmtx
 % \nopdfcompression
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-threesix.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-threesix.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-threesix.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 \environment evenmore-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-titlepage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-titlepage.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-titlepage.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/evenmore
+
 \startcomponent evenmore-titlepage
 
 \environment evenmore-style

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-tokens.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-tokens.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-tokens.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 % TODO: copy_node_list : return tail
 % TODO: grabnested

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-whattex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-whattex.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore-whattex.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/evenmore
 
 \startcomponent evenmore-whattex
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/evenmore/evenmore.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/evenmore
+
 \environment evenmore-style
 
 \dontcomplain
@@ -25,19 +27,13 @@
         \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
-
+        \component evenmore-paragraphs
+        \component evenmore-hyphenation
+        \component evenmore-bitwise
+        \component evenmore-offloading
+        \component evenmore-inserts
+        \component evenmore-formats
+        \component evenmore-expressions
     \stopbodymatter
 
 \stopdocument

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-bitmaps.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-bitmaps.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-bitmaps.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-bitmaps
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-cleanup.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-cleanup.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-cleanup.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 % Youtube: TheLucs play with Jacob Collier // Don't stop til you get enough
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-compilation.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-compilation.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-compilation.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-compilation
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-contents.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-contents.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/followingup
+
 \startcomponent followingup-contents
 
 \environment followingup-style

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-directions.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-directions.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-directions.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-directions
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-evolution.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-evolution.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-evolution.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-evolution
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-feedback.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-feedback.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-feedback.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-feedback
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-fonts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-fonts.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-fonts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-fonts
 
@@ -230,7 +230,7 @@
 (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
+final). This brings the number of axes 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
@@ -332,9 +332,9 @@
 \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.
+primitive that deals with this is named \type {\glyphscale}; it accepts a number,
+where \type {1200} means 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
@@ -614,7 +614,6 @@
 
 {\getbuffer}
 
-
 \stopsection
 
 \startsection[title={Implementation}]
@@ -653,51 +652,6 @@
 
 \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

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-introduction
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-logging.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-logging.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-logging.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-logging
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-lua.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-lua.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-lua.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-lua
 

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-memory.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-memory.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-memory.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,136 @@
+% language=us runpath=texruns:manuals/followingup
+
+\startcomponent followingup-memory
+
+\environment followingup-style
+
+\startchapter[title={Memory}]
+
+\startsection[title={Introduction}]
+
+\stopsection
+
+\startsection[title={\LUA}]
+
+When you initialize \LUA\ a proper memory allocator has to be provided. The
+allocator gets an old size and new size passed. When both are zero the allocator
+can \type {free} the blob, when the new size exceeds the old size the blob has to
+be \type {realloc}'s, and otherwise an initial \type {malloc} happens. When used
+with \CONTEXT, \LUAMETATEX\ will do lots of calls to the allocator and often an
+initial allocation is followed by a reallocation, for instance because tables
+start out small but immediately grows a while after.
+
+It is for this reason that early 2021 I decided to look into alternative
+allocators. I can of course code one myself, but where a \LUATEX\ run is a one
+time event, often with growing memory usage due to all kind of accumulating
+resources, using the engine as stand alone interpreter needs a more sophisticated
+approach than just keeping a bunch of bucket pools alive: when the script engine
+runs for months or even years memory should be returned to the operating system
+occasionally. We don't want the same side effects that \HTML\ browsers have:
+during the day you need to restart them occasionally because they use up quite a
+bit of your computers memory (often for no real reason, so it probably has to do
+with keeping memory in store instead of returning it and|/|or it can be a side
+effect of a scattered pool \unknown\ who knows).
+
+Instead of reinventing that wheel I ended up with testing Daan Leijen's \type
+{mimalloc} implementation: a not bloated, not too low level, reasonable sized
+library. Some simple experiments learned that it does make a difference in
+performance. The experiment was done with the native \MICROSOFT\ compiler (msvc).
+One reason for that is that till that moment I preferred the cross compiled
+\MINGW\ versions (for cross compiling I use the \LINUX\ subsystem that comes with
+\MSWINDOWS). Although native binaries compile faster and are smaller, the cross
+compiled ones perform somewhat better (often some 5\%). Interesting is that
+making the format file is always much faster with a native binary, probably
+because the console output is supported better. When the alternative memory
+allocator is plugged into \LUA\ suddenly the native version outperforms the cross
+compiled one (also by some 5\%). The overall gain on a native binary for
+compiling the \LUAMETATEX\ manual is between~5 and~10\% which was reason enough
+to continue this experiment. As a first step the native compiled version will
+default to it, later other platforms might follow.
+
+\stopsection
+
+\startsection[title={\TEX}]
+
+Memory allocation in \TEX\ has always been done by the engine itself. At startup
+a couple of big chunks are allocated and from that smaller blobs are taken. The
+largest chunks are for nodes, tokens and the table of equivalents (including the
+hash where control sequences are mapped onto registers and macros (lists of
+tokens). Smaller chunks are used for nesting states, after group restoration
+stacks, in- and output levels, etc. In modern engines the sizes of the chunks can
+be configured, some only at format generation time. In \LUAMETATEX\ we are more
+dynamic and after an initial (minimal) chunk allocation, when needed more memory
+will be allocated on demand, in steps, until a configured size is reached. That
+size has an upper limit (which if needed can be enlarged at compilation time). A
+side effect is that we (need to) do some more checking.
+
+Node memory is special in the sense that nodes are basically offsets in a large
+array where each node has a number of slots after that offset. This is rather
+efficient in terms of performance and memory. New nodes (of any size) are taken
+from the node chunk and never returned. When freed they are appended to a list
+per size and that list serves as pool before new nodes get taken from the chunk.
+Variable size chunks are done differently, if only because we use them plenty in
+\CONTEXT\ and they can lead to (excessive and) fragmented memory usage otherwise.
+
+Tokens all have the same size so here there is only one list of free tokens.
+Because tokens and (most) nodes make it into linked lists those lists of free
+nodes and tokens are rather natural. And it's also fast. It all means that \TEX\
+itself does hardly any real memory allocation: only a few dozen large chunks. An
+exception is the string pool, where contrary to traditional \TEX\ engines, the
+\LUATEX\ (and \LUAMETATEX) engines allocate strings using \type {malloc}. Those
+strings (used for control sequences) are never freed. In other cases where
+strings are used, like in for instance \type {\csname} construction, temporary
+strings are used. The same is true for some file related operations. None of
+these are real demanding in terms of excessive allocation and freeing. Also, in
+places that matter \LUAMETATEX\ is already quite optimized so using a different
+allocator gives no gain here.
+
+Technically we could allocate nodes by using \type {malloc} but there are a few
+places in the engine that makes this hard. It can be done but then we need to
+make some conceptual changes (with regards to the way inserts are dealt with) and
+the question is if we gain much by breaking away from tradition. I guess there it
+will actually hurt performance if we change this. Another variant is where we
+allocate nodes of the same size from different pools but this doesn't bring us
+any gain either. A stringer argument is that changing the current (and historic)
+memory management of nodes will complicate the code.
+
+A bit of an exception is the flow of information between \LUA\ and \TEX. There we
+do quite some allocation but it depends on how much a macro package demands of
+that.
+
+\stopsection
+
+\startsection[title={\METAPOST}]
+
+When the \METAPOST\ library was written, Taco changed the memory allocation to be
+more dynamic. One reason for this is that the number models (scaled, double,
+decimal, binary) have their own demands. For some objects (like numbers) the
+implementation uses a pool so it sits between the way \TEX\ works and \LUA\ when
+the standard allocator is used. This means that although quite some allocation
+is demanded, often the pool can serve the requests. (We might use a few more
+pools in the future.)
+
+In \LUAMETATEX\ the memory related code has been reorganized a little so that
+(again as experiment) the \type {mimalloc} manager can be used. The performance
+gain is not as impressive as with \LUA, but we'll see how that evolves when more
+demand poses more stress.
+
+\stopsection
+
+\startsection[title={The verdict}]
+
+In \LUAMETATEX\ version 2.09.4 and later the native \MSWINDOWS\ binaries now use
+the alternative \type {mimalloc} allocator. The gain is most noticeable for \LUA\
+and a little for \TEX\ and \METAPOST. The test suite with 2550 files runs in 1200
+seconds which is quite an improvement over the \MINGW\ cross compiled binary that
+needs 1350 seconds. We do occasionally test a binary compiled with \CLANG\ but
+that one is much slower than both others (compilation also takes much more time)
+but that might improve over time. Because of these results, it is likely that
+I'll also check out the other platforms, once the \MSWINDOWS\ binaries have
+proven to be stable (those are the once I use anyway).
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-memory.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-mp.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-mp.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-mp.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,5 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
-\registerctxluafile{mlib-scn}{}
-
 \startcomponent followingup-mp
 
 \environment followingup-style

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-performance.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-performance.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-performance.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-performance
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-rejected.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-rejected.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-rejected.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-rejected
 
@@ -81,3 +81,17 @@
 \stopchapter
 
 \stopcomponent
+
+% very limited use case and not easy in nested definitions (which is where is
+% would have been used
+%
+% } else if (cur_cmd == begin_local_cmd && cur_chr == local_control_now_code) {
+%
+%\def\foo#1#2%
+%  {test #1
+%   test #2
+%   test
+%   \localcontrolnow{\scratchcounter\catcode\hashasciicode \catcode\hashasciicode\othercatcode}
+%   #
+%   \localcontrolnow{\catcode\hashasciicode\scratchcounter}
+%   test}

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-retrospect.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-retrospect.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-retrospect.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-retrospect
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-stripping.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-stripping.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-stripping.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 %  2,777,600 / 11,561,471 cont-en.fmt
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-stubs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-stubs.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-stubs.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-stubs
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-style.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-style.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-style.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/followingup
+
 % \enablelmtx
 % \nopdfcompression
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-tex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-tex.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-tex.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-tex
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-titlepage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-titlepage.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-titlepage.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/followingup
+
 \startcomponent followingup-titlepage
 
 \environment followingup-style

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-whatsits.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-whatsits.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup-whatsits.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/followingup
 
 \startcomponent followingup-whatsits
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/followingup/followingup.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,11 @@
+% language=us runpath=texruns:manuals/followingup
+
 \environment followingup-style
 
 \dontcomplain
 
+% \enableexperiments[fonts.compact]
+
 \startdocument
 
     \component followingup-titlepage
@@ -29,6 +33,7 @@
         \component followingup-tex
         \component followingup-retrospect
         \component followingup-fonts
+        \component followingup-memory
     \stopbodymatter
 
 \stopdocument

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-appendix.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-appendix.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-appendix.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \startcomponent fonts-appendix
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-environment.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-environment.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-environment.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/fonts
+
 \startenvironment fonts-environment
 
     % we need to do this beforehand

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-extensions.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-extensions.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-extensions.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \startcomponent fonts-extensions
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-features.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-features.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-features.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \startcomponent fonts-features
 
@@ -883,7 +883,7 @@
         \stopcombination
     \stopplacefigure
 
-    \definefont[emoji][file:emojionecolor-svginot.ttf*default,svg]
+    \definefont[Emoji][file:emojionecolor-svginot.ttf*default,svg]
 
     \def\FourFaces{\char128104\zwj\char128105\zwj\char128102\zwj\char128102\relax}
 
@@ -892,7 +892,7 @@
     \def\Boy  {\char"1F466\relax}
     \def\Girl {\char"1F467\relax}
 
-    How do we know what faces add up to the ligature {\emoji\Man \zwj \Woman \zwj
+    How do we know what faces add up to the ligature {\Emoji\Man \zwj \Woman \zwj
     \Girl \zwj \Boy} and how are we supposed to know that there should {\darkgray
     \type {zwj}} in between? When we input four faces separated by zero width
     joiners, we get a four face symbol instead. The reason for having the joiners in
@@ -899,60 +899,60 @@
     between is probably to avoid unexpected ligatures. The sequence \type {man},
     \type {woman}, \type {boy}, \type {boy} gives \type {family}:
     %
-    {\emoji\Man}   + {\darkgray \type {zwj}}
-    {\emoji\Woman} + {\darkgray \type {zwj}}
-    {\emoji\Boy}   + {\darkgray \type {zwj}}
-    {\emoji\Boy}   = {\emoji\Man \zwj \Woman \zwj \Boy \zwj \Boy},
+    {\Emoji\Man}   + {\darkgray \type {zwj}}
+    {\Emoji\Woman} + {\darkgray \type {zwj}}
+    {\Emoji\Boy}   + {\darkgray \type {zwj}}
+    {\Emoji\Boy}   = {\Emoji\Man \zwj \Woman \zwj \Boy \zwj \Boy},
     %
     but two girls also work:
     %
-    {\emoji\Man}   + {\darkgray \type {zwj}}
-    {\emoji\Woman} + {\darkgray \type {zwj}}
-    {\emoji\Girl}  + {\darkgray \type {zwj}}
-    {\emoji\Girl}  = {\emoji\Man \zwj \Woman \zwj \Girl \zwj \Girl},
+    {\Emoji\Man}   + {\darkgray \type {zwj}}
+    {\Emoji\Woman} + {\darkgray \type {zwj}}
+    {\Emoji\Girl}  + {\darkgray \type {zwj}}
+    {\Emoji\Girl}  = {\Emoji\Man \zwj \Woman \zwj \Girl \zwj \Girl},
     %
     so does a mixture of kids:
     %
-    {\emoji\Man}   + {\darkgray \type {zwj}}
-    {\emoji\Woman} + {\darkgray \type {zwj}}
-    {\emoji\Girl}  + {\darkgray \type {zwj}}
-    {\emoji\Boy}   = {\emoji\Man \zwj \Woman \zwj \Girl \zwj \Boy},
+    {\Emoji\Man}   + {\darkgray \type {zwj}}
+    {\Emoji\Woman} + {\darkgray \type {zwj}}
+    {\Emoji\Girl}  + {\darkgray \type {zwj}}
+    {\Emoji\Boy}   = {\Emoji\Man \zwj \Woman \zwj \Girl \zwj \Boy},
     %
     although (at least currently):
     %
-    {\emoji\Man}   + {\darkgray \type {zwj}}
-    {\emoji\Woman} + {\darkgray \type {zwj}}
-    {\emoji\Boy}   + {\darkgray \type {zwj}}
-    {\emoji\Girl}  = {\emoji\Man \zwj \Woman \zwj \Boy \zwj \Girl},
+    {\Emoji\Man}   + {\darkgray \type {zwj}}
+    {\Emoji\Woman} + {\darkgray \type {zwj}}
+    {\Emoji\Boy}   + {\darkgray \type {zwj}}
+    {\Emoji\Girl}  = {\Emoji\Man \zwj \Woman \zwj \Boy \zwj \Girl},
     %
-    gives twin boys. Of course the real family emoj is {\emoji\char"1F46A}.
+    gives twin boys. Of course the real family emoj is {\Emoji\char"1F46A}.
 
     In our times for sure many combinations are possible, so:
     %
-    {\emoji\Man}  + {\darkgray \type {zwj}}
-    {\emoji\Man}  + {\darkgray \type {zwj}}
-    {\emoji\Girl} + {\darkgray \type {zwj}}
-    {\emoji\Girl} = {\emoji\Man \zwj \Man \zwj \Girl \zwj \Girl},
+    {\Emoji\Man}  + {\darkgray \type {zwj}}
+    {\Emoji\Man}  + {\darkgray \type {zwj}}
+    {\Emoji\Girl} + {\darkgray \type {zwj}}
+    {\Emoji\Girl} = {\Emoji\Man \zwj \Man \zwj \Girl \zwj \Girl},
     %
     indeed gives a family, but I wonder at what point cultural bias will creep into
     font design. One can even wonder how clothing and haircut will demand frequent
-    font updates: {\emoji\char"1F46B}, {\emoji\char"1F46C}, {\emoji\char"1F46D}.
+    font updates: {\Emoji\char"1F46B}, {\Emoji\char"1F46C}, {\Emoji\char"1F46D}.
 
     In the math alphabets we have a couple of annoying holes because some characters
     were already present in \UNICODE. The bad thing here is that we now always have
     to deal with these exceptions. But not so with emojis because here eventually all
     variants will show up. Where a character \type {A} in red or blue uses the same
-    code point, a white telephone {\emoji\char"1F57E} and black telephone
-    {\emoji\char"1F57F} have their own. And because obsolete scripts are already
+    code point, a white telephone {\Emoji\char"1F57E} and black telephone
+    {\Emoji\char"1F57F} have their own. And because obsolete scripts are already
     supported in \UNICODE\ and more get added, we can expect old artifacts also
-    showing up at some time. Soon the joystick {\emoji\char"1F579} will be an unknown
+    showing up at some time. Soon the joystick {\Emoji\char"1F579} will be an unknown
     item to most of us, while the \MICROSOFT\ hololens migth get its slot.
 
     \startplacefigure[title={Will all animals come in stages of development?}]
         \startcombination [3*1]
-            {\scale[width=.3\textwidth]{\emoji\char"1F423}} {\type{U+1F423}: hatching chick}
-            {\scale[width=.3\textwidth]{\emoji\char"1F424}} {\type{U+1F424}: baby chick}
-            {\scale[width=.3\textwidth]{\emoji\char"1F425}} {\type{U+1F425}: front-facing baby chick}
+            {\scale[width=.3\textwidth]{\Emoji\char"1F423}} {\type{U+1F423}: hatching chick}
+            {\scale[width=.3\textwidth]{\Emoji\char"1F424}} {\type{U+1F424}: baby chick}
+            {\scale[width=.3\textwidth]{\Emoji\char"1F425}} {\type{U+1F425}: front-facing baby chick}
         \stopcombination
     \stopplacefigure
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-formats.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-formats.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-formats.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \startcomponent fonts-formats
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-hooks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-hooks.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-hooks.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \startcomponent fonts-hooks
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \startcomponent fonts-introduction
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-lookups.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-lookups.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-lookups.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \startcomponent fonts-lookups
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-math.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-math.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-math.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 % todo:
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-methods.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-methods.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-methods.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \startcomponent fonts-methods
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-modes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-modes.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-modes.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \definefontfeature
   [otftracker-husayni]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-scripts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-scripts.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-scripts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \startcomponent fonts-scripts
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-tricks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-tricks.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/fonts/fonts-tricks.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/fonts
 
 \startcomponent fonts-tricks
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/graphics/graphics.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/graphics/graphics.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/graphics/graphics.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/graphics
 
 \usemodule[article-basic]
 \usemodule[abbreviations-smallcaps]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-backend.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-backend.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-backend.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-backends
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-bidi.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-bidi.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-bidi.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-inserts
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-callbacks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-callbacks.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-callbacks.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-callbacks
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-characters.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-characters.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-characters.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-characters
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-codebase.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-codebase.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-codebase.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-lexing
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-contents.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-contents.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-contents
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-ebooks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-ebooks.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-ebooks.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-ebooks
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-export.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-export.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-export.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startluacode
     job.files.context(dir.glob("exported-*.tex"),"--directives=structures.export.lessstate")

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-fontnames.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-fontnames.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-fontnames.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-fontnames
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-glocal.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-glocal.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-glocal.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-glocal
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-goodies.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-goodies.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-goodies.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \usetypescriptfile[type-husayni]
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-inserts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-inserts.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-inserts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-inserts
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-intermezzo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-intermezzo.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-intermezzo.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% engine=luatex language=uk
+% language=us
 
 \startcomponent hybrid-intermezzo
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-languages
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-italics.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-italics.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-italics.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 % \enabletrackers[typesetters.italics]
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-jit.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-jit.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-jit.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk engine=luatex
+% language=us
 
 \startcomponent hybrid-backends
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-languages.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-languages.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-languages.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% engine=luatex language=uk
+% language=us
 
 \startcomponent hybrid-languages
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-math.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-math.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-math.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-math
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-mathml.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-mathml.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-mathml.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 % \enabletrackers[structures.export]
 % \setupbackend[export=yes]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-merge.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-merge.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-merge.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-merge
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-mkvi.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-mkvi.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-mkvi.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-mkvi
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-optimize.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-optimize.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-optimize.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-optimize
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-parbuilder.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-parbuilder.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-parbuilder.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-parbuilder
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-partests.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-partests.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-partests.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 % green  -> more
 % yellow -> less

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-tags.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-tags.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-tags.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-tags
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-titlepage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-titlepage.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-titlepage.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-titlepage
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-weird.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-weird.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid-weird.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent hybrid-backends
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/hybrid/hybrid.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,5 +1,5 @@
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-actions.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-actions.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-actions.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-annotations.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-annotations.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-annotations.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-attachments.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-attachments.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-attachments.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 % Written while intermittently watching those always positive "Walk off the Earth"
 % videos to keep me in the mood. They make what's normally not my kind of music

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-bookmarks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-bookmarks.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-bookmarks.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-buttons.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-buttons.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-buttons.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -89,7 +89,7 @@
 worry about passing dimensions.
 
 It is possible to define more complex buttons, like roll|-|over buttons or
-buttons that change appearance when you clock on them. These are more resource
+buttons that change appearance when you click on them. These are more resource
 hungry and also depend on the viewer. These will discussed in the chapter about
 widgets.
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-contents.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-contents.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-enabling.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-enabling.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-enabling.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-hyperlinks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-hyperlinks.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-hyperlinks.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-importing.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-importing.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-importing.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-javascript.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-javascript.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-javascript.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-structure.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-structure.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-structure.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-tagging.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-tagging.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-tagging.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-titlepage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-titlepage.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-titlepage.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-transitions.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-transitions.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/interaction/interaction-transitions.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \environment interaction-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-appendix.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-appendix.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-appendix.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/languages
 
 \startcomponent languages-appendix
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-basics.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-basics.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-basics.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/languages
 
 \startcomponent languages-basics
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-environment.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-environment.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-environment.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/languages
+
 \startenvironment languages-environment
 
     \environment manuals-explaining-environment

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-goodies.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-goodies.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-goodies.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent languages-goodies
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-hyphenation.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-hyphenation.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-hyphenation.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/languages
 
 \startcomponent languages-hyphenation
 
@@ -871,6 +871,56 @@
 
 \stopsection
 
+\startsection[title=Neat tricks]
+
+The following two examples are for users to test. The first one shows all hyphenation
+points in a paragraph:
+
+\starttyping
+\bgroup
+    \setupalign[flushright]
+    \hyphenpenalty-100000
+    \input tufte
+    \par % force hyphenation
+\egroup
+\stoptyping
+
+The second one shows the cases where a hyphenated word ends a page:
+
+\starttyping
+\bgroup
+    \page
+    \interlinepenalty10000
+    \brokenpenalty-10000
+    \input tufte
+    \page
+\egroup
+\stoptyping
+
+A less space consuming variant of that one is:
+
+\starttyping
+\bgroup
+    \setbox\scratchboxone\vbox \bgroup
+        \interlinepenalty10000
+        \brokenpenalty-10000
+        \input tufte
+    \egroup
+    \doloop {
+        \ifvoid\scratchboxone
+            \hrule
+            \exitloop
+        \else
+            \setbox\scratchboxtwo\vsplit\scratchboxone to 1pt
+            \hrule
+            \unvbox\scratchboxtwo
+        \fi
+    }
+\egroup
+\stoptyping
+
+\stopsection
+
 \stopchapter
 
 \stopcomponent

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/languages
 
 \startcomponent languages-introduction
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-labels.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-labels.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-labels.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/languages
 
 \startcomponent languages-labels
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us runpath=texruns:manuals/languages
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution
@@ -56,6 +56,7 @@
         \component languages-typesetting
         \component languages-goodies
         \component languages-sorting
+        \component languages-options
     \stopbodymatter
 
     \startappendices

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-numbering.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-numbering.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-numbering.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us
 
 \startcomponent languages-numbering
 

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-options.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-options.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-options.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,424 @@
+% language=us
+
+\startcomponent languages-options
+
+\environment languages-environment
+
+\startchapter[title=Options][color=darkblue]
+
+\startsection[title=Introduction]
+
+Hyphenation of words is controlled by so called patterns. They take a word and
+try to match parts with a pattern that describes where a hyphen can be injected.
+Preferred and discouraged injection points accumulate to a score that in the end
+determine where so called discretionary nodes gets injected in the list of
+glyphs that make a word. The patterns are language specific.
+
+This mechanism is agnostic when it comes to the characters involved: they are
+just numbers. However, when in a next step font features like ligature building
+and kerning are applied we also have to deal with language specific properties
+(and meanings). Often a ligature at the boundary of a composed word can make
+reading confusing and has to be avoided. Some of that can be controlled by the
+font when it implements language specific features but because that approach is
+not based on a dictionary it is more about playing safe and prevention than about
+quality.
+
+In the next sections a mechanism is discussed that also uses patterns. This time
+it is about controlling fonts as well as how hyphenation patterns are applied.
+This process kicks in before hyphenation is applied but it definitely has to be
+seen as part of that same process. It is integrated in hyphenation machinery and
+acts as preprocessor with the possibility to feedback and move forward. The
+implementation is such that when it's not used there is no performance penalty.
+\footnote {There are by now plenty of alternative approaches to these problems
+but after some discussion about the pro's and cons of each this new mechanism was
+made. I admit that the fun factor played a role. It is also one of the things we
+can do in \LUAMETATEX\ without worrying about a possible negative impact on
+\LUATEX\ users other than \CONTEXT .}
+
+There are several predefined operations that are characterized by keywords and
+shortcuts and collected in an option list that is part of a language goodie file.
+Examples can be found in the distribution in files with the suffix \type {llg}
+(\LUA\ language goodie). The framework of such a file is:
+
+\starttyping
+return {
+    name       = "whatever",
+    version    = "1.00",
+    comment    = "Goodies for experiments and demo.",
+    author     = "Hans Hagen",
+    copyright  = "ConTeXt development team",
+    options    = {
+        { ... },
+        ........
+        { ... },
+    }
+}
+\stoptyping
+
+These options will eventually result in patterns that are bound to words,
+think of:
+
+\starttabulate[|T||||]
+\NC effe     \NC \type {foo|bar}   \NC \type {..|..}     \NC inhibit ligature \NC \NR
+\NC foobar   \NC \type {foo=bar}   \NC \type {...=...}   \NC inhibit kerning  \NC \NR
+\NC somemore \NC \type {some+more} \NC \type {....+....} \NC compound word    \NC \NR
+\stoptabulate
+
+The whole repertoire is:
+
+\starttabulate[||T|]
+\NC \type {a|b} \NC a:norightligature, b:noleftligature \NC \NR
+\NC \type {a=b} \NC a:norightkern, b:noleftkern         \NC \NR
+\NC \type {a<b} \NC b:noleftkern                        \NC \NR
+\NC \type {a>b} \NC a:norightkern                       \NC \NR
+\NC \type {a+b} \NC a:compound:b                        \NC \NR
+\stoptabulate
+
+Later we will see how some can be combined. An option can be defined using entries
+in a subtable:
+
+\starttabulate[|T|||]
+\NC patterns   \NC hash            \NC \type {[snippet] = "replacement pattern"} \NC \NR
+\NC words      \NC string          \NC string of words, separated by whitespace \NC \NR
+\NC prefixes   \NC string          \NC snippets that combine with words (at the start) \NC \NR
+\NC suffixes   \NC string          \NC snippets that combine with words (at the end) \NC \NR
+\NC matches    \NC array or number \NC a number or table indicating which match matters \NC \NR
+\NC actions    \NC hash            \NC \type {[character] = "action(s)"} \NC \NR
+\NC characters \NC string          \NC permitted characters (additional hjcodes) \NC \NR
+\NC return     \NC integer         \NC what to do next \NC \NR
+\stoptabulate
+
+The default return value is~2 but there are some more:
+
+\starttabulate[|T||]
+\NC 0 \NC go to the next (valid) word \NC \NR
+\NC 1 \NC restart \NC \NR
+\NC 2 \NC exceptions and after that patterns \NC \NR
+\NC 3 \NC patterns \NC \NR
+\stoptabulate
+
+There are some safeguards built in that force a restart. For instance when a word
+is replaced a restart is enforces unless we skip the word. A restart will not
+permit a second replacement (after all we need to avoid endless loops).
+
+In a multi|-|line word list, lines that start with a comment trigger: \LUA's
+double dash or the usual \TEX\ percent sign.
+
+\stopsection
+
+\startsection[title=Inhibiting]
+
+The next definition replaces \type {ff} by \type {f|f} in the words given and
+eventually block a ligature.
+
+\starttyping
+{
+    patterns = {
+        ff  = "f|f",
+    },
+    words = [[
+        effe
+    ]],
+}
+\stoptyping
+
+Some fonts provide the \type {ij} ligature or do some special kerning between
+these characters (something Dutch). Because it depends on the font logic if a
+dedicated replacement or kerning is used this is an example where we do this:
+
+\starttyping
+{
+    patterns = {
+        ij = "i|j",
+    },
+    actions = {
+        ["|"] = "nokern noligature",
+    },
+    words = [[
+        ijverig
+     -- fijn -- to ligature fi or ij, that's the question
+    ]],
+}
+\stoptyping
+
+A more extensive definition is the following. Here we explicitly define that only
+the first match in a word get treated. Here we not only block ligatures but also
+kerns.
+
+\starttyping
+{
+    patterns = {
+        ff  = "f|f",
+    },
+    matches = { 1 },
+    actions = {
+        ["|"] = "noligature nokern"
+    },
+    words = [[
+        effe
+        effeffe
+    ]],
+}
+\stoptyping
+
+You can also omit the pattern when you inject specifiers yourself:
+
+\starttyping
+{
+    actions = {
+        ["|"] = "noligature nokern"
+    },
+    words = [[
+        ef|fe
+        ef|fef|fe
+    ]],
+}
+\stoptyping
+
+You can also use different shortcuts:
+
+\starttyping
+{
+    actions = {
+        ["1"] = "noligature"
+        ["2"] = "nokern"
+    },
+    words = [[
+        ef1fe
+        ef1fef2fe
+    ]],
+}
+\stoptyping
+
+Although I cannot come up with a nice example, there can be reasons for
+inhibiting kerns. Here we inhibit kerns left of the upcoming character:
+
+\starttyping
+{
+    patterns = {
+        fo = "f<o",
+        rm = "r<m",
+    },
+    words = [[
+        information
+    ]],
+}
+\stoptyping
+
+And here we inhibit kerns left of the previous and upcoming character:
+
+\starttyping
+{
+    patterns = {
+        th = "t=h",
+    },
+    words = [[
+        thrive
+    ]],
+}
+\stoptyping
+
+Just look in the files in the distribution for realistic examples, like
+
+\starttyping
+{
+    patterns = {
+        fi = "f|i",
+    },
+    words = [[
+        deafish dwarfish elfish oafish selfish
+    ]],
+    suffixes = [[
+        ness ly
+    ]]
+}
+\stoptyping
+
+where we block ligatures in 15 words. There's also a \type {prefixes} key.
+
+\stopsection
+
+\startsection[title=Replacements]
+
+Replacements are probably not used that much but here is one for German. Not
+only is the uppercase variant of ß seldom used, many fonts don't provide it
+so we can best replace it:
+
+\starttyping
+{
+    characters = "ẞ", -- uppercase ß, not visible in all verbatim fonts
+    patterns   = {
+        ["ẞ"] = "SS", -- key is uppercase ß
+    },
+}
+\stoptyping
+
+Here we define that character as valid, something that normally is done with the
+patterns but patterns don't have them. If we do not specify it here, the
+hyphenator will skip this word. For the record: this can also be done with a font
+feature that decomposes the character.
+
+\stopsection
+
+\startsection[title=Compound words]
+
+You might want to suppress ligatures and maybe even kerning when compound words
+are involved.
+
+\starttyping
+{
+    patterns = {
+        ff = "f+f",
+    },
+    words = [[
+        aaaaffaaaa
+        bbffbb
+    ]],
+}
+\stoptyping
+
+Again you can also say:
+
+\starttyping
+{
+    words = [[
+        aaaaf|faaaa
+        bbf|fbb
+    ]],
+}
+\stoptyping
+
+But patterns make sense when you have a large list (that might come from some
+other source than yourself).
+
+The next specification will turn two times three \type {bla}'s into a compound
+word but also make sure that we have at least 4 characters left and right of a
+potential break.
+
+\starttyping
+    {
+        left  = 4,
+        right = 4,
+        words = [[
+            blablabla+blablabla
+        ]],
+    }
+\stoptyping
+
+\stopsection
+
+\startsection[title=Performance]
+
+Although these mechanisms introduce overhead, the performance hit in \LMTX\ is
+not that large. This is because the number of words in a document is limited and
+\LUA\ is fast enough.
+
+\stopsection
+
+\startsection[title=Plugins]
+
+{\em This interface is preliminary but for the record I put an example here
+anyway.}
+
+\starttyping
+local n = 0
+function document.myhack(original)
+    n = n + 1
+    print(n,original)
+    return original
+end
+
+languages.installhandler("de","document.myhack")
+\stoptyping
+
+One can manipulate a text as in:
+
+\starttyping
+function document.myhack(original)
+    local t = utf.split(original)
+    local t = table.reverse(t)
+    local f = t[#t]
+    local l = t[1]
+    if characters.upper(f) == f then
+        t[1]  = characters.upper()
+        t[#t] = characters.lower(f)
+    end
+    local original = table.concat(t)
+    return original
+end
+
+languages.installhandler("en","document.myhack")
+\stoptyping
+
+The text will fed again into the hyphenator and treated in the normal way. There
+are some safeguards against the text being processed twice.
+
+\stopsection
+
+\startsection[title=Tracing]
+
+You can also embed definitions in the source file:
+
+\starttyping
+\startlanguageoptions[de]
+    Zapf|innovation
+\stoplanguageoptions
+\stoptyping
+
+\stopsection
+
+\startsection[title=Exceptions]
+
+When you set exceptions in a goodie file, it will use the plugin mechanism to
+check for them. This is a bit more efficient than using the internal checkerm
+which actually also goes via a\LUA\ hash.
+
+\starttyping
+{
+    exceptions = [[
+        a-very{-}{-}{w}eird{1}{2}{3}(w)ord
+    ]],
+}
+\stoptyping
+
+Watch out: when you specify a discretionary replacement three braced valued are
+passed: the pre, post and replace text. The replace text is used in the lookup,
+unless you add a string between parentheses, which then will be used instead. A
+digit between bracket will apply a penalty according to the following logic (in
+the engine): A zero digit results in \type {\hyphenpenalty}, otherwise the
+digits~1 upto~9 will be used as multiplier for \type {\exceptionpenalty} when
+that value is larger than 100000, otherwise \type {\exceptionpenalty} is used.
+
+\stopsection
+
+\startsection[title=Tracing]
+
+The following tracker can be used:
+
+\starttyping
+\enabletrackers[languages.goodies]
+\stoptyping
+
+In addition the style \type {languages-goodies} implements some tracing options.
+You can just run that one to see what it does.
+
+The engine itself has also a tracing option: \type {\tracinghyphenation}. When
+set to zero nothing is shown, when set to one redundant patterns will be
+reported. A value of two reports what words get fed into the hyphenator and if
+they got hyphenated. A value of three gives more detail: when a word gets
+hyphenated the relevant (resulting) part of the node list is shown. You need to
+set \type {\tracingonline} to a value larger than zero to get this reported to
+the console. Expects lots of extra output to the console for large documents but
+it can be revealing.
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent
+
+%D Musical timestamp: end Match 2021: running into Joe Parrish's amazing
+%D interpretation of Stravinsky's "Rite of Spring" on guitars.
+%D
+%D Also on YT: The Rite of Spring by London Symphony Orchestra (conducted
+%D by Simon Rattle).


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-options.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-sorting.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-sorting.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/languages/languages-sorting.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/languages
 
 \startcomponent languages-sorting
 
@@ -292,8 +292,6 @@
 
 \getbuffer
 
-\stoptext
-
 \stopsection
 
 \stopchapter

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/libraries/ecmascript-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/libraries/ecmascript-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/libraries/ecmascript-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=us
+% language=us runpath=texruns:manuals/libraries
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/libraries/libraries-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/libraries/libraries-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/libraries/libraries-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us runpath=texruns:manuals/libraries
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-alignments.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-alignments.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-alignments.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,830 @@
+% language=us runpath=texruns:manuals/lowlevel
+
+\startcomponent lowlevel-alignments
+
+\environment lowlevel-style
+
+\startdocument
+  [title=alignments,
+   color=middlegreen]
+
+\startsectionlevel[title=Introduction]
+
+\TEX\ has a couple of subsystems and alignments is one of them. This mechanism is
+used to construct tables or alike. Because alignments use low level primitives to
+set up and construct a table, and because such a setup can be rather extensive, in
+most cases users will rely on macros that hide this.
+
+\startbuffer
+\halign {
+        \alignmark\hss \aligntab
+    \hss\alignmark\hss \aligntab
+    \hss\alignmark     \cr
+    1.1     \aligntab 2,2     \aligntab 3=3     \cr
+    11.11   \aligntab 22,22   \aligntab 33=33   \cr
+    111.111 \aligntab 222,222 \aligntab 333=333 \cr
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+That one doesn't look too complex and comes out as:
+
+\blank\getbuffer\blank
+
+This is how the previous code comes out when we use one of the \CONTEXT\ table
+mechanism.
+
+\startbuffer
+\starttabulate[|l|c|r|]
+  \NC 1.1     \NC 2,2     \NC 3=3     \NC \NR
+  \NC 11.11   \NC 22,22   \NC 33=33   \NC \NR
+  \NC 111.111 \NC 222,222 \NC 333=333 \NC \NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\blank\getbuffer\blank
+
+That one looks a bit different with respect to spaces, so let's go back to the
+low level variant:
+
+\startbuffer
+\halign {
+        \alignmark\hss \aligntab
+    \hss\alignmark\hss \aligntab
+    \hss\alignmark     \cr
+  1.1\aligntab     2,2\aligntab     3=3\cr
+  11.11\aligntab   22,22\aligntab   33=33\cr
+  111.111\aligntab 222,222\aligntab 333=333\cr
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+Here we don't have spaces in the content part and therefore also no spaces in the
+result:
+
+\blank\getbuffer\blank
+
+You can automate dealing with unwanted spacing:
+
+\startbuffer
+\halign {
+      \ignorespaces\alignmark\unskip\hss \aligntab
+  \hss\ignorespaces\alignmark\unskip\hss \aligntab
+  \hss\ignorespaces\alignmark\unskip     \cr
+  1.1     \aligntab 2,2     \aligntab 3=3     \cr
+  11.11   \aligntab 22,22   \aligntab 33=33   \cr
+  111.111 \aligntab 222,222 \aligntab 333=333 \cr
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+We get:
+
+\blank\getbuffer\blank
+
+By moving the space skipping and cleanup to the so called preamble we don't need
+to deal with it in the content part. We can also deal with inter|-|column spacing
+there:
+
+\startbuffer
+\halign {
+      \ignorespaces\alignmark\unskip\hss \tabskip 1em \aligntab
+  \hss\ignorespaces\alignmark\unskip\hss \tabskip 1em \aligntab
+  \hss\ignorespaces\alignmark\unskip     \tabskip 0pt \cr
+  1.1     \aligntab 2,2     \aligntab 3=3     \cr
+  11.11   \aligntab 22,22   \aligntab 33=33   \cr
+  111.111 \aligntab 222,222 \aligntab 333=333 \cr
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\blank\getbuffer\blank
+
+If for the moment we forget about spanning columns (\type {\span}) and locally
+ignoring preamble entries (\type {\omit}) these basic commands are not that
+complex to deal with. Here we use \type {\alignmark} but that is just a primitive
+that we use instead of \type {#} while \type {\aligntab} is the same as \type
+{&}, but using the characters instead also assumes that they have the catcode
+that relates to a parameter and alignment tab (and in \CONTEXT\ that is not the
+case). The \TEX book has plenty alignment examples so if you really want to learn
+about them, consult that must|-|have|-|book.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Between the lines]
+
+The individual rows of a horizontal alignment are treated as lines. This means that,
+as we see in the previous section, the interline spacing is okay. However, that also
+means that when we mix the lines with rules, the normal \TEX\ habits kick in. Take
+this:
+
+\startbuffer
+\halign {
+      \ignorespaces\alignmark\unskip\hss \tabskip 1em \aligntab
+  \hss\ignorespaces\alignmark\unskip\hss \tabskip 1em \aligntab
+  \hss\ignorespaces\alignmark\unskip     \tabskip 0pt \cr
+  \noalign{\hrule}
+  1.1     \aligntab 2,2     \aligntab 3=3     \cr
+  \noalign{\hrule}
+  11.11   \aligntab 22,22   \aligntab 33=33   \cr
+  \noalign{\hrule}
+  111.111 \aligntab 222,222 \aligntab 333=333 \cr
+  \noalign{\hrule}
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The result doesn't look pretty and actually, when you see documents produced by
+\TEX\ using alignments you should not be surprised to notice rather ugly spacing.
+The user (or the macropackage) should deal with that explicitly, and this is not
+always the case.
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+The solution is often easy:
+
+\startbuffer
+\halign {
+      \ignorespaces\strut\alignmark\unskip\hss \tabskip 1em \aligntab
+  \hss\ignorespaces\strut\alignmark\unskip\hss \tabskip 1em \aligntab
+  \hss\ignorespaces\strut\alignmark\unskip     \tabskip 0pt \cr
+  \noalign{\hrule}
+  1.1     \aligntab 2,2     \aligntab 3=3     \cr
+  \noalign{\hrule}
+  11.11   \aligntab 22,22   \aligntab 33=33   \cr
+  \noalign{\hrule}
+  111.111 \aligntab 222,222 \aligntab 333=333 \cr
+  \noalign{\hrule}
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+The user will not notice it but alignments put some pressure on the general \TEX\
+scanner. Actually, the scanner is either scanning an alignment or it expects
+regular text (including math). When you look at the previous example you see
+\type {\noalign}. When the preamble is read, \TEX\ will pick up rows till it
+finds the final brace. Each row is added to a temporary list and the \type
+{\noalign} will enter a mode where other stuff gets added to that list. It all
+involves subtle look ahead but with minimal overhead. When the whole alignment is
+collected a final pass over that list will package the cells and rows (lines) in
+the appropriate way using information collected (like the maximum width of a cell
+and width of the current cell. It will also deal with spanning cells then.
+
+So let's summarize what happens:
+
+\startitemize[n,packed]
+\startitem
+    scan the preamble that defines the cells (where the last one is repeated
+    when needed)
+\stopitem
+\startitem
+    check for \type {\cr}, \type {\noalign} or a right brace; when a row is
+    entered scan for cells in parallel the preamble so that cell specifications
+    can be applied (then start again)
+\stopitem
+\startitem
+    package the preamble based on information with regards to the cells in
+    a column
+\stopitem
+\startitem
+    apply the preamble packaging information to the columns and also deal with
+    pending cell spans
+\stopitem
+\startitem
+    flush the result to the current list, unless packages in a box a \type
+    {\halign} is seen as paragraph and rows as lines (such a table can split)
+\stopitem
+\stopitemize
+
+The second (repeated) step is complicated by the fact that the scanner has to
+look ahead for a \type {\noalign}, \type {\cr}, \type {\omit} or \type {\span}
+and when doing that it has to expand what comes. This can give side effects and
+often results in obscure error messages. When for instance an \type {\if} is seen
+and expanded, the wrong branch can be entered. And when you use protected macros
+embedded alignment commands are not seen at all; of course they still need to
+produce valid operations in the current context.
+
+All these side effects are to be handled in a macro package when it wraps
+alignments in a high level interface and \CONTEXT\ does that for you. But because
+the code doesn't always look pretty then, in \LUAMETATEX\ the alignment mechanism
+has been extended a bit over time.
+
+Nesting \type {\noalign} is normally not permitted (but one can redefine this
+primitive such that a macro package nevertheless handles it). The first extension
+permits nested usage of \type {\noalign}. This has resulted of a little
+reorganization of the code. A next extension showed up when overload protection
+was introduced and extra prefixes were added. We can signal the scanner that a
+macro is actually a \type {\noalign} variant: \footnote {One can argue for using
+the name \type {\peekaligned} because in the meantime other alignment primitives
+also can use this property.}
+
+\starttyping[option=TEX]
+\noaligned\protected\def\InBetween{\noalign{...}}
+\stoptyping
+
+Here the \type {\InBetween} macro will get the same treatment as \type {\noalign}
+and it will not trigger an error. This extension resulted in a second bit of
+reorganization (think of internal command codes and such) but still the original
+processing of alignments was there.
+
+A third overhaul of the code actually did lead to some adaptations in the way
+alignments are constructed so let's move on to that.
+
+\stopsectionlevel
+
+\startsectionlevel[title={Pre-, inter- and post-tab skips}]
+
+The basic structure of a preamble and row is actually not that complex: it is
+a mix of tab skip glue and cells (that are just boxes):
+
+\startbuffer
+\tabskip 10pt
+\halign {
+  \strut\alignmark\tabskip 12pt\aligntab
+  \strut\alignmark\tabskip 14pt\aligntab
+  \strut\alignmark\tabskip 16pt\cr
+  \noalign{\hrule}
+  cell 1.1\aligntab cell 1.2\aligntab cell 1.3\cr
+  \noalign{\hrule}
+  cell 2.1\aligntab cell 2.2\aligntab cell 2.3\cr
+  \noalign{\hrule}
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The tab skips are set in advance and apply to the next cell (or after the last
+one).
+
+\startbuffer[blownup-1]
+\startlinecorrection
+{\showmakeup[glue]\scale[width=\textwidth]{\vbox{\getbuffer}}}
+\stoplinecorrection
+\stopbuffer
+
+\getbuffer[blownup-1]
+
+% \normalizelinemode \zerocount % \discardzerotabskipsnormalizecode
+
+In the \CONTEXT\ table mechanisms the value of \type {\tabskip} is zero
+in most cases. As in:
+
+\startbuffer
+\tabskip 0pt
+\halign {
+  \strut\alignmark\aligntab
+  \strut\alignmark\aligntab
+  \strut\alignmark\cr
+  \noalign{\hrule}
+  cell 1.1\aligntab cell 1.2\aligntab cell 1.3\cr
+  \noalign{\hrule}
+  cell 2.1\aligntab cell 2.2\aligntab cell 2.3\cr
+  \noalign{\hrule}
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+When these ships are zero, they still show up in the end:
+
+\getbuffer[blownup-1]
+
+Normally, in order to achieve certain effects there will be more align entries in
+the preamble than cells in the table, for instance because you want vertical
+lines between cells. When these are not used, you can get quite a bit of empty
+boxes and zero skips. Now, of course this is seldom a problem, but when you have
+a test document where you want to show font properties in a table and that font
+supports a script with some ten thousand glyphs, you can imagine that it
+accumulates and in \LUATEX\ (and \LUAMETATEX) nodes are larger so it is one of
+these cases where in \CONTEXT\ we get messages on the console that node memory is
+bumped. \footnote {I suppose it was a coincidence that a few weeks after these
+features came available a user consulted the mailing list about a few thousand
+page table that made the engine run out of memory, something that could be cured
+by enabling these new features.}
+
+After playing a bit with stripping zero tab skips I found that the code would not
+really benefit from such a feature: lots of extra tests made it quite ugly. As a
+result a first alternative was to just strip zero skips before an alignment got
+flushed. At least we're then a bit leaner in the processes that come after it.
+This feature is now available as one of the normalizer bits.
+
+But, as we moved on, a more natural approach was to keep the skips in the
+preamble, because that is where a guaranteed alternating skip|/|box is assumed.
+It also makes that the original documentation is still valid. However, in the
+rows construction we can be lean. This is driven by a keyword to \type {\halign}:
+
+\startbuffer
+\tabskip 0pt
+\halign noskips {
+  \strut\alignmark\aligntab
+  \strut\alignmark\aligntab
+  \strut\alignmark\cr
+  \noalign{\hrule}
+  cell 1.1\aligntab cell 1.2\aligntab cell 1.3\cr
+  \noalign{\hrule}
+  cell 2.1\aligntab cell 2.2\aligntab cell 2.3\cr
+  \noalign{\hrule}
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+No zero tab skips show up here:
+
+\getbuffer[blownup-1]
+
+When playing with all this the \LUAMETATEX\ engine also got a tracing option for
+alignments. We already had one that showed some of the \type{\noalign} side
+effects, but showing the preamble was not yet there. This is what \typ
+{\tracingalignments = 2} results in:
+
+% {\tracingalignments2 \setbox0\vbox{\getbuffer}}
+
+\starttyping[option=TEX]
+<preamble>
+\glue[ignored][...] 0.0pt
+\alignrecord
+..{\strut }
+..<content>
+..{\endtemplate }
+\glue[ignored][...] 0.0pt
+\alignrecord
+..{\strut }
+..<content>
+..{\endtemplate }
+\glue[ignored][...] 0.0pt
+\alignrecord
+..{\strut }
+..<content>
+..{\endtemplate }
+\glue[ignored][...] 0.0pt
+\stoptyping
+
+The \type {ignored} subtype is (currently) only used for these alignment tab
+skips and it triggers a check later on when the rows are constructed. The \type
+{<content>} is what get injected in the cell (represented by \type {\alignmark}).
+The pseudo primitives are internal and not public.
+
+\stopsectionlevel
+
+\startsectionlevel[title={Cell widths}]
+
+Imagine this:
+
+\startbuffer
+\halign {
+  x\hbox to 3cm{\strut    \alignmark\hss}\aligntab
+  x\hbox to 3cm{\strut\hss\alignmark\hss}\aligntab
+  x\hbox to 3cm{\strut\hss\alignmark    }\cr
+  cell 1.1\aligntab cell 1.2\aligntab cell 1.3\cr
+  cell 2.1\aligntab cell 2.2\aligntab cell 2.3\cr
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+which renders as:
+
+\startbuffer[blownup-2]
+\startlinecorrection
+{\showboxes\scale[width=\textwidth]{\vbox{\getbuffer}}}
+\stoplinecorrection
+\stopbuffer
+
+{\showboxes\getbuffer[blownup-2]}
+
+A reason to have boxes here is that it enforces a cell width but that is done at
+the cost of an extra wrapper. In \LUAMETATEX\ the \type {hlist} nodes are rather
+large because we have more options than in original \TEX, for instance offsets
+and orientation. In a table with 10K rows of 4 cells yet get 40K extra \type
+{hlist} nodes allocated. Now, one can argue that we have plenty of memory but
+being lazy is not really a sign of proper programming.
+
+\startbuffer
+\halign {
+  x\tabsize 3cm\strut    \alignmark\hss\aligntab
+  x\tabsize 3cm\strut\hss\alignmark\aligntab
+  x\tabsize 3cm\strut\hss\alignmark\hss\cr
+  cell 1.1\aligntab cell 1.2\aligntab cell 1.3\cr
+  cell 2.1\aligntab cell 2.2\aligntab cell 2.3\cr
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+If you look carefully you will see that this time we don't have the embedded
+boxes:
+
+{\showboxes\getbuffer[blownup-2]}
+
+So, both the sparse skip and new \type {\tabsize} feature help to make these
+extreme tables (spanning hundreds of pages) not consume irrelevant memory and
+also make that later on we don't have to consult useless nodes.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Plugins]
+
+Yet another \LUAMETATEX\ extension is a callback that kicks in between the
+preamble preroll and finalizing the alignment. Initially as test and
+demonstration a basic character alignment feature was written but that works so
+well that in some places it can replace (or compliment) the already existing
+features in the \CONTEXT\ table mechanisms.
+
+\startbuffer
+\starttabulate[|lG{.}|cG{,}|rG{=}|cG{x}|]
+\NC 1.1     \NC 2,2     \NC 3=3     \NC a 0xFF   \NC \NR
+\NC 11.11   \NC 22,22   \NC 33=33   \NC b 0xFFF  \NC \NR
+\NC 111.111 \NC 222,222 \NC 333=333 \NC c 0xFFFF \NC \NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The tabulate mechanism in \CONTEXT\ is rather old and stable and it is the
+preferred way to deal with tabular content in the text flow. However, adding the
+\type {G} specifier (as variant of the \type {g} one) could be done without
+interference or drop in performance. This new \type {G} specifier tells the
+tabulate mechanism that in that column the given character is used to vertically
+align the content that has this character.
+
+\blank\getbuffer\blank
+
+Let's make clear that this is {\em not} an engine feature but a \CONTEXT\ one. It
+is however made easy by this callback mechanism. We can of course use this feature
+with the low level alignment primitives, assuming that you tell the machinery that
+the plugin is to be kicked in.
+
+\startbuffer
+\halign noskips \alignmentcharactertrigger \bgroup
+    \tabskip2em
+        \setalignmentcharacter.\ignorespaces\alignmark\unskip\hss \aligntab
+    \hss\setalignmentcharacter,\ignorespaces\alignmark\unskip\hss \aligntab
+    \hss\setalignmentcharacter=\ignorespaces\alignmark\unskip     \aligntab
+    \hss                       \ignorespaces\alignmark\unskip\hss \cr
+      1.1   \aligntab   2,2   \aligntab   3=3   \aligntab \setalignmentcharacter{.}\relax 4.4\cr
+     11.11  \aligntab  22,22  \aligntab  33=33  \aligntab \setalignmentcharacter{,}\relax 44,44\cr
+    111.111 \aligntab 222,222 \aligntab 333=333 \aligntab \setalignmentcharacter{!}\relax 444!444\cr
+        x   \aligntab     x   \aligntab     x   \aligntab \setalignmentcharacter{/}\relax /\cr
+       .1   \aligntab    ,2   \aligntab    =3   \aligntab \setalignmentcharacter{?}\relax ?4\cr
+       .111 \aligntab    ,222 \aligntab    =333 \aligntab \setalignmentcharacter{=}\relax 44=444\cr
+\egroup
+\stopbuffer
+
+{\switchtobodyfont[8pt] \typebuffer[option=TEX]}
+
+This rather verbose setup renders as:
+
+\blank\getbuffer\blank
+
+Using a high level interface makes sense but local control over such alignment too, so
+here follow some more examples. Here we use different alignment characters:
+
+\startbuffer
+\starttabulate[|lG{.}|cG{,}|rG{=}|cG{x}|]
+\NC 1.1     \NC 2,2     \NC 3=3     \NC a 0xFF   \NC \NR
+\NC 11.11   \NC 22,22   \NC 33=33   \NC b 0xFFF  \NC \NR
+\NC 111.111 \NC 222,222 \NC 333=333 \NC c 0xFFFF \NC \NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+In this example we specify the characters in the cells. We still need to add a
+specifier in the preamble definition because that will trigger the plugin.
+
+\startbuffer
+\starttabulate[|lG{}|rG{}|]
+\NC left                                         \NC right                            \NC\NR
+\NC \showglyphs \setalignmentcharacter{.}1.1     \NC \setalignmentcharacter{.}1.1     \NC\NR
+\NC \showglyphs \setalignmentcharacter{,}11,11   \NC \setalignmentcharacter{,}11,11   \NC\NR
+\NC \showglyphs \setalignmentcharacter{=}111=111 \NC \setalignmentcharacter{=}111=111 \NC\NR
+\stoptabulate
+\stopbuffer
+
+{\switchtobodyfont[8pt] \typebuffer[option=TEX]} \getbuffer
+
+You can mix these approaches:
+
+\startbuffer
+\starttabulate[|lG{.}|rG{}|]
+\NC left    \NC right                            \NC\NR
+\NC 1.1     \NC \setalignmentcharacter{.}1.1     \NC\NR
+\NC 11.11   \NC \setalignmentcharacter{.}11.11   \NC\NR
+\NC 111.111 \NC \setalignmentcharacter{.}111.111 \NC\NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+Here the already present alignment feature, that at some point in tabulate might
+use this new feature, is meant for numbers, but here we can go wild with words,
+although of course you need to keep in mind that we deal with typeset text, so
+there may be no match.
+
+\startbuffer
+\starttabulate[|lG{.}|rG{.}|]
+\NC foo.bar \NC foo.bar \NC \NR
+\NC  oo.ba  \NC  oo.ba  \NC \NR
+\NC   o.b   \NC   o.b   \NC \NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+This feature will only be used in know situations and those seldom involve advanced
+typesetting. However, the following does work: \footnote {Should this be an option
+instead?}
+
+\startbuffer
+\starttabulate[|cG{d}|]
+\NC \smallcaps abcdefgh \NC \NR
+\NC              xdy    \NC \NR
+\NC \sl          xdy    \NC \NR
+\NC \tttf        xdy    \NC \NR
+\NC \tfd          d     \NC \NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+As always with such mechanisms, the question is \quotation {Where to stop?} But it
+makes for nice demos and as long as little code is needed it doesn't hurt.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Pitfalls and tricks]
+
+The next example mixes bidirectional typesetting. It might look weird at first
+sight but the result conforms to what we discussed in previous paragraphs.
+
+\startbuffer
+\starttabulate[|lG{.}|lG{}|]
+\NC \righttoleft 1.1   \NC \righttoleft \setalignmentcharacter{.}1.1   \NC\NR
+\NC              1.1   \NC              \setalignmentcharacter{.}1.1   \NC\NR
+\NC \righttoleft 1.11  \NC \righttoleft \setalignmentcharacter{.}1.11  \NC\NR
+\NC              1.11  \NC              \setalignmentcharacter{.}1.11  \NC\NR
+\NC \righttoleft 1.111 \NC \righttoleft \setalignmentcharacter{.}1.111 \NC\NR
+\NC              1.111 \NC              \setalignmentcharacter{.}1.111 \NC\NR
+\stoptabulate
+\stopbuffer
+
+{\switchtobodyfont[8pt] \typebuffer[option=TEX]} \getbuffer
+
+In case of doubt, look at this:
+
+\startbuffer
+\starttabulate[|lG{.}|lG{}|lG{.}|lG{}|]
+\NC \righttoleft 1.1   \NC \righttoleft \setalignmentcharacter{.}1.1   \NC
+                 1.1   \NC              \setalignmentcharacter{.}1.1   \NC\NR
+\NC \righttoleft 1.11  \NC \righttoleft \setalignmentcharacter{.}1.11  \NC
+                 1.11  \NC              \setalignmentcharacter{.}1.11  \NC\NR
+\NC \righttoleft 1.111 \NC \righttoleft \setalignmentcharacter{.}1.111 \NC
+                 1.111 \NC              \setalignmentcharacter{.}1.111 \NC\NR
+\stoptabulate
+\stopbuffer
+
+{\switchtobodyfont[8pt] \typebuffer[option=TEX]} \getbuffer
+
+The next example shows the effect of \type {\omit} and \type {\span}. The first one
+makes that in this cell the preamble template is ignored.
+
+\startbuffer
+\halign \bgroup
+    \tabsize 2cm\relax     [\alignmark]\hss \aligntab
+    \tabsize 2cm\relax \hss[\alignmark]\hss \aligntab
+    \tabsize 2cm\relax \hss[\alignmark]\cr
+           1\aligntab       2\aligntab       3\cr
+     \omit 1\aligntab \omit 2\aligntab \omit 3\cr
+           1\aligntab       2\span           3\cr
+           1\span           2\aligntab       3\cr
+           1\span           2\span           3\cr
+           1\span \omit     2\span \omit     3\cr
+     \omit 1\span \omit     2\span \omit     3\cr
+\egroup
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+Spans are applied at the end so you see a mix of templates applied.
+
+{\showboxes\getbuffer[blownup-2]}
+
+When you define an alignment inside a macro, you need to duplicate the \type {\alignmark}
+signals. This is similar to embedded macro definitions. But in \LUAMETATEX\ we can get
+around that by using \type {\aligncontent}. Keep in mind that when the preamble is scanned there
+is no doesn't expand with the exception of the token after \type {\span}.
+
+\startbuffer
+\halign \bgroup
+    \tabsize 2cm\relax     \aligncontent\hss \aligntab
+    \tabsize 2cm\relax \hss\aligncontent\hss \aligntab
+    \tabsize 2cm\relax \hss\aligncontent\cr
+    1\aligntab 2\aligntab 3\cr
+    A\aligntab B\aligntab C\cr
+\egroup
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\blank\getbuffer\blank
+
+In this example we still have to be verbose in the way we align but we can do this:
+
+\startbuffer
+\halign \bgroup
+    \tabsize 2cm\relax \aligncontentleft  \aligntab
+    \tabsize 2cm\relax \aligncontentmiddle\aligntab
+    \tabsize 2cm\relax \aligncontentright \cr
+    1\aligntab 2\aligntab 3\cr
+    A\aligntab B\aligntab C\cr
+\egroup
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+Where the helpers are defined as:
+
+\starttyping[option=TEX]
+\noaligned\protected\def\aligncontentleft
+  {\ignorespaces\aligncontent\unskip\hss}
+
+\noaligned\protected\def\aligncontentmiddle
+  {\hss\ignorespaces\aligncontent\unskip\hss}
+
+\noaligned\protected\def\aligncontentright
+  {\hss\ignorespaces\aligncontent\unskip}
+\stoptyping
+
+The preamble scanner see such macros as candidates for a single level expansion
+so it will inject the meaning and see the \type {\aligncontent} eventually.
+
+\blank\getbuffer\blank
+
+The same effect could be achieved by using the \type {\span} prefix:
+
+\starttyping[option=TEX]
+\def\aligncontentleft{\ignorespaces\aligncontent\unskip\hss}
+
+\halign { ... \span\aligncontentleft ...}
+\stoptyping
+
+One of the reasons for not directly using the low level \type {\halign} command is
+that it's a lot of work but by providing a set of helpers like here might change
+that a bit. Keep in mind that much of the above is not new in the sense that we
+could not achieve the same already, it's just a bit programmer friendly.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Rows]
+
+Alignment support is what the documented source calls \quote {interwoven}. When
+the engine scans for input it processing text, math or alignment content. While
+doing alignments it collects rows, and inside these cells but also deals with
+material that ends up in between. In \LUAMETATEX\ I tried to isolate the bits and
+pieces as good as possible but it remains \ complicated (for all good reasons).
+Cells as well as rows are finalized after the whole alignment has been collected
+and processed. In the end cells and rows are boxes but till we're done they are
+in an \quote {unset} state.
+
+Scanning starts with interpreting the preamble, and then grabbing rows. There is
+some nasty lookahead involved for \type {\noalign}, \type {\span}, \type {\omit},
+\type {\cr} and \type {\crcr} and that is not code one wants to tweak too much
+(although we did in \LUAMETATEX). This means for instance that adding \quote
+{let's start a row here} primitive is sort of tricky (but it might happen some
+day) which in turn means that it is not really possible to set row properties. As
+an experiment we can set some properties now by hijacking \type {\noalign} and
+storing them on the alignment stack (indeed: at the cost of some extra overhead
+and memory). This permits the following:
+
+% \theorientation{down} "002
+
+\startbuffer
+\halign {
+    \hss
+    \ignorespaces \alignmark \removeunwantedspaces
+    \hss
+    \quad \aligntab \quad
+    \hss
+    \ignorespaces \alignmark \removeunwantedspaces
+    \hss
+    \cr
+    \noalign xoffset 40pt {}
+    {\darkred   cell one}   \aligntab {\darkgray cell one}   \cr
+    \noalign orientation "002 {}
+    {\darkgreen cell one}   \aligntab {\darkblue cell one}   \cr
+    \noalign xoffset 40pt {}
+    {\darkred   cell two}   \aligntab {\darkgray cell two}   \cr
+    \noalign orientation "002 {}
+    {\darkgreen cell two}   \aligntab {\darkblue cell two}   \cr
+    \noalign xoffset 40pt {}
+    {\darkred   cell three} \aligntab {\darkgray cell three} \cr
+    \noalign orientation "002 {}
+    {\darkgreen cell three} \aligntab {\darkblue cell three} \cr
+    \noalign xoffset 40pt {}
+    {\darkred   cell four}  \aligntab {\darkgray cell four}  \cr
+    \noalign orientation "002 {}
+    {\darkgreen cell four}  \aligntab {\darkblue cell four}  \cr
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+\showmakeup[line]
+\ruledvbox{\getbuffer}
+\stoplinecorrection
+
+The supported keywords are similar to those for boxes: \type {source}, \type
+{target}, \type {anchor}, \type {orientation}, \type {shift}, \type {xoffset},
+\type {yoffset}, \type {xmove} and \type {ymove}. The dimensions can be prefixed
+by \type {add} and \type {reset} wipes all. Here is another example:
+
+\startbuffer
+\halign {
+    \hss
+    \ignorespaces \alignmark \removeunwantedspaces
+    \hss
+    \quad \aligntab \quad
+    \hss
+    \ignorespaces \alignmark \removeunwantedspaces
+    \hss
+    \cr
+    \noalign xmove 40pt {}
+    {\darkred   cell one}   \aligntab {\darkgray cell one}   \cr
+    {\darkgreen cell one}   \aligntab {\darkblue cell one}   \cr
+    \noalign xmove 20pt {}
+    {\darkred   cell two}   \aligntab {\darkgray cell two}   \cr
+    {\darkgreen cell two}   \aligntab {\darkblue cell two}   \cr
+    \noalign xmove 40pt {}
+    {\darkred   cell three} \aligntab {\darkgray cell three} \cr
+    {\darkgreen cell three} \aligntab {\darkblue cell three} \cr
+    \noalign xmove 20pt {}
+    {\darkred   cell four}  \aligntab {\darkgray cell four}  \cr
+    {\darkgreen cell four}  \aligntab {\darkblue cell four}  \cr
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+\showmakeup[line]
+\ruledvbox{\getbuffer}
+\stoplinecorrection
+
+Some more features might be added in the future as is it an interesting
+playground. It is to be seen how this ends up in \CONTEXT\ high level interfaces
+like tabulate.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Remark]
+
+It can be that the way alignments are interfaced with respect to attributes is a bit
+different between \LUATEX\ and \LUAMETATEX\ but because the former is frozen (in
+order not to interfere with current usage patterns) this is something that we will
+deal with deep down in \CONTEXT\ \LMTX.
+
+In principle we can have hooks into the rows for pre and post material but it
+doesn't really pay of as grouping will still interfere. So for now I decided not
+to add these.
+
+\stopsectionlevel
+
+\stopdocument
+
+% \hbox \bgroup
+%     \vbox \bgroup \halign \bgroup
+%         \hss\aligncontent\hss\aligntab
+%         \hss\aligncontent\hss\cr
+%         aaaa\aligntab bbbb\cr
+%         aaa\aligntab bbb\cr
+%         aa\aligntab bb\cr
+%         a\aligntab b\cr
+%         \omit\span \hss ccc\hss\cr
+%     \egroup \egroup
+%     \quad
+%     \vbox \bgroup \halign noskips \bgroup
+%         \hss\aligncontent\hss\aligntab
+%         \hss\aligncontent\hss\cr
+%         aaaa\aligntab bbbb\cr
+%         aaa\aligntab bbb\cr
+%         aa\aligntab bb\cr
+%         a\aligntab b\cr
+%         \omit\span \hss ccc\hss\cr
+%     \egroup \egroup
+% \egroup


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-alignments.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-boxes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-boxes.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-boxes.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
 % \hfil \hss
 % spread
@@ -9,7 +9,7 @@
   [title=boxes,
    color=middlered]
 
-\startsection[title=Introduction]
+\startsectionlevel[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
@@ -23,9 +23,9 @@
 This explanation will be extended when I feel the need (or users have questions
 that can be answered here).
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Boxes]
+\startsectionlevel[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
@@ -66,12 +66,10 @@
 penalties, rules, boxes, etc. It is a container with properties like width,
 height, depth and shift.
 
-\stopsection
+\stopsectionlevel
 
-\stopsection
+\startsectionlevel[title={\TEX\ primitives}]
 
-\startsection[title={\TEX\ primitives}]
-
 The box model is reflected in \TEX's user interface but not by that many
 commands, most noticeably \type {\hbox}, \type {\vbox} and \type {\vtop}. Here is
 an example of the first one:
@@ -143,9 +141,30 @@
 {\dontcomplain\showboxes\getbuffer}
 \stoplinecorrection
 
-We have three kind of boxes: \type {\hbox}, \type {\vbox} and \type {\vtop}:
+Instead of \type {\raise} you can also provide the shift (up or down) with a
+keyword:
 
 \startbuffer
+\ruledhbox\bgroup
+    x\raise  5pt\ruledhbox            {1}x
+    x\raise-10pt\ruledhbox            {2}x
+    x\raise -5pt\ruledhbox shift -20pt{3}x
+    x\ruledhbox            shift -10pt{4}x
+\egroup
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startlinecorrection
+{\dontcomplain\showboxes\getbuffer}
+\stoplinecorrection
+
+
+We have three kind of boxes: \type {\hbox}, \type {\vbox} and \type {\vtop}.
+Actually we have a fourth type \type {\dbox} but that is a variant on \type
+{\vbox} to which we come back later.
+
+\startbuffer
 \hbox{\strut height and depth\strut}
 \vbox{\hsize 4cm \strut height and depth\par and width\strut}
 \vtop{\hsize 4cm \strut height and depth\par and width\strut}
@@ -218,9 +237,9 @@
 \box \scratchbox
 \stoptyping
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\ETEX\ primitives}]
+\startsectionlevel[title={\ETEX\ primitives}]
 
 The \ETEX\ extensions don't add something relevant for boxes, apart from that you
 can use the expressions mechanism to mess around with their dimensions. There is
@@ -229,9 +248,9 @@
 into outputting a stretch of text in the other direction. This feature is not
 available in \LUATEX\ because it has an alternative direction mechanism.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\LUATEX\ primitives}]
+\startsectionlevel[title={\LUATEX\ primitives}]
 
 The concept of boxes is the same in \LUATEX\ as in its predecessors but there are
 some aspects to keep in mind. When a box is typeset this happens in \LUATEX:
@@ -289,9 +308,9 @@
 it will be discusses in the next section. A \CONTEXT\ user is supposed to use the
 official \CONTEXT\ interfaces in order to be downward compatible.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\LUAMETATEX\ primitives}]
+\startsectionlevel[title={\LUAMETATEX\ primitives}]
 
 There are two possible directions: left to right (the default) and right to left
 for Hebrew and Arabic. Here is an example that shows how it'd done with low level
@@ -691,6 +710,202 @@
 \ruledhbox{\getbuffer}
 \stoplinecorrection
 
-\stopsection
+Where a \type {\vtop} has the baseline at the top, a \type {\vbox} has it at the
+bottom. In \LUAMETATEX\ we also have a \type {\dbox}, which is a \type {\vbox} with
+that behaves like a \type {\vtop} when it's appended to a vertical list: the height of
+the first box or rule determines the (base)line correction that gets applied. The following
+example demonstrates this:
 
+\startlinecorrection
+\startcombination [nx=3,ny=1,location=top]
+    {\vbox \bgroup \hsize .3\textwidth
+        \small\small \setupalign[tolerant,stretch] \dontcomplain
+        xxxxxxxxxxxxxxxx\par
+        \ruledvbox{\samplefile{tufte}}\par
+        xxxxxxxxxxxxxxxx\par
+     \egroup} {\type {\vbox}}
+    {\vbox \bgroup \hsize .3\textwidth
+        \small\small \setupalign[tolerant,stretch] \dontcomplain
+        xxxxxxxxxxxxxxxx\par
+        \ruledvtop{\samplefile{tufte}}\par
+        xxxxxxxxxxxxxxxx\par
+     \egroup} {\type {\vtop}}
+    {\vbox \bgroup \hsize .3\textwidth
+        \small\small \setupalign[tolerant,stretch] \dontcomplain
+        xxxxxxxxxxxxxxxx\par
+        \ruleddbox{\samplefile{tufte} }\par
+        xxxxxxxxxxxxxxxx\par
+     \egroup} {\type {\dbox}}
+\stopcombination
+\stoplinecorrection
+
+The \type {d} stands for \quote {dual} because we (sort of) have two baselines. The
+regular height and depth are those of a \type {\vbox}.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Splitting]
+
+When you feed \TEX\ a paragraph of text it will accumulate the content in a
+list of nodes. When the paragraphs is finished by \type {\par} or an empty line
+it will be fed into the par builder that will try to break the lines as good
+as possible. Normally that paragraph will be added to the page and at some point
+there can be breaks between lines in order not to overflow the page. When you
+collect the paragraph in a box you can use \type {\vsplit} to emulate this.
+
+\startbuffer[sample]
+\setbox\scratchbox\vbox{\samplefile{tufte}}
+
+\startlinecorrection
+\ruledhbox{\vsplit\scratchbox to 2\lineheight}
+\stoplinecorrection
+\stopbuffer
+
+\typebuffer[sample][option=TEX] \getbuffer[sample]
+
+The split off box is given the specified height, but in \LUAMETATEX\ you can also
+get the natural dimensions:
+
+\startbuffer[sample]
+\setbox\scratchbox\vbox{\samplefile{tufte}}
+
+\startlinecorrection
+\ruledhbox{\vsplit\scratchbox upto 2\lineheight}
+\stoplinecorrection
+\stopbuffer
+
+\typebuffer[sample][option=TEX] \getbuffer[sample]
+
+We can force a resulting box type by using \type {\vsplit}, \type {\tsplit} and
+\type {\dsplit} (here we use the visualized variants):
+
+\startbuffer[sample]
+\setbox\scratchbox\vbox{\samplefile{tufte}}
+
+\startlinecorrection
+\ruledtsplit \scratchbox upto 2\lineheight
+\stoplinecorrection
+\stopbuffer
+
+\typebuffer[sample][option=TEX] \getbuffer[sample]
+
+\startbuffer[sample]
+\setbox\scratchbox\vbox{\samplefile{tufte}}
+
+\startlinecorrection
+\ruledvsplit \scratchbox upto 2\lineheight
+\stoplinecorrection
+\stopbuffer
+
+\typebuffer[sample][option=TEX] \getbuffer[sample]
+
+\startbuffer[sample]
+\setbox\scratchbox\vbox{\samplefile{tufte}}
+
+\startlinecorrection
+\ruleddsplit \scratchbox upto 2\lineheight
+\stoplinecorrection
+\stopbuffer
+
+\typebuffer[sample][option=TEX] \getbuffer[sample]
+
+The engine provides vertical splitters but \CONTEXT\ itself also has
+a horizontal one. \footnote {At some point I might turn that one into
+a native engine primitive.}
+
+\startbuffer
+\starttexdefinition Test #1#2#3
+    \par
+    \dontleavehmode
+    \strut
+    \llap{{\infofont #2}\quad}
+    \blackrule[width=#2,color=darkblue]
+    \par
+    \setbox\scratchbox\hbox{\samplefile{#1}}
+    \hsplit\scratchbox
+        to              #2
+        depth           \strutdp
+        height          \strutht
+        shrinkcriterium #3 % badness
+    \par
+\stoptexdefinition
+
+\dostepwiserecurse {100} {120} {2} {
+    \Test{tufte}{#1mm}{1000}
+    \Test{tufte}{#1mm}{-100}
+}
+\stopbuffer
+
+\typebuffer[option=TEX] \startpacked \getbuffer \stoppacked
+
+A split off box gets packed at its natural size and a badness as well as
+overshoot amount is calculated. When the overshoot is positive and the the
+badness is larger than the stretch criterium, the box gets repacked to the
+natural size. The same happens when the overshoot is negative and the badness
+exceeds the shrink criterium. When the overshoot is zero (basically we have a
+fit) but the badness still exceeds the stretch or shrink we also repack. Indeed
+this is a bit fuzzy, but so is badness.
+
+\startbuffer
+\starttexdefinition Test #1#2#3
+    \par
+    \dontleavehmode
+    \strut
+    \llap{{\infofont #2}\quad}
+    \blackrule[width=#2,color=darkblue]
+    \par
+    \setbox\scratchbox\hbox{\samplefile{#1}}
+    \doloop {
+        \ifvoid\scratchbox
+            \exitloop
+        \else
+            \hsplit\scratchbox
+                to     #2
+                depth  \strutdp
+                height \strutht
+                #3
+            \par
+            \allowbreak
+        \fi
+    }
+\stoptexdefinition
+
+\Test{tufte}{100mm}{shrinkcriterium 1000}
+\Test{tufte}{100mm}{shrinkcriterium 0}
+\Test{tufte}{100mm}{}
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+Watch how the last line get stretched when we set the criterium to zero. I'm sure
+that users will find reasons to abuse this effect.
+
+\stopsectionlevel
+
 \stopdocument
+
+% todo:
+
+% \setbox0\hbox{\strut this is just a\footnote{oeps} test}
+% \setbox2\hbox{\strut this is just a\footnote{oeps} test}
+%
+% \setprelistbox 0\hbox{\strut \quad before: \prelistbox0}
+% \setpostlistbox0\hbox{\strut \quad after: \postlistbox0}
+%
+% \setprelistbox 2\hbox{\strut \quad before}
+% \setpostlistbox2\hbox{\strut \quad after}
+%
+% test \par \box0 \par \box2 \par test
+
+
+\setbox0\vbox
+{
+    \setbox    \scratchbox      \hbox{XXX}
+    \boxvadjust\scratchbox pre       {BBB}
+    \boxvadjust\scratchbox post      {AAA}
+%     \dontleavehmode % needed
+    \box\scratchbox
+%     \unhbox\scratchbox
+}
+
+111111\par \box0 \par 222222\par

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-characters.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-characters.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-characters.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
 \environment lowlevel-style
 
@@ -6,15 +6,15 @@
   [title=characters,
    color=middlered]
 
-\startsection[title=Introduction]
+\startsectionlevel[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
+\stopsectionlevel
 
-\startsection[title=History]
+\startsectionlevel[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
@@ -79,9 +79,9 @@
 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
+\stopsectionlevel
 
-\startsection[title=The heritage]
+\startsectionlevel[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
@@ -112,9 +112,9 @@
 encodings and also an abstract backend with respect to supported drivers but both
 approaches no longer make sense today.}
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=The \LMTX\ approach]
+\startsectionlevel[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
@@ -220,20 +220,8 @@
 Some combinations are special for \CONTEXT\ because \UNICODE\ doesn't specify
 decomposition for all composed characters.
 
-\stopsection
+\stopsectionlevel
 
-\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

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-conditionals.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-conditionals.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-conditionals.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
 \environment lowlevel-style
 
@@ -8,9 +8,9 @@
 
 \pushoverloadmode
 
-\startsection[title=Preamble]
+\startsectionlevel[title=Preamble]
 
-\startsubsection[title=Introduction]
+\startsectionlevel[title=Introduction]
 
 You seldom need the low level conditionals because there are quite some so called
 support macros available in \CONTEXT . For instance, when you want to compare two
@@ -53,9 +53,9 @@
 In due time I might add more examples and explanations. Also, maybe some more
 tests will show up as part of the \LUAMETATEX\ project.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={Number and dimensions}]
+\startsectionlevel[title={Number and dimensions}]
 
 Numbers and dimensions are basic data types in \TEX. When you enter one, a number
 is just that but a dimension gets a unit. Compare:
@@ -289,13 +289,13 @@
 are the same. Anyway, this is not different in other programming languages and
 just something you need to be aware of.
 
-\stopsubsection
+\stopsectionlevel
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\TEX\ primitives}]
+\startsectionlevel[title={\TEX\ primitives}]
 
-\startsubsection[title={\tex{if}}]
+\startsectionlevel[title={\tex{if}}]
 
 I seldom use this one. Internally \TEX\ stores (and thinks) in terms of tokens.
 If you see for instance \type {\def} or \type {\dimen} or \type {\hbox} these all
@@ -330,9 +330,9 @@
 
 % protected macros
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifcat}}]
+\startsectionlevel[title={\tex{ifcat}}]
 
 In \TEX\ characters (in the input) get interpreted according to their so called
 catcodes. The most common are letters (alphabetic) and and other (symbols) but
@@ -377,9 +377,9 @@
 We get: \inlinebuffer, so who still thinks that \TEX\ is easy to understand for a
 novice user?
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifnum}}]
+\startsectionlevel[title={\tex{ifnum}}]
 
 This condition compares its argument with another one, separated by an \type {<},
 \type {=} or \type {>} character.
@@ -410,9 +410,9 @@
 Of course this equal treatment of a dimension and number is only true when the
 dimension is a register or box property.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsection[title={\tex{ifdim}}]
+\startsectionlevel[title={\tex{ifdim}}]
 
 This condition compares one dimension with another one, separated by an \type {<},
 \type {=} or \type {>} sign.
@@ -430,9 +430,9 @@
 While when comparing numbers a dimension is a valid quantity but here you cannot
 mix them: something with a unit is expected.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifodd}}]
+\startsectionlevel[title={\tex{ifodd}}]
 
 This one can come in handy, although in \CONTEXT\ it is only used in checking for
 an odd of even page number.
@@ -454,9 +454,9 @@
 \getbuffer
 \stoplines
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifvmode}}]
+\startsectionlevel[title={\tex{ifvmode}}]
 
 This is a rather trivial check. It takes no arguments and just is true when we're
 in vertical mode. Here is an example:
@@ -470,9 +470,9 @@
 We're always in horizontal mode and issuing a \type {\par} inside a horizontal
 box doesn't change that, so we get: \ruledhbox{\inlinebuffer}.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifhmode}}]
+\startsectionlevel[title={\tex{ifhmode}}]
 
 As with \type {\ifvmode} this one has no argument and just tells if we're in
 vertical mode.
@@ -494,9 +494,9 @@
 \ruledhbox{\inlinebuffer}
 \stoplinecorrection
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifmmode}}]
+\startsectionlevel[title={\tex{ifmmode}}]
 
 Math is something very \TEX\ so naturally you can check if you're in math mode.
 here is an example of using this test:
@@ -507,9 +507,9 @@
 
 Of course in reality macros that do such things are more advanced than this one.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifinner}}]
+\startsectionlevel[title={\tex{ifinner}}]
 
 \startbuffer
 \def\ShowMode
@@ -549,9 +549,9 @@
 the macro) won't work because once the word \type {inner} is typeset we're no
 longer in vertical mode, if we were at all.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifvoid}}]
+\startsectionlevel[title={\tex{ifvoid}}]
 
 A box is one of the basic concepts in \TEX. In order to understand this primitive
 we present four cases:
@@ -601,15 +601,15 @@
 \getbuffer
 \stoplines
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifhbox}}]
+\startsectionlevel[title={\tex{ifhbox}}]
 
 This test takes a box number and gives true when it is an hbox.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifvbox}}]
+\startsectionlevel[title={\tex{ifvbox}}]
 
 This test takes a box number and gives true when it is an vbox. Both a \type
 {\vbox} and \type {\vtop} are vboxes, the difference is in the height and depth
@@ -627,9 +627,9 @@
 
 but, once wrapped, both internally are just vlists.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifx}}]
+\startsectionlevel[title={\tex{ifx}}]
 
 This test is actually used a lot in \CONTEXT: it compares two token(list)s:
 
@@ -651,29 +651,29 @@
 \edef\TempA{...}\edef\TempB{...}\ifx\TempA\TempB ...\else ...\fi
 \stoptyping
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifeof}}]
+\startsectionlevel[title={\tex{ifeof}}]
 
 This test checks if a the pointer in a given input channel has reached its end.
 It is also true when the file is not present. The argument is a number which
 relates to the \type {\openin} primitive that is used to open files for reading.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{iftrue}}]
+\startsectionlevel[title={\tex{iftrue}}]
 
 It does what it says: always true.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{iffalse}}]
+\startsectionlevel[title={\tex{iffalse}}]
 
 It does what it says: always false.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifcase}}]
+\startsectionlevel[title={\tex{ifcase}}]
 
 The general layout of an \type {\ifcase} tests is as follows:
 
@@ -693,13 +693,13 @@
 
 As in other places a number is a sequence of signs followed by one of more digits
 
-\stopsubsection
+\stopsectionlevel
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\ETEX\ primitives}]
+\startsectionlevel[title={\ETEX\ primitives}]
 
-\startsubsection[title={\tex{ifdefined}}]
+\startsectionlevel[title={\tex{ifdefined}}]
 
 This primitive was introduced for checking the existence of a macro (or primitive)
 and with good reason. Say that you want to know if \type {\MyMacro} is defined? One
@@ -736,9 +736,9 @@
 This (or course) results in: \inlinebuffer, but the macro is still sort of
 defined (with no meaning). The next section shows how to get around this.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifcsname}}]
+\startsectionlevel[title={\tex{ifcsname}}]
 
 A macro is often defined using a ready made name, as in:
 
@@ -795,9 +795,9 @@
 be made quite robust as it is pretty safe to assume that names that make sense
 are constructed from regular characters and not boxes, font switches, etc.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{iffontchar}}]
+\startsectionlevel[title={\tex{iffontchar}}]
 
 This test was also part of the \ETEX\ extensions and it can be used to see if
 a font has a character.
@@ -824,9 +824,9 @@
 but it got a bit messy due to the fact that this primitive expands in a different
 way so this extension was rejected.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{unless}}]
+\startsectionlevel[title={\tex{unless}}]
 
 You can negate the results of a test by using the \type {\unless} prefix, so for
 instance you can replace:
@@ -847,41 +847,41 @@
 \fi
 \stoptyping
 
-\stopsubsection
+\stopsectionlevel
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\LUATEX\ primitives}]
+\startsectionlevel[title={\LUATEX\ primitives}]
 
-\startsubsection[title={\tex{ifincsname}}]
+\startsectionlevel[title={\tex{ifincsname}}]
 
 As it had no real practical usage uit might get dropped in \LUAMETATEX, so it
 will not be discussed here.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifprimitive}}]
+\startsectionlevel[title={\tex{ifprimitive}}]
 
 As it had no real practical usage due to limitations, this one is not available
 in \LUAMETATEX\ so it will not be discussed here.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifabsnum}}]
+\startsectionlevel[title={\tex{ifabsnum}}]
 
 This test is inherited from \PDFTEX\ and behaves like \type {\ifnum} but first
 turns a negative number into a positive one.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifabsdim}}]
+\startsectionlevel[title={\tex{ifabsdim}}]
 
 This test is inherited from \PDFTEX\ and behaves like \type {\ifdim} but first
 turns a negative dimension into a positive one.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifcondition}}]
+\startsectionlevel[title={\tex{ifcondition}}]
 
 This is not really a test but in order to unstand that you need to know how
 \TEX\ internally deals with tests.
@@ -1061,13 +1061,13 @@
 Another trick is that we use an integer division (the \type {:}) which is an
 operator supported by \LUAMETATEX .
 
-\stopsubsection
+\stopsectionlevel
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\LUAMETATEX\ primitives}]
+\startsectionlevel[title={\LUAMETATEX\ primitives}]
 
-\startsubsection[title={\tex{ifcmpnum}}]
+\startsectionlevel[title={\tex{ifcmpnum}}]
 
 This one is part of s set of three tests that all are a variant of a \type
 {\ifcase} test. A simple example of the first test is this:
@@ -1080,9 +1080,9 @@
 and sets the case value to 0, 1 or 2, which means that you then use the normal
 \type {\or} and \type {\else} primitives for follow up on the test.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifchknum}}]
+\startsectionlevel[title={\tex{ifchknum}}]
 
 This test scans a number and when it's okay sets the case value to 1, and otherwise
 to 2. So you can do the next:
@@ -1097,9 +1097,9 @@
 with the \type {\ifcase}: because the result is 1 or 2, we never see invalid
 tokens.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifnumval}}]
+\startsectionlevel[title={\tex{ifnumval}}]
 
 A sort of combination of the previous two is \type {\ifnumval} which checks a
 number but also if it's less, equal or more than zero:
@@ -1113,29 +1113,29 @@
 Often the to be checked value will be the content of a macro or an argument like
 \type {#1}.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifcmpdim}}]
+\startsectionlevel[title={\tex{ifcmpdim}}]
 
 This test is like \type {\ifcmpnum} but for dimensions.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifchkdim}}]
+\startsectionlevel[title={\tex{ifchkdim}}]
 
 This test is like \type {\ifchknum} but for dimensions. The last checked value is
 available as \type {\lastchknum}.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifdimval}}]
+\startsectionlevel[title={\tex{ifdimval}}]
 
 This test is like \type {\ifnumval} but for dimensions. The last checked value is
 available as \type {\lastchkdim}
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{iftok}}]
+\startsectionlevel[title={\tex{iftok}}]
 
 Although this test is still experimental it can be used. What happens is that
 two to be compared \quote {things} get scanned for. For each we first gobble
@@ -1195,9 +1195,9 @@
 The last case is more a catch: it will issue an error when no number is given.
 Eventually that might become a bit more clever (depending on our needs.)
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifcstok}}]
+\startsectionlevel[title={\tex{ifcstok}}]
 
 There is a subtle difference between this one and \type {iftok}: spaces
 and \type {\relax} tokens are skipped but nothing gets expanded. So, when
@@ -1204,31 +1204,31 @@
 we arrive at the to be compared \quote {things} we look at what is there,
 as|-|is.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{iffrozen}}]
+\startsectionlevel[title={\tex{iffrozen}}]
 
 {\em This is an experimental test.} Commands can be defined with the \type
 {\frozen} prefix and this test can be used to check if that has been the case.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifprotected}}]
+\startsectionlevel[title={\tex{ifprotected}}]
 
 Commands can be defined with the \type {\protected} prefix (or in \CONTEXT, for
 historic reasons, with \type {\unexpanded}) and this test can be used to check if
 that has been the case.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifusercmd}}]
+\startsectionlevel[title={\tex{ifusercmd}}]
 
 {\em This is an experimental test.} It can be used to see if the command is
 defined at the user level or is a build in one. This one might evolve.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{ifarguments}}]
+\startsectionlevel[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
@@ -1235,9 +1235,9 @@
 and|/|or when the sentinel \type {\ignorearguments} after the arguments is used.
 More details can be found in the lowlevel macros manual.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={\tex{orelse}}]
+\startsectionlevel[title={\tex{orelse}}]
 
 This it not really a test primitive but it does act that way. Say that we have this:
 
@@ -1297,13 +1297,13 @@
 where, of course, the quitting normally is the result of some intermediate extra
 test. But let me play safe here: beware of side effects.
 
-\stopsubsection
+\stopsectionlevel
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={For the brave}]
+\startsectionlevel[title={For the brave}]
 
-\startsubsection[title={Full expansion}]
+\startsectionlevel[title={Full expansion}]
 
 If you don't understand the following code, don't worry. There is seldom much
 reason to go this complex but obscure \TEX\ code attracts some users so \unknown
@@ -1361,9 +1361,9 @@
 actually done when constructing the content of the \type {\edef}, but for the
 current font. So, basically that test is now useless.
 
-\stopsubsection
+\stopsectionlevel
 
-\startsubsection[title={User defined if's}]
+\startsectionlevel[title={User defined if's}]
 
 There is a \type {\newif} macro that defines three other macros:
 
@@ -1411,11 +1411,11 @@
 The price is the use of \type {\ifconditional}, which is {\em not} to confused
 with \type {\ifcondition} (it has bitten me already a few times).
 
-\stopsubsection
+\stopsectionlevel
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Relaxing]
+\startsectionlevel[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
@@ -1532,20 +1532,8 @@
 
 \typebuffer[c] \getbuffer[c,b]
 
-\stopsection
+\stopsectionlevel
 
-\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
-
 \popoverloadmode
 
 \stopdocument

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-expansion.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-expansion.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-expansion.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,5 +1,10 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
+% This is work in progress and after an initial draft got extended because of the
+% 2021 meeting. It will hopefully improve over time.
+
+\usemodule[system-tokens]
+
 \environment lowlevel-style
 
 \startdocument
@@ -6,24 +11,26 @@
   [title=expansion,
    color=middleyellow]
 
-\startsection[title=Preamble]
+\startsectionlevel[title=Preamble]
 
-% \startsubsection[title=Introduction]
-% \stopsubsection
-
 This short manual demonstrates a couple of properties of the macro language. It
-is not the in|-|depth philosophical expose about macro languages, tokens,
+is not an in|-|depth philosophical expose about macro languages, tokens,
 expansion and such that some \TEX ies like. I prefer to stick to the practical
-aspects.
+aspects. Occasionally it will be technical but you can just skip those paragraphs
+(or later return to them) when you can't follow the explanation. It's often not
+that relevant. I won't talk in terms of mouth, stomach and gut the way the \TEX
+book does and although there is no way to avoid the word \quote {token} I will do
+my best to not complicate matters by too much token speak. Examples show best
+what we mean.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\TEX\ primitives}]
+\startsectionlevel[title={\TEX\ primitives}]
 
 The \TEX\ language provides quite some commands and those built in are called
 primitives. User defined commands are called macros. A macro is a shortcut to a
-list of primitives or macro calls. All can be mixed with characters that are to
-be typeset somehow.
+list of primitives and|/|or macro calls. All can be mixed with characters that
+are to be typeset somehow.
 
 \starttyping[option=TEX]
 \def\MyMacro{b}
@@ -38,9 +45,80 @@
 treatment as the \type {a}. The macro ends, the input level decrements and the
 \type {c} gets its treatment.
 
-A macro can contain references to macros so in practice the input can go several
-levels down.
+Before we move on to more examples and differences between engines, it is good to
+stress that \type {\MyMacro} is not a primitive command: we made our command
+here. The \type {b} actually can be seen as a sort of primitive because in this
+macro it gets stored as so called token with a primitive property. That primitive
+property can later on be used to determine what to do. More explicit examples of
+primitives are \type {\hbox}, \type {\advance} and \type {\relax}. It will be
+clear that \CONTEXT\ extends the repertoire of primitive commands with a lot of
+macro commands. When we typeset a source using module \type {m-scite} the
+primitives come out dark blue.
 
+The amount of primitives differs per engine. It all starts with \TEX\ as written
+by Don Knuth. Later \ETEX\ added some more primitives and these became official
+extensions adopted by other variants of \TEX. The \PDFTEX\ engine added quite
+some and as follow up on that \LUATEX\ added more but didn't add all of \PDFTEX.
+A few new primitives came from \OMEGA\ (\ALEPH). The \LUAMETATEX\ engine drops a
+set of primitives that comes with \LUATEX\ and adds plenty new ones. The nature
+of this engine (no backend and less frontend) makes that we need to implement
+some primitives as macros. But the basic set is what good old \TEX\ comes with.
+
+Internally these so called primitives are grouped in categories that relate to
+their nature. They can be directly expanded (a way of saying that they get
+immediately interpreted) or delayed (maybe stored for later usage). They can
+involve definitions, calculations, setting properties and values or they can
+result in some typesetting. This is what makes \TEX\ confusing to new users: it
+is a macro programming language, an interpreter but at the same time an executor
+of typesetting instructions.
+
+A group of primitives is internally identified as a command (they have a \type
+{cmd} code) and the sub commands are flagged by their \type {chr} code. This
+sounds confusing but just thing of the fact that most of what we input are
+characters and therefore they make up most sub commands. For instance the \quote
+{letter \type {cmd}} is used for characters that are seen as letters that can be
+used in the name of user commands, can be typeset, are valid for hyphenation
+etc.\ The letter related \type {cmd} can have many \type {chr} codes (all of
+\UNICODE). I'd like to remark that the grouping is to a large extend functional,
+so sometimes primitives that you expect to be similar in nature are in different
+groups. This has to do with the fact that \TEX\ needs to be a able to determine
+efficiently if a primitive is operating (or forbidden) in horizontal, vertical
+and|/|or math mode.
+
+There are more than 150 internal \type {cmd} groups. if we forget about the
+mentioned character related ones, some, have only a few sub commands (\type
+{chr}) and others many more (just consider all the \OPENTYPE\ math spacing
+related parameters). A handful of these commands deal with what we call macros:
+user defined combinations of primitives and other macros, consider them little
+programs. The \type {\MyMacro} example above is an example. There are differences
+between engines. In standard \TEX\ there are \type {\outer} and \type {\long}
+commands, and most engines have these. However, in \LUAMETATEX\ the later to be
+discussed \type {\protected} macros have their own specific \quote {call \type
+{cmd}}. Users don't need to bother about this.
+
+So, when from now on we talk about primitives, we mean the built in, hard coded
+commands, and when we talk about macros we mean user commands. Although
+internally there are less \type {cmd} categories than primitives, from the
+perspective of the user they are all unique. Users won't consult the source
+anyway but when they do they are warned. Also, when in \LUAMETATEX\ you use the
+low level interfacing to \TEX\ you have to figure out these subtle aspects
+because there this grouping does matter.
+
+Before we continue I want to make clear that expansion (as discussed in this
+document) can refer to a macro being expanded (read: its meaning gets injected
+into the input, so the engine kind of sidetracks from what is was doing) but also
+to direct consequences of running into a primitive. However, users only need to
+consider expansion in the perspective of macros. If a user has \type {\advance}
+in the input it immediately gets done. But when it's part of a macro definition
+it only is executed when the macro expands. A good check in (traditional) \TEX\
+is to compare what happens in \type {\def} and \type {\edef} which is why we will
+use these two in the upcoming examples. You put something in a macro and then
+check what \type {\meaning} or \type {\show} reports.
+
+Now back to user defined macros. A macro can contain references to macros so in
+practice the input can go several levels up and some applications push back a lot
+so this is why your \TEX\ input stack can be configured to be huge.
+
 \starttyping[option=TEX]
 \def\MyMacroA{ and }
 \def\MyMacroB{1\MyMacroA 2}
@@ -49,11 +127,11 @@
 \stoptyping
 
 When \type {\MyMacroB} is defined, its body gets three so called tokens: the
-character token \type {a} with property \quote {other}, a token that is a
+character token \type {1} with property \quote {other}, a token that is a
 reference to the macro \type {\MyMacroB}, and a character token \type {2}, also
-with property \quote {other} The meaning of \type {\MyMacroA} became five tokens:
+with property \quote {other} The meaning of \type {\MyMacroA} is five tokens:
 a reference to a space token, then three character tokens with property \quote
-{letter}, and finally again a space token.
+{letter}, and finally a space token.
 
 \starttyping[option=TEX]
 \def \MyMacroA{ and }
@@ -62,16 +140,16 @@
 a\MyMacroA b
 \stoptyping
 
-In the previous example an \type {\edef} is used, where the \type {e} indicates
-expansion. This time the meaning gets expanded. So we get effectively the same
-as
+In the second definition an \type {\edef} is used, where the \type {e} indicates
+expansion. This time the meaning gets expanded immediately. So we get effectively the same
+as in:
 
 \starttyping[option=TEX]
 \def\MyMacroB{1 and 2}
 \stoptyping
 
-Characters are easy: they just expand, but not all primitives expand to their
-meaning or effect.
+Characters are easy: they just expand to themselves or trigger adding a glyph
+node, but not all primitives expand to their meaning or effect.
 
 \startbuffer
 \def\MyMacroA{\scratchcounter = 1 }
@@ -120,7 +198,7 @@
 \meaning\MyMacroC
 \stoplines
 
-So, this time the third macro has basically its meaning frozen, but we can
+So, this time the third macro has its meaning frozen, but we can
 prevent this by applying a \type {\noexpand} when we do this:
 
 \startbuffer
@@ -153,7 +231,7 @@
 \def\MyShow{\quotation {\strut \inlinebuffer \expandafter \typ \expandafter
 {\the\scratchtoks}\strut}}
 
-You can also store tokens in a so called token register. Here we use a predefined
+You can also store tokens in a so-called token register. Here we use a predefined
 scratch register:
 
 \startbuffer
@@ -196,12 +274,12 @@
 
 \typebuffer[option=TEX]
 
-The trick is to expand in two steps: \MyShow. Later we will see that other
-engines provide some more expansion tricks. The only way to get a grip on
+The trick is to expand in two steps with an intermediate \type {\edef}: \MyShow. Later we will see that other
+engines provide some more expansion tricks. The only way to get some grip on
 expansion is to just play with it.
 
-The \type {\expandafter} primitive expands the token (which can be a macro) after
-the next next one and injects its meaning into the stream. So:
+The \type {\expandafter} primitive expands the token (which can be a macro) standing after
+the next next one and then injects its meaning into the stream. So:
 
 \starttyping[option=TEX]
 \expandafter \MyMacroA \MyMacroB
@@ -238,9 +316,9 @@
 % \afterassignment
 % \aftergroup
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\ETEX\ primitives}]
+\startsectionlevel[title={\ETEX\ primitives}]
 
 In this engine a couple of extensions were added and later on \PDFTEX\ added some
 more. We only discuss a few that relate to expansion. There is however a pitfall
@@ -247,7 +325,8 @@
 here. Before \ETEX\ showed up, \CONTEXT\ already had a few mechanism that also
 related to expansion and it used some names for macros that clash with those in
 \ETEX. This is why we will use the \type {\normal} prefix here to indicate the
-primitive.
+primitive. \footnote {In the meantime we no longer have a low level \type
+{\protected} macro so one can use the primitive}.
 
 \startbuffer
 \def\MyMacroA{a}
@@ -267,7 +346,7 @@
 \meaning\MyMacroABC
 \stoplines
 
-In \CONTEXT\ you will use the \type {\unexpanded} prefix instead because that one
+In \CONTEXT\ you will use the \type {\unexpanded} prefix instead, because that one
 did something similar in older versions of \CONTEXT. As we were early adopters of
 \ETEX, this later became a synonym to the \ETEX\ primitive.
 
@@ -282,9 +361,9 @@
 
 Here the wrapper around the token register assignment will expand the three
 macros, unless they are protected, so its content becomes \MyShow. This saves
-either a lot of more complex \type {\expandafter} usage or using an intermediate
+either a lot of more complex \type {\expandafter} usage or the need to use an intermediate
 \type {\edef}. In \CONTEXT\ the \type {\expanded} macro does something simpler
-but it doesn't expand the first token as it is meant as a wrapper around a command,
+but it doesn't expand the first token as this is meant as a wrapper around a command,
 like:
 
 \starttyping[option=TEX]
@@ -291,8 +370,8 @@
 \expanded{\chapter{....}} % a ConTeXt command
 \stoptyping
 
-where we do want to expand the title but not the \type {\chapter} command, not
-that this would happen actually because \type {\chapter} is a protected command.
+where we do want to expand the title but not the \type {\chapter} command (not
+that this would happen actually because \type {\chapter} is a protected command.)
 
 The counterpart of \type {\normalexpanded} is \type {\normalunexpanded}, as in:
 
@@ -321,7 +400,7 @@
 \typebuffer[option=TEX]
 
 This (when typeset monospaced) is: {\tt \inlinebuffer}. The detokenizer is like
-\type {\string} applied to each token in its argument. Compare this:
+\type {\string} applied to each token in its argument. Compare this to:
 
 \startbuffer
 \normalexpanded {
@@ -360,12 +439,12 @@
 The result is \quotation {\tt\inlinebuffer}: two characters are marked as \quote
 {letter} and two fall in the \quote {other} category.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\LUATEX\ primitives}]
+\startsectionlevel[title={\LUATEX\ primitives}]
 
-This engine adds a little in the expansion arena. First of all it offers a way to
-extend token lists registers
+This engine adds a little to the expansion repertoire. First of all it offers a
+way to extend token lists registers:
 
 \startbuffer
 \def\MyMacroA{a}
@@ -400,79 +479,661 @@
 \type {\gtokspre}, as well as expanding variant: \type {\etoksapp}, \type
 {\etokspre}, \type {\xtoksapp} and \type {\xtokspre}.
 
-There are not beforehand more efficient that using intermediate expanded macros
+These are not beforehand more efficient that using intermediate expanded macros
 or token lists, simply because in the process \TEX\ has to create tokens lists
-too, but sometimes they're just more convenient to use.
+too, but sometimes they're just more convenient to use. In \CONTEXT\ we actually
+do benefit from these.
 
-A second extension is \type {\immediateassignment} which instead in tokenizing
-the assignment directive applies it right now.
+\stopsectionlevel
 
+\startsectionlevel[title={\LUAMETATEX\ primitives}]
+
+We already saw that macro's can be defined protected which means that
+
 \startbuffer
-\edef\MyMacroA
-  {\scratchcounter 123
-   \noexpand\the\scratchcounter}
+           \def\TestA{A}
+\protected \def\TestB{B}
+          \edef\TestC{\TestA\TestB}
+\stopbuffer
 
-\edef\MyMacroB
-  {\immediateassignment\scratchcounter 123
-   \noexpand\the\scratchcounter}
+\typebuffer[option=TEX] \getbuffer
+
+gives this:
+
+\startlines
+\type{\TestC} : {\tttf \meaningless\TestC}
+\stoplines
+
+One way to get \type {\TestB} expanded it to prefix it with \type {\expand}:
+
+\startbuffer
+           \def\TestA{A}
+\protected \def\TestB{B}
+          \edef\TestC{\TestA\TestB}
+          \edef\TestD{\TestA\expand\TestB}
 \stopbuffer
 
-\typebuffer[option=TEX]
+\typebuffer[option=TEX] \getbuffer
 
-\getbuffer
+We now get:
 
-These two macros now have the meaning:
+\startlines
+\type{\TestC} : {\tttf \meaningless\TestC}
+\type{\TestD} : {\tttf \meaningless\TestD}
+\stoplines
 
-\startlines \tt
-\meaning\MyMacroA
-\meaning\MyMacroB
+There are however cases where one wishes this to happen automatically, but that
+will also make protected macros expand which will create havoc, like switching fonts.
+
+\startbuffer
+               \def\TestA{A}
+\protected     \def\TestB{B}
+\semiprotected \def\TestC{C}
+              \edef\TestD{\TestA\TestB\TestC}
+              \edef\TestE{\normalexpanded{\TestA\TestB\TestC}}
+              \edef\TestF{\semiexpanded  {\TestA\TestB\TestC}}
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+This time \type {\TestC} looses its protection:
+
+\startlines
+\type{\TestA} : {\tttf \meaningless\TestA}
+\type{\TestB} : {\tttf \meaningless\TestB}
+\type{\TestC} : {\tttf \meaningless\TestC}
+\type{\TestD} : {\tttf \meaningless\TestD}
+\type{\TestE} : {\tttf \meaningless\TestE}
+\type{\TestF} : {\tttf \meaningless\TestF}
 \stoplines
 
-\stopsection
+Actually adding \type {\fullyexpanded} would be trivial but it makes not much
+sense to add the overhead (at least not now). This feature is experimental
+anyway so it might go away when I see no real advantage from it.
 
-\startsection[title={\LUAMETATEX\ primitives}]
+When you store something in a macro or token register you always need to keep an
+eye on category codes. A dollar in the input is normally treated as math shift, a
+hash indicates a macro parameter or preamble entry. Characters like \quote {A}
+are letters but \quote {[} and \quote {]} are tagged as \quote {other}. The \TEX\
+scanner acts according to these codes. If you ever find yourself in a situation
+that changing catcodes is no option or cumbersome, you can do this:
 
-To be discussed:
+\starttyping[option=TEX]
+\edef\TestOA{\expandtoken\othercatcode `A}
+\edef\TestLA{\expandtoken\lettercatcode`A}
+\stoptyping
 
-\starttyping
-\expand
-\expandtoken
-\localcontrol
-\localcontrolled
-\beginlocalcontrol ... \endlocalcontrol
-\immediate
+In both cases the meaning is \type {A} but in the first case it's not a letter
+but a character flagged as \quote {other}.
+
+A whole new category of commands has to do with so called local control. When
+\TEX\ scans and interprets the input, a process takes place that is called
+tokenizing: (sequences of) characters get a symbolic representation and travel
+through the system as tokens. Often they immediately get interpreted and are then
+discarded. But when for instance you define a macro they end up as a linked list
+of tokens in the macro body. We already saw that expansion plays a role. In most
+cases, unless \TEX\ is collecting tokens, the main action is dealt with in the so-called
+main loop. Something gets picked up from the input but can also be pushed
+back, for instance because of some lookahead that didn't result in an action.
+Quite some time is spent in pushing and popping from the so-called input stack.
+
+When we are in \LUA, we can pipe back into the engine but all is collected till
+we're back in \TEX\ where the collected result is pushed into the input. Because
+\TEX\ is a mix of programming and action there basically is only that main loop.
+There is no real way to start a sub run in \LUA\ and do all kind of things
+independent of the current one. This makes sense when you consider the mix: it
+would get too confusing.
+
+However, in \LUATEX\ and even better in \LUAMETATEX, we can enter a sort of local
+state and this is called \quote {local control}. When we are in local control a
+new main loop is entered and the current state is temporarily forgotten: we can for
+instance expand where one level up expansion was not done. It sounds complicated
+an indeed it is complicated so examples have to clarify it.
+
+\starttyping[option=TEX]
+1 \setbox0\hbox to 10pt{2} \count0=3 \the\count0 \multiply\count0 by 4
 \stoptyping
 
-And maybe also here:
+This snippet of code is not that useful but illustrates what we're dealing with:
 
-\starttyping
-\tokenized  : a bonus
-\scantokens : original etex, now using the lua method
+\startitemize
+
+\startitem
+    The \type {1} gets typeset. So, characters like that are seen as text.
+\stopitem
+
+\startitem
+    The \type {\setbox} primitive triggers picking up a register number, then
+    goes on scanning for a box specification and that itself will typeset a
+    sequence of whatever until the group ends.
+\stopitem
+
+\startitem
+    The \type {count} primitive triggers scanning for a register number (or
+    reference) and then scans for a number; the equal sign is optional.
+\stopitem
+
+\startitem
+    The \type {the} primitive injects some value into the current input stream
+    and it does so by entering a new input level.
+\stopitem
+
+\startitem
+    The \type {multiply} primitive picks up a register specification and
+    multiplies that by the next scanned number. The \type {by} is optional.
+\stopitem
+
+\stopitemize
+
+We now look at this snippet again but with an expansion context:
+
+\startbuffer[def]
+\def \TestA{1 \setbox0\hbox{2} \count0=3 \the\count0}
+\stopbuffer
+
+\startbuffer[edef]
+\edef\TestB{1 \setbox0\hbox{2} \count0=3 \the\count0}
+\stopbuffer
+
+\typebuffer[def] [option=TEX]
+\typebuffer[edef][option=TEX]
+
+\getbuffer[def]
+\getbuffer[edef]
+
+These two macros have a slightly different body. Make sure you see the
+difference before reading on.
+
+\luatokentable\TestA
+
+\luatokentable\TestB
+
+We now introduce a new primitive \type {\localcontrolled}:
+
+\startbuffer[edef]
+\edef\TestB{1 \setbox0\hbox{2} \count0=3 \the\count0}
+\stopbuffer
+
+\startbuffer[ldef]
+\edef\TestC{1 \setbox0\hbox{2} \localcontrolled{\count0=3} \the\count0}
+\stopbuffer
+
+\typebuffer[edef][option=TEX]
+\typebuffer[ldef][option=TEX]
+
+\getbuffer[edef]
+\getbuffer[ldef]
+
+Again, watch the subtle differences:
+
+\luatokentable\TestB
+
+\luatokentable\TestC
+
+Another example:
+
+\startbuffer[edef]
+\edef\TestB{1 \setbox0\hbox{2} \count0=3 \the\count0}
+\stopbuffer
+
+\startbuffer[ldef]
+\edef\TestD{\localcontrolled{1 \setbox0\hbox{2} \count0=3 \the\count0}}
+\stopbuffer
+
+\typebuffer[edef][option=TEX]
+\typebuffer[ldef][option=TEX]
+
+\getbuffer[edef]\getbuffer[ldef]\quad{\darkgray\leftarrow\space Watch how the results end up here!}
+
+\luatokentable\TestB
+
+\luatokentable\TestD
+
+We can use this mechanism to define so called fully expandable macros:
+
+\startbuffer[def]
+\def\WidthOf#1%
+  {\beginlocalcontrol
+   \setbox0\hbox{#1}%
+   \endlocalcontrol
+   \wd0 }
+\stopbuffer
+
+\startbuffer[use]
+\scratchdimen\WidthOf{The Rite Of Spring}
+
+\the\scratchdimen
+\stopbuffer
+
+\typebuffer[def][option=TEX]
+\typebuffer[use][option=TEX]
+
+\getbuffer[def]\getbuffer[use]
+
+When you want to add some grouping, it quickly can become less pretty:
+
+\startbuffer[def]
+\def\WidthOf#1%
+  {\dimexpr
+      \beginlocalcontrol
+        \begingroup
+          \setbox0\hbox{#1}%
+          \expandafter
+        \endgroup
+      \expandafter
+      \endlocalcontrol
+      \the\wd0
+   \relax}
+\stopbuffer
+
+\startbuffer[use]
+\scratchdimen\WidthOf{The Rite Of Spring}
+
+\the\scratchdimen
+\stopbuffer
+
+\typebuffer[def][option=TEX]
+\typebuffer[use][option=TEX]
+
+\getbuffer[def]\getbuffer[use]
+
+A single token alternative is available too and its usage is like this:
+
+\startbuffer
+ \def\TestA{\scratchcounter=100 }
+\edef\TestB{\localcontrol\TestA \the\scratchcounter}
+\edef\TestC{\localcontrolled{\TestA} \the\scratchcounter}
+\stopbuffer
+
+\typebuffer[option=TEX] \getbuffer
+
+The content of \type {\TestB} is \quote {\tttf\meaningless\TestB} and of course
+the \type {\TestC} macro gives \quote {\tttf\meaningless\TestC}.
+
+We now move to the \LUA\ end. Right from the start the way to get something into
+\TEX\ from \LUA\ has been the print functions. But we can also go local
+(immediate). There are several methods:
+
+\startitemize[packed]
+\startitem via a set token register \stopitem
+\startitem via a defined macro \stopitem
+\startitem via a string \stopitem
+\stopitemize
+
+Among the things to keep in mind are catcodes, scope and expansion (especially in
+when the result itself ends up in macros). We start with an example where we go via
+a token register:
+
+\startbuffer[set]
+\toks0={\setbox0\hbox{The Rite Of Spring}}
+\toks2={\setbox0\hbox{The Rite Of Spring!}}
+\stopbuffer
+
+\typebuffer[set][option=TEX]
+
+\startbuffer[run]
+\startluacode
+tex.runlocal(0) context("[1: %p]",tex.box[0].width)
+tex.runlocal(2) context("[2: %p]",tex.box[0].width)
+\stopluacode
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+\start \getbuffer[set,run] \stop
+
+We can also use a macro:
+
+\startbuffer[set]
+\def\TestA{\setbox0\hbox{The Rite Of Spring}}
+\def\TestB{\setbox0\hbox{The Rite Of Spring!}}
+\stopbuffer
+
+\typebuffer[set][option=TEX]
+
+\startbuffer[run]
+\startluacode
+tex.runlocal("TestA") context("[3: %p]",tex.box[0].width)
+tex.runlocal("TestB") context("[4: %p]",tex.box[0].width)
+\stopluacode
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+\start \getbuffer[set,run] \stop
+
+A third variant is more direct and uses a (\LUA) string:
+
+\startbuffer[run]
+\startluacode
+tex.runstring([[\setbox0\hbox{The Rite Of Spring}]])
+
+context("[5: %p]",tex.box[0].width)
+
+tex.runstring([[\setbox0\hbox{The Rite Of Spring!}]])
+
+context("[6: %p]",tex.box[0].width)
+\stopluacode
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+\start \getbuffer[run] \stop
+
+A bit more high level:
+
+\starttyping[option=LUA]
+context.runstring([[\setbox0\hbox{(Here \bf 1.2345)}]])
+context.runstring([[\setbox0\hbox{(Here \bf   %.3f)}]],1.2345)
 \stoptyping
 
-% \aftergroups
-% \aftergrouped
+Before we had \type {runstring} this was the way to do it when staying in \LUA\
+was needed:
 
-And:
+\startbuffer[run]
+\startluacode
+token.setmacro("TestX",[[\setbox0\hbox{The Rite Of Spring}]])
+tex.runlocal("TestX")
+context("[7: %p]",tex.box[0].width)
+\stopluacode
+\stopbuffer
 
-\starttyping
-          \def\foo{foo}
-\protected\def\oof{oof}
+\typebuffer[run][option=TEX]
 
-\csname foo\endcsname
-\csname oof\endcsname
-\csname \foo\endcsname
-% \csname \oof\endcsname % error in luametatex
+\start \getbuffer[run] \stop
 
-\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
+\startbuffer[run]
+\startluacode
+tex.scantoks(0,tex.ctxcatcodes,[[\setbox0\hbox{The Rite Of Spring!}]])
+tex.runlocal(0)
+context("[8: %p]",tex.box[0].width)
+\stopluacode
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+\start \getbuffer[run] \stop
+
+The order of flushing matters because as soon as something is not stored in a
+token list or macro body, \TEX\ will typeset it. And as said, a lot of this relates
+to pushing stuff into the input which is stacked. Compare:
+
+\startbuffer[run]
+\startluacode
+context("[HERE 1]")
+context("[HERE 2]")
+\stopluacode
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+\start \getbuffer[run] \stop
+
+with this:
+
+\startbuffer[run]
+\startluacode
+tex.pushlocal() context("[HERE 1]") tex.poplocal()
+tex.pushlocal() context("[HERE 2]") tex.poplocal()
+\stopluacode
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+\start \getbuffer[run] \stop
+
+You can expand a macro at the \LUA\ end with \type {token.expandmacro} which has
+a peculiar interface. The first argument has to be a string (the name of a macro)
+or a userdata (a valid macro token). This macro can be fed with parameters by
+passing more arguments:
+
+\starttabulate[|||]
+\NC string \NC serialized to tokens \NC \NR
+\NC true   \NC wrap the next string in curly braces \NC \NR
+\NC table  \NC each entry will become an argument wrapped in braces \NC \NR
+\NC token  \NC inject the token directly \NC \NR
+\NC number \NC change control to the given catcode table \NC \NR
+\stoptabulate
+
+There are more scanner related primitives, like the \ETEX\ primitive
+\type {\detokenize}:
+
+\startbuffer[run]
+[\detokenize {test \relax}]
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+This gives: {\tttf \getbuffer[run]}. In \LUAMETATEX\ we also have complementary
+primitive(s):
+
+\startbuffer[run]
+[\tokenized   catcodetable \vrbcatcodes {test {\bf test} test}]
+[\tokenized                             {test {\bf test} test}]
+[\retokenized              \vrbcatcodes {test {\bf test} test}]
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+The \type {\tokenized} takes an optional keyword and the examples above give: {\tttf
+\getbuffer[run]}. The \LUATEX\ primitive \type {\scantextokens} which is a
+variant of \ETEX's \type {\scantokens} operates under the current catcode regime
+(the last one honors \type {\everyeof}). The difference with \type {\tokenized}
+is that this one first serializes the given token list (just like \type
+{\detokenize}). \footnote {The \type {\scan*tokens} primitives now share the same
+helpers as \LUA, but they should behave the same as in \LUATEX.}
+
+With \type {\retokenized} the catcode table index is mandatory (it saves a bit of
+scanning and is easier on intermixed \type {\expandafter} usage. There
+often are several ways to accomplish the same:
+
+\startbuffer[run]
+\def\MyTitle{test {\bf test} test}
+\detokenize               \expandafter{\MyTitle}: 0.46\crlf
+\meaningless                           \MyTitle : 0.47\crlf
+\retokenized              \notcatcodes{\MyTitle}: 0.87\crlf
+\tokenized   catcodetable \notcatcodes{\MyTitle}: 0.93\crlf
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+\getbuffer[run]
+
+Here the numbers show the relative performance of these methods. The \type
+{\detokenize} and \type {\meaningless} win because they already know that a
+verbose serialization is needed. The last two first serialize and then
+reinterpret the resulting token list using the given catcode regime. The last one
+is slowest because it has to scan the keyword.
+
+There is however a pitfall here:
+
+\startbuffer[run]
+\def\MyText {test}
+\def\MyTitle{test \MyText\space test}
+\detokenize               \expandafter{\MyTitle}\crlf
+\meaningless                           \MyTitle \crlf
+\retokenized              \notcatcodes{\MyTitle}\crlf
+\tokenized   catcodetable \notcatcodes{\MyTitle}\crlf
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+The outcome is different now because we have an expandable embedded macro call.
+The fact that we expand in the last two primitives is also the reason why they are
+\quote {slower}.
+
+\getbuffer[run]
+
+To complete this picture, we show a variant than combines much of what has been
+introduced in this section:
+
+\startbuffer[run]
+\semiprotected\def\MyTextA {test}
+\def\MyTextB {test}
+\def\MyTitle{test \MyTextA\space \MyTextB\space test}
+\detokenize               \expandafter{\MyTitle}\crlf
+\meaningless                           \MyTitle \crlf
+\retokenized              \notcatcodes{\MyTitle}\crlf
+\retokenized              \notcatcodes{\semiexpanded{\MyTitle}}\crlf
+\tokenized   catcodetable \notcatcodes{\MyTitle}\crlf
+\tokenized   catcodetable \notcatcodes{\semiexpanded{\MyTitle}}
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+This time compare the last four lines:
+
+\getbuffer[run]
+
+Of course the question remains to what extend we need this and eventually will
+apply in \CONTEXT. The \type {\detokenize} is used already. History shows that
+eventually there is a use for everything and given the way \LUAMETATEX\ is
+structured it was not that hard to provide the alternatives without sacrificing
+performance or bloating the source.
+
+% tex.quitlocal
+%
+% tex.expandmacro   : string|userdata + [string|true|table|userdata|number]*
+% tex.expandasvalue : kind + string|userdata + [string|true|table|userdata|number]*
+% tex.runstring     : [catcode] + string + expand + grouped
+% tex.runlocal      : function|number(register)|string(macro)|userdata(token) + expand + grouped
+% mplib.expandtex   : mpx + kind + string|userdata + [string|true|table|userdata|number]*
+
+\stopsectionlevel
+
+\startsectionlevel[title=Dirty tricks]
+
+When I was updating this manual Hans vd Meer and I had some discussions about
+expansion and tokenization related issues when combining of \XML\ processing with
+\TEX\ macros where he did some manipulations in \LUA. In these mixed cases you
+can run into catcode related problems because in \XML\ you want for instance a
+\type {#} to be a hash mark (other character) and not an parameter identifier.
+Normally this is handled well in \CONTEXT\ but of course there are complex cases
+where you need to adapt.
+
+Say that you want to compare two strings (officially we should say token lists)
+with mixed catcodes. Let's also assume that you want to use the normal \type
+{\if} construct (which was part of the discussion). We start with defining
+a test set. The reason that we present this example here is that we use
+commands discussed in previous sections:
+
+\startbuffer[run]
+               \def\abc{abc}
+\semiprotected \def\xyz{xyz}
+              \edef\pqr{\expandtoken\notcatcodes`p%
+                        \expandtoken\notcatcodes`q%
+                        \expandtoken\notcatcodes`r}
+
+1: \ifcondition\similartokens{abc} {def}YES\else NOP\fi (NOP) \quad
+2: \ifcondition\similartokens{abc}{\abc}YES\else NOP\fi (YES)
+
+3: \ifcondition\similartokens{xyz} {pqr}YES\else NOP\fi (NOP) \quad
+4: \ifcondition\similartokens{xyz}{\xyz}YES\else NOP\fi (YES)
+
+5: \ifcondition\similartokens{pqr} {pqr}YES\else NOP\fi (YES) \quad
+6: \ifcondition\similartokens{pqr}{\pqr}YES\else NOP\fi (YES)
+\stopbuffer
+
+\typebuffer[run][option=TEX]
+
+So, we have a mix of expandable and semi expandable macros, and also a mix of
+catcodes. A naive approach would be:
+
+\startbuffer[def]
+\permanent\protected\def\similartokens#1#2%
+  {\iftok{#1}{#2}}
+\stopbuffer
+
+\typebuffer[def][option=TEX]
+
+but that will fail on some cases:
+
+\pushoverloadmode \startpacked \tttf \getbuffer[def,run]\stoppacked \popoverloadmode
+
+So how about:
+
+\startbuffer[def]
+\permanent\protected\def\similartokens#1#2%
+  {\iftok{\detokenize{#1}}{\detokenize{#2}}}
+\stopbuffer
+
+\typebuffer[def][option=TEX]
+
+That one is even worse:
+
+\pushoverloadmode \startpacked \tttf \getbuffer[def,run]\stoppacked \popoverloadmode
+
+We need to expand so we end up with this:
+
+\startbuffer[def]
+\permanent\protected\def\similartokens#1#2%
+  {\normalexpanded{\noexpand\iftok
+     {\noexpand\detokenize{#1}}
+     {\noexpand\detokenize{#2}}}}
+\stopbuffer
+
+\typebuffer[def][option=TEX]
+
+Better:
+
+\pushoverloadmode \startpacked \tttf \getbuffer[def,run]\stoppacked \popoverloadmode
+
+But that will still not deal with the mildly protected macro so in the end we
+have:
+
+\startbuffer[def]
+\permanent\protected\def\similartokens#1#2%
+  {\semiexpanded{\noexpand\iftok
+     {\noexpand\detokenize{#1}}
+     {\noexpand\detokenize{#2}}}}
+\stopbuffer
+
+\typebuffer[def][option=TEX]
+
+Now we're good:
+
+\pushoverloadmode \startpacked \tttf \getbuffer[def,run]\stoppacked \popoverloadmode
+
+Finally we wrap this one in the usual \type {\doifelse...} macro:
+
+\startbuffer[def]
+\permanent\protected\def\doifelsesimilartokens#1#2%
+  {\ifcondition\similartokens{#1}{#2}%
+     \expandafter\firstoftwoarguments
+   \else
+     \expandafter\secondoftwoarguments
+   \fi}
+\stopbuffer
+
+\typebuffer[def][option=TEX]
+
+so that we can do:
+
+\starttyping[option=TEX]
+\doifelsesimilartokens{pqr}{\pqr}{YES}{NOP}
 \stoptyping
 
-\stoptext
+A companion macro of this is \type {\wipetoken} but for that one you need to look
+into the source.
 
-\stopsection
+\stopsectionlevel
 
 \stopdocument
 
+% \aftergroups
+% \aftergrouped
+%
+%     \starttyping
+%           \def\foo{foo}
+% \protected\def\oof{oof}
+%
+% \csname foo\endcsname
+% \csname oof\endcsname
+% \csname \foo\endcsname
+% \begincsname \oof\endcsname % error in luametatex, but in texexpand l 477 we can block an error
+%
+% \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

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
 \environment lowlevel-style
 
@@ -6,15 +6,15 @@
   [title=grouping,
    color=middlecyan]
 
-\startsection[title=Introduction]
+\startsectionlevel[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
+\stopsectionlevel
 
-\startsection[title=\PASCAL]
+\startsectionlevel[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
@@ -30,9 +30,9 @@
 can have local variables in a procedure or function but the block is just a way
 to pack a sequence of statements.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=\TEX]
+\startsectionlevel[title=\TEX]
 
 In \TEX\ macros (or source code) the following can occur:
 
@@ -79,9 +79,9 @@
 explicitly change its value globally. This makes a lot of sense in the perspective
 of \TEX.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=\METAPOST]
+\startsectionlevel[title=\METAPOST]
 
 The \METAPOST\ language also has a concept of grouping but in this case it's more like a
 programming language.
@@ -110,9 +110,9 @@
 So, in \METAPOST\ all assignments are global, unless a variable is explicitly
 saved inside a group.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=\LUA]
+\startsectionlevel[title=\LUA]
 
 In \LUA\ all assignments are global unless a variable is defines local:
 
@@ -132,9 +132,9 @@
 \METAPOST\ which can make the library wait for more without triggering an error.
 Proper syntax highlighting in an editor clearly helps.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=\CCODE]
+\startsectionlevel[title=\CCODE]
 
 The \LUA\ language is a mix between \PASCAL\ (which is one reason why I like it)
 and \CCODE.
@@ -151,20 +151,6 @@
 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
+\stopsectionlevel
 
-\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

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-inserts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-inserts.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-inserts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,216 @@
+% language=us runpath=texruns:manuals/lowlevel
+
+\environment lowlevel-style
+
+\startdocument
+  [title=inserts,
+   color=middlecyan]
+
+\startsectionlevel[title=Introduction]
+
+This document is a mixed bag. We do discuss inserts but also touch elements of
+the page builder because inserts and regular page content are handled there.
+Examples of mechanisms that use inserts are footnotes. These have an anchor in
+the running text and some content that ends up (normally) at the bottom of the
+page. When considering a page break the engine tries to make sure that the anchor
+(reference) and the content end up on the same page. When there is too much, it
+will distribute (split) the content over pages.
+
+We can discuss page breaks in a (pseudo) scientific way and explore how to
+optimize this process, taking into accounts also inserts that contain images but
+it doesn't make much sense to do that because in practice we can encounter all
+kind of interferences. Theory and practice are too different because a document
+can contain a wild mix of text, figures, formulas, notes, have backgrounds and
+location dependent processing. It get seven more complex when we are dealing with
+columns because \TEX\ doesn't really know that concept.
+
+I will therefore stick to some practical aspects and the main reason for this
+document is that I sort of document engine features and at the same time give an
+impression of what we deal with. I will do that in the perspective of
+\LUAMETATEX, which has a few more options and tracing than other engines.
+
+{\em Currently this document is mostly for myself to keep track of the state of
+inserts and the page builder in \LUAMETATEX\ and \CONTEXT\ \LMTX. The text is not
+yet corrected and can have errors.}
+
+\stopsectionlevel
+
+\startsectionlevel[title=The page builder]
+
+When your document is processed content eventually gets added to the so called
+main vertical list (mvl). Content first get appended to the list of contributions
+and at specific moments it will be handed over to the mvl. This process is called
+page building. There we can encounter the following elements (nodes):
+
+\starttabulate
+\NC \type {glue}     \NC a vertical skip \NC \NR
+\NC \type {penalty}  \NC a vertical penalty \NC \NR
+\NC \type {kern}     \NC a vertical kern \NC \NR
+\NC \type {vlist}    \NC a a vertical box \NC \NR
+\NC \type {hlist}    \NC a horizontal box (often a line) \NC \NR
+\NC \type {rule}     \NC a horizontal rule \NC \NR
+\NC \type {boundary} \NC a boundary node \NC \NR
+\NC \type {whatsit}  \NC a node that is used by user code (often some extension) \NC \NR
+\NC \type {mark}     \NC a token list (as used for running headers) \NC \NR
+\NC \type {insert}   \NC a node list (as used for notes) \NC \NR
+\stoptabulate
+
+The engine itself will not insert anything other than this but \LUA\ code can
+mess up the contribution list and the mvl and that can trigger an error. Handing
+over the contributions is done by the page builder and that one kicks in in
+several places:
+
+\startitemize[packed]
+\startitem
+    When a penalty gets inserted it is part of evaluating if the output routine
+    should be triggered. This triggering can be enforced by values equal or below
+    10.000 that then can be checked in the set routine.
+\stopitem
+\startitem
+    The builder is {\em not} exercised when a glue or kern is injected so there can
+    be multiple of them before another element triggers the builder.
+\stopitem
+\startitem
+    Adding a box triggers the builder as does the result of an alignment which can
+    be a list of boxes.
+\stopitem
+\startitem
+    When the output routine is finished the builder is executed because the
+    routine can have pushed back content.
+\stopitem
+\startitem
+    When a new paragraph is triggered by the \type {\par} command the builder kicks in
+    but only when the engine was able to enter vertical mode.
+\stopitem
+\startitem
+    When the job is finished the builder will make sure that pending content is handled.
+\stopitem
+\startitem
+    An insert and vadjust {\em can} trigger the builder but only at the nesting level zero
+    which normally is not the case (I need an example).
+\stopitem
+\startitem
+    At the beginning of a paragraph (like text), before display math is entered,
+    and when display math ends the builder is also activated.
+\stopitem
+\stopitemize
+
+At the \TEX\ the builder is triggered automatically in the mentioned cases but at
+the \LUA\ end you can use \type {tex.triggerbuildpage()} to flush the pending
+contributions.
+
+The properties that relate to the page look like counter and dimension registers
+but they are not. These variables are global and managed differently.
+
+\starttabulate
+\NC \type {\pagegoal}         \NC the available space \NC \NR
+\NC \type {\pagetotal}        \NC the accumulated space \NC \NR
+\NC \type {\pagestretch}      \NC the possible zero order stretch \NC \NR
+\NC \type {\pagefilstretch}   \NC the possible one order stretch \NC \NR
+\NC \type {\pagefillstretch}  \NC the possible second order stretch \NC \NR
+\NC \type {\pagefilllstretch} \NC the possible third order stretch \NC \NR
+\NC \type {\pageshrink}       \NC the possible shrink \NC \NR
+\NC \type {\pagedepth}        \NC the current page depth \NC \NR
+\NC \type {\pagevsize}        \NC the initial page goal \NC \NR
+\stoptabulate
+
+When the first content is added to an empty page the \type {\pagegoal} gets the
+value of \type {\vsize} and gets frozen but the value is diminished by the space
+needed by left over inserts. These inserts are managed via a separate list so
+they don't interfere with the page that itself of course can have additional
+inserts. The \type {\pagevsize} is just a (\LUAMETATEX) status variable that hold
+the initial \type {\pagegoal} but it might play a role in future extensions.
+
+Another variable is \type {\deadcycles} that registers the number of times the
+output routine is called without returning result.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Inserts]
+
+We now come to inserts. In traditional \TEX\ an insert is a data structure that
+runs on top of registers: a box, count, dimension and skip. An insert is accessed
+by a number so for instance insert 123 will use the four registers of that
+number. Because \TEX\ only offers a command alias mechanism for registers (like
+\type {\countdef}) a macro package will implement some allocator management
+subsystem (like \type {\newcount}). A \type {\newinsert} has to be defined in a
+way that the four registers are not clashing with other allocators. When you
+start with \TEX\ seeing code that deals with in (in plain \TEX) can be puzzling
+but it follows from the way \TEX\ is set up. But inserts are probably not what
+you start exploring right away away.
+
+In \LUAMETATEX\ you can set \type {\insertmode} to 1 and that is what we do in
+\CONTEXT. In that mode inserts are taken from a pool instead of registers. A side
+effect is that like the page properties the insert properties are global too but
+that is normally no problem and can be managed well by a macro package (that
+probably would assign register the values globally too). The insert pool will
+grow dynamically on demand so one can just start at 1; in \CONTEXT\ \MKIV\ we use
+the range 127 upto 255 in order to avoid a clash with registers. In \LMTX\ we start
+at 1 because there are no clashes.
+
+A consequence of this approach is that we use dedicated commands to set the insert
+properties:
+
+\starttabulate[|l|l|p|]
+\NC \type {\insertdistance}   \NC glue  \NC the space before the first instance (on a page) \NC \NR
+\NC \type {\insertmultiplier} \NC count \NC a factor that is used to calculate the height used \NC \NR
+\NC \type {\insertlimit}      \NC dimen \NC the maximum amount of space on a page to be taken \NC \NR
+\NC \type {\insertpenalty}    \NC count \NC the floating penalty (used when set) \NC \NR
+\NC \type {\insertmaxdepth}   \NC dimen \NC the maximum split depth (used when set) \NC \NR
+\NC \type {\insertstorage}    \NC count \NC signals that the insert has to be stored for later \NC \NR
+\NC \type {\insertheight}     \NC dimen \NC the accumulated height of the inserts so far \NC \NR
+\NC \type {\insertdepth}      \NC dimen \NC the current depth of the inserts so far \NC \NR
+\NC \type {\insertwidth}      \NC dimen \NC the width of the inserts \NC \NR
+\stoptabulate
+
+These commands take a number and an integer, dimension or glue specification.
+They can be set and queried but setting the dimensions can have side effects. The
+accumulated height of the inserts is available in \type {\insertheights} (which
+can be set too). The \type {\floatingpenalty} variable determines the penalty
+applied when a split is needed.
+
+In the output routine the original \TEX\ variable \type {\insertpenalties} is a
+counter that keeps the number of insertions that didn't fit on the page while
+otherwise if has the accumulated penalties of the split insertions. When \type
+{\holdinginserts} is non zero the inserts in the list are not collected for
+output, which permits the list to be fed back for reprocessing.
+
+The \LUAMETATEX\ specific storage mode \type {\insertstoring} variable is
+explained in the next section.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Storing]
+
+This feature is kind of special and still experimental. When \type
+{\insertstoring} is set 1, all inserts that have their storage flag set will be
+saved. Think of a multi column setup where inserts have to end up in the last
+column. If there are three columns, the first two will store inserts. Then when
+the last column is dealt with \type {\insertstoring} can be set to 2 and that
+will signal the builder that we will inject the inserts. In both cases, the value
+of this register will be set to zero so that it doesn't influence further
+processing.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Synchronizing]
+
+The page builder can triggered by (for instance) a penalty but you can also use
+\type {\pageboundary}. This will trigger the page builder but not leave anything
+behind. (This is experimental.)
+
+\stopsectionlevel
+
+\startsectionlevel[title=Migration]
+
+{\em Todo, nothing new there, so no hurry.}
+
+\stopsectionlevel
+
+\startsectionlevel[title=Callbacks]
+
+{\em Todo, nothing new there, so no hurry.}
+
+\stopsectionlevel
+
+\stopdocument


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-inserts.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-localboxes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-localboxes.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-localboxes.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,408 @@
+% language=us runpath=texruns:manuals/lowlevel
+
+% \unprotect \pushoverloadmode
+% \popoverloadmode \protect
+
+\environment lowlevel-style
+
+\startdocument
+  [title=localboxes,
+   color=middlered]
+
+\startsectionlevel[title=Introduction]
+
+The \LUATEX\ engine inherited a few features from other engines and adding local
+boxes to paragraphs is one of them. This concept comes from \OMEGA\ but over time
+it has been made a bit more robust, also by using native par nodes instead of
+whatsit nodes that are used to support \TEX's extensions. In another low level
+manual we discuss paragraph properties and these local boxes are also part of
+that so you might want to catch up on that. Local boxes are stored in an initial
+par node with an adequate subtype but users wont' notice this (unless they mess
+around in \LUA). The inline par nodes have a different subtype and are injected
+with the \typ {\localinterlinepenalty}, \typ {\localbrokenpenalty}, \typ
+{\localleftbox}, \typ {\localrightbox} and \LUAMETATEX\ specific \typ
+{\localmiddlebox} primitives. WHen these primitives are used in vertical mode
+they just set registers.
+
+The original (\OMEGA) idea was that local boxes are used for repetitive
+punctuation (like quotes) at the left and|/|or right end of the lines that make
+up a paragraph. That means that when these primitives inject nodes they actually
+introduce states so that a stretch of text can be marked.
+
+When this mechanism was cleaned up in \LUAMETATEX\ I decided to investigate if
+other usage made sense. After all, it is a feature that introduces some extra
+code and it then pays of to use it when possible. Among the extensions are a
+callback that is triggered when the left and right boxes get added and
+experiments with that showed some potential but in order to retain performance as
+well as limit extensive node memory usage (par nodes are large) a system of
+indices was added. All this will be illustrated below. Warning: the mechanism in
+\LUAMETATEX\ is not compatible with \LUATEX.
+
+{\em This is a preliminary, uncorrected manual.}
+
+\stopsectionlevel
+
+\startsectionlevel[title=The basics]
+
+This mechanism uses a mix of setting (pseudo horizontal) box registers that get
+associated with (positions in a) paragraph. When the lines resulting from
+breaking the list gets packaged into an horizontal (line) box, the local left and
+right boxes get prepended and appended to the textual part (inside the left,
+right and parfills kips and left or right hanging margins). When assigning the
+current local boxes to the paragraph node(s) references to the pseudo registers
+are used and the packaging actually copies them. This mix of referencing and
+copying is somewhat tricky but the engine does it best to hide this for the user.
+
+This mechanism is rather useless when not wrapped into some high level mechanism
+because by default setting these boxes wipes the existing value. In \LUAMETATEX\
+you can actually access the boxes so prepending and appending is possible but
+experiments showed that this could come with a huge performance hit when the
+lists are not cleaned up during a run. This is why we have introduced indices:
+when you assign local boxes using the index option that specific index will be
+replaced and therefore we have a more sparse solution. So, contrary to \LUATEX,
+in \LUAMETATEX\ the local box registers have a linked lists of local boxes tagged
+by index. Unless you manipulate in \LUA, this is hidden from the user. One can
+access the boxes from the \TEX\ the but there can be no confusion with \LUATEX\
+here because there we don't have access. This is why usage as in \LUATEX\ will
+also work in \LUAMETATEX.
+
+This mechanism obeys grouping as is demonstrated in the next three examples. The
+first example is:
+
+\startbuffer[example-1]
+\start
+    \dorecurse{10}{test #1.1 }
+    \localleftbox{\blackrule[width=2em,color=darkred] }
+    \dorecurse{20}{test #1.2 }
+    \removeunwantedspaces
+    \localrightbox{ \blackrule[width=3em,color=darkblue]}
+    \dorecurse{20}{test #1.3 }
+\stop
+    \dorecurse{20}{test #1.4 }
+    % par ends here
+\stopbuffer
+
+\typebuffer[example-1][option=TEX]
+
+The next example differs in a subtle way: watch the \type {keep} keyword,
+it makes the setting retain after the group ends.
+
+\startbuffer[example-2]
+\start
+    \start
+        \dorecurse{10}{test #1.1 }
+        \localleftbox keep {\blackrule[width=2em,color=darkred] }
+        \dorecurse{20}{test #1.2 }
+        \removeunwantedspaces
+        \localrightbox { \blackrule[width=3em,color=darkblue]}
+        \dorecurse{20}{test #1.3 }
+    \stop
+        \dorecurse{20}{test #1.4 }
+\stop
+% par ends here
+\stopbuffer
+
+\typebuffer[example-2][option=TEX]
+
+The third example has two times \type {keep}. This option is \LUAMETATEX\
+specific.
+
+\startbuffer[example-3]
+\start
+    \start
+        \dorecurse{10}{test #1.1 }
+        \localleftbox keep {\blackrule[width=2em,color=darkred] }
+        \dorecurse{20}{test #1.2 }
+        \removeunwantedspaces
+        \localrightbox keep { \blackrule[width=3em,color=darkblue]}
+        \dorecurse{20}{test #1.3 }
+    \stop
+        \dorecurse{20}{test #1.4 }
+\stop
+% par ends here
+\stopbuffer
+
+\typebuffer[example-3][option=TEX]
+
+\startplacefigure % [location=page]
+    \startcombination[nx=1,ny=3]
+        {\vbox{\hsize\textwidth\getbuffer[example-1]}} {\bf Example 1}
+        {\vbox{\hsize\textwidth\getbuffer[example-2]}} {\bf Example 2}
+        {\vbox{\hsize\textwidth\getbuffer[example-3]}} {\bf Example 3}
+    \stopcombination
+\stopplacefigure
+
+One (nasty) side effect is that when you set these boxes ungrouped they are
+applied to whatever follows, which is why resetting them is built in the relevant
+parts of \CONTEXT. The next examples are typeset grouped an demonstrate the use
+of indices:
+
+\startbuffer
+\dorecurse{20}{before #1 }
+\localleftbox{\bf \darkred L 1 }%
+\localleftbox{\bf \darkred L 2 }%
+\dorecurse{20}{after #1 }
+\stopbuffer
+
+\typebuffer[option=TEX] \start \getbuffer \par \stop
+
+Indices can be set for both sides:
+
+\startbuffer
+\dorecurse{5}{\localrightbox index #1{ \bf \darkgreen R #1}}%
+\dorecurse{20}{before #1 }
+\dorecurse{5}{\localleftbox index #1{\bf \darkred L #1 }}%
+\dorecurse{20}{after #1 }
+\stopbuffer
+
+\typebuffer[option=TEX] \start \getbuffer \par \stop
+
+We can instruct this mechanism to hook the local box into the main
+par node by using the \type {par} keyword. Keep in mind that these
+local boxes only come into play when the lines are broken, so till
+then changing them is possible.
+
+\startbuffer
+\dorecurse{3}{\localrightbox index #1{ \bf \darkgreen R #1}}%
+\dorecurse{20}{before #1 }
+\dorecurse{2}{\localleftbox par index #1{\bf \darkred L #1 }}%
+\dorecurse{20}{after #1 }
+\stopbuffer
+
+\typebuffer[option=TEX] \start \getbuffer \par \stop
+
+\stopsectionlevel
+
+\startsectionlevel[title=The interface]
+
+{\em The interface described here is experimental.}
+
+Because it is hard to foresee if this mechanism will be used at all the \CONTEXT\
+interface is somewhat low level: one can build functionality on top of it. In the
+previous section we saw examples of local boxes being part of the text but one
+reason for extending the interface was to see if we can also use this engine
+feature for efficiently placing marginal content.
+
+\startbuffer[definition]
+\definelocalboxes
+  [lefttext]
+  [location=lefttext,width=3em,color=darkblue]
+\definelocalboxes
+  [lefttextx]
+  [location=lefttext,width=3em,color=darkblue]
+
+\definelocalboxes
+  [righttext]
+  [location=righttext,width=3em,color=darkyellow]
+\definelocalboxes
+  [righttextx]
+  [location=righttext,width=3em,color=darkyellow]
+\stopbuffer
+
+\typebuffer[definition][option=TEX]
+
+\getbuffer[definition]
+
+The order of definition matters! Here the \type {x} variants have a larger index
+number. There can (currently) be at most 256 indices. The defined local boxes
+are triggered with \type {\localbox}:
+
+\startbuffer[example]
+\startnarrower
+\dorecurse{20}{before #1 }%
+\localbox[lefttext]{[L] }%
+\localbox[lefttextx]{[LL] }%
+\localbox[righttext]{ [RR]}%
+\localbox[righttextx]{ [R]}%
+\dorecurse{20}{ after #1}%
+\stopnarrower
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+Watch how we obey the margins:
+
+\getbuffer[example]
+
+Here these local boxes have dimensions. The predefined margin variants are
+virtual. Here we set up the style and color:
+
+\startbuffer[definition]
+\setuplocalboxes
+  [leftmargin]
+  [style=\bs,
+   color=darkgreen]
+\setuplocalboxes
+  [rightmargin]
+  [style=\bs,
+   color=darkred]
+\stopbuffer
+
+\typebuffer[definition][option=TEX]
+
+\startbuffer[example]
+\dorecurse{2}{
+    \dorecurse{10}{some text #1.##1 }%
+    KEY#1.1%
+    \localmargintext[leftmargin]{L #1.1}%
+    \localmargintext[rightmargin]{R #1.1}%
+    \dorecurse{10}{some text #1.##1 }%
+    KEY#1.2%
+    \localmargintext[leftmargin]{L #1.2}%
+    \localmargintext[rightmargin]{R #1.2}%
+    \dorecurse{10}{some text #1.##1 }%
+    \blank
+}
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+You can also use \type {leftedge} and \type {rightedge} but using them here would
+put them outside the page.
+
+{\getbuffer[definition,example]}
+
+In previous examples you can see that setting something at the left will lag behind
+so deep down we use another trick here: \type {\localmiddlebox}. When these boxes
+get placed a callback can be triggered and in \CONTEXT\ we use that to move these
+middle boxes to the margins.
+
+Next we implement line numbers. Watch out: this will not replace the existing
+mechanisms, it's just an alternative as we have alternative table mechanisms. We
+have a repertoire of helpers for constructing the result:
+
+\startbuffer[definition]
+\definelocalboxes
+  [linenumberleft]
+  [command=\LeftNumber,
+   location=middle,
+   distance=\leftmargindistance,
+   width=3em,
+   style=\bs,
+   color=darkred]
+
+\definelocalboxes
+  [linenumberright] % [linenumberleft]
+  [command=\RightNumber,
+   location=middle,
+   distance=\rightmargindistance,
+   width=3em,
+   style=\bf,
+   color=darkgreen]
+
+\definecounter[MyLineNumberL]
+\definecounter[MyLineNumberR]
+
+\setupcounter
+  [MyLineNumberL]
+  [numberconversion=characters]
+
+\setupcounter
+  [MyLineNumberR]
+  [numberconversion=romannumerals]
+
+\def\LineNumberL
+  {\incrementcounter[MyLineNumberL]%
+   \convertedcounter[MyLineNumberL]}
+
+\def\LineNumberR
+  {\incrementcounter[MyLineNumberR]%
+   \convertedcounter[MyLineNumberR]}
+
+\protected\def\LeftNumber
+  {\setbox\localboxcontentbox\hbox
+     to \localboxesparameter{width}
+     {(\LineNumberL\hss\strut)}%
+   \localmarginlefttext\zeropoint}
+
+\protected\def\RightNumber
+  {\setbox\localboxcontentbox\hbox
+     to \localboxesparameter{width}
+     {(\strut\hss\LineNumberR)}%
+   \localmarginrighttext\zeropoint}
+\stopbuffer
+
+\typebuffer[definition][option=TEX]
+
+\startbuffer[example]
+\localbox[linenumberleft]{}%
+\localbox[linenumberright]{}%
+\dorecurse{2}{
+    \samplefile{tufte}
+    \par
+}
+\resetlocalbox[linenumberleft]%
+\resetlocalbox[linenumberright]%
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+We use our tufte example to illustrate the usage:
+
+\getbuffer[definition]
+
+{\getbuffer[example]}
+
+For convenience we support ranges like this (we've reset the line number counters
+here):
+
+\resetcounter[MyLineNumberL]
+\resetcounter[MyLineNumberR]
+
+\startbuffer[example]
+\startlocalboxrange[linenumberleft]%
+\startlocalboxrange[linenumberright]%
+\dorecurse{2}{
+    \samplefile{tufte}
+    \par
+}
+\stoplocalboxrange
+\stoplocalboxrange
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+{\getbuffer[example]}
+
+\stopsectionlevel
+
+\startsectionlevel[title=The helpers]
+
+For the moment we have these helpers:
+
+\starttabulate[|l|;|]
+\NC \type {\localboxindex}            \NC integer   \NC \NR
+\NC \type {\localboxlinenumber}       \NC integer   \NC \NR
+\NC
+\NC \type {\localboxlinewidth}        \NC dimension \NC \NR
+\NC \type {\localboxlocalwidth}       \NC dimension \NC \NR
+\NC \type {\localboxprogress}         \NC dimension \NC \NR
+\NC \type {\localboxleftoffset}       \NC dimension \NC \NR
+\NC \type {\localboxrightoffset}      \NC dimension \NC \NR
+\NC
+\NC \type {\localboxleftskip}         \NC dimension \NC \NR
+\NC \type {\localboxrightskip}        \NC dimension \NC \NR
+\NC \type {\localboxlefthang}         \NC dimension \NC \NR
+\NC \type {\localboxrighthang}        \NC dimension \NC \NR
+\NC
+\NC \type {\localboxindent}           \NC dimension \NC \NR
+\NC \type {\localboxparfillleftskip}  \NC dimension \NC \NR
+\NC \type {\localboxparfillrightskip} \NC dimension \NC \NR
+\NC \type {\localboxovershoot}        \NC dimension \NC \NR
+\NC
+\stoptabulate
+
+The progress and offsets are accumulated values of the normalized indent, hangs,
+skips etc. The line number is the position in the paragraph. In the callback we
+set the box register \type {\localboxcontentbox} and use it after the command has
+been applied. In the line number example you can see how we set its final
+content, so these boxes are sort of dynamic. Normally in the middle case no
+content is passed and in the par builder a middle is not taken into account when
+calculating the line width.
+
+\stopsectionlevel
+
+\stopdocument
+
+
+%     implement { name = "localboxmarkonce",


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-localboxes.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-loops.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-loops.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-loops.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,327 @@
+% language=us runpath=texruns:manuals/lowlevel
+
+\environment lowlevel-style
+
+\startdocument
+  [title=loops,
+   color=middleyellow]
+
+\startsectionlevel[title=Introduction]
+
+I have hesitated long before I finally decided to implement native loops in
+\LUAMETATEX. Among the reasons against such a feature is that one can define
+macros that do loops (preferably using tail recursion). When you don't need an
+expandable loop, counters can be used, otherwise there are dirty and obscure
+tricks that can be of help. This is often the area where tex programmers can show
+off but the fact remains that we're using side effects of the expansion machinery
+and specific primitives like \type {\romannumeral} magic. In \LUAMETATEX\ it is
+actually possible to use the local control mechanism to hide loop counter advance
+and checking but that comes with at a performance hit. And, no matter what tricks
+one used, tracing becomes pretty much cluttered.
+
+In the next sections we describe the new native loop primitives in \LUAMETATEX\ as
+well as the more traditional \CONTEXT\ loop helpers.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Primitives]
+
+Because \METAPOST, which is also a macro language, has native loops, it makes
+sense to also have native loops in \TEX\ and in \LUAMETATEX\ it was not that hard
+to add it. One variant uses the local control mechanism which is reflected in its
+name and two others collect expanded bodies. In the local loop content gets
+injected as we go, so this one doesn't work well in for instance an \type
+{\edef}. The macro takes the usual three loop numbers as well as a token list:
+
+\starttyping[option=TEX]
+\localcontrolledloop 1 100000 1 {%
+    % body
+}
+\stoptyping
+
+Here is an example of usage:
+
+\startbuffer
+\localcontrolledloop 1 5 1 {%
+    [\number\currentloopiterator]
+    \localcontrolledloop 1 10 1 {%
+        (\number\currentloopiterator)
+    }%
+    [\number\currentloopiterator]
+    \par
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+The \type {\currentloopiterator} is a numeric token so you need to explicitly
+serialize it with \type {\number} or \type {\the} if you want it to be typeset:
+
+\startpacked \getbuffer \stoppacked
+
+Here is another example. This time we also show the current nesting:
+
+\startbuffer
+\localcontrolledloop 1 100 1 {%
+    \ifnum\currentloopiterator>6\relax
+        \quitloop
+    \else
+        [\number\currentloopnesting:\number\currentloopiterator]
+        \localcontrolledloop 1 8 1 {%
+            (\number\currentloopnesting:\number\currentloopiterator)
+        }\par
+    \fi
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+Watch the \type {\quitloop}: it will end the loop at the {\em next} iteration so
+any content after it will show up. Normally this one will be issued in a
+condition and we want to end that properly.
+
+\startpacked \getbuffer \stoppacked
+
+The three loop variants all perform differently:
+
+\startbuffer
+l:\testfeatureonce {1000} {\localcontrolledloop 1 2000 1 {\relax}} %
+  \elapsedtime
+e:\testfeatureonce {1000} {\expandedloop        1 2000 1 {\relax}} %
+  \elapsedtime
+u:\testfeatureonce {1000} {\unexpandedloop      1 2000 1 {\relax}} %
+  \elapsedtime
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+An unexpanded loop is (of course) the fastest because it only collects and then
+feeds back the lot. In an expanded loop each cycle does an expansion of the body
+and collects the result which is then injected afterwards, and the controlled
+loop just expands the body each iteration.
+
+\startlines\tttf \getbuffer \stoplines
+
+The different behavior is best illustrated with the following example:
+
+\startbuffer[definition]
+\edef\TestA{\localcontrolledloop 1 5 1 {A}} % out of order
+\edef\TestB{\expandedloop        1 5 1 {B}}
+\edef\TestC{\unexpandedloop      1 5 1 {C\relax}}
+\stopbuffer
+
+\typebuffer[definition][option=TEX]
+
+We can show the effective definition:
+
+\startbuffer[example]
+\meaningasis\TestA
+\meaningasis\TestB
+\meaningasis\TestC
+
+A: \TestA
+B: \TestB
+C: \TestC
+\stopbuffer
+
+\typebuffer[example][option=TEX]
+
+Watch how the first test pushes the content in the main input stream:
+
+\startlines\tttf \getbuffer[definition,example]\stoplines
+
+Here are some examples that show what gets expanded and what not:
+
+\startbuffer
+\edef\whatever
+  {\expandedloop 1 10 1
+     {(\number\currentloopiterator)
+      \scratchcounter=\number\currentloopiterator\relax}}
+
+\meaningasis\whatever
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\startpacked \veryraggedright \tt\tfx \getbuffer \stoppacked
+
+A local control encapsulation hides the assignment:
+
+\startbuffer
+\edef\whatever
+  {\expandedloop 1 10 1
+     {(\number\currentloopiterator)
+      \beginlocalcontrol
+      \scratchcounter=\number\currentloopiterator\relax
+      \endlocalcontrol}}
+
+\meaningasis\whatever
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\blank \start \veryraggedright \tt\tfx \getbuffer \stop \blank
+
+Here we see the assignment being retained but with changing values:
+
+\startbuffer
+\edef\whatever
+  {\unexpandedloop 1 10 1
+     {\scratchcounter=1\relax}}
+
+\meaningasis\whatever
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\blank \start \veryraggedright \tt\tfx \getbuffer \stop \blank
+
+We get no expansion at all:
+
+\startbuffer
+\edef\whatever
+  {\unexpandedloop 1 10 1
+     {\scratchcounter=\the\currentloopiterator\relax}}
+
+\meaningasis\whatever
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\blank \start \veryraggedright \tt\tfx \getbuffer \stop \blank
+
+And here we have a mix:
+
+\startbuffer
+\edef\whatever
+  {\expandedloop 1 10 1
+     {\scratchcounter=\the\currentloopiterator\relax}}
+
+\meaningasis\whatever
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+\blank \start \veryraggedright \tt\tfx \getbuffer \stop \blank
+
+There is one feature worth noting. When you feed three numbers in a row, like here,
+there is a danger of them being seen as one:
+
+\starttyping
+\expandedloop
+  \number\dimexpr1pt
+  \number\dimexpr2pt
+  \number\dimexpr1pt
+  {}
+\stoptyping
+
+This gives an error because a too large number is seen. Therefore, these loops
+permit leading equal signs, as in assignments (we could support keywords but
+it doesn't make much sense):
+
+\starttyping
+\expandedloop =\number\dimexpr1pt =\number\dimexpr2pt =\number\dimexpr1pt{}
+\stoptyping
+
+\stopsectionlevel
+
+\startsectionlevel[title=Wrappers]
+
+We always had loop helpers in \CONTEXT\ and the question is: \quotation {What we
+will gain when we replace the definitions with ones using the above?}. The answer
+is: \quotation {We have little performance but not as much as one expects!}. This
+has to do with the fact that we support \type {#1} as iterator and \type {#2} as
+(verbose) nesting values and that comes with some overhead. It is also the reason
+why these loop macros are protected (unexpandable). However, using the primitives
+might look somewhat more natural in low level \TEX\ code.
+
+Also, replacing their definitions can have side effects because the primitives are
+(and will be) still experimental so it's typically a patch that I will run on my
+machine for a while.
+
+Here is an example of two loops. The inner state variables have one hash, the outer
+one extra:
+
+\startbuffer
+\dorecurse{2}{
+    \dostepwiserecurse{1}{10}{2}{
+        (#1:#2) [##1:##2]
+    }\par
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+We get this:
+
+\startpacked \getbuffer \stoppacked
+
+We can also use two state macro but here we would have to store the outer ones:
+
+\startbuffer
+\dorecurse {2} {
+    /\recursedepth:\recurselevel/
+    \dostepwiserecurse {1} {10} {2} {
+        <\recursedepth:\recurselevel>
+    }\par
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+That gives us:
+
+\startpacked \getbuffer \stoppacked
+
+An endless loop works as follows:
+
+\startbuffer
+\doloop {
+    ...
+    \ifsomeconditionismet
+        ...
+        \exitloop
+    \else
+        ...
+    \fi
+  % \exitloopnow
+    ...
+}
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+Because of the way we quit there will not be a new implementation in terms of
+the loop primitives. You need to make sure that you don't leave in the middle
+of an ongoing condition. The second exit is immediate.
+
+We also have a (simple) expanded variant:
+
+\startbuffer
+\edef\TestX{\doexpandedrecurse{10}{!}} \meaningasis\TestX
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+This helper can be implemented in terms of the loop primitives which makes them a
+bit faster, but these are not critical:
+
+\startpacked \getbuffer \stoppacked
+
+A variant that supports \type {#1} is the following:
+
+\startbuffer
+\edef\TestX{\doexpandedrecursed{10}{#1}} \meaningasis\TestX
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+So:
+
+\startpacked \getbuffer \stoppacked
+
+% private: \dofastloopcs{#1}\cs with % \fastloopindex and \fastloopfinal
+
+\stopsectionlevel
+
+\stopdocument


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-loops.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-macros.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-macros.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-macros.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
 % 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
@@ -14,7 +14,6 @@
 
 % \permanent\tolerant\protected\def\xx[#1]#*#;[#2]#:#3% loops .. todo
 
-
 \usemodule[system-tokens]
 
 \environment lowlevel-style
@@ -23,7 +22,7 @@
   [title=macros,
    color=middleorange]
 
-\startsection[title=Preamble]
+\startsectionlevel[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
@@ -34,9 +33,9 @@
 additions make for easier definitions, but (at least initially) none that could
 not be done before using more code.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Definitions]
+\startsectionlevel[title=Definitions]
 
 A macro definition normally looks like like this: \footnote {The \type
 {\dontleavehmode} command make the examples stay on one line.}
@@ -540,13 +539,34 @@
 \NC *   \NC ignore spaces \NC \NR
 \NC :   \NC pick up scanning here  \NC \NR
 \NC ;   \NC quit scanning \NC \NR
+\ML
+\NC .   \NC ignore pars and spaces \NC \NR
+\NC ,   \NC push back space when quit \NC \NR
 \LL
 \stoptabulate
 
-\stopsection
+The last two have not been discussed and were added later. The period
+directive gobbles space and par tokens and discards them in the
+process. The comma directive is like \type {*} but it pushes back a space
+when the matching quits.
 
-\startsection[title=Runaway arguments]
+\startbuffer
+\tolerant\def\FooA[#1]#*[#2]{(#1/#2)} % remove spaces
+\tolerant\def\FooB[#1]#,[#2]{(#1/#2)} % push back space
 
+/\FooA/ /\FooA / /\FooA[1]/ /\FooA[!] / /\FooA[1] [2]/ /\FooA[1] [2] /\par
+/\FooB/ /\FooB / /\FooB[1]/ /\FooB[!] / /\FooB[1] [2]/ /\FooB[1] [2] /\par
+\stopbuffer
+
+\typebuffer[example][option=TEX] \startpacked \getbuffer[example] \stoppacked
+
+Gobbling spaces versus pushing back is an interface design decision because it
+has to do with consistency.
+
+\stopsectionlevel
+
+\startsectionlevel[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.
 
@@ -591,9 +611,9 @@
 indirectness is that error messages point to the macro that the user called for
 and not to some follow up.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Introspection]
+\startsectionlevel[title=Introspection]
 
 A macro has a meaning. You can serialize that meaning as follows:
 
@@ -639,8 +659,10 @@
 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]
+\stopsectionlevel
 
+\startsectionlevel[title=nesting]
+
 You can nest macros, as in:
 
 \startbuffer
@@ -738,9 +760,9 @@
 only one where dollars, percent signs, ampersands and hashes have special
 meaning.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Prefixes]
+\startsectionlevel[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
@@ -812,10 +834,10 @@
 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
+\typ {\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
+user. One can of course \typ {\unletfrozen} such a command first but as a bonus
+we have a prefix \typ {\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
@@ -824,7 +846,7 @@
 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
+this we have the \typ {\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:
 
@@ -881,24 +903,110 @@
 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
+\stopsectionlevel
 
-\stopdocument
+\startsectionlevel[title=Arguments]
 
-freezing pitfalls:
+The number of arguments that a macro takes is traditionally limited to nine (or
+ten if one takes the trailing \type {#} into account). That this is enough for
+most cases is demonstrated by the fact that \CONTEXT\ has only a handful of
+macros that use \type {#9}. The reason for this limitation is in part a side
+effect of the way the macro preamble and arguments are parsed. However, because
+in \LUAMETATEX\ we use a different implementation, it was not that hard to permit
+a few more arguments, which is why we support upto 15 arguments, as in:
 
-- \futurelet  : \overloaded needed
-- \let        : \overloaded sometimes needed
+\starttyping[option=TEX]
+\def\foo#1#2#3#4#5#6#7#8#9#A#B#C#D#E#F{...}
+\stoptyping
 
-primitive protection:
+We can support the whole alphabet without much trouble but somehow sticking to
+the hexadecimal numbers makes sense. It is unlikely that the core of \CONTEXT\
+will use this option but sometimes at the user level it can be handy. The penalty
+in terms of performance can be neglected.
 
-\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?
+\starttyping[option=TEX]
+\tolerant\def\foo#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=%
+  {(#1)(#2)(#3)(#4)(#5)(#6)(#7)(#8)(#9)(#A)(#B)(#C)(#D)(#E)(#F)}
 
-immutable : still \count000 but we can consider blocking that, for instance
-by \def\count{some error}
+\foo{1}{2}
+\stoptyping
 
-\defcsname
-\edefcsname
-\letcsname
+In the previous example we have 15 optional arguments where braces are mandate
+(otherwise we the scanner happily scoops up what follows which for sure gives some
+error).
+
+\stopsectionlevel
+
+\startsectionlevel[title=Constants]
+
+The \LUAMETATEX\ engine has lots of efficiency tricks in the macro parsing and
+expansion code that makes it not only fast but also let is use less memory.
+However, every time that the body of a macro is to be injected the expansion
+machinery kicks in. This often means that a copy is made (pushed in the input and
+used afterwards). There are however cases where the body is just a list of
+character tokens (with category letter or other) and no expansion run over the
+list is needed.
+
+It is tempting to introduce a string data type that just stores strings and
+although that might happen at some point it has the disadvantage that one need to
+tokenize that string in order to be able to use it, which then defeats the gain.
+An alternative has been found in constant macros, that is: a macro without
+parameters and a body that is considered to be expanded and never freed by
+redefinition. There are two variants:
+
+\starttyping[option=TEX]
+\cdef      \foo          {whatever}
+\cdefcsname foo\endcsname{whatever}
+\stoptyping
+
+These are actually just equivalents to
+
+\starttyping[option=TEX]
+\edef      \foo          {whatever}
+\edefcsname foo\endcsname{whatever}
+\stoptyping
+
+just to make sure that the body gets expanded at definition time but they are
+also marked as being constant which in some cases might give some gain, for
+instance when used in csname construction. The gain is less then one expects
+although there are a few cases in \CONTEXT\ where extreme usage of parameters
+benefits from it. Users are unlikely to use these two primitives.
+
+Another example of a constant usage is this:
+
+\starttyping[option=TEX]
+\lettonothing\foo
+\stoptyping
+
+which gives \type {\foo} an empty body. That one is used in the core, if only because
+it gives a bit smaller code. Performance is no that different from
+
+\starttyping[option=TEX]
+\let\foo\empty
+\stoptyping
+
+but it saves one token (8 bytes) when used in a macro. The assignment itself is
+not that different because \type {\foo} is made an alias to \type {\empty} which
+in turn only needs incrementing a reference counter.
+
+\stopsectionlevel
+
+\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

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-marks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-marks.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-marks.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,511 @@
+% language=us runpath=texruns:manuals/lowlevel
+
+\environment lowlevel-style
+
+\startdocument
+  [title=marks,
+   color=middlemagenta]
+
+\startsectionlevel[title=Introduction]
+
+Marks are one of the subsystems of \TEX, as are for instance alignments and math
+as well as inserts which they share some properties with. Both inserts and marks
+put signals in the list that later on get intercepted and can be used to access
+stored information. In the case of inserts this is typeset materials, like
+footnotes, and in the case of marks it's token lists. Inserts are taken into
+account when breaking pages, and marks show up when a page has been broken and is
+presented to the output routine. Marks are used for running headers but other
+applications are possible.
+
+In \MKII\ marks are used to keep track of colors, transparencies and more
+properties that work across page boundaries. It permits picking up at the top of
+a page from where one left at the bottom of the preceding one. When \MKII\ was
+written there was only one mark so on top of that a multiple mark mechanism was
+implemented that filtered specific marks from a collection. Later, \ETEX\
+provided mark classes so that mechanism could be simplified. Although it is not
+that hard to do, this extension to \TEX\ didn't add any further features, so we
+can assume that there was no real demand for that. \footnote {This is probably
+true for most \LUATEX\ and \LUAMETATEX\ extensions, maybe example usage create
+retrospective demand. But one reason for picking up on engine development is that
+in the \CONTEXT\ perspective we actually had some demands.}
+
+But, marks have some nasty limitations, so from the \CONTEXT\ perspective there
+always was something to wish for. When you hide marks in boxes they will not be
+seen (the same is true for inserts). You cannot really reset them either. Okay,
+you can set them to nothing, but even then already present marks are still there.
+The \LUATEX\ engine has a \type {\clearmarks} primitive but that works global. In
+\LUAMETATEX\ a proper mark flusher is available. That engine also can work around
+the deeply nested disappearing marks. In addition, the current state of a mark
+can be queried and we have some tracing facilities.
+
+In \MKIV\ the engine's marks were not used at all and an alternative mechanism
+was written using \LUA. It actually is one of the older \MKIV\ features. It
+doesn't have the side effects that native marks have but it comes at the price of
+more overhead, although that is bearable.
+
+In this document we discuss marks but assume that \LUAMETATEX\ is used with
+\CONTEXT\ \LMTX. There we experiment with using the native marks, complemented by
+a few \LUA\ mechanisms, but it is to be seen if that will be either a replacement
+or an alternative.
+
+\stopsectionlevel
+
+\startsectionlevel[title=The basics]
+
+Although the original \TEX\ primitives are there, the plural \ETEX\ mark commands
+are to be used. Marks, signals with token lists, are set with:
+
+\starttyping[option=TEX]
+\marks0{This is mark 0} % equivalent to: \mark{This is mark 0}
+\marks4{This is mark 4}
+\stoptyping
+
+When a page has been split off, you can (normally this only makes sense in the
+output routine) access marks with:
+
+\starttyping[option=TEX]
+\topmarks  4
+\firstmarks4
+\botmarks  4
+\stoptyping
+
+A \quote {top} mark is the last one on the previous page(s), the \quote {first}
+and \quote {bottom} refer to the current page. A mark is a so called node,
+something that ends up in the current list and the token list is stored with it.
+The accessors are just commands and they fetch the token list from a separately
+managed storage. When you set or access a mark that has not yet been used, the
+storage is bumped to the right size, so it doesn't make sense to use e.g. \type
+{\marks 999} when there are no 998 ones too: it not only takes memory, it also
+makes \TEX\ run over all these mark stores when synchronization happens. The best
+way to make sure that you are sparse is:
+
+\starttyping[option=TEX]
+\newmarks\MyMark
+\stoptyping
+
+Currently the first 16 marks are skipped so this makes \type {\MyMark} become
+mark 17. The reason is that we want to make sure that users who experiment with
+marks have some scratch marks available and don't overload system defined ones.
+Future versions of \CONTEXT\ might become more restrictive.
+
+Marks can be cleared with:
+
+\starttyping[option=TEX]
+\clearmarks 4
+\stoptyping
+
+which clears the storage that keeps the top, first and bot marks. This happens
+immediately. You can delay this by putting a signal in the list:
+
+\starttyping[option=TEX]
+\flushmarks 4
+\stoptyping
+
+This (\LUAMETATEX) feature makes it for instance easy to reset marks that keep
+track of section (and lower) titles when a new chapter starts. Of course it still
+means that one has to implement some mechanism that deals with this but \CONTEXT\
+always had that.
+
+The current, latest assigned, value of a mark is available too:
+
+\starttyping[option=TEX]
+\currentmarks 4
+\stoptyping
+
+Using this value in for instance headers and footers makes no sense because the
+last node set can be on a following page.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Migration]
+
+In the introduction we mentioned that \LUAMETATEX\ has migration built in. In
+\MKIV\ we have this as option too, but there it is delegated to \LUA. It permits
+deeply nested inserts (notes) and marks (but we don't use native marks in \MKIV).
+
+Migrated marks end up in the postmigrated sublist of a box. In other lowlevel
+manuals we discuss these pre- and postmigrated sublists. As example we use this
+definition:
+
+\startbuffer
+\setbox0\vbox\bgroup
+test \marks 4 {mark 4.1}\par
+test \marks 4 {mark 4.1}\par
+test \marks 4 {mark 4.1}\par
+\egroup
+\stopbuffer
+
+\typebuffer[option=TEX]
+
+% {\automigrationmode"FF \getbuffer\showbox0}
+% {\automigrationmode"00 \getbuffer\showbox0}
+
+When we turn migration on (officially the second bit):
+
+\starttyping[option=TEX]
+\automigrationmode"FF \showbox0
+\stoptyping
+
+we get this:
+
+\start \switchtobodyfont[5pt]
+\starttyping[option=TEX]
+> \box0=
+2:4: \vbox[normal][...], width 483.69687, height 63.43475, depth 0.15576, direction l2r
+2:4: .\list
+2:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
+2:4: ...\list
+2:4: ....\glue[left hang][...] 0.0pt
+2:4: ....\glue[left][...] 0.0pt
+2:4: ....\glue[parfillleft][...] 0.0pt
+2:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
+2:4: ....\glue[indent][...] 0.0pt
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
+2:4: ....\penalty[line][...] 10000
+2:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
+2:4: ....\glue[right][...] 0.0pt
+2:4: ....\glue[right hang][...] 0.0pt
+2:4: ..\glue[par][...] 11.98988pt plus 3.99663pt minus 3.99663pt
+2:4: ..\glue[baseline][...] 8.34883pt
+2:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
+2:4: ...\list
+2:4: ....\glue[left hang][...] 0.0pt
+2:4: ....\glue[left][...] 0.0pt
+2:4: ....\glue[parfillleft][...] 0.0pt
+2:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
+2:4: ....\glue[indent][...] 0.0pt
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
+2:4: ....\penalty[line][...] 10000
+2:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
+2:4: ....\glue[right][...] 0.0pt
+2:4: ....\glue[right hang][...] 0.0pt
+2:4: ..\glue[par][...] 11.98988pt plus 3.99663pt minus 3.99663pt
+2:4: ..\glue[baseline][...] 8.34883pt
+2:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
+2:4: ...\list
+2:4: ....\glue[left hang][...] 0.0pt
+2:4: ....\glue[left][...] 0.0pt
+2:4: ....\glue[parfillleft][...] 0.0pt
+2:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
+2:4: ....\glue[indent][...] 0.0pt
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
+2:4: ....\penalty[line][...] 10000
+2:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
+2:4: ....\glue[right][...] 0.0pt
+2:4: ....\glue[right hang][...] 0.0pt
+2:4: .\postmigrated
+2:4: ..\mark[4][...]
+2:4: ..{mark 4.1}
+2:4: ..\mark[4][...]
+2:4: ..{mark 4.1}
+2:4: ..\mark[4][...]
+2:4: ..{mark 4.1}
+\stoptyping
+\stop
+
+When we don't migrate, enforced with:
+
+\starttyping[option=TEX]
+\automigrationmode"00 \showbox0
+\stoptyping
+
+the result is:
+
+\start \switchtobodyfont[5pt]
+\starttyping[option=TEX]
+> \box0=
+2:4: \vbox[normal][...], width 483.69687, height 63.43475, depth 0.15576, direction l2r
+2:4: .\list
+2:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
+2:4: ...\list
+2:4: ....\glue[left hang][...] 0.0pt
+2:4: ....\glue[left][...] 0.0pt
+2:4: ....\glue[parfillleft][...] 0.0pt
+2:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
+2:4: ....\glue[indent][...] 0.0pt
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
+2:4: ....\penalty[line][...] 10000
+2:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
+2:4: ....\glue[right][...] 0.0pt
+2:4: ....\glue[right hang][...] 0.0pt
+2:4: ..\mark[4][...]
+2:4: ..{mark 4.1}
+2:4: ..\glue[par][...] 11.98988pt plus 3.99663pt minus 3.99663pt
+2:4: ..\glue[baseline][...] 8.34883pt
+2:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
+2:4: ...\list
+2:4: ....\glue[left hang][...] 0.0pt
+2:4: ....\glue[left][...] 0.0pt
+2:4: ....\glue[parfillleft][...] 0.0pt
+2:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
+2:4: ....\glue[indent][...] 0.0pt
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
+2:4: ....\penalty[line][...] 10000
+2:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
+2:4: ....\glue[right][...] 0.0pt
+2:4: ....\glue[right hang][...] 0.0pt
+2:4: ..\mark[4][...]
+2:4: ..{mark 4.1}
+2:4: ..\glue[par][...] 11.98988pt plus 3.99663pt minus 3.99663pt
+2:4: ..\glue[baseline][...] 8.34883pt
+2:4: ..\hbox[line][...], width 483.69687, height 7.48193, depth 0.15576, glue 459.20468fil, direction l2r
+2:4: ...\list
+2:4: ....\glue[left hang][...] 0.0pt
+2:4: ....\glue[left][...] 0.0pt
+2:4: ....\glue[parfillleft][...] 0.0pt
+2:4: ....\par[newgraf][...], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 200, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
+2:4: ....\glue[indent][...] 0.0pt
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000065 e
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000073 s
+2:4: ....\glyph[32768][...], language (n=1,l=2,r=3), hyphenationmode "79F3F, options "80, font <8: DejaVuSerif @ 11.0pt>, glyph U+000074 t
+2:4: ....\glue[space][...] 3.49658pt plus 1.74829pt minus 1.16553pt, font 8
+2:4: ....\penalty[line][...] 10000
+2:4: ....\glue[parfill][...] 0.0pt plus 1.0fil
+2:4: ....\glue[right][...] 0.0pt
+2:4: ....\glue[right hang][...] 0.0pt
+2:4: ..\mark[4][...]
+2:4: ..{mark 4.1}
+\stoptyping
+\stop
+
+When you say \type {\showmakeup} or in this case \type {\showmakeup[mark]} the marks
+are visualized:
+
+\startlinecorrection
+    \startcombination
+        {\framed{\automigrationmode"FF \showmakeup[mark]\hsize2cm \getbuffer\box0}} {enabled}
+        {\framed{\automigrationmode"00 \showmakeup[mark]\hsize2cm \getbuffer\box0}} {disabled}
+    \stopcombination
+\stoplinecorrection
+
+Here \type {sm} means \quote {set mark} while \type {rm} would indicate a \quote
+{reset mark}. Of course migrated marks don't show up because these are bound to
+the box and thereby have become a a specific box property as can be seen in the
+above trace.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Tracing]
+
+The \LUAMETATEX\ engine has a dedicated tracing option for marks. The fact that
+the traditional engine doesn't have this can be seen as indication that this is
+seldom needed.
+
+\starttyping[option=TEX]
+\tracingmarks1
+\tracingonline2
+\stoptyping
+
+When tracing is set to 1 we get a list of marks for the just split of page:
+
+\starttyping
+2:7: <mark class 51, top := bot>
+2:7: ..{sample 9.1}
+2:7: <mark class 51: first := mark>
+2:7: ..{sample 10.1}
+2:7: <mark class 51: bot := mark>
+2:7: ..{sample 10.1}
+2:7: <mark class 51, page state>
+2:7: ..top {sample 9.1}
+2:7: ..first {sample 10.1}
+2:7: ..bot {sample 10.1}
+\stoptyping
+
+When tracing is set to 2 you also get details we get a list of marks of the analysis:
+
+\starttyping
+1:9: <mark class 51, top := bot>
+1:9: ..{sample 5.1}
+1:9: <mark class 51: first := mark>
+1:9: ..{sample 6.1}
+1:9: <mark class 51: bot := mark>
+1:9: ..{sample 6.1}
+1:9: <mark class 51: bot := mark>
+1:9: ..{sample 7.1}
+1:9: <mark class 51: bot := mark>
+1:9: ..{sample 8.1}
+1:9: <mark class 51: bot := mark>
+1:9: ..{sample 9.1}
+1:9: <mark class 51, page state>
+1:9: ..top {sample 5.1}
+1:9: ..first {sample 6.1}
+1:9: ..bot {sample 9.1}
+\stoptyping
+
+\stopsectionlevel
+
+\startsectionlevel[title=High level commands]
+
+I think that not that many users define their own marks. They are useful for
+showing section related titles in headers and footers but the implementation of
+that is hidden. The native mark references are \type {top}, \type {first} and
+\type {bottom} but in the \CONTEXT\ interface we use different keywords.
+
+\starttabulate[|||||]
+\FL
+\BC \CONTEXT         \BC \TEX  \BC column                  \BC page                  \NC \NR
+\ML
+\NC \type {previous} \NC top   \NC last before sync        \NC last on previous page \NC \NR
+%NC \type {next}     \NC       \NC first after sync        \NC                       \NC \NR
+\NC \type {top}      \NC first \NC first in sync           \NC first on page         \NC \NR
+\NC \type {bottom}   \NC bot   \NC last in sync            \NC last on page          \NC \NR
+\NC \type {first}    \NC top   \NC first not top in sync   \NC first on page         \NC \NR
+\NC \type {last}     \NC bot   \NC last not bottom in sync \NC last on page          \NC \NR
+\ML
+\NC \type {default}  \NS[2][c] the same as \type {first} \NC \NR
+\NC \type {current}  \NS[2][c] the last set value        \NC \NR
+\LL
+\stoptabulate
+
+In order to separate marks in \CONTEXT\ from those in \TEX, the term \quote
+{marking} is used. In \MKIV\ the regular marks mechanism is of course there but,
+as mentioned, not used. By using a different namespace we could make the
+transition from \MKII\ to \MKIV\ (the same is true for some more mechanisms).
+
+A marking is defined with
+
+\starttyping[option=TEX]
+\definemarking[MyMark]
+\stoptyping
+
+A defined marking can be set with two equivalent commands:
+
+\starttyping[option=TEX]
+\setmarking[MyMark]{content}
+\marking   [MyMark]{content}
+\stoptyping
+
+The content is not typeset but stored as token list. In the sectioning mechanism
+that uses markings we don't even store titles, we store a reference to a title.
+In order to use that (deep down) we hook in a filter command. By default that command
+does nothing:
+
+\starttyping[option=TEX]
+\setupmarking[MyMark][filtercommand=\firstofoneargument]
+\stoptyping
+
+The token list does {\em not} get expanded by default, unless you set it up:
+
+\starttyping[option=TEX]
+\setupmarking[MyMark][expansion=yes]
+\stoptyping
+
+The current state of a marking can be cleared with:
+
+\starttyping[option=TEX]
+\clearmarking[MyMark]
+\stoptyping
+
+but because that en is not synchronized the real deal is:
+
+\starttyping[option=TEX]
+\resetmarking[MyMark]
+\stoptyping
+
+Be aware that it introduces a node in the list. You can test if a marking is
+defined with (as usual) a test macro. Contrary to (most) other test macros this
+one is fully expandable:
+
+\starttyping[option=TEX]
+\doifelsemarking {MyMark} {
+    defined
+} {
+    undefined
+}
+\stoptyping
+
+Because there can be a chain involved, we can relate markings. Think of sections
+below chapters and subsections below sections:
+
+\starttyping[option=TEX]
+\relatemarking[MyMark][YourMark]
+\stoptyping
+
+When a marking is set its relatives are also reset, so setting \type {YourMark}
+will reset \type {MyMark}. It is this kind of features that made for marks being
+wrapped into high level commands very early in the \CONTEXT\ development (and one
+can even argue that this is why a package like \CONTEXT\ exists in the first
+place).
+
+The rest of the (relatively small) repertoire of commands has to do with fetching
+markings. The general command is \type {\getmarking} that takes two or three
+arguments:
+
+\starttyping[option=TEX]
+\getmarking[MyMarking][first]
+\getmarking[MyMarking][page][first]
+\getmarking[MyMarking][page][first]
+\getmarking[MyMarking][column:1][first]
+\stoptyping
+
+There are (normally) three marks that can be fetched so we have three commands
+that do just that:
+
+\starttyping[option=TEX]
+\fetchonemark [MyMarking][which one]
+\fetchtwomarks[MyMarking]
+\fetchallmarks[MyMarking]
+\stoptyping
+
+You can setup a \type {separator} key which by default is:
+
+\starttyping[option=TEX]
+\setupmarking[MyMarking][separator=\space\emdash\space]
+\stoptyping
+
+Injection is enabled by default due to this default:
+
+\starttyping[option=TEX]
+\setupmarking[MyMarking][state=start]
+\stoptyping
+
+The following three variants are (what is called) fully expandable:
+
+\starttyping[option=TEX]
+\fetchonemarking [MyMarking][which one]
+\fetchtwomarkings[MyMarking]
+\fetchallmarkings[MyMarking]
+\stoptyping
+
+% \resetsynchronizemarking[#1]%
+% \synchronizemarking[#1][#2][#3]% (#3: options (no longer used))
+
+\stopsectionlevel
+
+\startsectionlevel[title=Pitfalls]
+
+The main pitfall is that a (re)setting a mark will inject a node which in
+vertical mode can interfere with spacing. In for instance section commands we
+wrap them with the title so there it should work out okay.
+
+\stopsectionlevel
+
+\stopdocument
+
+% Musical timestamp: videos showing up on YT with Nandi Bushell performing with
+% Dave Grohl (e.g. https://www.youtube.com/watch?v=_AVkGj41RuA) ... the highlight
+% of a nice and emotional thread of exchange between a young and capable energetic
+% drummer challenging an experienced musician. During the pandemic one could
+% witness quite some interesting musical experiments and Nandi and Yoyoka are some
+% inspiring discoveries.


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-marks.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
 \environment lowlevel-style
 
@@ -6,7 +6,7 @@
   [title=paragraphs,
    color=middlecyan]
 
-\startsection[title=Introduction]
+\startsectionlevel[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\
@@ -29,9 +29,9 @@
 them, make sure they don't interfere; they are not part of the updates, contrary
 to \type {cont-new.mkxl}.}
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Paragraphs]
+\startsectionlevel[title=Paragraphs]
 
 Before we demonstrate some trickery, let's see what a paragraph is. Normally a
 document source is formatted like this:
@@ -200,9 +200,9 @@
 par equivalent token. The primitive is is just nicer (and easier on the log when
 tracing is enabled).
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Properties]
+\startsectionlevel[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
@@ -218,46 +218,45 @@
 {\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
+\BC variable                       \BC category        \BC code                                        \NC \NR
+\NC \type {\hsize}                 \NC hsize           \NC 0x\uchexnumbers\hsizefrozenparcode          \NC \NR
+\NC \type {\leftskip}              \NC skip            \NC 0x\uchexnumbers\skipfrozenparcode           \NC \NR
+\NC \type {\rightskip}             \NC skip            \NC 0x\uchexnumbers\skipfrozenparcode           \NC \NR
+\NC \type {\hangindent}            \NC hang            \NC 0x\uchexnumbers\hangfrozenparcode           \NC \NR
+\NC \type {\hangafter}             \NC hang            \NC 0x\uchexnumbers\hangfrozenparcode           \NC \NR
+\NC \type {\parindent}             \NC indent          \NC 0x\uchexnumbers\indentfrozenparcode         \NC \NR
+\NC \type {\parfillleftskip}       \NC par fill        \NC 0x\uchexnumbers\parfillfrozenparcode        \NC \NR
+\NC \type {\parfillrightskip}      \NC par fill        \NC 0x\uchexnumbers\parfillfrozenparcode        \NC \NR
+\NC \type {\adjustspacing}         \NC adjust          \NC 0x\uchexnumbers\adjustfrozenparcode         \NC \NR
+\NC \type {\adjustspacingstep}     \NC adjust          \NC 0x\uchexnumbers\adjustfrozenparcode         \NC \NR
+\NC \type {\adjustspacingshrink}   \NC adjust          \NC 0x\uchexnumbers\adjustfrozenparcode         \NC \NR
+\NC \type {\adjustspacingstretch}  \NC adjust          \NC 0x\uchexnumbers\adjustfrozenparcode         \NC \NR
+\NC \type {\protrudechars}         \NC protrude        \NC 0x\uchexnumbers\protrudefrozenparcode       \NC \NR
+\NC \type {\pretolerance}          \NC tolerance       \NC 0x\uchexnumbers\tolerancefrozenparcode      \NC \NR
+\NC \type {\tolerance}             \NC tolerance       \NC 0x\uchexnumbers\tolerancefrozenparcode      \NC \NR
+\NC \type {\emergencystretch}      \NC stretch         \NC 0x\uchexnumbers\stretchfrozenparcode        \NC \NR
+\NC \type {\looseness}             \NC looseness       \NC 0x\uchexnumbers\loosenessfrozenparcode      \NC \NR
+\NC \type {\lastlinefit}           \NC last line       \NC 0x\uchexnumbers\lastlinefrozenparcode       \NC \NR
+\NC \type {\linepenalty}           \NC line penalty    \NC 0x\uchexnumbers\linepenaltyfrozenparcode    \NC \NR
+\NC \type {\interlinepenalty}      \NC line penalty    \NC 0x\uchexnumbers\linepenaltyfrozenparcode    \NC \NR
+\NC \type {\interlinepenalties}    \NC line penalty    \NC 0x\uchexnumbers\linepenaltyfrozenparcode    \NC \NR
+\NC \type {\clubpenalty}           \NC club penalty    \NC 0x\uchexnumbers\clubpenaltyfrozenparcode    \NC \NR
+\NC \type {\clubpenalties}         \NC club penalty    \NC 0x\uchexnumbers\clubpenaltyfrozenparcode    \NC \NR
+\NC \type {\widowpenalty}          \NC widow penalty   \NC 0x\uchexnumbers\widowpenaltyfrozenparcode   \NC \NR
+\NC \type {\widowpenalties}        \NC widow penalty   \NC 0x\uchexnumbers\widowpenaltyfrozenparcode   \NC \NR
+\NC \type {\displaywidowpenalty}   \NC display penalty \NC 0x\uchexnumbers\displaypenaltyfrozenparcode \NC \NR
+\NC \type {\displaywidowpenalties} \NC display penalty \NC 0x\uchexnumbers\displaypenaltyfrozenparcode \NC \NR
+\NC \type {\brokenpenalty}         \NC broken penalty  \NC 0x\uchexnumbers\brokenpenaltyfrozenparcode  \NC \NR
+\NC \type {\adjdemerits}           \NC demerits        \NC 0x\uchexnumbers\demeritsfrozenparcode       \NC \NR
+\NC \type {\doublehyphendemerits}  \NC demerits        \NC 0x\uchexnumbers\demeritsfrozenparcode       \NC \NR
+\NC \type {\finalhyphendemerits}   \NC demerits        \NC 0x\uchexnumbers\demeritsfrozenparcode       \NC \NR
+\NC \type {\parshape}              \NC shape           \NC 0x\uchexnumbers\shapefrozenparcode          \NC \NR
+\NC \type {\baselineskip}          \NC line            \NC 0x\uchexnumbers\linefrozenparcode           \NC \NR
+\NC \type {\lineskip}              \NC line            \NC 0x\uchexnumbers\linefrozenparcode           \NC \NR
+\NC \type {\lineskiplimit}         \NC line            \NC 0x\uchexnumbers\linefrozenparcode           \NC \NR
+\NC \type {\hyphenationmode}       \NC hyphenation     \NC 0x\uchexnumbers\hyphenationfrozenparcode    \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
@@ -319,9 +318,9 @@
 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
+\stopsectionlevel
 
-\startsection[title=Wrapping up]
+\startsectionlevel[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
@@ -343,10 +342,24 @@
 % $$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
+% \starttext
+% \starttabulate[|||]
+%     \NC test \NC test \NC \NR
+%     \NC test \NC \hbox{\hbox{\hbox{\vadjust pre {\kern-12pt}}}}test \NC \NR
+%     \NC test \NC \hbox{\hbox{\hbox{\vadjust     {\kern-12pt}}}}test \NC \NR
+%     \NC test \NC test \NC \NR
+% \stoptabulate
+% \starttabulate[||p|]
+%     \NC test \NC test \NC \NR
+%     \NC test \NC \hbox{\vadjust{\kern-22pt}}test \NC \NR
+%     \NC test \NC test \NC \NR
+% \stoptabulate
+% \stoptext
 
-\startsection[title=Hanging]
+\stopsectionlevel
 
+\startsectionlevel[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
@@ -377,9 +390,9 @@
 \stopcombination
 \stopplacefigure
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Shapes]
+\startsectionlevel[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
@@ -907,11 +920,73 @@
 \stopcombination
 \stopplacefigure
 
-\stopsection
+The shape mechanism has a few more tricks but these are really meant for usage
+in specific situations, where one knows what one deals with. The following
+examples are visualized in \in {figure} [fig:flow].
 
-% \startsection[title=Linebreaks]
-\startsection[title=Modes]
+\startbuffer[jano]
+\useMPlibrary[dum]
+\usemodule[article-basics]
 
+\startbuffer
+    \externalfigure[dummy][width=6cm]
+\stopbuffer
+
+\startshapedparagraph[text=\getbuffer]
+    \dorecurse{3}{\samplefile{ward}\par}
+\stopshapedparagraph
+
+\page
+
+\startshapedparagraph[text=\getbuffer,distance=1em]
+    \dorecurse{3}{\samplefile{ward}\par}
+\stopshapedparagraph
+
+\page
+
+\startshapedparagraph[text=\getbuffer,distance=1em,
+        hoffset=-2em]
+    \dorecurse{3}{\samplefile{ward}\par}
+\stopshapedparagraph
+
+\page
+
+\startshapedparagraph[text=\getbuffer,distance=1em,
+        voffset=-2ex,hoffset=-2em]
+    \dorecurse{3}{\samplefile{ward}\par}
+\stopshapedparagraph
+
+\page
+
+\startshapedparagraph[text=\getbuffer,distance=1em,
+        voffset=-2ex,hoffset=-2em,lines=1]
+    \dorecurse{3}{\samplefile{ward}\par}
+\stopshapedparagraph
+
+\page
+
+\startshapedparagraph[width=4cm,lines=4]
+    \dorecurse{3}{\samplefile{ward}\par}
+\stopshapedparagraph
+\stopbuffer
+
+\typebuffer[jano]
+
+\startplacefigure[title={Flow around something},reference=fig:flow]
+    \startcombination[nx=3,ny=2]
+        {\typesetbuffer[jano][page=1,frame=on,width=\measure{combination}]}{}
+        {\typesetbuffer[jano][page=2,frame=on,width=\measure{combination}]}{}
+        {\typesetbuffer[jano][page=3,frame=on,width=\measure{combination}]}{}
+        {\typesetbuffer[jano][page=4,frame=on,width=\measure{combination}]}{}
+        {\typesetbuffer[jano][page=5,frame=on,width=\measure{combination}]}{}
+        {\typesetbuffer[jano][page=6,frame=on,width=\measure{combination}]}{}
+    \stopcombination
+\stopplacefigure
+
+\stopsectionlevel
+
+\startsectionlevel[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
@@ -921,23 +996,403 @@
 
 {\em todo: some of the side effects of so called modes}
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Normalization]
+\startsectionlevel[title=Leaders]
 
+Leaders are a basic feature that users probably never run into directly. They
+repeat content till it fits the specified width which can be stretched out. The
+content is typeset once and it is the backend that does the real work of
+repetition.
+
+\startbuffer
+\strut\leaders \hbox{!}\hfill\strut
+\strut\xleaders\hbox{!}\hfill\strut
+\strut\cleaders\hbox{!}\hfill\strut
+\strut\gleaders\hbox{!}\hfill\strut
+\stopbuffer
+
+\typebuffer
+
+Here \type {\leaders} starts at the left edge and are repeats the box as long as
+it fits, \type {\xleaders} spreads till the edges and \type {\cleaders} centers
+the lot. The \type {\gleaders} primitive (which is not in orginal \TEX) takes the
+outer box as reference and further behaves like \type {\cleaders}.
+
+\startlines \showmakeup[line] \getbuffer \stoplines
+
+The leader primitives take box or rule but in \LUAMETATEX\ a glyph can also be
+specified, which saves wrapping in a box.
+
+\startbuffer
+\ruledvbox \bgroup \hsize 10cm
+    \strut\cleaders\hbox{!}\hfill\strut
+\egroup
+
+\ruledvbox \bgroup \hsize 10cm
+    \strut\cleaders\hrule\hfill\strut
+\egroup
+
+\ruledvbox \bgroup \hsize 10cm
+    \strut\cleaders\glyph`!\hfill\strut
+\egroup
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+The \LUAMETATEX\ engine also introduced \type {\uleaders}
+
+\definecolor[tred]  [r=.6,a=1,t=.5]
+\definecolor[tgreen][g=.6,a=1,t=.5]
+\definecolor[tblue] [b=.6,a=1,t=.5]
+
+\startbuffer[one]
+    x xx xxx xxxx
+    \ruledhbox{L\hss R}\space
+    x xx xxx xxxx
+\stopbuffer
+
+\startbuffer[two]
+    x xx xxx xxxx
+    \uleaders\backgroundhbox[gray]{L\hss R}\hskip\zeropoint plus 100pt\relax\space
+    x xx xxx xxxx
+\stopbuffer
+
+\startbuffer[three]
+    x xx xxx xxxx
+    \uleaders\ruledhbox{L\hss R}\hskip\zeropoint plus 100pt\relax\space
+    x xx xxx xxxx
+\stopbuffer
+
+We show three boxes, a regular one first (red):
+
+\typebuffer[one]
+
+The second one (blue) is also a box but one that stretches upto 100pt and is in a
+later stage, when the paragraph has been built, is repackaged to the effective
+width. The third example (green) leaves out the background.
+
+\startlinecorrection
+\startoverlay
+    {\vbox{\color[tgreen]{\small\dorecurse {20} {\getbuffer[three]}}}}
+    {\vbox{\color[tblue] {\small\dorecurse {20} {\getbuffer  [two]}}}}
+    {\vbox{\color[tred]  {\small\dorecurse {20} {\getbuffer  [one]}}}}
+\stopoverlay
+\stoplinecorrection
+
+In \CONTEXT\ we have wrapped this feature in the adaptive box mechanism, so here
+a few a few examples:
+
+\setupexternalfigures[location={default,local,global}]
+
+\startbuffer
+\startsetups adaptive:test:a
+    \setbox\usedadaptivebox\vbox to \usedadaptivetotal \bgroup
+        \externalfigure
+          [cow.pdf]
+          [width=\framedmaxwidth,
+           frame=on,
+           height=\usedadaptivetotal]%
+   \egroup
+\stopsetups
+
+\startsetups adaptive:test:b
+    \setbox\usedadaptivebox\vbox to \usedadaptivetotal \bgroup
+        \externalfigure
+          [cow.pdf]
+          [width=\usedadaptivewidth,
+           frame=on,
+           height=\usedadaptivetotal]%
+   \egroup
+\stopsetups
+\stopbuffer
+
+\typebuffer \getbuffer
+
+We use this as follows (see \in {figure} [fig:adaptive] for the result):
+
+\startbuffer
+\framed[height=18cm,align=middle,adaptive=yes,top=,bottom=] {%
+    \begstrut \samplefile{tufte} \endstrut
+    \par
+    \adaptivevbox
+      [strut=yes,setups=adaptive:test:a]
+      {\showstruts\strut\hsize5cm\hss}%
+    \par
+    \adaptivevbox
+      [strut=yes,setups=adaptive:test:b]
+      {\showstruts\strut\hsize5cm\hss}%
+    \par
+    \begstrut \samplefile{tufte} \endstrut
+}
+\stopbuffer
+
+\typebuffer
+
+\startplacefigure[reference=fig:adaptive]
+    \getbuffer
+\stopplacefigure
+
+Here is one that you can test yourself:
+
+\starttyping
+\startsetups adaptive:test
+    \setbox\usedadaptivebox\vbox to \usedadaptivetotal \bgroup
+        \externalfigure
+          [cow.pdf]
+          [width=\usedadaptivewidth,
+           height=\usedadaptivetotal]%
+   \egroup
+\stopsetups
+
+\ruledvbox to \textheight {
+    \par \begstrut \samplefile{tufte} \endstrut \par
+    \adaptivevbox[strut=yes,setups=adaptive:test]{\hsize\textwidth\hss}
+    \par \begstrut \samplefile{tufte} \endstrut
+}
+\stoptyping
+
+The next example comes from the test suite (where it runs over many pages in
+order to illustrate the idea):
+
+\startbuffer
+\startMPdefinitions
+    def TickTock =
+        interim linecap := squared;
+        save p ; path p ;
+        p := fullsquare xysized(AdaptiveWidth,.9(AdaptiveHeight+AdaptiveDepth)) ;
+        fill p withcolor AdaptiveColor ;
+        draw bottomboundary (p enlarged (-AdaptiveThickness) )
+            withdashes (3*AdaptiveThickness)
+            withpen pencircle scaled AdaptiveThickness
+            withcolor white ;
+    enddef ;
+\stopMPdefinitions
+
+\startsetups adaptive:test
+    \setbox\usedadaptivebox\hbox
+        to         \usedadaptivewidth
+        yoffset -.9\usedadaptivedepth
+    \bgroup
+        \hss
+        \startMPcode
+            TickTock ;
+        \stopMPcode
+        \hss
+   \egroup
+\stopsetups
+
+\definecolor[adaptive:tick][.25(blue,green)]
+\definecolor[adaptive:tock][.75(blue,green)]
+
+\defineadaptive
+  [tick]
+  [setups=adaptive:test,
+   color=adaptive:tick,
+   foregroundcolor=white,
+   foregroundstyle=\infofont,
+   strut=yes]
+
+\defineadaptive
+  [tock]
+  [tick]
+  [color=adaptive:tock]
+
+\dostepwiserecurse{8}{12}{1}{%
+    \dostepwiserecurse{5}{15}{1}{%
+        this~#1.##1 is~#1.##1 test~#1.##1
+        \ifodd##1\relax
+            \adaptivebox[tick]{\hss tick #1.##1\hss}
+        \else
+            \adaptivebox[tock]{\hss tock #1.##1\hss}
+        \fi
+    }
+}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+In the next example the graphics adapt to the available space:
+
+\startbuffer
+\startsetups adaptive:test
+    \setbox\usedadaptivebox\hbox
+        to       \usedadaptivewidth
+        yoffset -\usedadaptivedepth
+    \bgroup
+        \externalfigure
+          [cow.pdf]
+          [width=\usedadaptivewidth,
+           height=\dimexpr\usedadaptivetotal\relax]%
+    \egroup
+\stopsetups
+
+\dostepwiserecurse{1}{50}{1}{%
+    this~#1 is~#1 test~#1
+    {\adaptivebox[strut=yes,setups=adaptive:test]{}}
+}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stopsectionlevel
+
+\startsectionlevel[title=Prevdepth]
+
+The depth of a box is normally positive but rules can have a negative depth in
+order to get a rule above the baseline. When \TEX\ was written the assumption was
+that a negative depth of more than 1000 point made no sense at all. The last
+depth on a vertical list is registered in the \type {\prevdepth} variable. This
+is basically a reference into the current list. In order to illustrate some
+interesting side effects of setting this \type {\prevdepth} and especially when
+we set it to -1000pt. In order to illustrate this this special value can be set
+to a different value in \LUAMETATEX. However, as dealing with the property is
+somewhat special in the engine you should not set it unless you know that the
+macro package is ware of it.
+
+\startbuffer
+line 1\par line 2 \par \nointerlineskip line 3 \par
+\stopbuffer
+
+\typebuffer
+
+Assuming that we haven't set any inter paragraph spacing this gives:
+
+\startlinecorrection
+\ruledvbox{\setupwhitespace[none]\showmakeup[line]\getbuffer}
+\stoplinecorrection
+
+Here \type {\nointerlineskip} is (normally) defined as:
+
+\starttyping
+\prevdepth-1000pt
+\stoptyping
+
+although in \CONTEXT\ we use \type {\ignoredepthcriterium} instead of the hard
+coded dimension. We now give a more extensive example:
+
+\startbuffer[definition-1]
+\def\PrevTest#1%
+  {\setbox0\ruledhbox{\strut$\tf#1$}%
+   \dp0=#1
+   \vbox\bgroup\hsize4em
+     FIRST\par
+     \unhbox0\par
+     LAST\par
+   \egroup}
+\stopbuffer
+
+\startbuffer[definition-2]
+\def\PrevTest#1%
+  {\setbox0\ruledhbox{\strut$\tf#1$}%
+   \dp0=#1
+   \vbox\bgroup
+     \ruledhbox{FIRST}\par
+     \box0\par
+     \ruledhbox{LAST}\par
+   \egroup}
+\stopbuffer
+
+\startbuffer[example]
+\ruledhbox \bgroup
+    \PrevTest{-10.0pt}\quad
+    \PrevTest{-20.0pt}\quad
+    \PrevTest{-49.9pt}\quad
+    \PrevTest{-50.0pt}\quad
+    \PrevTest{-50.1pt}\quad
+    \PrevTest{-60.0pt}\quad
+    \PrevTest{-80.0pt}%
+\egroup
+\stopbuffer
+
+In this example we set \type {\ignoredepthcriterium} to $\tf-50.0pt$ instead of the
+normal $\tf -1000pt$. The helper is defined as:
+
+\typebuffer[option=TEX][definitions-1]
+
+or
+
+\typebuffer[option=TEX][definitions-2]
+
+The result of the following example is shown in \in {figures} [fig:prevdepth-1]
+\in {and} [fig:prevdepth-2]. The first case is what we normally have in text and
+we haven't set \type {prevdepth} explicitly between lines so \TEX\ will just look
+at the depth of the lines. In the second case the depth is ignored when less than
+the criterium which is why, when we set the depth of the box to a negative value
+we get somewhat interesting skips.
+
+\startplacefigure[reference=fig:prevdepth-1]
+    \showmakeup[line]
+    \ignoredepthcriterium-50pt
+    \setupwhitespace[none]
+    \getbuffer[definition-1,example]
+\stopplacefigure
+
+\startplacefigure[reference=fig:prevdepth-2]
+    \showmakeup[line]
+    \ignoredepthcriterium-50pt
+    \setupwhitespace[none]
+    \getbuffer[definition-2,example]
+    \blank[5*line]
+\stopplacefigure
+
+I'm sure one can use this effect otherwise than intended but I doubt is any user
+is willing to do this but the fact that we can lower the criterium makes for nice
+experiments. Just for the record, in \in {figure} [fig:prevdepth-3] you see what
+we get with positive values:
+
+\startbuffer[example]
+\ruledhbox \bgroup
+    \PrevTest{10.0pt}\quad
+    \PrevTest{20.0pt}\quad
+    \PrevTest{49.9pt}\quad
+    \PrevTest{50.0pt}\quad
+    \PrevTest{50.1pt}\quad
+    \PrevTest{60.0pt}\quad
+    \PrevTest{80.0pt}%
+\egroup
+\stopbuffer
+
+\startplacefigure[reference=fig:prevdepth-3]
+    \showmakeup[line]
+    \ignoredepthcriterium50pt
+    \setupwhitespace[none]
+    \getbuffer[definition-2,example]
+\stopplacefigure
+
+Watch the interline skip kicking in when we make the depth larger than in
+\type {\ignoredepthcriterium} being $\tf 50pt$.
+
+\stopsectionlevel
+
+\startsectionlevel[title=Normalization]
+
 {\em todo: users don't need to bother about this but it might be interesting anyway}
 
-\stopsection
+\stopsectionlevel
 
-\stopdocument
+\startsectionlevel[title=Dirty tricks]
 
-\everyhbox \everyvbox : useless unless one resets
-\parattr
-\snapshotpar
-\wrapuppar
+{\em todo: explain example for combining paragraphs}
 
-% \parfillleftskip
+% test\wrapuppar{\crlf\ignorepars}
+%
+% test
+%
+% test\wrapuppar{\ignorepars}
+%
+% test
+%
+% test\wrapuppar{\removeunwantedspaces\ignorepars}
+%
+% test
 
+\stopsectionlevel
+
+\stopdocument
+
 % 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
@@ -946,3 +1401,107 @@
 % 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.
+
+% todo:
+
+% \everyhbox \everyvbox : useless unless one resets
+% \parattr
+% \snapshotpar
+% \wrapuppar
+
+% \normalizelinemode0
+% x\ruledhbox{\parindent 1cm\indent x \indent x}
+% \normalizelinemode \parindentskipnormalizecode
+% x\ruledhbox{\parindent 1cm\indent x \indent x}
+
+% \starttext
+%     \tracingoutput1 \tracingonline1
+%     \pretolerance9000 test \pretolerance 8000 test \par
+%     \pretolerance9000 test \pretolerance 7000 \updateparagraphproperties test \par
+%     \pretolerance9000 test \pretolerance 6000 \snapshotpar\tolerancefrozenparcode test \par
+%     \pretolerance9000 test {\pretolerance5000 \snapshotpar\ntolerancefrozenparcode}test \par
+% \stoptext
+
+% \par[newgraf][16=1,17=1], .... pretolerance 9000, ....
+% \par[newgraf][16=1,17=1], .... pretolerance 7000, ....
+% \par[newgraf][16=1,17=1], .... pretolerance 6000, ....
+
+% \parfillleftskip
+
+% todo:
+
+% \starttext
+%
+% \showframe
+%
+% % this is the current default behaviour; we have a topskip with quite some stretch
+% % and that stretch is taken into account when tex calculates the badness; watch
+% % the next page
+%
+% \dorecurse{4}{
+%     \bgroup
+%         \shapingpenaltiesmode\zerocount
+%         \showmakeup[penalty]
+%         \placefigure[left]{}{}
+%         \input tufte \par
+%     \egroup
+% }
+%
+% \page EMPTY \page
+%
+% % the ntop is new and when >= 0 it is a multiplier for the number of lines
+% % stretch, here we have one line; watch the next page
+%
+% \dorecurse{4}{
+%     \bgroup
+%         \shapingpenaltiesmode\zerocount
+%         \setupinterlinespace[ntop=1]
+%         \showmakeup[penalty]
+%         \placefigure[left]{}{}
+%         \input tufte \par
+%     \egroup
+% }
+%
+% \page EMPTY \page
+%
+% % these shaping parameters will discourage a linebreak within a shape;
+% % the placement macro checked available space but that doesn't mean that
+% % there can be no linebreak
+%
+% \dorecurse{4}{
+%     \bgroup
+%         \showmakeup[penalty]
+%         \shapingpenalty\plushundred
+%         \shapingpenaltiesmode"FF\relax
+%         \placefigure[left]{}{}
+%         \input tufte \par
+%     \egroup
+% }
+%
+% \page EMPTY \page
+%
+% % the next pages show the effect of changed topskip on page breaks with
+% % footnotes
+%
+% \dorecurse{10}{
+%     [#1] \input tufte \footnote{\input{tufte}} \par
+% }
+%
+% \page EMPTY \page
+%
+% \setupinterlinespace[ntop=2]
+%
+% \dorecurse{10}{
+%     [#1] \input tufte \footnote{\input{tufte}} \par
+% }
+%
+% \page EMPTY \page
+%
+% \setupinterlinespace[ntop=0]
+%
+% \dorecurse{10}{
+%     [#1] \input tufte \footnote{\input{tufte}} \par
+% }
+%
+% \stoptext
+

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-registers.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-registers.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-registers.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
 \environment lowlevel-style
 
@@ -6,7 +6,7 @@
   [title=registers,
    color=darkmagenta]
 
-\startsection[title=Preamble]
+\startsectionlevel[title=Preamble]
 
 Registers are sets of variables that are accessed by index and a such resemble
 registers in a processing unit. You can store a quantity in a register, retrieve
@@ -14,9 +14,9 @@
 
 There is hardly any need to use them in \CONTEXT\ so we keep it simple.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\TEX\ primitives}]
+\startsectionlevel[title={\TEX\ primitives}]
 
 There are several categories:
 
@@ -105,9 +105,11 @@
 
 Watch the difference:
 
+\pushoverloadmode
 \startlines\tt
 \getbuffer[1,2]
 \stoplines
+\popoverloadmode
 
 The first definition uses a yet free register so you won't get a clash. The
 second one is just a shortcut using a macro and the third one too but again
@@ -182,9 +184,9 @@
 provides a good summary of what \TEX\ has to offer, and there is no need to repeat
 it here.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\ETEX\ primitives}]
+\startsectionlevel[title={\ETEX\ primitives}]
 
 Apart from the ability to use expressions, the contribution to registers that
 \ETEX\ brought was that suddenly we could use upto 65K of them, which is more
@@ -194,9 +196,9 @@
 the meantime has become cheap. As \CONTEXT\ moved to \ETEX\ rather early its
 users never had to worry about it.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\LUATEX\ primitives}]
+\startsectionlevel[title={\LUATEX\ primitives}]
 
 The \LUATEX\ engine introduced attributes. These are numeric properties that are
 bound to the nodes that are the result of typesetting operations. They are
@@ -239,13 +241,46 @@
 cannot access them at the \TEX\ end you seldom need them. If you do you can
 better use the proper more high level definers (not discussed here).
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title={\LUAMETATEX\ primitives}]
+\startsectionlevel[title={\LUAMETATEX\ primitives}]
 
-{\em todo}
+The fact that scanning stops at a non-number or \type {\relax} can be sort of
+unpredictable which is why in \LUAMETATEX\ we also support the following variant:
 
-\stopsection
+\starttyping[option=TEX]
+\scratchdimen\dimexpr  10pt + 3pt \relax
+\scratchdimen\dimexpr {10pt + 3pt}
+\stoptyping
 
+At the cost of one more token braces can be used as boundaries instead of the
+single \type {\relax} boundary.
+
+An important property of registers is that they can be accessed by a number. This
+has big consequences for the implementation: they are part of the big memory
+store and consume dedicated ranges. If we had only named access \TEX's memory
+layout could be a bit leaner. In principle we could make the number of registers
+smaller because any limit on the amount at some point can be an obstacle. It is
+for that reason that we also have name-only variants:
+
+\starttyping[option=TEX]
+\dimensiondef \MyDimenA   12pt
+\integerdef   \MyIntegerA 12
+\gluespecdef  \MyGlueA    12pt + 3pt minus 4pt
+\mugluespecdef\MyMuA      12mu + 3mu minus 4mu
+\stoptyping
+
+These are as efficient but not accessible by number but they behave like
+registers which means that you (can) use \type {\the}, \type {\advance}, \type
+{\multiply} and \type {\divide} with them. \footnote {There are also the slightly
+more efficient \type {\advanceby}, \type {\multiplyby} and \type {\divideby} that
+don't check for the \type {by} keyword.} In case you wonder why there is no
+alternative for \type {\toksdef}, there actually are multiple: they are called
+macros.
+
+{\em todo: expressions}
+
+\stopsectionlevel
+
 \stopdocument
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-scope.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-scope.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-scope.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
 % \hfil \hss
 % spread
@@ -9,15 +9,15 @@
   [title=scope,
    color=middleblue]
 
-\startsection[title=Introduction]
+\startsectionlevel[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
+\stopsectionlevel
 
-\startsection[title=Registers]
+\startsectionlevel[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
@@ -108,9 +108,9 @@
 
 \typebuffer[option=TEX] \startlines \getbuffer \stoplines
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Allocation]
+\startsectionlevel[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:
@@ -252,9 +252,9 @@
 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
+\stopsectionlevel
 
-\startsection[title=Files]
+\startsectionlevel[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
@@ -334,7 +334,7 @@
 As you see in these examples, we an locally define a read channel without
 getting a message about it already being defined.
 
-\stopsection
+\stopsectionlevel
 
 \stopdocument
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
 % 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
@@ -21,7 +21,7 @@
   [title=security,
    color=middleorange]
 
-\startsection[title=Preamble]
+\startsectionlevel[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
@@ -35,9 +35,9 @@
 updated accordingly. There are lots of files and macros involved. In the process
 the underlying features in the engine might evolve.
 
-\stopsection
+\stopsectionlevel
 
-\startsection[title=Flags]
+\startsectionlevel[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
@@ -205,9 +205,9 @@
 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
+\stopsectionlevel
 
-\startsection[title=Complications]
+\startsectionlevel[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.
@@ -220,9 +220,9 @@
 (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
+\stopsectionlevel
 
-\startsection[title=Introspection]
+\startsectionlevel[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.
@@ -241,7 +241,7 @@
 
 \startpacked \getbuffer \stoppacked
 
-\stopsection
+\stopsectionlevel
 
 % In \CONTEXT:
 % c! v! s! ??

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-style.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-style.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel-style.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/lowlevel
 
 % I started this series in June 2019 and I bet that it will never be complete or
 % extensive enough. But I'll do my best to make it as useful as possible ConTeXt
@@ -44,6 +44,10 @@
   [style=\bfa,
    color=darkgray]
 
+\setuplist
+  [chapter]
+  [style=bold]
+
 \setupfootertexts
   [section] % [\documentvariable{title}]
 
@@ -87,18 +91,49 @@
         withcolor "white" ;
 \stopuseMPgraphic
 
+\definesectionlevels
+  [default]
+  [%{chapter,title},
+   {section,subject},
+   {subsection,subsubject},
+   {subsubsection,subsubsubject},
+   {subsubsubsection,subsubsubject},
+   {subsubsubsubsection,subsubsubject}]
+
 \startsetups document:start
 
     \startMPpage
+    StartPage;
         \includeMPgraphic{titlepage} ;
+    StopPage;
     \stopMPpage
 
     \page
 
-    \startsubject[title=Contents]
-        \placelist[section][criterium=previous]
-    \stopsubject
+    \startsubjectlevel[title=Contents]
+        \placelist[chapter,section] [criterium=previous]
+    \stopsubjectlevel
 
 \stopsetups
 
+\startsetups document:stop
+
+\testpage[6]
+
+%startsubjectlevel[title=Colofon]
+\startsectionlevel[title=Colofon,number=no,saveinlist=no]
+
+    \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
+
+\stopsectionlevel
+%stopsubjectlevel
+
+\stopsetups
+
 \stopenvironment

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,45 @@
+% language=us runpath=texruns:manuals/lowlevel
+
+\environment lowlevel-style
+
+%D This is a bit if a cheat. The low level manuals are independent but I want an
+%D overview document on the website. Therefore we use sectionlevels in the documents
+%D that we we then overload here (we push the chapter level in front).
+
+\starttext
+
+    \definesectionlevels
+      [default]
+      [{chapter,title},
+       {section,subject},
+       {subsection,subsubject},
+       {subsubsection,subsubsubject},
+       {subsubsubsection,subsubsubject},
+       {subsubsubsubsection,subsubsubject}]
+
+    \startdocument[title=lowlevel,color=middlegray]
+    \stopdocument
+
+    % this list is incomplete
+
+    \startsectionlevel[title=Conditionals] \component [lowlevel-conditionals] \stopsectionlevel
+    \startsectionlevel[title=Boxes]        \component [lowlevel-boxes]        \stopsectionlevel
+    \startsectionlevel[title=Expansion]    \component [lowlevel-expansion]    \stopsectionlevel
+    \startsectionlevel[title=Registers]    \component [lowlevel-registers]    \stopsectionlevel
+    \startsectionlevel[title=Macros]       \component [lowlevel-macros]       \stopsectionlevel
+    \startsectionlevel[title=Grouping]     \component [lowlevel-grouping]     \stopsectionlevel
+    \startsectionlevel[title=Security]     \component [lowlevel-security]     \stopsectionlevel
+    \startsectionlevel[title=Characters]   \component [lowlevel-characters]   \stopsectionlevel
+    \startsectionlevel[title=Scope]        \component [lowlevel-scope]        \stopsectionlevel
+    \startsectionlevel[title=Paragraphs]   \component [lowlevel-paragraphs]   \stopsectionlevel
+    \startsectionlevel[title=Alignments]   \component [lowlevel-alignments]   \stopsectionlevel
+    \startsectionlevel[title=Marks]        \component [lowlevel-marks]        \stopsectionlevel
+    \startsectionlevel[title=Inserts]      \component [lowlevel-inserts]      \stopsectionlevel
+    \startsectionlevel[title=Localboxes]   \component [lowlevel-localboxes]   \stopsectionlevel
+    \startsectionlevel[title=Loops]        \component [lowlevel-loops]        \stopsectionlevel
+    \startsectionlevel[title=Tokens]       \component [lowlevel-tokens]       \stopsectionlevel
+    \startsectionlevel[title=Buffers]      \component [lowlevel-buffers]      \stopsectionlevel
+
+\stoptext
+
+


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lowlevel/lowlevel.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/lua/lua-mkiv.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/lua/lua-mkiv.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/lua/lua-mkiv.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,7 +1,7 @@
-% language=uk
+% language=us runpath=texruns:manuals/lua
 
 % author    : Hans Hagen
-% copyright : PRAGMA ADE & ConTeXt Development Team
+% copyright : ConTeXt Development Team
 % license   : Creative Commons Attribution ShareAlike 4.0 International
 % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions
 % origin    : the ConTeXt distribution
@@ -135,7 +135,7 @@
 \NC author    \NC \documentvariable{author}, \documentvariable{affiliation}, \documentvariable{location} \NC \NR
 \NC version   \NC \currentdate \NC \NR
 \NC website   \NC \documentvariable{website} \endash\ \documentvariable{support} \NC \NR
-\NC copyright \NC \symbol[cc][cc-by-sa-nc] \NC \NR
+\NC copyright \NC \symbol[cc][cc-by-sa] \NC \NR
 \stoptabulate
 
 \stopsubject

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-arrow.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-arrow.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-arrow.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-axis.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-axis.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-axis.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-chart.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-chart.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-chart.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 
@@ -66,7 +66,6 @@
         "fifth", "sixths", "sevenths"
     }
 ] ;
-
 \stopMPcode
 \stopbuffer
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-color.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-color.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-color.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-contents.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-contents.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-contour.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-contour.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-contour.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-followtext.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-followtext.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-followtext.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-fonts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-fonts.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-fonts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-function.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-function.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-function.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-grid.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-grid.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-grid.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-groups.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-groups.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-groups.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-interface.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-interface.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-interface.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-mesh-examples.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-mesh-examples.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-mesh-examples.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/luametafun
+
 \startbuffer[1]
 \startuseMPgraphic{MyPath1}
     fill OverlayBox withcolor "darkyellow" ;

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-mesh.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-mesh.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-mesh.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,8 +1,16 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 \environment luametafun-mesh-examples
 
+% runtime
+
+\doiffileelse{luatex-mesh-examples.pdf} {
+    % okay
+} {
+    \ctxlua{os.execute("context luatex-mesh-examples.tex")}
+}
+
 \startcomponent luametafun-mesh
 
 \startchapter[title={Mesh}]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-outline.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-outline.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-outline.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-placeholder.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-placeholder.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-placeholder.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-poisson.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-poisson.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-poisson.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-shade.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-shade.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-shade.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-style.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-style.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-style.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/luametafun
+
 \startenvironment luametafun-style
 
 \usemodule[abbreviations-smallcaps]

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-surface.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-surface.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-surface.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-svg.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-svg.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-svg.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-technology.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-technology.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-technology.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-text.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-text.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-text.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=us
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-titlepage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-titlepage.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun-titlepage.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,4 @@
+% language=us runpath=texruns:manuals/luametafun
 
 \environment luametafun-style
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametafun/luametafun.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/luametafun
+
 % 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.
 
@@ -34,6 +36,7 @@
         \component luametafun-fonts
         \component luametafun-color
         \component luametafun-groups
+        \component luametafun-extensions
         \component luametafun-interface
     \stopbodymatter
 

Added: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-building.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-building.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-building.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -0,0 +1,1337 @@
+% language=us runpath=texruns:manuals/luametatex
+
+\environment luametatex-style
+
+\startcomponent luametatex-building
+
+\startchapter[reference=building,title={Boxes, paragraphs and pages}]
+
+\startsection[title={Introduction}]
+
+\topicindex {building}
+\topicindex {pages}
+\topicindex {paragraphs}
+\topicindex {marks}
+\topicindex {inserts}
+
+There are some enhancements that relate to the way paragraphs and pages are
+built. In this chapter we will cover those. There can be a bit of overlap with
+other chapters. These enhancements are still somewhat experimental.
+
+\stopsection
+
+\startsection[title=Directions]
+
+\topicindex {\OMEGA}
+\topicindex {\ALEPH}
+\topicindex {directions}
+
+\startsubsection[title={Two directions}]
+
+The directional model in \LUAMETATEX\ is a simplified version the the model used
+in \LUATEX. In fact, not much is happening at all: we only register a change in
+direction.
+
+\stopsubsection
+
+\startsubsection[title={How it works}]
+
+The approach is that we try to make node lists balanced but also try to avoid
+some side effects. What happens is quite intuitive if we forget about spaces
+(turned into glue) but even there what happens makes sense if you look at it in
+detail. However that logic makes in|-|group switching kind of useless when no
+properly nested grouping is used: switching from right to left several times
+nested, results in spacing ending up after each other due to nested mirroring. Of
+course a sane macro package will manage this for the user but here we are
+discussing the low level injection of directional information.
+
+This is what happens:
+
+\starttyping
+\textdirection 1 nur {\textdirection 0 run \textdirection 1 NUR} nur
+\stoptyping
+
+This becomes stepwise:
+
+\startnarrower
+\starttyping
+injected: [push 1]nur {[push 0]run [push 1]NUR} nur
+balanced: [push 1]nur {[push 0]run [pop 0][push 1]NUR[pop 1]} nur[pop 0]
+result  : run {RUNrun } run
+\stoptyping
+\stopnarrower
+
+And this:
+
+\starttyping
+\textdirection 1 nur {nur \textdirection 0 run \textdirection 1 NUR} nur
+\stoptyping
+
+becomes:
+
+\startnarrower
+\starttyping
+injected: [+TRT]nur {nur [+TLT]run [+TRT]NUR} nur
+balanced: [+TRT]nur {nur [+TLT]run [-TLT][+TRT]NUR[-TRT]} nur[-TRT]
+result  : run {run RUNrun } run
+\stoptyping
+\stopnarrower
+
+Now, in the following examples watch where we put the braces:
+
+\startbuffer
+\textdirection 1 nur {{\textdirection 0 run} {\textdirection 1 NUR}} nur
+\stopbuffer
+
+\typebuffer
+
+This becomes:
+
+\startnarrower
+\getbuffer
+\stopnarrower
+
+Compare this to:
+
+\startbuffer
+\textdirection 1 nur {{\textdirection 0 run }{\textdirection 1 NUR}} nur
+\stopbuffer
+
+\typebuffer
+
+Which renders as:
+
+\startnarrower
+\getbuffer
+\stopnarrower
+
+So how do we deal with the next?
+
+\startbuffer
+\def\ltr{\textdirection 0\relax}
+\def\rtl{\textdirection 1\relax}
+
+run {\rtl nur {\ltr run \rtl NUR \ltr run \rtl NUR} nur}
+run {\ltr run {\rtl nur \ltr RUN \rtl nur \ltr RUN} run}
+\stopbuffer
+
+\typebuffer
+
+It gets typeset as:
+
+\startnarrower
+\startlines
+\getbuffer
+\stoplines
+\stopnarrower
+
+We could define the two helpers to look back, pick up a skip, remove it and
+inject it after the dir node. But that way we loose the subtype information that
+for some applications can be handy to be kept as|-|is. This is why we now have a
+variant of \prm {textdirection} which injects the balanced node before the skip.
+Instead of the previous definition we can use:
+
+\startbuffer[def]
+\def\ltr{\linedirection 0\relax}
+\def\rtl{\linedirection 1\relax}
+\stopbuffer
+
+\typebuffer[def]
+
+and this time:
+
+\startbuffer[txt]
+run {\rtl nur {\ltr run \rtl NUR \ltr run \rtl NUR} nur}
+run {\ltr run {\rtl nur \ltr RUN \rtl nur \ltr RUN} run}
+\stopbuffer
+
+\typebuffer[txt]
+
+comes out as a properly spaced:
+
+\startnarrower
+\startlines
+\getbuffer[def,txt]
+\stoplines
+\stopnarrower
+
+Anything more complex that this, like combination of skips and penalties, or
+kerns, should be handled in the input or macro package because there is no way we
+can predict the expected behaviour. In fact, the \prm {linedirection} is just a
+convenience extra which could also have been implemented using node list parsing.
+
+Directions are complicated by the fact that they often need to work over groups
+so a separate grouping related stack is used. A side effect is that there can be
+paragraphs with only a local par node followed by direction synchronization
+nodes. Paragraphs like that are seen as empty paragraphs and therefore ignored.
+Because \prm {noindent} doesn't inject anything but a \prm {indent} injects
+an box, paragraphs with only an indent and directions are handles and paragraphs
+with content. When indentation is normalized a paragraph with an indentation
+skip is seen as content.
+
+\stopsubsection
+
+\startsubsection[title={Normalizing lines}]
+
+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.
+
+In \LUAMETATEX\ lines can be normalized. This is optional because we want to
+preserve the original (for comparison) and is controlled by \prm
+{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.
+
+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.
+
+Control over normalization happens via the mentioned mode variable and here is
+what the engine provides right now. We use a bitmap:
+
+\starttabulate[|l|l|]
+\DB value \BC reported \NC \NR
+\TB
+\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
+
+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
+% \prm {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 \prm {breakafterdirmode}
+%
+% Glue after a dir node is ignored in the linebreak decision but you can bypass that
+% by setting \prm {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
+
+\startsubsection[title=Orientations]
+
+\topicindex {boxes+orientations}
+
+As mentioned, the difference with \LUATEX\ is that we only have numeric
+directions and that there are only two: left|-|to|-|right (\type {0}) and
+right|-|to|-|left (\type {1}). The direction of a box is set with \type
+{direction}.
+
+In addition to that boxes can now have an \type {orientation} keyword followed by
+optional \type {xoffset} and|/|or \type {yoffset} keywords. The offsets don't
+have consequences for the dimensions. The alternatives \type {xmove} and \type
+{ymove} on the contrary are reflected in the dimensions. Just play with them. The
+offsets and moves only are accepted when there is also an orientation, so no time
+is wasted on testing for these rarely used keywords. There are related primitives
+\type {\box...} that set these properties.
+
+As these are experimental it will not be explained here (yet). They are covered
+in the descriptions of the development of \LUAMETATEX: articles and|/|or
+documents in the \CONTEXT\ distribution. For now it is enough to know that the
+orientation can be up, down, left or right (rotated) and that it has some
+anchoring variants. Combined with the offsets this permits macro writers to
+provide solutions for top|-|down and bottom|-|up writing directions, something
+that is rather macro package specific and used for scripts that need
+manipulations anyway. The \quote {old} vertical directions were never okay and
+therefore not used.
+
+There are a couple of properties in boxes that you can set and query but that
+only really take effect when the backend supports them. When usage on \CONTEXT\
+shows that is't okay, they will become official, so we just mention them: \prm
+{boxdirection}, \prm {boxattribute}, \prm {boxorientation}, \prm {boxxoffset},
+\prm {boxyoffset}, \prm {boxxmove}, \prm {boxymove} and \prm {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={Boxes, rules and leaders}]
+
+\startsubsection[title={\prm {outputbox}}]
+
+\topicindex {output}
+
+This integer parameter allows you to alter the number of the box that will be
+used to store the page sent to the output routine. Its default value is 255, and
+the acceptable range is from 0 to 65535.
+
+\startsyntax
+\outputbox = 12345
+\stopsyntax
+
+\stopsubsection
+
+\startsubsection[title={\prm {hrule}, \prm {vrule}, \prm {srule}, \prm {nohrule}, \prm {novrule},
+\prm {virtualhrule} and \prm {virtualvrule}}]
+
+\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. A rule is specified in the usual way:
+
+\obeydepth
+
+\startbuffer
+\blue \vrule
+    height 2ex depth 1ex width 10cm
+\relax
+\stopbuffer
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+There is however a catch. The keyword scanners in \LUAMETATEX\ are implemented
+slightly different. When \TEX\ scans a keyword it will (case insensitive) scan
+for a whole keyword. So, it scans for \type {height} and when it doesn't find it
+it will scan for \type {depth} etc. When it does find a keyword in this case it
+expects a dimension next. When that criterium is not met it will issue an error
+message.
+
+In order to avoid look ahead failures like that it is recommended to end the
+specification with \type {\relax}. A glue specification is an other example where
+a \type {\relax} makes sense when look ahead issues are expected and actually
+there in traditional scanning the order of keywords can also matter. In any case,
+when no valid keyword is seen the characters scanned so far are pushed back in
+the input.
+
+The main reason for using an adapted scanner is that we always permit repetition
+(consistency) and accept an arbitrary order. Because we have more keywords to
+process the scanner quits at a partial failure. This prevents some push back and
+also gives an earlier warning. Interesting is that some \CONTEXT\ users ran into
+error messages due to a missing \type {\relax} and found out that their style has
+a potential flaw with respect to look ahead. One can be lucky for years.
+
+Back to rules, there are some extra keywords, two deal with an offset, and four
+provide margins. The margins are a bit special because \type {left} and \type
+{top} are the same as are \type {right} and \type {bottom}. They influence the
+edges and these depend on it being a horizontal or vertical rule.
+
+\obeydepth
+
+\startbuffer
+\blue \vrule
+    height 2.0ex depth 1.0ex width 10cm
+\relax
+\white \vrule
+    height 1.0ex depth 0.5ex width  9cm
+    xoffset -9.5cm yoffset .25ex
+\relax
+\blue \vrule
+    height .5ex depth 0.25ex width  8cm
+    xoffset -18cm yoffset .375ex top 1pt
+\relax
+\stopbuffer
+
+\startlinecorrection
+\getbuffer
+\stoplinecorrection
+
+Two new primitives were introduced: \prm {nohrule} and \prm {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.
+
+An \prm {srule} is sort of special. In text mode it is just a convenience (we
+could do without it for ages) but in math mode it comes in handy when we want to
+enforce consistency. \footnote {In \CONTEXT\ there is a lot of focus on
+consistent vertical spacing, something that doesn't naturally comes with \TEX\
+(you have to pay attention!) and therefore for decades now you can find plenty of
+documents with bad spacing of a nature that has seem to have become accepted as
+quality. This probably makes these \prm {srule}'s one of the few primitives that
+actually targets at \CONTEXT.}
+
+As with all rules, the backend will makes rules span the width or height and
+depth of the encapsulating box. An \prm {srule} is just a \prm {vrule} but is set
+up such that it can adapt itself:
+
+\startbuffer
+\hbox to 3cm {x\leaders\hrule\hfil x}
+\hbox{x \vrule width 4cm \relax x}
+\hbox{x \srule width 4cm \relax x}
+\hbox{x \vrule font \font char `( width 4cm \relax x}
+\hbox{x \srule font \font char `( width 4cm \relax x}
+\hbox{$x \srule fam \fam  char `( width 4cm \relax x$}
+\hbox{$x \vrule fam \fam  char `( width 4cm \relax x$}
+\stopbuffer
+
+\typebuffer
+
+You can hard code the height and depth or get it from a font|/|family|/|character
+combination. This is especially important in math mode where then can adapt to
+(stylistic) circumstances.
+
+\startlines
+\showboxes\getbuffer
+\stoplines
+
+Because this kind of rules has a dedicated subtype you can intercept it in the backend
+if needed. The two virtual variants are special in the way that they are like normal
+rules but take no space. Can you figure out how to get this?
+
+\startlinecorrection[blank]
+\dontleavehmode \hbox{%
+    \hbox{\green before}%
+    {\darkblue \virtualvrule width 40pt height -2pt depth 4pt xoffset -20pt\relax}%
+    \hbox{\red after}%
+}
+\stoplinecorrection
+
+% \vskip5pt
+
+% \ruledvbox{\ruledhbox to 10pt{\green x}
+% \virtualhrule width 10pt height 2pt depth 2pt yoffset -2pt \relax
+% \ruledhbox to 10pt{\red x}}
+
+\stopsubsection
+
+\startsubsection[title={\prm {vsplit}, \prm {tsplit} and \prm {dsplit}}]
+
+\topicindex {splitting}
+
+The \prm {vsplit} primitive has to be followed by a specification of the required
+height. As alternative for the \type {to} keyword you can use \type {upto} to get
+a split of the given size but result has the natural dimensions then.
+
+\starttyping
+\vsplit 123 to   10cm % final box has the required height
+\vsplit 123 upto 10cm % final box has its natural height
+\stoptyping
+
+The two alternative primitives return a \prm {vtop} or \prm {dbox} instead of a
+\prm {vbox}. All three accept the \type {attr} keyword as boxes do.
+
+\stopsubsection
+
+\startsubsection[title={\prm {boxxoffset}, \prm {boxyoffset}, \prm {boxxmove}, \prm {boxymove},
+\prm{boxorientation} and \prm{boxgeometry}}]
+
+This repertoire of primitives can be used to do relative positioning. The offsets
+are virtual while the moves adapt the dimensions. The orientation bitset can be
+used to rotate the box over 90, 180 and 270 degrees. It also influences the
+corner, midpoint or baseline.
+
+{\em There is information in the \CONTEXT\ low level manuals and in due time I
+will add a few examples here. This feature needs support in the backend when used
+(as in \CONTEXT) so it might influence performance.}
+
+\stopsubsection
+
+\startsubsection[title={\prm {boxtotal}}]
+
+The \prm {boxtotal} primitive returns the sum of the height and depth and is less
+useful as setter: it just sets the height and depth to half of the given value.
+
+\stopsubsection
+
+\startsubsection[title={\prm {boxshift}}]
+
+In traditional \TEX\ a box has height, depth, width and a shift where the later
+relates to \prm {raise}, \prm {lower}, \prm {moveleft} and \prm {moveright}. This
+primitive can be used to query and set this property.
+
+\startbuffer
+\setbox0\hbox{test test test}
+\setbox2\hbox{test test test} \boxshift2 -10pt
+\ruledhbox{x \raise10pt\box0\ x}
+\ruledhbox{x           \box2\ x}
+\stopbuffer
+
+\typebuffer
+
+\stopsubsection
+
+\startsubsection[title={\prm {boxanchor}, \prm {boxanchors}, \prm {boxsource} and \prm {boxtarget}}]
+
+{\em These are experimental.}
+
+\stopsubsection
+
+\startsubsection[title={\prm {boxfreeze}, \prm {boxadapt} and \prm {boxrepack}}]
+
+\topicindex {boxes+postprocessing}
+
+This operation will freeze the glue in the given box, something that normally is
+delayed and delegated to the backend.
+
+\startbuffer
+\setbox    0 \hbox to 5cm {\hss test}
+\setbox    2 \hbox to 5cm {\hss test}
+\boxfreeze 2 0
+\ruledhbox{\unhbox   0}
+\ruledhbox{\unhbox   2}
+\stopbuffer
+
+\typebuffer
+
+The second parameter to \prm {boxfreeze} determines recursion. Here we just
+freeze the outer level:
+
+\getbuffer
+
+Repacking will take the content of an existing box and add or subtract from it:
+
+\startbuffer
+\setbox 0 \hbox        {test test test}
+\setbox 2 \hbox {\red   test test test} \boxrepack0 +.2em
+\setbox 4 \hbox {\green test test test} \boxrepack0 -.2em
+\ruledhbox{\box0} \vskip-\lineheight
+\ruledhbox{\box0} \vskip-\lineheight
+\ruledhbox{\box0}
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+We can use this primitive to check the natural dimensions:
+
+\startbuffer
+\setbox 0 \hbox spread 10pt {test test test}
+\ruledhbox{\box0} (\the\boxrepack0,\the\wd0)
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+Adapting will recalculate the dimensions with a scale factor for the glue:
+
+\startbuffer
+\setbox 0 \hbox       {test test test}
+\setbox 2 \hbox {\red  test test test} \boxadapt 0   200
+\setbox 4 \hbox {\blue test test test} \boxadapt 0  -200
+\ruledhbox{\box0} \vskip-\lineheight
+\ruledhbox{\box0} \vskip-\lineheight
+\ruledhbox{\box0}
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\stopsubsection
+
+\startsubsection[title={\prm {boxvadjust}}]
+
+This primitive binds a \prm {vadjust} to a box and therefore also accepts the
+\type {pre} and \type {post} keywords which means that you can prepend and append
+as the box itself gets flushed.
+
+\stopsubsection
+
+\startsubsection[title={Overshooting dimensions}]
+
+\topicindex {boxes+overfull}
+
+The \prm {overshoot} primitive reports the most recent amount of overshoot when a
+box is packages. It relates to overfull boxes and the then set \prm {badness} of
+1000000.
+
+\startbuffer
+\hbox to 2cm {does it fit}               \the\overshoot
+\hbox to 2cm {does it fit in here}       \the\overshoot
+\hbox to 2cm {how much does fit in here} \the\overshoot
+\stopbuffer
+
+\typebuffer
+
+This global state variables reports a dimension:
+
+\startlines
+\getbuffer
+\stoplines
+
+\stopsubsection
+
+\startsubsection[title={Images and reused box objects},reference=sec:imagesandforms]
+
+\topicindex {images}
+
+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
+that meant: using a box with known dimensions that wraps a special that instructs
+the backend to include an image. The wrapping is needed because a special itself
+is a whatsit and as such has no dimensions.
+
+In \PDFTEX\ a special whatsit for images was introduced and that one {\em has}
+dimensions. As a consequence, in several places where the engine deals with the
+dimensions of nodes, it now has to check the details of whatsits. By inheriting
+code from \PDFTEX, the \LUATEX\ engine also had that property. However, at some
+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 (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
+that image support is not present in \LUAMETATEX. When an image specification was
+parsed the special properties, like the filename, or additional attributes, were
+stored in the backend and all that \LUATEX\ does is registering a reference to an
+image's specification in the rule node. But, having no backend means nothing is
+stored, which in turn would make the image inclusion primitives kind of weird.
+
+Therefore you need to realize that contrary to \LUATEX, {\em in \LUAMETATEX\
+support for images and box reuse is not built in}! However, we can assume that
+an implementation uses rules in a similar fashion as \LUATEX\ does. So, you can
+still consider images and box reuse to be core concepts. Here we just mention the
+primitives that \LUATEX\ provides. They are not available in the engine but can
+of course be implemented in \LUA.
+
+\starttabulate[|l|p|]
+\DB command \BC explanation \NC \NR
+\TB
+\NC \tex {saveboxresource}             \NC save the box as an object to be included later \NC \NR
+\NC \tex {saveimageresource}           \NC save the image as an object to be included later \NC \NR
+\NC \tex {useboxresource}              \NC include the saved box object here (by index) \NC \NR
+\NC \tex {useimageresource}            \NC include the saved image object here (by index) \NC \NR
+\NC \tex {lastsavedboxresourceindex}   \NC the index of the last saved box object \NC \NR
+\NC \tex {lastsavedimageresourceindex} \NC the index of the last saved image object \NC \NR
+\NC \tex {lastsavedimageresourcepages} \NC the number of pages in the last saved image object \NC \NR
+\LL
+\stoptabulate
+
+An implementation probably should accept the usual optional dimension parameters
+for \type {\use...resource} in the same format as for rules. With images, these
+dimensions are then used instead of the ones given to \tex {useimageresource} but
+the original dimensions are not overwritten, so that a \tex {useimageresource}
+without dimensions still provides the image with dimensions defined by \tex
+{saveimageresource}. These optional parameters are not implemented for \tex
+{saveboxresource}.
+
+\starttyping
+\useimageresource width 20mm height 10mm depth 5mm \lastsavedimageresourceindex
+\useboxresource   width 20mm height 10mm depth 5mm \lastsavedboxresourceindex
+\stoptyping
+
+Examples or optional entries are \type {attr} and \type {resources} that accept a
+token list, and the \type {type} key. When set to non|-|zero the \type {/Type}
+entry is omitted. A value of 1 or 3 still writes a \type {/BBox}, while 2 or 3
+will write a \type {/Matrix}. But, as said: this is entirely up to the backend.
+Generic macro packages (like \type {tikz}) can use these assumed primitives so
+one can best provide them. It is probably, for historic reasons, the only more or
+less standardized image inclusion interface one can expect to work in all macro
+packages.
+
+\stopsubsection
+
+\startsubsection[title={\prm {dbox}}]
+
+This primitive is a variant on \prm {vbox} in the sense that when it gets
+appended to a vertical list the height of the topmost line or rule as well as the
+depth of the box are taken into account when interline space is calculated.
+
+\stopsubsection
+
+
+\startsubsection[title={\prm {hpack}, \prm {vpack}, \prm {tpack} and \prm {dpack}}]
+
+\topicindex {packing}
+
+These three primitives are the equivalents of \prm {hbox}, \prm {vbox}, \prm
+{vtop} and \prm {dbox} 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. Apart from accepting more keywords (and therefore options) the
+normal box behave the same as before.
+
+\stopsubsection
+
+\startsubsection[title={\prm {vcenter}}]
+
+The \prm {vcenter} builder also works in text mode.
+
+\stopsubsection
+
+\startsubsection[title={\prm {unhpack}, \prm {unvpack}}]
+
+\topicindex {unpacking}
+
+These two are somewhat experimental. They ignore the accumulated pre- and
+postmigrated material bound to a box. I needed it for some experiment so the
+functionality might change when I really need it.
+
+\stopsubsection
+
+\startsubsection[title={\prm {gleaders} and \prm {uleaders}},reference=sec:gleaders]
+
+\topicindex {leaders}
+
+This type of leaders is anchored to the origin of the box to be shipped out. So
+they are like normal \prm {leaders} in that they align nicely, except that the
+alignment is based on the {\it largest\/} enclosing box instead of the {\it
+smallest\/}. The \type {g} stresses this global nature. The \prm {uleaders} are
+used for flexible boxes and are discussed elsewhere.
+
+\stopsubsection
+
+\stopsection
+
+\startsection[title={Paragraphs}]
+
+\startsubsection[title=Freezing]
+
+In \LUAMETATEX\ we store quite some properties with a paragraph. Where in traditional
+\TEX\ the properties that are set when the paragraph broken into lines are used, here
+we can freeze them.
+
+{\em At some point this section will describe \prm {autoparagraphmode}, \prm
+{everybeforepar}, \prm {snapshotpar}, \prm {wrapuppar}, etc. For the moment the
+manuals that come with \CONTEXT\ have to do.}
+
+\stopsubsection
+
+\startsubsection[title=Penalties]
+
+In addition to the penalties introduced in \ETEX, we also provide \prm
+{orphanpenalty} and \prm {orphanpenalties}. When we're shaping a paragraph
+an additional \prm {shapingpenalty} can be injected. This penalty gets
+injected instead of the usual penalties when the following bits are set in
+\prm {shapingpenaltiesmode}:
+
+\starttabulate[|l|l|p|]
+\DB value        \BC ignored \NC \NR
+\TB
+\NC \type {0x01} \NC interlinepenalty \NC \NR
+\NC \type {0x02} \NC widowpenalty     \NC \NR
+\NC \type {0x04} \NC clubpenalty      \NC \NR
+\NC \type {0x08} \NC brokenpenalty    \NC \NR
+\LL
+\stoptabulate
+
+When none of these is set the shaping penalty will be added. That way one can
+prevent a page break inside a shape.
+
+\stopsubsection
+
+\startsubsection[title=Criteria]
+
+The linebreak algorithm uses some heuristics for determining the badness of a
+line. In most cases that works quite well. Of course one can run into a bad
+result when one has a large document of weird (extreme) constraints and it can be
+tempting to mess around with parameters which then of course can lead to bad
+results in other places. A solution is is to locally tweak penalties or looseness
+but one can also just accept the occasional less optimal result (after all there
+are plenty occasions to make a document look bad otherwise so best focus on the
+average first). That said, it is tempting to see if changing the hard codes
+criteria makes a difference. Experiments with this demonstrated the usual: when
+asked what looks best contradictions mix with expectations and being triggered by
+events that one related to \TEX, like successive hyphenated lines.
+
+The \prm {linebreakcriterium} parameter can be set to a value made from four bytes. We're
+not going to explain the magic numbers because they come from and are discussed in original
+\TEX. It is enough to know that we have four criteria:
+
+\starttabulate[|l|l|p|]
+\DB magic \BC bound to   \NC bytes      \NC \NR
+\TB
+\NC 12    \NC semi tight \NC 0x7F...... \NC \NR
+\NC 12    \NC decent     \NC 0x..7F.... \NC \NR
+\NC 12    \NC semi loose \NC 0x....7F.. \NC \NR
+\NC 99    \NC loose      \NC 0x......7F \NC \NR
+\LL
+\stoptabulate
+
+These four values can be changed according to the above pattern and are limited
+to the range 1\endash127 which is plenty especially when one keeps in mind that
+the actual useful values sit around the 12 anyway. Values outside the range (and
+therefore an all|-|over zero assignment) makes the defaults kick in.
+
+The original decisions are made in the following way:
+
+\starttyping
+function loose(badness)
+    if badness > loose_criterium then
+        return very_loose_fit
+    elseif badness > decent_criterium then
+        return loose_fit
+    else {
+        return decent_fit
+    end
+end
+
+function tight(badness)
+    if badness > decent_criterium then
+        return tight_fit
+    else {
+        return decent_fit
+    end
+end
+\stoptyping
+
+while in \LUAMETATEX\ we use (again in \LUA speak):
+
+\starttyping
+function loose(badness)
+    if badness > loose then
+        return very_loose_fit
+    elseif badness > semi_loose then
+        return semi_loose_fit
+    elseif badness > decent then
+        return loose_fit
+    else
+        return decent_fit
+    end
+end
+
+function tight(badness)
+    if badness > semi_tight then
+        return semi_tight_fit
+    else if badness > decent then
+        return tight_fit
+    else
+        return decent_fit
+    end
+end
+\stoptyping
+
+So we have a few more steps to play with. But don't be disappointed when it
+doesn't work out as you expect. Don Knuth did a good job on the heuristics and
+after many decades there is no real need to change something. Consider it a
+playground.
+
+The parameter \prm {ignoredepthcriterium} is set to -1000pt at startup and is a
+special signal for \prm {prevdepth}. You can change the value locally for
+educational purposes but best not mess with this standard value in production
+code unless you want special effects.
+
+\stopsubsection
+
+\stopsection
+
+\startsection[title={Inserts}]
+
+Inserts are tightly integrated into the page builder. Depending on penalties and
+available space they end up on the same page as were they got injected or they
+move to following pages, either or not split.
+
+In traditional \TEX\ inserts are controlled by registers. A quadruple of box,
+skip, dimen and count registers with the same number acts as an insert class.
+Details can be found in the \TEX book. A side effect of this is that we only have
+these four properties bound to class, other properties of inserts are driven by
+shared parameters. Another side effect is that register management has to make
+sure that these foursome get \quote {allocates} as set and not clashes with other
+register allocations.
+
+In \LUAMETATEX\ you can set the \prm {insertmode} to a non zero value in which case
+inserts are not using the register pool but have their own (global) resources. For
+now this is mode driven (for compatibility reasons) and once set or when an
+insert has been accessed, this mode is frozen, so  this parameter can be set
+very early in the macro package loading process.
+
+
+\starttabulate[|l|l|p|]
+\DB primitive               \BC traditional            \BC explanation \NC \NR
+\TB
+\NC \prm {insertdistance}   \NC skip                   \NC the space before the first instance (on a page) \NC \NR
+\NC \prm {insertmultiplier} \NC count                  \NC a factor that is used to calculate the height used \NC \NR
+\NC \prm {insertlimit}      \NC dimen                  \NC the maximum amount of space on a page to be taken \NC \NR
+\NC \prm {insertpenalty}    \NC \prm {insertpenalties} \NC the floating penalty (used when set) \NC \NR
+\NC \prm {insertmaxdepth}   \NC \prm {maxdepth}        \NC the maximum split depth (used when set) \NC \NR
+\NC \prm {insertstorage}    \NC                        \NC signals that the insert has to be stored for later \NC \NR
+\NC \prm {insertheight}     \NC \prm {ht} box / index  \NC the accumulated height of the inserts so far \NC \NR
+\NC \prm {insertdepth}      \NC \prm {dp} box / index  \NC the current depth of the inserts so far \NC \NR
+\NC \prm {insertwidth}      \NC \prm {wd} box / index  \NC the width of the inserts \NC \NR
+\NC \prm {insertbox}        \NC box / index            \NC the boxed content \NC \NR
+\NC \prm {insertcopy}       \NC box / index            \NC a copy of the boxed content \NC \NR
+\NC \prm {insertunbox}      \NC box / index            \NC the unboxed content \NC \NR
+\NC \prm {insertuncopy}     \NC box / index            \NC a copy of the unboxed content \NC \NR
+\NC \prm {insertuncopy}     \NC box / index            \NC a copy of the unboxed content \NC \NR
+\NC \prm {insertprogress}   \NC box / index            \NC the currently accumulated height \NC \NR
+\LL
+\stoptabulate
+
+These primitives takes an insert class number. The \prm {insertpenalties}
+primitives is unchanged, as is the \LUATEX\ \prm {insertheights} one. When \prm
+{insertstoring} is set 1, all inserts that have their storage flag set will be
+saved. Think of a multi column setup where inserts have to end up in the last
+column. If there are three columns, the first two will store inserts. Then when
+the last column is dealt with \prm {insertstoring} can be set to 2 and that will
+signal the builder that we will inject the inserts. In both cases, the value of
+this register will be set to zero so that it doesn't influence further
+processing. You can use \prm {ifinsert} to check if an insert box is void. More
+details about these (probably experimental for a while) features can be found in
+documents that come with \CONTEXT.
+
+A limitation of inserts is that when they are buried too deep, a property they
+share with inserts, they become invisible This can be dealt with by the migration
+feature described in an upcoming section.
+
+The \LUAMETATEX\ engine has some tracing built in that is enabled by setting \prm
+{tracinginserts} to a positive value.
+
+\stopsection
+
+\startsection[title={Marks}]
+
+\topicindex {marks}
+
+Marks are kind of signal nodes in the list that refer to stored token lists. When
+a page has been split off and is handed over to the output routine these signals
+are resolved into first, top and bottom mark references that can (for instance)
+be used for running headers.
+
+In \ETEX\ the standard \TEX\ primitives \prm {mark}, \prm {firstmark}, \prm
+{topmark}, \prm {botmark}, \prm {splitfirstmark} and \prm {splitbotmark} have
+been extended with plural forms that accent a number before the token list. That
+number indicates a mark class.
+
+In addition to the mark fetch commands, we also have access to the last set
+mark in the given class with \prm {currentmarks}:
+
+\startsyntax
+\currentmarks <16-bit number>
+\stopsyntax
+
+A problem with marks is that one cannot really reset them. Mark states are kept
+in the node lists and only periodically the state is snapshot into the global
+state variables. The \LUATEX\ engine can reset these global states with \prm
+{clearmarks} but that's only half a solution. In \LUAMETATEX\ we have \prm
+{flushmarks} which, like \prm {marks}, puts a node in the list that does a reset.
+This permits implementing controlled resets of specific marks at the cost of a
+possible interfering mode, but that can normally be dealt with rather well.
+
+The \prm {clearmarks} 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 (no synchronization node is used).
+
+\startsyntax
+\clearmarks <16-bit number>
+\stopsyntax
+
+The \prm {flushmarks} variant is delayed but puts a (mark) node in the list as
+signal (we could have gone for a keyword to \prm {marks} instead).
+
+\startsyntax
+\flushmarks <16-bit number>
+\stopsyntax
+
+Another problem with marks is that when they are buried too deep, a property they
+share with inserts, they become invisible. This can be dealt with by the
+migration feature described in the next section.
+
+The \LUAMETATEX\ engine has some tracing built in that is enabled by setting \prm
+{tracingmarks} to a positive value. When set to~1 the page builder shows the set
+values, and when set to a higher value details about collecting them are shown.
+
+\stopsection
+
+\startsection[title={Adjusts}]
+
+The \prm {vadjust} primitive injects something in the vertical list after the
+line where it ends up. In \PDFTEX\ the \type {pre} keyword was added so that one
+could force something before a previous line (actually this was something that we
+needed in \CONTEXT\ \MKII). The \LUAMETATEX\ engine also supports the \type {post}
+keyword.
+
+We support a few more keywords: \type {before} will prepend the adjustment to the
+already given one, and \type {after} will append it. The \type {index} keyword
+expects an integer and relates that to the current adjustment. This index is
+passed to an (optional) callback when the adjustment is finally moved to the
+vertical list. That move is actually delayed because like inserts and marks these
+(vertical) adjustments can migrate to the \quote {outer} vertical level.
+
+The main reason for the index having no influence on the order is that this
+primitive already could be used multiple times and order is determined by usage.
+\footnote {Under consideration is to let the callback mess with the flushing
+order.}
+
+The \LUAMETATEX\ engine has some tracing built in that is enabled by setting \prm
+{tracingadjusts} to a positive value. Currently there is not that much tracing
+which is why the value has to be at least 2 in order to be compatible with other
+(detailed) tracers.
+
+\stopsection
+
+\startsection[title={Migration}]
+
+There are a few injected node types that are used to track information: marks,
+inserts and adjusts (see previous sections). Marks are token lists that can be
+used to register states like section numbers and titles they are synchronized in
+the page builder when a page is shipped out. Inserts are node lists that get
+rendered and relate to specific locations and these are flushed with the main
+vertical list which also means that in calculating page breaks they need to be
+taken into account. An Adjust is material that gets injected before or after a
+line. Strictly spoke local boxes also in this repertoire but they are dealt with
+in the par builder.
+
+A new primitive \prm {automigrationmode} can be used to let deeply burried marks
+and inserts bubble up to the outer level.
+
+\starttabulate[|c|p|]
+\DB value \BC explanation \NC \NR
+\TB
+\NC \the\markautomigrationcode   \NC migrate marks in the par builder \NC \NR
+\NC \the\insertautomigrationcode \NC migrate inserts in the par builder  \NC \NR
+\NC \the\adjustautomigrationcode \NC migrate adjusts in the par builder  \NC \NR
+\NC \the\preautomigrationcode    \NC migrate prebox material in the page builder \NC \NR
+\NC \the\postautomigrationcode   \NC migrate postbox material in the page builder \NC \NR
+\LL
+\stoptabulate
+
+If you want to migrate marks and inserts you need to set all these flags. Migrated
+marks and inserts end up as post|-|box properties and will be handled in the page
+builder as such. At the \LUA\ end you can add pre- and post|-|box material too.
+
+The primitive register \prm {holdingmigrations} is a bitset that can be used to temporarily
+disable migrations. It is a generalization of \prm {holdinginserts}.
+
+\starttabulate[|cT|p|]
+\DB value \BC explanation \NC \NR
+\TB
+\NC 0x01  \NC marks   \NC \NR
+\NC 0x02  \NC inserts \NC \NR
+\NC 0x04  \NC adjusts \NC \NR
+\LL
+\stoptabulate
+
+Migrates material is bound to boxes so boxed material gets unboxed it is taken
+into account, but you should be aware of potential side effects. But then, marks,
+inserts and adjusts always demanded care.
+
+\stopsection
+
+\startsection[title={Pages}]
+
+The page builder can be triggered by (for instance) a penalty but you can also
+use \prm {pageboundary}. This will trigger the page builder but not leave
+anything behind.
+
+{\em In due time we will discuss \prm {pagevsize}, \prm {pageextragoal} and \prm
+{lastpageextra} but for now we treat them as very experimental and they will be
+tested in \CONTEXT, also in discussion with users.}
+
+\stopsection
+
+\startsection[title={Paragraphs}]
+
+The numeric primitive \prm {lastparcontext} inspector reports the current context
+in which a paragraph triggering commands happened. The numbers can be queried
+with \type {tex.getparcontextvalues()} and currently are: \showvaluelist
+{tex.getparcontextvalues()}. As with the other \type {\last...} primitives this
+variable is global.
+
+Traditional \TEX\ has the \prm {parfillskip} parameter that determines the way
+the last line is filled. In \LUAMETATEX\ we also have \prm {parfillleftskip}. The
+counterparts for the first line are \prm {parinitleftskip} and \prm
+{parinitrightskip}.
+
+\startbuffer
+\leftskip        2em
+\rightskip       \leftskip
+\parfillskip     \zeropoint plus 1 fill
+\parfillleftskip \parfillskip
+\parinitleftskip \parfillleftskip
+\parinitrightskip\parfillleftskip
+\input ward
+\stopbuffer
+
+\typebuffer This results in: \par \start \em \getbuffer \par \stop
+
+An additional tracing primitive \prm {tracingfullboxes} reports details about the
+encountered overfull boxes. This can be rather verbose!
+
+Normally \TEX\ will insert an empty hbox when paragraph indentation is requested
+but when the second bit in \prm {normalizelinemode} has been set \LUAMETATEX\
+will in a glue node instead. You can zero the set value with \prm {undent} unless
+of course some more has been inserted already.
+
+\startbuffer
+\parinitleftskip1cm \parindent 1cm \indent test \par
+\parinitleftskip1cm \parindent 1cm \undent test \par
+\parinitleftskip1cm \parindent 1cm \indent \undent test \par
+\parinitleftskip1cm \parindent 1cm \indent \strut \undent test \par
+\stopbuffer
+
+\typebuffer \startpacked \getbuffer \stoppacked
+
+By setting \prm {tracingpenalties} to a positive value penalties related to
+windows, clubs, lines etc.\ get reported to the output channels.
+
+\stopsection
+
+\startsection[title={Local boxes}]
+
+As far as I know the \OMEGA/\ALEPH\ local box mechanism is mostly in those
+engines in order to support repetitive quotes. In \LUATEX\ this mechanism has
+been made more robust and in \LUAMETATEX\ it became more tightly integrated in
+the paragraph properties. In order for it to be more generic and useful, it got
+more features. For instance it is a bit painful to manage with respect to
+grouping (which is a reason why it's not that much used). The most interesting
+property is that the dimensions are taken into account when a paragraph is
+broken into lines.
+
+There are three commands: \prm {localleftbox}, \prm {localrightbox} and the
+\LUAMETATEX\ specific \prm {localmiddlebox} which is basically a right box but
+when we pass these boxes to a callback they can be distinguished (we could have
+used the index but this was a cheap extra signal so we keep it).
+
+These commands take optional keywords. The \type {index} keyword has to be
+followed by an integer. This index determines the order which doesn't introduce a
+significant compatibility issue: local boxes are hardly used and originally had
+only one instance.
+
+The \type {par} keyword forces the box to be added to the current paragraph head.
+This permits setting them when a paragraph has already started. The
+implementation of these boxes is done via so called (local) paragraph nodes and
+there is one at the start of each paragraph.
+
+The \type {local} keyword tells this mechanism not to update the registers that
+keep these boxes. In that case a next paragraph will start fresh. The \type
+{keep} option will do the opposite and retain the box after a group ends.
+
+The commands: \prm {localleftboxbox}, \prm {localrightboxbox} and \prm
+{localmiddleboxbox} return a copy of the current related register content.
+
+\stopsection
+
+\startsection[title={Leaders}]
+
+Leaders are flexible content that are basically just seen as glue and it is up to
+the backend to apply the effective glue to the result as seen in the backend
+(like a rule of box). This means that the frontend doesn't do anything with the
+fact that we have a regular \prm {leaders}, a \prm {gleaders}, \prm {xleaders} or
+\prm {cleaders}. The \prm {uleaders} that has been added in \LUAMETATEX\ is just
+that: an extra leader category. The main difference is that the width of the
+given box is added to the glue. That way we create a stretchable box.
+
+\startbuffer
+\unexpandedloop 1 30 1 {x             \hbox{1 2 3}                                                           x }
+\unexpandedloop 1 30 1 {x {\uleaders \hbox{1 2 3}\hskip 0pt plus 10pt               minus 10pt\relax}        x }
+\unexpandedloop 1 30 1 {x {\uleaders \hbox{1 2 3}\hskip 0pt plus  \interwordstretch minus \interwordshrink}  x }
+\unexpandedloop 1 30 1 {x {\uleaders \hbox{1 2 3}\hskip 0pt plus 2\interwordstretch minus 2\interwordshrink} x }
+\stopbuffer
+
+\typebuffer
+
+Here are some examples:
+
+\startlines
+\getbuffer
+\stoplines
+
+So the flexibility fo the box plays a role in the line break calculations. But in
+the end the backend has to do the work.
+
+\startbuffer[a]
+{\green \hrule width \hsize} \par \vskip2pt
+\vbox to 40pt {
+    {\red\hrule width \hsize} \par \vskip2pt
+    \vbox {
+        \vskip2pt {\blue\hrule width \hsize} \par
+        \vskip 10pt plus 10pt minus 10pt
+        {\blue\hrule width \hsize} \par \vskip2pt
+    }
+    \vskip2pt {\red\hrule width \hsize} \par
+}
+\vskip2pt {\green \hrule width \hsize} \par
+\stopbuffer
+
+\startbuffer[b]
+{\green \hrule width \hsize} \par \vskip2pt
+\vbox to 40pt {
+    {\red\hrule width \hsize} \par \vskip2pt
+    \uleaders\vbox {
+        \vskip2pt {\blue\hrule width \hsize} \par
+        \vskip 10pt plus 10pt minus 10pt
+        {\blue\hrule width \hsize} \par \vskip2pt
+    }\vskip 0pt plus 10pt minus 10pt
+    \vskip2pt {\red\hrule width \hsize} \par
+}
+\vskip2pt {\green \hrule width \hsize} \par
+\stopbuffer
+
+\typebuffer[a]
+
+with
+
+\typebuffer[b]
+
+In the first case we get the this:
+
+\startlinecorrection
+\getbuffer[a]
+\stoplinecorrection
+
+but with \prm {uleaders} we get:
+
+\startlinecorrection
+\normalizeparmode\zerocount
+\getbuffer[b]
+\stoplinecorrection
+
+or this:
+
+\startlinecorrection
+\normalizeparmode"FF
+\getbuffer[b]
+\stoplinecorrection
+
+In the second case we flatten the leaders in the engine by setting the second bit
+in the \prm {normalizeparmode} parameter (\type {0x2}). We actually do the same
+with \prm {normalizelinemode} where bit 10 is set (\type {0x200}). The \type
+{delay} keyword can be passed with a box to prevent flattening. If we don't do
+this in the engine, the backend has to take care of it. In principle this permits
+implementing variants in a macro package. Eventually there will be plenty examples in
+the \CONTEXT\ code base and documentation. Till then, consider this experimental.
+
+\stopsection
+
+\startsection[title=Alignments]
+
+The primitive \prm {alignmark} duplicates the functionality of \type {#} inside
+alignment preambles, while \prm {aligntab} duplicates the functionality of \type
+{&}. The \prm {aligncontent} primitive directly refers to an entry so that one
+does not get repeated.
+
+Alignments can be traced with \prm {tracingalignments}. When set to~1 basics
+usage is shown, for instance of \prm {noalign} but more interesting is~2 or more:
+you then get the preambles reported.
+
+The \prm {halign} (tested) and \prm {valign} (yet untested) primitives accept a
+few keywords in addition to \type {to} and \type {spread}:
+
+\starttabulate[|l|p|]
+\DB keyword \BC explanation \NC \NR
+\TB
+\NC \type {attr}     \NC set the given attribute to the given value \NC \NR
+\NC \type {callback} \NC trigger the \type {alignment_filter} callback \NC \NR
+\NC \type {discard}  \NC discard zero \prm {tabskip}'s \NC \NR
+\NC \type {noskips}  \NC don't even process zero \prm {tabskip}'s \NC \NR
+\NC \type {reverse}  \NC reverse the final rows \NC \NR
+\LL
+\stoptabulate
+
+In the preamble the \prm {tabsize} primitive can be used to set the width of a
+column. By doing so one can avoid using a box in the preamble which, combined
+with the sparse tabskip features, is a bit easier on memory when you produce
+tables that span hundreds of pages and have a dozen columns.
+
+The \prm {everytab} complements the \prm {everycr} token register but is sort of
+experimental as it might become more selective and powerful some day.
+
+The two primitives \prm {alignmentcellsource} and \prm {alignmentwrapsource} that
+associate a source id (integer) to the current cell and row (line). Sources and
+targets are experimental and are being explored in \CONTEXT\ so we'll see where
+that ends up in.
+
+{\em todo: callbacks}
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent


Property changes on: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-building.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/luametatex
 
 \environment luametatex-style
 
@@ -16,18 +16,20 @@
 \libindex{known}
 
 {\em The callbacks are a moving target. Don't bother me with questions about
-them.}
+them. Some are new and/or experimental and therefore not yet documented. In
+\CONTEXT\ we can easily adapt interfaces so changes in these have no real effect
+on users. Of course in due time all will be official and documented.}
 
 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
-enabled) replace functionality. In mosty cases the second category is expected to
-behave similar to the built in functionality because in a next step specific
-data is expected. For instance, you can replace the hyphenation routine. The
-function gets a list that can be hyphenated (or not). The final list should be
-valid and is (normally) used for constructing a paragraph. Another function can
-replace the ligature builder and|/|or kerner. Doing something else is possible
-but in the end might not give the user the expected outcome.
+enabled) replace functionality. In most cases the second category is expected to
+behave similar to the built in functionality because in a next step specific data
+is expected. For instance, you can replace the hyphenation routine. The function
+gets a list that can be hyphenated (or not). The final list should be valid and
+is (normally) used for constructing a paragraph. Another function can replace the
+ligature builder and|/|or kern routine. Doing something else is possible but in
+the end might not give the user the expected outcome.
 
 The first thing you need to do is registering a callback:
 
@@ -74,9 +76,9 @@
 
 \stopsection
 
-\startsection[title={File related callbacks}][library=callback]
+\startsection[title={File related callbacks},reference=iocallback][library=callback]
 
-\subsection{\cbk {find_format_file} and \cbk {find_log_file}}
+\startsubsection[title={\cbk {find_format_file} and \cbk {find_log_file}}]
 
 \topicindex{callbacks+format file}
 \topicindex{callbacks+log file}
@@ -91,8 +93,10 @@
 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_data_file}}
+\stopsubsection
 
+\startsubsection[title={\cbk {open_data_file}}]
+
 \topicindex{callbacks+opening files}
 
 This callback function gets a filename passed:
@@ -124,12 +128,14 @@
 % <boolean> eof =
 %     function ()
 % \stopfunctioncall
-%
-% \stopsection
 
+\stopsubsection
+
+\stopsection
+
 \startsection[title={Data processing callbacks}][library=callback]
 
-\subsection{\cbk {process_jobname}}
+\startsubsection[title={\cbk {process_jobname}}]
 
 \topicindex{callbacks+jobname}
 
@@ -148,6 +154,8 @@
 \LUATEX\ will pretend your callback never happened. This callback does not
 replace any internal code.
 
+\stopsubsection
+
 \stopsection
 
 \startsection[title={Node list processing callbacks}][library=callback]
@@ -154,7 +162,7 @@
 
 The description of nodes and node lists is in~\in{chapter}[nodes].
 
-\subsection{\cbk {contribute_filter}}
+\startsubsection[title={\cbk {contribute_filter}}]
 
 \topicindex{callbacks+contributions}
 
@@ -178,8 +186,10 @@
 \LL
 \stoptabulate
 
-\subsection{\cbk {buildpage_filter}}
+\stopsubsection
 
+\startsubsection[title={\cbk {buildpage_filter}}]
+
 \topicindex{callbacks+building pages}
 
 This callback is called whenever \LUATEX\ is ready to move stuff to the main
@@ -211,11 +221,13 @@
 \LL
 \stoptabulate
 
-\subsection{\cbk {build_page_insert}}
+\stopsubsection
 
+\startsubsection[title={\cbk {build_page_insert}}]
+
 \topicindex{callbacks+inserts}
 
-This callback is called when the pagebuilder adds an insert. There is not much
+This callback is called when the page builder adds an insert. There is not much
 control over this mechanism but this callback permits some last minute
 manipulations of the spacing before an insert, something that might be handy when
 for instance multiple inserts (types) are appended in a row.
@@ -242,8 +254,10 @@
 course you can mess with the insert box but you need to make sure that \LUATEX\
 is happy afterwards.
 
-\subsection{\cbk {pre_linebreak_filter}}
+\stopsubsection
 
+\startsubsection[title={\cbk {pre_linebreak_filter}}]
+
 \topicindex{callbacks+linebreaks}
 
 This callback is called just before \LUATEX\ starts converting a list of nodes
@@ -273,7 +287,7 @@
 \NC \type{disc}          \NC discretionaries                             \NC \NR
 \NC \type{insert}        \NC packaging an insert                         \NC \NR
 \NC \type{vcenter}       \NC \prm {vcenter}                              \NC \NR
-\NC \type{local_box}     \NC \lpr {localleftbox} or \lpr {localrightbox} \NC \NR
+\NC \type{local_box}     \NC \prm {localleftbox} or \prm {localrightbox} \NC \NR
 \NC \type{split_off}     \NC top of a \prm {vsplit}                      \NC \NR
 \NC \type{split_keep}    \NC remainder of a \prm {vsplit}                \NC \NR
 \NC \type{align_set}     \NC alignment cell                              \NC \NR
@@ -300,8 +314,10 @@
 
 This callback does not replace any internal code.
 
-\subsection{\cbk {linebreak_filter}}
+\stopsubsection
 
+\startsubsection[title={\cbk {linebreak_filter}}]
+
 \topicindex{callbacks+linebreaks}
 
 This callback replaces \LUATEX's line breaking algorithm.
@@ -325,8 +341,10 @@
 Setting this callback to \type {false} is possible, but dangerous, because it is
 possible you will end up in an unfixable \quote {deadcycles loop}.
 
-\subsection{\type {append_to_vlist_filter}}
+\stopsubsection
 
+\startsubsection[title={\type {append_to_vlist_filter}}]
+
 \topicindex{callbacks+contributions}
 
 This callback is called whenever \LUATEX\ adds a box to a vertical list (the
@@ -344,8 +362,10 @@
 \type {post_linebreak}. When the third argument returned is \type {true} the
 normal prevdepth correction will be applied, based on the first node.
 
-\subsection{\cbk {post_linebreak_filter}}
+\stopsubsection
 
+\startsubsection[title={\cbk {post_linebreak_filter}}]
+
 \topicindex{callbacks+linebreaks}
 
 This callback is called just after \LUATEX\ has converted a list of nodes into a
@@ -359,8 +379,35 @@
 
 This callback does not replace any internal code.
 
-\subsection{\cbk {hpack_filter}}
+\stopsubsection
 
+\startsubsection[title={\cbk {glyph_run}}]
+
+\topicindex{callbacks+fonts}
+\topicindex{callbacks+hyphenation}
+\topicindex{callbacks+kerning}
+\topicindex{callbacks+ligature building}
+
+When set this callback is triggered when \TEX\ normally handles the ligaturing
+and kerning. In \LUATEX\ you use the \typ {hpack_filter} and \typ
+{per_linebreak_filter} callbacks for that (where each passes different
+arguments). This callback doesn't get triggered when there are no glyphs (in
+\LUATEX\ this optimization is controlled by a a variable).
+
+\startfunctioncall
+function(<node> head, <string> groupcode, <number> direction])
+    return <node> newhead
+end
+\stopfunctioncall
+
+The traditional \TEX\ font processing is bypassed so you need to take care of that
+with the helpers. (For the moment we keep the ligaturing and kerning callbacks but
+they are kind of obsolete.)
+
+\stopsubsection
+
+\startsubsection[title={\cbk {hpack_filter}}]
+
 \topicindex{callbacks+packing}
 
 This callback is called when \TEX\ is ready to start boxing some horizontal mode
@@ -368,7 +415,7 @@
 
 \startfunctioncall
 function(<node> head, <string> groupcode, <number> size,
-         <string> packtype [, <string> direction] [, <node> attributelist])
+         <string> packtype [, <number> direction] [, <node> attributelist])
     return <node> newhead
 end
 \stopfunctioncall
@@ -378,13 +425,12 @@
 \type {exactly}, then the \type {size} is a \type {\hbox to ...}. In both cases,
 the number is in scaled points.
 
-The \type {direction} is either one of the three-letter direction specifier
-strings, or \type {nil}.
-
 This callback does not replace any internal code.
 
-\subsection{\cbk {vpack_filter}}
+\stopsubsection
 
+\startsubsection[title={\cbk {vpack_filter}}]
+
 \topicindex{callbacks+packing}
 
 This callback is called when \TEX\ is ready to start boxing some vertical mode
@@ -396,7 +442,7 @@
 
 \startfunctioncall
 function(<node> head, <string> groupcode, <number> size, <string> packtype,
-        <number> maxdepth [, <string> direction] [, <node> attributelist]))
+        <number> maxdepth [, <number> direction] [, <node> attributelist]))
     return <node> newhead
 end
 \stopfunctioncall
@@ -403,48 +449,71 @@
 
 This callback does not replace any internal code.
 
-\subsection{\type {hpack_quality}}
+\stopsubsection
 
+\startsubsection[title={\cbk {packed_vbox_filter}}]
+
 \topicindex{callbacks+packing}
 
-This callback can be used to intercept the overfull messages that can result from
-packing a horizontal list (as happens in the par builder). The function takes a
-few arguments:
+After the \cbk {vpack_filter} callback (see previous section) is triggered the
+box get packed and after that this callback can be configured to kick in.
 
 \startfunctioncall
-function(<string> incident, <number> detail, <node> head, <number> first,
-         <number> last)
-    return <node> whatever
+function(<node> head, <string> groupcode)
+    return <node> newhead
 end
 \stopfunctioncall
 
-The incident is one of \type {overfull}, \type {underfull}, \type {loose} or
-\type {tight}. The detail is either the amount of overflow in case of \type
-{overfull}, or the badness otherwise. The head is the list that is constructed
-(when protrusion or expansion is enabled, this is an intermediate list).
-Optionally you can return a node, for instance an overfull rule indicator. That
-node will be appended to the list (just like \TEX's own rule would).
+This callback does not replace any internal code.
 
-\subsection{\type {vpack_quality}}
+\stopsubsection
 
-\topicindex{callbacks+packing}
+\startsubsection[title={\cbk {alignment_filter}}]
 
-This callback can be used to intercept the overfull messages that can result from
-packing a vertical list (as happens in the page builder). The function takes a
-few arguments:
+\topicindex{callbacks+alignments}
 
+This is an experimental callback that when set is called several times during the
+construction of an alignment. The context values are available in \typ
+{tex.getalignmentcontextvalues()}.
+
 \startfunctioncall
-function(<string> incident, <number> detail, <node> head, <number> first,
-         <number> last)
+function(<node> head, <string> context, <node> attributes, <node> preamble)
+    -- no return values
 end
 \stopfunctioncall
 
-The incident is one of \type {overfull}, \type {underfull}, \type {loose} or
-\type {tight}. The detail is either the amount of overflow in case of \type
-{overfull}, or the badness otherwise. The head is the list that is constructed.
+There are no sanity checks so if a user messes up the passed node lists the results
+can be unpredictable and, as with other node related callbacks, crash the engine.
 
-\subsection{\cbk {process_rule}}
+\stopsubsection
 
+\startsubsection[title={\cbk {localbox_filter}}]
+
+\topicindex{callbacks+local boxes}
+
+Local boxes are a somewhat tricky and error prone feature so use this callback
+with care because the paragraph is easily messed up. A line can have a left,
+right and middle box where the middle one has no width. The callback gets quite
+some parameters passed:
+
+\startfunctioncall
+function(<node> linebox, <node> leftbox, <node> rightbox, <node> middlebox,
+    <number> linenumber,
+    <number> leftskip, <number> rightskip, <number> lefthang, <number> righthang,
+    <number> indentation, <number> parinitleftskip, <number> parinitrightskip,
+    <number> parfillleftskip, <number> parfillrightskip,
+    <number> overshoot)
+    -- no return values
+end
+\stopfunctioncall
+
+This is an experimental callback that will be tested in different \CONTEXT\
+mechanisms before it will be declared stable.
+
+\stopsubsection
+
+\startsubsection[title={\cbk {process_rule}}]
+
 \topicindex{callbacks+rules}
 
 This is an experimental callback. It can be used with rules of subtype~4
@@ -452,8 +521,10 @@
 height. The callback can use \type {pdf.print} to write code to the \PDF\
 file but beware of not messing up the final result. No checking is done.
 
-\subsection{\type {pre_output_filter}}
+\stopsubsection
 
+\startsubsection[title={\type {pre_output_filter}}]
+
 \topicindex{callbacks+output}
 
 This callback is called when \TEX\ is ready to start boxing the box 255 for \prm
@@ -461,7 +532,7 @@
 
 \startfunctioncall
 function(<node> head, <string> groupcode, <number> size, <string> packtype,
-        <number> maxdepth [, <string> direction])
+        <number> maxdepth [, <number> direction])
     return <node> newhead
 end
 \stopfunctioncall
@@ -468,33 +539,39 @@
 
 This callback does not replace any internal code.
 
-\subsection{\cbk {hyphenate}}
+\stopsubsection
 
+\startsubsection[title={\cbk {hyphenate}}]
+
 \topicindex{callbacks+hyphenation}
 
+This callback is supposed to insert discretionary nodes in the node list it
+receives.
+
 \startfunctioncall
 function(<node> head, <node> tail)
+    -- no return values
 end
 \stopfunctioncall
 
-No return values. This callback has to insert discretionary nodes in the node
-list it receives.
-
 Setting this callback to \type {false} will prevent the internal discretionary
 insertion pass.
 
-\subsection{\cbk {ligaturing}}
+\stopsubsection
 
+\startsubsection[title={\cbk {ligaturing}}]
+
 \topicindex{callbacks+ligature building}
 
+This callback, which expects no return values, has to apply ligaturing to the
+node list it receives.
+
 \startfunctioncall
 function(<node> head, <node> tail)
+    -- no return values
 end
 \stopfunctioncall
 
-No return values. This callback has to apply ligaturing to the node list it
-receives.
-
 You don't have to worry about return values because the \type {head} node that is
 passed on to the callback is guaranteed not to be a glyph_node (if need be, a
 temporary node will be prepended), and therefore it cannot be affected by the
@@ -501,43 +578,71 @@
 mutations that take place. After the callback, the internal value of the \quote
 {tail of the list} will be recalculated.
 
-The \type {next} of \type {head} is guaranteed to be non-nil.
+The \type {next} of \type {head} is guaranteed to be non-nil. The \type {next} of
+\type {tail} is guaranteed to be nil, and therefore the second callback argument
+can often be ignored. It is provided for orthogonality, and because it can
+sometimes be handy when special processing has to take place.
 
-The \type {next} of \type {tail} is guaranteed to be nil, and therefore the
-second callback argument can often be ignored. It is provided for orthogonality,
-and because it can sometimes be handy when special processing has to take place.
-
 Setting this callback to \type {false} will prevent the internal ligature
-creation pass.
+creation 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.
 
-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.
+\stopsubsection
 
-\subsection{\cbk {kerning}}
+\startsubsection[title={\cbk {kerning}}]
 
 \topicindex{callbacks+kerning}
 
+This callback has to apply kerning between the nodes in the node list it
+receives. See \cbk {ligaturing} for calling conventions.
+
 \startfunctioncall
 function(<node> head, <node> tail)
+    -- no return values
 end
 \stopfunctioncall
 
-No return values. This callback has to apply kerning between the nodes in the
-node list it receives. See \cbk {ligaturing} for calling conventions.
-
 Setting this callback to \type {false} will prevent the internal kern insertion
-pass.
+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.
 
-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.
+\stopsubsection
 
-\subsection{\type {insert_par}}
+\startsubsection[title={\cbk {append_line_filter}}]
 
+\topicindex{callbacks+lines}
+
+Every time a line is added this callback is triggered, when set. migrated
+material and adjusts also qualify as such and the detail relates to the adjust
+index.
+
+\startfunctioncall
+function(<node> head, <node> tail, <string> context, <number> detail)
+    return <node> newhead
+end
+\stopfunctioncall
+
+A list of possible context values can be queried with \typ
+{tex.getappendlinecontextvalues()}.
+
+\stopsubsection
+
+\stopsection
+
+\startsection[title={Paragraph callbacks}]
+
+\startsubsection[title={\type {insert_par}}]
+
+\topicindex{callbacks+paragraphs}
+
 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> par, <string> location)
+    -- no return values
 end
 \stopfunctioncall
 
@@ -544,8 +649,28 @@
 There is no return value and you should make sure that the node stays valid
 as otherwise \TEX\ can get confused.
 
-\subsection{\cbk {mlist_to_hlist}}
+\stopsubsection
 
+\startsubsection[title={\cbk {begin_paragraph}}]
+
+\topicindex{callbacks+paragraphs}
+
+{\em todo}
+
+\stopsubsection
+
+\startsubsection[title={\cbk {paragraph_context}}]
+
+\topicindex{callbacks+paragraphs}
+
+{\em todo}
+
+\stopsubsection
+
+\startsection[title={Math related callbacks}]
+
+\startsubsection[title={\cbk {mlist_to_hlist}}]
+
 \topicindex{callbacks+math}
 
 This callback replaces \LUATEX's math list to node list conversion algorithm.
@@ -564,16 +689,46 @@
 Setting this callback to \type {false} is bad, it will almost certainly result in
 an endless loop.
 
+\stopsubsection
+
+\startsubsection[title={\cbk {math_rule}}]
+
+\topicindex{callbacks+math}
+\topicindex{callbacks+ruled}
+
+{\em todo}
+
+\stopsubsection
+
+\startsubsection[title={\cbk {make_extensible}}]
+
+\topicindex{callbacks+math}
+\topicindex{callbacks+fonts}
+
+{\em todo}
+
+\stopsubsection
+
+\startsubsection[title={\cbk {register_extensible}}]
+
+\topicindex{callbacks+math}
+\topicindex{callbacks+fonts}
+
+{\em todo}
+
+\stopsubsection
+
 \stopsection
 
 \startsection[title={Information reporting callbacks}][library=callback]
 
-\subsection{\cbk {pre_dump}}
+\startsubsection[title={\cbk {pre_dump}}]
 
 \topicindex{callbacks+dump}
 
 \startfunctioncall
 function()
+    -- no return values
 end
 \stopfunctioncall
 
@@ -580,12 +735,15 @@
 This function is called just before dumping to a format file starts. It does not
 replace any code and there are neither arguments nor return values.
 
-\subsection{\cbk {start_run}}
+\stopsubsection
 
+\startsubsection[title={\cbk {start_run}}]
+
 \topicindex{callbacks+job run}
 
 \startfunctioncall
 function()
+    -- no return values
 end
 \stopfunctioncall
 
@@ -593,8 +751,10 @@
 successful use, this callback has to be set in the \LUA\ initialization script,
 otherwise it will be seen only after the run has already started.
 
-\subsection{\cbk {stop_run}}
+\stopsubsection
 
+\startsubsection[title={\cbk {stop_run}}]
+
 \topicindex{callbacks+job run}
 
 \startfunctioncall
@@ -606,12 +766,15 @@
 {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 {intercept_tex_error}, \cbk {intercept_lua_error}}
+\stopsubsection
 
+\startsubsection[title={\cbk {intercept_tex_error}, \cbk {intercept_lua_error}}]
+
 \topicindex{callbacks+errors}
 
 \startfunctioncall
 function()
+    -- no return values
 end
 \stopfunctioncall
 
@@ -621,13 +784,16 @@
 {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} and \cbk {show_warning_message}}
+\stopsubsection
 
+\startsubsection[title={\cbk {show_error_message} and \cbk {show_warning_message}}]
+
 \topicindex{callbacks+errors}
 \topicindex{callbacks+warnings}
 
 \startfunctioncall
 function()
+    -- no return values
 end
 \stopfunctioncall
 
@@ -634,12 +800,15 @@
 These callback replaces the code that prints the error message. The usual
 interaction after the message is not affected.
 
-\subsection{\cbk {start_file}}
+\stopsubsection
 
+\startsubsection[title={\cbk {start_file}}]
+
 \topicindex{callbacks+files}
 
 \startfunctioncall
 function(category,filename)
+    -- no return values
 end
 \stopfunctioncall
 
@@ -657,12 +826,15 @@
 \LL
 \stoptabulate
 
-\subsection{\cbk {stop_file}}
+\stopsubsection
 
+\startsubsection[title={\cbk {stop_file}}]
+
 \topicindex{callbacks+files}
 
 \startfunctioncall
 function(category)
+    -- no return values
 end
 \stopfunctioncall
 
@@ -669,18 +841,22 @@
 This callback replaces the code that \LUATEX\ prints when a file is closed like
 the \type {)} for regular files.
 
-\subsection{\cbk {wrapup_run}}
+\stopsubsection
 
+\startsubsection[title={\cbk {wrapup_run}}]
+
 \topicindex{callbacks+wrapping up}
 
 This callback is called after the \PDF\ and log files are closed. Use it at your own
 risk.
 
+\stopsubsection
+
 \stopsection
 
 \startsection[title={Font-related callbacks}][library=callback]
 
-\subsection{\cbk {define_font}}
+\startsubsection[title={\cbk {define_font}}]
 
 \topicindex{callbacks+fonts}
 
@@ -719,8 +895,201 @@
 Setting this callback to \type {false} is pointless as it will prevent font
 loading completely but will nevertheless generate errors.
 
+\stopsubsection
+
+\startsubsection[title={\cbk {missing_character} and \cbk {process_character}}]
+
+\topicindex{callbacks+fonts}
+\topicindex{callbacks+characters}
+
+This callback is triggered when a character node is created and the font doesn't
+have the requested character.
+
+\startfunctioncall
+function(<node> glyph, <number> font, <number> character)
+    -- no return value
+end
+\stopfunctioncall
+
+The \type {process_character} callback is experimental and gets called when a
+glyph node is created and the callback field in a character is set.
+
+\startfunctioncall
+function(<number> font, <number> character)
+    -- no return value
+end
+\stopfunctioncall
+
+\stopsubsection
+
 \stopsection
 
+\startsection[title=Reporting]
+
+\startsubsection[title={\cbk {show_whatsit}}]
+
+\topicindex{callbacks+whatsits}
+
+Because we only have a generic whatsit it is up to the macro package to provide
+details when tracing them.
+
+\startfunctioncall
+function(<node> whatsit, <number> indentation,
+    <number> tracinglevel, <number> currentlevel, <number> inputlevel)
+    -- no return value
+end
+\stopfunctioncall
+
+The indentation tells how many periods are to be typeset if you want to be
+compatible with the rest of tracing. The tracinglevels indicates if the current
+level and\|/or input level are shown cf. \prm {tracinglevels}. Of course one
+is free to show whatever in whatever way suits the whatsit best.
+
+\stopsubsection
+
+\startsubsection[title={\cbk {get_attribute}}]
+
+\topicindex{callbacks+attributes}
+
+Because attributes are abstract pairs of indices and values the reported
+properties makes not much sense and are very macro package (and user) dependent.
+This callback permits more verbose reporting by the engine when tracing is
+enabled.
+
+\startfunctioncall
+function(<number> index, <number> value)
+    return <string>, <string>
+end
+\stopfunctioncall
+
+\stopsubsection
+
+\startsubsection[title={\cbk {get_noad_class}}]
+
+\topicindex{callbacks+classes}
+
+We have built|-|in math classes but there can also be user defined ones. This
+callback can be used to report more meaningful strings instead of numbers when
+tracing.
+
+\startfunctioncall
+function(<number> class)
+    return <string>
+end
+\stopfunctioncall
+
+\stopsubsection
+
+\startsubsection[title={\cbk {trace_memory}}]
+
+When the engine starts all kind of memory is pre|-|allocated> depending on the
+configuration more gets allocated when a category runs out of memory. The
+\LUAMETATEX\ engine is more dynamic than \LUATEX. If this callback is set it will
+get called as follows:
+
+\startfunctioncall
+function(<string> category, <boolean> success)
+    -- no return value
+end
+\stopfunctioncall
+
+The boolean indicates if the allocation has been successful. One can best quit
+the run when this one is \type {false}, if the engine doesn't already do that.
+
+\stopsubsection
+
+\startsubsection[title={\type {hpack_quality}}]
+
+\topicindex{callbacks+packing}
+
+This callback can be used to intercept the overfull messages that can result from
+packing a horizontal list (as happens in the par builder). The function takes a
+few arguments:
+
+\startfunctioncall
+function(<string> incident, <number> detail, <node> head, <number> first,
+         <number> last)
+    return <node> whatever
+end
+\stopfunctioncall
+
+The incident is one of \type {overfull}, \type {underfull}, \type {loose} or
+\type {tight}. The detail is either the amount of overflow in case of \type
+{overfull}, or the badness otherwise. The head is the list that is constructed
+(when protrusion or expansion is enabled, this is an intermediate list).
+Optionally you can return a node, for instance an overfull rule indicator. That
+node will be appended to the list (just like \TEX's own rule would).
+
+\stopsubsection
+
+\startsubsection[title={\type {vpack_quality}}]
+
+\topicindex{callbacks+packing}
+
+This callback can be used to intercept the overfull messages that can result from
+packing a vertical list (as happens in the page builder). The function takes a
+few arguments:
+
+\startfunctioncall
+function(<string> incident, <number> detail, <node> head, <number> first,
+    <number> last)
+end
+\stopfunctioncall
+
+The incident is one of \type {overfull}, \type {underfull}, \type {loose} or
+\type {tight}. The detail is either the amount of overflow in case of \type
+{overfull}, or the badness otherwise. The head is the list that is constructed.
+
+\stopsubsection
+
+\startsubsection[title={\type {show_lua_call}}]
+
+\topicindex{callbacks+lua}
+
+This one can be used to help reporting definitions that relate to \LUA\ calls to
+be more meaningful when tracing.
+
+\startfunctioncall
+function(<string> name, <number> index)
+    return <string>
+end
+\stopfunctioncall
+
+\stopsubsection
+
+\startsubsection[title={\type {handle_overload}}]
+
+\topicindex{callbacks+overload}
+
+This is one of the few callbacks that is aimed at \CONTEXT: it relates to overload
+protection of macros and other variables.
+
+\startfunctioncall
+function(<boolean> error, <number> overload, <string> csname, <number> flags)
+    -- no return values
+end
+\stopfunctioncall
+
+The overload is determined by:
+
+\starttabulate[|c|l|c|c|c|c|c|]
+\DB   \BC         \BC immutable \BC permanent \BC primitive \BC frozen \BC instance \NC \NR
+\TB
+\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
+\LL
+\stoptabulate
+
+This relates to the optional prefixed that can be used when defining and setting
+quantities and is therefore also a bit of a playground. All macros and aliases in
+\CONTEXT\ are classified this way.
+
+\stopsection
+
 \stopchapter
 
 \stopcomponent

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-codes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-codes.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-codes.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/luametatex
+
 \environment luametatex-style
 
 \startcomponent luametatex-codes

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-contents.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-contents.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-contents.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/luametatex
+
 \environment luametatex-style
 
 \startcomponent luametatex-contents

Deleted: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,292 +0,0 @@
-% language=uk
-
-\environment luametatex-style
-
-\startcomponent luametatex-differences
-
-\startchapter[reference=differences,title={Differences with \LUATEX}]
-
-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|]
-\BC fonts       \NC \type {\letterspacefont}
-                    \type {\copyfont}
-                    \type {\expandglyphsinfont}
-                    \type {\ignoreligaturesinfont}
-                    \type {\tagcode}
-                    \type {\leftghost}
-                    \type {\rightghost}
-                \NC \NR
-\BC backend     \NC \type {\dviextension}
-                    \type {\dvivariable }
-                    \type {\dvifeedback}
-                    \type {\pdfextension}
-                    \type {\pdfvariable }
-                    \type {\pdffeedback}
-                    \type {\dviextension}
-                    \type {\draftmode}
-                    \type {\outputmode}
-                \NC \NR
-\BC dimensions  \NC \type {\pageleftoffset}
-                    \type {\pagerightoffset}
-                    \type {\pagetopoffset}
-                    \type {\pagebottomoffset}
-                    \type {\pageheight}
-                    \type {\pagewidth}
-                \NC \NR
-\BC resources   \NC \type {\saveboxresource}
-                    \type {\useboxresource}
-                    \type {\lastsavedboxresourceindex}
-                    \type {\saveimageresource}
-                    \type {\useimageresource}
-                    \type {\lastsavedimageresourceindex}
-                    \type {\lastsavedimageresourcepages}
-                \NC \NR
-\BC positioning \NC \type {\savepos}
-                    \type {\lastxpos}
-                    \type {\lastypos}
-                \NC \NR
-\BC directions  \NC \type {\textdir}
-                    \type {\linedir}
-                    \type {\mathdir}
-                    \type {\pardir}
-                    \type {\pagedir}
-                    \type {\bodydir}
-                    \type {\pagedirection}
-                    \type {\bodydirection}
-                \NC \NR
-\BC randomizer  \NC \type {\randomseed}
-                    \type {\setrandomseed}
-                    \type {\normaldeviate}
-                    \type {\uniformdeviate}
-                \NC \NR
-\BC utilities   \NC \type {\synctex}
-                \NC \NR
-\BC extensions  \NC \type {\latelua}
-                    \type {\lateluafunction}
-                    \type {\openout}
-                    \type {\write}
-                    \type {\closeout}
-                    \type {\openin}
-                    \type {\read}
-                    \type {\readline}
-                    \type {\closein}
-                    \type {\ifeof}
-                \NC \NR
-\BC control     \NC \type {\suppressfontnotfounderror}
-                    \type {\suppresslongerror}
-                    \type {\suppressprimitiveerror}
-                    \type {\suppressmathparerror}
-                    \type {\suppressifcsnameerror}
-                    \type {\suppressoutererror}
-                    \type {\mathoption}
-                \NC \NR
-\BC system      \NC \type {\primitive}
-                    \type {\ifprimitive}
-                    \type {\formatname}
-                \NC \NR
-\BC ignored     \NC \type {\long}
-                    \type {\outer}
-                    \type {\mag}
-                \NC \NR
-\stoptabulate
-
-The resources and positioning primitives are actually useful but can be defined
-as macros that (via \LUA) inject nodes in the input that suit the macro package
-and backend. The three||letter direction primitives are gone and the numeric
-variants are now leading. There is no need for page and body related directions
-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: 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. 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 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, 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, 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_format_file open_data_file
-\stoptyping
-
-The callbacks related to errors are changed:
-
-\starttyping
-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
-process_jobname
-start_run stop_run wrapup_run
-pre_dump
-start_file stop_file
-\stoptyping
-
-Because we use a more generic whatsit model, there is a new callback:
-
-\starttyping
-show_whatsit
-\stoptyping
-
-Being the core of extensibility, the typesetting callbacks of course stayed. This
-is what we ended up with:
-
-\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.
-
-\starttyping
-define_font
-\stoptyping
-
-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. 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 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)
-has been quite stable. It made no sense otherwise. Most \CONTEXT\ functionality
-didn't change much at the user level. Of course there have been issues, as is
-natural with everything new and beta, but we have a fast update cycle.
-
-The same is true for \LUAMETATEX\ and \CONTEXT\ \LMTX: it can be used for
-production as usual and in practice \CONTEXT\ users tend to use the beta
-releases, which proves this. Of course, if you use low level features that are
-experimental you're on your own. Also, as with \LUATEX\ it might take many years
-before a long term stable is defined. The good news is that, the source code
-being part of the \CONTEXT\ distribution, there is always a properly working,
-more or less long term stable, snapshot.
-
-The error reporting subsystem has been redone a little but is still fundamentally
-the same. We don't really assume interactive usage but if someone uses it, it
-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 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! 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
-
-\stopcomponent
-

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,10 +1,12 @@
-% language=uk
+% language=us runpath=texruns:manuals/luametatex
 
+% todo: move some to elsewhere (e.g. builders / paragraphs
+
 \environment luametatex-style
 
 \startcomponent luametatex-enhancements
 
-\startchapter[reference=enhancements,title={Basic \TEX\ enhancements}]
+\startchapter[reference=enhancements,title={Enhancements}]
 
 \startsection[title={Introduction}]
 
@@ -26,8 +28,8 @@
 \stoptyping
 
 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}. When you clone all primitives you can also do this:
+specified by one or more keywords \type {tex}, \type {etex} or \type {luatex}.
+When you clone all primitives you can also do this:
 
 \starttyping
 \directlua { tex.enableprimitives('normal',true) }
@@ -50,10 +52,89 @@
 
 \stopsubsection
 
+\startsubsection[title={Rationale}]
+
+One can argue that \TEX\ should stay as it is but over decades usage of this
+program has evolved and resulted in large macro packages that often need to rely
+on what the \TEX\ books calls \quote {dirty tricks}. When you look deep down in
+the code of \CONTEXT\ \MKII, \MKIV\ and \MKXL\ (aka \LMTX) you will see plenty of
+differences but quite a bit of the functionality in the most recent versions is
+also available in \MKII. Of course more has been added over time, and some
+mechanisms could be made more efficient and reliable but plenty was possible.
+
+So, when you see something done in \CONTEXT\ \LMTX\ using new \LUAMETATEX\
+primitives you can assume that somehow the same is done in \CONTEXT\ \MKIV. We
+don't really need \LUAMETATEX\ instead of \LUATEX. Among the main reasons for
+still going for this new engine are:
+
+\startitemize[packed]
+\startitem
+    some new primitives make for less tracing and tracing has become rather
+    verbose over years (just try \type {tracingall}); examples are the new macro
+    argument handling and some new hooks
+\stopitem
+\startitem
+    some new primitives permits more efficient coding and have a positive impact
+    on performance (this sort of compensates a performance hit due to delegating
+    work to \LUA)
+\stopitem
+\startitem
+    other primitives are there because they make the code look better; good
+    examples are the extensions to conditionals; they remove the necessity for
+    all kind of (somewhat unnatural) middle layers; take local control as example
+\stopitem
+\startitem
+    a few primitives make complex and demanding mechanism a bit easier to grasp
+    and explain; think of alignments, inserts and marks
+\stopitem
+\startitem
+    more access from the \LUA\ end to \TEX\ internals: a few more callbacks, more
+    options, more robust interfaces, etc
+\stopitem
+\startitem
+    some mechanisms are very specific but can be made more generic (and powerful),
+    like inserts, marks, adjusts and local boxes
+\stopitem
+\stopitemize
+
+I realize that new primitives also can make some \TEX\ code look less threatening
+to new users. It removes a bit of hackery and limits the level of guru that comes
+with showing off the mastery of expansion and lookahead. So be it. I wonder if
+those objecting to some of the extensions (with the argument that they are not
+needed, and \CONTEXT\ \MKIV\ is proof of that) can resist using them. I admit
+that it sometimes hurt to throw away good working but cumbersome code that took a
+while to evolve, but I also admit that I favor long distance traveling by bike or
+car over riding horseback.
+
+It took a few years for \LUAMETATEX\ to evolve to what it is now and most
+extensions are not there \quotation {because they were easy} or \quotation {could
+be done}. If that were the case, there would be plenty more. In many aspects it
+has been a balancing act and much also relates to looking at the \CONTEXT\ source
+code (\TEX\ as well as \LUA) and wondering why it looks that way. It is also
+driven by the fact that I want to be able to explain to users why things are done
+in a certain way. In fact, I want users to be able to look at the code and
+understand it (apart from maybe a few real dirty low level helpers that are also
+dirty because of performance reasons). Just take this into account when reading on.
+
+And yes, there are still a few possibilities I want to explore \unknown\ some might
+show up temporarily so don't be surprised. I'm also aware that some new features can
+have bugs or side effects that didn't show up in \CONTEXT, which after all is the
+benchmark and environment in which all this evolves.
+
+Over time, the other \TEX\ engines might have an occasional feature (primitive)
+added and it is very unlikely that \LUAMETATEX\ will follow up on that. First of
+all we have different internals but most of all because plenty of time went into
+considering what got added and what not, apart from the fact that we have
+callbacks. Decades of \TEX\ development never really have lead to an extensive
+wish list so there is no real need why there should be a demand on anything other
+than we offer here. If \TEX\ worked well for ages, it can as well do for more, so
+there is no need to cripple the code base simply in order to be compatible with
+other engines; \LUAMETATEX\ is already quite different anyway.
+
+\stopsubsection
+
 \startsubsection[title={Version information}]
 
-\startsubsubsection[title={\lpr {luatexbanner}, \lpr {luatexversion} and \lpr {luatexrevision}}]
-
 \topicindex{version}
 \topicindex{banner}
 
@@ -70,11 +151,11 @@
 \DB primitive             \BC value
                           \BC explanation \NC \NR
 \TB
-\NC \lpr {luatexbanner}   \NC \VersionHack{\luatexbanner}
+\NC \prm {luatexbanner}   \NC \VersionHack{\luatexbanner}
                           \NC the banner reported on the console \NC \NR
-\NC \lpr {luatexversion}  \NC \the\luatexversion
+\NC \prm {luatexversion}  \NC \the\luatexversion
                           \NC major and minor number combined \NC \NR
-\NC \lpr {luatexrevision} \NC \the\luatexrevision
+\NC \prm {luatexrevision} \NC \the\luatexrevision
                           \NC the revision number \NC \NR
 \LL
 \stoptabulate
@@ -83,7 +164,7 @@
 
 \startitemize
 \startitem
-    The major version is the integer result of \lpr {luatexversion} divided by
+    The major version is the integer result of \prm {luatexversion} divided by
     100. The primitive is an \quote {internal variable}, so you may need to prefix
     its use with \prm {the} or \prm {number} depending on the context.
 \stopitem
@@ -91,7 +172,7 @@
     The minor version is a number running from 0 upto 99.
 \stopitem
 \startitem
-    The revision is reported by \lpr {luatexrevision}. Contrary to other engines
+    The revision is reported by \prm {luatexrevision}. Contrary to other engines
     in \LUAMETATEX\ is also a number so one needs to prefix it with \prm {the} or
     \prm {number}. \footnote {In the past it always was good to prefix the
     revision with \prm {number} anyway, just to play safe, although there have
@@ -105,12 +186,39 @@
 \stopitem
 \stopitemize
 
-\stopsubsubsection
+The \LUATEX\ binary has companions like \LUAJITTEX\ and a version that has a font
+rendering library on board. Both introduce dependencies that don't fit into the
+\LUAMETATEX\ agenda: compilation should be easy and future proof and not depend
+on code outside the source tree. It means that for instance the \CONTEXT\ runners
+don't really need to check much more than the basic name. It also means that the
+\type {context} and \type {mtxrun} stubs can be symbolic links to the main
+program that itself is about 3MB, so we can keep the binary footprint small. For
+normal \CONTEXT\ \LMTX\ processing no other binaries are needed because whatever
+support we need is done in \LUA.
 
 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.
 
+The \type {status} library also provides some information including what we get
+with the three mentioned primitives:
+
+\starttabulate[|l|l|]
+\DB field                   \BC value                               \NC \NR
+\TB
+\NC \type {filename}        \NC \cldcontext{status.filename}        \NC \NR
+\NC \type {banner}          \NC \cldcontext{status.banner}          \NC \NR
+\NC \type {luatex_engine}   \NC \cldcontext{status.luatex_engine}   \NC \NR
+\NC \type {luatex_version}  \NC \cldcontext{status.luatex_version}  \NC \NR
+\NC \type {luatex_revision} \NC \cldcontext{status.luatex_revision} \NC \NR
+\NC \type {luatex_verbose}  \NC \cldcontext{status.luatex_verbose}  \NC \NR
+\NC \type {copyright}       \NC \cldcontext{status.copyright}       \NC \NR
+\NC \type {development_id}  \NC \cldcontext{status.development_id}  \NC \NR
+\NC \type {format_id}       \NC \cldcontext{status.format_id}       \NC \NR
+\NC \type {used_compiler}   \NC \cldcontext{status.used_compiler}   \NC \NR
+\LL
+\stoptabulate
+
 \stopsubsection
 
 \stopsection
@@ -139,8 +247,8 @@
 input that would have generated an error when processed by older \TEX|-|based
 engines. The affected commands with an altered initial (left of the equal sign)
 or secondary (right of the equal sign) value are: \prm {char}, \prm {lccode},
-\prm {uccode}, \lpr {hjcode}, \prm {catcode}, \prm {sfcode}, \lpr {efcode}, \lpr
-{lpcode}, \lpr {rpcode}, \prm {chardef}.
+\prm {uccode}, \prm {hjcode}, \prm {catcode}, \prm {sfcode}, \prm {efcode}, \prm
+{lpcode}, \prm {rpcode}, \prm {chardef}.
 
 As far as the core engine is concerned, all input and output to text files is
 \UTF-8 encoded. Input files can be pre|-|processed using the \type {reader}
@@ -149,10 +257,11 @@
 package during callback processing. We have made some practical choices and the
 user has to live with those.
 
-Output in byte|-|sized chunks can be achieved by using characters just outside of
-the valid \UNICODE\ range, starting at the value $1{,}114{,}112$ (0x110000). When
-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.
+% Output in byte|-|sized chunks can be achieved by using characters just outside of
+% the valid \UNICODE\ range, starting at the value $1{,}114{,}112$ (0x110000). When
+% 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. This feature has
+% been dropped.
 
 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. Because we
@@ -161,11 +270,11 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {Uchar}}]
+\startsubsection[title={\prm {Uchar}}]
 
 \topicindex{\UNICODE}
 
-The expandable command \lpr {Uchar} reads a number between~0 and $1{,}114{,}111$
+The expandable command \prm {Uchar} reads a number between~0 and $1{,}114{,}111$
 and expands to the associated \UNICODE\ character.
 
 \stopsubsection
@@ -216,16 +325,20 @@
 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()}.
+smaller than the absolute maximum.
 
-\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
+% % We show this later on so not here.
+%
+% 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,
@@ -413,12 +526,20 @@
 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:
+It is possible to change or add to the attributes assigned to a box with \prm
+{boxattribute}:
 
 \starttyping
-\boxattr 0 123 456
+\boxattribute 0 123 456
 \stoptyping
 
+You can set attributes of the current paragraph specification node with \prm
+{parattribute}:
+
+\starttyping
+\parattribute 123 456
+\stoptyping
+
 \stopsubsection
 
 \stopsection
@@ -427,6 +548,9 @@
 
 \startsubsection[title={\prm {directlua}}]
 
+\topicindex{scripting}
+\topicindex{lua+direct}
+
 In order to merge \LUA\ code with \TEX\ input, a few new primitives are needed.
 The primitive \prm {directlua} is used to execute \LUA\ code immediately. The
 syntax is
@@ -513,7 +637,7 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {luaescapestring}}]
+\startsubsection[title={\prm {luaescapestring}}]
 
 \topicindex {escaping}
 
@@ -539,13 +663,16 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {luafunction}, \lpr {luafunctioncall} and \lpr {luadef}}]
+\startsubsection[title={\prm {luafunction}, \prm {luafunctioncall} and \prm {luadef}}]
 
+\topicindex{functions}
+\topicindex{lua+functions}
+
 The \prm {directlua} commands involves tokenization of its argument (after
 picking up an optional name or number specification). The tokenlist is then
 converted into a string and given to \LUA\ to turn into a function that is
 called. The overhead is rather small but when you have millions of calls it can
-have some impact. For this reason there is a variant call available: \lpr
+have some impact. For this reason there is a variant call available: \prm
 {luafunction}. This command is used as follows:
 
 \starttyping
@@ -572,7 +699,7 @@
 }
 \stoptyping
 
-The \lpr {luafunctioncall} primitive does the same but is unexpandable, for
+The \prm {luafunctioncall} primitive does the same but is unexpandable, for
 instance in an \prm {edef}. In addition \LUATEX\ provides a definer:
 
 \starttyping
@@ -590,8 +717,11 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {luabytecode} and \lpr {luabytecodecall}}]
+\startsubsection[title={\prm {luabytecode} and \prm {luabytecodecall}}]
 
+\topicindex{lua+bytecode}
+\topicindex{bytecode}
+
 Analogue to the function callers discussed in the previous section we have byte
 code callers. Again the call variant is unexpandable.
 
@@ -639,9 +769,9 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {catcodetable}}]
+\startsubsection[title={\prm {catcodetable}}]
 
-The primitive \lpr {catcodetable} switches to a different catcode table. Such a
+The primitive \prm {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.
 
@@ -651,13 +781,13 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {initcatcodetable}}]
+\startsubsection[title={\prm {initcatcodetable}}]
 
 \startsyntax
 \initcatcodetable <15-bit number>
 \stopsyntax
 
-The primitive \lpr {initcatcodetable} creates a new table with catcodes
+The primitive \prm {initcatcodetable} creates a new table with catcodes
 identical to those defined by \INITEX. The new catcode table is allocated
 globally: it will not go away after the current group has ended. If the supplied
 number is identical to the currently active table, an error is raised. The
@@ -680,13 +810,13 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {savecatcodetable}}]
+\startsubsection[title={\prm {savecatcodetable}}]
 
 \startsyntax
 \savecatcodetable <15-bit number>
 \stopsyntax
 
-\lpr {savecatcodetable} copies the current set of catcodes to a new table with
+\prm {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. Again, the new table is allocated globally:
 it will not go away after the current group has ended. If the supplied number is
@@ -694,15 +824,28 @@
 
 \stopsubsection
 
+\startsubsection[title={\prm {letcharcode}}]
+
+This primitive can be used to assign a meaning to an active character, as in:
+
+\starttyping
+\def\foo{bar} \letcharcode123=\foo
+\stoptyping
+
+This can be a bit nicer than using the uppercase tricks (using the property of
+\prm {uppercase} that it treats active characters special).
+
+\stopsubsection
+
 \stopsection
 
-\startsection[title={Tokens, commands and strings}]
+\startsection[title={Tokens and expansion}]
 
-\startsubsection[title={\lpr {scantextokens} and \lpr {tokenized}}]
+\startsubsection[title={\prm {scantextokens}, \prm {tokenized} and \prm {retokenized}}]
 
 \topicindex {tokens+scanning}
 
-The syntax of \lpr {scantextokens} is identical to \prm {scantokens}. This
+The syntax of \prm {scantextokens} is identical to \prm {scantokens}. This
 primitive is a slightly adapted version of \ETEX's \prm {scantokens}. The
 differences are:
 
@@ -711,7 +854,7 @@
     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
+    \prm {scantextokens} never raises an EOF error, and it does not execute
     \prm {everyeof} tokens.
 \stopitem
 \startitem
@@ -730,13 +873,16 @@
 \tokenized catcodetable <number> {...}
 \stopsyntax
 
+The \prm {retokenized} variant differs in that it doesn't check for a keyword and
+just used the current catcode regime.
+
 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},
-\lpr {gtoksapp}, \lpr {gtokspre}, \lpr {xtoksapp},  \lpr {xtokspre}}]
+\startsubsection[title={\prm {toksapp}, \prm {tokspre}, \prm {etoksapp}, \prm {etokspre},
+\prm {gtoksapp}, \prm {gtokspre}, \prm {xtoksapp},  \prm {xtokspre}}]
 
 Instead of:
 
@@ -755,238 +901,279 @@
 
 \stopsubsection
 
-\startsubsection[title={\prm {csstring}, \lpr {begincsname} and \lpr {lastnamedcs}}]
+\startsubsection[title={\prm {etoks} and \prm {xtoks}}]
 
-These are somewhat special. The \prm {csstring} primitive is like
-\prm {string} but it omits the leading escape character. This can be
-somewhat more efficient than stripping it afterwards.
+A mix between the previously discussed append and prepend primitives and simple
+toks register assignments are these two. They act like \prm {toks} but expand
+their content first. The \type {x} variant does a global assignment.
 
-The \lpr {begincsname} primitive is like \prm {csname} but doesn't create
-a relaxed equivalent when there is no such name. It is equivalent to
+\stopsubsection
 
-\starttyping
-\ifcsname foo\endcsname
-  \csname foo\endcsname
-\fi
-\stoptyping
+\startsubsection[title={\prm {expanded}, \prm {expandedafter}, \prm {localcontrol}, \prm
+{localcontrolled}, \prm {beginlocalcontrol} and \prm {endlocalcontrol}}]
 
-The advantage is that it saves a lookup (don't expect much speedup) but more
-important is that it avoids using the \prm {if} test. The \lpr {lastnamedcs}
-is one that should be used with care. The above example could be written as:
+\topicindex {expansion}
 
+The \prm {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.
+
 \starttyping
-\ifcsname foo\endcsname
-  \lastnamedcs
-\fi
+\let\immediateassigned\localcontrolled % sort of what \LUATEX provides
 \stoptyping
 
-This is slightly more efficient than constructing the string twice (deep down in
-\LUATEX\ this also involves some \UTF8 juggling), but probably more relevant is
-that it saves a few tokens and can make code a bit more readable.
+Say that we define:
 
-\stopsubsection
+\startbuffer
+\edef\TestA
+  {\advance\scratchcounter\plusone}
+\edef\TestB
+  {\localcontrol\TestA
+   \the\scratchcounter}
+\edef\TestC
+  {\localcontrolled{\advance\scratchcounter\plusone}%
+   \the\scratchcounter}
+\edef\TestD
+  {\beginlocalcontrol\advance\scratchcounter\plusone\endlocalcontrol
+   \the\scratchcounter}
+\stopbuffer
 
-\startsubsection[title={\lpr {clearmarks}}]
+\typebuffer \getbuffer
 
-\topicindex {marks}
+With this example:
 
-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 (no synchronization node is used).
+\startbuffer
+\scratchcounter 10 \meaningasis\TestA
+\scratchcounter 20 \meaningasis\TestB
+\scratchcounter 30 \meaningasis\TestC
+\scratchcounter 40 \meaningasis\TestD
+\stopbuffer
 
-\startsyntax
-\clearmarks <16-bit number>
-\stopsyntax
+\typebuffer
 
-\stopsubsection
+We get this:
 
-\startsubsection[title={\lpr {alignmark} and \lpr {aligntab}}]
+\startlines
+\tttf \getbuffer
+\stoplines
 
-The primitive \lpr {alignmark} duplicates the functionality of \type {#} inside
-alignment preambles, while \lpr {aligntab} duplicates the functionality of \type
-{&}.
+These local control primitives are a bit tricky and error message can be
+confusing. Future versions might have a bit better recovery but in practice it
+works as expected.
 
+An \prm {expandedafter} primitive is also provided as an variant on \prm
+{expandafter} that takes a token list instead of a single token.
+
 \stopsubsection
 
-\startsubsection[title={\lpr {letcharcode}}]
+\startsubsection[title={\prm {semiprotected}, \prm {semiexpanded}, \prm {expand},
+\prm {semiexpand} and \prm {expandactive}}]
 
-This primitive can be used to assign a meaning to an active character, as in:
+These primitives can best be explained with a few examples. The semi boils down to
+a bit more controlled usage of \prm {protected} macros.
 
+\startbuffer
+               \def\Test {test}
+               \def\TestA{\Test}
+\protected     \def\TestB{\Test}
+\semiprotected \def\TestC{\Test}
+              \edef\TestD{\Test}
+              \edef\TestE{\TestA}
+              \edef\TestF{\TestB}
+              \edef\TestG{\TestC}
+              \edef\TestH{\normalexpanded{\TestB\TestC}} % ctx has \expanded defined
+              \edef\TestI{\semiexpanded{\TestB\TestC}}
+              \edef\TestJ{\expand\TestB\expand\TestC}
+              \edef\TestK{\semiexpand\TestB\semiexpand\TestC}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+The effective meanings are given next (we use \prm {meaningasis} for this):
+
+\startlines \tttf
+\meaningasis\Test
+\meaningasis\TestA
+\meaningasis\TestB
+\meaningasis\TestC
+\meaningasis\TestD
+\meaningasis\TestE
+\meaningasis\TestF
+\meaningasis\TestG
+\meaningasis\TestH
+\meaningasis\TestI
+\meaningasis\TestJ
+\meaningasis\TestK
+\stoplines
+
+I admit that is not yet applied much in \CONTEXT\ as we have no real need for it
+and I implemented it more out for nostalgic reasons: the kind of selective
+protect mechanism we have in \MKII.
+
+Assuming that \type {~} is made active:
+
 \starttyping
-\def\foo{bar} \letcharcode123=\foo
+\protected\def~{!}
+
+\edef\xxxx{~}
+\edef\xxxx{\expandactive~}
 \stoptyping
 
-This can be a bit nicer than using the uppercase tricks (using the property of
-\prm {uppercase} that it treats active characters special).
+In both cases the meaning will show \type {~} so it's kind of subtle because in reality
+they have the following internal representation:
 
+\starttyping
+active    char 126
+protected call ~
+\stoptyping
+
 \stopsubsection
 
-\startsubsection[title={\lpr {glet}}]
+\startsubsection[title={Going ahead with \prm {expandafterpars} and \prm {expandafterspaces}}]
 
-This primitive is similar to:
+\topicindex{expansion+after}
 
-\starttyping
-\protected\def\glet{\global\let}
-\stoptyping
+Here are again some convenience primitives that simplify coding, remove the need
+to show off with multi|-|step macros and are nicely expandable. They fit in the
+repertoire of additional primitives that make macro code look somewhat easier.
+Here are a few examples:
 
-but faster (only measurable with millions of calls) and probably more convenient
-(after all we also have \type {\gdef}).
+\startbuffer
+\def\foo{!!} [\expandafterpars  \foo \par test]
+\def\foo{!!} [\expandafterspaces\foo      test]
 
+\def\foo{!!} \def\oof{\foo}                   [{\oof} test]
+\def\foo{!!} \def\oof{\expandafterspaces\foo} [{\oof}test]
+\stopbuffer
+
+\typebuffer
+
+These are typically used when building high level interfaces so not many users
+will see them in document sources.
+
+\startlines
+\getbuffer
+\stoplines
+
 \stopsubsection
 
-\startsubsection[title={\lpr {defcsname}, \lpr {edefcsname}, \lpr {edefcsname} and \lpr {xdefcsname}}]
+\startsubsection[title={\prm {afterassigned}}]
 
-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.
+\topicindex{assignments+after}
 
-\starttyping
-\def\gdefcsname foo\endcsname{oof}
-\stoptyping
+This primitive is a multiple token variant of \prm {afterassignment} and it takes
+a token list. It might look better in some cases than multiple single token
+\quote {calls}.
 
 \stopsubsection
 
-\startsubsection[title={\lpr {expanded}}]
+\startsubsection[title={\prm {detokenized}}]
 
-\topicindex {expansion}
+\topicindex{serializing}
 
-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:
+The \prm {string} primitive serializes what comes next, a control sequence or
+something more primitive string representation or just the (\UTF) character so it
+does look at what it sees next in some detail. This can give confusing results
+when the next token is for instance a new line. The \prm {detokenized} is less
+picky and just serializes the token, so in the next examples an empty lines is
+what we normally expect it to become: a serialized par token.
 
-\starttyping
-\let\immediateassignment\immediate
-\let\immediateassigned  \localcontrolled
-\stoptyping
+\def\oof{s\expandafter\foo\string}
+\def\ofo{d\expandafter\foo\detokenized}
+\def\foo#1{:[#1]}
 
-\stopsubsection
+\startbuffer
+\oof test
+\ofo test
+\oof \relax
+\ofo \relax
+\oof \par
+\ofo \par
 
-% \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
+\oof
 
-\startsubsection[title={\lpr {ignorepars}}]
+\ofo
 
-This primitive is like \prm {ignorespaces} but also skips paragraph ending
-commands (normally \prm {par} and empty lines).
+done
+\stopbuffer
 
+\typebuffer
+
+We need the empty lines and \quote {done} to make sure we see the effect:
+
+{\tttf \getbuffer}
+
 \stopsubsection
 
-\startsubsection[title={\lpr {futureexpand}, \lpr {futureexpandis}, \lpr {futureexpandisap}}]
+\startsubsection[title={\prm {expandtoken} and \prm {expandcstoken}}]
 
-These commands are used as:
+\topicindex{expansion+tokens}
 
-\starttyping
-\futureexpand\sometoken\whenfound\whennotfound
-\stoptyping
+These two are not really needed but can make code look less weird (and
+impressive) because there are no catcode changes involved. The next example
+illustrates what they do:
 
-When there is no match and a space was gobbled a space will be put back. The
-\type {is} variant doesn't do that while the \type {isap} even skips \type
-{\pars}, These characters stand for \quote {ignorespaces} and \quote
-{ignorespacesandpars}.
+\startbuffer
+\edef\foo{\expandtoken 12 123 }              \meaning\foo
+\edef\oof{\bgroup \egroup}                              \meaning\oof
+\edef\oof{\expandcstoken \bgroup\expandcstoken \egroup} \meaning\oof
+\edef\oof{\expandcstoken \foo   }                       \meaning\oof
+\stopbuffer
 
+\typebuffer
+
+So \prm {expandtoken} expects two arguments: a catcode and a character number.
+The \prm {expandcstoken} will only look at control sequences representing a
+character.
+
+\startlines
+\getbuffer
+\stoplines
+
 \stopsubsection
 
-\startsubsection[title={\lpr {aftergrouped}}]
+\stopsection
 
+\startsection[title=Grouping]
+
+\startsubsection[title={\prm {endsimplegroup}}]
+
+\topicindex{grouping+ending}
+
+This feature might look somewhat weird so just ignore that it is there. It is one
+of these features that might never make it in a engine when discussed in
+committee but it comes in handy in \CONTEXT, so:
+
+\startbuffer
+\def\foo{\beginsimplegroup\bf\let\next}
+
+\foo{test}
+\foo{test\endgroup
+\foo{test\endsimplegroup
+\foo{test\egroup
+\stopbuffer
+
+\typebuffer
+
+These lines typeset as:
+
+\startlines \getbuffer \stoplines
+
+The \prm {beginsimplegroup} primitives signals that any end group command, except
+\prm {endmathgroup} will wrap up the current group. The \prm {endsimplegroup} is
+sort of redundant but fits in anyway.
+
+The also \LUAMETATEX\ specific \prm {beginmathgroup} and \prm {endmathgroup}
+commands are like \prm {begingroup} and \prm {endgroup} but restore the mathstyle
+when it has been changed in the group.
+
+\startsubsection[title={\prm {aftergrouped}}]
+
+\topicindex{grouping+after}
+
 There is a new experimental feature that can inject multiple tokens to after the group
 ends. An example demonstrate its use:
 
@@ -1023,12 +1210,25 @@
 
 \stopsubsection
 
+\startsubsection[title={\prm {atendofgroup} and \prm {atendofgrouped}}]
+
+\topicindex{grouping+ending}
+
+These are variants of \prm {aftergroup} and \prm {aftergrouped} but they happen
+{\em before} the groups is closed. It is one of these primitives that is not
+really needed but that can make code (and tracing) cleaner, which is one of the
+objectives (at least for \CONTEXT).
+
+\stopsubsection
+
 \stopsection
 
 \startsection[title=Conditions]
 
-\startsubsection[title={\lpr{ifabsnum} and \lpr {ifabsdim}}]
+\startsubsection[title={\prm{ifabsnum} and \prm {ifabsdim}}]
 
+\topicindex{conditions}
+
 There are two tests that we took from \PDFTEX:
 
 \startbuffer
@@ -1048,11 +1248,44 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr{ifcmpnum}, \lpr {ifcmpdim}, \lpr {ifnumval}, \lpr
-{ifdimval}, \lpr {ifchknum} and \lpr {ifchkdim}}]
+\startsubsection[title={Comparing}]
 
+When comparing (for instance) to numbers the a \type {=}, \type {<} or \type {>}
+is used. In \LUAMETATEX\ you can negate such a comparison by \type {!}, as in
+\type {!=}, \type {!<} or \type {!>}. Multiple \type {!} flip that state.
+
+In addition to these \ASCII\ combinations, we also support some \UNICODE\
+variants. The extra comparison options are:
+
+\starttabulate[|l|c|c|l|]
+\DB character      \BC               \BC            \BC operation         \NC \NR
+\TB
+\NC \type {0x2208} \NC $\Uchar"2208$ \NC            \NC element of        \NC \NR
+\NC \type {0x2209} \NC $\Uchar"2209$ \NC            \NC not element of    \NC \NR
+\NC \type {0x2260} \NC $\Uchar"2260$ \NC \type {!=} \NC not equal         \NC \NR
+\NC \type {0x2264} \NC $\Uchar"2264$ \NC \type {!>} \NC less equal        \NC \NR
+\NC \type {0x2265} \NC $\Uchar"2265$ \NC \type {!<} \NC greater equal     \NC \NR
+\NC \type {0x2270} \NC $\Uchar"2270$ \NC            \NC not less equal    \NC \NR
+\NC \type {0x2271} \NC $\Uchar"2271$ \NC            \NC not greater equal \NC \NR
+\LL
+\stoptabulate
+
+\stopsubsection
+
+\startsubsection[title={\prm{ifzeronum}, \prm {ifzerodim}}]
+
 \topicindex {conditions+numbers}
 \topicindex {conditions+dimensions}
+
+Their name tells what they test for: zero (point) values.
+
+\stopsubsection
+
+\startsubsection[title={\prm{ifcmpnum}, \prm {ifcmpdim}, \prm {ifnumval}, \prm
+{ifdimval}, \prm {ifchknum} and \prm {ifchkdim}}]
+
+\topicindex {conditions+numbers}
+\topicindex {conditions+dimensions}
 \topicindex {numbers}
 \topicindex {dimensions}
 
@@ -1108,12 +1341,17 @@
 
 \typebuffer \blank {\tt \getbuffer} \blank
 
-The last checked values are available in \lpr {lastchknum} and \lpr {lastchkdim}.
+The last checked values are available in \prm {lastchknum} and \prm {lastchkdim}.
 These don't obey grouping.
 
+The two primitives \prm {ifchkdimension} and \prm {ifchknumber} are like \prm
+{ifchkdimen} and \prm {ifchknum}but are more rigorous: the short ones quit
+scanning at a match where after the match there can be anything, while the long
+variants don't accept following crap.
+
 \stopsubsection
 
-\startsubsection[title={\lpr {ifmathstyle} and \lpr {ifmathparameter}}]
+\startsubsection[title={\prm {ifmathstyle} and \prm {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
@@ -1124,7 +1362,7 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {ifempty}}]
+\startsubsection[title={\prm {ifempty}}]
 
 This primitive tests for the following token (control sequence) having no
 content. Assuming that \type {\empty} is indeed empty, the following two are
@@ -1140,7 +1378,7 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {ifrelax}}]
+\startsubsection[title={\prm {ifrelax}}]
 
 This primitive complements \type {\ifdefined}, \type {\ifempty} and \type
 {\ifcsname} so that we have all reasonable tests directly available.
@@ -1147,7 +1385,7 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {ifboolean}}]
+\startsubsection[title={\prm {ifboolean}}]
 
 This primitive tests for non|-|zero, so the next variants are similar
 
@@ -1159,7 +1397,7 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {iftok} and \lpr {ifcstok}}]
+\startsubsection[title={\prm {iftok} and \prm {ifcstok}}]
 
 \topicindex {conditions+tokens}
 \topicindex {tokens}
@@ -1188,14 +1426,50 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {ifarguments}, \lpr {ifparameters} and \lpr {ifparameter}}]
+\startsubsection[title={\prm {ifhastok}, \prm {ifhastoks}, \prm {ifhasxtoks} and \prm {ifhaschar}}]
 
-These are part of the extended macro argument parsing features. The \type
-{\ifarguments} condition is like an \type {\ifcase} where the number is the
+\topicindex {conditions+tokens}
+\topicindex {tokens}
+
+The first three test primitives run over a token list in order to encounter a
+single token or a sequence. The \type {x} variants applies expansion.
+
+\startbuffer
+\def\ab {ab}
+\def\abc{abc}
+\ifhastok  1    {12} Y\else N\fi
+\ifhastoks {ab} {abc}Y\else N\fi
+\ifhastoks {ab} {\abc}Y\else N\fi
+\ifhastoks {\ab}{\abc}Y\else N\fi
+\ifhasxtoks{ab} {\abc}Y\else N\fi
+\ifhastok  3    {12} Y\else N\fi
+\ifhastoks {de} {abc}Y\else N\fi
+\stopbuffer
+
+\typebuffer \startpacked[blank] {\tt\nospacing\getbuffer} \stoppacked
+
+The \prm {ifhaschar} primitive differs from \prm {ifhastok} in that it handles
+nested balanced \quote {lists}, as in:
+
+\startbuffer
+\ifhastok  a  {abc}Y\else N\fi
+\ifhaschar a  {abc}Y\else N\fi
+\ifhastok  a{{a}bc}Y\else N\fi
+\ifhaschar a{{a}bc}Y\else N\fi
+\stopbuffer
+
+\typebuffer \startpacked[blank] {\tt\nospacing\getbuffer} \stoppacked
+
+\stopsubsection
+
+\startsubsection[title={\prm {ifarguments}, \prm {ifparameters} and \prm {ifparameter}}]
+
+These are part of the extended macro argument parsing features. The \prm
+{ifarguments} condition is like an \prm {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}
+successive macro expansions will adapt the value. The \prm {ifparameters}
+counts till the first empty parameter and the \prm {ifparameter} (singular)
+takes a parameter reference (like \type {#2}) and again is an \prm {ifcase}
 where zero means a bad reference, one a non|-|empty argument and two an empty
 one. A typical usage is:
 
@@ -1213,9 +1487,10 @@
    \iftok{#2}{}\else two\fi}
 \stoptyping
 
+
 \stopsubsection
 
-\startsubsection[title={\lpr {ifcondition}}]
+\startsubsection[title={\prm {ifcondition}}]
 
 \topicindex {conditions}
 
@@ -1273,7 +1548,7 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {orelse} and \lpr {orunless}}]
+\startsubsection[title={\prm {orelse} and \prm {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
@@ -1339,7 +1614,7 @@
 \fi
 \stoptyping
 
-The \lpr {orunless} variant negates the next test, just like \prm {unless}. In
+The \prm {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
@@ -1347,206 +1622,100 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {ifprotected}, \lpr {frozen}, \lpr {iffrozen} and \lpr {ifusercmd}}]
+\startsubsection[title={\prm {ifflags}}]
 
-These checkers deal with control sequences. You can check if a command is a
+This checker deal with control sequences. You can check if a command is a
 protected one, that is, defined with the \type {\protected} prefix. A command is
 frozen when it has been defined with the \type {\frozen} prefix. Beware: only
 macros can be frozen. A user command is a command that is not part of the
-predefined set of commands. This is an experimental command.
+predefined set of commands. This is an experimental command. The flag values can
+be queried with \typ {tex.getflagvalues}.
 
 \stopsubsection
 
 \stopsection
 
-\startsection[title={Boxes, rules and leaders}]
+\startsection[title={Control and debugging}]
 
-\startsubsection[title={\lpr {outputbox}}]
+\startsubsection[title={Tracing}]
 
-\topicindex {output}
+\topicindex {tracing}
 
-This integer parameter allows you to alter the number of the box that will be
-used to store the page sent to the output routine. Its default value is 255, and
-the acceptable range is from 0 to 65535.
+If \prm {tracingonline} is larger than~2, the node list display will also print
+the node number of the nodes as well as set attributes (these can be made verbose
+by a callback). We have only a generic whatsit but again a callback can be used
+to provide detail. So, when a box is shown in \CONTEXT\ you will see quite a lot
+more than in other engines. Because nodes have more fields, more is shown anyway,
+and for nodes that have sublists (like discretionaries) these are also shown. All
+that could have been delegated to \LUA\ but it felt wrong to not made that a core
+engine feature.
 
-\startsyntax
-\outputbox = 12345
-\stopsyntax
+The \prm {tracingpenalties} parameter triggers the line break routine to report
+the applied interline penalties to the output.
 
-\stopsubsection
+When \prm {tracingcommands} is larger than 3 the mode switch will be not be
+prefixed to the \type {{command}} but get its own \type {[line]}.
 
-\startsubsection[title={\prm {hrule}, \prm {vrule}, \lpr {nohrule} and \lpr {novrule}}]
+When \prm {tracinghyphenation} is set to 1 duplicate patterns are reported (in
+\CONTEXT\ we default to that) and higher values will also show details about the
+\LUA\ hyphenation (exception) feedback loop discussed elsewhere.
 
-\topicindex {rules}
+When set to 1 the \prm {tracingmath} variable triggers the reporting of the mode
+(inline or display) an mlist is processed. Other new tracing commands are
+discussed where the mechanisms that they relate to are introduced.
 
-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.
+The \prm {tracingnodes} variable makes that when a node list is reported the node
+numbers are also shown. This is only useful when you have callbacks that access
+nodes.
 
-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.
+\starttabulate[|l|p|]
+\DB value \BC effect \NC \NR
+\TB
+\NC 1 \NC show node numbers in lists \NC \NR
+\NC 2 \NC also show numbers of attribute nodes \NC \NR
+\NC 3 \NC also show glue spec node numbers \NC \NR
+\LL
+\stoptabulate
 
-\stopsubsection
+When the \prm {shownodedetails} variable is set to a value larger than zero and a
+node is shown (in a list) then more details will be revealed. This can be rather
+verbose because in \LUAMETATEX\ node carry more properties than in traditional
+\TEX\ and \LUATEX. A value larger than one will also show details of attributes
+that are bound to nodes.
 
-\startsubsection[title={\prm {vsplit}}]
+The \prm {tracinglevels} variable is a bitset and offers the following features:
 
-\topicindex {splitting}
-
-The \prm {vsplit} primitive has to be followed by a specification of the required
-height. As alternative for the \type {to} keyword you can use \type {upto} to get
-a split of the given size but result has the natural dimensions then.
-
-\stopsubsection
-
-\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
-that meant: using a box with known dimensions that wraps a special that instructs
-the backend to include an image. The wrapping is needed because a special itself
-is a whatsit and as such has no dimensions.
-
-In \PDFTEX\ a special whatsit for images was introduced and that one {\em has}
-dimensions. As a consequence, in several places where the engine deals with the
-dimensions of nodes, it now has to check the details of whatsits. By inheriting
-code from \PDFTEX, the \LUATEX\ engine also had that property. However, at some
-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 (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
-that image support is not present in \LUAMETATEX. When an image specification was
-parsed the special properties, like the filename, or additional attributes, were
-stored in the backend and all that \LUATEX\ does is registering a reference to an
-image's specification in the rule node. But, having no backend means nothing is
-stored, which in turn would make the image inclusion primitives kind of weird.
-
-Therefore you need to realize that contrary to \LUATEX, {\em in \LUAMETATEX\
-support for images and box reuse is not built in}! However, we can assume that
-an implementation uses rules in a similar fashion as \LUATEX\ does. So, you can
-still consider images and box reuse to be core concepts. Here we just mention the
-primitives that \LUATEX\ provides. They are not available in the engine but can
-of course be implemented in \LUA.
-
 \starttabulate[|l|p|]
-\DB command \BC explanation \NC \NR
+\DB value \BC effect \NC \NR
 \TB
-\NC \lpr {saveboxresource}             \NC save the box as an object to be included later \NC \NR
-\NC \lpr {saveimageresource}           \NC save the image as an object to be included later \NC \NR
-\NC \lpr {useboxresource}              \NC include the saved box object here (by index) \NC \NR
-\NC \lpr {useimageresource}            \NC include the saved image object here (by index) \NC \NR
-\NC \lpr {lastsavedboxresourceindex}   \NC the index of the last saved box object \NC \NR
-\NC \lpr {lastsavedimageresourceindex} \NC the index of the last saved image object \NC \NR
-\NC \lpr {lastsavedimageresourcepages} \NC the number of pages in the last saved image object \NC \NR
+\NC 1 \NC show group level \NC \NR
+\NC 2 \NC show input level \NC \NR
+\NC 4 \NC show catcode regime \NC \NR
 \LL
 \stoptabulate
 
-An implementation probably should accept the usual optional dimension parameters
-for \type {\use...resource} in the same format as for rules. With images, these
-dimensions are then used instead of the ones given to \lpr {useimageresource} but
-the original dimensions are not overwritten, so that a \lpr {useimageresource}
-without dimensions still provides the image with dimensions defined by \lpr
-{saveimageresource}. These optional parameters are not implemented for \lpr
-{saveboxresource}.
+So a value of~7 shows them all. In \CONTEXT\ we set this variable to~3 which
+gives a rather verbose log when tracing is on but in the end its'not that bad
+because using some of the newer programming related primitive can save tracing.
 
-\starttyping
-\useimageresource width 20mm height 10mm depth 5mm \lastsavedimageresourceindex
-\useboxresource   width 20mm height 10mm depth 5mm \lastsavedboxresourceindex
-\stoptyping
+The \prm {tracinglists} variable will show some of the (intermediate) lists that
+get processed. It is there mainly for development but might evolve.
 
-Examples or optional entries are \type {attr} and \type {resources} that accept a
-token list, and the \type {type} key. When set to non|-|zero the \type {/Type}
-entry is omitted. A value of 1 or 3 still writes a \type {/BBox}, while 2 or 3
-will write a \type {/Matrix}. But, as said: this is entirely up to the backend.
-Generic macro packages (like \type {tikz}) can use these assumed primitives so
-one can best provide them. It is probably, for historic reasons, the only more or
-less standardized image inclusion interface one can expect to work in all macro
-packages.
+Because in \LUATEX\ the saving and restoring of locally redefined macros and set
+variables is optimized a bit in order to prevent redundant stack usage, there
+will be less tracing visible.
 
-\stopsubsection
+Also, because we have a more extensive macro argument parser, a fast path (and
+less storage demands) for macros with no arguments, and flags that can be set for
+macros the way macros are traced can be different in details (we therefore have
+for instance \prm {meaningfull} (double l's indeed) and \prm {meaningless} as
+variants of \prm {meaning} as well as \prm {meaningasis} for more literal
+alternative).
 
-\startsubsection[title={\lpr {hpack}, \lpr {vpack} and \lpr {tpack}}]
-
-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. 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
 
-\startsubsection[title={\lpr {gleaders}},reference=sec:gleaders]
-
-\topicindex {leaders}
-
-This type of leaders is anchored to the origin of the box to be shipped out. So
-they are like normal \prm {leaders} in that they align nicely, except that the
-alignment is based on the {\it largest\/} enclosing box instead of the {\it
-smallest\/}. The \type {g} stresses this global nature.
-
-\stopsubsection
-
-\stopsection
-
-\startsection[title={Languages}]
-
-\startsubsection[title={\lpr {hyphenationmin}}]
-
-\topicindex {languages}
-\topicindex {hyphenation}
-
-This primitive can be used to set the minimal word length, so setting it to a value
-of~$5$ means that only words of 6 characters and more will be hyphenated, of course
-within the constraints of the \prm {lefthyphenmin} and \prm {righthyphenmin}
-values (as stored in the glyph node). This primitive accepts a number and stores
-the value with the language.
-
-\stopsubsection
-
-\startsubsection[title={\prm {boundary}, \prm {noboundary}, \prm {protrusionboundary} and \prm {wordboundary}}]
-
-The \prm {noboundary} command is used to inject a whatsit node but now injects a normal
-node with type \nod {boundary} and subtype~0. In addition you can say:
-
-\starttyping
-x\boundary 123\relax y
-\stoptyping
-
-This has the same effect but the subtype is now~1 and the value~123 is stored.
-The traditional ligature builder still sees this as a cancel boundary directive
-but at the \LUA\ end you can implement different behaviour. The added benefit of
-passing this value is a side effect of the generalization. The subtypes~2 and~3
-are used to control protrusion and word boundaries in hyphenation and have
-related primitives.
-
-\stopsubsection
-
-\stopsection
-
-\startsection[title={Control and debugging}]
-
-\startsubsection[title={Tracing}]
-
-\topicindex {tracing}
-
-If \prm {tracingonline} is larger than~2, the node list display will also print
-the node number of the nodes.
-
-\stopsubsection
-
-% \startsubsection[title={\lpr {lastnodetype}, \lpr {lastnodesubtype}, \lpr
-% {currentiftype} and \lpr {internalcodesmode}.}]
+% \startsubsection[title={\prm {lastnodetype}, \prm {lastnodesubtype}, \prm
+% {currentiftype} and \prm {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
@@ -1556,480 +1725,287 @@
 %
 % \stopsubsection
 
-\startsubsection[title={\lpr {lastnodetype}, \lpr {lastnodesubtype}, \lpr
+\startsubsection[title={\prm {lastnodetype}, \prm {lastnodesubtype}, \prm
 {currentiftype}}]
 
-The \ETEX\ command \type {\lastnodetype} returns the node codes as used in the
+The \ETEX\ command \prm {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 and again reports the codes used
+to be incompatible with the \LUA\ end of the engine. The same is true for \prm
+{currentiftype}, as we have more conditionals and also use a different order.
+The \prm {lastnodesubtype} is a bonus and again reports the codes used
 internally. During development these might occasionally change, but eventually
 they will be stable.
 
 \stopsubsection
 
-\stopsection
+\startsubsection[title={\prm {lastboundary} and \prm {unboundary}}]
 
-\startsection[title={Files}]
+There are \prm {lastpenalty}, \prm {lastskip}, \prm {lastkern} and \prm {lastbox}
+primitives and \LUAMETATEX\ also offers \prm {lastboundary} which gives the value
+assigned to a user boundary node. This means that we also have a \prm
+{unboundary} to complement the other \tex {un...} primitives.
 
-\startsubsection[title={File syntax}]
+\stopsubsection
 
-\topicindex {files+names}
+\startsubsection[title=Nodes]
 
-\LUAMETATEX\ will accept a braced argument as a file name:
+\topicindex {nodes}
 
-\starttyping
-\input {plain}
-\openin 0 {plain}
-\stoptyping
+The \ETEX\ primitive \prm {lastnodetype} is not honest in reporting the
+internal numbers as it uses its own values. But you can set \type
+{\internalcodesmode} to a non|-|zero value to get the real id's instead. In
+addition there is \prm {lastnodesubtype}.
 
-This allows for embedded spaces, without the need for double quotes. Macro
-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.
+Another last one is \prm {lastnamedcs} which holds the last match but this one
+should be used with care because one never knows if in the meantime something
+else \quote {last} has been seen.
 
-The \lpr {tracingfonts} primitive that has been inherited from \PDFTEX\ has
-been adapted to support variants in reporting the font. The reason for this
-extension is that a csname not always makes sense. The zero case is the default.
+\stopsubsection
 
-\starttabulate[|l|l|]
-\DB value \BC reported \NC \NR
-\TB
-\NC \type{0} \NC \type{\foo xyz} \NC \NR
-\NC \type{1} \NC \type{\foo (bar)} \NC \NR
-\NC \type{2} \NC \type{<bar> xyz} \NC \NR
-\NC \type{3} \NC \type{<bar @ ..pt> xyz} \NC \NR
-\NC \type{4} \NC \type{<id>} \NC \NR
-\NC \type{5} \NC \type{<id: bar>} \NC \NR
-\NC \type{6} \NC \type{<id: bar @ ..pt> xyz} \NC \NR
-\LL
-\stoptabulate
+\stopsection
 
-\stopsubsection
+\startsection[title=Scanning]
 
-\startsubsection[title={Writing to file}]
+\startsubsection[title=Keywords]
 
-\topicindex {files+writing}
+\topicindex {keywords}
+\topicindex {scanning+keywords}
 
-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}.
+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:
 
-\stopsubsection
+\starttyping
+\hbox attr 123 456 attr 123 456 spread 10cm { }
+\hrule width 10cm depth 3mm
+\hskip 3pt plus 2pt minus 1pt
+\stoptyping
 
-\stopsection
+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.
 
-\startsection[title={Math}]
+In \LUAMETATEX\ the following is okay. Watch the few more keywords in box and
+rule specifications.
 
-\topicindex {math}
+\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
 
-We will cover math extensions in its own chapter because not only the font
-subsystem and spacing model have been enhanced (thereby introducing many new
-primitives) but also because some more control has been added to existing
-functionality. Much of this relates to the different approaches of traditional
-\TEX\ fonts and \OPENTYPE\ math.
+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
+\stopsubsection
 
-\startsection[title={Fonts}]
+\startsubsection[title={\prm {norelax}}]
 
-\topicindex {fonts}
+\topicindex{relaxing}
 
-Like math, we will cover fonts extensions in its own chapter. Here we stick to
-mentioning that loading fonts is different in \LUAMETATEX. As in \LUATEX\ we have
-the extra primitives \type {\fontid} and \type {\setfontid}, \type {\noligs} and
-\type {\nokerns}, and \type {\nospaces}. The other new primitives in \LUATEX\
-have been dropped.
+There are a few cases where the \TEX\ scanned skips over spaces and \prm {relax} as
+well as quits on a \prm {relax} in which case it gets pushed back. An example is
+given below:
 
-\stopsection
+\startbuffer
+\edef\TestA{\ifnum1=1\relax   Y\else N\fi} \meaningasis\TestA
+\edef\TestB{\ifnum1=1\norelax Y\else N\fi} \meaningasis\TestB
+\stopbuffer
 
-\startsection[title=Directions]
+\typebuffer
 
-\topicindex {\OMEGA}
-\topicindex {\ALEPH}
-\topicindex {directions}
+The second line also contains a sentinel but this time we use \prm {norelax}
+which will not be pushed back. So, this feature is just a trick to get rid of (in
+itself reasonable) side effects.
 
-\startsubsection[title={Two directions}]
+\startlines\getbuffer \stoplines
 
-The directional model in \LUAMETATEX\ is a simplified version the the model used
-in \LUATEX. In fact, not much is happening at all: we only register a change in
-direction.
-
 \stopsubsection
 
-\startsubsection[title={How it works}]
+\startsubsection[title={\prm {ignorepars}}]
 
-The approach is that we try to make node lists balanced but also try to avoid
-some side effects. What happens is quite intuitive if we forget about spaces
-(turned into glue) but even there what happens makes sense if you look at it in
-detail. However that logic makes in|-|group switching kind of useless when no
-properly nested grouping is used: switching from right to left several times
-nested, results in spacing ending up after each other due to nested mirroring. Of
-course a sane macro package will manage this for the user but here we are
-discussing the low level injection of directional information.
+This primitive is like \prm {ignorespaces} but also skips paragraph ending
+commands (normally \prm {par} and empty lines).
 
-This is what happens:
+\stopsubsection
 
-\starttyping
-\textdirection 1 nur {\textdirection 0 run \textdirection 1 NUR} nur
-\stoptyping
+\startsubsection[title={\prm {futureexpand}, \prm {futureexpandis}, \prm {futureexpandisap}}]
 
-This becomes stepwise:
+\topicindex{expansion+future}
 
-\startnarrower
-\starttyping
-injected: [push 1]nur {[push 0]run [push 1]NUR} nur
-balanced: [push 1]nur {[push 0]run [pop 0][push 1]NUR[pop 1]} nur[pop 0]
-result  : run {RUNrun } run
-\stoptyping
-\stopnarrower
+These commands are used as:
 
-And this:
-
 \starttyping
-\textdirection 1 nur {nur \textdirection 0 run \textdirection 1 NUR} nur
+\futureexpand\sometoken\whenfound\whennotfound
 \stoptyping
 
-becomes:
+When there is no match and a space was gobbled a space will be put back. The
+\type {is} variant doesn't do that while the \type {isap} even skips \type
+{\pars}, These characters stand for \quote {ignorespaces} and \quote
+{ignorespacesandpars}.
 
-\startnarrower
-\starttyping
-injected: [+TRT]nur {nur [+TLT]run [+TRT]NUR} nur
-balanced: [+TRT]nur {nur [+TLT]run [-TLT][+TRT]NUR[-TRT]} nur[-TRT]
-result  : run {run RUNrun } run
-\stoptyping
-\stopnarrower
+\stopsubsection
 
-Now, in the following examples watch where we put the braces:
+\stopsection
 
-\startbuffer
-\textdirection 1 nur {{\textdirection 0 run} {\textdirection 1 NUR}} nur
-\stopbuffer
+\startsection[title=Macros]
 
-\typebuffer
+\startsubsection[title={\prm {lettonothing} and \prm {glettonothing}}]
 
-This becomes:
+This primitive is equivalent to:
 
-\startnarrower
-\getbuffer
-\stopnarrower
+\starttyping
+\protected\def\lettonothing#1{\def#1{}}
+\stoptyping
 
-Compare this to:
+and although it might feel faster (only measurable with millions of calls) it's
+mostly there because it is easier on tracing (less clutter). An advantage over
+letting to an empty predefined macro is also that in tracing we keep seeing the
+name (relaxing would show the relax equivalent).
 
-\startbuffer
-\textdirection 1 nur {{\textdirection 0 run }{\textdirection 1 NUR}} nur
-\stopbuffer
+\stopsubsection
 
-\typebuffer
+\startsubsection[title={\prm {glet}}]
 
-Which renders as:
+This primitive is similar to:
 
-\startnarrower
-\getbuffer
-\stopnarrower
+\starttyping
+\protected\def\glet{\global\let}
+\stoptyping
 
-So how do we deal with the next?
+but faster (only measurable with millions of calls) and probably more convenient
+(after all we also have \type {\gdef}).
 
-\startbuffer
-\def\ltr{\textdirection 0\relax}
-\def\rtl{\textdirection 1\relax}
+\stopsubsection
 
-run {\rtl nur {\ltr run \rtl NUR \ltr run \rtl NUR} nur}
-run {\ltr run {\rtl nur \ltr RUN \rtl nur \ltr RUN} run}
-\stopbuffer
+\startsubsection[title={\prm {defcsname}, \prm {edefcsname}, \prm {gdefcsname} and \prm {xdefcsname}}]
 
-\typebuffer
+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.
 
-It gets typeset as:
+\starttyping
+\gdefcsname foo\endcsname{oof}
+\stoptyping
 
-\startnarrower
-\startlines
-\getbuffer
-\stoplines
-\stopnarrower
+\stopsubsection
 
-We could define the two helpers to look back, pick up a skip, remove it and
-inject it after the dir node. But that way we loose the subtype information that
-for some applications can be handy to be kept as|-|is. This is why we now have a
-variant of \lpr {textdirection} which injects the balanced node before the skip.
-Instead of the previous definition we can use:
+\startsubsection[title={\prm {letcsname} and \prm {gletcsname}}]
 
-\startbuffer[def]
-\def\ltr{\linedirection 0\relax}
-\def\rtl{\linedirection 1\relax}
-\stopbuffer
+These can also be implemented using macros but again they are natively provided
+by the engine for the same reasons: less code and less tracing clutter.
 
-\typebuffer[def]
+\starttyping
+\gletcsname foo\endcsname \relax
+\stoptyping
 
-and this time:
-
-\startbuffer[txt]
-run {\rtl nur {\ltr run \rtl NUR \ltr run \rtl NUR} nur}
-run {\ltr run {\rtl nur \ltr RUN \rtl nur \ltr RUN} run}
-\stopbuffer
-
-\typebuffer[txt]
-
-comes out as a properly spaced:
-
-\startnarrower
-\startlines
-\getbuffer[def,txt]
-\stoplines
-\stopnarrower
-
-Anything more complex that this, like combination of skips and penalties, or
-kerns, should be handled in the input or macro package because there is no way we
-can predict the expected behaviour. In fact, the \lpr {linedir} is just a
-convenience extra which could also have been implemented using node list parsing.
-
 \stopsubsection
 
-\startsubsection[title={Normalizing lines}]
+\startsubsection[title={\prm {csstring}, \prm {begincsname} and \prm {lastnamedcs}}]
 
-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.
+These are somewhat special. The \prm {csstring} primitive is like
+\prm {string} but it omits the leading escape character. This can be
+somewhat more efficient than stripping it afterwards.
 
-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.
+The \prm {begincsname} primitive is like \prm {csname} but doesn't create
+a relaxed equivalent when there is no such name. It is equivalent to
 
-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.
+\starttyping
+\ifcsname foo\endcsname
+  \csname foo\endcsname
+\fi
+\stoptyping
 
-Control over normalization happens via the mentioned mode variable and here is
-what the engine provides right now. We use a bitmap:
+The advantage is that it saves a lookup (don't expect much speedup) but more
+important is that it avoids using the \prm {if} test. The \prm {lastnamedcs}
+is one that should be used with care. The above example could be written as:
 
-\starttabulate[|l|l|]
-\DB value \BC reported \NC \NR
-\TB
-\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
+\starttyping
+\ifcsname foo\endcsname
+  \lastnamedcs
+\fi
+\stoptyping
 
-Setting the bit enables the related normalization. More features might be added
-in future releases.
+This is slightly more efficient than constructing the string twice (deep down in
+\LUATEX\ this also involves some \UTF8 juggling), but probably more relevant is
+that it saves a few tokens and can make code a bit more readable.
 
-% 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.
+Active characters are stored in the hash with a special prefix sequence prepended
+to the character: \prm {csactive} or the never used \UTF\ representation of \type
+{U+FFFF}.
 
-% 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
 
-\startsubsection[title=Orientations]
+\startsubsection[title={\prm {futuredef} and \prm {futurecsname}}]
 
-As mentioned, the difference with \LUATEX\ is that we only have numeric
-directions and that there are only two: left|-|to|-|right (\type {0}) and
-right|-|to|-|left (\type {1}). The direction of a box is set with \type
-{direction}.
+This is just the definition variant of \prm {futurelet} and a simple example
+shows the difference:
 
-In addition to that boxes can now have an \type {orientation} keyword followed by
-optional \type {xoffset} and|/|or \type {yoffset} keywords. The offsets don't
-have consequences for the dimensions. The alternatives \type {xmove} and \type
-{ymove} on the contrary are reflected in the dimensions. Just play with them. The
-offsets and moves only are accepted when there is also an orientation, so no time
-is wasted on testing for these rarely used keywords. There are related primitives
-\type {\box...} that set these properties.
+\startbuffer
+\def\whatever{[\next:\meaning\next]}
+\futurelet\next\whatever A
+\futuredef\next\whatever B
+\stopbuffer
 
-As these are experimental it will not be explained here (yet). They are covered
-in the descriptions of the development of \LUAMETATEX: articles and|/|or
-documents in the \CONTEXT\ distribution. For now it is enough to know that the
-orientation can be up, down, left or right (rotated) and that it has some
-anchoring variants. Combined with the offsets this permits macro writers to
-provide solutions for top|-|down and bottom|-|up writing directions, something
-that is rather macro package specific and used for scripts that need
-manipulations anyway. The \quote {old} vertical directions were never okay and
-therefore not used.
+\typebuffer
 
-There are a couple of properties in boxes that you can set and query but that
-only really take effect when the backend supports them. When usage on \CONTEXT\
-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}.
+\getbuffer
 
-{\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).}
+The next one was more an experiment that then stayed around, just to see what
+surprising abuse of this primitive will happen:
 
-\stopsubsection
+\startbuffer
+\def\whateveryes{[YES]}
+\def\whatevernop{[NOP]}
+\let\whatever\undefined
+\futurecsname\whatevernop whatever\endcsname
+\futurecsname\whatevernop whateveryes\endcsname
+\stopbuffer
 
-\stopsection
+\typebuffer
 
-\startsection[title=Keywords]
+When the assembles control sequence is undefined the given one will be expanded,
+a weird one, right? I will probably apply it some day in cases where I want less
+tracing and a more direct expansion of an assembled name.
 
-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:
+\getbuffer
 
-\starttyping
-\hbox attr 123 456 attr 123 456 spread 10cm { }
-\hrule width 10cm depth 3mm
-\hskip 3pt plus 2pt minus 1pt
-\stoptyping
+Here is a usage example:
 
-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
+\xdef\Whatever{\futurecsname\whatevernop    whatever\endcsname}
+\xdef\Whatever{\futurecsname\whateveryes whateveryes\endcsname}
+\xdef\Whatever{\ifcsname    whatever\endcsname\lastnamedcs\else\whatevernop\fi}
+\xdef\Whatever{\ifcsname whateveryes\endcsname\lastnamedcs\else\whatevernop\fi}
+\xdef\Whatever{\ifcsname    whatever\endcsname\csname    whatever\endcsname\else\whatevernop\fi}
+\xdef\Whatever{\ifcsname whateveryes\endcsname\csname whateveryes\endcsname\else\whatevernop\fi}
 \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.
+The timings for one million times defining each of these definitions are 0.277,
+0.313, 0.310, 0.359, 0.352 and 0.573 seconds (on a 2018 Dell 7250 Precision
+laptop with mobile E3-1505M v6 processor), so there is a little gain here, but of
+course in practice no one will notice that because not that many such macros are
+defined (or used).
 
-\stopsection
+\stopsubsection
 
-\startsection[title=Expressions and \lpr {numericscale}]
+\startsubsection[title=Arguments]
 
-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).
+\topicindex {macros+arguments}
 
-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:
 
@@ -2038,7 +2014,7 @@
 \stoptyping
 
 Here the first argument between parentheses is mandate. But the magic
-prefix \lpr {tolerant} makes that limitation go away:
+prefix \prm {tolerant} makes that limitation go away:
 
 \starttyping
 \tolerant\def\foo(#1)#2{...}
@@ -2066,6 +2042,9 @@
 \NC 0   \NC discard but count the argument \NC \NR
 \ML
 \NC *   \NC ignore spaces \NC \NR
+\NC .   \NC ignore pars and spaces \NC \NR
+\NC ,   \NC push back space when no match \NC \NR
+\ML
 \NC :   \NC pick up scanning here  \NC \NR
 \NC ;   \NC quit scanning \NC \NR
 \LL
@@ -2081,7 +2060,8 @@
 
 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:
+you are not careful. You can quit scanning with \prm {ignorearguments} if you
+want:
 
 \starttyping
 \mymacro 123\ignorearguments
@@ -2101,14 +2081,71 @@
 parser and engine in general and of course you can gain back some by using these
 features.
 
-\stopsection
+\stopsubsection
 
-\startsection[title=Overload protection]
+\startsubsection[title={\prm {parametermark}}]
 
+The meaning of primitive \prm {parametermark} is equivalent to \type {#} in a macro
+definition, just like \prm {alignmark} is in an alignment. It can be used to circumvent
+catcode issues. The normal \quotation {duplicate them when nesting} rules apply.
+
+\startbuffer
+\def\foo\parametermark1%
+  {\def\oof\parametermark\parametermark1%
+     {[\parametermark1:\parametermark\parametermark1]}}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+Here \type {\foo{X}\oof{Y}} gives: \foo{X}\oof{Y}.
+
+\stopsubsection
+
+\startsubsection[title={\prm {lastarguments} and \prm {parametercount}}]
+
+\topicindex{arguments+numberof}
+
+There are two state variables that refer to the number of read arguments. An
+example can show the difference:
+
+\startbuffer
+\tolerant\def\foo[#1]#*[#2]{[\the\lastarguments,\the\parametercount]}
+
+\foo[1][2]
+\foo[1]
+\foo
+
+x: \foo[1][2]
+x: \foo[1]
+x: \foo
+\stopbuffer
+
+\typebuffer
+
+What you get actually depends on the macro package. When for instance \prm
+{everypar} has some value that results in a macro being expanded, the numbers
+reported can refer to the most recent macro because serializing the number can
+result in entering horizontal mode.
+
+\startlines
+\getbuffer
+\stoplines
+
+The \prm {lastarguments} returns the most recent global state variable as with
+any \type {\last...} primitives. Because it actually looks at the parameter stack
+of the currently expanded macro \prm {parametercount} is more reliable but also
+less efficient.
+
+\stopsubsection
+
+\startsubsection[title=Overload protection]
+
+\topicindex {macros+overloading}
+
 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
+via prefixes. Depending on the value of the \prm {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.
 
@@ -2120,10 +2157,10 @@
 \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
+A \prm {mutable} macro can always be changed contrary to an \prm {immutable} one.
+For instance a macro that acts as a variable is normally \prm {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
+\prm {permanent}. Primives start out a \prm {permanent} ones but with a primitive
 property instead.
 
 \startbuffer
@@ -2134,16 +2171,16 @@
 
 \typebuffer
 
-The \lpr {meaningfull} primitive is like \prm {meaning} but report the
-properties too. The \lpr {meaningless} companion reports the body of a macro.
+The \prm {meaningfull} primitive is like \prm {meaning} but report the
+properties too. The \prm {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
+So, the \prm {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
+There is an extra prefix \prm {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:
 
@@ -2155,7 +2192,7 @@
 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
+the noalign primitive. Of course we can also apply the \prm {global} and \prm
 {tolerant} prefixes here. The complete repertoire of extra prefixes is:
 
 \starttabulate
@@ -2174,14 +2211,16 @@
 \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
+\NC \type {untraced}   \NC the macro gets a different treatment in tracing \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
+The not yet discussed \prm {instance} is just a flag with no special meaning
+which can be used as classifier. The \prm {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
+violates the flags depends on the parameter \prm {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
@@ -2199,11 +2238,11 @@
 \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
+parameter. At level five and above the \prm {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
+The \prm {overloaded} prefix can be used to overload a frozen macro. The \prm
 {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.
@@ -2215,10 +2254,57 @@
 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.
 
+There is an extra prefix \prm {untraced} that will suppress the meaning when
+tracing so that the macro looks more like a primitive. It is still somewhat
+experimental so what gets displayed might change.
+
+The \prm {letfrozen}, \prm {unletfrozen}, \prm {letprotected} and \prm
+{unletprotected} primitives do as their names advertise. Of course the \prm
+{overloadmode} must be set so that it is permitted.
+
+\stopsubsection
+
+\startsubsection[title={Swapping meaning}]
+
+\topicindex {macros+swapping}
+
+The \prm {swapcsvalues} will swap the values of two control sequences of the same
+type. This is a somewhat tricky features because it can interfere with grouping.
+
+\startbuffer
+\scratchcounterone 1 \scratchcountertwo 2
+(\the\scratchcounterone,\the\scratchcountertwo)
+\swapcsvalues \scratchcounterone \scratchcountertwo
+(\the\scratchcounterone,\the\scratchcountertwo)
+\swapcsvalues \scratchcounterone \scratchcountertwo
+(\the\scratchcounterone,\the\scratchcountertwo)
+
+\scratchcounterone 3 \scratchcountertwo 4
+(\the\scratchcounterone,\the\scratchcountertwo)
+\bgroup
+\swapcsvalues \scratchcounterone \scratchcountertwo
+(\the\scratchcounterone,\the\scratchcountertwo)
+\egroup
+(\the\scratchcounterone,\the\scratchcountertwo)
+\stopbuffer
+
+\typebuffer
+
+We get similar results:
+
+\startlines
+\getbuffer
+\stoplines
+
+\stopsubsection
+
 \stopsection
 
-\startsection[title=Constants]
+\startsection[title=Quantities]
 
+\startsubsection[title={Constants with \prm{integerdef}, \prm {dimensiondef},
+\prm {gluespecdef} and \prm {mugluespecdef}}]
+
 It is rather common to store constant values in a register or character
 definition.
 
@@ -2231,33 +2317,357 @@
 But in \LUAMETATEX\ we also can do this:
 
 \starttyping
-\integerdef\MyConstantC 456
-\dimendef  \MyConstantD 456pt
+\integerdef    \MyConstantI 456
+\dimensiondef  \MyConstantD 456pt
+\gluespecdef   \MyConstantG 987pt minus 654pt plus 321pt
+\mugluespecdef \MyConstantG 3mu plus 2mu minus 1mu
 \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.
+valid number or dimension when needed. They do behave like registers so one can
+use for instance \prm {advance} and assign values but keep in mind that an alias
+(made by for instance \prm {let} clones the value and that clone will not follow
+a change in the original. For that, registers can be used because there we use an
+indirect reference.
 
 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.
 
+\stopsubsection
+
+\startsubsection[title={Getting internal indices with \prm {indexofcharacter} and \prm {indexofregister}}]
+
+When you have defined a register with one of the \tex {...def} primitives but for
+some reasons needs to know the register index you can query that:
+
+\startbuffer
+\the\indexofregister \scratchcounterone,
+\the\indexofregister \scratchcountertwo,
+\the\indexofregister \scratchwidth,
+\the\indexofregister \scratchheight,
+\the\indexofregister \scratchdepth,
+\the\indexofregister \scratchbox
+\stopbuffer
+
+\typebuffer
+
+We lie a little here because in \CONTEXT\ the box index \tex {scratchbox} is
+actually defined as: \normalexpanded {\typ {\meaningasis \scratchbox}} but it
+still is a number so it fits in.
+
+\getbuffer
+
+A similar primitive gives us the (normally \UNICODE) value of a character:
+
+\startbuffer
+\chardef\MyCharA=65
+\the\indexofcharacter A
+\the\indexofcharacter \MyCharA
+\stopbuffer
+
+\typebuffer
+
+The result is equivalent to \type {\number `A} but avoids the back quote:
+\inlinebuffer.
+
+\stopsubsection
+
+\startsubsection[title={Serialization with \prm {todimension}, \prm {toscaled}, \prm {tohexadecimal} and \prm {tointeger}}]
+
+These serializers take a verbose or symbolic quantity:
+
+\starttyping
+\todimension   10pt   \todimension   \scratchdimen    % with unit
+\toscaled      10pt   \toscaled      \scratchdimen    % without unit
+\tointeger     10     \tointeger     \scratchcounter
+\tohexadecimal 10     \tohexadecimal \scratchcounter
+\stoptyping
+
+This is particularly handy in cases where you don't know what you deal with, for instance
+when a value is stored in a macro. Using \type {\the} could fail there while:
+
+\starttyping
+\the\dimexpr10pt\relax
+\stoptyping
+
+is often overkill and gives more noise in a trace.
+
+\stopsubsection
+
+\startsubsection[title={Serialization with \prm {thewithoutunit}, \prm {tosparsedimension} and \prm {tosparsescaled}}]
+
+\topicindex {units}
+
+By default \TEX\ lets \type {1pt} come out as \type {1.0pt} which is why we also have
+two sparse variants:
+
+\startbuffer
+\todimension    10pt\quad\tosparsedimension  10pt
+\todimension   1.2pt\quad\tosparsedimension 1.2pt
+\toscaled       10pt\quad\tosparsescaled     10pt
+\toscaled      1.2pt\quad\tosparsescaled    1.2pt
+\stopbuffer
+
+\typebuffer
+
+This time trailing zeros (and a trailing period) will be dropped:
+
+\startlines \getbuffer \stoplines
+
+The \prm {thewithoutunit} primitive is like \prm {the} on a dimension but it
+omits the unit.
+
+\stopsubsection
+
 \stopsection
 
-\startsection[title=Nodes]
+\startsection[title=Expressions]
 
-The \ETEX\ primitive \type {\lastnodetype} is not honest in reporting the
-internal numbers as it uses its own values. But you can set \type
-{\internalcodesmode} to a non|-|zero value to get the real id's instead. In
-addition there is \type {\lastnodesubtype}.
+\startsubsection[title={Rounding and scaling}]
 
-Another last one is \type {\lastnamedcs} which holds the last match but this one
-should be used with care because one never knows if in the meantime something
-else \quote {last} has been seen.
+\topicindex {expressions+traditional}
 
+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 \prm{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.
+
+\stopsubsection
+
+\startsubsection[title={Enhanced expressions}]
+
+\topicindex {expressions+enhanced}
+
+The \ETEX\ expression primitives are handy but have some limitations. Although
+the parsers have been rewritten in \LUAMETATEX\ and somewhat more efficient the
+only extension we have is support for an integer division with \type {:}. After
+experimenting for a while and pondering how to make \prm {dimexpr} and \prm
+{numexpr} more powerful I decided to come up with alternatives in order not to
+introduce incompatibilities.
+
+The \prm {numexpression} and \prm {dimexpression} primitives are equivalent but
+offer more. The first one operates in the integer domain and the second one
+assumes scaled values. Often the second one can act like the first when
+serialized with \prm {number} in front. This is because when \TEX\ sees a
+symbolic reference to an integer or dimension it can treat them as it likes.
+
+The set of operators that we have to support is the following. Most have
+alternatives so that we can get around catcode issues.
+
+\starttabulate[||cT|cT|]
+\DB action    \BC symbol               \BC keyword \NC \NR
+\TB
+\NC add       \NC +                    \NC         \NC \NR
+\NC subtract  \NC -                    \NC         \NC \NR
+\NC multiply  \NC *                    \NC         \NC \NR
+\NC divide    \NC / :                  \NC         \NC \NR
+\NC mod       \NC \letterpercent       \NC mod     \NC \NR
+\NC band      \NC &                    \NC band    \NC \NR
+\NC bxor      \NC ^                    \NC bxor    \NC \NR
+\NC bor       \NC \letterbar \space v  \NC bor     \NC \NR
+\NC and       \NC &&                   \NC and     \NC \NR
+\NC or        \NC \letterbar\letterbar \NC or      \NC \NR
+\NC setbit    \NC <undecided>          \NC bset    \NC \NR
+\NC resetbit  \NC <undecided>          \NC breset  \NC \NR
+\NC left      \NC <<                   \NC         \NC \NR
+\NC right     \NC >>                   \NC         \NC \NR
+\NC less      \NC <                    \NC         \NC \NR
+\NC lessequal \NC <=                   \NC         \NC \NR
+\NC equal     \NC = ==                 \NC         \NC \NR
+\NC moreequal \NC >=                   \NC         \NC \NR
+\NC more      \NC >                    \NC         \NC \NR
+\NC unequal   \NC <> != \lettertilde = \NC         \NC \NR
+\NC not       \NC ! \lettertilde       \NC not     \NC \NR
+\LL
+\stoptabulate
+
+Here are some things that \prm {numexpr} is not suitable for:
+
+\starttyping
+\scratchcounter = \numexpression
+    "00000 bor "00001 bor "00020 bor "00400 bor "08000 bor "F0000
+\relax
+
+\ifcase \numexpression
+    (\scratchcounterone > 5) && (\scratchcountertwo > 5)
+\relax yes\else nop\fi
+\stoptyping
+
+You can get an idea what the engines sees by setting \prm {tracingexpressions}
+to a value larger than zero. It shows the expression in rpn form.
+
+\starttyping
+\dimexpression 4pt * 2   + 6pt   \relax
+\dimexpression 2   * 4pt + 6pt   \relax
+\dimexpression 4pt * 2.5 + 6pt   \relax
+\dimexpression 2.5 * 4pt + 6pt   \relax
+\numexpression 2 * 4 + 6         \relax
+\numexpression (1 + 2) * (3 + 4) \relax
+\stoptyping
+
+The \prm {relax} is mandate simply because there are keywords involved so the
+parser needs to know where to stop scanning. It made no sense to be more clever
+and introduce fuzziness (so there is no room for exposing in|-|depth \TEX\
+insight and expertise here). In case you wonder: the difference in performance
+between the \ETEX\ expression mechanism and the more extended variant will
+normally not be noticed, probably because they both use a different approach and
+because the \ETEX\ variant also has been optimized. \footnote {I might add some
+features in the future.}
+
+The if|-|test shown before can be done using the new primitives \prm
+{ifdimexpression} and \prm {ifnumexpression} which are boolean tests with zero
+being \type {false}.
+
+\stopsubsection
+
+\startsubsection[title={Calculations with \prm {advanceby}, \prm {multiplyby} and
+\prm {divideby}.}]
+
+The \prm {advance}, \prm {multiply} and \prm {divide} primitives accept an
+optional keyword \type {by}. In \CONTEXT\ we never use that feature and as a
+consequence the scanner has to push back a scanned token after checking for the
+\type {b} or \type {B}. These three new primitives avoid that and therefore
+perform better, but that is (as usual with such enhancements) only noticeable in
+demanding scenarios.
+
+The original three plus these new ones also operate on the \quote {constant}
+integers, dimensions etc.
+
+\stopsubsection
+
 \stopsection
 
+\startsection[title=Loops]
+
+\topicindex {loops}
+
+There is actually not that much to tell about the three loop primitives \prm
+{expandedloop}, \prm {unexpandedloop} and \prm {localcontrolledloop}. They are
+used like:
+
+\startbuffer
+\unexpandedloop 1 10 1 {
+    [!]
+}
+\stopbuffer
+
+\typebuffer
+
+This will give 10 snippets.
+
+\getbuffer
+
+So what will the next give?
+
+\startbuffer
+\edef\TestA{\unexpandedloop 1 10 1 {!}}\meaning\TestA
+\edef\TestB{\expandedloop   1 10 1 {!}}\meaning\TestB
+\stopbuffer
+
+\typebuffer
+
+We see no difference in results between the two loops:
+
+\startlines \tt
+\getbuffer
+\stoplines
+
+But the the next variant shows that they do:
+
+\startbuffer
+\edef\TestA{\unexpandedloop 1 10 1 {\the\currentloopiterator}}\meaning\TestA
+\edef\TestB{\expandedloop   1 10 1 {\the\currentloopiterator}}\meaning\TestB
+\stopbuffer
+
+\typebuffer
+
+The unexpanded variants sort of delays:
+
+\startlines \tt
+\getbuffer
+\stoplines
+
+You can nest loops and query the nesting level:
+
+\startbuffer
+\expandedloop 1 10 1 {%
+    \ifodd\currentloopiterator\else
+      [\expandedloop 1 \currentloopiterator 1 {%
+        \the\currentloopnesting
+      }]
+    \fi
+}
+\stopbuffer
+
+\typebuffer
+
+Here we use the two numeric state primitives \prm {currentloopiterator} and \prm
+{currentloopnesting}. This results in:
+
+\getbuffer
+
+The \prm {quitloop} primitive makes it possible to prematurely exit a loop (at
+the next step), although of course in the next case one can just adapt the final
+iterator value instead. Here we step by 2:
+
+\startbuffer
+\expandedloop 1 20 2 {%
+    \ifnum\currentloopiterator>10
+        \quitloop
+    \else
+        [!]
+    \fi
+}
+\stopbuffer
+
+\typebuffer
+
+This results in:
+
+\getbuffer
+
+The \prm {lastloopiterator} primitive keeps the last iterator value and is a global
+one as all \type {\last...} primitives. The loops also work with negative values.
+
+A special case is \prm {localcontrolledloop} which fits into the repertoire of
+local control primitives. In that case the loop body gets expanded in a nested
+main loop which can come in handy in tricky cases where full expansion is mixed
+with for instance assignments but of course users should then be aware of
+out|-|of|-|order side effects when you push back something in the input. Consider
+it a playground.
+
+\stopsection
+
 \stopchapter
 
 \stopcomponent
+
+% \bgroup \unprotect
+%     \catcode`<= \lettercatcode
+%     \ifnum 1  = 2 n \else y \fi
+%     \ifnum 1  > 2 n \else y \fi
+%     \ifnum 1  < 2 y \else n \fi
+%     \ifnum 1 != 2 y \else n \fi
+%     \ifnum 1 !> 2 y \else n \fi
+%     \ifnum 1 !< 2 n \else y \fi
+%     \ifnum 1 ≠  2 y \else n \fi
+%     \ifnum 1 ≥  2 n \else y \fi
+%     \ifnum 1 ≤  2 y \else n \fi
+%     \ifnum 1 ≱  2 n \else y \fi
+%     \ifnum 1 ≰  2 y \else n \fi
+%     \ifnum 1 ∈  3 y \else n \fi
+%     \ifnum 1 ∉  3 n \else y \fi
+%     \ifdim 10pt ∈ 10.5pt y \else n \fi
+%     \ifdim 10pt ∉ 10.5pt n \else y \fi
+%     \ifdim 11pt ∈ 10.5pt n \else y \fi
+%     \ifdim 11pt ∉ 10.5pt y \else n \fi
+% \protect \egroup

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-firstpage.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-firstpage.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-firstpage.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,3 +1,5 @@
+% language=us runpath=texruns:manuals/luametatex
+
 \environment luametatex-style
 
 \startcomponent luametatex-firstpage
@@ -16,10 +18,12 @@
     \definedfont[Bold*default at 12pt]
 
     \starttabulate[|l|l|]
-        \NC copyright \EQ Lua\TeX\ development team \NC \NR
+        \NC copyright \EQ LuaMeta\TeX\ development team \NC \NR
+        \NC           \EQ Lua\TeX\ development team \NC \NR
         \NC           \EQ \CONTEXT\ development team \NC \NR
         \NC more info \EQ www.luatex.org \NC \NR
         \NC           \EQ contextgarden.net \NC \NR
+        \NC           \EQ build.contextgarden.net \NC \NR
         \NC version   \EQ \currentdate \doifsomething{\documentvariable{snapshot}}{(snapshot \documentvariable{snapshot})} \NC \NR
     \stoptabulate
 

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-fonts.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/luametatex
 
 \environment luametatex-style
 
@@ -8,14 +8,15 @@
 
 \startsection[title={Introduction}]
 
-Only traditional font support is built in, anything more needs to be implemented
-in \LUA. This conforms to the \LUATEX\ philosophy. When you pass a font to the
-frontend only the dimensions matter, as these are used in typesetting, and
-optionally ligatures and kerns when you rely on the built|-|in font handler. For
-math some extra data is needed, like information about extensibles and next in
-size glyphs. You can of course put more information in your \LUA\ tables because
-when such a table is passed to \TEX\ only that what is needed is filtered from
-it.
+The traditional \TEX\ ligature and kerning routines are build in but anything
+more (like \OPENTYPE\ rendering) has to be implemented in \LUA. In \CONTEXT\ we
+call the former base mode and the later node mode (we have some more modes). This
+conforms to the \LUATEX\ philosophy. When you pass a font to the frontend only
+the dimensions matter, as these are used in typesetting, and optionally ligatures
+and kerns when you rely on the built|-|in font handler. For math some extra data
+is needed, like information about extensibles and next in size glyphs. You can of
+course put more information in your \LUA\ tables because when such a table is
+passed to \TEX\ only that what is needed is filtered from it.
 
 Because there is no built|-|in backend, virtual font information is not used. If
 you want to be compatible you'd better make sure that your tables are okay, and
@@ -38,24 +39,36 @@
 the font level:
 
 \starttabulate[|l|l|pl|]
-\DB key                 \BC value type \BC description \NC \NR
+\DB key                       \BC value type \BC description \NC \NR
 \TB
-\NC \type {name}        \NC string     \NC metric (file) name \NC \NR
-\NC \type {characters}  \NC table      \NC the defined glyphs of this font \NC \NR
-\NC \type {designsize}  \NC number     \NC expected size (default: 655360 == 10pt) \NC \NR
-\NC \type {fonts}       \NC table      \NC locally used fonts \NC \NR
-\NC \type {hyphenchar}  \NC number     \NC default: \TEX's \prm {hyphenchar} \NC \NR
-\NC \type {parameters}  \NC hash       \NC default: 7 parameters, all zero \NC \NR
-\NC \type {size}        \NC number     \NC the required scaling (by default the same as designsize) \NC \NR
-\NC \type {skewchar}    \NC number     \NC default: \TEX's \prm {skewchar} \NC \NR
-\NC \type {stretch}     \NC number     \NC the \quote {stretch} \NC \NR
-\NC \type {shrink}      \NC number     \NC the \quote {shrink} \NC \NR
-\NC \type {step}        \NC number     \NC the \quote {step} \NC \NR
-\NC \type {nomath}      \NC boolean    \NC this key allows a minor speedup for text fonts; if it
-                                           is present and true, then \LUATEX\ will not check the
-                                           character entries for math|-|specific keys \NC \NR
-\NC \type {oldmath}     \NC boolean    \NC this key flags a font as representing an old school \TEX\
-                                           math font and disables the \OPENTYPE\ code path \NC \NR
+\NC \type {name}              \NC string     \NC metric (file) name \NC \NR
+\NC \type {original}          \NC string     \NC the name used in logging and feedback \NC \NR
+\NC \type {designsize}        \NC number     \NC expected size (default: 655360 == 10pt) \NC \NR
+\NC \type {size}              \NC number     \NC the required scaling (by default the same as designsize) \NC \NR
+\HL
+\NC \type {characters}        \NC table      \NC the defined glyphs of this font \NC \NR
+\NC \type {fonts}             \NC table      \NC locally used fonts \NC \NR
+\NC \type {parameters}        \NC hash       \NC default: 7 parameters, all zero \NC \NR
+\HL
+\NC \type {stretch}           \NC number     \NC the \quote {stretch} \NC \NR
+\NC \type {shrink}            \NC number     \NC the \quote {shrink} \NC \NR
+\NC \type {step}              \NC number     \NC the \quote {step} \NC \NR
+\HL
+\NC \type {textcontrol}       \NC bitset     \NC this controls various code paths in the text engine \NC \NR
+\NC \type {hyphenchar}        \NC number     \NC default: \TEX's \prm {hyphenchar} \NC \NR
+\HL
+\NC \type {skewchar}          \NC number     \NC default: \TEX's \prm {skewchar} \NC \NR
+\NC \type {nomath}            \NC boolean    \NC this key allows a minor speedup for text fonts; if it
+                                                 is present and true, then \LUATEX\ will not check the
+                                                 character entries for math|-|specific keys \NC \NR
+\NC \type {oldmath}           \NC boolean    \NC this key flags a font as representing an old school \TEX\
+                                                 math font and disables the \OPENTYPE\ code path \NC \NR
+\NC \type {mathcontrol}       \NC bitset     \NC this controls various code paths in the math engine,
+                                                 like enforcing the traditional code path \NC \NR
+\NC \type {compactmath}       \NC boolean    \NC experimental: use the smaller chain to locate a character \NC \NR
+\NC \type {textscale}         \NC number     \NC scale applied to math text \NC \NR
+\NC \type {scriptscale}       \NC number     \NC scale applied to math script \NC \NR
+\NC \type {scriptscriptscale} \NC number     \NC scale applied to math script script \NC \NR
 \LL
 \stoptabulate
 
@@ -69,13 +82,13 @@
 \starttabulate[|l|c|]
 \DB name                  \BC remapping \NC \NR
 \TB
-\NC \type {slant}         \NC 1 \NC \NR
-\NC \type {space}         \NC 2 \NC \NR
-\NC \type {space_stretch} \NC 3 \NC \NR
-\NC \type {space_shrink}  \NC 4 \NC \NR
-\NC \type {x_height}      \NC 5 \NC \NR
-\NC \type {quad}          \NC 6 \NC \NR
-\NC \type {extra_space}   \NC 7 \NC \NR
+\NC \type {slant}        \NC 1 \NC \NR
+\NC \type {space}        \NC 2 \NC \NR
+\NC \type {spacestretch} \NC 3 \NC \NR
+\NC \type {spaceshrink}  \NC 4 \NC \NR
+\NC \type {xheight}      \NC 5 \NC \NR
+\NC \type {quad}         \NC 6 \NC \NR
+\NC \type {extraspace}   \NC 7 \NC \NR
 \LL
 \stoptabulate
 
@@ -94,30 +107,99 @@
 that uses the engine, and node mode that uses \LUA. A monospaced font normally
 has no ligatures and kerns and is normally not processed at all.
 
+We can group the parameters. All characters have the following base set. It must
+be noted here that \OPENTYPE\ doesn't have a italic property and that the height
+and depth are also not part of the design: one can choose to derive them from the
+bounding box.
+
 \starttabulate[|l|l|pl|]
+\DB key                     \BC type    \BC description \NC\NR
+\TB
+\NC \type {width}           \NC number  \NC width in sp (default 0) \NC\NR
+\NC \type {height}          \NC number  \NC height in sp (default 0) \NC\NR
+\NC \type {depth}           \NC number  \NC depth in sp (default 0) \NC\NR
+\NC \type {italic}          \NC number  \NC italic correction in sp (default 0) \NC\NR
+\stoptabulate
+
+Then there are three parameters that are more optional and relate to advanced
+optical paragraph optimization:
+
+\starttabulate[|l|l|pl|]
+\DB key                     \BC type    \BC description \NC\NR
+\TB
+\NC \type {leftprotruding}  \NC number  \NC left protruding factor (\prm {lpcode}) \NC\NR
+\NC \type {rightprotruding} \NC number  \NC right protruding factor (\prm {rpcode}) \NC\NR
+\NC \type {expansion}       \NC number  \NC expansion factor (\prm {efcode}) \NC\NR
+\stoptabulate
+
+From \TEX\ we inherit the following tables. Ligatures are only used in so call
+base mode, when the engine does the font magic. Kerns are used in text and
+optionally in math: More details follow below.
+
+\starttabulate[|l|l|pl|]
+\DB key                     \BC type    \BC description \NC\NR
+\TB
+\NC \type {ligatures}       \NC table   \NC ligaturing information \NC\NR
+\NC \type {kerns}           \NC table   \NC kerning information \NC\NR
+\stoptabulate
+
+The next two fields control the engine and are a variant on \TEX's \TFM\ tag
+property. In a future we might provide a bit more (local) control although
+currently we see no need. Originally the tag and next field were combined into a
+packed integer but in current \LUAMETATEX\ we have a 32 bit tag and the next
+field moved to the math blob as it only is used as variant selector.
+
+\starttabulate[|l|l|pl|]
+\DB key                     \BC type    \BC description \NC\NR
+\TB
+\NC \type {tag}             \NC number  \NC a bitset, currently not really exposed \NC\NR
+%NC \type {reserved}        \NC number  \NC note for myself \NC \NR
+\stoptabulate
+
+In a math font characters have many more fields.
+
+\starttabulate[|l|l|pl|]
 \DB key                      \BC type    \BC description \NC\NR
 \TB
-\NC \type {width}            \NC number  \NC width in sp (default 0) \NC\NR
-\NC \type {height}           \NC number  \NC height in sp (default 0) \NC\NR
-\NC \type {depth}            \NC number  \NC depth in sp (default 0) \NC\NR
-\NC \type {italic}           \NC number  \NC italic correction in sp (default 0) \NC\NR
-\NC \type {top_accent}       \NC number  \NC top accent alignment place in sp (default zero) \NC\NR
-\NC \type {bot_accent}       \NC number  \NC bottom accent alignment place, in sp (default zero) \NC\NR
-\NC \type {left_protruding}  \NC number  \NC left protruding factor (\lpr {lpcode}) \NC\NR
-\NC \type {right_protruding} \NC number  \NC right protruding factor (\lpr {rpcode}) \NC\NR
-\NC \type {expansion_factor} \NC number  \NC expansion factor (\lpr {efcode}) \NC\NR
+\NC \type {smaller}          \NC number  \NC the next smaller math size character \NC\NR
+\NC \type {mirror}           \NC number  \NC a right to left alternative \NC\NR
+\NC \type {flataccent}       \NC number  \NC an accent alternative with less height (\OPENTYPE) \NC\NR
 \NC \type {next}             \NC number  \NC \quote {next larger} character index \NC\NR
-\NC \type {extensible}       \NC table   \NC constituent parts of an extensible recipe \NC\NR
-\NC \type {vert_variants}    \NC table   \NC constituent parts of a vertical variant set \NC \NR
-\NC \type {horiz_variants}   \NC table   \NC constituent parts of a horizontal variant set \NC \NR
-\NC \type {kerns}            \NC table   \NC kerning information \NC\NR
-\NC \type {ligatures}        \NC table   \NC ligaturing information \NC\NR
-\NC \type {mathkern}         \NC table   \NC math cut-in specifications \NC\NR
+\HL
+\NC \type {topleft}          \NC number  \NC alternative script kern \NC\NR
+\NC \type {topright}         \NC number  \NC alternative script kern \NC\NR
+\NC \type {bottomleft}       \NC number  \NC alternative script kern \NC\NR
+\NC \type {bottomright}      \NC number  \NC alternative script kern \NC\NR
+\HL
+\NC \type {topmargin}        \NC number  \NC alternative accent calculation margin \NC\NR
+\NC \type {bottomargin}      \NC number  \NC alternative accent calculation margin \NC\NR
+\NC \type {leftmargin}       \NC number  \NC alternative accent calculation margin \NC\NR
+\NC \type {rightmargin}      \NC number  \NC alternative accent calculation margin \NC\NR
+\HL
+\NC \type {topovershoot}     \NC number  \NC accent width tolerance \NC\NR
+\NC \type {bottomovershoot}  \NC number  \NC accent width tolerance \NC\NR
+\HL
+\NC \type {topanchor}        \NC number  \NC horizontal top accent alignment position \NC\NR
+\NC \type {bottomanchor}     \NC number  \NC horizontal bottom accent alignment position \NC\NR
+\HL
+\NC \type {innerlocation}    \NC string  \NC \type {left} or \type {right}  \NC\NR
+\NC \type {innerxoffset}     \NC number  \NC radical degree horizontal position \NC\NR
+\NC \type {inneryoffset}     \NC number  \NC radical degree vertical position \NC\NR
+\HL
+\NC \type {parts}            \NC table   \NC constituent parts of an extensible \NC \NR
+\NC \type {partsitalic}      \NC number  \NC the italic correction applied with the extensible \NC \NR
+\NC \type {partsorientation} \NC number  \NC \type {horizontal} or \type {vertical} \NC\NR
+\HL
+\NC \type {mathkerns}        \NC table   \NC math cut-in specifications \NC\NR
+\HL
+\NC \type {extensible}       \NC table   \NC stretch a fixed width accent to fit\NC\NR
 \LL
 \stoptabulate
 
-For example, here is the character \quote {f} (decimal 102) in the font \type
-{cmr10 at 10pt}. The numbers that represent dimensions are in scaled points.
+Now some more details follow. For example, here is the character \quote {f}
+(decimal 102) in the font \type {cmr10 at 10pt}. The numbers that represent
+dimensions are in scaled points. Of course you will use Latin Modern \OPENTYPE\
+instead but the principles are the same:
 
 \starttyping
 [102] = {
@@ -140,23 +222,29 @@
 }
 \stoptyping
 
-Two very special string indexes can be used also: \type {left_boundary} is a
+Two very special string indexes can be used also: \type {leftboundary} 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
+processing. \type {rightboundary} is similar but not actually used for anything
 (yet).
 
-The values of \type {top_accent}, \type {bot_accent} and \type {mathkern} are
+The values of \type {leftprotrusion} and \type {rightprotrusion} are used only
+when \prm {protrudechars} is non-zero. Whether or not \type {expansion} is used
+depends on the font's global expansion settings, as well as on the value of \prm
+{adjustspacing}.
+
+The values of \type {topanchor}, \type {bottomanchor} and \type {mathkern} are
 used only for math accent and superscript placement, see \at {page} [math] in
-this manual for details. The values of \type {left_protruding} and \type
-{right_protruding} are used only when \lpr {protrudechars} is non-zero. Whether
-or not \type {expansion_factor} is used depends on the font's global expansion
-settings, as well as on the value of \lpr {adjustspacing}.
+this manual for details. The italic corrections are a story in themselves and
+discussed in detail in other manuals. The additional parameters that deal with
+kerns, margins, overshoots, inner anchoring, etc. are engine specific and not
+part of \OPENTYPE. More information can be found in the \CONTEXT\ distribution;
+they relate the upgraded math engine project by Mikael and Hans.
 
 A math character can have a \type {next} field that points to a next larger
 shape. However, the presence of \type {extensible} will overrule \type {next}, if
 that is also present. The \type {extensible} field in turn can be overruled by
-\type {vert_variants}, the \OPENTYPE\ version. The \type {extensible} table is
-very simple:
+\type {parts}, the \OPENTYPE\ version. The \type {extensible} table is very
+simple:
 
 \starttabulate[|l|l|p|]
 \DB key        \BC type   \BC description                \NC\NR
@@ -168,8 +256,8 @@
 \LL
 \stoptabulate
 
-The \type {horiz_variants} and \type {vert_variants} are arrays of components.
-Each of those components is itself a hash of up to five keys:
+The \type {parts} entru is an arrays of components. Each of those components is
+itself a hash of up to five keys:
 
 \starttabulate[|l|l|p|]
 \DB key             \BC type   \BC explanation \NC \NR
@@ -184,15 +272,15 @@
 \LL
 \stoptabulate
 
-The \type {kerns} table is a hash indexed by character index (and \quote
-{character index} is defined as either a non|-|negative integer or the string
-value \type {right_boundary}), with the values of the kerning to be applied, in
-scaled points.
+The traditional (text and math) \type {kerns} table is a hash indexed by
+character index (and \quote {character index} is defined as either a
+non|-|negative integer or the string value \type {rightboundary}), with the
+values of the kerning to be applied, in scaled points.
 
-The \type {ligatures} table is a hash indexed by character index (and \quote
-{character index} is defined as either a non|-|negative integer or the string
-value \type {right_boundary}), with the values being yet another small hash, with
-two fields:
+The traditional (text) \type {ligatures} table is a hash indexed by character
+index (and \quote {character index} is defined as either a non|-|negative integer
+or the string value \type {rightboundary}), with the values being yet another
+small hash, with two fields:
 
 \starttabulate[|l|l|p|]
 \DB key         \BC type   \BC description \NC \NR
@@ -229,6 +317,54 @@
 ligature where the ligature replaces both original glyphs. In this table the~\type {|}
 indicates the final insertion point.
 
+% The \type {mathcontrol} bitset is mostly there for experimental purposes. Because
+% there is inconsistency in the \OPENTYPE\ math fonts with respect to for instance
+% glyph dimensions, it is possible to force the traditional code path. We just mention
+% the possible flags:
+%
+% \startluacode
+%     context.starttabulate { "|||" }
+%     context.DB() context("value") context.BC() context("effect") context.NC() context.NR()
+%     context.TB()
+%     for k, v in table.sortedhash(tex.getmathcontrolvalues()) do
+%         context.NC() context("0x%04X",k) context.NC() context(v) context.NC() context.NR()
+%     end
+%     context.LL()
+%     context.stoptabulate()
+% \stopluacode
+
+Compact math is an experimental feature. The smaller field in a character
+definition of a text character can point to a script character that itself can
+point to a scriptscript one. When set the \type {textscale}, \type {scriptscale}
+and \type {scriptscriptscale} is applied to those.
+
+Bidirectional math is also experimental and driven by (in \CONTEXT\ speak) tweaks
+which means that it has to be set up explicitly as it uses a combination of
+fonts. In \CONTEXT\ is also uses specific features of the font subsystems that
+hook into the backend where we have a more advanced virtual font subsystem than
+in \LUATEX. Because this is macro package dependent it will not be discussed
+here.
+
+% The \type {textcontrol} field is used to control some aspects of text processing.
+% More options might be added in the future.
+
+% \startluacode
+%     context.starttabulate { "|||" }
+%     context.DB() context("value") context.BC() context("effect") context.NC() context.NR()
+%     context.TB()
+%     for k, v in table.sortedhash(tex.gettextcontrolvalues()) do
+%         context.NC() context("0x%04X",k) context.NC() context(v) context.NC() context.NR()
+%     end
+%     context.LL()
+%     context.stoptabulate()
+% \stopluacode
+%
+% In \CONTEXT\ these are interfaced via pseudo features. The math control flags of
+% a font can be overloaded by \prm {mathcontrolmode} on the spot and the set
+% controls of a font can be queried by \prm {fontmathcontrol}. The text control
+% flags in a font always win over the ones set by other parameters, like \prm
+% {hyphenationmode}. They can be queried with \prm {fonttextcontrol}.
+
 \stopsection
 
 \startsection[reference=virtualfonts,title={Virtual fonts}]
@@ -300,7 +436,7 @@
 \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
+\NC \type{special} \NC 1         \NC string    \NC output a driver directive \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
@@ -312,7 +448,7 @@
 \NC \type{lua}     \NC 1         \NC string,
                                      function  \NC execute a \LUA\ script when the glyph is embedded; in case of a
                                                    function it gets the font id and character code passed \NC \NR
-\NC \type{image}   \NC 1         \NC image     \NC output an image (the argument can be either an \type {<image>} variable or an \type {image_spec} table) \NC \NR
+\NC \type{image}   \NC 1         \NC image     \NC depends on the backend \NC \NR
 \NC \type{comment} \NC any       \NC any       \NC the arguments of this command are ignored \NC \NR
 \LL
 \stoptabulate
@@ -380,6 +516,9 @@
 \type {pdf:direct:} or  \type {pdf:raw:} prefix. When you have to concatenate
 strings using the \type {pdf} command might be more efficient.
 
+{\em For the record: in \CONTEXT\ \LMTX\ we no longer support the \type {pdf}, \type
+{image} and \type {special} keywords.}
+
 \stopsection
 
 \startsection[title={Additional \TEX\ commands}]
@@ -399,7 +538,7 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {fontid} and \lpr {setfontid}}]
+\startsubsection[title={\prm {fontid}, \prm {setfontid} and \prm {mathstylefontid}}]
 
 \startsyntax
 \fontid\font
@@ -407,7 +546,7 @@
 
 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
+now a number so you need to use \prm {number} or \prm {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.}
 
@@ -427,13 +566,46 @@
 fonts are used, we can easily get over a hundred ids in use. Not all ids have to
 be bound to a real font, after all it's just a number.
 
-The primitive \lpr {setfontid} can be used to enable a font with the given id,
+The primitive \prm {setfontid} can be used to enable a font with the given id,
 which of course needs to be a valid one.
 
+In math mode the font id depends on the style because there we have a family of
+three related fonts. In this document we get the following identifiers:
+
+\starttabulate[|l|c|]
+\NC \type {$ \the \mathstylefontid \scriptscriptstyle \fam$} \NC $\the\mathstylefontid\scriptscriptstyle \fam$ \NC \NR
+\NC \type {$ \the \mathstylefontid \scriptstyle       \fam$} \NC $\the\mathstylefontid\scriptstyle       \fam$ \NC \NR
+\NC \type {$ \the \mathstylefontid \textstyle         \fam$} \NC $\the\mathstylefontid\textstyle         \fam$ \NC \NR
+\stoptabulate
+
 \stopsubsection
 
-\startsubsection[title={\lpr {glyphoptions}}]
+\startsubsection[title={\prm {fontspecifiedname} and \prm {fontspecifiedsize}}]
 
+These two primitives provide some details about the given font:
+
+\startbuffer
+{\tf [\fontspecifiedname\font] [\the\fontspecifiedsize\font]}
+{\bf [\fontspecifiedname\font] [\the\fontspecifiedsize\font]}
+{\it [\fontspecifiedname\font] [\the\fontspecifiedsize\font]}
+\stopbuffer
+
+\typebuffer
+
+So for this document we get:
+
+\startlines
+\getbuffer
+\stoplines
+
+Of course this also depends on the macro package because that is responsible for
+implementing font support and because all that is driven by callbacks the
+reported name doesn't even have to resemble a font.
+
+\stopsubsection
+
+\startsubsection[title={\prm {glyphoptions}}]
+
 \topicindex {ligatures+suppress}
 \topicindex {kerns+suppress}
 \topicindex {expansion+suppress}
@@ -441,9 +613,11 @@
 
 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
+generic control primitive \prm {glyphoptions}. This numerical parameter is a
 bitset with the following fields:
 
+% todo: use values
+
 \starttabulate[|l|pl|]
 \DB value       \BC effect \NC\NR
 \TB
@@ -463,19 +637,119 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {glyphxscale}, \lpr {glyphyscale} and \lpr {scaledfontdimen}}]
+\startsubsection[title={\prm {glyphscale}, \prm {glyphxscale}, \prm {glyphyscale} and \prm {scaledfontdimen}}]
 
-The two scale parameters control the current scaling. They are traditional \TEX\
-integer parameters that operate independent of each other. The scaling is
+The three 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
+query a font dimensions with \prm {fontdimen} you get the raw value but with \prm
 {scaledfontdimen} you get the useable value.
 
 \stopsubsection
 
-\startsubsection[title={\lpr {glyphxoffset}, \lpr {glyphyoffset}}]
+\startsubsection[title={\prm {glyphxscaled}, \prm {glyphyscaled}}]
 
+These two relate to the previous one:
+
+\startbuffer
+{\glyphxscale 1500 \the\glyphxscaled 100pt} and
+{\glyphyscale  750 \the\glyphyscaled 100pt}
+\stopbuffer
+
+\typebuffer
+
+We get: \inlinebuffer.
+
+\stopsubsection
+
+\startsubsection[title={Scaled fontdimensions}]
+
+When you use \prm {glyphscale},  \prm {glyphxscale} and|/|or  \prm {glyphyscale} the font
+dimensions
+
+\starttabulate[|l|c|c|c|]
+\DB dimension                     \BC scale \NC xscale \NC yscale \NC\NR
+\TB
+\NC \prm {scaledemwidth}          \NC \star \NC \star  \NC        \NC\NR
+\NC \prm {scaledexheight}         \NC \star \NC        \NC \star  \NC\NR
+\NC \prm {scaledextraspace}       \NC \star \NC \star  \NC        \NC\NR
+\NC \prm {scaledinterwordshrink}  \NC \star \NC \star  \NC        \NC\NR
+\NC \prm {scaledinterwordspace}   \NC \star \NC \star  \NC        \NC\NR
+\NC \prm {scaledinterwordstretch} \NC \star \NC \star  \NC        \NC\NR
+\NC \prm {scaledslantperpoint}    \NC \star \NC \star  \NC        \NC\NR
+\LL
+\stoptabulate
+
+The next table shows the effective sized when we scale by 2000. The last two
+columns scale twice: the shared scale and the x or y scale.
+
+\def\ShowThem#1%
+  {\normalexpanded{
+   \BC \small \prm {\csstring\parametermark1}
+   \NC {\localcontrolled{\glyphscale2000 \glyphxscale1000 \glyphyscale 1000} \withoutpt\parametermark1}
+   \NC {\localcontrolled{\glyphscale1000 \glyphxscale2000 \glyphyscale 1000} \withoutpt\parametermark1}
+   \NC {\localcontrolled{\glyphscale1000 \glyphxscale1000 \glyphyscale 2000} \withoutpt\parametermark1}
+   \NC {\localcontrolled{\glyphscale2000 \glyphxscale2000 \glyphyscale 1000} \withoutpt\parametermark1}
+   \NC {\localcontrolled{\glyphscale2000 \glyphxscale1000 \glyphyscale 2000} \withoutpt\parametermark1}
+   \NC \NR}}
+
+\starttabulate[|l|c{.}|c{.}|c{.}|c{.}|c{.}|]
+    \ShowThem\scaledemwidth
+    \ShowThem\scaledexheight
+    \ShowThem\scaledextraspace
+    \ShowThem\scaledinterwordshrink
+    \ShowThem\scaledinterwordspace
+    \ShowThem\scaledinterwordstretch
+    \ShowThem\scaledslantperpoint
+\stoptabulate
+
+\startsubsection[title={\prm {fontspecdef}, \prm {fontspecid}, \prm {fontspecscale}, , \prm {fontspecxscale}, \prm {fontspecyscale}}]
+
+Because we have three scale related primitives \prm {glyphscale}, \prm
+{glyphxscale} and \prm {glyphyscale}, we also have a way to quickly set them all.
+
+\starttyping
+\fontspecdef \MyFontA 2 all 1000
+\fontspecdef \MyFontB \MyFontA xscale 1200
+\stoptyping
+
+The defined control sequence will set the font id (which is 2 in the case of
+\type {\MyFontA}) as well as the scale(s). Possible keywords are \type {scale},
+\type {xscale}, \type {yscale} and \type {all}. By default the values are 1000.
+Instead of an id an already defined specification can be given in which case we
+start from a copy. This mechanism is still somewhat experimental and might
+evolve. The main reason for introducing it is that it gives less tracing.
+
+Say that we have:
+
+\startbuffer
+\fontspecdef\MyFoo\font xscale 1200 \relax
+\stopbuffer
+
+\typebuffer \getbuffer
+
+The four properties of such a specification can then be queried as follows:
+
+\startbuffer
+[\the\fontspecid    \MyFoo]
+[\the\fontspecscale \MyFoo]
+[\the\fontspecxscale\MyFoo]
+[\the\fontspecyscale\MyFoo]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+A font specification obeys grouping but is not a register. Like \prm {integerdef}
+and \prm {dimendef} it is just a control sequence with a special meaning.
+
+% \the\fontspecifiedsize\font
+%     \fontspecifiedname\font
+
+\stopsubsection
+
+\startsubsection[title={\prm {glyphxoffset}, \prm {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.
@@ -482,7 +756,7 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr {glyph}}]
+\startsubsection[title={\prm {glyph}}]
 
 This command is a variation in \prm {char} that takes keywords:
 
@@ -517,7 +791,7 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr{nospaces}}]
+\startsubsection[title={\prm{nospaces}}]
 
 \topicindex {spaces+suppress}
 
@@ -527,7 +801,7 @@
 {figure} [fig:nospaces] we see the results for four characters separated by a
 space.
 
-\startplacefigure[reference=fig:nospaces,title={The \lpr {nospaces} options.}]
+\startplacefigure[reference=fig:nospaces,title={The \prm {nospaces} options.}]
 \startcombination[3*2]
     {\ruledhbox to 5cm{\vtop{\hsize 10mm\nospaces=0\relax x x x x \par}\hss}} {\type {0 / hsize 10mm}}
     {\ruledhbox to 5cm{\vtop{\hsize 10mm\nospaces=1\relax x x x x \par}\hss}} {\type {1 / hsize 10mm}}
@@ -540,7 +814,7 @@
 
 \stopsubsection
 
-\startsubsection[title={\lpr{protrusionboundary}}]
+\startsubsection[title={\prm{protrusionboundary}}]
 
 \topicindex {protrusion}
 \topicindex {boundaries}
@@ -576,6 +850,18 @@
 
 \stopsubsection
 
+\startsubsection[title={\prm{fontcharta}}]
+
+\topicindex {glyphs + properties}
+
+The \prm {fontcharwd}, \prm {fontcharht}, \prm {fontchardp} and \prm {fontcharic}
+give access to character properties. To this repertoire \LUAMETATEX\ adds the top
+accent accessor \prm {fontcharta} which came in handy for tracing. You pass a
+font reference and character code. Normally only \OPENTYPE\ math fonts have this
+property.
+
+\stopsubsection
+
 \stopsection
 
 \startsection[title={The \LUA\ font library}][library=font]
@@ -659,7 +945,7 @@
 
 \stopsubsection
 
-\startsubsection[title={Glyph data: \lpr {glyphdata}, \lpr {glyphscript}, \lpr {glyphstate}}]
+\startsubsection[title={Glyph data: \prm {glyphdatafield}, \prm {glyphscriptfield}, \prm {glyphstatefield}}]
 
 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
@@ -673,6 +959,73 @@
 
 \stopsubsection
 
+\startsubsection[title={Scaling math fonts with \prm {glyphtextscale} etc}]
+
+More details about fonts in math mode can be found in the chapter about math so
+here we just mention a few primitives. The internal \prm {glyphtextscale}, \prm
+{glyphscriptscale} and \prm {glyphscriptscriptscale} registers can be set to
+enforce additional scaling of math, like this:
+
+\startbuffer
+$                            a = b^2 = c^{d^2}$
+$\glyphtextscale         800 a = b^2 = c^{d^2}$
+$\glyphscriptscale       800 a = b^2 = c^{d^2}$
+$\glyphscriptscriptscale 800 a = b^2 = c^{d^2}$
+\stopbuffer
+
+\typebuffer
+
+You can of course set them all in any mix as long as the value is larger than
+zero and doesn't exceed 1000. In \CONTEXT\ we use this for special purposes so
+don't mess with it there. as there can be side unexpected (but otherwise valid)
+side effects.
+
+\startlines
+\getbuffer
+\stoplines
+
+The next few reported values depend on the font setup. A math font can be loaded
+at a certain scale and further scaled on the fly. An open type math font comes with
+recommended script and scriptscript scales and gets passed to the engine scaled. The
+values reported by \prm {mathscale} are {\em additional} scales.
+
+\startbuffer
+$\the\mathscale\textfont        \zerocount$
+$\the\mathscale\scriptfont      \zerocount$
+$\the\mathscale\scriptscriptfont\zerocount$
+\stopbuffer
+
+\typebuffer
+
+In \CONTEXT\ we use this for some experiments (of which some made it into
+features) but discussing this fall behind this manual. You cannot set these
+values because the engine has to work with consistent settings and messing around
+with fonts during a run only works well if the backend also cooperates. Also the
+values only makes sense in the perspective of the used macro package.
+
+\stopsubsection
+
+\startsubsection[title={Tracing}]
+
+The \prm {tracingfonts} primitive that has been inherited from \PDFTEX\ has
+been adapted to support variants in reporting the font. The reason for this
+extension is that a csname not always makes sense. The zero case is the default.
+
+\starttabulate[|l|l|]
+\DB value \BC reported \NC \NR
+\TB
+\NC \type{0} \NC \type{\foo xyz} \NC \NR
+\NC \type{1} \NC \type{\foo (bar)} \NC \NR
+\NC \type{2} \NC \type{<bar> xyz} \NC \NR
+\NC \type{3} \NC \type{<bar @ ..pt> xyz} \NC \NR
+\NC \type{4} \NC \type{<id>} \NC \NR
+\NC \type{5} \NC \type{<id: bar>} \NC \NR
+\NC \type{6} \NC \type{<id: bar @ ..pt> xyz} \NC \NR
+\LL
+\stoptabulate
+
+\stopsubsection
+
 \stopsection
 
 \stopchapter

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/luametatex
 
 \environment luametatex-style
 
@@ -6,7 +6,7 @@
 
 \startchapter[title=Introduction]
 
-Around 2005 we started the \LUATEX\ projects and it took about a decade to reach
+Around 2005 we started the \LUATEX\ project and it took about a decade to reach
 a state where we could consider the experiments to have reached a stable state.
 Pretty soon \LUATEX\ could be used in production, even if some of the interfaces
 evolved, but \CONTEXT\ was kept in sync so that was not really a problem. In 2018
@@ -16,20 +16,20 @@
 outside \CONTEXT\ too which means that we cannot simply change much without
 affecting other macro packages.
 
-However, in reaching that state some decisions were delayed because they didn't
-go well with a current stable version. This is why at the 2018 \CONTEXT\ meeting
-those present agreed that we could move on with a follow up tagged \METATEX, a
-name we already had in mind for a while, but as \LUA\ is an important component,
-it got expanded to \LUAMETATEX. This follow up is a lightweight companion to
-\LUATEX\ that will be maintained alongside. More about the reasons for this
-follow up as well as the philosophy behind it can be found in the document(s)
-describing the development. During \LUATEX\ development I kept track of what
-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.
+In reaching that state some decisions were delayed because they didn't go well
+with a current stable version. This is why at the 2018 \CONTEXT\ meeting those
+present agreed that we could move on with a follow up tagged \METATEX, a name we
+already had in mind for a while, but as \LUA\ is an important component, it got
+expanded to \LUAMETATEX. This follow up is a lightweight companion to \LUATEX\
+that will be maintained alongside. More about the reasons for this follow up as
+well as the philosophy behind it can be found in the document(s) describing the
+development. During \LUATEX\ development I kept track of what 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 follow up on \LUATEX. Just as we have
-\CONTEXT\ \MKII\ for \PDFTEX\ and \XETEX, we have \MKIV\ for \LUATEX. For
+\CONTEXT\ \MKII\ for \PDFTEX\ and \XETEX, we have \MKIV\ for \LUATEX\ so 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
@@ -42,19 +42,32 @@
 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
+makes less sense to waste time on porting back. 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 internal names of variables and such that is
+reflected in the code base (like more granularity in nodes and token commands).
+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 even more responsibility to \LUA\ has
 been compensated by (hopefully) harmless optimization of code in the engine and
-some more core functionality.
+some more core functionality. In the process system dependencies have been
+minimalized.
 
+One side effect of opening up is that what normally is hidden gets exposed and
+this is also true for all kind of codes that are used internally to distinguish
+states and properties of commands, tokens, nodes and more. Especially during
+development these can change but the good news is that they can be queried so on
+can write in code independent ways (in \LUATEX\ node id's are an example). That
+also means more interface related commands, so again lean and mean is not
+applicable here, especially because the detailed control over the text, math,
+font and language subsystems also results in additional commands to query their
+state. And, as the \METAPOST\ got extended, that subsystem is on the one hand
+leaner and meaner because backend code was dropped but on the other hand got a
+larger code base due to opening up the scanner and adding a feedback mechanism.
+
 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
@@ -63,7 +76,9 @@
 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.
+documents and the source code so that serves a reference too. More detailed
+explanations can be found in documents in the \CONTEXT\ distribution, if only
+because there we can present features in the perspective of useability.
 
 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
@@ -70,11 +85,11 @@
 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. 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.
+performance is much be better, due to some changes below the hood of the 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 2021 and 2022 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
@@ -90,15 +105,16 @@
 you really need professional support with these engines (or \TEX\ in general),
 you can always consider contacting the developers.
 
-% And yes, I'm really fed up with receiving mails or seeing comments where there's
-% this 'always need to be present' negative remark (nagging) about the program,
-% documentation, development, support, etc. present, probably to put the writer on
-% a higher stand, or maybe to compensate some other personal shortcoming ... who
-% knows. This 'i need to make my stupid point' behaviour seems to come with the
-% internet and it also seems to increase, but that doesn't mean that I want to deal
-% with those unpleasant people for the sake of the larger "tex good". Therefore, I'm
-% quite happy in the nearly always positive and motivating ConTeXt bubble. It's also
-% why I (start) avoid(ing) certain mailing lists and don't really follow forums.
+In 2021|--|2022 the math engine was fundamentally overhauled. As a side effect
+some additional features were added. Not all are yet described in the manual:
+some are still experimental and it just takes time and effort to document and the
+priorities are with implementing their usage. Given the long term stability of
+math and them unlikely to be used in other macro packages there is no real urge
+anyway. It is also easier when we have examples of usage. Of course much is
+discussed in \type {ontarget.pdf} and presentations. The same is true for
+additions to \METAPOST: in due time these will be discussed in the \LUAMETAFUN\
+manual (the official \METAPOST\ manual is maintained elsewhere and should not
+discuss features that are not in the \LUATEX\ version).
 
 \blank[big]
 
@@ -106,45 +122,21 @@
 
 \blank[2*big]
 
-\starttabulate[|||]
-\NC Version       \EQ \currentdate \NC \NR
-\NC \LUAMETATEX   \EQ \cldcontext{LUATEXENGINE} %
-                      \cldcontext{LUATEXVERSION} / %
-                      \cldcontext{LUATEXFUNCTIONALITY}
-                      \NC \NR
-\NC \CONTEXT      \EQ MkIV \contextversion \NC \NR
-\NC \LUATEX\ Team \EQ Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso \NC \NR
+\starttabulate[||pl|]
+\NC \LUAMETATEX\ Banner   \EQ \cldcontext{LUATEXENGINE} %
+                              \cldcontext{LUATEXVERSION} / %
+                              \cldcontext{LUATEXFUNCTIONALITY}
+                              \NC \NR
+\NC \LUAMETATEX\ Version  \EQ \currentdate \NC \NR
+\NC \CONTEXT\    Version  \EQ LMTX \contextversion \NC \NR
+\NC \LUATEX\     Team     \EQ Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso \NC \NR
+\NC \LUAMETATEX\ Team     \EQ Hans Hagen, Alan Braslau, Mojca Miklavec and Wolfgang Schuster, Mikael Sundqvist \NC \NR
+\NC resources and info at \EQ www.contextgarden.net\space\vl\space
+                              www.pragma-ade.nl\space\vl\space
+                              www.luametatex.org\space\vl\space
+                              ntg-context at ntg.nl (http://www.ntg.nl/mailman/listinfo/ntg-context) \NC \NR
 \stoptabulate
 
-\vfilll
-
-{\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. 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 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

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-languages.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/luametatex
 
 \environment luametatex-style
 
@@ -98,7 +98,7 @@
 \prm {firstvalidlanguage} to for instance~1 and make thereby language~0
 an ignored hyphenation language.
 
-The new primitive \lpr {hyphenationmin} can be used to signal the minimal length
+The new primitive \prm {hyphenationmin} can be used to signal the minimal length
 of a word. This value is stored with the (current) language.
 
 Because the \prm {uchyph} value is saved in the actual nodes, its handling is
@@ -130,7 +130,7 @@
 constructed. When \prm {savinghyphcodes} was zero when the language got
 initialized you start out with nothing, otherwise you already have a set.
 
-When a \lpr {hjcode} is greater than 0 but less than 32 is indicates the
+When a \prm {hjcode} is greater than 0 but less than 32 is indicates the
 to be used length. In the following example we map a character (\type {x}) onto
 another one in the patterns and tell the engine that \type {œ} counts as two
 characters. Because traditionally zero itself is reserved for inhibiting
@@ -192,7 +192,7 @@
 {penalty}, \nod {kern} or \nod {boundary} node. But by default also a \nod
 {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 flags in \lpr {hyphenationmode}:
+test by setting flags in \prm {hyphenationmode}:
 
 \starttabulate[|c|l|]
 \DB value      \BC behaviour \NC \NR
@@ -316,27 +316,71 @@
 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
+\NC \number \normalhyphenationcode            \NC honour (normal) \prm{discretionary}'s \NC \NR
+\NC \number \automatichyphenationcode         \NC turn \type {-} into (automatic) discretionaries \NC \NR
+\NC \number \explicithyphenationcode          \NC turn \type {\-} into (explicit) discretionaries \NC \NR
+\NC \number \syllablehyphenationcode          \NC hyphenate (syllable) according to language \NC \NR
+\NC \number \uppercasehyphenationcode         \NC hyphenate uppercase characters too (replaces \prm {uchyph} \NC \NR
+\NC \number \compoundhyphenationcode          \NC permit break at an explicit hyphen (border cases) \NC \NR
+\NC \number \strictstarthyphenationcode       \NC traditional \TEX\ compatibility wrt the start of a word \NC \NR
+\NC \number \strictendhyphenationcode         \NC traditional \TEX\ compatibility wrt the end of a word \NC \NR
+\NC \number \automaticpenaltyhyphenationcode  \NC use \prm {automatichyphenpenalty} \NC \NR
+\NC \number \explicitpenaltyhyphenationcode   \NC use \prm {explicithyphenpenalty} \NC \NR
+\NC \number \permitgluehyphenationcode        \NC turn glue in discretionaries into kerns \NC \NR
+\NC \number \permitallhyphenationcode         \NC okay, let's be even more tolerant in discretionaries \NC \NR
+\NC \number \permitmathreplacehyphenationcode \NC and again we're more permissive \NC \NR
+\NC \number \lazyligatureshyphenationcode     \NC controls how successive explicit discretionaries are handled in base mode \NC \NR
+\NC \number \forcecheckhyphenationcode        \NC treat all discretionaries equal when breaking lines (in all three passes) \NC \NR
+\NC \number \forcehandlerhyphenationcode      \NC kick in the handler (experiment) \NC \NR
+\NC \number \feedbackcompoundhyphenationcode  \NC feedback compound snippets \NC \NR
 \stoptabulate
 
+Some of these options are still experimental, simply because not all aspects and
+side effects have been explored. You can find some experimental use cases in
+\CONTEXT.
+
 \stopsection
 
+\startsection[title={Controlling hyphenation}]
+
+\startsubsection[title={\prm {hyphenationmin}}]
+
+\topicindex {languages}
+\topicindex {hyphenation}
+
+This primitive can be used to set the minimal word length, so setting it to a value
+of~$5$ means that only words of 6 characters and more will be hyphenated, of course
+within the constraints of the \prm {lefthyphenmin} and \prm {righthyphenmin}
+values (as stored in the glyph node). This primitive accepts a number and stores
+the value with the language.
+
+\stopsubsection
+
+\startsubsection[title={\prm {boundary}, \prm {noboundary}, \prm {protrusionboundary} and \prm {wordboundary}}]
+
+The \prm {noboundary} command is used to inject a whatsit node but now injects a normal
+node with type \nod {boundary} and subtype~0. In addition you can say:
+
+\starttyping
+x\boundary 123\relax y
+\stoptyping
+
+This has the same effect but the subtype is now~1 and the value~123 is stored.
+The traditional ligature builder still sees this as a cancel boundary directive
+but at the \LUA\ end you can implement different behaviour. The added benefit of
+passing this value is a side effect of the generalization. The subtypes~2 and~3
+are used to control protrusion and word boundaries in hyphenation and have
+related primitives.
+
+\stopsubsection
+
+\stopsection
+
 \startsection[title={The main control loop}]
 
 \topicindex {main loop}
 \topicindex {hyphenation}
+\topicindex {hyphenation+tracing}
 
 In \LUATEX's main loop, almost all input characters that are to be typeset are
 converted into \nod {glyph} node records with subtype \quote {character}, but
@@ -442,11 +486,23 @@
 \explicithyphenpenalty
 \stoptyping
 
-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
+The usage of these penalties is controlled by the \prm {hyphenationmode} flags
+\number\automaticpenaltyhyphenationcode\space and
+\number\explicitpenaltyhyphenationcode\space and when these are not set \prm
 {exhyphenpenalty} is used.
 
+You can use the \prm {tracinghyphenation} variable to get a bit more information
+about what happens.
+
+\starttabulate[|lT|l|]
+\DB value \BC effect \NC\NR
+\TB
+\NC 1     \NC report redundant pattern (happens by default in \LUATEX) \NC\NR
+\NC 2     \NC report words that reach the hyphenator and got treated \NC\NR
+\NC 3     \NC show the result of a hyphenated word (a node list) \NC\NR
+\LL
+\stoptabulate
+
 \stopsection
 
 \startsection[title={Loading patterns and exceptions},reference=patternsexceptions]
@@ -526,7 +582,7 @@
 The motivation behind the \ETEX\ extension \prm {savinghyphcodes} was that
 hyphenation heavily depended on font encodings. This is no longer true in
 \LUATEX, and the corresponding primitive is basically ignored. Because we now
-have \lpr {hjcode}, the case related codes can be used exclusively for \prm
+have \prm {hjcode}, the case related codes can be used exclusively for \prm
 {uppercase} and \prm {lowercase}.
 
 The three curly brace pair pattern in an exception can be somewhat unexpected so
@@ -535,7 +591,7 @@
 \type {foobar}. Then, when a hit happens there is a replacement text (\type {x})
 or none. Because we introduced penalties in discretionary nodes, the exception
 syntax now also can take a penalty specification. The value between square brackets
-is a multiplier for \lpr {exceptionpenalty}. Here we have set it to 10000 so
+is a multiplier for \prm {exceptionpenalty}. Here we have set it to 10000 so
 effectively we get 30000 in the example.
 
 \def\ShowSample#1#2%
@@ -612,10 +668,10 @@
     needed.
 \stopitem
 \startitem
-    \LUATEX\ uses the language-specific variables \lpr {prehyphenchar} and \lpr
+    \LUATEX\ uses the language-specific variables \prm {prehyphenchar} and \prm
     {posthyphenchar} in the creation of implicit discretionaries, instead of
     \TEX82's \prm {hyphenchar}, and the values of the language|-|specific
-    variables \lpr {preexhyphenchar} and \lpr {postexhyphenchar} for explicit
+    variables \prm {preexhyphenchar} and \prm {postexhyphenchar} for explicit
     discretionaries (instead of \TEX82's empty discretionary).
 \stopitem
 \startitem
@@ -713,7 +769,7 @@
 \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
+{\tttf "\uchexnumbers {\lazyligatureshyphenationcode}} in the \prm
 {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.
@@ -750,7 +806,7 @@
 
 \startsection[title={The \type {language} library}][library=lang]
 
-\subsection {\type {new} and \type {id}}
+\startsubsection[title={\type {new} and \type {id}}]
 
 \topicindex {languages+library}
 
@@ -779,8 +835,10 @@
 The number returned is the internal \prm {language} id number this object refers
 to.
 
-\subsection {\type {hyphenation}}
+\stopsubsection
 
+\startsubsection[title={\type {hyphenation}}]
+
 \libindex {hyphenation}
 
 You can load exceptions with:
@@ -793,9 +851,11 @@
 When no string is given (the first example) a string with all exceptions is
 returned.
 
-\subsection {\type {clear_hyphenation} and \type {clean}}
+\stopsubsection
 
-\libindex {clear_hyphenation}
+\startsubsection[title={\type {clearhyphenation} and \type {clean}}]
+
+\libindex {clearhyphenation}
 \libindex {clean}
 
 This either returns the current hyphenation exceptions for this language, or adds
@@ -803,7 +863,7 @@
 [patternsexceptions].
 
 \startfunctioncall
-language.clear_hyphenation(<language> l)
+language.clearhyphenation(<language> l)
 \stopfunctioncall
 
 This call clears the exception dictionary (string) for this language.
@@ -818,10 +878,12 @@
 This function is useful if you want to do something else based on the words in a
 dictionary file, like spell|-|checking.
 
-\subsection {\type {patterns} and \type {clear_patterns}}
+\stopsubsection
 
+\startsubsection[title={\type {patterns} and \type {clearpatterns}}]
+
 \libindex {patterns}
-\libindex {clear_patterns}
+\libindex {clearpatterns}
 
 \startfunctioncall
 <string> n = language.patterns(<language> l)
@@ -833,13 +895,15 @@
 [patternsexceptions].
 
 \startfunctioncall
-language.clear_patterns(<language> l)
+language.clearpatterns(<language> l)
 \stopfunctioncall
 
 This can be used to clear the pattern dictionary for a language.
 
-\subsection {\type {hyphenationmin}}
+\stopsubsection
 
+\startsubsection[title={\type {hyphenationmin}}]
+
 \libindex {hyphenationmin}
 
 This function sets (or gets) the value of the \TEX\ parameter
@@ -850,8 +914,10 @@
 language.hyphenationmin(<language> l, <number> n)
 \stopfunctioncall
 
-\subsection {\type {[pre|post][ex|]hyphenchar}}
+\stopsubsection
 
+\startsubsection[title={\type {[pre|post][ex|]hyphenchar}}]
+
 \libindex {prehyphenchar}
 \libindex {posthyphenchar}
 \libindex {preexhyphenchar}
@@ -881,8 +947,10 @@
 characters for explicit hyphenation in this language. Both are initially
 decimal~0 (indicating emptiness).
 
-\subsection {\type {hyphenate}}
+\stopsubsection
 
+\startsubsection[title={\type {hyphenate}}]
+
 \libindex {hyphenate}
 
 The next call inserts hyphenation points (discretionary nodes) in a node list. If
@@ -900,8 +968,10 @@
 different subtypes are not processed. See \in {section} [charsandglyphs] for
 more details.
 
-\subsection {\type {[set|get]hjcode}}
+\stopsubsection
 
+\startsubsection[title={\type {[set|get]hjcode}}]
+
 \libindex {sethjcode}
 \libindex {gethjcode}
 
@@ -915,6 +985,35 @@
 When you set a hjcode the current sets get initialized unless the set was already
 initialized due to \prm {savinghyphcodes} being larger than zero.
 
+\subsection{\prm {hccode} and \type {[set|get]hccode}}
+
+A character can be set to non zero to indicate that it should be regarded as
+value visible hyphenation point. These examples show how that works (it si the
+second bit in \prm {hyphenationmode} that does the magic but we set them all
+here):
+
+\startbuffer
+{\hsize 1mm \hccode"2014 \zerocount  \hyphenationmode "0000000 xxx\emdash xxx \par}
+{\hsize 1mm \hccode"2014 "2014\relax \hyphenationmode "0000000 xxx\emdash xxx \par}
+
+{\hsize 1mm \hccode"2014 \zerocount  \hyphenationmode "FFFFFFF xxx\emdash xxx \par}
+{\hsize 1mm \hccode"2014 "2014\relax \hyphenationmode "FFFFFFF xxx\emdash xxx \par}
+
+{\hyphenationmode "0000000 xxx--xxx---xxx \par}
+{\hyphenationmode "FFFFFFF xxx--xxx---xxx \par}
+\stopbuffer
+
+\typebuffer
+
+Here we assign the code point because who knows what future extensions will
+bring. As with the other codes you can also set them from \LUA. The feature is
+experimental and might evolve when \CONTEXT\ users come up with reasonable
+demands.
+
+\startpacked \getbuffer \stoppacked
+
+\stopsubsection
+
 \stopsection
 
 \stopchapter

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-libraries.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-libraries.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-libraries.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/luametatex
 
 \environment luametatex-style
 
@@ -254,7 +254,7 @@
 
 These are accompanied by \type {libcerf} functions:
 
-\starttabulate[|Tw(12em)|T|T|]
+\starttabulate[|Tw(12em)|T|Tpl|]
 \DB name       \BC arguments \BC results \NC \NR
 \TB
 \NC erf        \NC (a)       \NC The complex error function erf(z) \NC \NR

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/luametatex
 
 \environment luametatex-style
 
@@ -8,6 +8,24 @@
 
 \startsection[title={Initialization},reference=init]
 
+\startsubsection[title={A bare bone engine}]
+
+Although the \LUAMETATEX\ engine will start up when you call the program it will
+not do much useful. You can compare it to computer hardware without (high level)
+operating system with a \TEX\ kernel being the bios. It can interpret \TEX\ code
+but for typesetting you need a reasonable setup. You also need to load fonts, and
+for output you need a backend, and both can be implemented in \LUA. If you don't
+like that and want to get up and running immediately, you will be more happy with
+\LUATEX, \PDFTEX\ or \XETEX, combined with your favorite macro package.
+
+If you just want to play around you can install the \CONTEXT\ distribution which
+(including manuals and some fonts) is tiny compared to a full \TEXLIVE\
+installation and can be run alongside it without problems. If there are issues
+you can go to the usual \CONTEXT\ support platforms and seek help where you can
+find the people who made \LUATEX\ and \LUAMETATEX.
+
+\stopsubsection
+
 \startsubsection[title={\LUAMETATEX\ as a \LUA\ interpreter}]
 
 \topicindex {initialization}
@@ -15,18 +33,14 @@
 
 Although \LUAMETATEX\ is primarily meant as a \TEX\ engine, it can also serve as
 a stand alone \LUA\ interpreter. There are two ways to make \LUAMETATEX\ behave
-like a standalone \LUA\ interpreter:
+like a standalone \LUA\ interpreter. The first method uses the command line
+option \type {--luaonly} followed by a filename. The second is more automatic: if
+the only non|-|option argument (file) on the commandline has the extension \type
+{lmt} or \type {lua}. The \type {luc} extension has been dropped because bytecode
+compiled files are not portable and one can always load indirect. The \type {lmt}
+suffix is more \CONTEXT\ specific and makes it possible to have files for
+\LUATEX\ and \LUAMETATEX\ alongside.
 
-\startitemize[packed]
-\startitem
-    if a \type {--luaonly} option is given on the commandline, or
-\stopitem
-\startitem
-    if the only non|-|option argument (file) on the commandline has the extension
-    \type {lua} or \type {luc}.
-\stopitem
-\stopitemize
-
 In this mode, it will set \LUA's \type {arg[0]} to the found script name, pushing
 preceding options in negative values and the rest of the command line in the
 positive values, just like the \LUA\ interpreter does.
@@ -39,8 +53,10 @@
 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
 the engine as a stub. For instance, in \CONTEXT\ a symlink from \type {mtxrun} to
-type {luametatex} will run the \type {mtxrun.lua} script when present in the same
-path as the binary itself
+type {luametatex} will run the \type {mtxrun.lmt} or \type {mtxrun.lua} script
+when present in the same path as the binary itself. As mentioned before first
+checking for (\CONTEXT) \type {lmt} files permits different files for different
+engines in the same path.
 
 \stopsubsection
 
@@ -67,8 +83,9 @@
 \stoptabulate
 
 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.
+\LUA\ anyway. So for instance there are no options to enter a safer mode or
+control executing programs because 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
@@ -77,7 +94,7 @@
 
 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.
+with \TEX\ are initialized rather soon so you have these available.
 
 \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
@@ -172,8 +189,8 @@
 \index {locales}
 
 In stock \LUA, many things depend on the current locale. In \LUAMETATEX, we can't
-do that, because it makes documents unportable. While \LUAMETATEX\ is running if
-forces the following locale settings:
+do that, because it makes documents non|-|portable. While \LUAMETATEX\ is running
+if forces the following locale settings:
 
 \starttyping
 LC_CTYPE=C
@@ -207,14 +224,55 @@
 
 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.
+related \LUA\ code. The \type {luafilesystem} module has been replaced by a more
+efficient one that also deals with the \MSWINDOWS\ file and environment
+properties better (\UNICODE\ support in \MSWINDOWS\ dates from before \UTF8
+became dominant so we need to deal with wide \UNICODE16).
+
 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).
+encryption and compression. There are also some optional libraries that we do
+interface but that are loaded on demand. The interfaces are as minimal as can be
+because we so much in \LUA, which also means that one can tune behaviour to
+usage better.
 
 \stopsection
 
+\startsection[title={Files}]
+
+\startsubsection[title={File syntax}]
+
+\topicindex {files+names}
+
+\LUAMETATEX\ will accept a braced argument as a file name:
+
+\starttyping
+\input {plain}
+\openin 0 {plain}
+\stoptyping
+
+This allows for embedded spaces, without the need for double quotes. Macro
+expansion takes place inside the argument. Keep in mind that as side effect of
+delegating \IO\ to \LUA\ the \tex {openin} primitive is not 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.
+
+\stopsubsection
+
+\startsubsection[title={Writing to file}]
+
+\topicindex {files+writing}
+
+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
+
+\stopsection
+
 \startsection[title={Testing}]
 
 \topicindex {testing}
@@ -230,6 +288,243 @@
 
 \stopsection
 
+\startsection[reference=internals,title={The internals}]
+
+\topicindex{nodes}
+\topicindex{boxes}
+\topicindex{\LUA}
+
+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).
+
+So, the average user doesn't need to know much about what is in this manual. For
+instance fonts and languages are normally dealt with in the macro package that
+you use. Messing around with node lists is also often not really needed at the
+user level. If you do mess around, you'd better know what you're dealing with.
+Reading \quotation {The \TEX\ Book} by Donald Knuth is a good investment of time
+then also because it's good to know where it all started. A more summarizing
+overview is given by \quotation {\TEX\ by Topic} by Victor Eijkhout. You might
+want to peek in \quotation {The \ETEX\ manual} too.
+
+But \unknown\ if you're here because of \LUA, then all you need to know is that
+you can call it from within a run. If you want to learn the language, just read
+the well written \LUA\ book. The macro package that you use probably will provide
+a few wrapper mechanisms but the basic \prm {directlua} command that does the job
+is:
+
+\starttyping
+\directlua{tex.print("Hi there")}
+\stoptyping
+
+You can put code between curly braces but if it's a lot you can also put it in a
+file and load that file with the usual \LUA\ commands. If you don't know what
+this means, you definitely need to have a look at the \LUA\ book first.
+
+If you still decide to read on, then it's good to know what nodes are, so we do a
+quick introduction here. If you input this text:
+
+\starttyping
+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 ...
+\stoptyping
+
+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
+[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
+current font, the character code and the current language. Spaces become glue
+nodes. There are many node types and nodes can have many properties but that will
+be discussed later. Each node points back to a previous node or next node, given
+that these exist. Sometimes multiple characters are represented by one glyph
+(shape), so one can also get:
+
+\starttyping
+[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
+[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
+so called boxes and can be separated by glue, penalties and more. The page
+builder accumulates lines and when feasible triggers an output routine that will
+take the list so far. Constructing the actual page is not part of \TEX\ but done
+using primitives that permit manipulation of boxes. The result is handled back to
+\TEX\ and flushed to a (often \PDF) file.
+
+\starttyping
+\setbox\scratchbox\vbox\bgroup
+    line 1\par line 2
+\egroup
+
+\showbox\scratchbox
+\stoptyping
+
+The above code produces the next log lines that reveal how the engines sees a
+paragraph (wrapped in a \type {\vbox}):
+
+\starttyping[style=small]
+1:4: > \box257=
+1:4: \vbox[normal][16=1,17=1,47=1], width 483.69687, height 27.58083, depth 0.1416, direction l2r
+1:4: .\list
+1:4: ..\hbox[line][16=1,17=1,47=1], width 483.69687, height 7.59766, depth 0.1416, glue 455.40097fil, direction l2r
+1:4: ...\list
+1:4: ....\glue[left hang][16=1,17=1,47=1] 0.0pt
+1:4: ....\glue[left][16=1,17=1,47=1] 0.0pt
+1:4: ....\glue[parfillleft][16=1,17=1,47=1] 0.0pt
+1:4: ....\par[newgraf][16=1,17=1,47=1], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 3000, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, emergencystretch 12.0, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
+1:4: ....\glue[indent][16=1,17=1,47=1] 0.0pt
+1:4: ....\glyph[32768][16=1,17=1,47=1], language (n=1,l=2,r=3), hyphenationmode 499519, options 128 , font <30: DejaVuSerif @ 10.0pt>, glyph U+00006C l
+1:4: ....\glyph[32768][16=1,17=1,47=1], language (n=1,l=2,r=3), hyphenationmode 499519, options 128 , font <30: DejaVuSerif @ 10.0pt>, glyph U+000069 i
+1:4: ....\glyph[32768][16=1,17=1,47=1], language (n=1,l=2,r=3), hyphenationmode 499519, options 128 , font <30: DejaVuSerif @ 10.0pt>, glyph U+00006E n
+1:4: ....\glyph[32768][16=1,17=1,47=1], language (n=1,l=2,r=3), hyphenationmode 499519, options 128 , font <30: DejaVuSerif @ 10.0pt>, glyph U+000065 e
+1:4: ....\glue[space][16=1,17=1,47=1] 3.17871pt plus 1.58936pt minus 1.05957pt, font 30
+1:4: ....\glyph[32768][16=1,17=1,47=1], language (n=1,l=2,r=3), hyphenationmode 499519, options 128 , font <30: DejaVuSerif @ 10.0pt>, glyph U+000031 1
+1:4: ....\penalty[line][16=1,17=1,47=1] 10000
+1:4: ....\glue[parfill][16=1,17=1,47=1] 0.0pt plus 1.0fil
+1:4: ....\glue[right][16=1,17=1,47=1] 0.0pt
+1:4: ....\glue[right hang][16=1,17=1,47=1] 0.0pt
+1:4: ..\glue[par][16=1,17=1,47=1] 5.44995pt plus 1.81665pt minus 1.81665pt
+1:4: ..\glue[baseline][16=1,17=1,47=1] 6.79396pt
+1:4: ..\hbox[line][16=1,17=1,47=1], width 483.69687, height 7.59766, depth 0.1416, glue 455.40097fil, direction l2r
+1:4: ...\list
+1:4: ....\glue[left hang][16=1,17=1,47=1] 0.0pt
+1:4: ....\glue[left][16=1,17=1,47=1] 0.0pt
+1:4: ....\glue[parfillleft][16=1,17=1,47=1] 0.0pt
+1:4: ....\par[newgraf][16=1,17=1,47=1], hangafter 1, hsize 483.69687, pretolerance 100, tolerance 3000, adjdemerits 10000, linepenalty 10, doublehyphendemerits 10000, finalhyphendemerits 5000, clubpenalty 2000, widowpenalty 2000, brokenpenalty 100, emergencystretch 12.0, parfillskip 0.0pt plus 1.0fil, hyphenationmode 499519
+1:4: ....\glue[indent][16=1,17=1,47=1] 0.0pt
+1:4: ....\glyph[32768][16=1,17=1,47=1], language (n=1,l=2,r=3), hyphenationmode 499519, options 128 , font <30: DejaVuSerif @ 10.0pt>, glyph U+00006C l
+1:4: ....\glyph[32768][16=1,17=1,47=1], language (n=1,l=2,r=3), hyphenationmode 499519, options 128 , font <30: DejaVuSerif @ 10.0pt>, glyph U+000069 i
+1:4: ....\glyph[32768][16=1,17=1,47=1], language (n=1,l=2,r=3), hyphenationmode 499519, options 128 , font <30: DejaVuSerif @ 10.0pt>, glyph U+00006E n
+1:4: ....\glyph[32768][16=1,17=1,47=1], language (n=1,l=2,r=3), hyphenationmode 499519, options 128 , font <30: DejaVuSerif @ 10.0pt>, glyph U+000065 e
+1:4: ....\glue[space][16=1,17=1,47=1] 3.17871pt plus 1.58936pt minus 1.05957pt, font 30
+1:4: ....\glyph[32768][16=1,17=1,47=1], language (n=1,l=2,r=3), hyphenationmode 499519, options 128 , font <30: DejaVuSerif @ 10.0pt>, glyph U+000032 2
+1:4: ....\penalty[line][16=1,17=1,47=1] 10000
+1:4: ....\glue[parfill][16=1,17=1,47=1] 0.0pt plus 1.0fil
+1:4: ....\glue[right][16=1,17=1,47=1] 0.0pt
+1:4: ....\glue[right hang][16=1,17=1,47=1] 0.0pt
+\stoptyping
+
+The \LUATEX\ engine provides hooks for \LUA\ code at nearly every reasonable
+point in the process: collecting content, hyphenating, applying font features,
+breaking into lines, etc. This means that you can overload \TEX's natural
+behaviour, which still is the benchmark. When we refer to \quote {callbacks} we
+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 of ways to achieve 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
+additional tools to make documents look good. They hide the dirty details of font
+management, language support, turning structure into typeset results, wrapping
+pages, including images, and so on. You should be aware of the fact that when you
+hook in your own code to manipulate lists, this can interfere with the macro
+package that you use. Each successive step expects a certain result and if you
+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
+what commands relate to them. Here are a few:
+
+\starttabulate[|l|l|p|]
+\DB command              \BC node          \BC explanation \NC \NR
+\TB
+\NC \prm {hbox}          \NC \nod {hlist} \NC horizontal box \NC \NR
+\NC \prm {vbox}          \NC \nod {vlist} \NC vertical box with the baseline at the bottom \NC \NR
+\NC \prm {vtop}          \NC \nod {vlist} \NC vertical box with the baseline at the top \NC \NR
+\NC \prm {hskip}         \NC \nod {glue}  \NC horizontal skip with optional stretch and shrink \NC \NR
+\NC \prm {vskip}         \NC \nod {glue}  \NC vertical skip with optional stretch and shrink \NC \NR
+\NC \prm {kern}          \NC \nod {kern}  \NC horizontal or vertical fixed skip \NC \NR
+\NC \prm {discretionary} \NC \nod {disc}  \NC hyphenation point (pre, post, replace) \NC \NR
+\NC \prm {char}          \NC \nod {glyph} \NC a character \NC \NR
+\NC \prm {hrule}         \NC \nod {rule}  \NC a horizontal rule \NC \NR
+\NC \prm {vrule}         \NC \nod {rule}  \NC a vertical rule \NC \NR
+\NC \prm {textdirection} \NC \nod {dir}   \NC a change in text direction \NC \NR
+\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
+the group, changes to registers get saved on a stack, and restored after leaving
+the group. When conditionals are encountered, another kind of nesting happens,
+and again there is a stack involved. Tokens, expansion, stacks, input levels are
+all terms used in the next chapters. Don't worry, they loose their magic once you
+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 pack(ag)ing it can mean two things. When \TEX\ has consumed
+some tokens that represent text they are added to the current list. When the text
+is put into a so called \prm {hbox} (for instance a line in a paragraph) it
+(normally) first gets hyphenated, 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 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
+into builders. For now this should be enough to enable you to understand the next
+chapters. The text is not as enlightening and entertaining as Don Knuths books,
+sorry.
+
+\stopsection
+
 \stopchapter
 
 \stopcomponent

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-math.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-math.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-math.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/luametatex
 
 \environment luametatex-style
 
@@ -10,36 +10,290 @@
 
 \topicindex {math}
 
+Because we started from \LUATEX, by the end of 2021 this chapter started with
+this, even if we already reworked the engine:
+
+\startquotation
 At this point there is no difference between \LUAMETATEX\ and \LUATEX\ with
-respect to math. The handling of mathematics in \LUATEX\ differs quite a bit from
-how \TEX82 (and therefore \PDFTEX) handles math. First, \LUATEX\ adds primitives
-and extends some others so that \UNICODE\ input can be used easily. Second, all
-of \TEX82's internal special values (for example for operator spacing) have been
-made accessible and changeable via control sequences. Third, there are extensions
-that make it easier to use \OPENTYPE\ math fonts. And finally, there are some
+respect to math. \footnote {This might no longer be true because we have more
+control options that define default behavior and also have a more extensive
+scaling model. Anyway, it should not look worse, and maybe even a bit better.}
+The handling of mathematics in \LUATEX\ differs quite a bit from how \TEX82 (and
+therefore \PDFTEX) handles math. First, \LUATEX\ adds primitives and extends some
+others so that \UNICODE\ input can be used easily. Second, all of \TEX82's
+internal special values (for example for operator spacing) have been made
+accessible and changeable via control sequences. Third, there are extensions that
+make it easier to use \OPENTYPE\ math fonts. And finally, there are some
 extensions that have been proposed or considered in the past that are now added
 to the engine.
 
+You might be surprised that we don't use all these new control features in
+\CONTEXT\ \LMTX\ but who knows what might happen because users drive it. The main
+reason for adding so much is that I decided it made more sense to be complete now
+than gradually add more and more. At some point we should be able to say \quote
+{This is it}. Also, when looking at these features, you need to keep in mind that
+when it comes to math, \LATEX\ is the dominant macro package and it never needed
+these engine features, so most are probably just here for exploration purposes.
+\stopquotation
+
+Although we still process math as \TEX\ does, there have been some fundamental
+changes to the machinery. Most of that is discussed in documents that come with
+\CONTEXT\ and in Mikael Sundqvist math manual. Together we explored some new ways
+to deal with math spacing, penalties, fencing, operators, fractions, atoms and
+other features of the \TEX\ engine. We started from the way \CONTEXT\ used the
+already present functionality combine with sometimes somewhat dirty (but on the
+average working well) tricks.
+
+It will take a while before this chapter is updated. If you find errors or things
+missing, let me know. A lot of pairwise spacing primitives were dropped but also
+quite a bit of new ones introduced to control matters. Much in \LUAMETATEX\ math
+handling is about micro|-|typography and for us the results are quite visible.
+But, as far as we know, there have never been complaints or demands in the
+direction of the features discussed here. Also, \TEX\ math usage outside
+\CONTEXT\ is rather chiselled in stone (already for nearly three decades) so we
+don't expect other macro packages to use the new features anyway.
+
 \stopsection
 
+\startsection[title=Intermezzo]
+
+It is important to understand a bit how \TEX\ handles math. The math engine
+is a large subsystem and basically can be divided in two parts: convert
+sequential input into a list of nodes where math related ones actually are
+sort of intermediate and therefore called noads.
+
+In text mode entering \type {abc} results in three glyph nodes and \type {a b
+c} in three glyph nodes separated by (spacing) glue. Successive glyphs can be
+transformed in the font engine later on, just as hyphenation directive can
+be added. Eventually one (normally) gets a mix of glyphs, font kerns from
+a sequence of glyphs
+
+In math mode \type {abc} results in three simple ordinary noads and \type {a
+b c} is equivalent to that: three noads. But \type {a bc} results in two
+ordinary noads where the second one has a sublist of two ordinary noads.
+Because characters have class properties, \type {( a + b = c )} results in a
+simple open noad, a simple ordinary, a simple binary, a simple ordinary, a
+simple relation, a simple ordinary and simple close noad. The next samples show a
+bit of this; in order to see th effects spacing between ordinary atoms set
+to \type {9mu}.
+
+\startbuffer
+\typebuffer[sample]
+% \tracingmath1\tracingonline1
+\startlinecorrection
+\setmathspacing\mathordinarycode\mathordinarycode\allmathstyles9mu
+\mathgroupingmode\zerocount
+\scale[scale=2000]{\showmakeup[mathglue]\showboxes\mathspacingmode\plusone\getbuffer[sample]}
+\stoplinecorrection
+\blank[2*line]
+\stopbuffer
+
+\startbuffer[sample]
+$a b c$ \quad $a bc$ \quad $abc$
+\stopbuffer
+
+\getbuffer
+
+With \type {\tracingmath 1} we get this logged:
+
+\starttyping
+> \inlinemath=
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "61
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "62
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "63
+
+> \inlinemath=
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "61
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "62
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "63
+
+> \inlinemath=
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "61
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "62
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "63
+\stoptyping
+
+\startbuffer[sample]
+${a} {b} {c}$ \quad ${a} {bc}$ \quad ${abc}$
+\stopbuffer
+
+\getbuffer
+
+If the previous log surprises you, that might be because in \CONTEXT\ we set up the
+engine differently: curly braces don't create ordinary atoms. However, when we
+set \type {\mathgroupingmode 0} we return to what the engine normally does.
+
+\starttyping
+> \inlinemath=
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "61
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "62
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "63
+
+> \inlinemath=
+\noad[ord][...]
+.\nucleus
+..\mathchar[ord][...], family "0, character "61
+\noad[ord][...]
+.\nucleus
+..\submlist[0][...][tracing depth 5 reached]
+
+> \inlinemath=
+\noad[ord][...]
+.\nucleus
+..\submlist[0][...][tracing depth 5 reached]
+\stoptyping
+
+From the first example you can imagine what these sub lists look like: a list of
+ordinary atoms. The final list that is mix of nodes and yet unprocessed noads get
+fed into the math|-|to|-|hlist function and eventually the noads become glyphs,
+boxes, kerns, glue and whatever makes sense. A lot goes on there: think scripts,
+fractions, fences, accents, radicals, spacing, break control.
+
+An example of more tricky scanning is shown here:
+
+\starttyping
+a +   1 \over 2   + b
+a +  {1}\over{2}  + b
+a + {{1}\over{2}} + b
+\stoptyping
+
+In this case the \type {\over} makes \TEX\ reconsider the last noad, remove if
+from the current list and save it for later, then scan for a following atom a
+single character turned atom or a braced sequence that then is an ordinary noad.
+In the end a fraction noad is made. When that gets processed later specific
+numerator and denominator styles get applied (explicitly entered style nodes of
+course overload this for the content). The fact that this construct is all about
+(implicit) ordinary noads, themselves captured in noads, combined with the wish
+for enforced consistent positioning of numerator and denominator, plus style
+overload, color support and whatever comes to mind means that in practice one
+will use a \type {\frac} macro that provides all that control. \footnote {There
+are now a \prm {Uover} primitives that look ahead and then of course still
+treat curly braces as math lists to be picked up.}
+
+A similar tricky case is this:
+
+\starttyping
+      ( a +       ( b - c        ) + d        )
+\left ( a + \left ( b - c \right ) + d \right )
+\stoptyping
+
+Here the first line creates a list of noads but the second line create a fenced
+structure that is handled as a whole in order to make the fences match. \footnote
+{Actually instead of such a structure there could have been delimiters with
+backlinks but one never knows what happens with these links when processing
+passes are made so that fragility is avoided.} A fence noad will not break across
+lines as it is boxed and that is the reason why macro packages have these \type
+{\bigg} macros: they explicitly force a size using some trickery. In \LUAMETATEX\
+a fence object can actually be unpacked when the class is configured as such. It
+is one of the many extensions we have.
+
+There are some peculiar cases that one can run into but that actually are
+mentioned in the \TEX\ book. Often these reasons for intentional side effects
+become clear when one thinks of the average usage but unless one is willing to
+spend time on the \quote {fine points of math} they can also interfere with
+intentions. The next bits of code are just for the reader to look at. Try to
+predict the outcome. Watch out: in \LMTX\ the outcome is not what one gets by
+default in \LUATEX, \PDFTEX\ or regular \TEX. \footnote {One can set \typ
+{\mathgroupingmode = 0} to get close.}
+
+\starttyping
+$ 1 {\red +} 2$\par
+$ 1 \color[red]{+} 2$\par
+$ 1 \mathbin{\red +} 2$\par
+$ a + - b + {- b} $
+$ a \pm - b - {+ b} $
+$ - b $
+$ {- b} $
+\stoptyping
+
+The message here is that when a user is coding the mindset with respect to
+grouping using curly braces has to be switched to math mode too. And how many
+users really read the relevant chapters of the \TEX\ book a couple of times (as
+much makes only sense after playing with math in \TEX)? Even if one doesn't grasp
+everything it's a worthwhile read. Also consider this: did you really ask for an
+ordinary atom when you uses curly braces where no lists were expected? And what
+would have happened when ordinary related spacing had been set to non|-|zero?
+
+All the above (and plenty more) is why in \CONTEXT\ \LMTX\ we make extensive use
+of some \LUAMETATEX\ features, like: additional atom classes, configurable inter
+atom spacing and penalties, pairwise atom rules that can change classes, class
+based rendering options, more font parameters, configurable style instead of hard
+coded ones in constructs, more granular spacing, etc. That way we get quite
+predictable results but also drop some older (un)expected behavior and side
+effects. It is also why we cannot show many examples in the \LUAMETATEX\ manual:
+it uses \CONTEXT\ and we see no reason to complicate out lives (and spend energy
+on) turning off all the nicely cooperating features (and then for sure forgetting
+one) just for the sake of demos. It also gave us the opportunity to improve
+existing mechanisms and|/|or at least simplify their sometimes complex code.
+
+One last word here about sequences of ordinary atoms: the traditional code path
+feeds ordinary atoms into a ligature and kerning routine and does that when it
+encounters one. However, in \OPENTYPE\ we don't have ligatures not (single) kerns
+so there that doesn't apply. As we're not aware of traditional math fonts with
+ligatures and no one is likely to use these fonts with \LUAMETATEX\ the ligature
+code has been disabled. \footnote {It might show up in a different way if we feel
+the need in which case it's more related to runtime patches to fonts and class
+bases ligature building.} The kerning has been redone a bit so that it permits us
+to fine tune spacing (which in \CONTEXT\ we control with goodie files). The
+mentioned routine can also add italic correction, but that happens selectively
+because it is driven by specifications and circumstances. It is one of the places
+where the approach differs from the original, if only for practical reasons.
+
+\stopsection
+
+\startsection[title={Grouping with \prm {beginmathgroup} and \prm {endmathgroup}}]
+
+These two primitives behave like \prm {begingroup} and \prm {endgroup} but
+restore a style change inside the group. Style changes are actually injecting s
+special style noad which makes them sort of persistent till the next explicit
+change which can be confusing. This additional grouping model compensates for
+that.
+
+\stopsection
+
 \startsection[title={Unicode math characters}]
 
 \topicindex {math+\UNICODE}
 \topicindex {\UNICODE+math}
 
-Character handling is now extended up to the full \UNICODE\ range (the \type {\U}
-prefix), which is compatible with \XETEX.
+For various reasons we need to encode a math character in a 32 bit number and
+because we often also need to keep track of families and classes the range of
+characters is limited to 20 bits. There are upto 64 classes (which is a lot more
+than in \LUATEX) and 64 families (less than in \LUATEX). The upper limit of
+characters is less that what \UNICODE\ offers but for math we're okay. If needed
+we can provide less families.
 
 The math primitives from \TEX\ are kept as they are, except for the ones that
 convert from input to math commands: \type {mathcode}, and \type {delcode}. These
-two now allow for a 21-bit character argument on the left hand side of the equals
-sign.
+two now allow for the larger character codes argument on the left hand side of
+the equals sign. The number variants of some primitives might be dropped in favor
+of the primitives that read more than one separate value (class, family and
+code), for instance:
 
-Some of the new \LUATEX\ primitives read more than one separate value. This is
-shown in the tables below by a plus sign.
-
-The input for such primitives would look like this:
-
 \starttyping
 \def\overbrace{\Umathaccent 0 1 "23DE }
 \stoptyping
@@ -67,84 +321,330 @@
 \LL
 \stoptabulate
 
-For practical reasons \prm {mathchardef} will silently accept values larger
-that \type {0x8000} and interpret it as \lpr {Umathcharnumdef}. This is needed
-to satisfy older macro packages.
+% In \LUATEX\ we support the single number primitives *with \type {num} in their
+% name) conforming the \XETEX\ method. For the moment that still works but you need
+% to figure out the number yourself. The split number variants are more future safe
+% with respect to classes and families. We don't document \prm {Umathcharnumdef},
+% \prm {Umathcharnum}, \prm {Umathcodenum} and \prm {Udelcodenum} here any longer.
 
-The following new primitives are compatible with \XETEX:
+In \LUATEX\ we support the single number primitives *with \type {num} in their
+name) conforming the \XETEX\ method. These primitives have been dropped in
+\LUAMETATEX\ because we use different ranges and properties, so these numbers
+have no (stable) meaning.
 
-% somewhat fuzzy:
-
-\starttabulate[|l|l|r|c|l|r|]
-\DB primitive                             \BC min       \BC max         \BC \kern 2em \BC min       \BC max         \NC \NR
+\starttabulate[|l|l|c|c|c|]
+\DB primitive           \BC        \BC class \BC family \BC character \NC \NR
 \TB
-\NC \lpr {Umathchardef}                   \NC 0+0+0     \NC 7+FF+10FFFF \NC           \NC           \NC             \NC \NR
-\NC \lpr {Umathcharnumdef}\rlap{\high{5}} \NC -80000000 \NC    7FFFFFFF \NC           \NC           \NC             \NC \NR
-\NC \lpr {Umathcode}                      \NC 0         \NC      10FFFF \NC =         \NC 0+0+0     \NC 7+FF+10FFFF \NC \NR
-\NC \lpr {Udelcode}                       \NC 0         \NC      10FFFF \NC =         \NC 0+0       \NC   FF+10FFFF \NC \NR
-\NC \lpr {Umathchar}                      \NC 0+0+0     \NC 7+FF+10FFFF \NC           \NC           \NC             \NC \NR
-\NC \lpr {Umathaccent}                    \NC 0+0+0     \NC 7+FF+10FFFF \NC           \NC           \NC             \NC \NR
-\NC \lpr {Udelimiter}                     \NC 0+0+0     \NC 7+FF+10FFFF \NC           \NC           \NC             \NC \NR
-\NC \lpr {Uradical}                       \NC 0+0       \NC   FF+10FFFF \NC           \NC           \NC             \NC \NR
-\NC \lpr {Umathcharnum}                   \NC -80000000 \NC    7FFFFFFF \NC           \NC           \NC             \NC \NR
-\NC \lpr {Umathcodenum}                   \NC 0         \NC      10FFFF \NC =         \NC -80000000 \NC    7FFFFFFF \NC \NR
-\NC \lpr {Udelcodenum}                    \NC 0         \NC      10FFFF \NC =         \NC -80000000 \NC    7FFFFFFF \NC \NR
+\NC \prm {Umathchardef} \NC csname \NC "40   \NC "40    \NC "FFFFF     \NC \NR
+\NC \prm {Umathcode}    \NC        \NC "40   \NC "40    \NC "FFFFF     \NC \NR
+\NC \prm {Udelcode}     \NC "FFFFF \NC "40   \NC "40    \NC "FFFFF     \NC \NR
+\NC \prm {Umathchar}    \NC        \NC "40   \NC "40    \NC "FFFFF     \NC \NR
+\NC \prm {Umathaccent}  \NC        \NC "40   \NC "40    \NC "FFFFF     \NC \NR
+\NC \prm {Udelimiter}   \NC        \NC "40   \NC "40    \NC "FFFFF     \NC \NR
+\NC \prm {Uradical}     \NC        \NC "40   \NC "40    \NC "FFFFF     \NC \NR
 \LL
 \stoptabulate
 
-Specifications typically look like:
+So, there are upto 64 classes of which at this moment about 20 are predefined so,
+taking some future usage by the engine into account,you can assume 32 upto 60 to
+be available for any purpose. The number of families has been reduced from 256 to
+64 which is plenty for daily use in an \OPENTYPE\ setup. If we ever need to
+expand the \UNICODE\ range there will be less families or we just go for a larger
+internal record. The values of begin and end classes and the number of classes
+can be fetched from the \LUA\ status table.
 
+Given the above, specifications typically look like:
+
 \starttyping
-\Umathchardef\xx="1"0"456
-\Umathcode   123="1"0"789
+\Umathchardef \xx = "1 "0 "456
+\Umathcode    123 = "1 "0 "789
 \stoptyping
 
 The new primitives that deal with delimiter|-|style objects do not set up a
 \quote {large family}. Selecting a suitable size for display purposes is expected
-to be dealt with by the font via the \lpr {Umathoperatorsize} parameter.
+to be dealt with by the font via the \prm {Umathoperatorsize} parameter. Old
+school fonts can still be handled but you need to set up the engine to do that;
+this can be done per font. In principle we assume that \OPENTYPE\ fonts are used,
+which is no big deal because loading fonts is already under \LUA\ control. At
+that moment the distinction between small and large delimiters will be gone. Of
+course an alternative is to support a specific large size but that is unlikely to
+happen.
 
-For some of these primitives, all information is packed into a single signed
-integer. For the first two (\lpr {Umathcharnum} and \lpr {Umathcodenum}), the
-lowest 21 bits are the character code, the 3 bits above that represent the math
-class, and the family data is kept in the topmost bits. This means that the values
-for math families 128--255 are actually negative. For \lpr {Udelcodenum} there
-is no math class. The math family information is stored in the bits directly on
-top of the character code. Using these three commands is not as natural as using
-the two- and three|-|value commands, so unless you know exactly what you are
-doing and absolutely require the speedup resulting from the faster input
-scanning, it is better to use the verbose commands instead.
+This means that future versions of \LUAMETATEX\ might drop for instance the large
+family in delimiters, if only because we assume a coherent setup where
+extensibles come from the same font so that we don't need to worry about clashing
+font parameters. This is a condition that we can easily meet in \CONTEXT, which is
+the reference for \LUAMETATEX.
 
-The \lpr {Umathaccent} command accepts optional keywords to control various
-details regarding math accents. See \in {section} [mathacc] below for details.
+% Constructor related primitives like \prm {Umathaccent} accepts optional keywords
+% to control various details regarding their treatment and rendering. See for
+% instance \in {section} [mathacc] for details. Some keywords are specific, but
+% some are shared between the math nodes (aka noads).
 
-There are more new primitives and all of these will be explained in following
-sections:
+There are more new primitives and most of these will be explained in following
+sections. For instance these are variants of radicals and delimiters all are
+set the same:
 
-\starttabulate[|l|l|]
-\DB primitive                \BC value range (in hex) \NC \NR
+\starttabulate[|l|c|c|c|]
+\DB primitive              \BC class \BC family \NC character \NC \NR
 \TB
-\NC \lpr {Uroot}           \NC 0 + 0--FF + 10FFFF   \NC \NR
-\NC \lpr {Uoverdelimiter}  \NC 0 + 0--FF + 10FFFF   \NC \NR
-\NC \lpr {Uunderdelimiter} \NC 0 + 0--FF + 10FFFF   \NC \NR
-\NC \lpr {Udelimiterover}  \NC 0 + 0--FF + 10FFFF   \NC \NR
-\NC \lpr {Udelimiterunder} \NC 0 + 0--FF + 10FFFF   \NC \NR
+\NC \prm {Uroot}           \NC "40   \NC "40    \NC "FFFFF    \NC \NR
+\NC \prm {Uoverdelimiter}  \NC "40   \NC "40    \NC "FFFFF    \NC \NR
+\NC \prm {Uunderdelimiter} \NC "40   \NC "40    \NC "FFFFF    \NC \NR
+\NC \prm {Udelimiterover}  \NC "40   \NC "40    \NC "FFFFF    \NC \NR
+\NC \prm {Udelimiterunder} \NC "40   \NC "40    \NC "FFFFF    \NC \NR
 \LL
 \stoptabulate
 
+In addition there are \prm {Uvextensible} and \prm {Uoperator} and extended
+versions of fenced: \prm {Uleft}, \prm {Uright} and \prm {Umiddle}. There is also
+\prm {Uover} and similar primitives that expect the numerator and denominator
+after the primitive. In addition to regular scripts there are prescripts and a
+dedicated prime script. Many of these \type {U} primitives can be controlled by
+options and keywords.
+
 \stopsection
 
+\startsection[title=Setting up the engine]
+
+\startsubsection[title={Control}]
+
+\topicindex{math+control}
+
+Rendering math has long been dominated by \TEX\ but that changed when \MICROSOFT\
+came with \OPENTYPE\ math: an implementation as well as a font. Some of that was
+modelled after \TEX\ and some was dictated (we think) by the way word processors
+deal with math. For instance, traditional \TEX\ math has a limited set of glyph
+properties and therefore has a somewhat complex interplay between width and
+italic correction. There are no kerns, contrary to \OPENTYPE\ math fonts that
+provides staircase kerns. Interestingly \TEX\ does have some ligature building
+going on in the engine.
+
+In traditional \TEX\ italic correction gets added to the width and selectively
+removed later (or compensated by some shift and|/|or cheating with the box
+width). When we started with \LUATEX\ we had to gamble quite a bit about how to
+apply parameters and glyph properties which resulted in different code paths,
+heuristics, etc. That worked on the average but fonts are often not perfect and
+when served as an example for another one the bad bits can be inherited. That
+said, over time the descriptions improved and this is what the \OPENTYPE\
+specification has to say about italic correction now \footnote {\type
+{https://docs.microsoft.com/en-us/typography/opentype/spec/math}}:
+
+\startitemize [n]
+    \startitem
+        When a run of slanted characters is followed by a straight character
+        (such as an operator or a delimiter), the italics correction of the last
+        glyph is added to its advance width.
+    \stopitem
+    \startitem
+        When positioning limits on an N-ary operator (e.g., integral sign), the
+        horizontal position of the upper limit is moved to the right by half the
+        italics correction, while the position of the lower limit is moved to the
+        left by the same distance.
+    \stopitem
+    \startitem
+        When positioning superscripts and subscripts, their default horizontal
+        positions are also different by the amount of the italics correction of
+        the preceding glyph.
+    \stopitem
+\stopitemize
+
+The first rule is complicated by the fact that \quote {followed} is vague: in
+\TEX\ the sequence \type {$ a b c def $} results in six separate atoms, separated
+by inter atom spacing. The characters in these atoms are the nucleus and there
+can be a super- and|/|or subscript attached and in \LUAMETATEX\ also a prime,
+superprescript and/or subprescript.
+
+The second rule comes from \TEX\ and one can wonder why the available top accent
+anchor is not used. Maybe because bottom accent anchors are missing? Anyway,
+we're stuck with this now.
+
+The third rule also seems to come from \TEX. Take the \quote {\it f} character:
+in \TEX\ fonts that one has a narrow width and part sticks out (in some even at
+the left edge). That means that when the subscript gets attached it will move
+inwards relative to the real dimensions. Before the superscript an italic
+correction is added so what that correction is non|-|zero the scripts are
+horizontally shifted relative to each other.
+
+Now look at this specification of staircase kerns \footnote {Idem.}:
+
+\startnarrower
+    The \type {MathKernInfo} table provides mathematical kerning values used for
+    kerning of subscript and superscript glyphs relative to a base glyph. Its
+    purpose is to improve spacing in situations such as omega with superscript f
+    or capital V with subscript capital A.
+
+    Mathematical kerning is height dependent; that is, different kerning amounts
+    can be specified for different heights within a glyph’s vertical extent. For
+    any given glyph, different values can be specified for four corner positions,
+    top|-|right, to|-|left, etc., allowing for different kerning adjustments
+    according to whether the glyph occurs as a subscript, a superscript, a base
+    being kerned with a subscript, or a base being kerned with a superscript.
+\stopnarrower
+
+Again we're talking super- and subscripts and should we now look at the italic
+correction or assume that the kerns do the job? This is a mixed bag because
+scripts are not always (single) characters. We have to guess a bit here. After
+years of experimenting we came to the conclusion that it will never be okay so
+that's why we settled on controls and runtime fixes to fonts.
+
+This means that processing math is controlled by \prm {mathfontcontrol}, a
+numeric bitset parameter. The recommended bits are marked with a star but it
+really depends on the macro package to set up the machinery well. Of course one
+can just enable all and see what happens. \footnote {This model was more granular
+and could even be font (and character) specific but that was dropped because
+fonts are too inconsistent and an occasional fit is more robust that a generally
+applied rule.}
+
+\starttabulate[|l|l|c|]
+\DB bit             \BC name                              \NC \NC \NR
+\TB
+\NC \type {0x000001} \NC \type {usefontcontrol}           \NC       \NR
+\NC \type {0x000002} \NC \type {overrule}                 \NC \star \NR
+\NC \type {0x000004} \NC \type {underrule}                \NC \star \NR
+\NC \type {0x000008} \NC \type {radicalrule}              \NC \star \NR
+\NC \type {0x000010} \NC \type {fractionrule}             \NC \star \NR
+\NC \type {0x000020} \NC \type {accentskewhalf}           \NC \star \NR
+\NC \type {0x000040} \NC \type {accentskewapply}          \NC \star \NR
+\NC \type {0x000080} \NC \type {applyordinarykernpair}    \NC \star \NR
+\NC \type {0x000100} \NC \type {applyverticalitalickern}  \NC \star \NR
+\NC \type {0x000200} \NC \type {applyordinaryitalickern}  \NC \star \NR
+\NC \type {0x000400} \NC \type {applycharitalickern}      \NC       \NR
+\NC \type {0x000800} \NC \type {reboxcharitalickern}      \NC       \NR
+\NC \type {0x001000} \NC \type {applyboxeditalickern}     \NC \star \NR
+\NC \type {0x002000} \NC \type {staircasekern}            \NC \star \NR
+\NC \type {0x004000} \NC \type {applytextitalickern}      \NC \star \NR
+\NC \type {0x008000} \NC \type {checktextitalickern}      \NC \star \NR
+\NC \type {0x010000} \NC \type {checkspaceitalickern}     \NC       \NR
+\NC \type {0x020000} \NC \type {applyscriptitalickern}    \NC \star \NR
+\NC \type {0x040000} \NC \type {analysescriptnucleuschar} \NC \star \NR
+\NC \type {0x080000} \NC \type {analysescriptnucleuslist} \NC \star \NR
+\NC \type {0x100000} \NC \type {analysescriptnucleusbox}  \NC \star \NR
+\LL
+\stoptabulate
+
+So, to summarize: the reason for this approach is that traditional and \OPENTYPE\
+fonts have different approaches (especially when it comes to dealing with the
+width and italic corrections) and is even more complicated by the fact that the
+fonts are often inconsistent (within and between). In \CONTEXT\ we deal with this
+by runtime fixes to fonts. In any case the Cambria font is taken as reference.
+
+\stopsubsection
+
+\startsubsection[title={Analyzing the script nucleus}]
+
+\topicindex {math+kerning}
+\topicindex {math+scripts}
+
+The three analyze option relate to staircase kerns for which we need to look into the
+nucleus to get to the first character. In principle we only need to look into simple
+characters and lists but we can also look into boxes.There can be interference with
+other kinds spacing as well as italic corrections, which is why it is an option. These three
+are not bound to fonts because we don't know if have a font involved.
+
+% We keep the next text commented for historic reasons. In \CONTEXT\ we clean up
+% fonts in the font goodie files so the examples would not be honest anyway. But it
+% shows a bit where we come from and what alternatives we tried.
+
+% If you want to typeset text in math macro packages often provide something \type
+% {\text} which obeys the script sizes. As the definition can be anything there is
+% a good chance that the kerning doesn't come out well when used in a script. Given
+% that the first glyph ends up in an \prm {hbox} we have some control over this.
+% And, as a bonus we also added control over the normal sublist kerning. The \prm
+% {mathscriptboxmode} parameter defaults to~1.
+%
+% \starttabulate[|c|l|]
+% \DB value     \BC meaning \NC \NR
+% \TB
+% \NC \type {0} \NC forget about kerning \NC \NR
+% \NC \type {1} \NC kern math sub lists with a valid glyph \NC \NR
+% \NC \type {2} \NC also kern math sub boxes that have a valid glyph \NC \NR
+% \NC \type {3} \NC only kern math sub boxes with a boundary node present\NC \NR
+% \LL
+% \stoptabulate
+%
+% Here we show some examples. Of course this doesn't solve all our problems, if
+% only because some fonts have characters with bounding boxes that compensate for
+% italics, while other fonts can lack kerns.
+%
+% \startbuffer[1]
+%     $T_{\tf fluff}$
+% \stopbuffer
+%
+% \startbuffer[2]
+%     $T_{\text{fluff}}$
+% \stopbuffer
+%
+% \startbuffer[3]
+%     $T_{\text{\boundary1 fluff}}$
+% \stopbuffer
+%
+% \unexpanded\def\Show#1#2#3%
+%   {\doifelsenothing{#3}
+%      {\small\tx\typeinlinebuffer[#1]}
+%      {\doifelse{#3}{-}
+%         {\small\bf\tt mode #2}
+%         {\switchtobodyfont[#3]\showfontkerns\showglyphs\mathscriptboxmode#2\relax\inlinebuffer[#1]}}}
+%
+% \starttabulate[|lBT|c|c|c|c|c|]
+%     \NC          \NC \Show{1}{0}{}         \NC\Show{1}{1}{}         \NC \Show{2}{1}{}         \NC \Show{2}{2}{}         \NC \Show{3}{3}{}         \NC \NR
+%     \NC          \NC \Show{1}{0}{-}        \NC\Show{1}{1}{-}        \NC \Show{2}{1}{-}        \NC \Show{2}{2}{-}        \NC \Show{3}{3}{-}        \NC \NR
+%     \NC modern   \NC \Show{1}{0}{modern}   \NC\Show{1}{1}{modern}   \NC \Show{2}{1}{modern}   \NC \Show{2}{2}{modern}   \NC \Show{3}{3}{modern}   \NC \NR
+%     \NC lucidaot \NC \Show{1}{0}{lucidaot} \NC\Show{1}{1}{lucidaot} \NC \Show{2}{1}{lucidaot} \NC \Show{2}{2}{lucidaot} \NC \Show{3}{3}{lucidaot} \NC \NR
+%     \NC pagella  \NC \Show{1}{0}{pagella}  \NC\Show{1}{1}{pagella}  \NC \Show{2}{1}{pagella}  \NC \Show{2}{2}{pagella}  \NC \Show{3}{3}{pagella}  \NC \NR
+%     \NC cambria  \NC \Show{1}{0}{cambria}  \NC\Show{1}{1}{cambria}  \NC \Show{2}{1}{cambria}  \NC \Show{2}{2}{cambria}  \NC \Show{3}{3}{cambria}  \NC \NR
+%     \NC dejavu   \NC \Show{1}{0}{dejavu}   \NC\Show{1}{1}{dejavu}   \NC \Show{2}{1}{dejavu}   \NC \Show{2}{2}{dejavu}   \NC \Show{3}{3}{dejavu}   \NC \NR
+% \stoptabulate
+%
+% Kerning between a character subscript is controlled by \prm {mathscriptcharmode}
+% which also defaults to~1.
+%
+% Here is another example. Internally we tag kerns as italic kerns or font kerns
+% where font kerns result from the staircase kern tables. In 2018 fonts like Latin
+% Modern and Pagella rely on cheats with the boundingbox, Cambria uses staircase
+% kerns and Lucida a mixture. Depending on how fonts evolve we might add some more
+% control over what one can turn on and off.
+%
+% \def\MathSample#1#2#3%
+%   {\NC
+%    #1 \NC
+%    #2 \NC
+%    \showglyphdata \switchtobodyfont[#2,17.3pt]$#3T_{f}$         \NC
+%    \showglyphdata \switchtobodyfont[#2,17.3pt]$#3\gamma_{e}$    \NC
+%    \showglyphdata \switchtobodyfont[#2,17.3pt]$#3\gamma_{ee}$   \NC
+%    \showglyphdata \switchtobodyfont[#2,17.3pt]$#3T_{\tf fluff}$ \NC
+%    \NR}
+%
+% \starttabulate[|Tl|Tl|l|l|l|l|]
+%     \FL
+%     \MathSample{normal}{modern}  {\mr}
+%     \MathSample{}      {pagella} {\mr}
+%     \MathSample{}      {cambria} {\mr}
+%     \MathSample{}      {lucidaot}{\mr}
+%     \ML
+%     \MathSample{bold}  {modern}  {\mb}
+%     \MathSample{}      {pagella} {\mb}
+%     \MathSample{}      {cambria} {\mb}
+%     \MathSample{}      {lucidaot}{\mb}
+%     \LL
+% \stoptabulate
+
+\stopsubsection
+
+\stopsection
+
 \startsection[title={Math styles}]
 
-\subsection{\lpr {mathstyle}}
+\startsubsection[title={\prm {mathstyle}, \prm {mathstackstyle} and \prm {Ustyle}}]
 
 \topicindex {math+styles}
 
 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
+possible, \LUATEX\ adds the new primitive: \prm {mathstyle}. This is a \quote
 {convert command} like e.g. \prm {romannumeral}: its value can only be read,
 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.
+to use \type {\number} or \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
@@ -171,7 +671,7 @@
 The style switching primitives like \prm {textstyle} are turned into nodes so the
 styles set there are frozen. The \prm {mathchoice} primitive results in four
 lists being constructed of which one is used in the second pass. The fact that
-some automatic styles are not yet known also means that the \lpr {mathstyle}
+some automatic styles are not yet known also means that the \prm {mathstyle}
 primitive expands to the current style which can of course be different from the
 one really used. It's a snapshot of the first pass state. As a consequence in the
 following example you get a style number (first pass) typeset that can actually
@@ -244,31 +744,99 @@
 \blank $\displaystyle \getbuffer[2]$ \blank
 \blank $\textstyle    \getbuffer[2]$ \blank
 
-This might look wrong but it's just a side effect of \lpr {mathstyle} expanding
+This might look wrong but it's just a side effect of \prm {mathstyle} expanding
 to the current (first pass) style and the number being injected in the list that
 gets converted in the second pass. It all makes sense and it illustrates the
 importance of grouping. In fact, the math choice style being effective afterwards
 has advantages. It would be hard to get it otherwise.
 
-\subsection{\lpr {Ustack}}
+So far for the more \LUATEX ish approach. One problem with \prm {mathstyle} is
+that when you got it, and want to act upon it, you need to remap it onto say \prm
+{scriptstyle} which can be done with an eight branched \prm {ifcase}. This is
+why we also have a more efficient alternative that you can use in macros:
 
+\starttyping
+\normalexpand{ ... \Ustyle\the\mathstyle      ...}
+\normalexpand{ ... \Ustyle\the\mathstackstyle ...}
+\stoptyping
+
+This new primitive \prm {Ustyle} accepts a numeric value. The \prm
+{mathstackstyle} primitive is just a bonus (it complements \prm {Ustack}).
+
+The styles that the different math components and their subcomponents start out
+with are no longer hard coded but can be set at runtime:
+
+\starttabulate
+\DB primitive name                        \BC default \NC \NR
+\TB
+\NC \prm {Umathoverlinevariant}           \NC cramped           \NC \NR
+\NC \prm {Umathunderlinevariant}          \NC normal            \NC \NR
+\NC \prm {Umathoverdelimitervariant}      \NC small             \NC \NR
+\NC \prm {Umathunderdelimitervariant}     \NC small             \NC \NR
+\NC \prm {Umathdelimiterovervariant}      \NC normal            \NC \NR
+\NC \prm {Umathdelimiterundervariant}     \NC normal            \NC \NR
+\NC \prm {Umathhextensiblevariant}        \NC normal            \NC \NR
+\NC \prm {Umathvextensiblevariant}        \NC normal            \NC \NR
+\NC \prm {Umathfractionvariant}           \NC cramped           \NC \NR
+\NC \prm {Umathradicalvariant}            \NC cramped           \NC \NR
+\NC \prm {Umathdegreevariant}             \NC doublesuperscript \NC \NR
+\NC \prm {Umathaccentvariant}             \NC cramped           \NC \NR
+\NC \prm {Umathtopaccentvariant}          \NC cramped           \NC \NR
+\NC \prm {Umathbottomaccentvariant}       \NC cramped           \NC \NR
+\NC \prm {Umathoverlayaccentvariant}      \NC cramped           \NC \NR
+\NC \prm {Umathnumeratorvariant}          \NC numerator         \NC \NR
+\NC \prm {Umathdenominatorvariant}        \NC denominator       \NC \NR
+\NC \prm {Umathsuperscriptvariant}        \NC superscript       \NC \NR
+\NC \prm {Umathsubscriptvariant}          \NC subscript         \NC \NR
+\NC \prm {Umathprimevariant}              \NC superscript       \NC \NR
+\NC \prm {Umathstackvariant}              \NC numerator         \NC \NR
+\LL
+\stoptabulate
+
+These defaults remap styles are as follows:
+
+\starttabulate[|Tl|l|l|]
+\DB default           \BC result                    \BC mapping \NC \NR
+\TB
+\NC cramped           \NC cramp the style           \NC D' D' T' T' S'  S'  SS' SS' \NC \NR
+\NC subscript         \NC smaller and cramped       \NC S' S' S' S' SS' SS' SS' SS' \NC \NR
+\NC small             \NC smaller                   \NC S  S  S  S  SS  SS  SS  SS  \NC \NR
+\NC superscript       \NC smaller                   \NC S  S  S  S  SS  SS  SS  SS  \NC \NR
+\NC smaller           \NC smaller unless already SS \NC S  S' S  S' SS  SS' SS  SS' \NC \NR
+\NC numerator         \NC smaller unless already SS \NC S  S' S  S' SS  SS' SS  SS' \NC \NR
+\NC denominator       \NC smaller, all cramped      \NC S' S' S' S' SS' SS' SS' SS' \NC \NR
+\NC doublesuperscript \NC smaller, keep cramped     \NC S  S' S  S' SS  SS' SS  SS' \NC \NR
+\LL
+\stoptabulate
+
+The main reason for opening this up was that it permits experiments and removed
+hard coded internal values. But as these defaults served well for decades there
+are no real reasons to change them.
+
+\stopsubsection
+
+\startsubsection[title={\prm {Ustack}}]
+
 \topicindex {math+stacks}
 
 There are a few math commands in \TEX\ where the style that will be used is not
 known straight from the start. These commands (\prm {over}, \prm {atop},
 \prm {overwithdelims}, \prm {atopwithdelims}) would therefore normally return
-wrong values for \lpr {mathstyle}. To fix this, \LUATEX\ introduces a special
-prefix command: \lpr {Ustack}:
+wrong values for \prm {mathstyle}. To fix this, \LUATEX\ introduces a special
+prefix command: \prm {Ustack}:
 
 \starttyping
 $\Ustack {a \over b}$
 \stoptyping
 
-The \lpr {Ustack} command will scan the next brace and start a new math group
-with the correct (numerator) math style.
+The \prm {Ustack} command will scan the next brace and start a new math group
+with the correct (numerator) math style. The \prm {mathstackstyle} primitive
+relates to this feature.
 
-\subsection{The new \type {\cramped...style} commands}
+\stopsubsection
 
+\startsubsection[title={The new \type {\cramped...style} commands}]
+
 \topicindex {math+styles}
 \topicindex {math+spacing}
 \topicindex {math+cramped}
@@ -285,6 +853,12 @@
 These additional commands are not all that valuable on their own, but they come
 in handy as arguments to the math parameter settings that will be added shortly.
 
+Because internally the eight styles are represented as numbers some of the new
+primnitives that relate to them also work with numbers and often you can use them
+mixed. The \prm {tomathstyle} prefix converts a symbolic style into a number so
+\typ {\number \tomathstyle \crampedscriptstyle} gives~\number \tomathstyle
+\crampedscriptstyle.
+
 In Eijkhouts \quotation {\TEX\ by Topic} the rules for handling styles in scripts
 are described as follows:
 
@@ -312,7 +886,7 @@
 
 In \LUATEX\ one can set the styles in more detail which means that you sometimes
 have to set both normal and cramped styles to get the effect you want. (Even) if
-we force styles in the script using \prm {scriptstyle} and \lpr
+we force styles in the script using \prm {scriptstyle} and \prm
 {crampedscriptstyle} we get this:
 
 \startbuffer[demo]
@@ -328,11 +902,12 @@
 
 \getbuffer[demo]
 
-Now we set the following parameters
+Now we set the following parameters using \prm {setmathspacing} that accepts two
+class identifier, a style and a value.
 
 \startbuffer[setup]
-\Umathordrelspacing\scriptstyle=30mu
-\Umathordordspacing\scriptstyle=30mu
+\setmathspacing 0 3 \scriptstyle = 30mu
+\setmathspacing 0 3 \scriptstyle = 30mu
 \stopbuffer
 
 \typebuffer[setup]
@@ -344,10 +919,10 @@
 But, as this is not what is expected (visually) we should say:
 
 \startbuffer[setup]
-\Umathordrelspacing\scriptstyle=30mu
-\Umathordordspacing\scriptstyle=30mu
-\Umathordrelspacing\crampedscriptstyle=30mu
-\Umathordordspacing\crampedscriptstyle=30mu
+\setmathspacing 0 3 \scriptstyle        = 30mu
+\setmathspacing 0 3 \scriptstyle        = 30mu
+\setmathspacing 0 3 \crampedscriptstyle = 30mu
+\setmathspacing 0 3 \crampedscriptstyle = 30mu
 \stopbuffer
 
 \typebuffer[setup]
@@ -356,11 +931,13 @@
 
 \start\getbuffer[setup,demo]\stop
 
+\stopsubsection
+
 \stopsection
 
 \startsection[title={Math parameter settings}]
 
-\subsection {Many new \lpr {Umath*} primitives}
+\startsubsection[title={Many new \tex {Umath*} primitives}]
 
 \topicindex {math+parameters}
 
@@ -368,68 +945,149 @@
 now accessible via primitive commands. In fact, refactoring of the math engine
 has resulted in turning some hard codes properties into parameters.
 
+{\em The next needs checking ...}
+
 \starttabulate
-\DB primitive name                   \BC description \NC \NR
+\DB primitive name                 \BC description \NC \NR
 \TB
-\NC \lpr {Umathquad}               \NC the width of 18 mu's \NC \NR
-\NC \lpr {Umathaxis}               \NC height of the vertical center axis of
-                                         the math formula above the baseline \NC \NR
-\NC \lpr {Umathoperatorsize}       \NC minimum size of large operators in display mode \NC \NR
-\NC \lpr {Umathoverbarkern}        \NC vertical clearance above the rule \NC \NR
-\NC \lpr {Umathoverbarrule}        \NC the width of the rule \NC \NR
-\NC \lpr {Umathoverbarvgap}        \NC vertical clearance below the rule \NC \NR
-\NC \lpr {Umathunderbarkern}       \NC vertical clearance below the rule \NC \NR
-\NC \lpr {Umathunderbarrule}       \NC the width of the rule \NC \NR
-\NC \lpr {Umathunderbarvgap}       \NC vertical clearance above the rule \NC \NR
-\NC \lpr {Umathradicalkern}        \NC vertical clearance above the rule \NC \NR
-\NC \lpr {Umathradicalrule}        \NC the width of the rule \NC \NR
-\NC \lpr {Umathradicalvgap}        \NC vertical clearance below the rule \NC \NR
-\NC \lpr {Umathradicaldegreebefore}\NC the forward kern that takes place before placement of
+\NC \prm {Umathquad}               \NC the width of 18 mu's \NC \NR
+\NC \prm {Umathaxis}               \NC height of the vertical center axis of
+                                       the math formula above the baseline \NC \NR
+\NC \prm {Umathoperatorsize}       \NC minimum size of large operators in display mode \NC \NR
+\NC \prm {Umathoverbarkern}        \NC vertical clearance above the rule \NC \NR
+\NC \prm {Umathoverbarrule}        \NC the width of the rule \NC \NR
+\NC \prm {Umathoverbarvgap}        \NC vertical clearance below the rule \NC \NR
+\NC \prm {Umathunderbarkern}       \NC vertical clearance below the rule \NC \NR
+\NC \prm {Umathunderbarrule}       \NC the width of the rule \NC \NR
+\NC \prm {Umathunderbarvgap}       \NC vertical clearance above the rule \NC \NR
+\NC \prm {Umathradicalkern}        \NC vertical clearance above the rule \NC \NR
+\NC \prm {Umathradicalrule}        \NC the width of the rule \NC \NR
+\NC \prm {Umathradicalvgap}        \NC vertical clearance below the rule \NC \NR
+\NC \prm {Umathradicaldegreebefore}\NC the forward kern that takes place before placement of
                                        the radical degree \NC \NR
-\NC \lpr {Umathradicaldegreeafter} \NC the backward kern that takes place after placement of
+\NC \prm {Umathradicaldegreeafter} \NC the backward kern that takes place after placement of
                                        the radical degree \NC \NR
-\NC \lpr {Umathradicaldegreeraise} \NC this is the percentage of the total height and depth of
+\NC \prm {Umathradicaldegreeraise} \NC this is the percentage of the total height and depth of
                                        the radical sign that the degree is raised by; it is
                                        expressed in \type {percents}, so 60\% is expressed as the
                                        integer $60$ \NC \NR
-\NC \lpr {Umathstackvgap}          \NC vertical clearance between the two
+\NC \prm {Umathstackvgap}          \NC vertical clearance between the two
                                        elements in an \prm {atop} stack \NC \NR
-\NC \lpr {Umathstacknumup}         \NC numerator shift upward in \prm {atop} stack \NC \NR
-\NC \lpr {Umathstackdenomdown}     \NC denominator shift downward in \prm {atop} stack \NC \NR
-\NC \lpr {Umathfractionrule}       \NC the width of the rule in a \prm {over} \NC \NR
-\NC \lpr {Umathfractionnumvgap}    \NC vertical clearance between the numerator and the rule \NC \NR
-\NC \lpr {Umathfractionnumup}      \NC numerator shift upward in \prm {over} \NC \NR
-\NC \lpr {Umathfractiondenomvgap}  \NC vertical clearance between the denominator and the rule \NC \NR
-\NC \lpr {Umathfractiondenomdown}  \NC denominator shift downward in \prm {over} \NC \NR
-\NC \lpr {Umathfractiondelsize}    \NC minimum delimiter size for \type {\...withdelims} \NC \NR
-\NC \lpr {Umathlimitabovevgap}     \NC vertical clearance for limits above operators \NC \NR
-\NC \lpr {Umathlimitabovebgap}     \NC vertical baseline clearance for limits above operators \NC \NR
-\NC \lpr {Umathlimitabovekern}     \NC space reserved at the top of the limit \NC \NR
-\NC \lpr {Umathlimitbelowvgap}     \NC vertical clearance for limits below operators \NC \NR
-\NC \lpr {Umathlimitbelowbgap}     \NC vertical baseline clearance for limits below operators \NC \NR
-\NC \lpr {Umathlimitbelowkern}     \NC space reserved at the bottom of the limit \NC \NR
-\NC \lpr {Umathoverdelimitervgap}  \NC vertical clearance for limits above delimiters \NC \NR
-\NC \lpr {Umathoverdelimiterbgap}  \NC vertical baseline clearance for limits above delimiters \NC \NR
-\NC \lpr {Umathunderdelimitervgap} \NC vertical clearance for limits below delimiters \NC \NR
-\NC \lpr {Umathunderdelimiterbgap} \NC vertical baseline clearance for limits below delimiters \NC \NR
-\NC \lpr {Umathsubshiftdrop}       \NC subscript drop for boxes and subformulas \NC \NR
-\NC \lpr {Umathsubshiftdown}       \NC subscript drop for characters \NC \NR
-\NC \lpr {Umathsupshiftdrop}       \NC superscript drop (raise, actually) for boxes and subformulas \NC \NR
-\NC \lpr {Umathsupshiftup}         \NC superscript raise for characters \NC \NR
-\NC \lpr {Umathsubsupshiftdown}    \NC subscript drop in the presence of a superscript \NC \NR
-\NC \lpr {Umathsubtopmax}          \NC the top of standalone subscripts cannot be higher than this
+\NC \prm {Umathstacknumup}         \NC numerator shift upward in \prm {atop} stack \NC \NR
+\NC \prm {Umathstackdenomdown}     \NC denominator shift downward in \prm {atop} stack \NC \NR
+\NC \prm {Umathfractionrule}       \NC the width of the rule in a \prm {over} \NC \NR
+\NC \prm {Umathfractionnumvgap}    \NC vertical clearance between the numerator and the rule \NC \NR
+\NC \prm {Umathfractionnumup}      \NC numerator shift upward in \prm {over} \NC \NR
+\NC \prm {Umathfractiondenomvgap}  \NC vertical clearance between the denominator and the rule \NC \NR
+\NC \prm {Umathfractiondenomdown}  \NC denominator shift downward in \prm {over} \NC \NR
+\NC \prm {Umathfractiondelsize}    \NC minimum delimiter size for \type {\...withdelims} \NC \NR
+\NC \prm {Umathlimitabovevgap}     \NC vertical clearance for limits above operators \NC \NR
+\NC \prm {Umathlimitabovebgap}     \NC vertical baseline clearance for limits above operators \NC \NR
+\NC \prm {Umathlimitabovekern}     \NC space reserved at the top of the limit \NC \NR
+\NC \prm {Umathlimitbelowvgap}     \NC vertical clearance for limits below operators \NC \NR
+\NC \prm {Umathlimitbelowbgap}     \NC vertical baseline clearance for limits below operators \NC \NR
+\NC \prm {Umathlimitbelowkern}     \NC space reserved at the bottom of the limit \NC \NR
+\NC \prm {Umathoverdelimitervgap}  \NC vertical clearance for limits above delimiters \NC \NR
+\NC \prm {Umathoverdelimiterbgap}  \NC vertical baseline clearance for limits above delimiters \NC \NR
+\NC \prm {Umathunderdelimitervgap} \NC vertical clearance for limits below delimiters \NC \NR
+\NC \prm {Umathunderdelimiterbgap} \NC vertical baseline clearance for limits below delimiters \NC \NR
+\NC \prm {Umathsubshiftdrop}       \NC subscript drop for boxes and subformulas \NC \NR
+\NC \prm {Umathsubshiftdown}       \NC subscript drop for characters \NC \NR
+\NC \prm {Umathsupshiftdrop}       \NC superscript drop (raise, actually) for boxes and subformulas \NC \NR
+\NC \prm {Umathsupshiftup}         \NC superscript raise for characters \NC \NR
+\NC \prm {Umathsubsupshiftdown}    \NC subscript drop in the presence of a superscript \NC \NR
+\NC \prm {Umathsubtopmax}          \NC the top of standalone subscripts cannot be higher than this
                                        above the baseline \NC \NR
-\NC \lpr {Umathsupbottommin}       \NC the bottom of standalone superscripts cannot be less than
+\NC \prm {Umathsupbottommin}       \NC the bottom of standalone superscripts cannot be less than
                                        this above the baseline \NC \NR
-\NC \lpr {Umathsupsubbottommax}    \NC the bottom of the superscript of a combined super- and subscript
+\NC \prm {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
+\NC \prm {Umathsubsupvgap}         \NC vertical clearance between super- and subscript \NC \NR
+\NC \prm {Umathspaceafterscript}   \NC additional space added after a super- or subscript \NC \NR
+\NC \prm {Umathconnectoroverlapmin}\NC minimum overlap between parts in an extensible recipe \NC \NR
 \LL
 \stoptabulate
 
+In addition to the above official \OPENTYPE\ font parameters we have these (the
+undefined will get presets, quite likely zero):
+
+\starttabulate
+\DB primitive name                             \BC description \NC \NR
+\TB
+\NC \prm {Umathconnectoroverlapmin}            \NC \NC \NR
+\NC \prm {Umathsubsupshiftdown}                \NC \NC \NR
+\NC \prm {Umathfractiondelsize}                \NC \NC \NR
+\NC \prm {Umathnolimitsupfactor}               \NC a multiplier for the way limits are shifted up and down \NC \NR
+\NC \prm {Umathnolimitsubfactor}               \NC a multiplier for the way limits are shifted up and down \NC \NR
+\NC \prm {Umathaccentbasedepth}                \NC the complement of \prm {Umathaccentbaseheight} \NC \NR
+\NC \prm {Umathflattenedaccentbasedepth}       \NC the complement of \prm {Umathflattenedaccentbaseheight} \NC \NR
+\NC \prm {Umathspacebeforescript}              \NC \NC \NR
+\NC \prm {Umathprimeraise}                     \NC \NC \NR
+\NC \prm {Umathprimeraisecomposed}             \NC \NC \NR
+\NC \prm {Umathprimeshiftup}                   \NC the prime variant of \prm {Umathsupshiftup} \NC \NR
+\NC \prm {Umathprimespaceafter}                \NC the prescript variant of \prm {Umathspaceafterscript} \NC \NR
+\NC \prm {Umathprimeshiftdrop}                 \NC the prime variant of \prm {Umathsupshiftdrop} \NC \NR
+\NC \prm {Umathprimewidth}                     \NC the percentage of width that gets added \NC \NR
+\NC \prm {Umathskeweddelimitertolerance}       \NC \NC \NR
+\NC \prm {Umathaccenttopshiftup}               \NC the amount that a top accent is shifted up \NC \NR
+\NC \prm {Umathaccentbottomshiftdown}          \NC the amount that a bottom accent is shifted down \NC \NR
+\NC \prm {Umathaccenttopovershoot}             \NC \NC \NR
+\NC \prm {Umathaccentbottomovershoot}          \NC \NC \NR
+\NC \prm {Umathaccentsuperscriptdrop}          \NC \NC \NR
+\NC \prm {Umathaccentsuperscriptpercent}       \NC \NC \NR
+\NC \prm {Umathaccentextendmargin}             \NC margins added to automatically extended accents \NC \NR
+\NC \prm {Umathflattenedaccenttopshiftup}      \NC the amount that a wide top accent is shifted up \NC \NR
+\NC \prm {Umathflattenedaccentbottomshiftdown} \NC the amount that a wide bottom accent is shifted down \NC \NR
+\NC \prm {Umathdelimiterpercent}               \NC \NC \NR
+\NC \prm {Umathdelimitershortfall}             \NC \NC \NR
+\NC \prm {Umathradicalextensiblebefore}        \NC \NC \NR
+\NC \prm {Umathradicalextensibleafter}         \NC \NC \NR
+\stoptabulate
+
+These relate to the font parameters and in \CONTEXT\ we assign some different
+defaults and tweak them in the goodie files:
+
+\starttabulate[|T|T|c|]
+\DB font parameter                    \BC primitive name                             \BC default   \NC \NR
+\TB
+\NC MinConnectorOverlap               \NC \prm {Umathconnectoroverlapmin}            \NC 0         \NC \NR
+\NC SubscriptShiftDownWithSuperscript \NC \prm {Umathsubsupshiftdown}                \NC inherited \NC \NR
+\NC FractionDelimiterSize             \NC \prm {Umathfractiondelsize}                \NC undefined \NC \NR
+\NC FractionDelimiterDisplayStyleSize \NC \prm {Umathfractiondelsize}                \NC undefined \NC \NR
+\NC NoLimitSubFactor                  \NC \prm {Umathnolimitsupfactor}               \NC 0         \NC \NR
+\NC NoLimitSupFactor                  \NC \prm {Umathnolimitsubfactor}               \NC 0         \NC \NR
+\NC AccentBaseDepth                   \NC \prm {Umathaccentbasedepth}                \NC reserved  \NC \NR
+\NC FlattenedAccentBaseDepth          \NC \prm {Umathflattenedaccentbasedepth}       \NC reserved  \NC \NR
+\NC SpaceBeforeScript                 \NC \prm {Umathspacebeforescript}              \NC 0         \NC \NR
+\NC PrimeRaisePercent                 \NC \prm {Umathprimeraise}                     \NC 0         \NC \NR
+\NC PrimeRaiseComposedPercent         \NC \prm {Umathprimeraisecomposed}             \NC 0         \NC \NR
+\NC PrimeShiftUp                      \NC \prm {Umathprimeshiftup}                   \NC 0         \NC \NR
+\NC PrimeShiftUpCramped               \NC \prm {Umathprimeshiftup}                   \NC 0         \NC \NR
+\NC PrimeSpaceAfter                   \NC \prm {Umathprimespaceafter}                \NC 0         \NC \NR
+\NC PrimeBaselineDropMax              \NC \prm {Umathprimeshiftdrop}                 \NC 0         \NC \NR
+\NC PrimeWidthPercent                 \NC \prm {Umathprimewidth}                     \NC 0         \NC \NR
+\NC SkewedDelimiterTolerance          \NC \prm {Umathskeweddelimitertolerance}       \NC 0         \NC \NR
+\NC AccentTopShiftUp                  \NC \prm {Umathaccenttopshiftup}               \NC undefined \NC \NR
+\NC AccentBottomShiftDown             \NC \prm {Umathaccentbottomshiftdown}          \NC undefined \NC \NR
+\NC AccentTopOvershoot                \NC \prm {Umathaccenttopovershoot}             \NC 0         \NC \NR
+\NC AccentBottomOvershoot             \NC \prm {Umathaccentbottomovershoot}          \NC 0         \NC \NR
+\NC AccentSuperscriptDrop             \NC \prm {Umathaccentsuperscriptdrop}          \NC 0         \NC \NR
+\NC AccentSuperscriptPercent          \NC \prm {Umathaccentsuperscriptpercent}       \NC 0         \NC \NR
+\NC AccentExtendMargin                \NC \prm {Umathaccentextendmargin}             \NC 0         \NC \NR
+\NC FlattenedAccentTopShiftUp         \NC \prm {Umathflattenedaccenttopshiftup}      \NC undefined \NC \NR
+\NC FlattenedAccentBottomShiftDown    \NC \prm {Umathflattenedaccentbottomshiftdown} \NC undefined \NC \NR
+\NC DelimiterPercent                  \NC \prm {Umathdelimiterpercent}               \NC 0         \NC \NR
+\NC DelimiterShortfall                \NC \prm {Umathdelimitershortfall}             \NC 0         \NC \NR
+\stoptabulate
+
+These parameters not only provide a bit more control over rendering, they also
+can be used in compensating issues in font, because no font is perfect. Some are
+the side effects of experiments and they have CamelCase companions in the \type
+{MathConstants} table. For historical reasons the names are a bit inconsistent as
+some originate in \TEX\ so we prefer to keep those names. Not many users will
+mess around with these font parameters anyway. \footnote {I wonder if some names
+should change, so that decision is pending.}
+
 Each of the parameters in this section can be set by a command like this:
 
 \starttyping
@@ -439,10 +1097,37 @@
 they obey grouping, and you can use \type {\the\Umathquad\displaystyle} if
 needed.
 
-\subsection{Font|-|based math parameters}
+There are quite some parameters that can be set and there are eight styles, which means a lot
+of keying in. For that reason is is possible to set parameters groupwise:
 
+\starttabulate[|l|c|c|c|c|c|c|c|c|]
+\DB primitive name               \BC D \BC D' \BC T \BC T' \BC S \BC S' \BC SS \BC SS' \NC \NR
+\TB
+\NC \prm {alldisplaystyles}      \NC$+$\NC$+ $\NC   \NC    \NC   \NC    \NC    \NC     \NC \NR
+\NC \prm {alltextstyles}         \NC   \NC    \NC$+$\NC$+ $\NC   \NC    \NC    \NC     \NC \NR
+\NC \prm {allscriptstyles}       \NC   \NC    \NC   \NC    \NC$+$\NC$+ $\NC    \NC     \NC \NR
+\NC \prm {allscriptscriptstyles} \NC   \NC    \NC   \NC    \NC   \NC    \NC$+ $\NC$+  $\NC \NR
+\NC \prm {allmathstyles}         \NC$+$\NC$+ $\NC$+$\NC$+ $\NC$+$\NC$+ $\NC$+ $\NC$+  $\NC \NR
+\NC \prm {allmainstyles}         \NC   \NC    \NC   \NC    \NC   \NC    \NC    \NC     \NC \NR
+\NC \prm {allsplitstyles}        \NC$+$\NC$+ $\NC$+$\NC$+ $\NC$-$\NC$- $\NC$- $\NC$-  $\NC \NR
+\NC \prm {allunsplitstyles}      \NC   \NC    \NC   \NC    \NC$+$\NC$+ $\NC$+ $\NC$+  $\NC \NR
+\NC \prm {alluncrampedstyles}    \NC$+$\NC    \NC$+$\NC    \NC$+$\NC    \NC$+ $\NC     \NC \NR
+\NC \prm {allcrampedstyles}      \NC   \NC$+ $\NC   \NC$+ $\NC   \NC$+ $\NC    \NC$+  $\NC \NR
+\LL
+\stoptabulate
+
+These groups are especially handy when you set up inter atom spacing, pre- and
+post atom penalties and atom rules.
+
+\stopsubsection
+
+\startsubsection[title={Font|-|based math parameters}]
+
 \topicindex {math+parameters}
 
+We already introduced the font specific math parameters but we tell abit more
+about them and how they relate to the original \TEX\ font dimensions.
+
 While it is nice to have these math parameters available for tweaking, it would
 be tedious to have to set each of them by hand. For this reason, \LUATEX\
 initializes a bunch of these parameters whenever you assign a font identifier to
@@ -467,131 +1152,215 @@
 
 \def\MathLine#1#2#3#4#5%
   {\TB
-   \NC \llap{\high{\tx #2\enspace}}\ttbf \string #1 \NC \tt #5 \NC \NR
+   \NC \llap{\high{\tx #2\enspace}}\ttbf \prm {#1} \NC \tt #5 \NC \NR
    \NC \tx #3 \NC \tt #4 \NC \NR}
 
 \starttabulate[|l|l|]
 \DB variable / style \BC tfm / opentype \NC \NR
-\MathLine{\Umathaxis}               {}   {}                     {AxisHeight}                              {axis_height}
-\MathLine{\Umathoperatorsize}       {6}  {D, D'}                {DisplayOperatorMinHeight}                {\emdash}
-\MathLine{\Umathfractiondelsize}    {9}  {D, D'}                {FractionDelimiterDisplayStyleSize}       {delim1}
-\MathLine{\Umathfractiondelsize}    {9}  {T, T', S, S', SS, SS'}{FractionDelimiterSize}                   {delim2}
-\MathLine{\Umathfractiondenomdown}  {}   {D, D'}                {FractionDenominatorDisplayStyleShiftDown}{denom1}
-\MathLine{\Umathfractiondenomdown}  {}   {T, T', S, S', SS, SS'}{FractionDenominatorShiftDown}            {denom2}
-\MathLine{\Umathfractiondenomvgap}  {}   {D, D'}                {FractionDenominatorDisplayStyleGapMin}   {3*default_rule_thickness}
-\MathLine{\Umathfractiondenomvgap}  {}   {T, T', S, S', SS, SS'}{FractionDenominatorGapMin}               {default_rule_thickness}
-\MathLine{\Umathfractionnumup}      {}   {D, D'}                {FractionNumeratorDisplayStyleShiftUp}    {num1}
-\MathLine{\Umathfractionnumup}      {}   {T, T', S, S', SS, SS'}{FractionNumeratorShiftUp}                {num2}
-\MathLine{\Umathfractionnumvgap}    {}   {D, D'}                {FractionNumeratorDisplayStyleGapMin}     {3*default_rule_thickness}
-\MathLine{\Umathfractionnumvgap}    {}   {T, T', S, S', SS, SS'}{FractionNumeratorGapMin}                 {default_rule_thickness}
-\MathLine{\Umathfractionrule}       {}   {}                     {FractionRuleThickness}                   {default_rule_thickness}
-\MathLine{\Umathskewedfractionhgap} {}   {}                     {SkewedFractionHorizontalGap}             {math_quad/2}
-\MathLine{\Umathskewedfractionvgap} {}   {}                     {SkewedFractionVerticalGap}               {math_x_height}
-\MathLine{\Umathlimitabovebgap}     {}   {}                     {UpperLimitBaselineRiseMin}               {big_op_spacing3}
-\MathLine{\Umathlimitabovekern}     {1}  {}                     {0}                                       {big_op_spacing5}
-\MathLine{\Umathlimitabovevgap}     {}   {}                     {UpperLimitGapMin}                        {big_op_spacing1}
-\MathLine{\Umathlimitbelowbgap}     {}   {}                     {LowerLimitBaselineDropMin}               {big_op_spacing4}
-\MathLine{\Umathlimitbelowkern}     {1}  {}                     {0}                                       {big_op_spacing5}
-\MathLine{\Umathlimitbelowvgap}     {}   {}                     {LowerLimitGapMin}                        {big_op_spacing2}
-\MathLine{\Umathoverdelimitervgap}  {}   {}                     {StretchStackGapBelowMin}                 {big_op_spacing1}
-\MathLine{\Umathoverdelimiterbgap}  {}   {}                     {StretchStackTopShiftUp}                  {big_op_spacing3}
-\MathLine{\Umathunderdelimitervgap} {}   {}                     {StretchStackGapAboveMin}                 {big_op_spacing2}
-\MathLine{\Umathunderdelimiterbgap} {}   {}                     {StretchStackBottomShiftDown}             {big_op_spacing4}
-\MathLine{\Umathoverbarkern}        {}   {}                     {OverbarExtraAscender}                    {default_rule_thickness}
-\MathLine{\Umathoverbarrule}        {}   {}                     {OverbarRuleThickness}                    {default_rule_thickness}
-\MathLine{\Umathoverbarvgap}        {}   {}                     {OverbarVerticalGap}                      {3*default_rule_thickness}
-\MathLine{\Umathquad}               {1}  {}                     {<font_size(f)>}                          {math_quad}
-\MathLine{\Umathradicalkern}        {}   {}                     {RadicalExtraAscender}                    {default_rule_thickness}
-\MathLine{\Umathradicalrule}        {2}  {}                     {RadicalRuleThickness}                    {<not set>}
-\MathLine{\Umathradicalvgap}        {3}  {D, D'}                {RadicalDisplayStyleVerticalGap}          {default_rule_thickness+abs(math_x_height)/4}
-\MathLine{\Umathradicalvgap}        {3}  {T, T', S, S', SS, SS'}{RadicalVerticalGap}                      {default_rule_thickness+abs(default_rule_thickness)/4}
-\MathLine{\Umathradicaldegreebefore}{2}  {}                     {RadicalKernBeforeDegree}                 {<not set>}
-\MathLine{\Umathradicaldegreeafter} {2}  {}                     {RadicalKernAfterDegree}                  {<not set>}
-\MathLine{\Umathradicaldegreeraise} {2,7}{}                     {RadicalDegreeBottomRaisePercent}         {<not set>}
-\MathLine{\Umathspaceafterscript}   {4}  {}                     {SpaceAfterScript}                        {script_space}
-\MathLine{\Umathstackdenomdown}     {}   {D, D'}                {StackBottomDisplayStyleShiftDown}        {denom1}
-\MathLine{\Umathstackdenomdown}     {}   {T, T', S, S', SS, SS'}{StackBottomShiftDown}                    {denom2}
-\MathLine{\Umathstacknumup}         {}   {D, D'}                {StackTopDisplayStyleShiftUp}             {num1}
-\MathLine{\Umathstacknumup}         {}   {T, T', S, S', SS, SS'}{StackTopShiftUp}                         {num3}
-\MathLine{\Umathstackvgap}          {}   {D, D'}                {StackDisplayStyleGapMin}                 {7*default_rule_thickness}
-\MathLine{\Umathstackvgap}          {}   {T, T', S, S', SS, SS'}{StackGapMin}                             {3*default_rule_thickness}
-\MathLine{\Umathsubshiftdown}       {}   {}                     {SubscriptShiftDown}                      {sub1}
-\MathLine{\Umathsubshiftdrop}       {}   {}                     {SubscriptBaselineDropMin}                {sub_drop}
-\MathLine{\Umathsubsupshiftdown}    {8}  {}                     {SubscriptShiftDownWithSuperscript}       {\emdash}
-\MathLine{\Umathsubtopmax}          {}   {}                     {SubscriptTopMax}                         {abs(math_x_height*4)/5}
-\MathLine{\Umathsubsupvgap}         {}   {}                     {SubSuperscriptGapMin}                    {4*default_rule_thickness}
-\MathLine{\Umathsupbottommin}       {}   {}                     {SuperscriptBottomMin}                    {abs(math_x_height/4)}
-\MathLine{\Umathsupshiftdrop}       {}   {}                     {SuperscriptBaselineDropMax}              {sup_drop}
-\MathLine{\Umathsupshiftup}         {}   {D}                    {SuperscriptShiftUp}                      {sup1}
-\MathLine{\Umathsupshiftup}         {}   {T, S, SS,}            {SuperscriptShiftUp}                      {sup2}
-\MathLine{\Umathsupshiftup}         {}   {D', T', S', SS'}      {SuperscriptShiftUpCramped}               {sup3}
-\MathLine{\Umathsupsubbottommax}    {}   {}                     {SuperscriptBottomMaxWithSubscript}       {abs(math_x_height*4)/5}
-\MathLine{\Umathunderbarkern}       {}   {}                     {UnderbarExtraDescender}                  {default_rule_thickness}
-\MathLine{\Umathunderbarrule}       {}   {}                     {UnderbarRuleThickness}                   {default_rule_thickness}
-\MathLine{\Umathunderbarvgap}       {}   {}                     {UnderbarVerticalGap}                     {3*default_rule_thickness}
-\MathLine{\Umathconnectoroverlapmin}{5}  {}                     {MinConnectorOverlap}                     {0}
+\MathLine{Umathaxis}                     {}   {}                     {AxisHeight}                              {axis_height}
+\MathLine{Umathaccentbaseheight}         {}   {}                     {AccentBaseHeight}                        {xheight}
+\MathLine{Umathflattenedaccentbaseheight}{}   {}                     {FlattenedAccentBaseHeight}               {xheight}
+\MathLine{Umathoperatorsize}             {6}  {D, D'}                {DisplayOperatorMinHeight}                {\emdash}
+\MathLine{Umathfractiondelsize}          {9}  {D, D'}                {FractionDelimiterDisplayStyleSize}       {delim1}
+\MathLine{Umathfractiondelsize}          {9}  {T, T', S, S', SS, SS'}{FractionDelimiterSize}                   {delim2}
+\MathLine{Umathfractiondenomdown}        {}   {D, D'}                {FractionDenominatorDisplayStyleShiftDown}{denom1}
+\MathLine{Umathfractiondenomdown}        {}   {T, T', S, S', SS, SS'}{FractionDenominatorShiftDown}            {denom2}
+\MathLine{Umathfractiondenomvgap}        {}   {D, D'}                {FractionDenominatorDisplayStyleGapMin}   {3*default_rule_thickness}
+\MathLine{Umathfractiondenomvgap}        {}   {T, T', S, S', SS, SS'}{FractionDenominatorGapMin}               {default_rule_thickness}
+\MathLine{Umathfractionnumup}            {}   {D, D'}                {FractionNumeratorDisplayStyleShiftUp}    {num1}
+\MathLine{Umathfractionnumup}            {}   {T, T', S, S', SS, SS'}{FractionNumeratorShiftUp}                {num2}
+\MathLine{Umathfractionnumvgap}          {}   {D, D'}                {FractionNumeratorDisplayStyleGapMin}     {3*default_rule_thickness}
+\MathLine{Umathfractionnumvgap}          {}   {T, T', S, S', SS, SS'}{FractionNumeratorGapMin}                 {default_rule_thickness}
+\MathLine{Umathfractionrule}             {}   {}                     {FractionRuleThickness}                   {default_rule_thickness}
+\MathLine{Umathskewedfractionhgap}       {}   {}                     {SkewedFractionHorizontalGap}             {math_quad/2}
+\MathLine{Umathskewedfractionvgap}       {}   {}                     {SkewedFractionVerticalGap}               {math_x_height}
+\MathLine{Umathlimitabovebgap}           {}   {}                     {UpperLimitBaselineRiseMin}               {big_op_spacing3}
+\MathLine{Umathlimitabovekern}           {1}  {}                     {0}                                       {big_op_spacing5}
+\MathLine{Umathlimitabovevgap}           {}   {}                     {UpperLimitGapMin}                        {big_op_spacing1}
+\MathLine{Umathlimitbelowbgap}           {}   {}                     {LowerLimitBaselineDropMin}               {big_op_spacing4}
+\MathLine{Umathlimitbelowkern}           {1}  {}                     {0}                                       {big_op_spacing5}
+\MathLine{Umathlimitbelowvgap}           {}   {}                     {LowerLimitGapMin}                        {big_op_spacing2}
+\MathLine{Umathoverdelimitervgap}        {}   {}                     {StretchStackGapBelowMin}                 {big_op_spacing1}
+\MathLine{Umathoverdelimiterbgap}        {}   {}                     {StretchStackTopShiftUp}                  {big_op_spacing3}
+\MathLine{Umathunderdelimitervgap}       {}   {}                     {StretchStackGapAboveMin}                 {big_op_spacing2}
+\MathLine{Umathunderdelimiterbgap}       {}   {}                     {StretchStackBottomShiftDown}             {big_op_spacing4}
+\MathLine{Umathoverbarkern}              {}   {}                     {OverbarExtraAscender}                    {default_rule_thickness}
+\MathLine{Umathoverbarrule}              {}   {}                     {OverbarRuleThickness}                    {default_rule_thickness}
+\MathLine{Umathoverbarvgap}              {}   {}                     {OverbarVerticalGap}                      {3*default_rule_thickness}
+\MathLine{Umathquad}                     {1}  {}                     {<font_size(f)>}                          {math_quad}
+\MathLine{Umathradicalkern}              {}   {}                     {RadicalExtraAscender}                    {default_rule_thickness}
+\MathLine{Umathradicalrule}              {2}  {}                     {RadicalRuleThickness}                    {<not set>}
+\MathLine{Umathradicalvgap}              {3}  {D, D'}                {RadicalDisplayStyleVerticalGap}          {default_rule_thickness+abs(math_x_height)/4}
+\MathLine{Umathradicalvgap}              {3}  {T, T', S, S', SS, SS'}{RadicalVerticalGap}                      {default_rule_thickness+abs(default_rule_thickness)/4}
+\MathLine{Umathradicaldegreebefore}      {2}  {}                     {RadicalKernBeforeDegree}                 {<not set>}
+\MathLine{Umathradicaldegreeafter}       {2}  {}                     {RadicalKernAfterDegree}                  {<not set>}
+\MathLine{Umathradicaldegreeraise}       {2,7}{}                     {RadicalDegreeBottomRaisePercent}         {<not set>}
+\MathLine{Umathspaceafterscript}         {4}  {}                     {SpaceAfterScript}                        {script_space}
+\MathLine{Umathstackdenomdown}           {}   {D, D'}                {StackBottomDisplayStyleShiftDown}        {denom1}
+\MathLine{Umathstackdenomdown}           {}   {T, T', S, S', SS, SS'}{StackBottomShiftDown}                    {denom2}
+\MathLine{Umathstacknumup}               {}   {D, D'}                {StackTopDisplayStyleShiftUp}             {num1}
+\MathLine{Umathstacknumup}               {}   {T, T', S, S', SS, SS'}{StackTopShiftUp}                         {num3}
+\MathLine{Umathstackvgap}                {}   {D, D'}                {StackDisplayStyleGapMin}                 {7*default_rule_thickness}
+\MathLine{Umathstackvgap}                {}   {T, T', S, S', SS, SS'}{StackGapMin}                             {3*default_rule_thickness}
+\MathLine{Umathsubshiftdown}             {}   {}                     {SubscriptShiftDown}                      {sub1}
+\MathLine{Umathsubshiftdrop}             {}   {}                     {SubscriptBaselineDropMin}                {sub_drop}
+\MathLine{Umathsubsupshiftdown}          {8}  {}                     {SubscriptShiftDownWithSuperscript}       {\emdash}
+\MathLine{Umathsubtopmax}                {}   {}                     {SubscriptTopMax}                         {abs(math_x_height*4)/5}
+\MathLine{Umathsubsupvgap}               {}   {}                     {SubSuperscriptGapMin}                    {4*default_rule_thickness}
+\MathLine{Umathsupbottommin}             {}   {}                     {SuperscriptBottomMin}                    {abs(math_x_height/4)}
+\MathLine{Umathsupshiftdrop}             {}   {}                     {SuperscriptBaselineDropMax}              {sup_drop}
+\MathLine{Umathsupshiftup}               {}   {D}                    {SuperscriptShiftUp}                      {sup1}
+\MathLine{Umathsupshiftup}               {}   {T, S, SS,}            {SuperscriptShiftUp}                      {sup2}
+\MathLine{Umathsupshiftup}               {}   {D', T', S', SS'}      {SuperscriptShiftUpCramped}               {sup3}
+\MathLine{Umathsupsubbottommax}          {}   {}                     {SuperscriptBottomMaxWithSubscript}       {abs(math_x_height*4)/5}
+\MathLine{Umathunderbarkern}             {}   {}                     {UnderbarExtraDescender}                  {default_rule_thickness}
+\MathLine{Umathunderbarrule}             {}   {}                     {UnderbarRuleThickness}                   {default_rule_thickness}
+\MathLine{Umathunderbarvgap}             {}   {}                     {UnderbarVerticalGap}                     {3*default_rule_thickness}
+\MathLine{Umathconnectoroverlapmin}      {5}  {}                     {MinConnectorOverlap}                     {0}
 \LL
 \stoptabulate
 
-Note 1: \OPENTYPE\ fonts set \lpr {Umathlimitabovekern} and \lpr
-{Umathlimitbelowkern} to zero and set \lpr {Umathquad} to the font size of the
-used font, because these are not supported in the \type {MATH} table,
+A few notes:
 
-Note 2: Traditional \TFM\ fonts do not set \lpr {Umathradicalrule} because
-\TEX82\ uses the height of the radical instead. When this parameter is indeed not
-set when \LUATEX\ has to typeset a radical, a backward compatibility mode will
-kick in that assumes that an oldstyle \TEX\ font is used. Also, they do not set
-\lpr {Umathradicaldegreebefore}, \lpr {Umathradicaldegreeafter}, and \lpr
-{Umathradicaldegreeraise}. These are then automatically initialized to
-$5/18$quad, $-10/18$quad, and 60.
+\startitemize[n]
 
-Note 3: If \TFM\ fonts are used, then the \lpr {Umathradicalvgap} is not set
-until the first time \LUATEX\ has to typeset a formula because this needs
-parameters from both family~2 and family~3. This provides a partial backward
-compatibility with \TEX82, but that compatibility is only partial: once the \lpr
-{Umathradicalvgap} is set, it will not be recalculated any more.
+\startitem
+    \OPENTYPE\ fonts set \prm {Umathlimitabovekern} and \prm
+    {Umathlimitbelowkern} to zero and set \prm {Umathquad} to the font size of
+    the used font, because these are not supported in the \type {MATH} table.
+\stopitem
 
-Note 4: When \TFM\ fonts are used a similar situation arises with respect to \lpr
-{Umathspaceafterscript}: it is not set until the first time \LUATEX\ has to
-typeset a formula. This provides some backward compatibility with \TEX82. But
-once the \lpr {Umathspaceafterscript} is set, \prm {scriptspace} will never be
-looked at again.
+\startitem
+    Traditional \TFM\ fonts do not set \prm {Umathradicalrule} because \TEX82\
+    uses the height of the radical instead. When this parameter is indeed not set
+    when \LUATEX\ has to typeset a radical, a backward compatibility mode will
+    kick in that assumes that an oldstyle \TEX\ font is used. Also, they do not
+    set \prm {Umathradicaldegreebefore}, \prm {Umathradicaldegreeafter}, and \prm
+    {Umathradicaldegreeraise}. These are then automatically initialized to
+    $5/18$quad, $-10/18$quad, and 60.
+\stopitem
 
-Note 5: Traditional \TFM\ fonts set \lpr {Umathconnectoroverlapmin} to zero
-because \TEX82\ always stacks extensibles without any overlap.
+\startitem
+    If \TFM\ fonts are used, then the \prm {Umathradicalvgap} is not set until
+    the first time \LUATEX\ has to typeset a formula because this needs
+    parameters from both family~2 and family~3. This provides a partial backward
+    compatibility with \TEX82, but that compatibility is only partial: once the
+    \prm {Umathradicalvgap} is set, it will not be recalculated any more.
+\stopitem
 
-Note 6: The \lpr {Umathoperatorsize} is only used in \prm {displaystyle}, and is
-only set in \OPENTYPE\ fonts. In \TFM\ font mode, it is artificially set to one
-scaled point more than the initial attempt's size, so that always the \quote
-{first next} will be tried, just like in \TEX82.
+\startitem
+    When \TFM\ fonts are used a similar situation arises with respect to \prm
+    {Umathspaceafterscript}: it is not set until the first time \LUATEX\ has to
+    typeset a formula. This provides some backward compatibility with \TEX82. But
+    once the \prm {Umathspaceafterscript} is set, \prm {scriptspace} will never
+    be looked at again.
+\stopitem
 
-Note 7: The \lpr {Umathradicaldegreeraise} is a special case because it is the
-only parameter that is expressed in a percentage instead of a number of scaled
-points.
+\startitem
+    Traditional \TFM\ fonts set \prm {Umathconnectoroverlapmin} to zero because
+    \TEX82\ always stacks extensibles without any overlap.
+\stopitem
 
-Note 8: \type {SubscriptShiftDownWithSuperscript} does not actually exist in the
-\quote {standard} \OPENTYPE\ math font Cambria, but it is useful enough to be
-added.
+\startitem
+    The \prm {Umathoperatorsize} is only used in \prm {displaystyle}, and is only
+    set in \OPENTYPE\ fonts. In \TFM\ font mode, it is artificially set to one
+    scaled point more than the initial attempt's size, so that always the \quote
+    {first next} will be tried, just like in \TEX82.
+\stopitem
 
-Note 9: \type {FractionDelimiterDisplayStyleSize} and \type
-{FractionDelimiterSize} do not actually exist in the \quote {standard} \OPENTYPE\
-math font Cambria, but were useful enough to be added.
+\startitem
+    The \prm {Umathradicaldegreeraise} is a special case because it is the only
+    parameter that is expressed in a percentage instead of a number of scaled
+    points.
+\stopitem
 
+\startitem
+    \type {SubscriptShiftDownWithSuperscript} does not actually exist in the
+    \quote {standard} \OPENTYPE\ math font Cambria, but it is useful enough to be
+    added.
+\stopitem
+
+\startitem
+    \type {FractionDelimiterDisplayStyleSize} and \type {FractionDelimiterSize}
+    do not actually exist in the \quote {standard} \OPENTYPE\ math font Cambria,
+    but were useful enough to be added.
+\stopitem
+
+\stopitemize
+
+As this mostly refers to \LUATEX\ there is more to tell about how \LUAMETATEX\
+deals with it. However, it is enough to know that much more behavior is
+configurable.
+
+You can let the engine ignore parameter with \prm {setmathignore}, like:
+
+\starttyping
+\setmathignore \Umathspacebeforescript 1
+\setmathignore \Umathspaceafterscript  1
+\stoptyping
+
+Be aware of the fact that a global setting can get unnoticed by users because
+there is no warning that some parameter is ignored.
+
+\stopsubsection
+
 \stopsection
 
+\startsection[title={Extra parameters}]
+
+\startsubsection[title={Style related parameters}]
+
+There are a couple of parameters that don't relate to the font but are more generally
+influencing the appearances. Some were added for experimenting.
+
+\starttabulate[|l|l|]
+\DB primitive \BC meaning \NC \NR
+\prm {Umathextrasubpreshift}    \NC \NR
+\prm {Umathextrasubprespace}    \NC \NR
+\prm {Umathextrasubshift}       \NC \NR
+\prm {Umathextrasubspace}       \NC \NR
+\prm {Umathextrasuppreshift}    \NC \NR
+\prm {Umathextrasupprespace}    \NC \NR
+\prm {Umathextrasupshift}       \NC \NR
+\prm {Umathextrasupspace}       \NC \NR
+\prm {Umathsubshiftdistance}    \NC \NR
+\prm {Umathsupshiftdistance}    \NC \NR
+\prm {Umathpresubshiftdistance} \NC \NR
+\prm {Umathpresupshiftdistance} \NC \NR
+\prm {Umathprimeshiftdrop}      \NC \NR
+\LL
+\stoptabulate
+
+\stopsubsection
+
+\startsubsection[title={Math struts}]
+
+Todo:
+
+\starttabulate[|l|l|]
+\DB primitive \BC meaning \NC \NR
+\NC \prm {Umathruleheight} \NC \NR
+\NC \prm {Umathruledepth}  \NC \NR
+\LL
+\stoptabulate
+
+\stopsubsection
+
+\stopsection
+
 \startsection[title={Math spacing}]
 
-\subsection{Setting inline surrounding space with \lpr {mathsurround[skip]}}
+\startsubsection[reference=spacing:surround,title={Setting inline surrounding space with \prm {mathsurround} and \prm {mathsurroundskip}}]
 
 \topicindex {math+spacing}
 
 Inline math is surrounded by (optional) \prm {mathsurround} spacing but that is a fixed
-dimension. There is now an additional parameter \lpr {mathsurroundskip}. When set to a
+dimension. There is now an additional parameter \prm {mathsurroundskip}. When set to a
 non|-|zero value (or zero with some stretch or shrink) this parameter will replace
 \prm {mathsurround}. By using an additional parameter instead of changing the nature
 of \prm {mathsurround}, we can remain compatible. In the meantime a bit more
-control has been added via \lpr {mathsurroundmode}. This directive can take 6 values
-with zero being the default behaviour.
+control has been added via \prm {mathsurroundmode}. This directive can take 6 values
+with zero being the default behavior.
 
 \start
 
@@ -614,14 +1383,14 @@
 \starttabulate[|c|c|c|pl|]
 \DB mode \BC x\$x\$x \BC x \$x\$ x \BC effect \NC \NR
 \TB
-\OneLiner{0}{obey \prm {mathsurround} when \lpr {mathsurroundskip} is 0pt}
+\OneLiner{0}{obey \prm {mathsurround} when \prm {mathsurroundskip} is 0pt}
 \OneLiner{1}{only add skip to the left}
 \OneLiner{2}{only add skip to the right}
 \OneLiner{3}{add skip to the left and right}
 \OneLiner{4}{ignore the skip setting, obey \prm {mathsurround}}
 \OneLiner{5}{disable all spacing around math}
-\OneLiner{6}{only apply \lpr {mathsurroundskip} when also spacing}
-\OneLiner{7}{only apply \lpr {mathsurroundskip} when no spacing}
+\OneLiner{6}{only apply \prm {mathsurroundskip} when also spacing}
+\OneLiner{7}{only apply \prm {mathsurroundskip} when no spacing}
 \LL
 \stoptabulate
 
@@ -637,107 +1406,112 @@
 math nodes. Also, method 6 and 7 will zero the skip related fields in a node when
 applicable in the first occasion that checks them (linebreaking or packaging).
 
-\subsection{Pairwise spacing and \lpr {Umath...spacing} commands}
+\stopsubsection
 
+\startsubsection[title={Pairwise spacing}]
+
 \topicindex {math+spacing}
 
-Besides the parameters mentioned in the previous sections, there are also 64 new
+Besides the parameters mentioned in the previous sections, there are also
 primitives to control the math spacing table (as explained in Chapter~18 of the
-\TEX book). The primitive names are a simple matter of combining two math atom
-types, but for completeness' sake, here is the whole list:
+\TEX book). This happens per class pair. Because we have many possible classes,
+we no longer have the many primitives that \LUATEX\ has but you can define then
+using the generic \prm {setmathspacing} primitive:
 
-\starttwocolumns
-\startlines
-\lpr {Umathordordspacing}
-\lpr {Umathordopspacing}
-\lpr {Umathordbinspacing}
-\lpr {Umathordrelspacing}
-\lpr {Umathordopenspacing}
-\lpr {Umathordclosespacing}
-\lpr {Umathordpunctspacing}
-\lpr {Umathordinnerspacing}
-\lpr {Umathopordspacing}
-\lpr {Umathopopspacing}
-\lpr {Umathopbinspacing}
-\lpr {Umathoprelspacing}
-\lpr {Umathopopenspacing}
-\lpr {Umathopclosespacing}
-\lpr {Umathoppunctspacing}
-\lpr {Umathopinnerspacing}
-\lpr {Umathbinordspacing}
-\lpr {Umathbinopspacing}
-\lpr {Umathbinbinspacing}
-\lpr {Umathbinrelspacing}
-\lpr {Umathbinopenspacing}
-\lpr {Umathbinclosespacing}
-\lpr {Umathbinpunctspacing}
-\lpr {Umathbininnerspacing}
-\lpr {Umathrelordspacing}
-\lpr {Umathrelopspacing}
-\lpr {Umathrelbinspacing}
-\lpr {Umathrelrelspacing}
-\lpr {Umathrelopenspacing}
-\lpr {Umathrelclosespacing}
-\lpr {Umathrelpunctspacing}
-\lpr {Umathrelinnerspacing}
-\lpr {Umathopenordspacing}
-\lpr {Umathopenopspacing}
-\lpr {Umathopenbinspacing}
-\lpr {Umathopenrelspacing}
-\lpr {Umathopenopenspacing}
-\lpr {Umathopenclosespacing}
-\lpr {Umathopenpunctspacing}
-\lpr {Umathopeninnerspacing}
-\lpr {Umathcloseordspacing}
-\lpr {Umathcloseopspacing}
-\lpr {Umathclosebinspacing}
-\lpr {Umathcloserelspacing}
-\lpr {Umathcloseopenspacing}
-\lpr {Umathcloseclosespacing}
-\lpr {Umathclosepunctspacing}
-\lpr {Umathcloseinnerspacing}
-\lpr {Umathpunctordspacing}
-\lpr {Umathpunctopspacing}
-\lpr {Umathpunctbinspacing}
-\lpr {Umathpunctrelspacing}
-\lpr {Umathpunctopenspacing}
-\lpr {Umathpunctclosespacing}
-\lpr {Umathpunctpunctspacing}
-\lpr {Umathpunctinnerspacing}
-\lpr {Umathinnerordspacing}
-\lpr {Umathinneropspacing}
-\lpr {Umathinnerbinspacing}
-\lpr {Umathinnerrelspacing}
-\lpr {Umathinneropenspacing}
-\lpr {Umathinnerclosespacing}
-\lpr {Umathinnerpunctspacing}
-\lpr {Umathinnerinnerspacing}
-\stoplines
-\stoptwocolumns
+\starttyping
+\def\Umathordordspacing     {\setmathspacing 0 0 }
+\def\Umathordordopenspacing {\setmathspacing 0 4 }
+\stoptyping
 
-These parameters are of type \prm {muskip}, so setting a parameter can be done
-like this:
+These parameters are (normally) of type \prm {muskip}, so setting a parameter can
+be done like this:
 
 \starttyping
-\Umathopordspacing\displaystyle=4mu plus 2mu
+\setmathspacing 1 0 \displaystyle=4mu plus 2mu % op ord Umathopordspacing
 \stoptyping
 
-They are all initialized by \type {initex} to the values mentioned in the table
-in Chapter~18 of the \TEX book.
+The atom pairs known by the engine are all initialized by \type {initex} to the
+values mentioned in the table in Chapter~18 of the \TEX book.
 
-Note 1: For ease of use as well as for backward compatibility, \prm {thinmuskip},
-\prm {medmuskip} and \prm {thickmuskip} are treated specially. In their case a
-pointer to the corresponding internal parameter is saved, not the actual \prm
-{muskip} value. This means that any later changes to one of these three
-parameters will be taken into account.
+For ease of use as well as for backward compatibility, \prm {thinmuskip}, \prm
+{medmuskip} and \prm {thickmuskip} are treated specially. In their case a pointer
+to the corresponding internal parameter is saved, not the actual \prm {muskip}
+value. This means that any later changes to one of these three parameters will be
+taken into account. As a bonus we also introduced the \prm {tinymuskip} and \prm
+{pettymuskip} primitives, just because we consider these fundamental, but they
+are not assigned internally to atom spacing combinations.
 
-Note 2: Careful readers will realise that there are also primitives for the items
-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.
+In \LUAMETATEX\ we go a bit further. Any named dimension, glue and mu glue
+register as well as the constants with these properties can be bound to a pair by
+prefixing \prm {setmathspacing} by \prm {inherited}.
 
-\subsection{Local \lpr {frozen} settings with}
+Careful readers will realize that there are also primitives for the items marked
+\type {*} in the \TEX book. These will actually be used because we pose no
+restrictions. However, you can enforce the remapping rules to conform to the
+rules of \TEX\ (or yourself).
 
+Every class has a set of spacing parameters and the more classes you define the more
+pairwise spacing you need to define. However, you can default to an existing class.
+By default all spacing is zero and you can get rid of the defaults inherited from
+good old \TEX\ with \prm {resetmathspacing}. You can alias class spacing to an exiting
+class with \prm {letmathspacing}:
+
+\starttyping
+\letmathspacing class displayclass textclass scriptclass scriptscriptclass
+\stoptyping
+
+Instead you can copy spacing with \prm {copymathspacing}:
+
+\starttyping
+\copymathspacing class parentclass
+\stoptyping
+
+Specific paring happens with \prm {setmathspacing}:
+
+\starttyping
+\setmathspacing leftclass rightclass style value
+\stoptyping
+
+Unless we have a frozen parameter, the prefix \prm {inherited} makes it possible
+to have a more dynamic relationship: the used value resolves to the current value
+of the given register. Possible values are the usual mu skip register, a regular
+skip or dimension register, or just some mu skip value.
+
+A similar set of primitives deals with rules. These remap pairs onto other pairs, so
+\prm {setmathatomrule} looks like:
+
+\starttyping
+\setmathatomrule oldleftclass oldrightclass newleftclass newrightclass
+\stoptyping
+
+The \prm {letmathatomrule} and \prm {copymathatomrule} primitives take two
+classes where the second is the parent.
+
+Some primitives are still experimental and might evolve, like \prm
+{letmathparent} and \prm {copymathparent} that take numbers as in:
+
+\starttyping
+\letmathatomrule class spacingclass prepenaltyclass postpenaltyclass options reserved
+\stoptyping
+
+Primitives like this were used when experimenting and when re use them in \CONTEXT\
+eventually they will become stable.
+
+The \prm {setmathprepenalty} and \prm {setmathpostpenalty} primitives take a
+class and penalty (integer) value. These are injected before and after atoms with
+the given class where a penalty of 10000 is a signal to ignore it.
+
+The engine control options for a class can be set with \prm {setmathoptions}. The
+possible options are discussed elsewhere. This primitive takes a class number and
+an integer (bitset). For all these setters the \CONTEXT\ math setup gives examples.
+
+\stopsubsection
+
+% \setdefaultmathcodes
+% \setmathignore        parameter
+
+\startsubsection[title={Local \prm {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
 preceding argument. There are often lots of curly braces used in math and these
@@ -777,232 +1551,99 @@
 
 \blank \getbuffer \blank
 
-\subsection{Checking a state with \lpr {ifmathparameter}}
+\stopsubsection
 
-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:
+\startsubsection[title={Arbitrary atoms with \prm {mathatom} etc.}]
 
-\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
+The original \TEX\ engine has primitives like \prm {mathord} and a limited set of
+possible atoms. In \LUAMETATEX\ we have many more built in and you can add more.
+It will take a while before we have documented all the new math features and more
+details can be found in the manuals that come with \CONTEXT\ for which all this
+was implemented. In addition to \prm {mathordinary} (aka \prm {mathord}), \prm
+{mathoperator} (aka \prm {mathop}), \prm {mathbinary} (aka \prm {mathbin}), \prm
+{mathrelation} (aka \prm {mathrel}), \prm {mathopen}, \prm {mathclose}, \prm
+{mathpunctuation} (aka {mathpunct}) and \prm {mathinner} we have \prm
+{mathfraction}, \prm {mathradical}, \prm {mathmiddle}, \prm {mathaccent}, \prm
+{mathfenced}, \prm {mathghost} and the existing \prm {mathunderline} (aka \prm
+{underline}) and \prm {mathoverline} (aka \prm {overline}) class driven atoms.
 
-\subsection{Skips around display math and \lpr {mathdisplayskipmode}}
+The \prm {mathatom} primitive is the generic one and it accepts a couple of
+keywords:
 
-\topicindex {math+spacing}
-
-The injection of \prm {abovedisplayskip} and \prm {belowdisplayskip} is not
-symmetrical. An above one is always inserted, also when zero, but the below is
-only inserted when larger than zero. Especially the latter makes it sometimes hard
-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
+\starttabulate[|lT|l|l|]
+\DB keyword    \BC argument \NC meaning \NC \NR
 \TB
-\NC 0 \NC normal \TEX\ behaviour \NC \NR
-\NC 1 \NC always (same as 0) \NC \NR
-\NC 2 \NC only when not zero \NC \NR
-\NC 3 \NC never, not even when not zero \NC \NR
+\NC attr       \NC int int \NC attributes to be applied to this atom \NC \NR
+\NC leftclass  \NC class   \NC the left edge class that determines spacing etc \NC \NR
+\NC rightclass \NC class   \NC the right edge class that determines spacing etc \NC \NR
+\NC class      \NC class   \NC the general class \NC \NR
+\NC unpack     \NC         \NC unpack this atom in inline math \NC \NR
+\NC source     \NC int     \NC a symbolic index of the resulting box \NC \NR
+\NC textfont   \NC         \NC use the current text font \NC \NR
+\NC mathfont   \NC         \NC use the current math font \NC \NR
+\NC limits     \NC         \NC put scripts on top and below \NC \NR
+\NC nolimits   \NC         \NC force scripts to be postscripts \NC \NR
+\NC nooverflow \NC         \NC keep (extensible) within target dimensions \NC \NR
+\NC options    \NC int     \NC bitset with options \NC \NR
+\NC void       \NC         \NC discard content and ignore dimensions \NC \NR
+\NC phantom    \NC         \NC discard content but retain dimensions \NC \NR
 \LL
 \stoptabulate
 
-\subsection {Nolimit correction with \lpr {mathnolimitsmode}}
+To what extend the options kick in depends on the class as well where and how the
+atom is used.
 
-\topicindex {math+limits}
+The original \TEX\ engines has three atom modifiers: \prm {displaylimits}, \prm
+{limits}, and \prm {nolimits}. These look back to the last atom and set a limit
+related signal. Just to be consistent we have some more of that: \prm
+{Umathadapttoleft}, \prm {Umathadapttoright}, \prm {Umathuseaxis}, \prm
+{Umathnoaxis}, \prm {Umathphantom}, \prm {Umathvoid}, \prm {Umathsource}, \prm
+{Umathopenupheight}, \prm {Umathopenupdepth}, \prm {Umathlimits}, \prm
+{Umathnolimits}. The last two are equivalent to the lowercase ones with the
+similar names. Al these modifiers are cheap primitives and one can wonder if they
+are needed but that also now also applies to the original three. We could stick
+to one modifier that takes an integer but let's not diverge too much from the
+original concept.
 
-There are two extra math parameters \lpr {Umathnolimitsupfactor} and \lpr
-{Umathnolimitsubfactor} that were added to provide some control over how limits
-are spaced (for example the position of super and subscripts after integral
-operators). They relate to an extra parameter \lpr {mathnolimitsmode}. The half
-corrections are what happens when scripts are placed above and below. The
-problem with italic corrections is that officially that correction italic is used
-for above|/|below placement while advanced kerns are used for placement at the
-right end. The question is: how often is this implemented, and if so, do the
-kerns assume correction too. Anyway, with this parameter one can control it.
+The \prm {nonscript} primitive injects a glue node that signals that the next
+glue is to be ignored when we are in script or scriptscript mode. The \prm
+{noatomruling} does the same but this time the signal is that no inter|-|atom
+rules need to be applied.
 
-\starttabulate[|l|ck1|ck1|ck1|ck1|ck1|ck1|]
-    \NC
-        \NC \mathnolimitsmode0    $\displaystyle\int\nolimits^0_1$
-        \NC \mathnolimitsmode1    $\displaystyle\int\nolimits^0_1$
-        \NC \mathnolimitsmode2    $\displaystyle\int\nolimits^0_1$
-        \NC \mathnolimitsmode3    $\displaystyle\int\nolimits^0_1$
-        \NC \mathnolimitsmode4    $\displaystyle\int\nolimits^0_1$
-        \NC \mathnolimitsmode8000 $\displaystyle\int\nolimits^0_1$
-    \NC \NR
-    \TB
-    \BC mode
-        \NC \tttf 0
-        \NC \tttf 1
-        \NC \tttf 2
-        \NC \tttf 3
-        \NC \tttf 4
-        \NC \tttf 8000
-    \NC \NR
-    \BC superscript
-        \NC 0
-        \NC font
-        \NC 0
-        \NC 0
-        \NC +ic/2
-        \NC 0
-    \NC \NR
-    \BC subscript
-        \NC -ic
-        \NC font
-        \NC 0
-        \NC -ic/2
-        \NC -ic/2
-        \NC 8000ic/1000
-    \NC \NR
-\stoptabulate
+\stopsubsection
 
-When the mode is set to one, the math parameters are used. This way a macro
-package writer can decide what looks best. Given the current state of fonts in
-\CONTEXT\ we currently use mode 1 with factor 0 for the superscript and 750 for
-the subscripts. Positive values are used for both parameters but the subscript
-shifts to the left. A \lpr {mathnolimitsmode} larger that 15 is considered to
-be a factor for the subscript correction. This feature can be handy when
-experimenting.
+\startsubsection[title={Checking a state with \prm {ifmathparameter}}]
 
-\subsection {Controlling math italic mess with \lpr {mathitalicsmode}}
+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: \prm
+{ifmathparameter}. This test primitive behaves like an \prm {ifcase}, with:
 
-\topicindex {math+italics}
-
-The \lpr {mathitalicsmode} parameter can be set to~1 to force italic correction
-before noads that represent some more complex structure (read: everything
-that is not an ord, bin, rel, open, close, punct or inner). We show a Cambria
-example.
-
-\starttexdefinition Whatever #1
-    \NC \type{\mathitalicsmode = #1}
-    \NC \mathitalicsmode#1\ruledhbox{$\left|T^1\right|$}
-    \NC \mathitalicsmode#1\ruledhbox{$\left|T\right|$}
-    \NC \mathitalicsmode#1\ruledhbox{$T+1$}
-    \NC \mathitalicsmode#1\ruledhbox{$T{1\over2}$}
-    \NC \mathitalicsmode#1\ruledhbox{$T\sqrt{1}$}
-    \NC \NR
-\stoptexdefinition
-
-\start
-    \switchtobodyfont[cambria]
-    \starttabulate[|c|c|c|c|c|c|]
-        \Whatever{0}%
-        \Whatever{1}%
-    \stoptabulate
-\stop
-
-This kind of parameters relate to the fact that italic correction in \OPENTYPE\
-math is bound to fuzzy rules. So, control is the solution.
-
-\subsection {Influencing script kerning with \lpr {mathscriptboxmode}}
-
-\topicindex {math+kerning}
-\topicindex {math+scripts}
-
-If you want to typeset text in math macro packages often provide something \type
-{\text} which obeys the script sizes. As the definition can be anything there is
-a good chance that the kerning doesn't come out well when used in a script. Given
-that the first glyph ends up in an \prm {hbox} we have some control over this.
-And, as a bonus we also added control over the normal sublist kerning. The \lpr
-{mathscriptboxmode} parameter defaults to~1.
-
 \starttabulate[|c|l|]
-\DB value     \BC meaning \NC \NR
+\DB value \BC meaning \NC \NR
 \TB
-\NC \type {0} \NC forget about kerning \NC \NR
-\NC \type {1} \NC kern math sub lists with a valid glyph \NC \NR
-\NC \type {2} \NC also kern math sub boxes that have a valid glyph \NC \NR
-\NC \type {3} \NC only kern math sub boxes with a boundary node present\NC \NR
+\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
 
-Here we show some examples. Of course this doesn't solve all our problems, if
-only because some fonts have characters with bounding boxes that compensate for
-italics, while other fonts can lack kerns.
+\stopsubsection
 
-\startbuffer[1]
-    $T_{\tf fluff}$
-\stopbuffer
+\startsubsection[title={Forcing fixed scripts with \prm {mathscriptsmode}}]
 
-\startbuffer[2]
-    $T_{\text{fluff}}$
-\stopbuffer
-
-\startbuffer[3]
-    $T_{\text{\boundary1 fluff}}$
-\stopbuffer
-
-\unexpanded\def\Show#1#2#3%
-  {\doifelsenothing{#3}
-     {\small\tx\typeinlinebuffer[#1]}
-     {\doifelse{#3}{-}
-        {\small\bf\tt mode #2}
-        {\switchtobodyfont[#3]\showfontkerns\showglyphs\mathscriptboxmode#2\relax\inlinebuffer[#1]}}}
-
-\starttabulate[|lBT|c|c|c|c|c|]
-    \NC          \NC \Show{1}{0}{}         \NC\Show{1}{1}{}         \NC \Show{2}{1}{}         \NC \Show{2}{2}{}         \NC \Show{3}{3}{}         \NC \NR
-    \NC          \NC \Show{1}{0}{-}        \NC\Show{1}{1}{-}        \NC \Show{2}{1}{-}        \NC \Show{2}{2}{-}        \NC \Show{3}{3}{-}        \NC \NR
-    \NC modern   \NC \Show{1}{0}{modern}   \NC\Show{1}{1}{modern}   \NC \Show{2}{1}{modern}   \NC \Show{2}{2}{modern}   \NC \Show{3}{3}{modern}   \NC \NR
-    \NC lucidaot \NC \Show{1}{0}{lucidaot} \NC\Show{1}{1}{lucidaot} \NC \Show{2}{1}{lucidaot} \NC \Show{2}{2}{lucidaot} \NC \Show{3}{3}{lucidaot} \NC \NR
-    \NC pagella  \NC \Show{1}{0}{pagella}  \NC\Show{1}{1}{pagella}  \NC \Show{2}{1}{pagella}  \NC \Show{2}{2}{pagella}  \NC \Show{3}{3}{pagella}  \NC \NR
-    \NC cambria  \NC \Show{1}{0}{cambria}  \NC\Show{1}{1}{cambria}  \NC \Show{2}{1}{cambria}  \NC \Show{2}{2}{cambria}  \NC \Show{3}{3}{cambria}  \NC \NR
-    \NC dejavu   \NC \Show{1}{0}{dejavu}   \NC\Show{1}{1}{dejavu}   \NC \Show{2}{1}{dejavu}   \NC \Show{2}{2}{dejavu}   \NC \Show{3}{3}{dejavu}   \NC \NR
-\stoptabulate
-
-Kerning between a character subscript is controlled by \lpr {mathscriptcharmode}
-which also defaults to~1.
-
-Here is another example. Internally we tag kerns as italic kerns or font kerns
-where font kerns result from the staircase kern tables. In 2018 fonts like Latin
-Modern and Pagella rely on cheats with the boundingbox, Cambria uses staircase
-kerns and Lucida a mixture. Depending on how fonts evolve we might add some more
-control over what one can turn on and off.
-
-\def\MathSample#1#2#3%
-  {\NC
-   #1 \NC
-   #2 \NC
-   \showglyphdata \switchtobodyfont[#2,17.3pt]$#3T_{f}$         \NC
-   \showglyphdata \switchtobodyfont[#2,17.3pt]$#3\gamma_{e}$    \NC
-   \showglyphdata \switchtobodyfont[#2,17.3pt]$#3\gamma_{ee}$   \NC
-   \showglyphdata \switchtobodyfont[#2,17.3pt]$#3T_{\tf fluff}$ \NC
-   \NR}
-
-\starttabulate[|Tl|Tl|l|l|l|l|]
-    \FL
-    \MathSample{normal}{modern}  {\mr}
-    \MathSample{}      {pagella} {\mr}
-    \MathSample{}      {cambria} {\mr}
-    \MathSample{}      {lucidaot}{\mr}
-    \ML
-    \MathSample{bold}  {modern}  {\mb}
-    \MathSample{}      {pagella} {\mb}
-    \MathSample{}      {cambria} {\mb}
-    \MathSample{}      {lucidaot}{\mb}
-    \LL
-\stoptabulate
-
-\subsection{Forcing fixed scripts with \lpr {mathscriptsmode}}
-
 We have three parameters that are used for this fixed anchoring:
 
 \starttabulate[|c|l|]
 \DB parameter \BC register \NC \NR
-\NC $d$ \NC \lpr {Umathsubshiftdown}    \NC \NR
-\NC $u$ \NC \lpr {Umathsupshiftup}      \NC \NR
-\NC $s$ \NC \lpr {Umathsubsupshiftdown} \NC \NR
+\NC $d$ \NC \prm {Umathsubshiftdown}    \NC \NR
+\NC $u$ \NC \prm {Umathsupshiftup}      \NC \NR
+\NC $s$ \NC \prm {Umathsubsupshiftdown} \NC \NR
 \LL
 \stoptabulate
 
-When we set \lpr {mathscriptsmode} to a value other than zero these are used
+When we set \prm {mathscriptsmode} to a value other than zero these are used
 for calculating fixed positions. This is something that is needed for instance
 for chemistry. You can manipulate the mentioned variables to achieve different
 effects.
@@ -1016,18 +1657,21 @@
 \NC 0    \NC dynamic       \NC dynamic       \NC \SampleMath{0} \NC \NR
 \NC 1    \NC $d$           \NC $u$           \NC \SampleMath{1} \NC \NR
 \NC 2    \NC $s$           \NC $u$           \NC \SampleMath{2} \NC \NR
-\NC 3    \NC $s$           \NC $u + s - d$   \NC \SampleMath{3} \NC \NR
-\NC 4    \NC $d + (s-d)/2$ \NC $u + (s-d)/2$ \NC \SampleMath{4} \NC \NR
-\NC 5    \NC $d$           \NC $u + s - d$   \NC \SampleMath{5} \NC \NR
+%
+% In \LUATEX\ but dropped in \LUAMETATEX:
+%
+%NC 3    \NC $s$           \NC $u + s - d$   \NC \SampleMath{3} \NC \NR
+%NC 4    \NC $d + (s-d)/2$ \NC $u + (s-d)/2$ \NC \SampleMath{4} \NC \NR
+%NC 5    \NC $d$           \NC $u + s - d$   \NC \SampleMath{5} \NC \NR
 \LL
 \stoptabulate
 
-The value of this parameter obeys grouping but applies to the whole current
-formula.
+The value of this parameter obeys grouping and is applied to character atoms only
+(but that might evolve as we go).
 
-% if needed we can put the value in stylenodes but maybe more should go there
+\stopsubsection
 
-\subsection{Penalties: \lpr {mathpenaltiesmode}}
+\startsubsection[title={Penalties: \prm {mathpenaltiesmode}}]
 
 \topicindex {math+penalties}
 
@@ -1051,8 +1695,10 @@
 They default to inifinite which signals that they don't need to be inserted. When
 set they are injected before a binop or rel noad. This is an experimental feature.
 
-\subsection{Equation spacing: \lpr {matheqnogapstep}}
+\stopsubsection
 
+\startsubsection[title={Equation spacing: \prm {matheqnogapstep}}]
+
 By default \TEX\ will add one quad between the equation and the number. This is
 hard coded. A new primitive can control this:
 
@@ -1065,57 +1711,16 @@
 is divided by 1000 which is the usual way to mimmick floating point factors in
 \TEX.
 
+\stopsubsection
+
 \stopsection
 
 \startsection[title={Math constructs}]
 
-\subsection {Unscaled fences and \lpr{mathdelimitersmode}}
+\startsubsection[title={Cheating with fences}]
 
 \topicindex {math+fences}
 
-The \lpr {mathdelimitersmode} primitive is experimental and deals with the
-following (potential) problems. Three bits can be set. The first bit prevents an
-unwanted shift when the fence symbol is not scaled (a cambria side effect). The
-second bit forces italic correction between a preceding character ordinal and the
-fenced subformula, while the third bit turns that subformula into an ordinary so
-that the same spacing applies as with unfenced variants. Here we show Cambria
-(with \lpr {mathitalicsmode} enabled).
-
-\starttexdefinition Whatever #1
-    \NC \type{\mathdelimitersmode = #1}
-    \NC \mathitalicsmode1\mathdelimitersmode#1\ruledhbox{\showglyphs\showfontkerns\showfontitalics$f(x)$}
-    \NC \mathitalicsmode1\mathdelimitersmode#1\ruledhbox{\showglyphs\showfontkerns\showfontitalics$f\left(x\right)$}
-    \NC \NR
-\stoptexdefinition
-
-\start
-    \switchtobodyfont[cambria]
-    \starttabulate[|l|l|l|]
-        \Whatever{0}\Whatever{1}\Whatever{2}\Whatever{3}%
-        \Whatever{4}\Whatever{5}\Whatever{6}\Whatever{7}%
-    \stoptabulate
-\stop
-
-So, when set to 7 fenced subformulas with unscaled delimiters come out the same
-as unfenced ones. This can be handy for cases where one is forced to use \prm
-{left} and \prm {right} always because of unpredictable content. As said, it's an
-experimental feature (which somehow fits in the exceptional way fences are dealt
-with in the engine). The full list of flags is given in the next table:
-
-\starttabulate[|c|l|]
-\DB value  \BC meaning \NC \NR
-\TB
-\NC \type{"01} \NC don't apply the usual shift \NC \NR
-\NC \type{"02} \NC apply italic correction when possible \NC \NR
-\NC \type{"04} \NC force an ordinary subformula \NC \NR
-\NC \type{"08} \NC no shift when a base character \NC \NR
-\NC \type{"10} \NC only shift when an extensible \NC \NR
-\LL
-\stoptabulate
-
-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
@@ -1142,16 +1747,22 @@
 
 \getbuffer
 
-\subsection[mathacc]{Accent handling with \lpr {Umathaccent}}
+Normally fences need to be matched, that is: when a left fence is seen, there has
+to be a right fence. When you set \prm {mathcheckfencesmode} to non|-|zero the
+scanner silently recovers from this.
 
+\stopsubsection
+
+\startsubsection[title={Accent handling with \prm {Umathaccent}},reference=mathacc]
+
 \topicindex {math+accents}
 
 \LUATEX\ supports both top accents and bottom accents in math mode, and math
 accents stretch automatically (if this is supported by the font the accent comes
 from, of course). Bottom and combined accents as well as fixed-width math accents
-are controlled by optional keywords following \lpr {Umathaccent}.
+are controlled by optional keywords following \prm {Umathaccent}.
 
-The keyword \type {bottom} after \lpr {Umathaccent} signals that a bottom accent
+The keyword \type {bottom} after \prm {Umathaccent} signals that a bottom accent
 is needed, and the keyword \type {both} signals that both a top and a bottom
 accent are needed (in this case two accents need to be specified, of course).
 
@@ -1191,25 +1802,69 @@
 \type {overlay} location. It also works for the other locations but then it
 concerns the width.
 
-\subsection{Building radicals with \lpr {Uradical} and \lpr {Uroot}}
+\stopsubsection
 
+\startsubsection[title={Building radicals with \prm {Uradical}, \prm {Uroot} and \prm {Urooted}}]
+
 \topicindex {math+radicals}
+\topicindex {math+roots}
 
-The new primitive \lpr {Uroot} allows the construction of a radical noad
-including a degree field. Its syntax is an extension of \lpr {Uradical}:
+The new primitive \prm {Uroot} allows the construction of a radical noad
+including a degree field. Its syntax is an extension of \prm {Uradical}:
 
 \starttyping
-\Uradical <fam integer> <char integer> <radicand>
-\Uroot    <fam integer> <char integer> <degree> <radicand>
+\Uradical
+    <fam integer> <left char integer>
+    <content>
+\Uroot
+    <fam integer> <left char integer>
+    <degree>
+    <content>
+\Urooted
+    <fam integer> <left char integer>
+    <fam integer> <right char integer>
+    <degree>
+    <content>
 \stoptyping
 
-The placement of the degree is controlled by the math parameters \lpr
-{Umathradicaldegreebefore}, \lpr {Umathradicaldegreeafter}, and \lpr
+The placement of the degree is controlled by the math parameters \prm
+{Umathradicaldegreebefore}, \prm {Umathradicaldegreeafter}, and \prm
 {Umathradicaldegreeraise}. The degree will be typeset in \prm
 {scriptscriptstyle}.
 
-\subsection{Super- and subscripts}
+In \CONTEXT\ we use \prm {Urooted} to wrap something in an \quote {annuity}
+umbrella where there is a symbol at the end that has to behave like the radical
+does at the left end: adapt its size. In order to support variants this primitive
+supports two delimiters.
 
+{\em todo: mention optional keywords}
+
+\stopsubsection
+
+\startsubsection[title={Tight delimiters with \prm {Udelimited}}]
+
+\topicindex {math+radicals}
+\topicindex {math+delimiters}
+
+This new primitive is like \prm {Urooted} in that it takes two delimiters but it
+takes no degree and no rule is drawn.
+
+\starttyping
+\Udelimited
+    <fam integer> <left char integer>
+    <fam integer> <right char integer>
+    <content>
+\stoptyping
+
+In \CONTEXT\ we use it for fourier notations in which case there is only a right
+symbol (like a hat).
+
+{\em todo: mention optional keywords}
+
+\stopsubsection
+
+\startsubsection[title={Super- and subscripts}]
+
 The character fields in a \LUA|-|loaded \OPENTYPE\ math font can have a \quote
 {mathkern} table. The format of this table is the same as the \quote {mathkern}
 table that is returned by the \type {fontloader} library, except that all height
@@ -1267,16 +1922,18 @@
 value high enough in the character), or simply zero (if the character has no math kern
 pairs at all).
 
-\subsection{Scripts on extensibles: \lpr {Uunderdelimiter}, \lpr {Uoverdelimiter},
-\lpr {Udelimiterover}, \lpr {Udelimiterunder} and \lpr {Uhextensible}}
+\stopsubsection
 
+\startsubsection[title={Scripts on extensibles: \prm {Uunderdelimiter}, \prm {Uoverdelimiter},
+\prm {Udelimiterover}, \prm {Udelimiterunder} and \prm {Uhextensible}}]
+
 \topicindex {math+scripts}
 \topicindex {math+delimiters}
 \topicindex {math+extensibles}
 
-The primitives \lpr {Uunderdelimiter} and \lpr {Uoverdelimiter} allow the
+The primitives \prm {Uunderdelimiter} and \prm {Uoverdelimiter} allow the
 placement of a subscript or superscript on an automatically extensible item and
-\lpr {Udelimiterunder} and \lpr {Udelimiterover} allow the placement of an
+\prm {Udelimiterunder} and \prm {Udelimiterover} allow the placement of an
 automatically extensible item as a subscript or superscript on a nucleus. The
 input:
 
@@ -1294,11 +1951,11 @@
 
 \blank \startnarrower \getbuffer \stopnarrower \blank
 
-The vertical placements are controlled by \lpr {Umathunderdelimiterbgap}, \lpr
-{Umathunderdelimitervgap}, \lpr {Umathoverdelimiterbgap}, and \lpr
+The vertical placements are controlled by \prm {Umathunderdelimiterbgap}, \prm
+{Umathunderdelimitervgap}, \prm {Umathoverdelimiterbgap}, and \prm
 {Umathoverdelimitervgap} in a similar way as limit placements on large operators.
-The superscript in \lpr {Uoverdelimiter} is typeset in a suitable scripted style,
-the subscript in \lpr {Uunderdelimiter} is cramped as well.
+The superscript in \prm {Uoverdelimiter} is typeset in a suitable scripted style,
+the subscript in \prm {Uunderdelimiter} is cramped as well.
 
 These primitives accepts an optional \type {width} specification. When used the
 also optional keywords \type {left}, \type {middle} and \type {right} will
@@ -1305,7 +1962,7 @@
 determine what happens when a requested size can't be met (which can happen when
 we step to successive larger variants).
 
-An extra primitive \lpr {Uhextensible} is available that can be used like this:
+An extra primitive \prm {Uhextensible} is available that can be used like this:
 
 \startbuffer
 $\Uhextensible width 10cm 0 "2194$
@@ -1330,10 +1987,31 @@
 font metrics are involved we have a different code path for traditional fonts end
 \OPENTYPE\ fonts.
 
-\subsection{Fractions and the new \lpr {Uskewed} and \lpr {Uskewedwithdelims}}
+\stopsubsection
 
+\startsubsection[title={Fractions and the new \prm {Ustretched} and \prm {Ustretchedwithdelims}}]
+
 \topicindex {math+fractions}
 
+These commands are similar the regular rule separated fractions but expect a delimiter
+that then will be used instead. This permits for instance the use of horizontal
+extensible arrows. When no extensible is possible (this is a font property) the given
+glyph is centered.
+
+Normally one will pass a specific delimiter and not a character, if only because
+these come from the non \ASCII\ ranges:
+
+\starttyping
+{ \Ustretched <delimiter> <options> {1} {2} }
+{ \Ustretchedwithdelims <delimiter> () <options> {1} {2} }
+\stoptyping
+
+\stopsubsection
+
+\startsubsection[title={Fractions and the new \prm {Uskewed} and \prm {Uskewedwithdelims}}]
+
+\topicindex {math+fractions}
+
 The \prm {abovewithdelims} command accepts a keyword \type {exact}. When issued
 the extra space relative to the rule thickness is not added. One can of course
 use the \type {\Umathfraction..gap} commands to influence the spacing. Also the
@@ -1348,13 +2026,13 @@
 implement something that uses them. And so we now provide a primitive similar to the
 other fraction related ones but with a few options so that one can influence the
 rendering. Of course a user can also mess around a bit with the parameters
-\lpr {Umathskewedfractionhgap} and \lpr {Umathskewedfractionvgap}.
+\prm {Umathskewedfractionhgap} and \prm {Umathskewedfractionvgap}.
 
 The syntax used here is:
 
 \starttyping
-{ {1} \Uskewed / <options> {2} }
-{ {1} \Uskewedwithdelims / () <options> {2} }
+{ \Uskewed / <options> {1} {2} }
+{ \Uskewedwithdelims / () <options> {1} {2} }
 \stoptyping
 
 where the options can be \type {noaxis} and \type {exact}. By default we add half
@@ -1361,8 +2039,8 @@
 the axis to the shifts and by default we zero the width of the middle character.
 For Latin Modern the result looks as follows:
 
-\def\ShowA#1#2#3{$x + { {#1} \Uskewed           /    #3 {#2} } + x$}
-\def\ShowB#1#2#3{$x + { {#1} \Uskewedwithdelims / () #3 {#2} } + x$}
+\def\ShowA#1#2#3{$x + { \Uskewed           /    #3 {#1} {#2} } + x$}
+\def\ShowB#1#2#3{$x + { \Uskewedwithdelims / () #3 {#1} {#2} } + x$}
 
 \start
     \switchtobodyfont[modern]
@@ -1414,12 +2092,10 @@
 \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:
+The complete list of these commands is: \prm {Uabove}, \prm {Uatop}, \prm
+{Uover}, \prm {Uabovewithdelims}, \prm {Uatopwithdelims}, \prm {Uoverwithdelims},
+\prm {Uskewed}, \prm {Uskewedwithdelims}. As with other extensions we use a
+leading \type {U}. Here are a few examples:
 
 \startbuffer
 $\Uover {                   1234} {                   5678} $\quad
@@ -1437,8 +2113,10 @@
 
 These render as: \getbuffer
 
-\subsection {Math styles: \lpr {Ustyle}}
+\stopsubsection
 
+\startsubsection[title={Math styles: \prm {Ustyle}}]
+
 This primitive accepts a style identifier:
 
 \starttyping
@@ -1453,7 +2131,7 @@
 
 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
+zero upto seven (like the ones reported by the primitive \prm {mathstyle}). So, the
 next few lines give identical results:
 
 \startbuffer
@@ -1467,8 +2145,10 @@
 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}}
+\stopsubsection
 
+\startsubsection[title={Delimiters: \prm {Uleft}, \prm {Umiddle} and \prm {Uright}}]
+
 \topicindex {math+delimiters}
 
 Normally you will force delimiters to certain sizes by putting an empty box or
@@ -1508,24 +2188,20 @@
 You can influence the final class with the keyword \type {class} which will
 influence the spacing. The numbers are the same as for character classes.
 
-\subsection {Accents: \type{\mathlimitsmode}}
+\stopsubsection
 
-\topicindex {math+accents}
-
-When you use \type {\limits} or \type {\nolimits} without scripts spacing might
-get messed up. This can be prevented by setting \type {\mathlimitsmode} to a
-non|-|zero value.
-
 \stopsection
 
 \startsection[title={Extracting values}]
 
-\subsection{Codes and using \lpr {Umathcode}, \lpr {Umathcharclass}, \lpr
-{Umathcharfam} and \lpr {Umathcharslot}}
+\startsubsection[title={Codes and using \prm {Umathcode}, \prm {Umathcharclass}, \prm
+{Umathcharfam} and \prm {Umathcharslot}}]
 
 \topicindex {math+codes}
 
-You can extract the components of a math character. Say that we have defined:
+You should not really depend on the number that comes from \prm {Umathcode} because
+the engine can (at some point) use a different amount of families and classes. Given this,
+you can extract the components of a math character. Say that we have defined:
 
 \starttyping
 \Umathcode 1 2 3 4
@@ -1534,18 +2210,22 @@
 then
 
 \starttyping
-[\Umathcharclass1] [\Umathcharfam1] [\Umathcharslot1]
+[\Umathcharclass\Umathcode1] [\Umathcharfam\Umathcode1] [\Umathcharslot\Umathcode1]
 \stoptyping
 
-will return:
+which will return:
 
 \starttyping
 [2] [3] [4]
 \stoptyping
 
-These commands are provided as convenience. Before they come available you could
-do the following:
+You can of course store the code in for instance a register and use that as
+argument. The three commands also accept a specification (and maybe more in the
+future).
 
+These commands are provided as convenience. Before they became available you
+could do the following:
+
 \starttyping
 \def\Umathcharclass{\numexpr
     \directlua{tex.print(tex.getmathcode(token.scan_int())[1])}
@@ -1558,8 +2238,10 @@
 \relax}
 \stoptyping
 
-\subsection {Last lines and \lpr{predisplaygapfactor}}
+\stopsubsection
 
+\startsubsection[title={Last lines and \prm{predisplaygapfactor}}]
+
 \topicindex {math+last line}
 
 There is a new primitive to control the overshoot in the calculation of the
@@ -1582,13 +2264,24 @@
 \relax}
 \stoptyping
 
+\stopsubsection
+
 \stopsection
 
-\startsection[title={Math mode}]
+\startsection[title={Math mode and scripts}]
 
-\subsection {Verbose versions of single|-|character math commands like \lpr {Usuperscript}
-and \lpr {Usubscript}}
+\startsubsection[title={Entering and leaving math mode with \prm {Ustartmathmode}
+and \prm {Ustopmathmode}}]
 
+These commands are variants on the single and double (usually) dollar signs that
+make us enter math mode and later leave it. The start command expects a style
+identifier that determines in what style we end up in.
+
+\stopsubsection
+
+\startsubsection[title={Verbose versions of single|-|character math commands like \prm {Usuperscript}
+and \prm {Usubscript}}]
+
 \topicindex {math+styles}
 
 \LUATEX\ defines six new primitives that have the same function as
@@ -1595,31 +2288,33 @@
 \type {^}, \type {_}, \type {$}, and \type {$$}:
 
 \starttabulate[|l|l|]
-\DB primitive                  \BC explanation \NC \NR
+\DB primitive                \BC explanation \NC \NR
 \TB
-\NC \lpr {Usuperscript}      \NC duplicates the functionality of \type {^} \NC \NR
-\NC \lpr {Usubscript}        \NC duplicates the functionality of \type {_} \NC \NR
-\NC \lpr {Ustartmath}        \NC duplicates the functionality of \type {$}, % $
+\NC \prm {Usuperscript}      \NC duplicates the functionality of \type {^} \NC \NR
+\NC \prm {Usubscript}        \NC duplicates the functionality of \type {_} \NC \NR
+\NC \prm {Ustartmath}        \NC duplicates the functionality of \type {$}, % $
                                    when used in non-math mode. \NC \NR
-\NC \lpr {Ustopmath}         \NC duplicates the functionality of \type {$}, % $
+\NC \prm {Ustopmath}         \NC duplicates the functionality of \type {$}, % $
                                    when used in inline math mode. \NC \NR
-\NC \lpr {Ustartdisplaymath} \NC duplicates the functionality of \type {$$}, % $$
+\NC \prm {Ustartdisplaymath} \NC duplicates the functionality of \type {$$}, % $$
                                    when used in non-math mode. \NC \NR
-\NC \lpr {Ustopdisplaymath}  \NC duplicates the functionality of \type {$$}, % $$
+\NC \prm {Ustopdisplaymath}  \NC duplicates the functionality of \type {$$}, % $$
                                    when used in display math mode. \NC \NR
 \LL
 \stoptabulate
 
-The \lpr {Ustopmath} and \lpr {Ustopdisplaymath} primitives check if the current
+The \prm {Ustopmath} and \prm {Ustopdisplaymath} primitives check if the current
 math mode is the correct one (inline vs.\ displayed), but you can freely intermix
 the four mathon|/|mathoff commands with explicit dollar sign(s).
 
-\subsection{Script commands \lpr {Unosuperscript} and \lpr {Unosubscript}}
+\stopsubsection
 
+\startsubsection[title={Script commands \prm {Unosuperscript}, \prm {Unosubscript}, \prm {Unosuperprescript} and \prm {Unosubprescript}}]
+
 \topicindex {math+styles}
 \topicindex {math+scripts}
 
-These two commands result in super- and subscripts but with the current style (at the
+These commands result in super- and subscripts but with the current style (at the
 time of rendering). So,
 
 \startbuffer[script]
@@ -1635,82 +2330,58 @@
 
 results in \inlinebuffer[script].
 
-\subsection{Allowed math commands in non|-|math modes}
+\stopsubsection
 
-\topicindex {math+text}
-\topicindex {text+math}
+\startsubsection[title={Script commands \prm {Ushiftedsuperscript}, \prm {Ushiftedsubscript}, \prm {Ushiftedsuperprescript} and \prm {Ushiftedsubprescript}}]
 
-The commands \prm {mathchar}, and \lpr {Umathchar} and control sequences that are
-the result of \prm {mathchardef} or \lpr {Umathchardef} are also acceptable in
-the horizontal and vertical modes. In those cases, the \prm {textfont} from the
-requested math family is used.
+\topicindex {math+styles}
+\topicindex {math+scripts}
+\topicindex {math+indices}
 
-\stopsection
+Sometimes a script acts as an index in which case is should be anchored
+differently. For that we have four extra primitives. Here the shifted postscripts
+are shown:
 
-\startsection[title={Goodies}]
-
-\subsection {Flattening: \lpr {mathflattenmode}}
-
-\topicindex {math+flattening}
-
-The \TEX\ math engine collapses \type {ord} noads without sub- and superscripts
-and a character as nucleus, which has the side effect that in \OPENTYPE\ mode
-italic corrections are applied (given that they are enabled).
-
-\startbuffer[sample]
-\switchtobodyfont[modern]
-$V \mathbin{\mathbin{v}} V$\par
-$V \mathord{\mathord{v}} V$\par
+\startbuffer[script]
+$
+    x\Usuperscript       {1}\Usubscript       {2} =
+    x\Ushiftedsuperscript{1}\Ushiftedsubscript{2} =
+    x\Usuperscript       {1}\Ushiftedsubscript{2} =
+    x\Ushiftedsuperscript{1}\Usubscript       {2}
+$
 \stopbuffer
 
-\typebuffer[sample]
+\typebuffer[script]
 
-This renders as:
+results in \inlinebuffer[script].
 
-\blank \start \mathflattenmode\plusone \getbuffer[sample] \stop \blank
+\stopsubsection
 
-When we set \lpr {mathflattenmode} to 31 we get:
+\startsubsection[title={Injecting primes with \prm {Uprimescript}}]
 
-\blank \start \mathflattenmode\numexpr1+2+4+8+16\relax \getbuffer[sample] \stop \blank
+This one is a bit special. In \LUAMETATEX\ a prime is a native element of a
+nucleus, alongside the two prescript and two postscripts. The most confusing
+combination of primes and postscripts is the case where we have a prime and
+superscript. In that case we assume that in order to avoid confusion parenthesis
+are applied so we don't covert it. That leaves three cases:
 
-When you see no difference, then the font probably has the proper character
-dimensions and no italic correction is needed. For Latin Modern (at least till
-2018) there was a visual difference. In that respect this parameter is not always
-needed unless of course you want efficient math lists anyway.
+\startbuffer[script]
+$
+    a \Uprimescript{1} \Usuperscript{2} \Usubscript {3} +
+    b \Usubscript  {3} \Uprimescript{1} +
+    c \Uprimescript{1} \Usubscript  {3} = d
+$
+\stopbuffer
 
-You can influence flattening by adding the appropriate number to the value of the
-mode parameter. The default value is~1.
+\typebuffer[script]
 
-\starttabulate[|Tc|c|]
-\DB mode \BC class \NC \NR
-\TB
-\NC  1   \NC ord   \NC \NR
-\NC  2   \NC bin   \NC \NR
-\NC  4   \NC rel   \NC \NR
-\NC  8   \NC punct \NC \NR
-\NC 16   \NC inner \NC \NR
-\LL
-\stoptabulate
+This gets rendered as: \inlinebuffer[script]. In this case a subscript is handled as if
+it were an index.
 
+\stopsubsection
 
-\subsection {Less Tracing}
+\startsubsection[title={Prescripts with \prm {Usuperprescript} and \prm {Usubprescript}}]
 
-\topicindex {math+tracing}
-
-Because there are quite some math related parameters and values, it is possible
-to limit tracing. Only when \type {tracingassigns} and|/|or \type
-{tracingrestores} are set to~2 or more they will be traced.
-
-\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
@@ -1724,11 +2395,13 @@
 
 \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).
+The problem with the circumflex is that it is also used for escaping character
+input. Normally that only happens in a format file so you can safely disable
+that. Alternatives are using active characters that adapt. In \CONTEXT\ we make
+them regular (other) characters in text mode and set \prm {supmarkmode} to~1 to
+disable the normal multiple \type {^} treatment (a value larger than 1 will also
+disable that in text mode). In math mode we make them active and behave as
+expected.
 
 \blank \getbuffer \blank
 
@@ -1754,16 +2427,110 @@
 
 \blank \getbuffer \blank
 
-\subsection {Prescripts with \lpr {Usuperprescript} and {Usubprescript}}
+\stopsubsection
 
+\startsubsection[title={Allowed math commands in non|-|math modes}]
+
+\topicindex {math+text}
+\topicindex {text+math}
+
+The commands \prm {mathchar}, and \prm {Umathchar} and control sequences that are
+the result of \prm {mathchardef} or \prm {Umathchardef} are also acceptable in
+the horizontal and vertical modes. In those cases, the \prm {textfont} from the
+requested math family is used.
+
+\stopsubsection
+
+\stopsection
+
+% \startsection[title={Flattening: \prm {mathflattenmode}}]
+%
+% \topicindex {math+flattening}
+%
+% The \TEX\ math engine collapses \type {ord} noads without sub- and superscripts
+% and a character as nucleus, which has the side effect that in \OPENTYPE\ mode
+% italic corrections are applied (given that they are enabled).
+%
+% \startbuffer[sample]
+% \switchtobodyfont[modern]
+% $V \mathbin{\mathbin{v}} V$\par
+% $V \mathord{\mathord{v}} V$\par
+% \stopbuffer
+%
+% \typebuffer[sample]
+%
+% This renders as:
+%
+% \blank \start \mathflattenmode\plusone \getbuffer[sample] \stop \blank
+%
+% When we set \prm {mathflattenmode} to 31 we get:
+%
+% \blank \start \mathflattenmode\numexpr1+2+4+8+16\relax \getbuffer[sample] \stop \blank
+%
+% When you see no difference, then the font probably has the proper character
+% dimensions and no italic correction is needed. For Latin Modern (at least till
+% 2018) there was a visual difference. In that respect this parameter is not always
+% needed unless of course you want efficient math lists anyway.
+%
+% You can influence flattening by adding the appropriate number to the value of the
+% mode parameter. The default value is~1.
+%
+% \starttabulate[|Tc|c|]
+% \DB mode \BC class \NC \NR
+% \TB
+% \NC  1   \NC ord   \NC \NR
+% \NC  2   \NC bin   \NC \NR
+% \NC  4   \NC rel   \NC \NR
+% \NC  8   \NC punct \NC \NR
+% \NC 16   \NC inner \NC \NR
+% \LL
+% \stoptabulate
+%
+% \stopsubsection
+
+
+\startsection[title={Tracing}]
+
+\topicindex {math+tracing}
+
+\startsubsection[title={Assignments}]
+
+Because there are quite some math related parameters and values, it is possible
+to limit tracing. Only when \type {tracingassigns} and|/|or \type
+{tracingrestores} are set to~2 or more they will be traced.
+
+\stopsubsection
+
+\startsubsection[title={\prm{tracingmath}}]
+
+The \TEX\ engine has a of places where tracing information can be generated so
+one can see what gets read and what comes out, but the math machinery is a black
+box. In \LUAMETATEX\ the math engine has been extended with tracing too.
+
+A value of one shows only the initial list, but a value of two also shows the
+intermediate lists as well as applied rules, injected spacing, injected penalties
+and parameter initialization. A value of three shows the result and larger values
+will do so with maximum breadth and depth.
+
+If you also want to see something on the console make sure to set \prm
+{tracingonline} to more than one.
+
+\stopsubsection
+
+\stopsection
+
+\startsection[title={Classes}]
+
+\startsubsection[title={Forcing classes with \prm {Umathclass}}]
+
 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$
+$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
@@ -1774,8 +2541,421 @@
 \getbuffer
 \stoplines
 
+The \TEX\ engines deal with active characters in math differently as in text.
+When a character has class~8 it will be fed back into the machinery with an
+active catcode which of course assumes that there is some meaning attached.
+
+A variant on this is the use of \prm {amcode}. A character that has that code set
+and that is active when we are in math mode, will be fed back with that code as
+catcode which can be one of alignment tab, superscript, subscript, letter, other
+char, or active. This feature is still experimental. Watch out: when an already
+active character remains active we get a loop. Also, math characters are checked
+for this property too, which can then turn them active.
+
+\stopsubsection
+
+\startsubsection[title={Checking class states}]
+
+When a formula is typeset it starts out with a begin class and finishes with an end class.
+This is done by adding two \quote {fake} atoms.  here are two global state variables that tell
+what the most recent edge classes are and two variables that act like registers and are
+local. There are also two registers that can be set to values that will force begin and end
+classes.
+
+The values of \prm {mathbeginclass} and \prm {mathendclass} are used when a
+formula starts and afterwards they are reset. Afterwards \prm {mathleftclass} and
+\prm {mathrightclass} have the effective edge classes. The global \prm
+{lastleftclass} and \prm {lastrightclass} variables also have the last edge
+classes but them being global they might not always reflect what you expect.
+
+\stopsubsection
+
+\startsubsection[title={Getting class spacing}]
+
+You can query the pairwise spacing of atoms with \prm {mathatomglue} and inject it with
+\prm {mathatomskip}, as in:
+
+\startbuffer
+\the\mathatomglue 5 4 \displaystyle : $[\mathatomskip 5 4 \displaystyle]$
+\stopbuffer
+
+\typebuffer
+
+and get: \inlinebuffer.
+
+\stopsubsection
+
+\startsubsection[title={Default math codes}]
+
+The probably not that useful primitive (but who knows) \prm {setdefaultmathcodes}
+initializes the mathcodes of digits to family zero and the lowercase and
+uppercase letters to family one, just as standard \TEX\ does. Don't do this in in
+\CONTEXT.
+
+\stopsubsection
+
 \stopsection
 
+\startsection[title={Modes}]
+
+\startsubsection[title={Introduction}]
+
+For most cases the math engine acts the same as in regular \TEX, apart of course
+from some font specific features that need to be supported out of the box. There
+are however ways to divert, which we do in \CONTEXT. The following paragraphs are
+therefore rather \CONTEXT\ driven and not that relevant otherwise. Some modes have
+been removed and became default and|/|ro were replaced by more granular options.
+
+\stopsubsection
+
+\startsubsection[title={Controlling display math with \prm {mathdisplaymode}}]
+
+By setting \prm {mathdisplaymode} larger than zero double math shift characters
+(normally the dollar sign) are disabled. The reason for this feature is rather
+\CONTEXT\ specific: we pay a lot attention to spacing and the build in heuristics
+don't work well with that. We also need to initialize display math as well as
+deal with whatever has to be done with respect to finalizing. Because users use
+the high level commands anyway, disabling is okay for \CONTEXT\ and less likely
+to be done for other macro packages, so be careful with this one.
+
+\stopsubsection
+
+\startsubsection[title={Skips around display math and \prm {mathdisplayskipmode}}]
+
+\topicindex {math+spacing}
+
+The injection of \prm {abovedisplayskip} and \prm {belowdisplayskip} is not
+symmetrical. An above one is always inserted, also when zero, but the below is
+only inserted when larger than zero. Especially the latter makes it sometimes hard
+to fully control spacing. Therefore \LUATEX\ comes with a new directive: \prm
+{mathdisplayskipmode}. The following values apply:
+
+\starttabulate[|c|l|]
+\DB value \BC meaning \NC \NR
+\TB
+\NC 0 \NC normal \TEX\ behavior \NC \NR
+\NC 1 \NC always (same as 0) \NC \NR
+\NC 2 \NC only when not zero \NC \NR
+\NC 3 \NC never, not even when not zero \NC \NR
+\LL
+\stoptabulate
+
+\stopsubsection
+
+\startsubsection[title={Scripts}]
+
+The regular superscript trigger \type {^} and subscript trigger \type {_} are
+quite convenient and although we do have verbose aliases in regular text these
+two will be used. A multiple superscript character sequence is used for accessing
+characters by number unless you disable that via catcode manipulations. In
+\CONTEXT\ the super- and subscript characters are regular characters and only in
+math mode they have a special meaning. We can have upto for script characters and
+they indicate pre- and postscripts.
+
+\starttabulate[|c|c|c|c|]
+\NC \type {^}    \NC         \NC super \NC post \NC \NR
+\NC \type {_}    \NC         \NC sub   \NC post \NC \NR
+\NC \type {^^}   \NC         \NC super \NC pre  \NC \NR
+\NC \type {__}   \NC         \NC sub   \NC pre  \NC \NR
+\NC \type {^^^}  \NC shifted \NC super \NC post \NC \NR
+\NC \type {___}  \NC shifted \NC sub   \NC post \NC \NR
+\NC \type {^^^^} \NC shifted \NC super \NC pre  \NC \NR
+\NC \type {____} \NC shifted \NC sub   \NC pre  \NC \NR
+\stoptabulate
+
+The shifted variants force a script to be an index and thereby make the other
+script move. This multiple character features used to be optional but is now always
+active.
+
+Related to this is the issue of double scripts. The regular \TEX\ is to issue
+an error message, inject an ordinary node and carry on when asked to. Here we have
+\prm {mathdoublescriptmode} as escape: when set to a zero or positive value it will
+also inject an atom but with class properties determined by its value. There will
+be no error message.
+
+\starttyping
+\mathdoublescriptmode"MMLLRR % main left right
+\stoptyping
+
+% Another variable that influences rendering is \prm {mathscriptcharmode} that in
+% \CONTEXT\ we default to~1. The \prm {mathscriptboxmode} parameter determines if a
+% boxed nucleus is analyzed and is also set to~1 in \CONTEXT. Both parameters are a
+% left|-|over from the split code path approach and might still be handy for
+% experiments. They might go away some day of replaced by a different control
+% option. Older versions if \LUAMETATEX\ had optional behavior for different values
+% but that code was removed.
+
+\stopsubsection
+
+\startsubsection[title={Grouping}]
+
+When set to non zero \prm {mathgroupingmode} will make stand alone \quote {list}
+as in \typ {a {bc} d} behave like grouping instead of creating composite atoms.
+In \CONTEXT\ indeed we set it to a positive value. Although it was ot strictly
+necessary it is nicer when users don't get side effects if they revert to low
+level source coding.
+
+\stopsubsection
+
+\startsubsection[title={Slack}]
+
+The \prm {mathslackmode} parameters controls removal of accidental left and|/|or
+right space added to a formula. Of course we enable this in \CONTEXT. There is
+more detailed control possible at the atom label as well as with class options.
+
+\stopsubsection
+
+\startsubsection[title={Limit fitting \prm {mathlimitsmode}}]
+
+\topicindex {math+limits}
+
+When set, this parameter avoids too wide limits to stick out too much by sort of
+centering them.
+
+\stopsubsection
+
+\startsubsection[title={Nolimit correction with \prm {mathnolimitsmode}}]
+
+\topicindex {math+limits}
+
+There are two extra math parameters \prm {Umathnolimitsupfactor} and \prm
+{Umathnolimitsubfactor} that were added to provide some control over how limits
+are spaced (for example the position of super and subscripts after integral
+operators). They relate to an extra parameter \prm {mathnolimitsmode}. The half
+corrections are what happens when scripts are placed above and below. The
+problem with italic corrections is that officially that correction italic is used
+for above|/|below placement while advanced kerns are used for placement at the
+right end. The question is: how often is this implemented, and if so, do the
+kerns assume correction too. Anyway, with this parameter one can control it.
+
+\starttabulate[|l|ck1|ck1|ck1|ck1|ck1|ck1|]
+    \NC
+        \NC \mathnolimitsmode0    $\displaystyle\int\nolimits^0_1$
+        \NC \mathnolimitsmode1    $\displaystyle\int\nolimits^0_1$
+        \NC \mathnolimitsmode2    $\displaystyle\int\nolimits^0_1$
+        \NC \mathnolimitsmode3    $\displaystyle\int\nolimits^0_1$
+        \NC \mathnolimitsmode4    $\displaystyle\int\nolimits^0_1$
+        \NC \mathnolimitsmode8000 $\displaystyle\int\nolimits^0_1$
+    \NC \NR
+    \TB
+    \BC mode
+        \NC \tttf 0
+        \NC \tttf 1
+        \NC \tttf 2
+        \NC \tttf 3
+        \NC \tttf 4
+        \NC \tttf 8000
+    \NC \NR
+    \BC superscript
+        \NC 0
+        \NC font
+        \NC 0
+        \NC 0
+        \NC +ic/2
+        \NC 0
+    \NC \NR
+    \BC subscript
+        \NC -ic
+        \NC font
+        \NC 0
+        \NC -ic/2
+        \NC -ic/2
+        \NC 8000ic/1000
+    \NC \NR
+\stoptabulate
+
+When the mode is set to one, the math parameters are used. This way a macro
+package writer can decide what looks best. Given the current state of fonts in
+\CONTEXT\ we currently use mode 1 with factor 0 for the superscript and 750 for
+the subscripts. Positive values are used for both parameters but the subscript
+shifts to the left. A \prm {mathnolimitsmode} larger that 15 is considered to
+be a factor for the subscript correction. This feature can be handy when
+experimenting.
+
+\stopsubsection
+
+\startsubsection[title={Some spacing control with \prm {mathsurroundmode}, \prm {mathspacingmode} and \prm {mathgluemode}}]
+
+See \in {section} [spacing:surround] for more about inline spacing. The \prm
+{mathsurroundmode} parameter just permits the glue variant to kick in and indeed
+we enable it in \CONTEXT.
+
+The \prm {mathspacingmode} parameter is for tracing: normally zero inter atom
+glue is not injected but when this parameter is set to non|-|zero even zero
+spacing will show up. This permits us to check the applied inter atom spacing.
+
+The \prm {mathgluemode} bitset controls if glue can stretch and|/|or shrink. It
+is used in some of the upgraded \CONTEXT\ high level math alignment command so
+probably more qualifies as a feature specific for that usage.
+
+\starttabulate[|c|l|]
+\DB value \BC meaning \NC \NR
+\TB
+\NC 0x01  \NC obey stretch component \NC \NR
+\NC 0x02  \NC obey shrink  component \NC \NR
+\LL
+\stoptabulate
+
+\stopsubsection
+
+\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.
+
+\startsubsection[title={Scaling spacing with \prm {Umathxscale} and  \prm {Umathyscale}}]
+
+These two primitives scale the horizontal and vertical scaling related
+parameters. They are set by style. There is no combined scaling primitive.
+
+\startbuffer
+$\Umathxscale\textstyle  800 a + b + x + d + e = f $\par
+$\Umathxscale\textstyle 1000 a + b + x + d + e = f $\par
+$\Umathxscale\textstyle 1200 a + b + x + d + e = f $\blank
+
+$\Umathyscale\textstyle  800 \sqrt[2]{x+1}$\quad
+$\Umathyscale\textstyle 1000 \sqrt[2]{x+1}$\quad
+$\Umathyscale\textstyle 1200 \sqrt[2]{x+1}$\blank
+\stopbuffer
+
+\typebuffer
+
+Normally only small deviations from 1000 make sense but here we want to show the
+effect and use a 20\percent\ scaling:
+
+\getbuffer
+
+\startsubsection[title={Scaling with \prm {scaledmathstyle}}]
+
+Because styles put a style switching node in the stream we have a
+scaling primitive that uses such a style node to signal dynamic
+scaling. Thisis still somewhat experimental.
+
+\startbuffer
+$
+    {\scaledmathstyle  500 x + x}\quad
+    {\scaledmathstyle 1000 x + x}\quad
+    {\scaledmathstyle 1500 x + x}
+$
+\stopbuffer
+
+\typebuffer
+
+You get differently sized math but of course you then probably also need to
+handle spacing differently, although for small deviations from 1000 is should
+come out acceptable.
+
+\stopsubsection
+
+\startsubsection[title={Spreading math with \prm {maththreshold}}]
+
+Small formulas that don't get unpacked can be made to act like glue, that is,
+they become a sort of leader and permit the par builder to prevent excessive
+spacing because the embedded inter atom glue can now participate in the
+calculations. The \prm {maththreshold} primitive is a regular glue parameter.
+
+\stopsubsection
+
+\startsubsection[title={\prm {everymathatom} and \prm {lastatomclass}}]
+
+Just for completeness we have \prm {everymathatom} as companion for \prm {everyhbox}
+and friends and it is probably just as useful. The next example shows how it works:
+
+\startbuffer
+\everymathatom
+  {\begingroup
+   \scratchcounter\lastatomclass
+   \everymathatom{}%
+   \mathghost{\hbox to 0pt yoffset -1ex{\smallinfofont \setstrut\strut \the\scratchcounter\hss}}%
+   \endgroup}
+
+$ a = \mathatom class 4 {b} + \mathatom class 5 {c} $
+\stopbuffer
+
+\typebuffer
+
+We get a formula with open- and close atom spacing applied to~$b$ and~$c$:
+
+{\getbuffer}
+
+This example shows bit of all: we want the number to be invisible to the math
+machinery so we ghost it. So, we need to make sure we don't get recursion due to
+nested injection and expansion of \prm {everymathatom} and of course we need to
+store the number. The \prm {lastatomclass} state variable is only meaningful
+inside an explicit atom wrapper like \prm {mathatom} and \prm {mathatom}.
+
+\stopsubsection
+
+\startsubsection[title={\prm {postinlinepenalty} and \prm {preinlinepenalty}}]
+
+In horizontal lists math is embedded in a begin and end math node. These nodes
+also carry information about the surrounding space, and the in \LUAMETATEX\
+optional glue. We also store a penalty so that we can let that play a role in the
+decisions to be made; these two internal integer registers control this. Just
+like the mentioned spacing they are not visible as nodes in the list.
+
+\stopsubsection
+
+\startsubsection[title={\prm {mathforwardpenalties} and \prm {mathbackwardpenalties}}]
+
+These penalties are experimental and deltas added to the regular penalties
+between atoms. Here is an example, as with other primitives that take more
+arguments the first number indicates how much follows.
+
+\startbuffer
+$ a + b + c + d + e + f + g + h = x $\par
+\mathforwardpenalties  3 300 200 100
+\mathbackwardpenalties 3 250 150  50
+$ a + b + c + d + e + f + g + h = x $\par
+\stopbuffer
+
+\typebuffer
+
+You'll notice that we apply more severe penalties at the edges:
+
+{\showmakeup[penalty]\multiply\glyphscale\plustwo \getbuffer}
+
+\stopsubsection
+
+\startsubsection[title={\prm {Umathdiscretionary} and \prm {hmcode}}]
+
+\topicindex {math+discretionaries}
+
+The usual \prm {discretionary} command is supported in math mode but it has the
+disadvantage that one needs to make sure that the content triplet does the math
+right (especially the style). This command takes an optional class specification.
+
+\starttyping
+\Umathdiscretionary [class n] {+} {+} {+}
+\stoptyping
+
+It uses the same logic as \prm {mathchoice} but in this case we handle three
+snippets in the current style.
+
+A fully automatic mechanism kicks in when a character has a \prm {hmcode} set:
+
+\starttabulate[|c|l|p|]
+\DB bit \BC meaning \BC explanation \NC \NR
+\TB
+\NC 1   \NC normal  \NC a discretionary is created with the same components \NC \NR
+\NC 2   \NC italic  \NC following italic correction is kept with the component \NC \NR
+\LL
+\stoptabulate
+
+So we can say:
+
+\starttyping
+\hmcode `+ 3
+\stoptyping
+
+When the \type {italic} bit is set italic correction is kept at a linebreak.
+\stopsubsection
+
+\stopsection
+
 \stopchapter
 
 \stopcomponent

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-metapost.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-metapost.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-metapost.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,13 +1,38 @@
-% language=uk
+% language=us runpath=texruns:manuals/luametatex
 
-% lua.newtable
-
 \environment luametatex-style
 
 \startcomponent luametatex-metapost
 
+\startluacode
+    function document.showmpcodes(what)
+        context.type("mplib."..what.."()")
+        context(": ")
+        local t = mplib[what]()
+        for i=0,#t do
+            if i > 0 then
+                context(", ")
+            end
+            context("%i: %s",i,t[i])
+        end
+    end
+\stopluacode
+
 \startchapter[reference=metapost,title={The \METAPOST\ library \type {mplib}}]
 
+\startsection[title={Introduction}][library=mplib]
+
+The library used in \LUAMETATEX\ differs from the one used in \LUATEX. There are
+for instance no backends and the binary number model is not available. There is
+also no textual output. There are scanners and injectors that make it possible to
+enhance the language and efficiently feed back into \METAPOST. File handling is
+now completely delegated to \LUA, so there are more callbacks.
+
+{\em Some functionality is experimental and therefore documentation is limited.
+Also, details are discussed in articles.}
+
+\stopsection
+
 \startsection[title={Process management}][library=mplib]
 
 \topicindex {\METAPOST}
@@ -18,10 +43,16 @@
 \libindex{version}
 
 The \METAPOST\ library interface registers itself in the table \type {mplib}. It
-is based on \MPLIB\ version \ctxlua {context(mplib.version())}.
+is based on \MPLIB\ version \ctxlua {context(mplib.version())} (\LUATEX\ used
+version 2+). Not all functionality is described here. Once we're out of the
+experimental stage some more information will be added. Using the library boils
+down to initializing an instance, executing statements and picking up assembled
+figures in the form of \LUA\ user data objects (and from there on \LUA\ variables
+like tables).
 
-\subsection{\type {new}}
 
+\startsubsection[title={\type {new}}]
+
 \libindex{new}
 
 To create a new \METAPOST\ instance, call
@@ -34,60 +65,98 @@
 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{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
-\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                   \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
-\NC \type{text_mode}   \NC boolean  \NC permit characters 2 and 3
-                                        as fencing string literals \NC \type {false}     \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
+\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                   \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
+\NC \type {text_mode}    \NC boolean  \NC permit characters 2 and 3
+                                          as fencing string literals \NC \type {false}     \NC \NR
+\NC \type {tolerance}    \NC number   \NC the value used as criterium
+                                          for straight lines         \NC \type {131/65536} \NC \NR
+\NC \type {extensions}   \NC boolean  \NC enable all extensions      \NC (might go)        \NC \NR
 \LL
 \stoptabulate
 
-The binary mode is no longer available in the \LUATEX\ version of \MPLIB. It
+The binary mode is no longer available in the \LUAMETATEX\ version of \MPLIB. It
 offers no real advantage and brings a ton of extra libraries with platform
 specific properties that we can now avoid. We might introduce a high resolution
 scaled variant at some point but only when it pays of performance wise.
 
-The \type {find_file} function should be of this form:
+In addition to the above we need to provide functions that helps \METAPOST\
+communicate to the outside world.
 
+\starttabulate[|l|l|pl|pl|]
+\DB name                 \BC type     \BC argument(s)                    \BC result       \NC \NR
+\TB
+\NC \type {find_file}    \NC function \NC string, string, string         \NC string       \NC \NR
+\NC                      \NC function \NC string, string, number         \NC string       \NC \NR
+\NC \type {open_file}    \NC function \NC string, string, string         \NC table        \NC \NR
+\NC                      \NC function \NC string, string, number         \NC table        \NC \NR
+\NC \type {run_logger}   \NC function \NC number, string                 \NC              \NC \NR
+\NC \type {run_script}   \NC function \NC string                         \NC whatever [, boolean] \NC \NR
+\NC                      \NC function \NC number                         \NC whatever [, boolean] \NC \NR
+\NC \type {make_text}    \NC function \NC string, number                 \NC string       \NC \NR
+\NC \type {run_internal} \NC function \NC number, number, number, string \NC              \NC \NR
+\NC \type {run_overload} \NC function \NC number, string, number         \NC boolean      \NC \NR
+\NC \type {run_error}    \NC function \NC string, string, number         \NC              \NC \NR
+\LL
+\stoptabulate
+
+The \type {find_file} and \type {open_file} functions should be of this form:
+
 \starttyping
-<string> found = finder (<string> name, <string> mode, <string> type)
+<string> found   = find_file (<string> name, <string> mode, <string> type)
+<table>  actions = open_file (<string> name, <string> mode, <string> type)
 \stoptyping
 
-with:
+where the mode is \type {r} or \type {w} and the type is \type {mp}, \type
+{data}, \type {terminal} or a number, The finder is supposed to return the full
+path name of the found file, or \type {nil} if the file cannot be found. The
+\type {open_file} is supposed to return a table with a \type {close} and \type
+{read} function. This is similar to the way we do it in \TEX. The special name
+\type {terminal} is used for interactive input. A numeric type indicates a
+specific read or write channel.
 
-\starttabulate[|l|p|]
-\DB name        \BC the requested file \NC \NR
-\TB
-\NC \type{mode} \NC the file mode: \type {r} or \type {w} \NC \NR
-\NC \type{type} \NC the kind of file, one of: \type {mp}, \type {tfm}, \type {map},
-                    \type {pfb}, \type {enc} \NC \NR
-\LL
-\stoptabulate
+The \type {run_logger} callback gets a target and a string. A target \type {1}
+means log, a value \type {2} means and \type {3} means both.
 
-Return either the full path name of the found file, or \type {nil} if the file
-cannot be found.
+The \type {run_script} function gets either a number or a string. The string
+represents a script, the number can be used as reference to something stored. The
+return value can be a boolean, number, string or table. Booleans and numbers are
+injected directly, strings and concatenated tables are fed into scantokens. When
+the second argument is true, the strings are also injected directly and tables
+are injected as pairs, colors, paths, transforms, depending on how many elements
+there are.
 
-Note that the new version of \MPLIB\ no longer uses binary mem files, so the way
-to preload a set of macros is simply to start off with an \type {input} command
-in the first \type {execute} call.
+The \type {run_internal} function triggers when internal \METAPOST\ variables
+flagged with \type {runscript} are initialized, saved or restored. The first
+argument is an index, the second the action. When initialized a third and fourth
+argument are passed. This is an experimental feature.
 
+The experimental \type {run_overload} callback kicks in when a variable (or
+macro) with a property other than zero is redefined. It gets a property, name and
+the value of \type {overloadmode} passed and when the function returns \type
+{true} redefinition is permitted.
+
+The \type {run_error} callback gets the error message, help text and current
+interaction mode passed. Normally it's best to just quit and let the user fix
+the code.
+
 When you are processing a snippet of text starting with \type {btex} or \type
 {verbatimtex} and ending with \type {etex}, the \METAPOST\ \type {texscriptmode}
 parameter controls how spaces and newlines get honoured. The default value is~1.
@@ -106,29 +175,39 @@
 
 That way the \LUA\ handler (assigned to \type {make_text}) can do what it likes.
 An \type {etex} has to be followed by a space or \type {;} or be at the end of a
-line and preceded by a space or at the beginning of a line.
+line and preceded by a space or at the beginning of a line. The \type {make_text}
+function can return a string that gets fed into scantokens.
 
-\subsection{\type {statistics}}
+\stopsubsection
 
+\startsubsection[title={\type {getstatistics}}]
+
 \libindex{statistics}
 
 You can request statistics with:
 
 \startfunctioncall
-<table> stats = mp:statistics()
+<table> stats = mp:getstatistics()
 \stopfunctioncall
 
-This function returns the vital statistics for an \MPLIB\ instance. There are
-four fields, giving the maximum number of used items in each of four allocated
-object classes:
+This function returns the vital statistics for an \MPLIB\ instance. Some are
+useful, others make more sense when debugging.
 
 \starttabulate[|l|l|p|]
 \DB field  \BC type \BC explanation \NC \NR
 \TB
-\NC \type{main_memory} \NC number \NC memory size \NC \NR
-\NC \type{hash_size}   \NC number \NC hash size\NC \NR
-\NC \type{param_size}  \NC number \NC simultaneous macro parameters\NC \NR
-\NC \type{max_in_open} \NC number \NC input file nesting levels\NC \NR
+\NC \type {memory}     \NC number \NC bytes of node memory      \NC \NR
+\NC \type {hash}       \NC number \NC size of the hash          \NC \NR
+\NC \type {parameters} \NC number \NC allocated parameter stack \NC \NR
+\NC \type {input}      \NC number \NC allocated input stack     \NC \NR
+\NC \type {tokens}     \NC number \NC number of token nodes     \NC \NR
+\NC \type {pairs}      \NC number \NC number of pair nodes      \NC \NR
+\NC \type {knots}      \NC number \NC number of knot nodes      \NC \NR
+\NC \type {nodes}      \NC number \NC number of value nodes     \NC \NR
+\NC \type {symbols}    \NC number \NC number of symbolic nodes  \NC \NR
+\NC \type {characters} \NC number \NC number of string bytes    \NC \NR
+\NC \type {strings}    \NC number \NC number of strings         \NC \NR
+\NC \type {internals}  \NC number \NC number of internals       \NC \NR
 \LL
 \stoptabulate
 
@@ -136,8 +215,10 @@
 are all allocated dynamically, so there is no chance of running out of space
 unless the available system memory is exhausted.
 
-\subsection{\type {execute}}
+\stopsubsection
 
+\startsubsection[title={\type {execute}}]
+
 \libindex{execute}
 
 You can ask the \METAPOST\ interpreter to run a chunk of code by calling
@@ -154,28 +235,93 @@
 chunks have to obey proper syntax, like each of them is a small file. For
 instance, you cannot split a single statement over multiple chunks.
 
-In contrast with the normal stand alone \type {mpost} command, there is
-\notabene {no} implied \quote{input} at the start of the first chunk.
+In contrast with the normal stand alone \type {mpost} command, there is \notabene
+{no} implied \quote{input} at the start of the first chunk. When no string is
+passed to the execute function, there will still be one triggered because it then
+expects input from the terminal and you can emulate that channel with the
+callback you provide.
 
-\subsection{\type {finish}}
+\stopsubsection
 
+\startsubsection[title={\type {finish}}]
+
 \libindex{finish}
 
+Once you create an instance it is likely that you will keep it open for
+successive processing, if only because you want to avoid loading a format each
+time. If for some reason you want to stop using an \MPLIB\ instance while
+processing is not yet actually done, you can call \type {finish}.
+
 \startfunctioncall
 <table> rettable = finish(mp)
 \stopfunctioncall
 
-If for some reason you want to stop using an \MPLIB\ instance while processing is
-not yet actually done, you can call \type {finish}. Eventually, used memory
+Eventually, used memory
 will be freed and open files will be closed by the \LUA\ garbage collector, but
 an explicit \type {finish} is the only way to capture the final part of the
 output streams.
 
+\stopsubsection
+
+\startsubsection[title={\type {settolerance} and \type {gettolerance}}]
+
+\libindex{gettolerance}
+\libindex{settolerance}
+
+These two functions relate to the bend tolerance, a value that is used when the
+export determines if a path has straight lines (like a rectangle has).
+
+\stopsubsection
+
+\startsubsection[title={Errors}]
+
+\libindex{showcontext}
+
+In case of an error you can get the context where it happened with \type
+{showcontext}.
+
+\stopsubsection
+
+\startsubsection[title={The scanner status}]
+
+\libindex {getstatus}
+\libindex {getstates}
+
+When processing a graphic an instance is in a specific state and again we have a
+getter for the (internal) values \ctxlua {document.showmpcodes ("getstates")}.
+The current status can be queried with \type {getstatus}.
+
+\stopsubsection
+
+\startsubsection[title={The hash}]
+
+\libindex {gethashentries}
+\libindex {gethashentry}
+
+Macro names and variable names are stored in a hash table. You can get a list
+with entries with \type {gethashentries}, which takes an instance as first
+argument. When the second argument is \type {true} more details will be provided.
+With \type {gethashentry} you get info about the given macro or variable.
+
+\stopsubsection
+
+\startsubsection[title={Callbacks}]
+
+\libindex{getcallbackstate}
+
+Some statistics about the number of calls to the callbacks can be queried with
+\type {getcallbackstate}, This function expects a valid instance.
+
+\stopsubsection
+
 \stopsection
 
 \startsection[title={The end result}]
 
+\startsubsection[title={The figure}]
+
 \libindex {fields}
+\libindex {stacking}
 
 The return value of \type {execute} and \type {finish} is a table with a
 few possible keys (only \type {status} is always guaranteed to be present).
@@ -183,10 +329,6 @@
 \starttabulate[|l|l|p|]
 \DB field  \BC type \BC explanation \NC \NR
 \TB
-\NC \type{log}    \NC string \NC output to the \quote {log} stream \NC \NR
-\NC \type{term}   \NC string \NC output to the \quote {term} stream \NC \NR
-\NC \type{error}  \NC string \NC output to the \quote {error} stream
-                                 (only used for \quote {out of memory}) \NC \NR
 \NC \type{status} \NC number \NC the return value:
                                  \type {0} = good,
                                  \type {1} = warning,
@@ -203,24 +345,18 @@
 representing a figure object, and each of those has a number of object methods
 you can call:
 
+You can check if a figure uses stacking with the \type {stacking} function. When
+objects are fetched, memory gets freed so no information about stacking is
+available then. You can get the used bend tolerance of an object with \type
+{tolerance}.
+
 \starttabulate[|l|l|p|]
 \DB field  \BC type \BC explanation \NC \NR
 \TB
 \NC \type{boundingbox}  \NC function \NC returns the bounding box, as an array of 4
                                          values \NC \NR
-\NC \type{postscript}   \NC function \NC returns a string that is the ps output of the
-                                         \type {fig}. this function accepts two optional
-                                         integer arguments for specifying the values of
-                                         \type {prologues} (first argument) and \type
-                                         {procset} (second argument) \NC \NR
-\NC \type{svg}          \NC function \NC returns a string that is the svg output of the
-                                         \type {fig}. This function accepts an optional
-                                         integer argument for specifying the value of
-                                         \type {prologues} \NC \NR
 \NC \type{objects}      \NC function \NC returns the actual array of graphic objects in
                                          this \type {fig} \NC \NR
-\NC \type{copy_objects} \NC function \NC returns a deep copy of the array of graphic
-                                         objects in this \type {fig} \NC \NR
 \NC \type{filename}     \NC function \NC the filename this \type {fig}'s \POSTSCRIPT\
                                          output would have written to in stand alone
                                          mode \NC \NR
@@ -227,13 +363,16 @@
 \NC \type{width}        \NC function \NC the \type {fontcharwd} value \NC \NR
 \NC \type{height}       \NC function \NC the \type {fontcharht} value \NC \NR
 \NC \type{depth}        \NC function \NC the \type {fontchardp} value \NC \NR
-\NC \type{italcorr}     \NC function \NC the \type {fontcharit} value \NC \NR
+\NC \type{italic}       \NC function \NC the \type {fontcharit} value \NC \NR
 \NC \type{charcode}     \NC function \NC the (rounded) \type {charcode} value \NC \NR
+\NC \type{stacking}     \NC function \NC is there a non|-|zero stacking  \NC \NR
 \LL
 \stoptabulate
 
 Note: you can call \type {fig:objects()} only once for any one \type {fig}
-object!
+object! Some information, like stacking, can only be queried when the complete
+figure is still present and calling up objects will free elements in the original
+once they are transferred.
 
 When the boundingbox represents a \quote {negated rectangle}, i.e.\ when the
 first set of coordinates is larger than the second set, the picture is empty.
@@ -240,8 +379,8 @@
 
 Graphical objects come in various types: \type {fill}, \type {outline}, \type
 {text}, \type {start_clip}, \type {stop_clip}, \type {start_bounds}, \type
-{stop_bounds}, \type {special}. Each type has a different list of accessible
-values.
+{stop_bounds}, \type {start_group} and \type {stop_group}. Each type has a
+different list of accessible values.
 
 There is a helper function (\type {mplib.fields(obj)}) to get the list of
 accessible values for a particular object, but you can just as easily use the
@@ -249,12 +388,14 @@
 
 All graphical objects have a field \type {type} that gives the object type as a
 string value; it is not explicit mentioned in the following tables. In the
-following, \type {number}s are \POSTSCRIPT\ points represented as a floating
-point number, unless stated otherwise. Field values that are of type \type
-{table} are explained in the next section.
+following, \type {number}s are \POSTSCRIPT\ points (base points in \TEX\ speak)
+represented as a floating point number, unless stated otherwise. Field values
+that are of type \type {table} are explained in the next section.
 
-\subsection{fill}
+\stopsubsection
 
+\startsubsection[title={fill}]
+
 \starttabulate[|l|l|p|]
 \DB field  \BC type \BC explanation \NC \NR
 \TB
@@ -266,13 +407,16 @@
 \NC \type{miterlimit} \NC number \NC miterlimit\NC \NR
 \NC \type{prescript}  \NC string \NC the prescript text \NC \NR
 \NC \type{postscript} \NC string \NC the postscript text \NC \NR
+\NC \type{stacking}   \NC number \NC the stacking (level) \NC \NR
 \LL
 \stoptabulate
 
 The entries \type {htap} and \type {pen} are optional.
 
-\subsection{outline}
+\stopsubsection
 
+\startsubsection[title={outline}]
+
 \starttabulate[|l|l|p|]
 \DB field  \BC type \BC explanation \NC \NR
 \TB
@@ -285,56 +429,44 @@
 \NC \type{dash}       \NC table  \NC representation of a dash list \NC \NR
 \NC \type{prescript}  \NC string \NC the prescript text \NC \NR
 \NC \type{postscript} \NC string \NC the postscript text \NC \NR
+\NC \type{stacking}   \NC number \NC the stacking (level) \NC \NR
 \LL
 \stoptabulate
 
 The entry \type {dash} is optional.
 
-\subsection{text}
+\stopsubsection
 
+\startsubsection[title={start_bounds, start_clip, start_group}]
+
 \starttabulate[|l|l|p|]
 \DB field  \BC type \BC explanation \NC \NR
 \TB
-\NC \type{text}       \NC string \NC the text \NC \NR
-\NC \type{font}       \NC string \NC font tfm name \NC \NR
-\NC \type{dsize}      \NC number \NC font size \NC \NR
-\NC \type{color}      \NC table  \NC the object's color \NC \NR
-\NC \type{width}      \NC number \NC \NC \NR
-\NC \type{height}     \NC number \NC \NC \NR
-\NC \type{depth}      \NC number \NC \NC \NR
-\NC \type{transform}  \NC table  \NC a text transformation \NC \NR
-\NC \type{prescript}  \NC string \NC the prescript text \NC \NR
-\NC \type{postscript} \NC string \NC the postscript text \NC \NR
+\NC \type{path}     \NC table \NC the list of knots \NC \NR
+\NC \type{stacking} \NC number \NC the stacking (level) \NC \NR
 \LL
 \stoptabulate
 
-\subsection{special}
+\stopsubsection
 
-\starttabulate[|l|l|p|]
-\DB field  \BC type \BC explanation \NC \NR
-\TB
-\NC \type{prescript} \NC string \NC special text \NC \NR
-\LL
-\stoptabulate
+\startsubsection[title={stop_bounds, stop_clip, stop_group}]
 
-\subsection{start_bounds, start_clip}
+Here we have only one key:
 
 \starttabulate[|l|l|p|]
 \DB field  \BC type \BC explanation \NC \NR
 \TB
-\NC \type{path} \NC table \NC the list of knots \NC \NR
+\NC \type{stacking} \NC number \NC the stacking (level) \NC \NR
 \LL
 \stoptabulate
 
-\subsubsection{stop_bounds, stop_clip}
+\stopsubsection
 
-Here are no fields available.
-
 \stopsection
 
 \startsection[title={Subsidiary table formats}]
 
-\subsection{Paths and pens}
+\startsubsection[title={Paths and pens}]
 
 Paths and pens (that are really just a special type of paths as far as \MPLIB\ is
 concerned) are represented by an array where each entry is a table that
@@ -358,8 +490,10 @@
 extra key \type {type} with value \type {elliptical} besides the array part
 containing the knot list.
 
-\subsection{Colors}
+\stopsubsection
 
+\startsubsection[title={Colors}]
+
 A color is an integer array with 0, 1, 3 or 4 values:
 
 \starttabulate[|l|l|p|]
@@ -376,8 +510,10 @@
 initialized to the values representing \quote {black} in the colorspace \type
 {defaultcolormodel} that was in effect at the time of the \type {shipout}.
 
-\subsection{Transforms}
+\stopsubsection
 
+\startsubsection[title={Transforms}]
+
 Each transform is a six|-|item array.
 
 \starttabulate[|l|l|p|]
@@ -395,8 +531,10 @@
 Note that the translation (index 1 and 2) comes first. This differs from the
 ordering in \POSTSCRIPT, where the translation comes last.
 
-\subsection{Dashes}
+\stopsubsection
 
+\startsubsection[title={Dashes}]
+
 Each \type {dash} is a hash with two items. We use the same model as \POSTSCRIPT\
 for the representation of the dashlist. \type {dashes} is an array of \quote {on}
 and \quote {off}, values, and \type {offset} is the phase of the pattern.
@@ -409,11 +547,13 @@
 \LL
 \stoptabulate
 
-\subsection{Pens and \type {pen_info}}
+\stopsubsection
 
-\libindex{pen_info}
+\startsubsection[title={Pens and \type {peninfo}}]
 
-There is helper function (\type {pen_info(obj)}) that returns a table containing
+\libindex{peninfo}
+
+There is helper function (\type {peninfo(obj)}) that returns a table containing
 a bunch of vital characteristics of the used pen (all values are floats):
 
 \starttabulate[|l|l|p|]
@@ -429,8 +569,10 @@
 \LL
 \stoptabulate
 
-\subsection[title={Character size information}]
+\stopsubsection
 
+\startsubsection[title={Character size information}]
+
 \libindex{char_width}
 \libindex{char_height}
 \libindex{char_depth}
@@ -445,6 +587,8 @@
 <number> d = char_depth(mp,<string> fontname, <number> char)
 \stopfunctioncall
 
+\stopsubsection
+
 \stopsection
 
 \startsection[title=Scanners]
@@ -457,49 +601,31 @@
 \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
+\NC \type{scannext}       \NC instance, keep         \NC token, mode, type \NC \NR
+\NC \type{scanexpression} \NC instance, keep         \NC type \NC \NR
+\NC \type{scantoken}      \NC instance, keep         \NC token, mode, kind \NC \NR
+\NC \type{scansymbol}     \NC instance, keep, expand \NC string \NC \NR
+\NC \type{scannumeric}    \NC instance, type         \NC number \NC \NR
+\NC \type{scaninteger}    \NC instance, type         \NC integer \NC \NR
+\NC \type{scanboolean}    \NC instance, type         \NC boolean \NC \NR
+\NC \type{scanstring}     \NC instance, type         \NC string \NC \NR
+\NC \type{scanpair}       \NC instance, hashed, type \NC table or two numbers \NC \NR
+\NC \type{scancolor}      \NC instance, hashed, type \NC table or three numbers \NC \NR
+\NC \type{scancmykcolor}  \NC instance, hashed, type \NC table or four numbers \NC \NR
+\NC \type{scantransform}  \NC instance, hashed, type \NC table or six numbers \NC \NR
+\NC \type{scanpath}       \NC instance, hashed, type \NC table with hashes or arrays \NC \NR
+\NC \type{scanpen}        \NC instance, hashed, type \NC table with hashes or arrays \NC \NR
+\NC \type{scanproperty}   \NC {\em todo}             \NC \NC \NR
+\HL
+\NC \type{skiptoken}      \NC {\em todo}             \NC \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()}:
+be queried with \ctxlua {document.showmpcodes ("gettypes")}, and command codes
+with \ctxlua {document.showmpcodes ("getcodes")}
 
-\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)
@@ -507,6 +633,38 @@
 look|-|ahead and push|-|back issues that originate in the way \METAPOST\ scans
 its input.
 
+The supported color models are: \ctxlua {document.showmpcodes ("getcolormodels")}.
+
+If you want the internal codes of the possible fields in a graphic object use
+\ctxlua {document.showmpcodes ("getobjecttypes")}. You can query the id of a
+graphic object with the \type {gettype} function.
+
+\startluacode
+local t = mplib.getobjecttypes()
+local f = mplib.getfields()
+context.starttabulate { "|T|T|Tpl|" }
+    context.DB()
+        context("id")
+    context.BC()
+        context("object")
+    context.BC()
+        context("fields")
+    context.NC()
+    context.NR()
+    for i=1,#t do
+        context.NC()
+            context(i)
+        context.NC()
+            context(t[i])
+        context.NC()
+            context("% t",f[i])
+        context.NC()
+        context.NR()
+    end
+    context.LL()
+context.stoptabulate()
+\stopluacode
+
 \stopsection
 
 \startsection[title=Injectors]
@@ -521,15 +679,16 @@
 \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
+\NC \type{injectnumeric}   \NC instance, number \NC \NR
+\NC \type{injectinteger}   \NC instance, number \NC \NR
+\NC \type{injectboolean}   \NC instance, boolean \NC \NR
+\NC \type{injectstring}    \NC instance, string \NC \NR
+\NC \type{injectpair}      \NC instance, (table with) two numbers \NC \NR
+\NC \type{injectcolor}     \NC instance, (table with) three numbers \NC \NR
+\NC \type{injectcmykcolor} \NC instance, (table with) four numbers \NC \NR
+\NC \type{injecttransform} \NC instance, (table with) six numbers \NC \NR
+\NC \type{injectpath}      \NC instance, table with hashes or arrays, cycle, variant \NC \NR
+\NC \type{injectwhatever}  \NC instance, ont of the above depending on type and size \NC \NR
 \LL
 \stoptabulate
 
@@ -540,8 +699,65 @@
 setting the \type {curl} values to~1 automatically. \footnote {This is all
 experimental so future versions might provide more control.}
 
+This is the simplest path definition:
+
+\starttyping
+{
+    { x, y },
+    ...,
+    cycle = true
+}
+\stoptyping
+
+and this one also has the control points:
+
+\starttyping
+{
+    { x0, y0, x1, y1, x2, y2 },
+    ...,
+    cycle = true
+}
+\stoptyping
+
+A very detailed specification is this but you have to make sure that the
+parameters make sense.
+
+\starttyping
+{
+    {
+        x_coord       = ...,
+        y_coord       = ...,
+        left_x        = ...,
+        left_y        = ...,
+        right_x       = ...,
+        right_y       = ...,
+        left_tension  = ...,
+        right_tension = ...,
+        left_curl     = ...,
+        right_curl    = ...,
+        direction_x   = ...,
+        direction_y   = ...,
+        left_type     = ...,
+        right_type    = ...,
+    },
+    ...,
+    cycle = true
+}
+\stoptyping
+
+Instead of the optional keyword \type {cycle} you can use \type {close}.
+
 \stopsection
 
+\startsection[title={To be checked}]
+
+\starttyping
+% solvepath
+% expandtex
+\stoptyping
+
+\stopsection
+
 \stopchapter
 
 \stopcomponent

Modified: trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex
===================================================================
--- trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex	2023-02-26 14:42:54 UTC (rev 66175)
+++ trunk/Master/texmf-dist/doc/context/sources/general/manuals/luametatex/luametatex-modifications.tex	2023-02-26 14:44:25 UTC (rev 66176)
@@ -1,4 +1,4 @@
-% language=uk
+% language=us runpath=texruns:manuals/luametatex
 
 \environment luametatex-style
 
@@ -48,14 +48,23 @@
 especially not in a time when users often search instead of read from cover to
 cover.
 
+Occasionally there are extensions to \PDFTEX\ and \LUATEX\ but these are unlikely
+to en dup in \LUAMETATEX. If needed one can add functionality using \LUA. Another
+reason is that because the way we handle files and generate output being
+compatible would only harm the engine. We have some fundamental extensions that
+overcome limitations anyway. One area where the are significate changes is in
+logging: at some point it no longer made sense to be compatible (with \LUATEX)
+because we carry around more information.
+
 \stopsubsection
 
-\startsubsection[title=Changes from \TEX\ 3.1415926...]
+\startsubsection[title={Original \TEX}]
 
 \topicindex {\TEX}
 
-Of course it all starts with traditional \TEX. Even if we started with \PDFTEX,
-most still comes from original Knuthian \TEX. But we divert a bit.
+Of course it all starts with traditional \TEX. Even if we started with the
+\PDFTEX\ code base, most still comes from original Knuthian \TEX. But we divert a
+bit.
 
 \startitemize
 
@@ -78,16 +87,21 @@
 \stopitem
 
 \startitem
-    See \in {chapter} [languages] for many small changes related to paragraph
-    building, language handling and hyphenation. The most important change is
-    that adding a brace group in the middle of a word (like in \type {of{}fice})
-    does not prevent ligature creation. Also, the hyphenation, ligature building
-    and kerning has been split so that we can hook in alternative or extra code
-    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. Control over discretionaries is more granular and
-    now managed by less variables.
+    See \in {chapter} [languages] for quite some changes related to paragraph
+    building, language handling and hyphenation. Because we have independent runs
+    over the node list for hyphenation, kerning, ligature building, plus
+    callbacks that also can tweak the list, adding a brace group in the middle of
+    a word (like in \type {of{}fice}) does not prevent ligature creation. In
+    fact, preventing kerns and ligatures can now be done with glyph options so
+    that we don't depend on side effects of the engine. Because hyphenation,
+    ligature building and kerning has been split so that we can hook in
+    alternative or extra code 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. Control over
+    discretionaries is more granular and now managed by less variables. Although
+    \LUAMETATEX\ behaves pretty much like you expect from \TEX, due to the many
+    possibilities it is unlikely that you get identical output.
 \stopitem
 
 \startitem
@@ -94,16 +108,22 @@
     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. 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.
+    to remove some constraints. Token and node memory management is a bit more
+    efficient which was needed because we carry around more information. 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
+    The macro (definition and expansion) parsers are extended and we can have more
+    detailed argument parsing. This has been done in a way that keeps compatibility.
+\stopitem
+
+\startitem
     The specifier \type {plus 1 fillll} does not generate an error. The extra
     \quote {l} is simply typeset.
 \stopitem
@@ -113,31 +133,45 @@
 \stopitem
 
 \startitem
-    Because the backend is not built|-|in, the magnification (\prm {mag})
-    primitive is not doing nothing. A \type {shipout} just discards the content
-    of the given box. The write related primitives have to be implemented in the
-    used macro package using \LUA. None of the \PDFTEX\ derived primitives is
-    present.
+    Because the backend is not built|-|in, the magnification (\tex {mag})
+    primitive is gone. A \tex {shipout} command just discards the content of the
+    given box. The write related primitives have to be implemented in the used
+    macro package using \LUA. None of the \PDFTEX\ derived primitives is present.
 \stopitem
 
 \startitem
-    There is more control over some (formerly hard|-|coded) math properties. In fact,
-    there is a whole extra bit of math related code because we need to deal with
-    \OPENTYPE\ fonts.
+    Because there is no font loader, a \LUA\ variant is free to either support or
+    not the \OMEGA\ \type {ofm} file format. As there are hardly any such fonts
+    it probably makes no sense. There is plenty of control over the way glyphs
+    get treated and scaling of fonts and glyphs is also more dynamic.
 \stopitem
 
 \startitem
-    The \type {\outer} and \type {\long} prefixed are silently ignored. It is
-    permitted to use \type {\par} in math.
+    There is more control over some (formerly hard|-|coded) math properties. In
+    fact, there is a whole extra bit of math related code because we need to deal
+    with \OPENTYPE\ fonts. The math processing has been adapted to the new
+    (dynamic) font and glyph scaling features. Because there is more granular
+    control, for instance because there are more classes, the engine has to be
+    set up differently. This is also true for features that control how for
+    instance math fonts are processed. An intermediate, improved, variant of the
+    \LUATEX\ dual code path approach has been sacrificed in the process.
 \stopitem
 
 \startitem
-    Because there is no font loader, a \LUA\ variant is free to either support or
-    not the \OMEGA\ \type {ofm} file format. As there are hardly any such fonts
-    it probably makes no sense.
+    Math atoms and constructs like fractions, fences, radicals and accents have
+    all been extended. The new variants accept all kind of keywords that control
+    the rendering. As direct consequence noads (and nodes in general) are much
+    bigger in terms of memory usage. For now we keep the old commands available
+    but that might change when we see no eight bit fonts being used.
 \stopitem
 
 \startitem
+    The \prm {outer} and \prm {long} prefixed are silently ignored but other
+    prefixes have been added. It is permitted to use \prm {par} in math and
+    there are more such convenience options.
+\stopitem
+
+\startitem
     The lack of a backend means that some primitives related to it are not
     implemented. This is no big deal because it is possible to use the scanner
     library to implement them as needed, which depends on the macro package and
@@ -152,14 +186,19 @@
 
 \stopitemize
 
+There is much more to say here but at least this gives an idea of what you end up
+with if you move from traditional \TEX\ to \LUAMETATEX: a more complex but also
+more flexible system.
+
 \stopsubsection
 
-\startsubsection[title=Changes from \ETEX\ 2.2]
+\startsubsection[title={Goodies from \ETEX}]
 
 \topicindex {\ETEX}
 
-Being the de|-|facto standard extension of course we provide the \ETEX\
-features, but with a few small adaptations.
+Being the de|-|facto standard extension of course we provide the \ETEX\ features,
+but only those that make sense. We used version 2.2 which is basically the only
+version that was ever released.
 
 \startitemize
 
@@ -172,14 +211,19 @@
     The \TEXXET\ extension is not present, so the primitives \type
     {\TeXXeTstate}, \type {\beginR}, \type {\beginL}, \type {\endR} and \type
     {\endL} are missing. Instead we used the \OMEGA|/|\ALEPH\ approach to
-    directionality as starting point, albeit it has been changed quite a bit,
-    so that we're probably not that far from \TEXXET.
+    directionality as starting point, albeit it has been changed quite a bit, so
+    that we're probably not that far from \TEXXET. In the end right to left
+    typesetting mostly boils down to marking regions in the node list and reverse
+    flushing these in the backend. The main addition that \OMEGA\ brought was the
+    initial paragraph node that stores the direction.
 \stopitem
 
 \startitem
     Some of the tracing information that is output by \ETEX's \prm
-    {tracingassigns} and \prm {tracingrestores} is not there. Also keep in mind
-    that tracing doesn't involve what \LUA\ does.
+    {tracingassigns} and \prm {tracingrestores} is not there. Where \ETEX\ added
+    some tracing, \LUAMETATEX\ adds much more and also permits to set details.
+    Tracing is not compatible, if only because we have more complex nodes and do
+    more in all kind of mechanism.
 \stopitem
 
 \startitem
@@ -192,11 +236,11 @@
     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.
+    abstraction. All these properties can be queried via \LUA.
 \stopitem
 
 \startitem
-    The \type {\scantokens} primitive is now using the same mechanism as \LUA\
+    The \prm {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.
@@ -203,74 +247,88 @@
 \stopitem
 
 \startitem
+    The \ETEX\ engine provides \prm {protected} and although we have that too,
+    the implementation is different. Users should not notice that.
+\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
+    The \tex {readline} primitive has to be implemented in \LUA. This is a side
     effect of delegating all file \IO.
 \stopitem
 
+\startitem
+    Most of the code is rewritten but the original primitives are still tagged as
+    coming from \ETEX.
+\stopitem
+
 \stopitemize
 
 \stopsubsection
 
-\startsubsection[title=Changes from \PDFTEX\ 1.40]
+\startsubsection[title={Bits of \PDFTEX}]
 
 \topicindex {\PDFTEX}
 
 Because we want to produce \PDF\ the most natural starting point was the popular
-\PDFTEX\ program. We inherit the stable features, dropped most of the
-experimental code and promoted some functionality to core \LUATEX\ functionality
-which in turn triggered renaming primitives. However, as the backend was dropped,
-not that much from \PDFTEX\ is present any more. Basically all we now inherit
-from \PDFTEX\ is expansion and protrusion but even that has been adapted. So
-don't expect \LUAMETATEX\ to be compatible.
+\PDFTEX\ program, so we took version 1.40. We inherit the stable features,
+dropped most of the experimental code and promoted some functionality to core
+\LUATEX\ functionality which in turn triggered renaming primitives. However, as
+the backend was dropped, not that much from \PDFTEX\ is present any more.
+Basically all we now inherit from \PDFTEX\ is expansion and protrusion but even
+that has been adapted. So don't expect \LUAMETATEX\ to be compatible.
 
 \startitemize
 
 \startitem
-    The experimental primitives \lpr {ifabsnum} and \lpr {ifabsdim} have been
-    promoted to core primitives.
+    The experimental primitives \prm {ifabsnum} and \prm {ifabsdim} have been
+    promoted to core primitives and became part of the much larger repertoire
+    of \LUAMETATEX\ conditionals. The primitives \prm {ifincsname} is also
+    inherited but has a different implementation.
 \stopitem
 
 \startitem
-    The primitives \lpr {ifincsname}, \lpr {expanded} and \lpr {quitvmode}
-    have become core primitives.
+    Of course \prm {quitvmode} has become a core primitive too.
 \stopitem
 
 \startitem
     As the hz (expansion) and protrusion mechanism are part of the core the
-    related primitives \lpr {lpcode}, \lpr {rpcode}, \lpr {efcode}, \lpr
-    {leftmarginkern}, \lpr {rightmarginkern} are promoted to core primitives. The
-    two commands \lpr {protrudechars} and \lpr {adjustspacing} control these
-    processes.
+    related primitives \prm {lpcode}, \prm {rpcode}, \prm {efcode}, \prm
+    {leftmarginkern}, \prm {rightmarginkern} are promoted to core primitives. The
+    two commands \prm {protrudechars} and \prm {adjustspacing} control these
+    processes. The protrusion and kern related primitives are now dimensions
+    while expansion is still one of these 1000 based scales.
 \stopitem
 
 \startitem
     In \LUAMETATEX\ three extra primitives can be used to overload the font
-    specific settings: \lpr {adjustspacingstep} (max: 100), \lpr
-    {adjustspacingstretch} (max: 1000) and \lpr {adjustspacingshrink} (max: 500).
+    specific settings: \prm {adjustspacingstep} (max: 100), \prm
+    {adjustspacingstretch} (max: 1000) and \prm {adjustspacingshrink} (max: 500).
 \stopitem
 
 \startitem
-    The hz optimization code has been partially redone so that we no longer need
-    to create extra font instances. The front- and backend have been decoupled
-    and the glyph and kern nodes carry the used values. In \LUATEX\ that made a
-    more efficient generation of \PDF\ code possible. It also resulted in much
-    cleaner code. The backend code is gone, but of course the information is
-    still carried around.
+    The hz optimization code has been redone so that we no longer need to create
+    extra font instances. The front- and backend have been decoupled and the
+    glyph and kern nodes carry the used values. In \LUATEX\ that made a more
+    efficient generation of \PDF\ code possible. It also resulted in much cleaner
+    code. The backend code is gone, but of course the information is still

@@ Diff output truncated at 1234567 characters. @@


More information about the tex-live-commits mailing list.