summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-05-18 23:36:26 +0000
committerKarl Berry <karl@freefriends.org>2014-05-18 23:36:26 +0000
commit49cdd10ba6dfc461ce5e70b61695ba2aba0cbeb7 (patch)
tree040f532958cd03ab74d9a1eace2a064fd7ed2695 /Master
parentd64820a42321d65868c63bd49e657b88c58967bb (diff)
context from May 18 beta/cont-tmf.zip (11854476 bytes)
git-svn-id: svn://tug.org/texlive/trunk@34112 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
l---------Master/bin/alpha-linux/contextjit1
l---------Master/bin/alpha-linux/ctxtools1
l---------Master/bin/alpha-linux/mtxrunjit1
l---------Master/bin/alpha-linux/pstopdf1
l---------Master/bin/amd64-freebsd/contextjit1
l---------Master/bin/amd64-freebsd/ctxtools1
l---------Master/bin/amd64-freebsd/mtxrunjit1
l---------Master/bin/amd64-freebsd/pstopdf1
l---------Master/bin/amd64-kfreebsd/contextjit1
l---------Master/bin/amd64-kfreebsd/ctxtools1
l---------Master/bin/amd64-kfreebsd/mtxrunjit1
l---------Master/bin/amd64-kfreebsd/pstopdf1
l---------Master/bin/amd64-netbsd/contextjit1
l---------Master/bin/amd64-netbsd/ctxtools1
l---------Master/bin/amd64-netbsd/mtxrunjit1
l---------Master/bin/amd64-netbsd/pstopdf1
l---------Master/bin/armel-linux/contextjit1
l---------Master/bin/armel-linux/ctxtools1
l---------Master/bin/armel-linux/mtxrunjit1
l---------Master/bin/armel-linux/pstopdf1
l---------Master/bin/armhf-linux/contextjit1
l---------Master/bin/armhf-linux/ctxtools1
l---------Master/bin/armhf-linux/mtxrunjit1
l---------Master/bin/armhf-linux/pstopdf1
l---------Master/bin/i386-cygwin/contextjit1
l---------Master/bin/i386-cygwin/ctxtools1
l---------Master/bin/i386-cygwin/mtxrunjit1
l---------Master/bin/i386-cygwin/pstopdf1
l---------Master/bin/i386-freebsd/contextjit1
l---------Master/bin/i386-freebsd/ctxtools1
l---------Master/bin/i386-freebsd/mtxrunjit1
l---------Master/bin/i386-freebsd/pstopdf1
l---------Master/bin/i386-kfreebsd/contextjit1
l---------Master/bin/i386-kfreebsd/ctxtools1
l---------Master/bin/i386-kfreebsd/mtxrunjit1
l---------Master/bin/i386-kfreebsd/pstopdf1
l---------Master/bin/i386-linux/contextjit1
l---------Master/bin/i386-linux/ctxtools1
l---------Master/bin/i386-linux/mtxrunjit1
l---------Master/bin/i386-linux/pstopdf1
l---------Master/bin/i386-netbsd/contextjit1
l---------Master/bin/i386-netbsd/ctxtools1
l---------Master/bin/i386-netbsd/mtxrunjit1
l---------Master/bin/i386-netbsd/pstopdf1
l---------Master/bin/i386-solaris/contextjit1
l---------Master/bin/i386-solaris/ctxtools1
l---------Master/bin/i386-solaris/mtxrunjit1
l---------Master/bin/i386-solaris/pstopdf1
l---------Master/bin/mipsel-linux/contextjit1
l---------Master/bin/mipsel-linux/ctxtools1
l---------Master/bin/mipsel-linux/mtxrunjit1
l---------Master/bin/mipsel-linux/pstopdf1
l---------Master/bin/powerpc-linux/contextjit1
l---------Master/bin/powerpc-linux/ctxtools1
l---------Master/bin/powerpc-linux/mtxrunjit1
l---------Master/bin/powerpc-linux/pstopdf1
l---------Master/bin/sparc-solaris/contextjit1
l---------Master/bin/sparc-solaris/ctxtools1
l---------Master/bin/sparc-solaris/mtxrunjit1
l---------Master/bin/sparc-solaris/pstopdf1
l---------Master/bin/universal-darwin/contextjit1
l---------Master/bin/universal-darwin/ctxtools1
l---------Master/bin/universal-darwin/mtxrunjit1
l---------Master/bin/universal-darwin/pstopdf1
-rwxr-xr-xMaster/bin/win32/context.exebin1536 -> 4608 bytes
-rwxr-xr-xMaster/bin/win32/ctxtools.exebin1536 -> 0 bytes
-rwxr-xr-xMaster/bin/win32/luatools.exebin1536 -> 4608 bytes
-rwxr-xr-xMaster/bin/win32/mtxrun.dllbin6656 -> 7680 bytes
-rwxr-xr-xMaster/bin/win32/mtxrun.exebin1536 -> 4608 bytes
-rwxr-xr-xMaster/bin/win32/mtxrun.lua22
-rwxr-xr-xMaster/bin/win32/mtxrunjit.exebin0 -> 4608 bytes
-rwxr-xr-xMaster/bin/win32/pstopdf.exebin1536 -> 0 bytes
-rwxr-xr-xMaster/bin/win32/texexec.exebin1536 -> 4608 bytes
-rwxr-xr-xMaster/bin/win32/texmfstart.exebin1536 -> 4608 bytes
l---------Master/bin/x86_64-cygwin/contextjit1
l---------Master/bin/x86_64-cygwin/ctxtools1
l---------Master/bin/x86_64-cygwin/mtxrunjit1
l---------Master/bin/x86_64-cygwin/pstopdf1
l---------Master/bin/x86_64-darwin/contextjit1
l---------Master/bin/x86_64-darwin/ctxtools1
l---------Master/bin/x86_64-darwin/mtxrunjit1
l---------Master/bin/x86_64-darwin/pstopdf1
l---------Master/bin/x86_64-linux/contextjit1
l---------Master/bin/x86_64-linux/ctxtools1
l---------Master/bin/x86_64-linux/mtxrunjit1
l---------Master/bin/x86_64-linux/pstopdf1
l---------Master/bin/x86_64-solaris/contextjit1
l---------Master/bin/x86_64-solaris/ctxtools1
l---------Master/bin/x86_64-solaris/mtxrunjit1
l---------Master/bin/x86_64-solaris/pstopdf1
-rw-r--r--Master/texmf-dist/context/data/scite/context/documents/scite-context-readme.pdf (renamed from Master/texmf-dist/context/data/scite/documents/scite-context-readme.pdf)bin221437 -> 221437 bytes
-rw-r--r--Master/texmf-dist/context/data/scite/context/documents/scite-context-readme.tex (renamed from Master/texmf-dist/context/data/scite/documents/scite-context-readme.tex)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/documents/scite-context-visual.pdf (renamed from Master/texmf-dist/context/data/scite/documents/scite-context-visual.pdf)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/documents/scite-context-visual.png (renamed from Master/texmf-dist/context/data/scite/documents/scite-context-visual.png)bin77849 -> 77849 bytes
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua (renamed from Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-context.lua)4
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-interfaces.lua (renamed from Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-interfaces.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metafun.lua4
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua (renamed from Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-metapost.lua)2
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua (renamed from Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-tex.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/lexer.lua (renamed from Master/texmf-dist/context/data/scite/lexers/lexer.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-bibtex.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-bibtex.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-cld.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-cld.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-cpp-web.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-cpp-web.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-cpp.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-cpp.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-lua-longstring.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua-longstring.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-lua.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-mps.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-mps.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-pdf-object.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-pdf-object.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-pdf-xref.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-pdf-xref.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-pdf.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-pdf.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-tex-web.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-tex-web.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-tex.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-tex.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-txt.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-txt.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-web-snippets.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-web-snippets.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-web.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-web.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml-cdata.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml-cdata.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml-comment.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml-comment.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml-script.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml-script.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer.lua (renamed from Master/texmf-dist/context/data/scite/lexers/scite-context-lexer.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/lexers/themes/scite-context-theme.lua (renamed from Master/texmf-dist/context/data/scite/lexers/themes/scite-context-theme.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties (renamed from Master/texmf-dist/context/data/scite/scite-context-data-context.properties)77
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-data-interfaces.properties (renamed from Master/texmf-dist/context/data/scite/scite-context-data-interfaces.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-data-metafun.properties (renamed from Master/texmf-dist/context/data/scite/scite-context-data-metafun.properties)3
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties (renamed from Master/texmf-dist/context/data/scite/scite-context-data-metapost.properties)2
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties (renamed from Master/texmf-dist/context/data/scite/scite-context-data-tex.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-external.properties (renamed from Master/texmf-dist/context/data/scite/scite-context-external.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-internal.properties (renamed from Master/texmf-dist/context/data/scite/scite-context-internal.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context-user.properties (renamed from Master/texmf-dist/context/data/scite/scite-context-user.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-context.properties (renamed from Master/texmf-dist/context/data/scite/scite-context.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-ctx-context.properties (renamed from Master/texmf-dist/context/data/scite/scite-ctx-context.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-ctx-example.properties (renamed from Master/texmf-dist/context/data/scite/scite-ctx-example.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-ctx.lua (renamed from Master/texmf-dist/context/data/scite/scite-ctx.lua)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-ctx.properties (renamed from Master/texmf-dist/context/data/scite/scite-ctx.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-metapost.properties (renamed from Master/texmf-dist/context/data/scite/scite-metapost.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-pragma.properties (renamed from Master/texmf-dist/context/data/scite/scite-pragma.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/context/scite-tex.properties (renamed from Master/texmf-dist/context/data/scite/scite-tex.properties)0
-rw-r--r--Master/texmf-dist/context/data/scite/documents/scite-context-visual.tex52
-rw-r--r--Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-metafun.lua4
-rw-r--r--Master/texmf-dist/doc/man/man1/context.man1.pdfbin7609 -> 7613 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/ctxtools.175
-rw-r--r--Master/texmf-dist/doc/man/man1/ctxtools.man1.pdfbin5094 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/luatools.man1.pdfbin5102 -> 5105 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdfbin3672 -> 3673 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-base.man1.pdfbin5122 -> 5124 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdfbin3495 -> 3493 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdfbin3708 -> 3708 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdfbin3565 -> 3566 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-check.man1.pdfbin3582 -> 3581 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdfbin3443 -> 3442 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-context.man1.pdfbin7609 -> 7613 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdfbin3537 -> 3536 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdfbin3960 -> 3960 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdfbin3669 -> 3669 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdfbin4211 -> 4207 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdfbin3547 -> 3545 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdfbin4106 -> 4105 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdfbin3713 -> 3711 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-metatex.man1.pdfbin3630 -> 3630 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdfbin3758 -> 3761 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-package.man1.pdfbin3569 -> 3568 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdfbin4085 -> 4084 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdfbin3696 -> 3695 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdfbin3704 -> 3711 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdfbin3688 -> 3691 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdfbin3637 -> 3636 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdfbin3751 -> 3752 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-server.man1.pdfbin3752 -> 3752 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdfbin3559 -> 3558 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdfbin3681 -> 3679 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdfbin3991 -> 3995 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdfbin3600 -> 3597 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-update.man1.pdfbin5031 -> 5030 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdfbin3867 -> 3868 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdfbin3856 -> 3859 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/mtxrun.man1.pdfbin7033 -> 7032 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/pstopdf.130
-rw-r--r--Master/texmf-dist/doc/man/man1/pstopdf.man1.pdfbin3558 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/texexec.man1.pdfbin4709 -> 4713 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/texmfstart.man1.pdfbin7033 -> 7032 bytes
-rw-r--r--Master/texmf-dist/metapost/context/base/mp-base.mpiv11
-rw-r--r--Master/texmf-dist/metapost/context/base/mp-form.mpiv2
-rw-r--r--Master/texmf-dist/metapost/context/base/mp-mlib.mpiv3
-rw-r--r--Master/texmf-dist/metapost/context/base/mp-tool.mpiv9
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-context.lua3
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-plain.lua6
-rwxr-xr-xMaster/texmf-dist/scripts/context/lua/mtxrun.lua22
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/install/first-setup.bat87
-rw-r--r--Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua22
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/mswin/mtxrunjit.exebin0 -> 4608 bytes
-rw-r--r--Master/texmf-dist/scripts/context/stubs/setup/setuptex167
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/setup/setuptex.bat70
-rw-r--r--Master/texmf-dist/scripts/context/stubs/setup/setuptex.csh164
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/unix/contextjit5
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/unix/ctxtools2
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/unix/mptopdf2
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/unix/mtxrun22
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/unix/mtxrunjit5
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/unix/pstopdf2
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/win64/contextjit.exebin0 -> 15360 bytes
-rw-r--r--Master/texmf-dist/scripts/context/stubs/win64/mtxrun.lua22
-rwxr-xr-xMaster/texmf-dist/scripts/context/stubs/win64/mtxrunjit.exebin0 -> 15360 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/back-exp.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/back-ini.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/back-ini.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/base/back-u3d.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/char-ini.lua53
-rw-r--r--Master/texmf-dist/tex/context/base/cont-new.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/context-version.pdfbin4056 -> 4283 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/context.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/data-tex.lua28
-rw-r--r--Master/texmf-dist/tex/context/base/font-con.lua7
-rw-r--r--Master/texmf-dist/tex/context/base/font-otb.lua38
-rw-r--r--Master/texmf-dist/tex/context/base/font-otc.lua9
-rw-r--r--Master/texmf-dist/tex/context/base/grph-inc.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/l-lpeg.lua7
-rw-r--r--Master/texmf-dist/tex/context/base/lpdf-grp.lua4
-rw-r--r--Master/texmf-dist/tex/context/base/lpdf-ini.lua23
-rw-r--r--Master/texmf-dist/tex/context/base/lpdf-u3d.lua10
-rw-r--r--Master/texmf-dist/tex/context/base/lxml-ini.mkiv155
-rw-r--r--Master/texmf-dist/tex/context/base/lxml-tex.lua84
-rw-r--r--Master/texmf-dist/tex/context/base/m-pipemode.mkiv7
-rw-r--r--Master/texmf-dist/tex/context/base/math-frc.mkiv45
-rw-r--r--Master/texmf-dist/tex/context/base/math-ini.mkiv6
-rw-r--r--Master/texmf-dist/tex/context/base/math-map.lua251
-rw-r--r--Master/texmf-dist/tex/context/base/math-noa.lua34
-rw-r--r--Master/texmf-dist/tex/context/base/meta-ini.mkiv1
-rw-r--r--Master/texmf-dist/tex/context/base/mlib-lua.lua77
-rw-r--r--Master/texmf-dist/tex/context/base/mult-de.mkii1
-rw-r--r--Master/texmf-dist/tex/context/base/mult-def.lua3
-rw-r--r--Master/texmf-dist/tex/context/base/mult-def.mkiv3
-rw-r--r--Master/texmf-dist/tex/context/base/mult-en.mkii1
-rw-r--r--Master/texmf-dist/tex/context/base/mult-fr.mkii1
-rw-r--r--Master/texmf-dist/tex/context/base/mult-fun.lua1
-rw-r--r--Master/texmf-dist/tex/context/base/mult-it.mkii1
-rw-r--r--Master/texmf-dist/tex/context/base/mult-low.lua3
-rw-r--r--Master/texmf-dist/tex/context/base/mult-mps.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/mult-nl.mkii1
-rw-r--r--Master/texmf-dist/tex/context/base/mult-pe.mkii1
-rw-r--r--Master/texmf-dist/tex/context/base/mult-ro.mkii1
-rw-r--r--Master/texmf-dist/tex/context/base/node-acc.lua12
-rw-r--r--Master/texmf-dist/tex/context/base/node-typ.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/pack-mrl.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/page-lin.mkiv557
-rw-r--r--Master/texmf-dist/tex/context/base/page-mix.mkiv3
-rw-r--r--Master/texmf-dist/tex/context/base/publ-dat.lua46
-rw-r--r--Master/texmf-dist/tex/context/base/publ-imp-cite.mkiv223
-rw-r--r--Master/texmf-dist/tex/context/base/publ-ini.lua1276
-rw-r--r--Master/texmf-dist/tex/context/base/publ-ini.mkiv264
-rw-r--r--Master/texmf-dist/tex/context/base/s-math-coverage.lua158
-rw-r--r--Master/texmf-dist/tex/context/base/s-math-coverage.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/spac-chr.lua14
-rw-r--r--Master/texmf-dist/tex/context/base/spac-chr.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/base/status-files.pdfbin24657 -> 24609 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/status-lua.pdfbin242871 -> 244006 bytes
-rw-r--r--Master/texmf-dist/tex/context/base/strc-ref.lua2
-rw-r--r--Master/texmf-dist/tex/context/base/strc-ref.mkvi15
-rw-r--r--Master/texmf-dist/tex/context/base/tabl-ntb.mkiv27
-rw-r--r--Master/texmf-dist/tex/context/base/tabl-tbl.mkiv3
-rw-r--r--Master/texmf-dist/tex/context/base/trac-deb.lua7
-rw-r--r--Master/texmf-dist/tex/context/base/trac-log.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-cambria.mkiv8
-rw-r--r--Master/texmf-dist/tex/context/base/type-imp-lato.mkiv56
-rw-r--r--Master/texmf-dist/tex/context/base/util-str.lua7
-rw-r--r--Master/texmf-dist/tex/context/base/x-asciimath.lua6
-rw-r--r--Master/texmf-dist/tex/context/base/x-asciimath.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/base/x-mathml.lua2
-rw-r--r--Master/texmf-dist/tex/context/fonts/lm-math.lfg2
-rw-r--r--Master/texmf-dist/tex/context/fonts/lm.lfg15
-rw-r--r--Master/texmf-dist/tex/context/interface/keys-cs.xml1
-rw-r--r--Master/texmf-dist/tex/context/interface/keys-de.xml1
-rw-r--r--Master/texmf-dist/tex/context/interface/keys-en.xml1
-rw-r--r--Master/texmf-dist/tex/context/interface/keys-fr.xml1
-rw-r--r--Master/texmf-dist/tex/context/interface/keys-it.xml1
-rw-r--r--Master/texmf-dist/tex/context/interface/keys-nl.xml1
-rw-r--r--Master/texmf-dist/tex/context/interface/keys-pe.xml1
-rw-r--r--Master/texmf-dist/tex/context/interface/keys-ro.xml1
-rw-r--r--Master/texmf-dist/tex/context/patterns/word-xx.lua14
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-basics-gen.lua13
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-enc.lua7
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua63
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-math.tex79
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-test.tex26
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds8
-rw-r--r--Master/tlpkg/tlpsrc/context.tlpsrc6
285 files changed, 2899 insertions, 1908 deletions
diff --git a/Master/bin/alpha-linux/contextjit b/Master/bin/alpha-linux/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/alpha-linux/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/alpha-linux/ctxtools b/Master/bin/alpha-linux/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/alpha-linux/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/alpha-linux/mtxrunjit b/Master/bin/alpha-linux/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/alpha-linux/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/alpha-linux/pstopdf b/Master/bin/alpha-linux/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/alpha-linux/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/amd64-freebsd/contextjit b/Master/bin/amd64-freebsd/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/amd64-freebsd/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/amd64-freebsd/ctxtools b/Master/bin/amd64-freebsd/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/amd64-freebsd/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/amd64-freebsd/mtxrunjit b/Master/bin/amd64-freebsd/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/amd64-freebsd/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/amd64-freebsd/pstopdf b/Master/bin/amd64-freebsd/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/amd64-freebsd/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/amd64-kfreebsd/contextjit b/Master/bin/amd64-kfreebsd/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/amd64-kfreebsd/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/amd64-kfreebsd/ctxtools b/Master/bin/amd64-kfreebsd/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/amd64-kfreebsd/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/amd64-kfreebsd/mtxrunjit b/Master/bin/amd64-kfreebsd/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/amd64-kfreebsd/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/amd64-kfreebsd/pstopdf b/Master/bin/amd64-kfreebsd/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/amd64-kfreebsd/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/amd64-netbsd/contextjit b/Master/bin/amd64-netbsd/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/amd64-netbsd/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/amd64-netbsd/ctxtools b/Master/bin/amd64-netbsd/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/amd64-netbsd/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/amd64-netbsd/mtxrunjit b/Master/bin/amd64-netbsd/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/amd64-netbsd/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/amd64-netbsd/pstopdf b/Master/bin/amd64-netbsd/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/amd64-netbsd/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/armel-linux/contextjit b/Master/bin/armel-linux/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/armel-linux/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/armel-linux/ctxtools b/Master/bin/armel-linux/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/armel-linux/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/armel-linux/mtxrunjit b/Master/bin/armel-linux/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/armel-linux/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/armel-linux/pstopdf b/Master/bin/armel-linux/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/armel-linux/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/armhf-linux/contextjit b/Master/bin/armhf-linux/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/armhf-linux/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/armhf-linux/ctxtools b/Master/bin/armhf-linux/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/armhf-linux/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/armhf-linux/mtxrunjit b/Master/bin/armhf-linux/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/armhf-linux/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/armhf-linux/pstopdf b/Master/bin/armhf-linux/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/armhf-linux/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/i386-cygwin/contextjit b/Master/bin/i386-cygwin/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/i386-cygwin/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/i386-cygwin/ctxtools b/Master/bin/i386-cygwin/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/i386-cygwin/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/i386-cygwin/mtxrunjit b/Master/bin/i386-cygwin/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/i386-cygwin/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/i386-cygwin/pstopdf b/Master/bin/i386-cygwin/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/i386-cygwin/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/contextjit b/Master/bin/i386-freebsd/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/i386-freebsd/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/ctxtools b/Master/bin/i386-freebsd/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/i386-freebsd/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/mtxrunjit b/Master/bin/i386-freebsd/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/i386-freebsd/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/pstopdf b/Master/bin/i386-freebsd/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/i386-freebsd/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/i386-kfreebsd/contextjit b/Master/bin/i386-kfreebsd/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/i386-kfreebsd/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/i386-kfreebsd/ctxtools b/Master/bin/i386-kfreebsd/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/i386-kfreebsd/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/i386-kfreebsd/mtxrunjit b/Master/bin/i386-kfreebsd/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/i386-kfreebsd/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/i386-kfreebsd/pstopdf b/Master/bin/i386-kfreebsd/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/i386-kfreebsd/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/i386-linux/contextjit b/Master/bin/i386-linux/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/i386-linux/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/i386-linux/ctxtools b/Master/bin/i386-linux/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/i386-linux/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/i386-linux/mtxrunjit b/Master/bin/i386-linux/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/i386-linux/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/i386-linux/pstopdf b/Master/bin/i386-linux/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/i386-linux/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/i386-netbsd/contextjit b/Master/bin/i386-netbsd/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/i386-netbsd/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/i386-netbsd/ctxtools b/Master/bin/i386-netbsd/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/i386-netbsd/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/i386-netbsd/mtxrunjit b/Master/bin/i386-netbsd/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/i386-netbsd/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/i386-netbsd/pstopdf b/Master/bin/i386-netbsd/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/i386-netbsd/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/i386-solaris/contextjit b/Master/bin/i386-solaris/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/i386-solaris/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/i386-solaris/ctxtools b/Master/bin/i386-solaris/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/i386-solaris/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/i386-solaris/mtxrunjit b/Master/bin/i386-solaris/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/i386-solaris/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/i386-solaris/pstopdf b/Master/bin/i386-solaris/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/i386-solaris/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/mipsel-linux/contextjit b/Master/bin/mipsel-linux/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/mipsel-linux/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/mipsel-linux/ctxtools b/Master/bin/mipsel-linux/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/mipsel-linux/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/mipsel-linux/mtxrunjit b/Master/bin/mipsel-linux/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/mipsel-linux/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/mipsel-linux/pstopdf b/Master/bin/mipsel-linux/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/mipsel-linux/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/powerpc-linux/contextjit b/Master/bin/powerpc-linux/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/powerpc-linux/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/powerpc-linux/ctxtools b/Master/bin/powerpc-linux/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/powerpc-linux/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/powerpc-linux/mtxrunjit b/Master/bin/powerpc-linux/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/powerpc-linux/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/powerpc-linux/pstopdf b/Master/bin/powerpc-linux/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/powerpc-linux/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/contextjit b/Master/bin/sparc-solaris/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/sparc-solaris/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/ctxtools b/Master/bin/sparc-solaris/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/sparc-solaris/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/mtxrunjit b/Master/bin/sparc-solaris/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/sparc-solaris/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/pstopdf b/Master/bin/sparc-solaris/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/sparc-solaris/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/universal-darwin/contextjit b/Master/bin/universal-darwin/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/universal-darwin/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/universal-darwin/ctxtools b/Master/bin/universal-darwin/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/universal-darwin/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/universal-darwin/mtxrunjit b/Master/bin/universal-darwin/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/universal-darwin/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/universal-darwin/pstopdf b/Master/bin/universal-darwin/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/universal-darwin/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/win32/context.exe b/Master/bin/win32/context.exe
index 1b2d744f5ab..0e7882cf926 100755
--- a/Master/bin/win32/context.exe
+++ b/Master/bin/win32/context.exe
Binary files differ
diff --git a/Master/bin/win32/ctxtools.exe b/Master/bin/win32/ctxtools.exe
deleted file mode 100755
index 1b2d744f5ab..00000000000
--- a/Master/bin/win32/ctxtools.exe
+++ /dev/null
Binary files differ
diff --git a/Master/bin/win32/luatools.exe b/Master/bin/win32/luatools.exe
index 1b2d744f5ab..0e7882cf926 100755
--- a/Master/bin/win32/luatools.exe
+++ b/Master/bin/win32/luatools.exe
Binary files differ
diff --git a/Master/bin/win32/mtxrun.dll b/Master/bin/win32/mtxrun.dll
index 5e547121cef..3c4481c319d 100755
--- a/Master/bin/win32/mtxrun.dll
+++ b/Master/bin/win32/mtxrun.dll
Binary files differ
diff --git a/Master/bin/win32/mtxrun.exe b/Master/bin/win32/mtxrun.exe
index 1b2d744f5ab..0e7882cf926 100755
--- a/Master/bin/win32/mtxrun.exe
+++ b/Master/bin/win32/mtxrun.exe
Binary files differ
diff --git a/Master/bin/win32/mtxrun.lua b/Master/bin/win32/mtxrun.lua
index 7bd96b24711..c3d4111626e 100755
--- a/Master/bin/win32/mtxrun.lua
+++ b/Master/bin/win32/mtxrun.lua
@@ -437,7 +437,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 29808, stripped down to: 16182
+-- original size: 29983, stripped down to: 16202
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -474,7 +474,7 @@ local uppercase=R("AZ")
local underscore=P("_")
local hexdigit=digit+lowercase+uppercase
local cr,lf,crlf=P("\r"),P("\n"),P("\r\n")
-local newline=crlf+S("\r\n")
+local newline=P("\r")*(P("\n")+P(true))+P("\n")
local escaped=P("\\")*anything
local squote=P("'")
local dquote=P('"')
@@ -496,8 +496,8 @@ patterns.utfbom_32_le=utfbom_32_le
patterns.utfbom_16_be=utfbom_16_be
patterns.utfbom_16_le=utfbom_16_le
patterns.utfbom_8=utfbom_8
-patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
-patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
+patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
+patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
patterns.utf8one=R("\000\127")
patterns.utf8two=R("\194\223")*utf8next
patterns.utf8three=R("\224\239")*utf8next*utf8next
@@ -4871,7 +4871,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 32843, stripped down to: 18226
+-- original size: 33063, stripped down to: 18397
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -5186,7 +5186,11 @@ local format_f=function(f)
end
local format_F=function(f)
n=n+1
- return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ if not f or f=="" then
+ return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or (a%s == 1 and '1') or format('%%.9f',a%s))",n,n,n,n)
+ else
+ return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ end
end
local format_g=function(f)
n=n+1
@@ -7180,7 +7184,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 25455, stripped down to: 16617
+-- original size: 25613, stripped down to: 16617
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -16875,8 +16879,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 694406
--- stripped bytes : 246345
+-- original bytes : 694959
+-- stripped bytes : 246707
-- end library merge
diff --git a/Master/bin/win32/mtxrunjit.exe b/Master/bin/win32/mtxrunjit.exe
new file mode 100755
index 00000000000..0e7882cf926
--- /dev/null
+++ b/Master/bin/win32/mtxrunjit.exe
Binary files differ
diff --git a/Master/bin/win32/pstopdf.exe b/Master/bin/win32/pstopdf.exe
deleted file mode 100755
index 1b2d744f5ab..00000000000
--- a/Master/bin/win32/pstopdf.exe
+++ /dev/null
Binary files differ
diff --git a/Master/bin/win32/texexec.exe b/Master/bin/win32/texexec.exe
index 1b2d744f5ab..0e7882cf926 100755
--- a/Master/bin/win32/texexec.exe
+++ b/Master/bin/win32/texexec.exe
Binary files differ
diff --git a/Master/bin/win32/texmfstart.exe b/Master/bin/win32/texmfstart.exe
index 1b2d744f5ab..0e7882cf926 100755
--- a/Master/bin/win32/texmfstart.exe
+++ b/Master/bin/win32/texmfstart.exe
Binary files differ
diff --git a/Master/bin/x86_64-cygwin/contextjit b/Master/bin/x86_64-cygwin/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/x86_64-cygwin/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/x86_64-cygwin/ctxtools b/Master/bin/x86_64-cygwin/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/x86_64-cygwin/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/x86_64-cygwin/mtxrunjit b/Master/bin/x86_64-cygwin/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/x86_64-cygwin/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/x86_64-cygwin/pstopdf b/Master/bin/x86_64-cygwin/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/x86_64-cygwin/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/x86_64-darwin/contextjit b/Master/bin/x86_64-darwin/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/x86_64-darwin/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/x86_64-darwin/ctxtools b/Master/bin/x86_64-darwin/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/x86_64-darwin/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/x86_64-darwin/mtxrunjit b/Master/bin/x86_64-darwin/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/x86_64-darwin/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/x86_64-darwin/pstopdf b/Master/bin/x86_64-darwin/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/x86_64-darwin/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/x86_64-linux/contextjit b/Master/bin/x86_64-linux/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/x86_64-linux/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/x86_64-linux/ctxtools b/Master/bin/x86_64-linux/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/x86_64-linux/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/x86_64-linux/mtxrunjit b/Master/bin/x86_64-linux/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/x86_64-linux/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/x86_64-linux/pstopdf b/Master/bin/x86_64-linux/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/x86_64-linux/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/bin/x86_64-solaris/contextjit b/Master/bin/x86_64-solaris/contextjit
new file mode 120000
index 00000000000..ab95aa3d110
--- /dev/null
+++ b/Master/bin/x86_64-solaris/contextjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/contextjit \ No newline at end of file
diff --git a/Master/bin/x86_64-solaris/ctxtools b/Master/bin/x86_64-solaris/ctxtools
deleted file mode 120000
index 66237b28340..00000000000
--- a/Master/bin/x86_64-solaris/ctxtools
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/ctxtools \ No newline at end of file
diff --git a/Master/bin/x86_64-solaris/mtxrunjit b/Master/bin/x86_64-solaris/mtxrunjit
new file mode 120000
index 00000000000..c8c1e9a30bf
--- /dev/null
+++ b/Master/bin/x86_64-solaris/mtxrunjit
@@ -0,0 +1 @@
+../../texmf-dist/scripts/context/stubs/unix/mtxrunjit \ No newline at end of file
diff --git a/Master/bin/x86_64-solaris/pstopdf b/Master/bin/x86_64-solaris/pstopdf
deleted file mode 120000
index 44478ee1dd4..00000000000
--- a/Master/bin/x86_64-solaris/pstopdf
+++ /dev/null
@@ -1 +0,0 @@
-../../texmf-dist/scripts/context/stubs/unix/pstopdf \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/scite/documents/scite-context-readme.pdf b/Master/texmf-dist/context/data/scite/context/documents/scite-context-readme.pdf
index 2bd7d4216fe..2bd7d4216fe 100644
--- a/Master/texmf-dist/context/data/scite/documents/scite-context-readme.pdf
+++ b/Master/texmf-dist/context/data/scite/context/documents/scite-context-readme.pdf
Binary files differ
diff --git a/Master/texmf-dist/context/data/scite/documents/scite-context-readme.tex b/Master/texmf-dist/context/data/scite/context/documents/scite-context-readme.tex
index cbfc00a3342..cbfc00a3342 100644
--- a/Master/texmf-dist/context/data/scite/documents/scite-context-readme.tex
+++ b/Master/texmf-dist/context/data/scite/context/documents/scite-context-readme.tex
diff --git a/Master/texmf-dist/context/data/scite/documents/scite-context-visual.pdf b/Master/texmf-dist/context/data/scite/context/documents/scite-context-visual.pdf
index 69d82eda681..69d82eda681 100644
--- a/Master/texmf-dist/context/data/scite/documents/scite-context-visual.pdf
+++ b/Master/texmf-dist/context/data/scite/context/documents/scite-context-visual.pdf
diff --git a/Master/texmf-dist/context/data/scite/documents/scite-context-visual.png b/Master/texmf-dist/context/data/scite/context/documents/scite-context-visual.png
index 7368a68f141..7368a68f141 100644
--- a/Master/texmf-dist/context/data/scite/documents/scite-context-visual.png
+++ b/Master/texmf-dist/context/data/scite/context/documents/scite-context-visual.png
Binary files differ
diff --git a/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-context.lua b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua
index 721a2e123fb..aeee8590f67 100644
--- a/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-context.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-context.lua
@@ -1,4 +1,4 @@
return {
- ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "etexversion", "pdftexversion", "xetexversion", "xetexrevision", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "setupdocument", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "breakablethinspace", "nobreakspace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj" },
- ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "doifelsecommandhandler", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "strippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthsargumenttrue", "sixthargumentfalse", "sixtsargumenttrue", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "scratchdimen", "globalscratchdimen", "scratchskip", "globalscratchskip", "scratchmuskip", "globalscratchmuskip", "scratchtoks", "globalscratchtoks", "scratchbox", "globalscratchbox", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "doifinset", "doifnotinset", "doifinsetelse", "doifnextcharelse", "doifnextoptionalelse", "doifnextoptionalcselse", "doiffastoptionalcheckelse", "doifnextbgroupelse", "doifnextbgroupcselse", "doifnextparenthesiselse", "doifundefinedelse", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifdimensionelse", "doifnumberelse", "doifnumber", "doifnotnumber", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifinstringelse", "doifassignmentelse", "docheckassignment", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "strut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "begstrut", "endstrut", "lineheight", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expdoifelse", "expdoif", "expdoifnot", "expdoifcommonelse", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "carryoverpar", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "lefttoright", "righttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath" },
+ ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "etexversion", "pdftexversion", "xetexversion", "xetexrevision", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "setupdocument", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "breakablethinspace", "nobreakspace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace" },
+ ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "doifelsecommandhandler", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "strippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthsargumenttrue", "sixthargumentfalse", "sixtsargumenttrue", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "scratchdimen", "globalscratchdimen", "scratchskip", "globalscratchskip", "scratchmuskip", "globalscratchmuskip", "scratchtoks", "globalscratchtoks", "scratchbox", "globalscratchbox", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "doifinset", "doifnotinset", "doifinsetelse", "doifnextcharelse", "doifnextoptionalelse", "doifnextoptionalcselse", "doiffastoptionalcheckelse", "doifnextbgroupelse", "doifnextbgroupcselse", "doifnextparenthesiselse", "doifundefinedelse", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifdimensionelse", "doifnumberelse", "doifnumber", "doifnotnumber", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifinstringelse", "doifassignmentelse", "docheckassignment", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "begstrut", "endstrut", "lineheight", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expdoifelse", "expdoif", "expdoifnot", "expdoifcommonelse", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "carryoverpar", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "lefttoright", "righttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-interfaces.lua b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-interfaces.lua
index b2c09b62a82..b2c09b62a82 100644
--- a/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-interfaces.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-interfaces.lua
diff --git a/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metafun.lua b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
new file mode 100644
index 00000000000..3db3010d6c1
--- /dev/null
+++ b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
@@ -0,0 +1,4 @@
+return {
+ ["commands"]={ "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", "withshading", "shadedinto", "withcircularshade", "withlinearshade", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "withmask", "figure", "register", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", "infont", "set_linear_vector", "linear_shade", "define_linear_shade", "define_circular_linear_shade", "define_sampled_linear_shade", "set_circular_vector", "circular_shade", "define_circular_shade", "define_circular_linear_shade", "define_sampled_circular_shade", "space", "CRLF", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedpath", "constructedpairs", "punkedfunction", "curvedfunction", "tightfunction", "punkedpath", "curvedpath", "tightpath", "punkedpairs", "curvedpairs", "tightpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "normalfill", "normaldraw", "visualizepaths", "naturalizepaths", "drawboundary", "drawwholepath", "visualizeddraw", "visualizedfill", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "format", "formatted", "startpassingvariable", "stoppassingvariable" },
+ ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "textextoffset", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "metapostversion", "maxdimensions" },
+} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-metapost.lua b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua
index 766ea90da88..d4759854abb 100644
--- a/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-metapost.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-metapost.lua
@@ -1,7 +1,7 @@
return {
["commands"]={ "beginfig", "endfig", "beginglyph", "endglyph", "charscale", "rotatedaround", "reflectedabout", "arrowhead", "currentpen", "currentpicture", "cuttings", "defaultfont", "extra_beginfig", "extra_endfig", "ditto", "EOF", "down", "evenly", "fullcircle", "halfcircle", "identity", "in", "left", "origin", "pensquare", "quartercircle", "right", "unitsquare", "up", "withdots", "abs", "bbox", "ceiling", "center", "cutafter", "cutbefore", "dir", "directionpoint", "div", "dotprod", "intersectionpoint", "inverse", "mod", "round", "unitvector", "whatever", "cutdraw", "draw", "drawarrow", "drawdblarrow", "fill", "filldraw", "drawdot", "loggingall", "interact", "tracingall", "tracingnone", "pickup", "undraw", "unfill", "unfilldraw", "buildcycle", "dashpattern", "decr", "dotlabel", "dotlabels", "drawoptions", "incr", "label", "labels", "max", "min", "thelabel", "z", "beginchar", "blacker", "capsule_end", "change_width", "define_blacker_pixels", "define_corrected_pixels", "define_good_x_pixels", "define_good_y_pixels", "define_horizontal_corrected_pixels", "define_pixels", "define_whole_blacker_pixels", "define_whole_pixels", "define_whole_vertical_blacker_pixels", "define_whole_vertical_pixels", "endchar", "extra_beginchar", "extra_endchar", "extra_setup", "font_coding_scheme", "clearxy", "clearit", "clearpen", "shipit", "font_extra_space", "exitunless", "relax", "hide", "gobble", "gobbled", "stop", "blankpicture", "counterclockwise", "tensepath", "takepower", "direction", "softjoin", "makelabel", "rotatedabout", "flex", "superellipse", "erase", "image", "nullpen", "savepen", "clearpen", "penpos", "penlabels", "range", "numtok", "thru", "z", "laboff", "bye", "red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "background", "graypart", "graycolor", "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in", "triplet", "quadruplet" },
["internals"]={ "mitered", "rounded", "beveled", "butt", "squared", "eps", "epsilon", "infinity", "bboxmargin", "ahlength", "ahangle", "labeloffset", "dotlabeldiam", "defaultpen", "defaultscale", "join_radius", "pen_lft", "pen_rt", "pen_top", "pen_bot" },
- ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withcmykcolor", "withpen", "dashed", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "downto", "upto", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "readstring", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "greypart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "greycolor", "graycolor", "colormodel", "graypart", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", "minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode" },
+ ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withcmykcolor", "withpen", "dashed", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "downto", "upto", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "readstring", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "greypart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "greycolor", "graycolor", "colormodel", "graypart", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", "minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode", "runscript" },
["shortcuts"]={ "..", "...", "--", "---", "&" },
["tex"]={ "btex", "etex", "verbatimtex" },
} \ No newline at end of file
diff --git a/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-tex.lua b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua
index 415b7412834..415b7412834 100644
--- a/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-tex.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/data/scite-context-data-tex.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/lexer.lua b/Master/texmf-dist/context/data/scite/context/lexers/lexer.lua
index 9582f6a76b6..9582f6a76b6 100644
--- a/Master/texmf-dist/context/data/scite/lexers/lexer.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/lexer.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-bibtex.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-bibtex.lua
index 88b070e5ee2..88b070e5ee2 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-bibtex.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-bibtex.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-cld.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-cld.lua
index 3442a195c1b..3442a195c1b 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-cld.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-cld.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-cpp-web.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-cpp-web.lua
index daa9221bad0..daa9221bad0 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-cpp-web.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-cpp-web.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-cpp.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-cpp.lua
index 31180e6a574..31180e6a574 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-cpp.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-cpp.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua-longstring.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-lua-longstring.lua
index 855adbe4ea2..855adbe4ea2 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua-longstring.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-lua-longstring.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-lua.lua
index c44d586bab5..c44d586bab5 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-lua.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-mps.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-mps.lua
index b87ea83cb53..b87ea83cb53 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-mps.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-mps.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-pdf-object.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-pdf-object.lua
index 1fb95838a9c..1fb95838a9c 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-pdf-object.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-pdf-object.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-pdf-xref.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-pdf-xref.lua
index 7097c41a68d..7097c41a68d 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-pdf-xref.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-pdf-xref.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-pdf.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-pdf.lua
index f8e4e73804e..f8e4e73804e 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-pdf.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-pdf.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-tex-web.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-tex-web.lua
index 5d8859c2649..5d8859c2649 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-tex-web.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-tex-web.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-tex.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-tex.lua
index 0099b968a2d..0099b968a2d 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-tex.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-tex.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-txt.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-txt.lua
index 43eec2c3522..43eec2c3522 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-txt.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-txt.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-web-snippets.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-web-snippets.lua
index 196a545bc0e..196a545bc0e 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-web-snippets.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-web-snippets.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-web.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-web.lua
index 86ae76644d0..86ae76644d0 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-web.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-web.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml-cdata.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml-cdata.lua
index e6276da0d37..e6276da0d37 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml-cdata.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml-cdata.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml-comment.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml-comment.lua
index b5b3fefe07b..b5b3fefe07b 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml-comment.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml-comment.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml-script.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml-script.lua
index bbb938dc588..bbb938dc588 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml-script.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml-script.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml.lua
index 77c89b1d677..77c89b1d677 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-xml.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer-xml.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer.lua b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer.lua
index 6335af91151..6335af91151 100644
--- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/scite-context-lexer.lua
diff --git a/Master/texmf-dist/context/data/scite/lexers/themes/scite-context-theme.lua b/Master/texmf-dist/context/data/scite/context/lexers/themes/scite-context-theme.lua
index b0c63fe3941..b0c63fe3941 100644
--- a/Master/texmf-dist/context/data/scite/lexers/themes/scite-context-theme.lua
+++ b/Master/texmf-dist/context/data/scite/context/lexers/themes/scite-context-theme.lua
diff --git a/Master/texmf-dist/context/data/scite/scite-context-data-context.properties b/Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties
index 3cb991efa24..d709dbe51e6 100644
--- a/Master/texmf-dist/context/data/scite/scite-context-data-context.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-data-context.properties
@@ -63,7 +63,7 @@ lefttorightmark righttoleftmark breakablethinspace nobreakspace narrownobreakspa
zerowidthnobreakspace ideographicspace ideographichalffillspace twoperemspace threeperemspace \
fourperemspace fiveperemspace sixperemspace figurespace punctuationspace \
hairspace zerowidthspace zerowidthnonjoiner zerowidthjoiner zwnj \
-zwj
+zwj optionalspace
keywordclass.context.helpers=\
startsetups stopsetups startxmlsetups stopxmlsetups \
@@ -154,41 +154,42 @@ dosixtupleargument doseventupleargument dosinglegroupempty dodoublegroupempty do
doquadruplegroupempty doquintuplegroupempty permitspacesbetweengroups dontpermitspacesbetweengroups nopdfcompression \
maximumpdfcompression normalpdfcompression modulonumber dividenumber getfirstcharacter \
doiffirstcharelse startnointerference stopnointerference twodigits threedigits \
-leftorright strut setstrut strutbox strutht \
-strutdp strutwd struthtdp begstrut endstrut \
-lineheight ordordspacing ordopspacing ordbinspacing ordrelspacing \
-ordopenspacing ordclosespacing ordpunctspacing ordinnerspacing opordspacing \
-opopspacing opbinspacing oprelspacing opopenspacing opclosespacing \
-oppunctspacing opinnerspacing binordspacing binopspacing binbinspacing \
-binrelspacing binopenspacing binclosespacing binpunctspacing bininnerspacing \
-relordspacing relopspacing relbinspacing relrelspacing relopenspacing \
-relclosespacing relpunctspacing relinnerspacing openordspacing openopspacing \
-openbinspacing openrelspacing openopenspacing openclosespacing openpunctspacing \
-openinnerspacing closeordspacing closeopspacing closebinspacing closerelspacing \
-closeopenspacing closeclosespacing closepunctspacing closeinnerspacing punctordspacing \
-punctopspacing punctbinspacing punctrelspacing punctopenspacing punctclosespacing \
-punctpunctspacing punctinnerspacing innerordspacing inneropspacing innerbinspacing \
-innerrelspacing inneropenspacing innerclosespacing innerpunctspacing innerinnerspacing \
-normalreqno startimath stopimath normalstartimath normalstopimath \
-startdmath stopdmath normalstartdmath normalstopdmath uncramped \
-cramped triggermathstyle mathstylefont mathsmallstylefont mathstyleface \
-mathsmallstyleface mathstylecommand mathpalette mathstylehbox mathstylevbox \
-mathstylevcenter mathstylevcenteredhbox mathstylevcenteredvbox mathtext setmathsmalltextbox \
-setmathtextbox triggerdisplaystyle triggertextstyle triggerscriptstyle triggerscriptscriptstyle \
-triggeruncrampedstyle triggercrampedstyle triggersmallstyle triggeruncrampedsmallstyle triggercrampedsmallstyle \
-triggerbigstyle triggeruncrampedbigstyle triggercrampedbigstyle luaexpr expdoifelse \
-expdoif expdoifnot expdoifcommonelse expdoifinsetelse ctxdirectlua \
-ctxlatelua ctxsprint ctxwrite ctxcommand ctxdirectcommand \
-ctxlatecommand ctxreport ctxlua luacode lateluacode \
-directluacode registerctxluafile ctxloadluafile luaversion luamajorversion \
-luaminorversion ctxluacode luaconditional luaexpanded startluaparameterset \
-stopluaparameterset luaparameterset definenamedlua obeylualines obeyluatokens \
-startluacode stopluacode startlua stoplua startctxfunction \
-stopctxfunction ctxfunction startctxfunctiondefinition stopctxfunctiondefinition carryoverpar \
-assumelongusagecs Umathbotaccent righttolefthbox lefttorighthbox righttoleftvbox \
-lefttorightvbox righttoleftvtop lefttorightvtop rtlhbox ltrhbox \
-rtlvbox ltrvbox rtlvtop ltrvtop autodirhbox \
-autodirvbox autodirvtop lefttoright righttoleft synchronizelayoutdirection \
-synchronizedisplaydirection synchronizeinlinedirection lesshyphens morehyphens nohyphens \
-dohyphens Ucheckedstartdisplaymath Ucheckedstopdisplaymath
+leftorright offinterlineskip oninterlineskip nointerlineskip strut \
+setstrut strutbox strutht strutdp strutwd \
+struthtdp begstrut endstrut lineheight ordordspacing \
+ordopspacing ordbinspacing ordrelspacing ordopenspacing ordclosespacing \
+ordpunctspacing ordinnerspacing opordspacing opopspacing opbinspacing \
+oprelspacing opopenspacing opclosespacing oppunctspacing opinnerspacing \
+binordspacing binopspacing binbinspacing binrelspacing binopenspacing \
+binclosespacing binpunctspacing bininnerspacing relordspacing relopspacing \
+relbinspacing relrelspacing relopenspacing relclosespacing relpunctspacing \
+relinnerspacing openordspacing openopspacing openbinspacing openrelspacing \
+openopenspacing openclosespacing openpunctspacing openinnerspacing closeordspacing \
+closeopspacing closebinspacing closerelspacing closeopenspacing closeclosespacing \
+closepunctspacing closeinnerspacing punctordspacing punctopspacing punctbinspacing \
+punctrelspacing punctopenspacing punctclosespacing punctpunctspacing punctinnerspacing \
+innerordspacing inneropspacing innerbinspacing innerrelspacing inneropenspacing \
+innerclosespacing innerpunctspacing innerinnerspacing normalreqno startimath \
+stopimath normalstartimath normalstopimath startdmath stopdmath \
+normalstartdmath normalstopdmath uncramped cramped triggermathstyle \
+mathstylefont mathsmallstylefont mathstyleface mathsmallstyleface mathstylecommand \
+mathpalette mathstylehbox mathstylevbox mathstylevcenter mathstylevcenteredhbox \
+mathstylevcenteredvbox mathtext setmathsmalltextbox setmathtextbox triggerdisplaystyle \
+triggertextstyle triggerscriptstyle triggerscriptscriptstyle triggeruncrampedstyle triggercrampedstyle \
+triggersmallstyle triggeruncrampedsmallstyle triggercrampedsmallstyle triggerbigstyle triggeruncrampedbigstyle \
+triggercrampedbigstyle luaexpr expdoifelse expdoif expdoifnot \
+expdoifcommonelse expdoifinsetelse ctxdirectlua ctxlatelua ctxsprint \
+ctxwrite ctxcommand ctxdirectcommand ctxlatecommand ctxreport \
+ctxlua luacode lateluacode directluacode registerctxluafile \
+ctxloadluafile luaversion luamajorversion luaminorversion ctxluacode \
+luaconditional luaexpanded startluaparameterset stopluaparameterset luaparameterset \
+definenamedlua obeylualines obeyluatokens startluacode stopluacode \
+startlua stoplua startctxfunction stopctxfunction ctxfunction \
+startctxfunctiondefinition stopctxfunctiondefinition carryoverpar assumelongusagecs Umathbotaccent \
+righttolefthbox lefttorighthbox righttoleftvbox lefttorightvbox righttoleftvtop \
+lefttorightvtop rtlhbox ltrhbox rtlvbox ltrvbox \
+rtlvtop ltrvtop autodirhbox autodirvbox autodirvtop \
+lefttoright righttoleft synchronizelayoutdirection synchronizedisplaydirection synchronizeinlinedirection \
+lesshyphens morehyphens nohyphens dohyphens Ucheckedstartdisplaymath \
+Ucheckedstopdisplaymath
diff --git a/Master/texmf-dist/context/data/scite/scite-context-data-interfaces.properties b/Master/texmf-dist/context/data/scite/context/scite-context-data-interfaces.properties
index 9c2ca4623fc..9c2ca4623fc 100644
--- a/Master/texmf-dist/context/data/scite/scite-context-data-interfaces.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-data-interfaces.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-context-data-metafun.properties b/Master/texmf-dist/context/data/scite/context/scite-context-data-metafun.properties
index 9381b4f8dbe..db66f9ec32c 100644
--- a/Master/texmf-dist/context/data/scite/scite-context-data-metafun.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-data-metafun.properties
@@ -7,7 +7,8 @@ invtan acosh asinh sinh cosh \
paired tripled unitcircle fulldiamond unitdiamond \
fullsquare llcircle lrcircle urcircle ulcircle \
tcircle bcircle lcircle rcircle lltriangle \
-lrtriangle urtriangle ultriangle smoothed cornered \
+lrtriangle urtriangle ultriangle uptriangle downtriangle \
+lefttriangle righttriangle triangle smoothed cornered \
superellipsed randomized squeezed enlonged shortened \
punked curved unspiked simplified blownup \
stretched enlarged leftenlarged topenlarged rightenlarged \
diff --git a/Master/texmf-dist/context/data/scite/scite-context-data-metapost.properties b/Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties
index 88ace57cafc..afa6e894ad3 100644
--- a/Master/texmf-dist/context/data/scite/scite-context-data-metapost.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-data-metapost.properties
@@ -91,7 +91,7 @@ graypart dashpart penpart stroked filled \
textual clipped bounded pathpart expandafter \
minute hour outputformat outputtemplate filenametemplate \
fontmapfile fontmapline fontpart fontsize glyph \
-restoreclipcolor troffmode
+restoreclipcolor troffmode runscript
keywordclass.metapost.shortcuts=\
.. ... -- --- \
diff --git a/Master/texmf-dist/context/data/scite/scite-context-data-tex.properties b/Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties
index d1780794d18..d1780794d18 100644
--- a/Master/texmf-dist/context/data/scite/scite-context-data-tex.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-data-tex.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-context-external.properties b/Master/texmf-dist/context/data/scite/context/scite-context-external.properties
index c7d0c4a17d3..c7d0c4a17d3 100644
--- a/Master/texmf-dist/context/data/scite/scite-context-external.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-external.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-context-internal.properties b/Master/texmf-dist/context/data/scite/context/scite-context-internal.properties
index 038381dc71b..038381dc71b 100644
--- a/Master/texmf-dist/context/data/scite/scite-context-internal.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-internal.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-context-user.properties b/Master/texmf-dist/context/data/scite/context/scite-context-user.properties
index b6fc34282bc..b6fc34282bc 100644
--- a/Master/texmf-dist/context/data/scite/scite-context-user.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context-user.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-context.properties b/Master/texmf-dist/context/data/scite/context/scite-context.properties
index 78850ef0d0e..78850ef0d0e 100644
--- a/Master/texmf-dist/context/data/scite/scite-context.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-context.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-ctx-context.properties b/Master/texmf-dist/context/data/scite/context/scite-ctx-context.properties
index a1d5800e65a..a1d5800e65a 100644
--- a/Master/texmf-dist/context/data/scite/scite-ctx-context.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-ctx-context.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-ctx-example.properties b/Master/texmf-dist/context/data/scite/context/scite-ctx-example.properties
index 78b2f2859c2..78b2f2859c2 100644
--- a/Master/texmf-dist/context/data/scite/scite-ctx-example.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-ctx-example.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-ctx.lua b/Master/texmf-dist/context/data/scite/context/scite-ctx.lua
index 24f5b34b8aa..24f5b34b8aa 100644
--- a/Master/texmf-dist/context/data/scite/scite-ctx.lua
+++ b/Master/texmf-dist/context/data/scite/context/scite-ctx.lua
diff --git a/Master/texmf-dist/context/data/scite/scite-ctx.properties b/Master/texmf-dist/context/data/scite/context/scite-ctx.properties
index 874a381e349..874a381e349 100644
--- a/Master/texmf-dist/context/data/scite/scite-ctx.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-ctx.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-metapost.properties b/Master/texmf-dist/context/data/scite/context/scite-metapost.properties
index fc06dcaa28b..fc06dcaa28b 100644
--- a/Master/texmf-dist/context/data/scite/scite-metapost.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-metapost.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-pragma.properties b/Master/texmf-dist/context/data/scite/context/scite-pragma.properties
index 2dea18bade3..2dea18bade3 100644
--- a/Master/texmf-dist/context/data/scite/scite-pragma.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-pragma.properties
diff --git a/Master/texmf-dist/context/data/scite/scite-tex.properties b/Master/texmf-dist/context/data/scite/context/scite-tex.properties
index 7d271eaf187..7d271eaf187 100644
--- a/Master/texmf-dist/context/data/scite/scite-tex.properties
+++ b/Master/texmf-dist/context/data/scite/context/scite-tex.properties
diff --git a/Master/texmf-dist/context/data/scite/documents/scite-context-visual.tex b/Master/texmf-dist/context/data/scite/documents/scite-context-visual.tex
deleted file mode 100644
index 0a1b8bb71eb..00000000000
--- a/Master/texmf-dist/context/data/scite/documents/scite-context-visual.tex
+++ /dev/null
@@ -1,52 +0,0 @@
-% language=uk
-
-\usemodule[art-01]
-
-\defineframedtext
- [entry]
-
-\starttext
-
-\startchapter[title=Some fancy title]
-
- \startluacode
- local entries = { -- there can be more
- { text = "The third entry!" },
- { text = "The fourth entry!" },
- }
-
- for i=1,#entries do
- context.startentry()
- context(entries[i].text)
- context.stopentry()
- end
- \stopluacode
-
- This is just some text to demonstrate the realtime spellchecker
- in combination with the embedded lua and metapost lexers and
- inline as well as display \ctxlua{context("lua code")}.
-
- Non breakable spaces in for instance 10 mm and quads like here
- are shown as well.
-
- \startlinecorrection
- \startMPcode
- for i=1 upto 100 :
- draw fullcircle scaled (i*mm) ;
- endfor ;
- \stopMPcode
- \stoplinecorrection
-
- \iftrue
- \def\crap{some text} % who cares
- \else
- \def\crap{some crap} % about this
- \fi
-
- \blank[2*big]
-
- \crap
-
-\stopchapter
-
-\stoptext
diff --git a/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-metafun.lua b/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-metafun.lua
deleted file mode 100644
index 50b9ecec48a..00000000000
--- a/Master/texmf-dist/context/data/scite/lexers/data/scite-context-data-metafun.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-return {
- ["commands"]={ "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", "withshading", "shadedinto", "withcircularshade", "withlinearshade", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "withmask", "figure", "register", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", "infont", "set_linear_vector", "linear_shade", "define_linear_shade", "define_circular_linear_shade", "define_sampled_linear_shade", "set_circular_vector", "circular_shade", "define_circular_shade", "define_circular_linear_shade", "define_sampled_circular_shade", "space", "CRLF", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedpath", "constructedpairs", "punkedfunction", "curvedfunction", "tightfunction", "punkedpath", "curvedpath", "tightpath", "punkedpairs", "curvedpairs", "tightpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "normalfill", "normaldraw", "visualizepaths", "naturalizepaths", "drawboundary", "drawwholepath", "visualizeddraw", "visualizedfill", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "format", "formatted", "startpassingvariable", "stoppassingvariable" },
- ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "textextoffset", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "metapostversion", "maxdimensions" },
-} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/man/man1/context.man1.pdf b/Master/texmf-dist/doc/man/man1/context.man1.pdf
index 8bdc14430a7..e71bc90dc56 100644
--- a/Master/texmf-dist/doc/man/man1/context.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/context.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/ctxtools.1 b/Master/texmf-dist/doc/man/man1/ctxtools.1
deleted file mode 100644
index 3eb988c9c44..00000000000
--- a/Master/texmf-dist/doc/man/man1/ctxtools.1
+++ /dev/null
@@ -1,75 +0,0 @@
-.TH "ctxtools" "1" "01-01-2014" "version 1.3.5" "CtxTools"
-.SH NAME
-.B 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@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
diff --git a/Master/texmf-dist/doc/man/man1/ctxtools.man1.pdf b/Master/texmf-dist/doc/man/man1/ctxtools.man1.pdf
deleted file mode 100644
index 7cb54e9cb6a..00000000000
--- a/Master/texmf-dist/doc/man/man1/ctxtools.man1.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/luatools.man1.pdf b/Master/texmf-dist/doc/man/man1/luatools.man1.pdf
index 49376c8fc76..592508b8a17 100644
--- a/Master/texmf-dist/doc/man/man1/luatools.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/luatools.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf
index b815be58ad6..10e12d20151 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-babel.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf
index e9e941364e3..7a50e34ac8e 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-base.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf
index c43d55d90d0..bf5b04713d4 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-bibtex.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf
index 95e1a2edfb7..6b4a192ff37 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-cache.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf
index a4e73798c45..fbc86e91b24 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-chars.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf
index c33f8d8a0ee..eaccb8957b6 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-check.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf
index 0b45ff8e34d..4248e4f2100 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-colors.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf
index 3a37e2ba683..5f7da87ef44 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-context.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf
index 4b4255b6151..028c5bb1580 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-epub.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf
index 56b872aac7e..92a892fd862 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-fcd.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf
index 119e8a84620..585d1b36f51 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-flac.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf
index b74b98fbdb9..53b98f96764 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-fonts.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf
index f4f38d79d48..193d77b9ae8 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-grep.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf
index 9017cb6e3aa..aa19c678493 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-interface.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf
index 7559db630fc..1fa5399d251 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-metapost.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-metatex.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-metatex.man1.pdf
index 43e045050dc..cedef388c28 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-metatex.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-metatex.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf
index 79435aedad2..b77bf0bb5df 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-modules.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf
index 8efc2f29843..ed45e2492f0 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-package.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf
index c1c04b1c860..cd35c1c1fd7 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-patterns.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf
index 7e8125d9905..1c0f06d1a64 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-pdf.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf
index 16c5918971f..77bd5157627 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-plain.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf
index 770f5b7c8da..77466678c21 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-profile.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf
index 207309d2608..1c56b5c6e76 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-rsync.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf
index 68df340b735..b0e6ffd9dde 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-scite.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf
index aceca4e69cc..6632da2be1c 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-server.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf
index bf12e3a9b48..a23a9731cb7 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-texworks.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf
index 1dfc4097605..e9eeb96b66f 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-timing.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf
index 51b6795fb88..7754f94cf8c 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-tools.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf
index a708c58f84a..b95d331a34d 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-unzip.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf
index 4cc2335d35f..76e386e8b79 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-update.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf
index b81d58d8eed..ee82ffa0de5 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-watch.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf b/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf
index da7f54eee2f..e32a60fe23e 100644
--- a/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtx-youless.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf b/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf
index 2ad55582887..8d43f8a2929 100644
--- a/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/mtxrun.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/pstopdf.1 b/Master/texmf-dist/doc/man/man1/pstopdf.1
deleted file mode 100644
index 9a8e5c6379b..00000000000
--- a/Master/texmf-dist/doc/man/man1/pstopdf.1
+++ /dev/null
@@ -1,30 +0,0 @@
-.TH "pstopdf" "1" "01-01-2014" "version 2.0.1" "PStoPDF"
-.SH NAME
-.B 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@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
diff --git a/Master/texmf-dist/doc/man/man1/pstopdf.man1.pdf b/Master/texmf-dist/doc/man/man1/pstopdf.man1.pdf
deleted file mode 100644
index 9ef7a64ce2e..00000000000
--- a/Master/texmf-dist/doc/man/man1/pstopdf.man1.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/texexec.man1.pdf b/Master/texmf-dist/doc/man/man1/texexec.man1.pdf
index a75075ecca8..4eb351be790 100644
--- a/Master/texmf-dist/doc/man/man1/texexec.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/texexec.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/texmfstart.man1.pdf b/Master/texmf-dist/doc/man/man1/texmfstart.man1.pdf
index c70a63242b9..658d8d9f5a1 100644
--- a/Master/texmf-dist/doc/man/man1/texmfstart.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/texmfstart.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/metapost/context/base/mp-base.mpiv b/Master/texmf-dist/metapost/context/base/mp-base.mpiv
index 0b655ef479a..94379050bc8 100644
--- a/Master/texmf-dist/metapost/context/base/mp-base.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mp-base.mpiv
@@ -714,10 +714,10 @@ enddef ;
def pen_pickup_ primary q =
currentpen := q ;
- pen_lft :=xpart penoffset down of currentpen ;
- pen_rt :=xpart penoffset up of currentpen ;
- pen_top :=ypart penoffset left of currentpen ;
- pen_bot :=ypart penoffset right of currentpen ;
+ pen_lft := xpart penoffset down of currentpen ;
+ pen_rt := xpart penoffset up of currentpen ;
+ pen_top := ypart penoffset left of currentpen ;
+ pen_bot := ypart penoffset right of currentpen ;
path currentpen_path ;
enddef ;
@@ -733,7 +733,8 @@ vardef savepen =
pen_count_
enddef ;
-def clearpen = currentpen:=nullpen;
+def clearpen =
+ currentpen := nullpen;
pen_lft := pen_rt := pen_top := pen_bot := 0 ;
path currentpen_path ;
enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mp-form.mpiv b/Master/texmf-dist/metapost/context/base/mp-form.mpiv
index b58792e1a01..88b15e09796 100644
--- a/Master/texmf-dist/metapost/context/base/mp-form.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mp-form.mpiv
@@ -27,4 +27,4 @@ string Fmfont_ ; Fmfont_ := "crap" ;
vardef mfun_format_number(expr fmt, i) =
"\ctxlua{metapost.formatnumber('" & fmt & "'," & if string i : i else : decimal i fi & ")}"
-enddef
+enddef ;
diff --git a/Master/texmf-dist/metapost/context/base/mp-mlib.mpiv b/Master/texmf-dist/metapost/context/base/mp-mlib.mpiv
index 252cd5fd06e..56815028e8f 100644
--- a/Master/texmf-dist/metapost/context/base/mp-mlib.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mp-mlib.mpiv
@@ -783,6 +783,9 @@ enddef ;
% passvariable("boolean",false) ;
% passvariable("path",fullcircle scaled 1cm) ;
+% we could use the new lua interface but there is not that much gain i.e.
+% we still need to serialize
+
vardef mfun_point_to_string(expr p,i) =
decimal xpart (point i of p) & " " &
decimal ypart (point i of p) & " " &
diff --git a/Master/texmf-dist/metapost/context/base/mp-tool.mpiv b/Master/texmf-dist/metapost/context/base/mp-tool.mpiv
index 4ca2ea0f93d..7845467a46c 100644
--- a/Master/texmf-dist/metapost/context/base/mp-tool.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mp-tool.mpiv
@@ -628,6 +628,15 @@ ultriangle := origin -- (0,+.5) -- (-.5,0) -- cycle ;
lltriangle := origin -- (-.5,0) -- (0,-.5) -- cycle ;
lrtriangle := origin -- (0,-.5) -- (+.5,0) -- cycle ;
+path triangle, uptriangle, downtriangle, lefttriangle, righttriangle ;
+
+triangle := (1,0) -- (1,0) rotated 120 -- (1,0) rotated -120 -- cycle ;
+
+uptriangle := triangle rotated 90 ;
+downtriangle := triangle rotated -90 ;
+lefttriangle := triangle rotated 180 ;
+righttriangle := triangle ;
+
path unitdiamond, fulldiamond ;
unitdiamond := (.5,0) -- (1,.5) -- (.5,1) -- (0,.5) -- cycle ;
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-context.lua b/Master/texmf-dist/scripts/context/lua/mtx-context.lua
index b53110bb1a4..37172327140 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-context.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-context.lua
@@ -540,6 +540,7 @@ function scripts.context.run(ctxdata,filename)
local a_profile = getargument("profile")
local a_batchmode = getargument("batchmode")
local a_nonstopmode = getargument("nonstopmode")
+ local a_scollmode = getargument("scrollmode")
local a_once = getargument("once")
local a_synctex = getargument("synctex")
local a_backend = getargument("backend")
@@ -549,7 +550,7 @@ function scripts.context.run(ctxdata,filename)
local a_jithash = getargument("jithash")
local a_texformat = getargument("texformat")
--
- a_batchmode = (a_batchmode and "batchmode") or (a_nonstopmode and "nonstopmode") or nil
+ a_batchmode = (a_batchmode and "batchmode") or (a_nonstopmode and "nonstopmode") or (a_scrollmode and "scrollmode") or nil
a_synctex = check_synctex(a_synctex)
--
for i=1,#filelist do
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-plain.lua b/Master/texmf-dist/scripts/context/lua/mtx-plain.lua
index de13717d396..1076572fcc3 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-plain.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-plain.lua
@@ -103,7 +103,11 @@ function scripts.plain.make(texengine,texformat)
end
function scripts.plain.run(texengine,texformat,filename)
- execute('%s --fmt=%s "%s"',texengine,file.removesuffix(texformat),filename)
+ local t = { }
+ for k, v in next, environment.arguments do
+ t[#t+1] = string.format("--mtx:%s=%s",k,v)
+ end
+ execute('%s --fmt=%s %s "%s"',texengine,file.removesuffix(texformat),table.concat(t," "),filename)
end
function scripts.plain.fonts()
diff --git a/Master/texmf-dist/scripts/context/lua/mtxrun.lua b/Master/texmf-dist/scripts/context/lua/mtxrun.lua
index 8679aefb10d..c3d4111626e 100755
--- a/Master/texmf-dist/scripts/context/lua/mtxrun.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtxrun.lua
@@ -437,7 +437,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 29808, stripped down to: 16182
+-- original size: 29983, stripped down to: 16202
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -474,7 +474,7 @@ local uppercase=R("AZ")
local underscore=P("_")
local hexdigit=digit+lowercase+uppercase
local cr,lf,crlf=P("\r"),P("\n"),P("\r\n")
-local newline=crlf+S("\r\n")
+local newline=P("\r")*(P("\n")+P(true))+P("\n")
local escaped=P("\\")*anything
local squote=P("'")
local dquote=P('"')
@@ -496,8 +496,8 @@ patterns.utfbom_32_le=utfbom_32_le
patterns.utfbom_16_be=utfbom_16_be
patterns.utfbom_16_le=utfbom_16_le
patterns.utfbom_8=utfbom_8
-patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
-patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
+patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
+patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
patterns.utf8one=R("\000\127")
patterns.utf8two=R("\194\223")*utf8next
patterns.utf8three=R("\224\239")*utf8next*utf8next
@@ -4871,7 +4871,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 32843, stripped down to: 18226
+-- original size: 33063, stripped down to: 18397
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -5186,7 +5186,11 @@ local format_f=function(f)
end
local format_F=function(f)
n=n+1
- return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ if not f or f=="" then
+ return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or (a%s == 1 and '1') or format('%%.9f',a%s))",n,n,n,n)
+ else
+ return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ end
end
local format_g=function(f)
n=n+1
@@ -7180,7 +7184,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 25607, stripped down to: 16617
+-- original size: 25613, stripped down to: 16617
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -16875,8 +16879,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 694558
--- stripped bytes : 246497
+-- original bytes : 694959
+-- stripped bytes : 246707
-- end library merge
diff --git a/Master/texmf-dist/scripts/context/stubs/install/first-setup.bat b/Master/texmf-dist/scripts/context/stubs/install/first-setup.bat
new file mode 100755
index 00000000000..f06ad0e6b79
--- /dev/null
+++ b/Master/texmf-dist/scripts/context/stubs/install/first-setup.bat
@@ -0,0 +1,87 @@
+@echo off
+
+setlocal
+
+:fetch
+
+set OWNPATH=%~dp0
+set PATH=%OWNPATH%bin;%PATH%
+set PLATFORM=mswin
+
+set CYGWIN=nontsec
+
+if defined ProgramFiles(x86) (
+ set PLATFORM=win64
+) else (
+ if "%PROCESSOR_ARCHITEW6432%"=="AMD64" set PLATFORM=win64
+)
+
+REM ~ copy /y bin\mtx-update.lua bin\x.lua
+
+if "%PLATFORM%" == "win64" goto update-win64
+
+:update-win32
+
+rsync -av --exclude 'rsync.exe' --exclude 'cygwin1.dll' --exclude 'cygiconv-2.dll' rsync://contextgarden.net/minimals/setup/mswin/bin/ bin
+
+goto update
+
+:update-win64
+
+rsync -av --exclude 'rsync.exe' --exclude 'cygwin1.dll' --exclude 'cygiconv-2.dll' rsync://contextgarden.net/minimals/setup/win64/bin/ bin
+
+goto update
+
+:update
+
+REM ~ copy /y bin\x.lua bin\mtx-update.lua
+
+REM --mingw --nofiledatabase --engine=luatex
+
+mtxrun --script ./bin/mtx-update.lua --update --force --make --engine=all --context=beta --texroot=%OWNPATH%tex %*
+
+echo.
+echo.
+echo When you want to use context, you need to initialize the tree with:
+echo.
+echo %OWNPATH%tex\setuptex.bat %OWNPATH%tex
+echo.
+echo You can associate this command with a shortcut to the cmd prompt.
+echo.
+echo Alternatively you can add %OWNPATH%tex\texmf-%PLATFORM%\bin to your PATH
+echo variable.
+echo.
+echo If you run from an editor you can specify the full path to mtxrun.exe:
+echo.
+echo. %OWNPATH%tex\texmf-%PLATFORM%\bin\mtxrun.exe --autogenerate --script context --autopdf ...
+echo.
+
+:ruby
+
+echo okay > ok.log
+
+ruby -e "File.delete('ok.log')"
+
+if not exist "ok.log" goto end
+
+echo.
+echo The distribution has been downloaded but if you want to run pdfTeX and/or XeTeX you
+echo need to run this script with the following directive:
+echo.
+echo --platform=all
+echo.
+echo You then also need to install Ruby in order to be able to use texexec. After
+echo installing Ruby you can run this script again which will give you the formats
+echo needed, or you can run:
+echo.
+echo texexec --make --pdftex
+echo texexec --make --xetex
+echo.
+
+:okay
+
+del /q ok.log
+
+:end
+
+endlocal
diff --git a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua
index 8679aefb10d..c3d4111626e 100644
--- a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua
+++ b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua
@@ -437,7 +437,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 29808, stripped down to: 16182
+-- original size: 29983, stripped down to: 16202
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -474,7 +474,7 @@ local uppercase=R("AZ")
local underscore=P("_")
local hexdigit=digit+lowercase+uppercase
local cr,lf,crlf=P("\r"),P("\n"),P("\r\n")
-local newline=crlf+S("\r\n")
+local newline=P("\r")*(P("\n")+P(true))+P("\n")
local escaped=P("\\")*anything
local squote=P("'")
local dquote=P('"')
@@ -496,8 +496,8 @@ patterns.utfbom_32_le=utfbom_32_le
patterns.utfbom_16_be=utfbom_16_be
patterns.utfbom_16_le=utfbom_16_le
patterns.utfbom_8=utfbom_8
-patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
-patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
+patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
+patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
patterns.utf8one=R("\000\127")
patterns.utf8two=R("\194\223")*utf8next
patterns.utf8three=R("\224\239")*utf8next*utf8next
@@ -4871,7 +4871,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 32843, stripped down to: 18226
+-- original size: 33063, stripped down to: 18397
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -5186,7 +5186,11 @@ local format_f=function(f)
end
local format_F=function(f)
n=n+1
- return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ if not f or f=="" then
+ return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or (a%s == 1 and '1') or format('%%.9f',a%s))",n,n,n,n)
+ else
+ return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ end
end
local format_g=function(f)
n=n+1
@@ -7180,7 +7184,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 25607, stripped down to: 16617
+-- original size: 25613, stripped down to: 16617
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -16875,8 +16879,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 694558
--- stripped bytes : 246497
+-- original bytes : 694959
+-- stripped bytes : 246707
-- end library merge
diff --git a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrunjit.exe b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrunjit.exe
new file mode 100755
index 00000000000..0e7882cf926
--- /dev/null
+++ b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrunjit.exe
Binary files differ
diff --git a/Master/texmf-dist/scripts/context/stubs/setup/setuptex b/Master/texmf-dist/scripts/context/stubs/setup/setuptex
new file mode 100644
index 00000000000..d41e3670757
--- /dev/null
+++ b/Master/texmf-dist/scripts/context/stubs/setup/setuptex
@@ -0,0 +1,167 @@
+# Example setup file for ConTeXt distribution
+#
+# Author: Hans Hagen
+# Patches: Arthur R. & Mojca M.
+#
+# Usage:
+# . setuptex [texroot]
+#
+# On the first run also execute:
+# mktexlsr
+# texexec --make --alone
+
+#
+# PLATFORM
+#
+
+# we will try to guess the platform first
+# (needs to be kept in sync with first-setup.sh and mtxrun)
+# if yours is missing, let us know
+
+system=`uname -s`
+cpu=`uname -m`
+
+case "$system" in
+ # linux
+ Linux)
+ case "$cpu" in
+ i*86) platform="linux" ;;
+ x86_64|ia64) platform="linux-64" ;;
+ # a little bit of cheating with ppc64 (won't work on Gentoo)
+ ppc|ppc64) platform="linux-ppc" ;;
+ *) platform="unknown" ;;
+ esac ;;
+ # Mac OS X
+ Darwin)
+ case "$cpu" in
+ i*86) platform="osx-intel" ;;
+ x86_64) platform="osx-64" ;;
+ ppc*|powerpc|power*|Power*) platform="osx-ppc" ;;
+ *) platform="unknown" ;;
+ esac ;;
+ # FreeBSD
+ FreeBSD|freebsd)
+ case "$cpu" in
+ i*86) platform="freebsd" ;;
+ x86_64) platform="freebsd" ;;
+ amd64) platform="freebsd-amd64" ;;
+ *) platform="unknown" ;;
+ esac ;;
+ # kFreeBSD (Debian)
+ GNU/kFreeBSD)
+ case "$cpu" in
+ i*86) platform="kfreebsd-i386" ;;
+ x86_64|amd64) platform="kfreebsd-amd64" ;;
+ *) platform="unknown" ;;
+ esac ;;
+ # cygwin
+ CYGWIN)
+ case "$cpu" in
+ i*86) platform="cygwin" ;;
+ x86_64|ia64) platform="cygwin-64" ;;
+ *) platform="unknown" ;;
+ esac ;;
+ # SunOS/Solaris
+ SunOS)
+ case "$cpu" in
+ sparc) platform="solaris-sparc" ;;
+ i86pc) platform="solaris-intel" ;;
+ *) platform="unknown" ;;
+ esac ;;
+ *) platform="unknown"
+esac
+
+# temporary fix for Snow Leopard
+if test "$platform" = "osx-intel"; then
+ # running Snow Leopard or later
+ if test `uname -r|cut -f1 -d"."` -ge 10 ; then
+ # working on 64-bit hardware
+ if test `sysctl -n hw.cpu64bit_capable` = 1; then
+ platform="osx-64"
+ fi
+ fi
+fi
+
+if test "$platform" = "unknown" ; then
+ echo "Error: your system \"$system $cpu\" is not supported yet."
+ echo "Please report to the ConTeXt mailing-list (ntg-context@ntg.nl)"
+fi
+
+#
+# PATH
+#
+
+# this resolves to path of the setuptex script
+# We use $0 for determine the path to the script, except for:
+# * bash where $0 always is bash; here we use BASH_SOURCE
+# * ksh93 where we use ${.sh.file}
+# Thanks to Vasile Gaburici and Alessandro Perucchi for reporting this
+# * http://www.ntg.nl/pipermail/ntg-context/2008/033953.html
+# * http://www.ntg.nl/pipermail/ntg-context/2012/068658.html
+if [ z"$BASH_SOURCE" != z ]; then
+ SCRIPTPATH="$BASH_SOURCE"
+elif [ z"$KSH_VERSION" != z ]; then
+ SCRIPTPATH="${.sh.file}"
+else
+ SCRIPTPATH="$0"
+fi
+
+OWNPATH=$(cd -P -- "$(dirname -- "$SCRIPTPATH")" && pwd -P)
+
+# but one can also call
+# . setuptex path-to-tree
+
+TEXROOT=""
+# first check if any path has been provided in the argument, and try to use that one
+if [ $# -ne 0 ] ; then
+ # TODO: resolve any errors
+ ARGPATH=$(cd -P -- "$(dirname -- "$1")" && pwd -P) && ARGPATH=$ARGPATH/$(basename -- "$1")
+ if test -f "$ARGPATH/texmf/tex/plain/base/plain.tex" ; then
+ if [ -d "$ARGPATH/texmf-$platform/bin" ]; then
+ TEXROOT="$ARGPATH"
+ else
+ echo "Binaries for platform '$platform' are missing."
+ echo "(There is no folder \"$ARGPATH/texmf-$platform/bin\")"
+ fi
+ else
+ echo "The argument \"$ARGPATH\" is not a valid TEXROOT path."
+ echo "(There is no file \"$ARGPATH/texmf/tex/plain/base/plain.tex\")"
+
+ if [ -f "$OWNPATH/texmf/tex/plain/base/plain.tex" ]; then
+ TEXROOT="$OWNPATH"
+ fi
+ fi
+else
+ if [ -f "$OWNPATH/texmf/tex/plain/base/plain.tex" ]; then
+ if [ -d "$OWNPATH/texmf-$platform/bin" ]; then
+ TEXROOT="$OWNPATH"
+ else
+ echo "Binaries for platform '$platform' are missing."
+ echo "(There is no folder \"$OWNPATH/texmf-$platform/bin\")"
+ fi
+ else
+ echo "\"$OWNPATH\" is not a valid TEXROOT path."
+ echo "(There is no file \"$OWNPATH/texmf/tex/plain/base/plain.tex\")"
+ fi
+fi
+
+if [ "$TEXROOT" != "" ]; then
+ # for Alan Braslau's server :)
+ if [ "x$PS1" != "x" ] ; then
+ echo "Setting \"$TEXROOT\" as ConTeXt root."
+ fi
+
+# ConTeXt binaries have to be added to PATH
+TEXMFOS=$TEXROOT/texmf-$platform
+export PATH=$TEXMFOS/bin:$PATH
+
+# unset variables that won't be used lately
+unset platform cpu system OWNPATH SCRIPTPATH ARGPATH TEXMFOS
+
+# not sure why this would be needed
+# export CTXMINIMAL=yes
+
+else
+ echo "provide a proper tex root (like '. setuptex /something/tex')" ;
+fi
+
diff --git a/Master/texmf-dist/scripts/context/stubs/setup/setuptex.bat b/Master/texmf-dist/scripts/context/stubs/setup/setuptex.bat
new file mode 100755
index 00000000000..b61fd44941e
--- /dev/null
+++ b/Master/texmf-dist/scripts/context/stubs/setup/setuptex.bat
@@ -0,0 +1,70 @@
+@ECHO OFF
+
+REM author: Hans Hagen - PRAGMA ADE - Hasselt NL - www.pragma-ade.com
+
+:userpath
+
+if "%SETUPTEX%"=="done" goto done
+
+if "%~s1"=="" goto selftest
+
+set TEXMFOS=%~s1texmf-mswin-64
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~s1\texmf-mswin-64
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~s1texmf-win64
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~s1\texmf-win64
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~s1texmf-mswin
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~s1\texmf-mswin
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~s1texmf-win32
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~s1\texmf-win32
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+:selftest
+
+set TEXMFOS=%~d0%~p0texmf-mswin-64
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~d0%~p0\texmf-mswin-64
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~d0%~p0texmf-win64
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~d0%~p0\texmf-win64
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~d0%~p0texmf-mswin
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~d0%~p0\texmf-mswin
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~d0%~p0texmf-win32
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+set TEXMFOS=%~d0%~p0\texmf-win32
+if exist %TEXMFOS%\bin\mtxrun.exe goto start
+
+:start
+
+set PATH=%TEXMFOS%\bin;%PATH%
+
+:register
+
+set SETUPTEX=done
+set CTXMINIMAL=yes
+
+:done
diff --git a/Master/texmf-dist/scripts/context/stubs/setup/setuptex.csh b/Master/texmf-dist/scripts/context/stubs/setup/setuptex.csh
new file mode 100644
index 00000000000..c1160675fb4
--- /dev/null
+++ b/Master/texmf-dist/scripts/context/stubs/setup/setuptex.csh
@@ -0,0 +1,164 @@
+# Example setup file for ConTeXt distribution
+#
+# Author: Hans Hagen
+# Patches: Arthur R. & Mojca M.
+# (t)csh version: Alan B.
+#
+# Usage :
+# source setuptex.csh [texroot]
+#
+# On the first run also execute:
+# mktexlsr
+# texexec --make --alone
+
+echo "We are considering removing setuptex.csh in case that nobody uses it."
+echo "If you still use this file please drop us some mail at"
+echo " gardeners (at) contextgarden (dot) net"
+echo "If we don't get any response, we will delete it in near future."
+
+#
+# PLATFORM
+#
+
+# we will try to guess the platform first
+# (needs to be kept in sync with first-setup.sh and mtxrun)
+# if yours is missing, let us know
+
+set system=`uname -s`
+set cpu=`uname -m`
+
+switch ( $system )
+ # linux
+ case Linux:
+ switch ( $cpu )
+ case i*86:
+ set platform="linux"
+ breaksw
+ case x86_64:
+ case ia64:
+ set platform="linux-64"
+ breaksw
+ case ppc:
+ case ppc64:
+ set platform="linux-ppc"
+ breaksw
+ default:
+ set platform="unknown"
+ endsw
+ breaksw
+ # Mac OS X
+ case Darwin:
+ switch ( $cpu )
+ case i*86:
+ set platform="osx-intel"
+ breaksw
+ case x86_64:
+ set platform="osx-64"
+ breaksw
+ case ppc*:
+ case powerpc:
+ case power*:
+ case Power*:
+ set platform="osx-ppc"
+ breaksw
+ default:
+ set platform="unknown"
+ endsw
+ breaksw
+ # FreeBSD
+ case FreeBSD:
+ case freebsd:
+ switch ( $cpu )
+ case i*86:
+ set platform="freebsd"
+ breaksw
+ case x86_64:
+ set platform="freebsd"
+ breaksw
+ case amd64:
+ set platform="freebsd-amd64"
+ breaksw
+ default:
+ set platform="unknown"
+ endsw
+ breaksw
+ # cygwin
+ case CYGWIN:
+ switch ( $cpu )
+ case i*86:
+ set platform="cygwin"
+ breaksw
+ case x86_64:
+ case ia64:
+ set platform="cygwin-64"
+ breaksw
+ default:
+ set platform="unknown"
+ endsw
+ breaksw
+ # SunOS/Solaris
+ case SunOS:
+ switch ( $cpu )
+ case sparc:
+ set platform="solaris-sparc"
+ breaksw
+ case i86pc:
+ set platform="solaris-intel"
+ default:
+ set platform="unknown"
+ endsw
+ breaksw
+ # Other
+ default:
+ set platform="unknown"
+endsw
+
+if ( $platform == "unknown" ) then
+ echo Error: your system \"$system $cpu\" is not supported yet.
+ echo Please report to the ConTeXt mailing-list (ntg-context@ntg.nl).
+endif
+
+#
+# PATH
+#
+
+# this resolves to path of the setuptex script
+# We use $0 for determine the path to the script, except for bash and (t)csh where $0
+# always is bash or (t)csh.
+
+# but one can also call
+# . setuptex path-to-tex-tree
+
+# first check if any path has been provided in the argument, and try to use that one
+if ( $# > 0 ) then
+ setenv TEXROOT $1
+else
+ # $_ should be `history -h 1` but doesn't seem to work...
+ set cmd=`history -h 1`
+ if ( $cmd[2]:h == $cmd[2]:t ) then
+ setenv TEXROOT $cwd
+ else
+ setenv TEXROOT $cmd[2]:h
+ endif
+ unset cmd
+endif
+cd $TEXROOT; setenv TEXROOT $cwd; cd -
+
+if ( -f "$TEXROOT/texmf/tex/plain/base/plain.tex" ) then
+ echo Setting \"$TEXROOT\" as TEXROOT.
+else
+ echo \"$TEXROOT\" is not a valid TEXROOT path.
+ echo There is no file \"$TEXROOT/texmf/tex/plain/base/plain.tex\".
+ echo Please provide a proper tex root (like \"source setuptex /path/tex\")
+ unsetenv TEXROOT
+ exit
+endif
+
+unsetenv TEXINPUTS MPINPUTS MFINPUTS
+
+# ConTeXt binaries have to be added to PATH
+setenv TEXMFOS $TEXROOT/texmf-$platform
+setenv PATH $TEXMFOS/bin:$PATH
+# TODO: we could set OSFONTDIR on Mac for example
+
+# setenv CTXMINIMAL yes
diff --git a/Master/texmf-dist/scripts/context/stubs/unix/contextjit b/Master/texmf-dist/scripts/context/stubs/unix/contextjit
new file mode 100755
index 00000000000..5ac1947c78e
--- /dev/null
+++ b/Master/texmf-dist/scripts/context/stubs/unix/contextjit
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+luajittex --luaonly $(dirname $0)/mtxrun --script context "$@"
+
+# luajittex --luaonly ${0%contextjit}mtxrun --script context "$@"
diff --git a/Master/texmf-dist/scripts/context/stubs/unix/ctxtools b/Master/texmf-dist/scripts/context/stubs/unix/ctxtools
deleted file mode 100755
index 2e6bd4afaa0..00000000000
--- a/Master/texmf-dist/scripts/context/stubs/unix/ctxtools
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-mtxrun --script ctxtools "$@"
diff --git a/Master/texmf-dist/scripts/context/stubs/unix/mptopdf b/Master/texmf-dist/scripts/context/stubs/unix/mptopdf
deleted file mode 100755
index 1473337405a..00000000000
--- a/Master/texmf-dist/scripts/context/stubs/unix/mptopdf
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-mtxrun --script mptopdf "$@"
diff --git a/Master/texmf-dist/scripts/context/stubs/unix/mtxrun b/Master/texmf-dist/scripts/context/stubs/unix/mtxrun
index 8679aefb10d..c3d4111626e 100755
--- a/Master/texmf-dist/scripts/context/stubs/unix/mtxrun
+++ b/Master/texmf-dist/scripts/context/stubs/unix/mtxrun
@@ -437,7 +437,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 29808, stripped down to: 16182
+-- original size: 29983, stripped down to: 16202
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -474,7 +474,7 @@ local uppercase=R("AZ")
local underscore=P("_")
local hexdigit=digit+lowercase+uppercase
local cr,lf,crlf=P("\r"),P("\n"),P("\r\n")
-local newline=crlf+S("\r\n")
+local newline=P("\r")*(P("\n")+P(true))+P("\n")
local escaped=P("\\")*anything
local squote=P("'")
local dquote=P('"')
@@ -496,8 +496,8 @@ patterns.utfbom_32_le=utfbom_32_le
patterns.utfbom_16_be=utfbom_16_be
patterns.utfbom_16_le=utfbom_16_le
patterns.utfbom_8=utfbom_8
-patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
-patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
+patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
+patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
patterns.utf8one=R("\000\127")
patterns.utf8two=R("\194\223")*utf8next
patterns.utf8three=R("\224\239")*utf8next*utf8next
@@ -4871,7 +4871,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 32843, stripped down to: 18226
+-- original size: 33063, stripped down to: 18397
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -5186,7 +5186,11 @@ local format_f=function(f)
end
local format_F=function(f)
n=n+1
- return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ if not f or f=="" then
+ return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or (a%s == 1 and '1') or format('%%.9f',a%s))",n,n,n,n)
+ else
+ return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ end
end
local format_g=function(f)
n=n+1
@@ -7180,7 +7184,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 25607, stripped down to: 16617
+-- original size: 25613, stripped down to: 16617
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -16875,8 +16879,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 694558
--- stripped bytes : 246497
+-- original bytes : 694959
+-- stripped bytes : 246707
-- end library merge
diff --git a/Master/texmf-dist/scripts/context/stubs/unix/mtxrunjit b/Master/texmf-dist/scripts/context/stubs/unix/mtxrunjit
new file mode 100755
index 00000000000..117105aa5c0
--- /dev/null
+++ b/Master/texmf-dist/scripts/context/stubs/unix/mtxrunjit
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+luajittex --luaonly $(dirname $0)/mtxrun "$@"
+
+# luajittex --luaonly ${0%jit} "$@"
diff --git a/Master/texmf-dist/scripts/context/stubs/unix/pstopdf b/Master/texmf-dist/scripts/context/stubs/unix/pstopdf
deleted file mode 100755
index 116f5f4a32e..00000000000
--- a/Master/texmf-dist/scripts/context/stubs/unix/pstopdf
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-mtxrun --script pstopdf "$@"
diff --git a/Master/texmf-dist/scripts/context/stubs/win64/contextjit.exe b/Master/texmf-dist/scripts/context/stubs/win64/contextjit.exe
new file mode 100755
index 00000000000..93290a6e0a8
--- /dev/null
+++ b/Master/texmf-dist/scripts/context/stubs/win64/contextjit.exe
Binary files differ
diff --git a/Master/texmf-dist/scripts/context/stubs/win64/mtxrun.lua b/Master/texmf-dist/scripts/context/stubs/win64/mtxrun.lua
index 8679aefb10d..c3d4111626e 100644
--- a/Master/texmf-dist/scripts/context/stubs/win64/mtxrun.lua
+++ b/Master/texmf-dist/scripts/context/stubs/win64/mtxrun.lua
@@ -437,7 +437,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 29808, stripped down to: 16182
+-- original size: 29983, stripped down to: 16202
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -474,7 +474,7 @@ local uppercase=R("AZ")
local underscore=P("_")
local hexdigit=digit+lowercase+uppercase
local cr,lf,crlf=P("\r"),P("\n"),P("\r\n")
-local newline=crlf+S("\r\n")
+local newline=P("\r")*(P("\n")+P(true))+P("\n")
local escaped=P("\\")*anything
local squote=P("'")
local dquote=P('"')
@@ -496,8 +496,8 @@ patterns.utfbom_32_le=utfbom_32_le
patterns.utfbom_16_be=utfbom_16_be
patterns.utfbom_16_le=utfbom_16_le
patterns.utfbom_8=utfbom_8
-patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
-patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
+patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
+patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
patterns.utf8one=R("\000\127")
patterns.utf8two=R("\194\223")*utf8next
patterns.utf8three=R("\224\239")*utf8next*utf8next
@@ -4871,7 +4871,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-str"] = package.loaded["util-str"] or true
--- original size: 32843, stripped down to: 18226
+-- original size: 33063, stripped down to: 18397
if not modules then modules={} end modules ['util-str']={
version=1.001,
@@ -5186,7 +5186,11 @@ local format_f=function(f)
end
local format_F=function(f)
n=n+1
- return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ if not f or f=="" then
+ return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or (a%s == 1 and '1') or format('%%.9f',a%s))",n,n,n,n)
+ else
+ return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ end
end
local format_g=function(f)
n=n+1
@@ -7180,7 +7184,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["trac-log"] = package.loaded["trac-log"] or true
--- original size: 25607, stripped down to: 16617
+-- original size: 25613, stripped down to: 16617
if not modules then modules={} end modules ['trac-log']={
version=1.001,
@@ -16875,8 +16879,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 694558
--- stripped bytes : 246497
+-- original bytes : 694959
+-- stripped bytes : 246707
-- end library merge
diff --git a/Master/texmf-dist/scripts/context/stubs/win64/mtxrunjit.exe b/Master/texmf-dist/scripts/context/stubs/win64/mtxrunjit.exe
new file mode 100755
index 00000000000..93290a6e0a8
--- /dev/null
+++ b/Master/texmf-dist/scripts/context/stubs/win64/mtxrunjit.exe
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/back-exp.lua b/Master/texmf-dist/tex/context/base/back-exp.lua
index 79538eb728b..44c2cd539b2 100644
--- a/Master/texmf-dist/tex/context/base/back-exp.lua
+++ b/Master/texmf-dist/tex/context/base/back-exp.lua
@@ -2446,3 +2446,4 @@ commands.settagfigure = structurestags.setfigure
commands.settagcombination = structurestags.setcombination
commands.settagtablecell = structurestags.settablecell
commands.settagtabulatecell = structurestags.settabulatecell
+
diff --git a/Master/texmf-dist/tex/context/base/back-ini.lua b/Master/texmf-dist/tex/context/base/back-ini.lua
index e2dabd91e9b..c1f973a0c6f 100644
--- a/Master/texmf-dist/tex/context/base/back-ini.lua
+++ b/Master/texmf-dist/tex/context/base/back-ini.lua
@@ -103,3 +103,9 @@ function codeinjections.gethpos () return 0 end
function codeinjections.getvpos () return 0 end
function codeinjections.hasmatrix() return false end
function codeinjections.getmatrix() return 1, 0, 0, 1, 0, 0 end
+
+-- can best be here
+
+function commands.setrealspaces(v)
+ nodes.tasks.setaction("shipouts","nodes.handlers.accessibility",v == interfaces.variables.yes)
+end
diff --git a/Master/texmf-dist/tex/context/base/back-ini.mkiv b/Master/texmf-dist/tex/context/base/back-ini.mkiv
index de4ba6138e7..c3bc78ae660 100644
--- a/Master/texmf-dist/tex/context/base/back-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/back-ini.mkiv
@@ -154,4 +154,10 @@
\back_job_set_suffix{pdf} % default
+% \setupbackend[space=yes] % replace spacing in (pdf) file
+
+\appendtoks
+ \ctxcommand{setrealspaces("\backendparameter\c!space")}%
+\to \everysetupbackend
+
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/back-u3d.mkiv b/Master/texmf-dist/tex/context/base/back-u3d.mkiv
index 89d26ee41e8..297dd554579 100644
--- a/Master/texmf-dist/tex/context/base/back-u3d.mkiv
+++ b/Master/texmf-dist/tex/context/base/back-u3d.mkiv
@@ -127,7 +127,7 @@
\startluaparameterset[u3d:myset:display:3]
toolbar = true,
tree = false,
- preview = 'area.png'
+ preview = 'axes.png'
\stopluaparameterset
\startluaparameterset[u3d:myset:display:4]
diff --git a/Master/texmf-dist/tex/context/base/char-ini.lua b/Master/texmf-dist/tex/context/base/char-ini.lua
index d6e8d18a94d..7dc381031fc 100644
--- a/Master/texmf-dist/tex/context/base/char-ini.lua
+++ b/Master/texmf-dist/tex/context/base/char-ini.lua
@@ -459,29 +459,33 @@ local is_mark = allocate ( tohash {
"mn", "ms",
} )
+local is_punctuation = allocate ( tohash {
+ "pc","pd","ps","pe","pi","pf","po",
+} )
+
-- to be redone: store checked characters
-characters.is_character = is_character
-characters.is_letter = is_letter
-characters.is_command = is_command
-characters.is_spacing = is_spacing
-characters.is_mark = is_mark
-
-local mt = { -- yes or no ?
- __index = function(t,k)
- if type(k) == "number" then
- local c = data[k].category
- return c and rawget(t,c)
- else
- -- avoid auto conversion in data.characters lookups
- end
+characters.is_character = is_character
+characters.is_letter = is_letter
+characters.is_command = is_command
+characters.is_spacing = is_spacing
+characters.is_mark = is_mark
+characters.is_punctuation = is_punctuation
+
+local mti = function(t,k)
+ if type(k) == "number" then
+ local c = data[k].category
+ return c and rawget(t,c)
+ else
+ -- avoid auto conversion in data.characters lookups
end
-}
+end
-setmetatableindex(characters.is_character, mt)
-setmetatableindex(characters.is_letter, mt)
-setmetatableindex(characters.is_command, mt)
-setmetatableindex(characters.is_spacing, mt)
+setmetatableindex(characters.is_character, mti)
+setmetatableindex(characters.is_letter, mti)
+setmetatableindex(characters.is_command, mti)
+setmetatableindex(characters.is_spacing, mti)
+setmetatableindex(characters.is_punctuation,mti)
-- todo: also define callers for the above
@@ -776,6 +780,17 @@ function characters.lower (str) return lpegmatch(tolower,str) end
function characters.upper (str) return lpegmatch(toupper,str) end
function characters.shaped(str) return lpegmatch(toshape,str) end
+-- maybe: (twice as fast when much ascii)
+--
+-- local tolower = lpeg.patterns.tolower
+-- local lower = string.lower
+--
+-- local allascii = R("\000\127")^1 * P(-1)
+--
+-- function characters.checkedlower(str)
+-- return lpegmatch(allascii,str) and lower(str) or lpegmatch(tolower,str) or str
+-- end
+
function characters.lettered(str,spacing)
local new, n = { }, 0
if spacing then
diff --git a/Master/texmf-dist/tex/context/base/cont-new.mkiv b/Master/texmf-dist/tex/context/base/cont-new.mkiv
index cf9aa9a870d..e20a7df915f 100644
--- a/Master/texmf-dist/tex/context/base/cont-new.mkiv
+++ b/Master/texmf-dist/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2014.05.05 22:31}
+\newcontextversion{2014.05.18 15:57}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/Master/texmf-dist/tex/context/base/context-version.pdf b/Master/texmf-dist/tex/context/base/context-version.pdf
index b544f56fea8..acc0c1f3671 100644
--- a/Master/texmf-dist/tex/context/base/context-version.pdf
+++ b/Master/texmf-dist/tex/context/base/context-version.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/context.mkiv b/Master/texmf-dist/tex/context/base/context.mkiv
index 9ef439e45d5..abf7d5c140d 100644
--- a/Master/texmf-dist/tex/context/base/context.mkiv
+++ b/Master/texmf-dist/tex/context/base/context.mkiv
@@ -28,7 +28,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2014.05.05 22:31}
+\edef\contextversion{2014.05.18 15:57}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/Master/texmf-dist/tex/context/base/data-tex.lua b/Master/texmf-dist/tex/context/base/data-tex.lua
index f5c986d7708..04c5ef469ee 100644
--- a/Master/texmf-dist/tex/context/base/data-tex.lua
+++ b/Master/texmf-dist/tex/context/base/data-tex.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['data-tex'] = {
license = "see context related readme files"
}
-local char = string.char
+local char, find = string.char, string.find
local insert, remove = table.insert, table.remove
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
@@ -15,10 +15,11 @@ local report_tex = logs.reporter("resolvers","tex")
local resolvers = resolvers
-local sequencers = utilities.sequencers
-local methodhandler = resolvers.methodhandler
-local splitlines = string.splitlines
-local utffiletype = utf.filetype
+local sequencers = utilities.sequencers
+local methodhandler = resolvers.methodhandler
+local splitlines = string.splitlines
+local utffiletype = utf.filetype
+local setmetatableindex = table.setmetatableindex
-- local fileprocessor = nil
-- local lineprocessor = nil
@@ -99,10 +100,11 @@ function helpers.textopener(tag,filename,filehandle,coding)
end
logs.show_open(filename)
insert(inputstack,filename)
- return {
+ local currentline, noflines = 0, noflines
+ local t = {
filename = filename,
noflines = noflines,
- currentline = 0,
+ -- currentline = 0,
close = function()
if trace_locating then
report_tex("%a closer: %a closed",tag,filename)
@@ -113,12 +115,12 @@ function helpers.textopener(tag,filename,filehandle,coding)
end,
reader = function(self)
self = self or t
- local currentline, noflines = self.currentline, self.noflines
+ -- local currentline, noflines = self.currentline, self.noflines
if currentline >= noflines then
return nil
else
currentline = currentline + 1
- self.currentline = currentline
+ -- self.currentline = currentline
local content = lines[currentline]
if not content then
return nil
@@ -137,6 +139,14 @@ function helpers.textopener(tag,filename,filehandle,coding)
end
end
}
+ setmetatableindex(t,function(t,k)
+ if k == "currentline" then
+ return currentline
+ else
+ -- no such key
+ end
+ end)
+ return t
end
function resolvers.findtexfile(filename,filetype)
diff --git a/Master/texmf-dist/tex/context/base/font-con.lua b/Master/texmf-dist/tex/context/base/font-con.lua
index b43961ec62e..aca7055235e 100644
--- a/Master/texmf-dist/tex/context/base/font-con.lua
+++ b/Master/texmf-dist/tex/context/base/font-con.lua
@@ -599,6 +599,7 @@ function constructors.scale(tfmdata,specification)
-- basemode hack (we try to catch missing tounicodes, e.g. needed for ssty in math cambria)
local c = changed[unicode]
if c then
+ local ligatures = character.ligatures -- the original ligatures (as we cannot rely on remapping)
description = descriptions[c] or descriptions[unicode] or character
character = characters[c] or character
index = description.index or c
@@ -610,6 +611,9 @@ function constructors.scale(tfmdata,specification)
touni = tounicode[i] -- nb: index!
end
end
+ if ligatures and not character.ligatures then
+ character.ligatures = ligatures -- the original targets (for now at least.. see libertine smallcaps)
+ end
else
description = descriptions[unicode] or character
index = description.index or unicode
@@ -780,7 +784,7 @@ function constructors.scale(tfmdata,specification)
chr.ligatures = vl -- shared
else
local tt = { }
- for i,l in next, vl do
+ for i, l in next, vl do
tt[i] = l
end
chr.ligatures = tt
@@ -963,7 +967,6 @@ function constructors.finalize(tfmdata)
--
properties.finalized = true
--
- --
return tfmdata
end
diff --git a/Master/texmf-dist/tex/context/base/font-otb.lua b/Master/texmf-dist/tex/context/base/font-otb.lua
index 946d552e48c..2e98d3ecbb9 100644
--- a/Master/texmf-dist/tex/context/base/font-otb.lua
+++ b/Master/texmf-dist/tex/context/base/font-otb.lua
@@ -47,13 +47,14 @@ local function gref(descriptions,n)
return f_unicode(n)
end
elseif n then
- local num, nam = { }, { }
- for i=2,#n do
+ local num, nam, j = { }, { }, 0
+ for i=1,#n do
local ni = n[i]
if tonumber(ni) then -- first is likely a key
+ j = j + 1
local di = descriptions[ni]
- num[i] = f_unicode(ni)
- nam[i] = di and di.name or "-"
+ num[j] = f_unicode(ni)
+ nam[j] = di and di.name or "-"
end
end
return f_unilist(num,nam)
@@ -169,7 +170,8 @@ end
-- pseudo names like hyphen_hyphen to endash so in practice we end
-- up with a bit too many definitions but the overhead is neglectable.
--
--- Todo: if changed[first] or changed[second] then ... end
+-- We can have changed[first] or changed[second] but it quickly becomes
+-- messy if we need to take that into account.
local trace = false
@@ -188,8 +190,8 @@ local function finalize_ligatures(tfmdata,ligatures)
local ligature = ligatures[i]
if ligature then
local unicode, lookupdata = ligature[1], ligature[2]
- if trace then
- trace_ligatures_detail("building % a into %a",lookupdata,unicode)
+ if trace_ligatures_detail then
+ report_prepare("building % a into %a",lookupdata,unicode)
end
local size = #lookupdata
local firstcode = lookupdata[1] -- [2]
@@ -201,8 +203,8 @@ local function finalize_ligatures(tfmdata,ligatures)
local firstdata = characters[firstcode]
if not firstdata then
firstcode = private
- if trace then
- trace_ligatures_detail("defining %a as %a",firstname,firstcode)
+ if trace_ligatures_detail then
+ report_prepare("defining %a as %a",firstname,firstcode)
end
unicodes[firstname] = firstcode
firstdata = { intermediate = true, ligatures = { } }
@@ -225,8 +227,8 @@ local function finalize_ligatures(tfmdata,ligatures)
break
end
end
- if trace then
- trace_ligatures_detail("codes (%a,%a) + (%a,%a) -> %a",firstname,firstcode,secondname,secondcode,target)
+ if trace_ligatures_detail then
+ report_prepare("codes (%a,%a) + (%a,%a) -> %a",firstname,firstcode,secondname,secondcode,target)
end
local firstligs = firstdata.ligatures
if firstligs then
@@ -237,6 +239,8 @@ local function finalize_ligatures(tfmdata,ligatures)
firstcode = target
firstname = secondname
end
+ elseif trace_ligatures_detail then
+ report_prepare("no glyph (%a,%a) for building %a",firstname,firstcode,target)
end
if okay then
ligatures[i] = false
@@ -246,12 +250,14 @@ local function finalize_ligatures(tfmdata,ligatures)
end
alldone = done == 0
end
- if trace then
- for k, v in next, characters do
- if v.ligatures then table.print(v,k) end
+ if trace_ligatures_detail then
+ for k, v in table.sortedhash(characters) do
+ if v.ligatures then
+ table.print(v,k)
+ end
end
end
- tfmdata.resources.private = private
+ resources.private = private
end
end
@@ -487,7 +493,7 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
end
changed[unicode] = data
elseif lookuptype == "alternate" then
- local replacement = data[alternate]
+ local replacement = data[alternate]
if replacement then
changed[unicode] = replacement
if trace_alternatives then
diff --git a/Master/texmf-dist/tex/context/base/font-otc.lua b/Master/texmf-dist/tex/context/base/font-otc.lua
index 92775270dc3..f7f8e9ce2c1 100644
--- a/Master/texmf-dist/tex/context/base/font-otc.lua
+++ b/Master/texmf-dist/tex/context/base/font-otc.lua
@@ -134,7 +134,7 @@ local function addfeature(data,feature,specifications)
askedfeatures[k] = table.tohash(v)
end
end
- sequences[#sequences+1] = {
+ local sequence = {
chain = 0,
features = { [feature] = askedfeatures },
flags = featureflags,
@@ -143,6 +143,11 @@ local function addfeature(data,feature,specifications)
subtables = st,
type = featuretype,
}
+ if specification.prepend then
+ insert(sequences,1,sequence)
+ else
+ insert(sequences,sequence)
+ end
-- register in metadata (merge as there can be a few)
if not gsubfeatures then
gsubfeatures = { }
@@ -208,6 +213,7 @@ local tlig_specification = {
data = tlig,
order = { "tlig" },
flags = noflags,
+ prepend = true,
}
otf.addfeature("tlig",tlig_specification)
@@ -231,6 +237,7 @@ local trep_specification = {
data = trep,
order = { "trep" },
flags = noflags,
+ prepend = true,
}
otf.addfeature("trep",trep_specification)
diff --git a/Master/texmf-dist/tex/context/base/grph-inc.lua b/Master/texmf-dist/tex/context/base/grph-inc.lua
index 392aa58b12e..d89c52996c7 100644
--- a/Master/texmf-dist/tex/context/base/grph-inc.lua
+++ b/Master/texmf-dist/tex/context/base/grph-inc.lua
@@ -1619,3 +1619,7 @@ end
-- interfacing
commands.setfigurelookuporder = figures.setorder
+
+--
+
+figures.images = images
diff --git a/Master/texmf-dist/tex/context/base/l-lpeg.lua b/Master/texmf-dist/tex/context/base/l-lpeg.lua
index 6feb7089c74..666af210386 100644
--- a/Master/texmf-dist/tex/context/base/l-lpeg.lua
+++ b/Master/texmf-dist/tex/context/base/l-lpeg.lua
@@ -107,7 +107,8 @@ local uppercase = R("AZ")
local underscore = P("_")
local hexdigit = digit + lowercase + uppercase
local cr, lf, crlf = P("\r"), P("\n"), P("\r\n")
-local newline = crlf + S("\r\n") -- cr + lf
+----- newline = crlf + S("\r\n") -- cr + lf
+local newline = P("\r") * (P("\n") + P(true)) + P("\n")
local escaped = P("\\") * anything
local squote = P("'")
local dquote = P('"')
@@ -141,8 +142,8 @@ patterns.utfbom_16_be = utfbom_16_be
patterns.utfbom_16_le = utfbom_16_le
patterns.utfbom_8 = utfbom_8
-patterns.utf_16_be_nl = P("\000\r\000\n") + P("\000\r") + P("\000\n")
-patterns.utf_16_le_nl = P("\r\000\n\000") + P("\r\000") + P("\n\000")
+patterns.utf_16_be_nl = P("\000\r\000\n") + P("\000\r") + P("\000\n") -- P("\000\r") * (P("\000\n") + P(true)) + P("\000\n")
+patterns.utf_16_le_nl = P("\r\000\n\000") + P("\r\000") + P("\n\000") -- P("\r\000") * (P("\n\000") + P(true)) + P("\n\000")
patterns.utf8one = R("\000\127")
patterns.utf8two = R("\194\223") * utf8next
diff --git a/Master/texmf-dist/tex/context/base/lpdf-grp.lua b/Master/texmf-dist/tex/context/base/lpdf-grp.lua
index befe52c7656..b3cc7ce1f5f 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-grp.lua
+++ b/Master/texmf-dist/tex/context/base/lpdf-grp.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['lpdf-grp'] = {
license = "see context related readme files"
}
-local format, gsub = string.format, string.gsub
+local formatters, gsub = string.formatters, string.gsub
local concat = table.concat
local round = math.round
@@ -236,7 +236,7 @@ function img.package(image) -- see lpdf-u3d **
local height = boundingbox[4]
local xform = img.scan {
attr = resources(),
- stream = format("%F 0 0 %F 0 0 cm /%s Do",width,height,imagetag),
+ stream = formatters["%F 0 0 %F 0 0 cm /%s Do"](width,height,imagetag),
bbox = { 0, 0, width/factor, height/factor },
}
img.immediatewrite(xform)
diff --git a/Master/texmf-dist/tex/context/base/lpdf-ini.lua b/Master/texmf-dist/tex/context/base/lpdf-ini.lua
index a89b8b8c55a..025f62c4f84 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-ini.lua
+++ b/Master/texmf-dist/tex/context/base/lpdf-ini.lua
@@ -254,6 +254,8 @@ local f_key_dictionary = formatters["/%s << % t >>"]
local f_dictionary = formatters["<< % t >>"]
local f_key_array = formatters["/%s [ % t ]"]
local f_array = formatters["[ % t ]"]
+local f_key_number = formatters["/%s %F"]
+local f_tonumber = formatters["%F"]
-- local f_key_value = formatters["/%s %s"]
-- local f_key_dictionary = formatters["/%s <<% t>>"]
@@ -271,6 +273,8 @@ tostring_d = function(t,contentonly,key)
local tv = type(v)
if tv == "string" then
r[rn] = f_key_value(k,toeight(v))
+ elseif tv == "number" then
+ r[rn] = f_key_number(k,v)
elseif tv == "unicode" then
r[rn] = f_key_value(k,tosixteen(v))
elseif tv == "table" then
@@ -309,6 +313,8 @@ tostring_a = function(t,contentonly,key)
local tv = type(v)
if tv == "string" then
r[k] = toeight(v)
+ elseif tv == "number" then
+ r[k] = f_tonumber(v)
elseif tv == "unicode" then
r[k] = tosixteen(v)
elseif tv == "table" then
@@ -339,14 +345,15 @@ tostring_a = function(t,contentonly,key)
end
end
-local tostring_x = function(t) return concat(t," ") end
-local tostring_s = function(t) return toeight(t[1]) end
-local tostring_u = function(t) return tosixteen(t[1]) end
-local tostring_n = function(t) return tostring(t[1]) end -- tostring not needed
-local tostring_c = function(t) return t[1] end -- already prefixed (hashed)
-local tostring_z = function() return "null" end
-local tostring_t = function() return "true" end
-local tostring_f = function() return "false" end
+local tostring_x = function(t) return concat(t," ") end
+local tostring_s = function(t) return toeight(t[1]) end
+local tostring_u = function(t) return tosixteen(t[1]) end
+local tostring_n = function(t) return tostring(t[1]) end -- tostring not needed
+local tostring_n = function(t) return f_tonumber(t[1]) end -- tostring not needed
+local tostring_c = function(t) return t[1] end -- already prefixed (hashed)
+local tostring_z = function() return "null" end
+local tostring_t = function() return "true" end
+local tostring_f = function() return "false" end
local tostring_r = function(t) local n = t[1] return n and n > 0 and (n .. " 0 R") or "NULL" end
local tostring_v = function(t)
diff --git a/Master/texmf-dist/tex/context/base/lpdf-u3d.lua b/Master/texmf-dist/tex/context/base/lpdf-u3d.lua
index f0fca0762f8..c9f4a03691e 100644
--- a/Master/texmf-dist/tex/context/base/lpdf-u3d.lua
+++ b/Master/texmf-dist/tex/context/base/lpdf-u3d.lua
@@ -18,7 +18,7 @@ if not modules then modules = { } end modules ['lpdf-u3d'] = {
-- it makes sense to add the same activation code as with swf.
local tonumber = tonumber
-local format, find = string.format, string.find
+local formatters, find = string.formatters, string.find
local cos, sin, sqrt, pi, atan2, abs = math.cos, math.sin, math.sqrt, math.pi, math.atan2, math.abs
local backends, lpdf = backends, lpdf
@@ -428,13 +428,13 @@ local function insert3d(spec) -- width, height, factor, display, controls, label
local preview = checkedkey(param,"preview","string")
if preview then
activationdict.A = pdfconstant("XA")
- local tag = format("%s:%s:%s",label,stream,preview)
+ local tag = formatters["%s:%s:%s"](label,stream,preview)
local ref = stored_pr[tag]
if not ref then
local figure = img.immediatewrite {
filename = preview,
- width = width,
- height = height
+ width = width,
+ height = height
}
ref = figure.objnum
stored_pr[tag] = ref
@@ -461,7 +461,7 @@ local function insert3d(spec) -- width, height, factor, display, controls, label
},
ProcSet = pdfarray { pdfconstant("PDF"), pdfconstant("ImageC") },
}
- local pwd = pdfflushstreamobject(format("q /GS gs %F 0 0 %F 0 0 cm /IM Do Q",factor*width,factor*height),pw)
+ local pwd = pdfflushstreamobject(formatters["q /GS gs %F 0 0 %F 0 0 cm /IM Do Q"](factor*width,factor*height),pw)
annot.AP = pdfdictionary {
N = pdfreference(pwd)
}
diff --git a/Master/texmf-dist/tex/context/base/lxml-ini.mkiv b/Master/texmf-dist/tex/context/base/lxml-ini.mkiv
index 239fe4ac0c3..752e315da5e 100644
--- a/Master/texmf-dist/tex/context/base/lxml-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/lxml-ini.mkiv
@@ -27,77 +27,78 @@
\unprotect % todo \!!bs \!!es where handy (slower)
-\def\ctxlxml #1{\ctxlua{lxml.#1}}
-
-\def\xmlmain #1{\ctxlxml{main("#1")}}
-\def\xmlmatch #1{\ctxlxml{match("#1")}}
-\def\xmlall #1#2{\ctxlxml{all("#1","#2")}}
-\def\xmlatt #1#2{\ctxlxml{att("#1","#2")}}
-\def\xmlattdef #1#2#3{\ctxlxml{att("#1","#2","#3")}}
-\def\xmlchainatt #1#2{\ctxlxml{chainattribute("#1","/","#2")}}
-\def\xmlchainattdef #1#2#3{\ctxlxml{chainattribute("#1","/","#2","#3")}}
-\def\xmlattribute #1#2#3{\ctxlxml{attribute("#1","#2","#3")}}
-\def\xmlattributedef #1#2#3#4{\ctxlxml{attribute("#1","#2","#3","#4")}}
-\def\xmlcommand #1#2#3{\ctxlxml{command("#1","#2","#3")}}
-\def\xmlconcat #1#2#3{\ctxlxml{concat("#1","#2",[[\detokenize{#3}]])}}
-\def\xmlconcatrange#1#2#3#4#5{\ctxlxml{concatrange("#1","#2","#3","#4",[[\detokenize{#5}]])}}
-\def\xmlcount #1#2{\ctxlxml{count("#1","#2")}}
-\def\xmldelete #1#2{\ctxlxml{delete("#1","#2")}}
-\def\xmldirectives #1{\ctxlxml{directives.setup("#1")}}
-\def\xmldirectivesbefore #1{\ctxlxml{directives.before("#1")}}
-\def\xmldirectivesafter #1{\ctxlxml{directives.after("#1")}}
-\def\xmlfilter #1#2{\ctxlxml{filter("#1",\!!bs#2\!!es)}}
-\def\xmlfilterlist #1#2{\ctxlxml{filterlist("#1",\!!bs#2\!!es)}}
-\def\xmlfunction #1#2{\ctxlxml{applyfunction("#1",\!!bs#2\!!es)}}
-\def\xmlfirst #1#2{\ctxlxml{first("#1","#2")}}
-\def\xmlflush #1{\ctxlxml{flush("#1")}}
-\def\xmlflushlinewise #1{\ctxlxml{flushlinewise("#1")}}
-\def\xmlflushspacewise #1{\ctxlxml{flushspacewise("#1")}}
-%def\xmlcontent #1{\ctxlxml{content("#1")}}
-%def\xmlflushstripped #1{\ctxlxml{strip("#1",true)}}
-\def\xmldirect #1{\ctxlxml{direct("#1")}} % in loops, not dt but root
-\def\xmlidx #1#2#3{\ctxlxml{idx("#1","#2",\number#3)}}
-\def\xmlinclude #1#2#3{\ctxlxml{include("#1","#2","#3",true)}}
-\def\xmlsave #1#2{\ctxlxml{save("#1","#2")}}
-\def\xmlindex #1#2#3{\ctxlxml{index("#1","#2",\number#3)}}
-\def\xmlinfo #1{\hbox{\ttxx[\ctxlxml{info("#1")}]}}
-\def\xmlshow #1{\startpacked\ttx\xmlverbatim{#1}\stoppacked}
-\def\xmllast #1#2{\ctxlxml{last("#1","#2")}}
-\def\xmlname #1{\ctxlxml{name("#1")}}
-\def\xmlnamespace #1{\ctxlxml{namespace("#1")}}
-\def\xmlnonspace #1#2{\ctxlxml{nonspace("#1","#2")}}
-\def\xmlraw #1#2{\ctxlxml{raw("#1","#2")}}
-\def\xmlcontext #1#2{\ctxlxml{context("#1","#2")}}
-\def\xmlflushcontext #1{\ctxlxml{context("#1")}}
-\def\xmlsnippet #1#2{\ctxlxml{snippet("#1",#2)}}
-\def\xmlelement #1#2{\ctxlxml{element("#1",#2)}}
-\def\xmlregisterns #1#2{\ctxlua{xml.registerns("#1","#2")}} % document
-\def\xmlremapname #1#2#3#4{\ctxlua{xml.remapname(lxml.id("#1"),"#2","#3","#4")}} % element
-\def\xmlremapnamespace #1#2#3{\ctxlua{xml.renamespace(lxml.id("#1"),"#2","#3")}} % document
-\def\xmlchecknamespace #1#2#3{\ctxlua{xml.checknamespace(lxml.id("#1"),"#2","#3")}} % element
-\def\xmlsetfunction #1#2#3{\ctxlxml{setaction("#1",\!!bs#2\!!es,#3)}}
-\def\xmlsetsetup #1#2#3{\ctxlxml{setsetup("#1",\!!bs#2\!!es,"#3")}}
-\def\xmlstrip #1#2{\ctxlxml{strip("#1","#2")}}
-\def\xmlstripnolines #1#2{\ctxlxml{strip("#1","#2",true)}}
-\def\xmlstripanywhere #1#2{\ctxlxml{strip("#1","#2",true,true)}}
-\def\xmlstripped #1#2{\ctxlxml{stripped("#1","#2")}}
-\def\xmlstrippednolines #1#2{\ctxlxml{stripped("#1","#2",true)}}
-\def\xmltag #1{\ctxlxml{tag("#1")}}
-\def\xmltext #1#2{\ctxlxml{text("#1","#2")}}
-\def\xmlverbatim #1{\ctxlxml{verbatim("#1")}}
-\def\xmldisplayverbatim #1{\ctxlxml{displayverbatim("#1")}}
-\def\xmlinlineverbatim #1{\ctxlxml{inlineverbatim("#1")}}
-
-\def\xmlload #1#2{\ctxlxml{load("#1","#2","\directxmlparameter\c!entities","\directxmlparameter\c!compress")}}
-\def\xmlloadbuffer #1#2{\ctxlxml{loadbuffer("#1","#2","\directxmlparameter\c!entities","\directxmlparameter\c!compress")}}
-\def\xmlloaddata #1#2{\ctxlxml{loaddata("#1",\!!bs#2\!!es,"\directxmlparameter\c!entities","\directxmlparameter\c!compress")}}
-\def\xmlloadregistered #1#2{\ctxlxml{loadregistered("#1","\directxmlparameter\c!entities","\directxmlparameter\c!compress")}}
-\def\xmlloaddirectives #1{\ctxlxml{directives.load("any:///#1")}}
-\def\xmlpos #1{\ctxlxml{pos("#1")}}
-
-\def\xmltoparameters #1{\ctxlxml{toparameters("#1")}}
-
-\def\xmltofile #1#2#3{\ctxlxml{tofile("#1","#2","#3")}} % id pattern filename
+\def\ctxlxml #1{\ctxlua{lxml.#1}}
+
+\def\xmlmain #1{\ctxlxml{main("#1")}}
+\def\xmlmatch #1{\ctxlxml{match("#1")}}
+\def\xmlall #1#2{\ctxlxml{all("#1","#2")}}
+\def\xmlatt #1#2{\ctxlxml{att("#1","#2")}}
+\def\xmlattdef #1#2#3{\ctxlxml{att("#1","#2","#3")}}
+\def\xmlchainatt #1#2{\ctxlxml{chainattribute("#1","/","#2")}}
+\def\xmlchainattdef #1#2#3{\ctxlxml{chainattribute("#1","/","#2","#3")}}
+\def\xmlattribute #1#2#3{\ctxlxml{attribute("#1","#2","#3")}}
+\def\xmlattributedef #1#2#3#4{\ctxlxml{attribute("#1","#2","#3","#4")}}
+\def\xmlcommand #1#2#3{\ctxlxml{command("#1","#2","#3")}}
+\def\xmlconcat #1#2#3{\ctxlxml{concat("#1","#2",[[\detokenize{#3}]])}}
+\def\xmlconcatrange #1#2#3#4#5{\ctxlxml{concatrange("#1","#2","#3","#4",[[\detokenize{#5}]])}}
+\def\xmlcount #1#2{\ctxlxml{count("#1","#2")}}
+\def\xmldelete #1#2{\ctxlxml{delete("#1","#2")}}
+\def\xmldirectives #1{\ctxlxml{directives.setup("#1")}}
+\def\xmldirectivesbefore #1{\ctxlxml{directives.before("#1")}}
+\def\xmldirectivesafter #1{\ctxlxml{directives.after("#1")}}
+\def\xmlfilter #1#2{\ctxlxml{filter("#1",\!!bs#2\!!es)}}
+\def\xmlfilterlist #1#2{\ctxlxml{filterlist("#1",\!!bs#2\!!es)}}
+\def\xmlfunction #1#2{\ctxlxml{applyfunction("#1",\!!bs#2\!!es)}}
+\def\xmlfirst #1#2{\ctxlxml{first("#1","#2")}}
+\def\xmlflush #1{\ctxlxml{flush("#1")}}
+\def\xmlflushlinewise #1{\ctxlxml{flushlinewise("#1")}}
+\def\xmlflushspacewise #1{\ctxlxml{flushspacewise("#1")}}
+%def\xmlcontent #1{\ctxlxml{content("#1")}}
+%def\xmlflushstripped #1{\ctxlxml{strip("#1",true)}}
+\def\xmldirect #1{\ctxlxml{direct("#1")}} % in loops, not dt but root
+\def\xmlidx #1#2#3{\ctxlxml{idx("#1","#2",\number#3)}}
+\def\xmlinclude #1#2#3{\ctxlxml{include("#1","#2","#3",true)}}
+\def\xmlincludeoptions#1#2#3#4{\ctxlxml{include("#1","#2","#3","#4")}}
+\def\xmlsave #1#2{\ctxlxml{save("#1","#2")}}
+\def\xmlindex #1#2#3{\ctxlxml{index("#1","#2",\number#3)}}
+\def\xmlinfo #1{\hbox{\ttxx[\ctxlxml{info("#1")}]}}
+\def\xmlshow #1{\startpacked\ttx\xmlverbatim{#1}\stoppacked}
+\def\xmllast #1#2{\ctxlxml{last("#1","#2")}}
+\def\xmlname #1{\ctxlxml{name("#1")}}
+\def\xmlnamespace #1{\ctxlxml{namespace("#1")}}
+\def\xmlnonspace #1#2{\ctxlxml{nonspace("#1","#2")}}
+\def\xmlraw #1#2{\ctxlxml{raw("#1","#2")}}
+\def\xmlcontext #1#2{\ctxlxml{context("#1","#2")}}
+\def\xmlflushcontext #1{\ctxlxml{context("#1")}}
+\def\xmlsnippet #1#2{\ctxlxml{snippet("#1",#2)}}
+\def\xmlelement #1#2{\ctxlxml{element("#1",#2)}}
+\def\xmlregisterns #1#2{\ctxlua{xml.registerns("#1","#2")}} % document
+\def\xmlremapname #1#2#3#4{\ctxlua{xml.remapname(lxml.id("#1"),"#2","#3","#4")}} % element
+\def\xmlremapnamespace #1#2#3{\ctxlua{xml.renamespace(lxml.id("#1"),"#2","#3")}} % document
+\def\xmlchecknamespace #1#2#3{\ctxlua{xml.checknamespace(lxml.id("#1"),"#2","#3")}} % element
+\def\xmlsetfunction #1#2#3{\ctxlxml{setaction("#1",\!!bs#2\!!es,#3)}}
+\def\xmlsetsetup #1#2#3{\ctxlxml{setsetup("#1",\!!bs#2\!!es,"#3")}}
+\def\xmlstrip #1#2{\ctxlxml{strip("#1","#2")}}
+\def\xmlstripnolines #1#2{\ctxlxml{strip("#1","#2",true)}}
+\def\xmlstripanywhere #1#2{\ctxlxml{strip("#1","#2",true,true)}}
+\def\xmlstripped #1#2{\ctxlxml{stripped("#1","#2")}}
+\def\xmlstrippednolines #1#2{\ctxlxml{stripped("#1","#2",true)}}
+\def\xmltag #1{\ctxlxml{tag("#1")}}
+\def\xmltext #1#2{\ctxlxml{text("#1","#2")}}
+\def\xmlverbatim #1{\ctxlxml{verbatim("#1")}}
+\def\xmldisplayverbatim #1{\ctxlxml{displayverbatim("#1")}}
+\def\xmlinlineverbatim #1{\ctxlxml{inlineverbatim("#1")}}
+
+\def\xmlload #1#2{\ctxlxml{load("#1","#2","\directxmlparameter\c!entities","\directxmlparameter\c!compress")}}
+\def\xmlloadbuffer #1#2{\ctxlxml{loadbuffer("#1","#2","\directxmlparameter\c!entities","\directxmlparameter\c!compress")}}
+\def\xmlloaddata #1#2{\ctxlxml{loaddata("#1",\!!bs#2\!!es,"\directxmlparameter\c!entities","\directxmlparameter\c!compress")}}
+\def\xmlloadregistered #1#2{\ctxlxml{loadregistered("#1","\directxmlparameter\c!entities","\directxmlparameter\c!compress")}}
+\def\xmlloaddirectives #1{\ctxlxml{directives.load("any:///#1")}}
+\def\xmlpos #1{\ctxlxml{pos("#1")}}
+
+\def\xmltoparameters #1{\ctxlxml{toparameters("#1")}}
+
+\def\xmltofile #1#2#3{\ctxlxml{tofile("#1","#2","#3")}} % id pattern filename
% kind of special:
@@ -106,12 +107,12 @@
% todo: \xmldoifelseattribute
-\def\xmldoif #1#2{\ctxlxml{doif (\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
-\def\xmldoifnot #1#2{\ctxlxml{doifnot (\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
-\def\xmldoifelse #1#2{\ctxlxml{doifelse (\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
-\def\xmldoiftext #1#2{\ctxlxml{doiftext (\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
-\def\xmldoifnottext #1#2{\ctxlxml{doifnottext (\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
-\def\xmldoifelsetext #1#2{\ctxlxml{doifelsetext(\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
+\def\xmldoif #1#2{\ctxlxml{doif (\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
+\def\xmldoifnot #1#2{\ctxlxml{doifnot (\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
+\def\xmldoifelse #1#2{\ctxlxml{doifelse (\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
+\def\xmldoiftext #1#2{\ctxlxml{doiftext (\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
+\def\xmldoifnottext #1#2{\ctxlxml{doifnottext (\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
+\def\xmldoifelsetext #1#2{\ctxlxml{doifelsetext(\!!bs#1\!!es,\!!bs#2\!!es)}} % expandable
%def\xmldoifelseempty #1#2{\ctxlxml{doifelseempty("#1","#2")}} % #2, "*" or "" == self not yet implemented
%def\xmldoifelseselfempty #1{\ctxlxml{doifelseempty("#1")}}
diff --git a/Master/texmf-dist/tex/context/base/lxml-tex.lua b/Master/texmf-dist/tex/context/base/lxml-tex.lua
index 0503c511c45..0c58a47cc9f 100644
--- a/Master/texmf-dist/tex/context/base/lxml-tex.lua
+++ b/Master/texmf-dist/tex/context/base/lxml-tex.lua
@@ -38,9 +38,11 @@ local xmlapplylpath = xml.applylpath
local xmlunprivatized, xmlprivatetoken, xmlprivatecodes = xml.unprivatized, xml.privatetoken, xml.privatecodes
local xmlstripelement = xml.stripelement
-local variables = (interfaces and interfaces.variables) or { }
+local variables = interfaces and interfaces.variables or { }
-local insertbeforevalue, insertaftervalue = utilities.tables.insertbeforevalue, utilities.tables.insertaftervalue
+local settings_to_hash = utilities.parsers.settings_to_hash
+local insertbeforevalue = utilities.tables.insertbeforevalue
+local insertaftervalue = utilities.tables.insertaftervalue
local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
@@ -352,7 +354,7 @@ end
function lxml.checkindex(name)
local root = getid(name)
- return (root and root.index) or 0
+ return root and root.index or 0
end
function lxml.withindex(name,n,command) -- will change as name is always there now
@@ -434,16 +436,74 @@ function lxml.register(id,xmltable,filename)
return xmltable
end
-function lxml.include(id,pattern,attribute,recurse)
+-- function lxml.include(id,pattern,attribute,recurse,resolve)
+-- starttiming(xml)
+-- local root = getid(id)
+-- xml.include(root,pattern,attribute,recurse,function(filename)
+-- if filename then
+-- -- preprocessing
+-- filename = commands.preparedfile(filename)
+-- -- some protection
+-- if file.dirname(filename) == "" and root.filename then
+-- local dn = file.dirname(root.filename)
+-- if dn ~= "" then
+-- filename = file.join(dn,filename)
+-- end
+-- end
+-- if trace_loading then
+-- report_lxml("including file %a",filename)
+-- end
+-- -- handy if we have a flattened structure
+-- if resolve then
+-- filename = resolvers.resolve(filename) or filename
+-- end
+-- -- todo: check variants and provide
+-- noffiles, nofconverted = noffiles + 1, nofconverted + 1
+-- return resolvers.loadtexfile(filename) or ""
+-- else
+-- return ""
+-- end
+-- end)
+-- stoptiming(xml)
+-- end
+
+-- recurse prepare rootpath resolve basename
+
+local options_true = { "recurse", "prepare", "rootpath" }
+local options_nil = { "prepare", "rootpath" }
+
+function lxml.include(id,pattern,attribute,options)
starttiming(xml)
local root = getid(id)
- xml.include(root,pattern,attribute,recurse,function(filename)
+ if options == true then
+ -- downward compatible
+ options = options_true
+ elseif not options then
+ -- downward compatible
+ options = options_nil
+ else
+ options = settings_to_hash(options) or { }
+ end
+ xml.include(root,pattern,attribute,options.recurse,function(filename)
if filename then
- filename = commands.preparedfile(filename)
- if file.dirname(filename) == "" and root.filename then
- local dn = file.dirname(root.filename)
- if dn ~= "" then
- filename = file.join(dn,filename)
+ -- preprocessing
+ if options.prepare then
+ filename = commands.preparedfile(filename)
+ end
+ -- handy if we have a flattened structure
+ if options.basename then
+ filename = file.basename(filename)
+ end
+ if options.resolve then
+ filename = resolvers.resolve(filename) or filename
+ end
+ -- some protection
+ if options.rootpath then
+ if file.dirname(filename) == "" and root.filename then
+ local dn = file.dirname(root.filename)
+ if dn ~= "" then
+ filename = file.join(dn,filename)
+ end
end
end
if trace_loading then
@@ -1125,7 +1185,9 @@ local function command(collected,cmd,otherwise)
lxml.addindex(name,false,true)
ix = e.ix
end
- if wildcard then
+ if not ix then
+ report_lxml("no valid node index for element %a in command %s",name,cmd)
+ elseif wildcard then
contextsprint(ctxcatcodes,"\\xmlw{",(gsub(cmd,"%*",e.tg)),"}{",name,"::",ix,"}")
else
contextsprint(ctxcatcodes,"\\xmlw{",cmd,"}{",name,"::",ix,"}")
diff --git a/Master/texmf-dist/tex/context/base/m-pipemode.mkiv b/Master/texmf-dist/tex/context/base/m-pipemode.mkiv
new file mode 100644
index 00000000000..e96394c431e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/m-pipemode.mkiv
@@ -0,0 +1,7 @@
+% For Mojca: context --global m-pipemode.mkiv
+
+\disabledirectives[system.errorcontext]
+
+\starttext
+
+\let\stoptext\relax
diff --git a/Master/texmf-dist/tex/context/base/math-frc.mkiv b/Master/texmf-dist/tex/context/base/math-frc.mkiv
index f4f3f2b84a1..7032c665b08 100644
--- a/Master/texmf-dist/tex/context/base/math-frc.mkiv
+++ b/Master/texmf-dist/tex/context/base/math-frc.mkiv
@@ -106,12 +106,57 @@
\c!rulethickness=.25\exheight,
\c!left=0x2E,
\c!right=0x2E,
+ \c!topdistance=,
+ \c!bottomdistance=,
\c!rule=\v!auto]
\appendtoks
\setuevalue{\currentmathfraction}{\math_frac{\currentmathfraction}}%
\to \everydefinemathfraction
+% Sometimes users want control over the distances:
+
+\let\math_fraction_set_distance\relax
+
+\appendtoks
+ \math_fraction_set_distance
+\to \everymathematics
+
+\unexpanded\def\math_fraction_set_distance_top
+ {\Umathfractionnumup \displaystyle\m_math_fraction_distance_top
+ \relax}
+
+\unexpanded\def\math_fraction_set_distance_bot
+ {\Umathfractiondenomdown\displaystyle\m_math_fraction_distance_bot
+ \relax}
+
+\unexpanded\def\math_fraction_set_distance_all
+ {\Umathfractionnumup \displaystyle\m_math_fraction_distance_top
+ \Umathfractiondenomdown\displaystyle\m_math_fraction_distance_bot
+ \relax}
+
+\appendtoks
+ \ifx\currentmathfraction\empty
+ \edef\m_math_fraction_distance_top{\mathfractionparameter\c!topdistance}%
+ \edef\m_math_fraction_distance_bot{\mathfractionparameter\c!bottomdistance}%
+ \ifx\m_math_fraction_distance_top\empty
+ \ifx\m_math_fraction_distance_bot\empty
+ \let\math_fraction_set_distance\relax
+ \else
+ \let\math_fraction_set_distance\math_fraction_set_distance_bot
+ \fi
+ \else
+ \ifx\m_math_fraction_distance_bot\empty
+ \let\math_fraction_set_distance\math_fraction_set_distance_top
+ \else
+ \let\math_fraction_set_distance\math_fraction_set_distance_all
+ \fi
+ \fi
+ \fi
+\to \everysetupmathfraction
+
+% So far for control.
+
\newdimen\d_math_fraction_margin
\unexpanded\def\math_frac#1%
diff --git a/Master/texmf-dist/tex/context/base/math-ini.mkiv b/Master/texmf-dist/tex/context/base/math-ini.mkiv
index dcd2a5c3343..adf252d9526 100644
--- a/Master/texmf-dist/tex/context/base/math-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/math-ini.mkiv
@@ -230,6 +230,12 @@
\ifdefined\mr \else \let\mr\relax \fi
\ifdefined\mb \else \let\mb\relax \fi
+% 1: $\setmathattribute{ss}{bf}3$
+% 2: $\setmathattribute{ss}{bf}\setmathfontstylealterternate{bf}3$
+% 3: $\setmathattribute{ss}{bf}\setmathfontstyle{bf}3$
+% 4: $\setmathattribute{ss}{bf}\setmathfontstyle{bf}\setmathfontstylealterternate{bf}3$
+% 5: $e=mc^2 \quad \mb e=mc^2$
+
\prependtoks
\mathdefault
\to \everymathematics
diff --git a/Master/texmf-dist/tex/context/base/math-map.lua b/Master/texmf-dist/tex/context/base/math-map.lua
index 2ebcdfc8696..f2a588fc7de 100644
--- a/Master/texmf-dist/tex/context/base/math-map.lua
+++ b/Master/texmf-dist/tex/context/base/math-map.lua
@@ -44,8 +44,8 @@ local registerotffeature = otffeatures.register
local setmetatableindex = table.setmetatableindex
-local texgetattribute = tex.getattribute
-local texsetattribute = tex.setattribute
+local texgetattribute = tex.getattribute
+local texsetattribute = tex.setattribute
local trace_greek = false trackers.register("math.greek", function(v) trace_greek = v end)
local report_remapping = logs.reporter("mathematics","remapping")
@@ -59,7 +59,52 @@ local mathematics = mathematics
-- diagnostics and quick and dirty alphabet tracing (s-mat-10.mkiv) as we deal with
-- it otherwise.
-mathematics.gaps = {
+-- todo: allocate
+
+mathematics.styles = allocate { "regular", "sansserif", "monospaced", "fraktur", "script", "blackboard" }
+mathematics.alternatives = allocate { "normal", "bold", "italic", "bolditalic" }
+mathematics.sets = allocate { "ucletters", "lcletters", "digits", "ucgreek", "lcgreek", "symbols" }
+
+mathematics.charactersets = allocate {
+ ucletters = {
+ 0x00041, 0x00042, 0x00043, 0x00044, 0x00045,
+ 0x00046, 0x00047, 0x00048, 0x00049, 0x0004A,
+ 0x0004B, 0x0004C, 0x0004D, 0x0004E, 0x0004F,
+ 0x00050, 0x00051, 0x00052, 0x00053, 0x00054,
+ 0x00055, 0x00056, 0x00057, 0x00058, 0x00059,
+ 0x0005A,
+ },
+ lcletters = {
+ 0x00061, 0x00062, 0x00063, 0x00064, 0x00065,
+ 0x00066, 0x00067, 0x00068, 0x00069, 0x0006A,
+ 0x0006B, 0x0006C, 0x0006D, 0x0006E, 0x0006F,
+ 0x00070, 0x00071, 0x00072, 0x00073, 0x00074,
+ 0x00075, 0x00076, 0x00077, 0x00078, 0x00079,
+ 0x0007A,
+ },
+ digits = {
+ 0x00030, 0x00031, 0x00032, 0x00033, 0x00034,
+ 0x00035, 0x00036, 0x00037, 0x00038, 0x00039,
+ },
+ ucgreek = {
+ 0x0391, 0x0392, 0x0393, 0x0394, 0x0395,
+ 0x0396, 0x0397, 0x0398, 0x0399, 0x039A,
+ 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
+ 0x03A0, 0x03A1, 0x03A3, 0x03A4, 0x03A5,
+ 0x03A6, 0x03A7, 0x03A8, 0x03A9
+ },
+ lcgreek = {
+ 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5,
+ 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA,
+ 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
+ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4,
+ 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9,
+ 0x03D1, 0x03D5, 0x03D6, 0x03F0, 0x03F1,
+ 0x03F4, 0x03F5
+ },
+}
+
+mathematics.gaps = allocate {
[0x1D455] = 0x0210E, -- ℎ h
[0x1D49D] = 0x0212C, -- ℬ script B
[0x1D4A0] = 0x02130, -- ℰ script E
@@ -112,9 +157,10 @@ registerotffeature {
-- following approach permits easier remapping of a-a, A-Z and 0-9 to
-- fallbacks; symbols is currently mostly greek
-local function todigit(n) local t = { } for i=0, 9 do t[0x00030+i] = n+i end return t end
-local function toupper(n) local t = { } for i=0,25 do t[0x00041+i] = n+i end return t end
-local function tolower(n) local t = { } for i=0,25 do t[0x00061+i] = n+i end return t end
+local function todigit (n) local t = { } for i=0, 9 do t[0x00030+i] = n+i end return t end
+local function toupper (n) local t = { } for i=0,25 do t[0x00041+i] = n+i end return t end
+local function tolower (n) local t = { } for i=0,25 do t[0x00061+i] = n+i end return t end
+local function tovector(t) return t end
local regular_tf = {
digits = todigit(0x00030),
@@ -143,7 +189,7 @@ local regular_tf = {
}
local regular_it = {
- digits = regular_tf.digits,
+ digits = tovector(regular_tf.digits),
ucletters = toupper(0x1D434),
lcletters = { -- H
[0x00061]=0x1D44E, [0x00062]=0x1D44F, [0x00063]=0x1D450, [0x00064]=0x1D451, [0x00065]=0x1D452,
@@ -202,7 +248,7 @@ local regular_bf= {
}
local regular_bi = {
- digits = regular_bf.digits,
+ digits = tovector(regular_bf.digits),
ucletters = toupper(0x1D468),
lcletters = tolower(0x1D482),
ucgreek = {
@@ -238,18 +284,18 @@ local sansserif_tf = {
digits = todigit(0x1D7E2),
ucletters = toupper(0x1D5A0),
lcletters = tolower(0x1D5BA),
- lcgreek = regular_tf.lcgreek,
- ucgreek = regular_tf.ucgreek,
- symbols = regular_tf.symbols,
+ lcgreek = tovector(regular_tf.lcgreek),
+ ucgreek = tovector(regular_tf.ucgreek),
+ symbols = tovector(regular_tf.symbols),
}
local sansserif_it = {
- digits = regular_tf.digits,
+ digits = tovector(regular_tf.digits),
ucletters = toupper(0x1D608),
lcletters = tolower(0x1D622),
- lcgreek = regular_tf.lcgreek,
- ucgreek = regular_tf.ucgreek,
- symbols = regular_tf.symbols,
+ lcgreek = tovector(regular_tf.lcgreek),
+ ucgreek = tovector(regular_tf.ucgreek),
+ symbols = tovector(regular_tf.symbols),
}
local sansserif_bf = {
@@ -279,7 +325,7 @@ local sansserif_bf = {
}
local sansserif_bi = {
- digits = sansserif_bf.digits,
+ digits = tovector(sansserif_bf.digits),
ucletters = toupper(0x1D63C),
lcletters = tolower(0x1D656),
ucgreek = {
@@ -315,16 +361,20 @@ local monospaced_tf = {
digits = todigit(0x1D7F6),
ucletters = toupper(0x1D670),
lcletters = tolower(0x1D68A),
- lcgreek = sansserif_tf.lcgreek,
- ucgreek = sansserif_tf.ucgreek,
- symbols = sansserif_tf.symbols,
+ lcgreek = tovector(sansserif_tf.lcgreek),
+ ucgreek = tovector(sansserif_tf.ucgreek),
+ symbols = tovector(sansserif_tf.symbols),
}
+local monospaced_it = tovector(sansserif_it)
+local monospaced_bf = tovector(sansserif_bf)
+local monospaced_bi = tovector(sansserif_bi)
+
local monospaced = {
tf = monospaced_tf,
- it = sansserif_tf,
- bf = sansserif_tf,
- bi = sansserif_bf,
+ it = monospaced_tf,
+ bf = monospaced_tf,
+ bi = monospaced_bf,
}
local blackboard_tf = {
@@ -362,7 +412,7 @@ local blackboard = {
}
local fraktur_tf= {
- digits = regular_tf.digits,
+ digits = tovector(regular_tf.digits),
ucletters = { -- C H I R Z
[0x00041]=0x1D504, [0x00042]=0x1D505, [0x00043]=0x0212D, [0x00044]=0x1D507, [0x00045]=0x1D508,
[0x00046]=0x1D509, [0x00047]=0x1D50A, [0x00048]=0x0210C, [0x00049]=0x02111, [0x0004A]=0x1D50D,
@@ -372,18 +422,18 @@ local fraktur_tf= {
[0x0005A]=0x02128,
},
lcletters = tolower(0x1D51E),
- lcgreek = regular_tf.lcgreek,
- ucgreek = regular_tf.ucgreek,
- symbols = regular_tf.symbols,
+ lcgreek = tovector(regular_tf.lcgreek),
+ ucgreek = tovector(regular_tf.ucgreek),
+ symbols = tovector(regular_tf.symbols),
}
local fraktur_bf = {
- digits = regular_bf.digits,
+ digits = tovector(regular_bf.digits),
ucletters = toupper(0x1D56C),
lcletters = tolower(0x1D586),
- lcgreek = regular_bf.lcgreek,
- ucgreek = regular_bf.ucgreek,
- symbols = regular_bf.symbols,
+ lcgreek = tovector(regular_bf.lcgreek),
+ ucgreek = tovector(regular_bf.ucgreek),
+ symbols = tovector(regular_bf.symbols),
}
local fraktur = { -- ok
@@ -394,7 +444,7 @@ local fraktur = { -- ok
}
local script_tf = {
- digits = regular_tf.digits,
+ digits = tovector(regular_tf.digits),
ucletters = { -- B E F H I L M R -- P 2118
[0x00041]=0x1D49C, [0x00042]=0x0212C, [0x00043]=0x1D49E, [0x00044]=0x1D49F, [0x00045]=0x02130,
[0x00046]=0x02131, [0x00047]=0x1D4A2, [0x00048]=0x0210B, [0x00049]=0x02110, [0x0004A]=0x1D4A5,
@@ -411,18 +461,18 @@ local script_tf = {
[0x00075]=0x1D4CA, [0x00076]=0x1D4CB, [0x00077]=0x1D4CC, [0x00078]=0x1D4CD, [0x00079]=0x1D4CE,
[0x0007A]=0x1D4CF,
},
- lcgreek = regular_tf.lcgreek,
- ucgreek = regular_tf.ucgreek,
- symbols = regular_tf.symbols,
+ lcgreek = tovector(regular_tf.lcgreek),
+ ucgreek = tovector(regular_tf.ucgreek),
+ symbols = tovector(regular_tf.symbols),
}
local script_bf = {
- digits = regular_bf.digits,
+ digits = tovector(regular_bf.digits),
ucletters = toupper(0x1D4D0),
lcletters = tolower(0x1D4EA),
- lcgreek = regular_bf.lcgreek,
- ucgreek = regular_bf.ucgreek,
- symbols = regular_bf.symbols,
+ lcgreek = tovector(regular_bf.lcgreek),
+ ucgreek = tovector(regular_bf.ucgreek),
+ symbols = tovector(regular_bf.symbols),
}
local script = {
@@ -441,82 +491,83 @@ local alphabets = allocate {
script = script,
}
-mathematics.alphabets = alphabets
+alphabets.tt = tovector(monospaced)
+alphabets.ss = tovector(sansserif)
+alphabets.rm = tovector(regular)
+alphabets.bb = tovector(blackboard)
+alphabets.fr = tovector(fraktur)
+alphabets.sr = tovector(script)
-local boldmap = { }
-
--- ["blackboard"] = { ["bf"] = { ["digits"] = {
-
-local function remap(tf,bf)
- for _, alphabet in next, alphabets do
- local tfdata = alphabet[tf]
- local bfdata = alphabet[bf]
- if tfdata then
- for k, tfd in next, tfdata do
- if type(tfd) == "table" then
- local bfd = bfdata[k]
- if bfd then
- for n, u in next, tfd do
- local bn = bfd[n]
- if bn then
- boldmap[u] = bn
- end
- end
- end
- end
- end
- end
- end
-end
+monospaced.normal = tovector(monospaced_tf)
+monospaced.italic = tovector(monospaced_it)
+monospaced.bold = tovector(monospaced_bf)
+monospaced.bolditalic = tovector(monospaced_bi)
+
+sansserif.normal = tovector(sansserif_tf)
+sansserif.italic = tovector(sansserif_it)
+sansserif.bold = tovector(sansserif_bf)
+sansserif.bolditalic = tovector(sansserif_bi)
+
+regular.normal = tovector(regular_tf)
+regular.italic = tovector(regular_it)
+regular.bold = tovector(regular_bf)
+regular.bolditalic = tovector(regular_bi)
+
+alphabets.serif = tovector(regular)
+alphabets.type = tovector(monospaced)
+alphabets.teletype = tovector(monospaced)
-remap("tf","bf")
-remap("it","bi")
+mathematics.alphabets = alphabets
+
+local mathremap = allocate { }
+mathematics.mapremap = mathremap
-mathematics.boldmap = boldmap
+local boldmap = allocate { }
+mathematics.boldmap = boldmap
-local mathremap = allocate { }
+-- all math (a bit of redundancy here)
for alphabet, styles in next, alphabets do -- per 9/6/2011 we also have attr for missing
for style, data in next, styles do
-- let's keep the long names (for tracing)
local n = #mathremap + 1
- data.attribute = n
- data.alphabet = alphabet
- data.style = style
- mathremap[n] = data
+ local d = {
+ attribute = n,
+ alphabet = alphabet,
+ style = style,
+ }
+ styles[style] = d
+ setmetatableindex(d,data) -- we could use a alphadata table
+ mathremap[n] = d
end
end
-mathematics.mapremap = mathremap
-
--- beware, these are shared tables (no problem since they're not
--- in unicode)
-
-alphabets.tt = monospaced
-alphabets.ss = sansserif
-alphabets.rm = regular
-alphabets.bb = blackboard
-alphabets.fr = fraktur
-alphabets.sr = script
-
-alphabets.serif = regular
-alphabets.type = monospaced
-alphabets.teletype = monospaced
-
-regular.normal = regular_tf
-regular.italic = regular_it
-regular.bold = regular_bf
-regular.bolditalic = regular_bi
+-- bold math
+
+local function remapbold(tf,bf)
+ local styles = mathematics.styles
+ local sets = mathematics.sets
+ for i=1,#styles do
+ for j=1,#sets do
+ local one = styles[i]
+ local two = sets[j]
+ local a = alphabets[one]
+ local tf = a[tf][two]
+ local bf = a[bf][two]
+ if tf and bf then
+ for k, v in next, tf do
+ boldmap[v] = bf[k]
+ end
+ end
+ end
+ end
+end
-sansserif.normal = sansserif_tf
-sansserif.italic = sansserif_it
-sansserif.bold = sansserif_bf
-sansserif.bolditalic = sansserif_bi
+remapbold("tf","bf")
+remapbold("it","bi")
-monospaced.normal = monospaced_tf
-monospaced.italic = monospaced_it
-monospaced.bold = monospaced_bf
-monospaced.bolditalic = monospaced_bi
+-- table.save("e:/tmp/a.lua",alphabets)
+-- table.save("e:/tmp/b.lua",boldmap)
function mathematics.tostyle(attribute)
local r = mathremap[attribute]
diff --git a/Master/texmf-dist/tex/context/base/math-noa.lua b/Master/texmf-dist/tex/context/base/math-noa.lua
index a7f0fcf55e6..3a0af01cc9e 100644
--- a/Master/texmf-dist/tex/context/base/math-noa.lua
+++ b/Master/texmf-dist/tex/context/base/math-noa.lua
@@ -251,40 +251,6 @@ local familymap = { [0] =
"pseudobold",
}
--- families[math_char] = function(pointer)
--- if getfield(pointer,"fam") == 0 then
--- local a = getattr(pointer,a_mathfamily)
--- if a and a > 0 then
--- setattr(pointer,a_mathfamily,0)
--- if a > 5 then
--- local char = getchar(pointer)
--- local bold = boldmap[char]
--- local newa = a - 3
--- if bold then
--- setattr(pointer,a_exportstatus,char)
--- setfield(pointer,"char",bold)
--- if trace_families then
--- report_families("replacing %C by bold %C, family %s with remap %s becomes %s with remap %s",char,bold,a,familymap[a],newa,familymap[newa])
--- end
--- else
--- if trace_families then
--- report_families("no bold replacement for %C, family %s with remap %s becomes %s with remap %s",char,a,familymap[a],newa,familymap[newa])
--- end
--- end
--- setfield(pointer,"fam",newa)
--- else
--- if trace_families then
--- local char = getchar(pointer)
--- report_families("family of %C becomes %s with remap %s",char,a,familymap[a])
--- end
--- setfield(pointer,"fam",a)
--- end
--- else
--- -- pointer.fam = 0
--- end
--- end
--- end
-
families[math_char] = function(pointer)
if getfield(pointer,"fam") == 0 then
local a = getattr(pointer,a_mathfamily)
diff --git a/Master/texmf-dist/tex/context/base/meta-ini.mkiv b/Master/texmf-dist/tex/context/base/meta-ini.mkiv
index 281143e40b0..555deca2cbf 100644
--- a/Master/texmf-dist/tex/context/base/meta-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/meta-ini.mkiv
@@ -220,6 +220,7 @@
\defineMPinstance[metafun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes]
\defineMPinstance[extrafun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes]
\defineMPinstance[doublefun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!double]
+\defineMPinstance[binaryfun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!binary]
\defineMPinstance[decimalfun][\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!decimal]
\defineMPinstance[mprun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes]
\defineMPinstance[metapost] [\s!format=mpost]
diff --git a/Master/texmf-dist/tex/context/base/mlib-lua.lua b/Master/texmf-dist/tex/context/base/mlib-lua.lua
index 9c7a2e43a42..e3a3ba5d8db 100644
--- a/Master/texmf-dist/tex/context/base/mlib-lua.lua
+++ b/Master/texmf-dist/tex/context/base/mlib-lua.lua
@@ -8,6 +8,8 @@ if not modules then modules = { } end modules ['mlib-pdf'] = {
-- This is very preliminary code!
+-- maybe we need mplib.model, but how with instances
+
local type, tostring, select, loadstring = type, tostring, select, loadstring
local formatters = string.formatters
local find, gsub = string.find, string.gsub
@@ -51,14 +53,25 @@ function mp._f_()
end
end
-local f_pair = formatters["(%s,%s)"]
-local f_triplet = formatters["(%s,%s,%s)"]
-local f_quadruple = formatters["(%s,%s,%s,%s)"]
+local f_numeric = formatters["%.16f"]
+local f_pair = formatters["(%.16f,%.16f)"]
+local f_triplet = formatters["(%.16f,%.16f,%.16f)"]
+local f_quadruple = formatters["(%.16f,%.16f,%.16f,%.16f)"]
function mp.print(...)
for i=1,select("#",...) do
- n = n + 1
- buffer[n] = tostring((select(i,...)))
+ local value = select(i,...)
+ if value then
+ n = n + 1
+ local t = type(value)
+ if t == "number" then
+ buffer[n] = f_numeric(value)
+ elseif t == "string" then
+ buffer[n] = value
+ else
+ buffer[n] = tostring(value)
+ end
+ end
end
end
@@ -113,14 +126,23 @@ end
local f_code = formatters["%s return mp._f_()"]
-function metapost.runscript(code)
- local f = loadstring(f_code(code))
- if f then
- return tostring(f())
- else
- return ""
- end
-end
+-- function metapost.runscript(code)
+-- local f = loadstring(f_code(code))
+-- if f then
+-- local result = f()
+-- if result then
+-- local t = type(result)
+-- if t == "number" then
+-- return f_numeric(result)
+-- elseif t == "string" then
+-- return result
+-- else
+-- return tostring(result)
+-- end
+-- end
+-- end
+-- return ""
+-- end
local cache, n = { }, 0 -- todo: when > n then reset cache or make weak
@@ -128,29 +150,34 @@ function metapost.runscript(code)
if trace_enabled and trace_luarun then
report_luarun("code: %s",code)
end
+ local f
if n > 100 then
cache = nil -- forget about caching
- local f = loadstring(f_code(code))
- if f then
- return tostring(f())
- else
- return ""
- end
+ f = loadstring(f_code(code))
else
- local f = cache[code]
- if f then
- return tostring(f())
- else
+ f = cache[code]
+ if not f then
f = loadstring(f_code(code))
if f then
n = n + 1
cache[code] = f
- return tostring(f())
+ end
+ end
+ end
+ if f then
+ local result = f()
+ if result then
+ local t = type(result)
+ if t == "number" then
+ return f_numeric(result)
+ elseif t == "string" then
+ return result
else
- return ""
+ return tostring(result)
end
end
end
+ return ""
end
-- function metapost.initializescriptrunner(mpx)
diff --git a/Master/texmf-dist/tex/context/base/mult-de.mkii b/Master/texmf-dist/tex/context/base/mult-de.mkii
index 0c4dae5b6f0..9e7ecd93071 100644
--- a/Master/texmf-dist/tex/context/base/mult-de.mkii
+++ b/Master/texmf-dist/tex/context/base/mult-de.mkii
@@ -701,6 +701,7 @@
\setinterfaceconstant{file}{datei}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpubsep}{finalpubsep}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{ersteseite}
\setinterfaceconstant{focus}{focus}
diff --git a/Master/texmf-dist/tex/context/base/mult-def.lua b/Master/texmf-dist/tex/context/base/mult-def.lua
index fc2b932c249..bd8b361851e 100644
--- a/Master/texmf-dist/tex/context/base/mult-def.lua
+++ b/Master/texmf-dist/tex/context/base/mult-def.lua
@@ -6643,6 +6643,9 @@ return {
["lastpubsep"]={
["en"]="lastpubsep",
},
+ ["finalpubsep"]={
+ ["en"]="finalpubsep",
+ },
["refcommand"]={
["en"]="refcommand",
},
diff --git a/Master/texmf-dist/tex/context/base/mult-def.mkiv b/Master/texmf-dist/tex/context/base/mult-def.mkiv
index 35b2127106d..321f06154a8 100644
--- a/Master/texmf-dist/tex/context/base/mult-def.mkiv
+++ b/Master/texmf-dist/tex/context/base/mult-def.mkiv
@@ -97,6 +97,9 @@
\def\s!double {double}
\def\s!decimal {decimal}
+\def\s!binary {binary}
+
+\def\s!internal {internal}
\def\s!current {current}
diff --git a/Master/texmf-dist/tex/context/base/mult-en.mkii b/Master/texmf-dist/tex/context/base/mult-en.mkii
index 00861c3be98..bf72af384c7 100644
--- a/Master/texmf-dist/tex/context/base/mult-en.mkii
+++ b/Master/texmf-dist/tex/context/base/mult-en.mkii
@@ -701,6 +701,7 @@
\setinterfaceconstant{file}{file}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpubsep}{finalpubsep}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{firstpage}
\setinterfaceconstant{focus}{focus}
diff --git a/Master/texmf-dist/tex/context/base/mult-fr.mkii b/Master/texmf-dist/tex/context/base/mult-fr.mkii
index 9afe371c2b8..e1129848fec 100644
--- a/Master/texmf-dist/tex/context/base/mult-fr.mkii
+++ b/Master/texmf-dist/tex/context/base/mult-fr.mkii
@@ -701,6 +701,7 @@
\setinterfaceconstant{file}{fichier}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpubsep}{finalpubsep}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{premierepage}
\setinterfaceconstant{focus}{focus}
diff --git a/Master/texmf-dist/tex/context/base/mult-fun.lua b/Master/texmf-dist/tex/context/base/mult-fun.lua
index 0f5bd8ace7d..846a50ddf3d 100644
--- a/Master/texmf-dist/tex/context/base/mult-fun.lua
+++ b/Master/texmf-dist/tex/context/base/mult-fun.lua
@@ -24,6 +24,7 @@ return {
"llcircle", "lrcircle", "urcircle", "ulcircle",
"tcircle", "bcircle", "lcircle", "rcircle",
"lltriangle", "lrtriangle", "urtriangle", "ultriangle",
+ "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle",
"smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened",
"punked", "curved", "unspiked", "simplified", "blownup", "stretched",
"enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged",
diff --git a/Master/texmf-dist/tex/context/base/mult-it.mkii b/Master/texmf-dist/tex/context/base/mult-it.mkii
index 802cb840cd3..5646a212e21 100644
--- a/Master/texmf-dist/tex/context/base/mult-it.mkii
+++ b/Master/texmf-dist/tex/context/base/mult-it.mkii
@@ -701,6 +701,7 @@
\setinterfaceconstant{file}{file}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpubsep}{finalpubsep}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{primapagina}
\setinterfaceconstant{focus}{focus}
diff --git a/Master/texmf-dist/tex/context/base/mult-low.lua b/Master/texmf-dist/tex/context/base/mult-low.lua
index f41104986f7..dda4e5aadb4 100644
--- a/Master/texmf-dist/tex/context/base/mult-low.lua
+++ b/Master/texmf-dist/tex/context/base/mult-low.lua
@@ -126,6 +126,7 @@ return {
"twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace",
"figurespace", "punctuationspace", "hairspace",
"zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj",
+ "optionalspace",
},
["helpers"] = {
--
@@ -307,6 +308,8 @@ return {
--
"leftorright",
--
+ "offinterlineskip", "oninterlineskip", "nointerlineskip",
+ --
"strut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "begstrut", "endstrut", "lineheight",
--
"ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing",
diff --git a/Master/texmf-dist/tex/context/base/mult-mps.lua b/Master/texmf-dist/tex/context/base/mult-mps.lua
index 104b9d42ef0..717536fbf91 100644
--- a/Master/texmf-dist/tex/context/base/mult-mps.lua
+++ b/Master/texmf-dist/tex/context/base/mult-mps.lua
@@ -60,6 +60,8 @@ return {
"expandafter",
"minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline",
"fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode",
+ --
+ "runscript",
},
commands = {
"beginfig", "endfig",
diff --git a/Master/texmf-dist/tex/context/base/mult-nl.mkii b/Master/texmf-dist/tex/context/base/mult-nl.mkii
index 015f58ff15c..aa376c39a1e 100644
--- a/Master/texmf-dist/tex/context/base/mult-nl.mkii
+++ b/Master/texmf-dist/tex/context/base/mult-nl.mkii
@@ -701,6 +701,7 @@
\setinterfaceconstant{file}{file}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpubsep}{finalpubsep}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{eerstepagina}
\setinterfaceconstant{focus}{focus}
diff --git a/Master/texmf-dist/tex/context/base/mult-pe.mkii b/Master/texmf-dist/tex/context/base/mult-pe.mkii
index 999b16cf5e0..16871bb6260 100644
--- a/Master/texmf-dist/tex/context/base/mult-pe.mkii
+++ b/Master/texmf-dist/tex/context/base/mult-pe.mkii
@@ -701,6 +701,7 @@
\setinterfaceconstant{file}{پرونده}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpubsep}{finalpubsep}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{صفحه‌اول}
\setinterfaceconstant{focus}{تمرکز}
diff --git a/Master/texmf-dist/tex/context/base/mult-ro.mkii b/Master/texmf-dist/tex/context/base/mult-ro.mkii
index f577eabda1f..d01822944da 100644
--- a/Master/texmf-dist/tex/context/base/mult-ro.mkii
+++ b/Master/texmf-dist/tex/context/base/mult-ro.mkii
@@ -701,6 +701,7 @@
\setinterfaceconstant{file}{fisier}
\setinterfaceconstant{filtercommand}{filtercommand}
\setinterfaceconstant{finalnamesep}{finalnamesep}
+\setinterfaceconstant{finalpubsep}{finalpubsep}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{primapagina}
\setinterfaceconstant{focus}{focus}
diff --git a/Master/texmf-dist/tex/context/base/node-acc.lua b/Master/texmf-dist/tex/context/base/node-acc.lua
index 59fa031bf70..e684aeb7b88 100644
--- a/Master/texmf-dist/tex/context/base/node-acc.lua
+++ b/Master/texmf-dist/tex/context/base/node-acc.lua
@@ -31,7 +31,7 @@ local copy_node = nuts.copy
local free_nodelist = nuts.flush_list
local insert_after = nuts.insert_after
-local new_gluespec = nuts.pool.gluespec -- temp hack
+local new_gluespec = nuts.pool.gluespec -- temp hack
local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
@@ -41,7 +41,8 @@ local vlist_code = nodecodes.vlist
local a_characters = attributes.private("characters")
-local threshold = 65536
+local threshold = 65536 -- not used
+local nofreplaced = 0
-- todo: nbsp etc
-- todo: collapse kerns
@@ -83,6 +84,7 @@ local function injectspaces(head)
end
setattr(s,a_characters,0)
setattr(n,a_characters,0)
+ nofreplaced = nofreplaced + 1
end
-- end
elseif id == hlist_code or id == vlist_code then
@@ -113,6 +115,12 @@ nodes.handlers.accessibility = function(head)
return tonode(head), done
end
+statistics.register("inserted spaces in output",function()
+ if nofreplaced > 0 then
+ return nofreplaced
+ end
+end)
+
-- todo:
-- local a_hyphenated = attributes.private('hyphenated')
diff --git a/Master/texmf-dist/tex/context/base/node-typ.lua b/Master/texmf-dist/tex/context/base/node-typ.lua
index 4c33e31991d..f1aacf25a86 100644
--- a/Master/texmf-dist/tex/context/base/node-typ.lua
+++ b/Master/texmf-dist/tex/context/base/node-typ.lua
@@ -46,7 +46,7 @@ local function tonodes(str,fontid,spacing,templateglyph) -- quick and dirty
if spacing then
s, p, m = spacing, 0, 0
else
- s, p, m = fp.space, fp.space_stretch, fp,space_shrink
+ s, p, m = fp.space, fp.space_stretch, fp.space_shrink
end
local spacedone = false
for c in utfvalues(str) do
diff --git a/Master/texmf-dist/tex/context/base/pack-mrl.mkiv b/Master/texmf-dist/tex/context/base/pack-mrl.mkiv
index 3e81a4d6944..c0097cb5fa5 100644
--- a/Master/texmf-dist/tex/context/base/pack-mrl.mkiv
+++ b/Master/texmf-dist/tex/context/base/pack-mrl.mkiv
@@ -614,7 +614,7 @@
\fi
\doifelse{\directtextrulesparameter\c!depthcorrection}\v!on\pack_textrule_correct_depth_yes\pack_textrule_correct_depth_nop
\nointerlineskip
- \dontleavehmode\vbox
+ \noindent\vbox % was \dontleavehmode
{\color[\directtextrulesparameter\c!rulecolor]
{\hrule\s!depth\directtextrulesparameter\c!rulethickness\s!height\zeropoint\s!width\availablehsize}}}
{\pack_textrule_with_text{#1}}%
diff --git a/Master/texmf-dist/tex/context/base/page-lin.mkiv b/Master/texmf-dist/tex/context/base/page-lin.mkiv
deleted file mode 100644
index 0f8b7839810..00000000000
--- a/Master/texmf-dist/tex/context/base/page-lin.mkiv
+++ /dev/null
@@ -1,557 +0,0 @@
-%D \module
-%D [ file=page-lin,
-%D version=2007.11.29,
-%D title=\CONTEXT\ Core Macros,
-%D subtitle=Line Numbering,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% generic or not ... maybe not bother too much and simplify to mkiv only
-% get rid of \mk* (left over from experimental times)
-%
-% to be redone (was experiment) .. can be hooked into margin code
-
-\writestatus{loading}{ConTeXt Core Macros / Line Numbering}
-
-\unprotect
-
-% todo: save settings
-%
-% low level interface
-%
-% we should use normal counters but then we need to sync settings
-
-% some line
-%
-% \startlocallinenumbering
-% some source code 1\par
-% some source code 2\par
-% some source code 3\par
-% \stoplocallinenumbering
-%
-% some line
-
-\registerctxluafile{page-lin}{1.001}
-
-\definesystemattribute[linenumber] [public]
-\definesystemattribute[linereference][public]
-
-\appendtoksonce
- \attribute\linenumberattribute\attributeunsetvalue
-\to \everyforgetall
-
-\newcount \linenumber % not used
-\newbox \b_page_lines_scratch
-\newcount \c_page_lines_reference
-\newconstant\c_page_lines_nesting
-
-\newconditional\tracelinenumbering
-
-% id nr shift width leftskip dir
-
-\installcorenamespace{linenumberinginstance}
-
-\let\makelinenumber\gobblesevenarguments % used at lua end
-
-\newconditional\page_postprocessors_needed_box
-
-\unexpanded\def\page_postprocessors_linenumbers_page #1{\page_lines_add_numbers_to_box{#1}\plusone \plusone \zerocount}
-\unexpanded\def\page_postprocessors_linenumbers_box #1{\page_lines_add_numbers_to_box{#1}\plusone \plusone \zerocount}
-\unexpanded\def\page_postprocessors_linenumbers_deepbox#1{\page_lines_add_numbers_to_box{#1}\plusone \plusone \plusone }
-\unexpanded\def\page_postprocessors_linenumbers_column #1{\page_lines_add_numbers_to_box{#1}\currentcolumn\nofcolumns\zerocount}
-
-\def\page_lines_parameters_regular
- {continue = "\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi",
- start = \number\linenumberingparameter\c!start,
- step = \number\linenumberingparameter\c!step,
- method = "\linenumberingparameter\c!method",
- tag = "\currentlinenumbering"}
-
-\def\page_lines_parameters_update
- {continue = "\ifnum\c_page_lines_mode=\zerocount\v!yes\else\v!no\fi"}
-
-\def\page_lines_start_define
- {\setxvalue{\??linenumberinginstance\currentlinenumbering}{\ctxcommand{registerlinenumbering({\page_lines_parameters_regular})}}}
-
-\def\page_lines_start_update
- {\ctxcommand{setuplinenumbering(\csname\??linenumberinginstance\currentlinenumbering\endcsname,{\page_lines_parameters_update})}}
-
-\def\page_lines_setup
- {\ifcsname \??linenumberinginstance\currentlinenumbering\endcsname
- \ctxcommand{setuplinenumbering(\csname\??linenumberinginstance\currentlinenumbering\endcsname,{\page_lines_parameters_regular})}%
- \fi}
-
-% we could make this a bit more efficient by putting the end reference
-% in the same table as the start one but why make things complex ...
-
-\let\dofinishlinereference\dofinishfullreference % at lua end
-
-\unexpanded\def\page_lines_some_reference#1#2#3%
- {\dontleavehmode\begingroup
- \global\advance\c_page_lines_reference\plusone
- \attribute\linereferenceattribute\c_page_lines_reference
- #3%
- % for the moment we use a simple system i.e. no prefixes etc .. todo: store as number
- \normalexpanded{\strc_references_set_named_reference{line}{#2}{conversion=\linenumberingparameter\c!conversion}{\the\c_page_lines_reference}}% kind labels userdata text
- \endgroup}
-
-\def\page_lines_reference_start#1{\page_lines_some_reference{#1}{lr:b:#1}{}\ignorespaces}
-\def\page_lines_reference_stop #1{\removeunwantedspaces\page_lines_some_reference{#1}{lr:e:#1}{}}
-
-% \def\mklinestartreference#1[#2]{\in{#1}[lr:b:#2]} % not interfaced/ not used
-% \def\mklinestopreference #1[#2]{\in{#1}[lr:e:#2]} % not interfaced/ not used
-
-\newif\ifnumberinglines % will change
-\newif\iftypesettinglines % will change
-
-\installcorenamespace{linenumbering}
-
-\installcommandhandler \??linenumbering {linenumbering} \??linenumbering
-
-\setnewconstant\c_page_lines_mode \plusone % 0=continue, 1=restart
-\setnewconstant\c_page_lines_location \plusone % 0=middle, 1=left, 2=right, 3=inner, 4=outer, 5=text, 6=begin, 7=end
-\setnewconstant\c_page_lines_alignment\plusfive % 0=middle, 1=left, 2=right, 5=auto
-
-\newdimen\d_page_lines_width
-\newdimen\d_page_lines_distance
-
-\newevery \beforeeverylinenumbering \relax
-\newevery \aftereverylinenumbering \relax
-\newevery \everylinenumber \relax
-
-\appendtoks
- \page_lines_setup
-\to \everysetuplinenumbering
-
-\appendtoks
- \page_lines_start_define
-\to \everydefinelinenumbering
-
-\setuplinenumbering
- [\c!conversion=\v!numbers,
- \c!start=1,
- \c!step=1,
- \c!method=\v!first,
- \c!continue=\v!no,
- \c!location=\v!left,
- \c!style=,
- \c!color=,
- \c!width=2\emwidth,
- \c!left=,
- \c!right=,
- \c!command=,
- \c!distance=\zeropoint,
- \c!align=\v!auto]
-
-\definelinenumbering
- []
-
-% no intermediate changes in values, define a class, otherwise each range
-% would need a number
-
-% todo: text
-
-\installcorenamespace{linennumberinglocation}
-\installcorenamespace{linennumberingalternative}
-
-\expandafter\let\csname\??linennumberinglocation\v!middle \endcsname \zerocount
-\expandafter\let\csname\??linennumberinglocation\v!left \endcsname \plusone
-\expandafter\let\csname\??linennumberinglocation\v!margin \endcsname \plusone
-\expandafter\let\csname\??linennumberinglocation\v!inmargin \endcsname \plusone
-\expandafter\let\csname\??linennumberinglocation\v!inleft \endcsname \plusone
-\expandafter\let\csname\??linennumberinglocation\v!right \endcsname \plustwo
-\expandafter\let\csname\??linennumberinglocation\v!inright \endcsname \plustwo
-\expandafter\let\csname\??linennumberinglocation\v!inner \endcsname \plusthree
-\expandafter\let\csname\??linennumberinglocation\v!outer \endcsname \plusfour
-\expandafter\let\csname\??linennumberinglocation\v!text \endcsname \plusfive
-\expandafter\let\csname\??linennumberinglocation\v!begin \endcsname \plussix
-\expandafter\let\csname\??linennumberinglocation\v!end \endcsname \plusseven
-
-\expandafter\let\csname\??linennumberingalternative\v!middle \endcsname \zerocount
-\expandafter\let\csname\??linennumberingalternative\v!right \endcsname \plusone
-\expandafter\let\csname\??linennumberingalternative\v!flushleft \endcsname \plusone
-\expandafter\let\csname\??linennumberingalternative\v!left \endcsname \plustwo
-\expandafter\let\csname\??linennumberingalternative\v!flushright\endcsname \plustwo
-\expandafter\let\csname\??linennumberingalternative\v!auto \endcsname \plusfive
-
-% \startlinenumbering[<startvalue>|continue|settings|name]
-% \startlinenumbering[name][<startvalue>|continue|settings]
-
-\unexpanded\def\startlinenumbering
- {\dodoubleempty\page_lines_start}
-
-\def\page_lines_start % we stay downward compatible
- {\begingroup
- \ifsecondargument
- \expandafter\page_lines_start_two
- \else\iffirstargument
- \doubleexpandafter\page_lines_start_one
- \else
- \doubleexpandafter\page_lines_start_zero
- \fi\fi}
-
-\def\page_lines_start_zero[#1][#2]%
- {\edef\m_argument{\linenumberingparameter\c!continue}%
- \ifx\m_argument\v!continue
- \c_page_lines_mode\zerocount
- \else
- \c_page_lines_mode\plusone
- \fi
- \page_lines_start_followup}
-
-\def\page_lines_start_one[#1][#2]% [continue|<number>|settings] % historic
- {\edef\m_argument{#1}%
- \ifx\m_argument\v!continue
- \c_page_lines_mode\zerocount
- \let\currentlinenumbering\empty
- \else
- \c_page_lines_mode\plusone
- \ifx\m_argument\v!empty
- \let\currentlinenumbering\empty
- \else
- \doifassignmentelse{#1}
- {\let\currentlinenumbering\empty
- \setupcurrentlinenumbering[#1]}
- {\doifnumberelse\m_argument
- {\let\currentlinenumbering\empty
- \letlinenumberingparameter\c!start\m_argument}
- {\let\currentlinenumbering\m_argument}}%
- \fi
- \edef\p_continue{\linenumberingparameter\c!continue}%
- \ifx\p_continue\v!yes
- \c_page_lines_mode\zerocount
- \fi
- \fi
- \page_lines_start_followup}
-
-\def\page_lines_start_two[#1][#2]% [tag][continue|<number>|settings]
- {\edef\currentlinenumbering{#1}%
- \edef\m_argument{#2}%
- \ifx\m_argument\v!continue
- \c_page_lines_mode\zerocount
- \else
- \c_page_lines_mode\plusone
- \ifx\m_argument\v!empty \else
- \doifassignmentelse{#2}
- {\setupcurrentlinenumbering[#2]}
- {\doifnumber\m_argument
- {\letlinenumberingparameter\c!start\m_argument}}%
- \fi
- \edef\p_continue{\linenumberingparameter\c!continue}%
- \ifx\p_continue\v!yes
- \c_page_lines_mode\zerocount
- \fi
- \fi
- \page_lines_start_followup}
-
-\def\page_lines_start_followup
- {\numberinglinestrue
- \the\beforeeverylinenumbering
- \globallet\page_postprocessors_page \page_postprocessors_linenumbers_page
- \globallet\page_postprocessors_column\page_postprocessors_linenumbers_column
- \global\settrue\page_postprocessors_needed_box % see core-rul.mkiv
- \ifcase\c_page_lines_mode\relax
- \page_lines_start_update % continue
- \or
- \page_lines_start_define % only when assignment
- \fi
- \attribute\linenumberattribute\getvalue{\??linenumberinginstance\currentlinenumbering}\relax}
-
-\unexpanded\def\stoplinenumbering
- {\attribute\linenumberattribute\attributeunsetvalue
- \the\aftereverylinenumbering
- \endgroup}
-
-% number placement .. will change into (the new) margin code
-
-\def\page_lines_number_inner_indeed{\doifoddpageelse\page_lines_number_left_indeed\page_lines_number_right_indeed}
-\def\page_lines_number_outer_indeed{\doifoddpageelse\page_lines_number_right_indeed\page_lines_number_left_indeed}
-
-\def\page_lines_number_left
- {\ifcase\c_page_lines_location
- \expandafter\page_lines_number_left_indeed
- \or
- \expandafter\page_lines_number_left_indeed
- \or
- \expandafter\page_lines_number_left_indeed
- \or
- \expandafter\page_lines_number_inner_indeed
- \or
- \expandafter\page_lines_number_outer_indeed
- \or
- \expandafter\page_lines_number_text_indeed
- \or
- \expandafter\page_lines_number_begin_indeed
- \or
- \expandafter\page_lines_number_end_indeed
- \fi}
-
-\def\page_lines_number_right
- {\ifcase\c_page_lines_location
- \expandafter\page_lines_number_right_indeed
- \or
- \expandafter\page_lines_number_right_indeed
- \or
- \expandafter\page_lines_number_right_indeed
- \or
- \expandafter\page_lines_number_outer_indeed
- \or
- \expandafter\page_lines_number_inner_indeed
- \or
- \expandafter\page_lines_number_text_indeed
- \or
- \expandafter\page_lines_number_end_indeed
- \or
- \expandafter\page_lines_number_begin_indeed
- \fi}
-
-\newconditional\c_page_lines_fake_number
-\newconstant \b_page_lines_number
-\newconstant \c_page_lines_column
-\newconstant \c_page_lines_last_column
-
-\def\page_lines_add_numbers_to_box#1#2#3#4% box col max nesting
- {\bgroup
- \b_page_lines_number #1\relax
- \c_page_lines_column #2\relax
- \c_page_lines_last_column#3\relax
- \c_page_lines_nesting #4\relax
- \fullrestoreglobalbodyfont
- \let\makelinenumber\page_lines_make_number % used at lua end
- \setbox\b_page_lines_scratch\vbox
- {\forgetall
- \offinterlineskip
- \ctxcommand{linenumbersstageone(\number\b_page_lines_number,\ifcase\c_page_lines_nesting false\else true\fi)}}%
- \ctxcommand{linenumbersstagetwo(\number\b_page_lines_number,\number\b_page_lines_scratch)}% can move to lua code
- \egroup}
-
-\let\page_lines_make_number_indeed\relax
-
-\def\page_lines_make_number#1#2%
- {\edef\currentlinenumbering{#1}%
- \ifcase#2\relax
- \settrue \c_page_lines_fake_number
- \else
- \setfalse\c_page_lines_fake_number
- \fi
- \c_page_lines_location \executeifdefined{\??linennumberinglocation \linenumberingparameter\c!location}\plusone \relax % left
- \c_page_lines_alignment\executeifdefined{\??linennumberingalternative\linenumberingparameter\c!align }\plusfive\relax % auto
- \ifcase\c_page_lines_last_column\relax
- \settrue \c_page_lines_fake_number
- \or
- % one column
- \ifcase\c_page_lines_location
- \settrue \c_page_lines_fake_number
- \let\page_lines_make_number_indeed\page_lines_number_fake_indeed
- \or
- \let\page_lines_make_number_indeed\page_lines_number_left
- \or
- \let\page_lines_make_number_indeed\page_lines_number_right
- \or % inner
- \let\page_lines_make_number_indeed\page_lines_number_inner_indeed
- \or % outer
- \let\page_lines_make_number_indeed\page_lines_number_outer_indeed
- \or % text
- \let\page_lines_make_number_indeed\page_lines_number_text_indeed
- \or
- \let\page_lines_make_number_indeed\page_lines_number_begin_indeed
- \or
- \let\page_lines_make_number_indeed\page_lines_number_end_indeed
- \fi
- \else\ifcase\c_page_lines_column\relax
- \settrue \c_page_lines_fake_number
- \or
- \let\page_lines_make_number_indeed\page_lines_number_left
- \ifcase\c_page_lines_location\or
- \c_page_lines_location\plusone
- \or
- \c_page_lines_location\plustwo
- \else
- \c_page_lines_location\plusone
- \or
- \c_page_lines_location\plusone
- \or
- \c_page_lines_location\plusone
- \or
- \c_page_lines_location\plusone % todo
- \or
- \c_page_lines_location\plusone % todo
- \fi
- \else
- \let\page_lines_make_number_indeed\page_lines_number_right
- \ifcase\c_page_lines_location\or
- \c_page_lines_location\plustwo
- \or
- \c_page_lines_location\plusone
- \or
- \c_page_lines_location\plustwo
- \or
- \c_page_lines_location\plustwo
- \or
- \c_page_lines_location\plustwo % todo
- \or
- \c_page_lines_location\plustwo % todo
- \fi
- \fi\fi
- \page_lines_make_number_indeed{#1}}
-
-\let\page_lines_number_fake_indeed\gobblesixarguments % needs checking
-
-\def\page_lines_number_text_indeed#1#2#3#4#5#6% beware, one needs so compensate for this in the \hsize
- {\hbox{\page_lines_number_construct{#1}{2}{#2}{#5}\hskip#3\scaledpoint}}
-
-\def\page_lines_number_left_indeed#1#2#3#4#5#6%
- {\naturalhbox to \zeropoint
- {\ifcase\istltdir#6\else \hskip-#4\scaledpoint \fi
- \llap{\page_lines_number_construct{#1}{2}{#2}{#5}\kern#3\scaledpoint}}}
-
-\def\page_lines_number_right_indeed#1#2#3#4#5#6%
- {\naturalhbox to \zeropoint
- {\ifcase\istltdir#6\else \hskip-#4\scaledpoint \fi
- \rlap{\hskip\dimexpr#4\scaledpoint+#3\scaledpoint\relax\page_lines_number_construct{#1}{1}{#2}{#5}}}}
-
-\def\page_lines_number_begin_indeed#1#2#3#4#5#6%
- {\ifcase\istltdir#6\relax
- \c_page_lines_location\plusone
- \expandafter\page_lines_number_left_indeed
- \else
- \c_page_lines_location\plustwo
- \expandafter\page_lines_number_left_indeed
- \fi{#1}{#2}{#3}{#4}{#5}{#6}}
-
-\def\page_lines_number_end_indeed#1#2#3#4#5#6%
- {\ifcase\istltdir#6\relax
- \c_page_lines_location\plustwo
- \expandafter\page_lines_number_left_indeed
- \else
- \c_page_lines_location\plusone
- \expandafter\page_lines_number_left_indeed
- \fi{#1}{#2}{#3}{#4}{#5}{#6}}
-
-\def\page_lines_number_construct#1#2#3#4% tag 1=left|2=right linenumber leftskip
- {\begingroup
- \def\currentlinenumbering{#1}%
- \def\linenumber{#3}% unsafe
- \doifelse{\linenumberingparameter\c!width}\v!margin
- {\d_page_lines_width\leftmarginwidth}
- {\d_page_lines_width\linenumberingparameter\c!width}%
- \d_page_lines_distance\linenumberingparameter\c!distance\relax
- \ifcase#2\relax\or\hskip\d_page_lines_distance\fi\relax
- \ifnum\c_page_lines_location=\plusfive
- \scratchdimen\dimexpr#4\scaledpoint-\d_page_lines_distance\relax
- \c_page_lines_location\plusone
- \else
- \scratchdimen\zeropoint
- \fi
- \ifcase\c_page_lines_alignment
- \c_page_lines_location\zerocount % middle
- \or
- \c_page_lines_location\plusone % left
- \or
- \c_page_lines_location\plustwo % right
- \fi
- \ifconditional\tracelinenumbering\ruledhbox\else\hbox\fi to \d_page_lines_width
- {\ifcase\c_page_lines_location
- \hss % middle
- \or
- % left
- \or
- \hss % right
- \or
- \doifoddpageelse\relax\hss % inner
- \or
- \doifoddpageelse\hss\relax % outer
- \fi
- \ifconditional\c_page_lines_fake_number
- % we need to reserve space
- \else
- \uselinenumberingstyleandcolor\c!style\c!color
- \linenumberingparameter\c!command
- {\linenumberingparameter\c!left
- \convertnumber{\linenumberingparameter\c!conversion}{#3}%
- \linenumberingparameter\c!right}%
- \fi
- \ifcase\c_page_lines_location
- \hss % middle
- \or
- \hss % left
- \or
- % right
- \or
- \doifoddpageelse\hss\relax % inner
- \or
- \doifoddpageelse\relax\hss % outer
- \fi}%
- \ifcase#2\relax
- \hskip-\scratchdimen
- \or
- \hskip-\scratchdimen
- \or
- \hskip\dimexpr\d_page_lines_distance-\scratchdimen\relax
- \fi
- \relax
- \the\everylinenumber
- \endgroup}
-
-% referencing
-
-\unexpanded\def\someline [#1]{\page_lines_reference_start{#1}\page_lines_reference_stop{#1}} % was just a def
-\unexpanded\def\startline[#1]{\page_lines_reference_start{#1}}
-\unexpanded\def\stopline [#1]{\page_lines_reference_stop {#1}}
-
-\def\page_lines_reference_show_start#1%
- {\ifconditional\tracelinenumbering
- \setbox\scratchbox\hbox{\llap
- {\vrule\s!width\onepoint\s!depth\strutdp\s!height.8\strutht\raise.85\strutht\hbox{\llap{\tt\txx#1}}}}%
- \smashbox\scratchbox
- \box\scratchbox
- \fi}
-
-\def\page_lines_reference_show_stop#1%
- {\ifconditional\tracelinenumbering
- \setbox\scratchbox\hbox{\rlap
- {\raise.85\strutht\hbox{\rlap{\tt\txx#1}}\vrule\s!width\onepoint\s!depth\strutdp\s!height.8\strutht}}%
- \smashbox\scratchbox
- \box\scratchbox
- \fi}
-
-\def\page_lines_reference_start#1{\page_lines_some_reference{#1}{lr:b:#1}{\page_lines_reference_show_start{#1}}\ignorespaces}
-\def\page_lines_reference_stop #1{\removeunwantedspaces\page_lines_some_reference{#1}{lr:e:#1}{\page_lines_reference_show_stop{#1}}}
-
-% eventually we will do this in lua
-
-\def\currentreferencelinenumber{\ctxcommand{filterreference("linenumber")}}
-
-\let\m_page_lines_from\empty
-\let\m_page_lines_to \empty
-
-\unexpanded\def\doifelsesamelinereference#1#2#3%
- {\doifreferencefoundelse{lr:b:#1}
- {\edef\m_page_lines_from{\currentreferencelinenumber}%
- \doifreferencefoundelse{lr:e:#1}
- {\edef\m_page_lines_to{\currentreferencelinenumber}%
- %[\m_page_lines_from,\m_page_lines_to]
- \ifx\m_page_lines_from\m_page_lines_to#2\else#3\fi}
- {#2}}
- {#2}}
-
-\unexpanded\def\inline#1[#2]%
- {\doifelsenothing{#1}
- {\doifelsesamelinereference{#2}
- {\in{\leftlabeltext\v!line}{\rightlabeltext\v!line}[lr:b:#2]}
- {\in{\leftlabeltext\v!lines}{}[lr:b:#2]--\in{}{\rightlabeltext\v!lines}[lr:e:#2]}}
- {\doifelsesamelinereference{#2}
- {\in{#1}[lr:b:#2]}
- {\in{#1}[lr:b:#2]--\in[lr:e:#2]}}}
-
-\unexpanded\def\inlinerange[#1]%
- {\doifelsesamelinereference{#1}
- {\in[lr:b:#1]}
- {\in[lr:b:#1]\endash\in[lr:e:#1]}}
-
-\protect \endinput
diff --git a/Master/texmf-dist/tex/context/base/page-mix.mkiv b/Master/texmf-dist/tex/context/base/page-mix.mkiv
index 41897f6ddc7..57de14b88b4 100644
--- a/Master/texmf-dist/tex/context/base/page-mix.mkiv
+++ b/Master/texmf-dist/tex/context/base/page-mix.mkiv
@@ -29,6 +29,7 @@
% wide floats
% move floats
% offsets (inner ones, so we change the hsize ... needed with backgrounds
+% when no content we currently loose the page
% luatex buglet:
%
@@ -208,7 +209,7 @@
\fi
\global\setbox\b_page_mix_preceding\vbox
{\page_otr_command_flush_top_insertions
- \ifdim\ht\b_page_mix_preceding=\zeropoint \else
+ \ifdim\htdp\b_page_mix_preceding=\zeropoint \else
\writestatus\m!columns{preceding error}%
\unvbox\b_page_mix_preceding
\fi
diff --git a/Master/texmf-dist/tex/context/base/publ-dat.lua b/Master/texmf-dist/tex/context/base/publ-dat.lua
index b463064ca53..5e255029a48 100644
--- a/Master/texmf-dist/tex/context/base/publ-dat.lua
+++ b/Master/texmf-dist/tex/context/base/publ-dat.lua
@@ -24,8 +24,9 @@ end
local chardata = characters.data
local lowercase = characters.lower
-local lower, gsub, concat = string.lower, string.gsub, table.concat
-local next, type = next, type
+local lower, gsub, find = string.lower, string.gsub, string.find
+local concat = table.concat
+local next, type, rawget = next, type, rawget
local utfchar = utf.char
local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
local textoutf = characters and characters.tex.toutf
@@ -73,6 +74,42 @@ local defaultshortcuts = {
dec = "12",
}
+local l_splitter = lpeg.tsplitat("+")
+local d_splitter = lpeg.splitat ("+")
+
+function publications.parenttag(dataset,tag)
+ if find(tag,"%+") then
+ local tags = lpegmatch(l_splitter,tag)
+ local parent = tags[1]
+ local luadata = datasets[dataset].luadata
+ local first = luadata[parent]
+ if first then
+ local combined = first.combined
+ if not combined then
+ combined = { }
+ first.combined = combined
+ end
+ -- add new ones but only once
+ for i=2,#tags do
+ local tag = tags[i]
+ for j=1,#combined do
+ if combined[j] == tag then
+ tag = false
+ end
+ end
+ if tag then
+ local entry = luadata[tag]
+ if entry then
+ combined[#combined+1] = tag
+ end
+ end
+ end
+ return parent
+ end
+ end
+ return tag
+end
+
function publications.new(name)
publicationsstats.nofdatasets = publicationsstats.nofdatasets + 1
local dataset = {
@@ -95,6 +132,9 @@ function publications.new(name)
userdata = false,
},
}
+ -- we delay details till we need it (maybe we just delay the
+ -- individual fields but that is tricky as there can be some
+ -- depedencies)
setmetatableindex(dataset,function(t,k)
-- will become a plugin
if k == "details" and publications.enhance then
@@ -150,7 +190,7 @@ local filter_2 = Cs(
)
-- Currently we expand shortcuts and for large ones (like the acknowledgements
--- in tugboat.bib this is not that efficient. However, eventually strings get
+-- in tugboat.bib) this is not that efficient. However, eventually strings get
-- hashed again.
local function do_shortcut(key,value,dataset)
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-cite.mkiv b/Master/texmf-dist/tex/context/base/publ-imp-cite.mkiv
index d64c2132cee..0f0c69fa70c 100644
--- a/Master/texmf-dist/tex/context/base/publ-imp-cite.mkiv
+++ b/Master/texmf-dist/tex/context/base/publ-imp-cite.mkiv
@@ -11,64 +11,217 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\startsetups btx:cite:author
- \btxcitevariant{author}
-\stopsetups
+\unprotect
-\startsetups btx:cite:authoryear
- \btxcitevariant{authoryear}
-\stopsetups
+% The null case:
-\startsetups btx:cite:authoryears
- \btxcitevariant{authoryears}
+\startsetups \s!btx:\s!cite:none
+ % dummy
\stopsetups
-% \startsetups btx:cite:authornum
-% \btxcitevariant{author}
-% \btxcitevariantparameter\c!inbetween
-% \btxcitevariant{num}
-% \stopsetups
+% This saves keying:
-\startsetups btx:cite:authornum
- \btxcitevariant{authornum}
+\startsetups \s!btx:\s!cite:common:normal
+ \ifx\currentbtxsecond\empty
+ \currentbtxfirst
+ \else
+ \currentbtxfirst
+ \btxcitevariantparameter\v!inbetween
+ \currentbtxsecond
+ \fi
\stopsetups
-\startsetups btx:cite:year
- \btxcitevariant{year}
+\startsetups \s!btx:\s!cite:common:range
+ \ifx\currentbtxsecond\empty
+ \currentbtxfirst
+ \else
+ \currentbtxfirst
+ \btxcitevariantparameter\c!range
+ \currentbtxsecond
+ \fi
\stopsetups
-\startsetups btx:cite:short
- \btxcitevariant{short}
+\startsetups \s!btx:\s!cite:concat
+ \ifcase\currentbtxconcat \or \or
+ \btxcitevariantparameter\c!pubsep
+ \or
+ \btxcitevariantparameter\c!finalpubsep
+ \or
+ \btxcitevariantparameter\c!lastpubsep
+ \fi
\stopsetups
-\startsetups btx:cite:serial
- \btxcitevariant{serial}
+% \startsetups \s!btx:\s!cite:render:normal
+% \directsetup{\s!btx:\s!cite:concat}
+% \ifconditional\btxinteractive
+% \goto {
+% \directsetup{\s!btx:\s!cite:common:normal}
+% } [
+% \s!internal(\currentbtxinternal)
+% ]
+% \else
+% \directsetup{\s!btx:\s!cite:common:normal}
+% \fi
+% \stopsetups
+%
+% more efficient:
+
+\startsetups \s!btx:\s!cite:render:normal
+ \directsetup{\s!btx:\s!cite:concat}
+ \ifconditional\btxinteractive
+ \goto {
+ \ifx\currentbtxsecond\empty
+ \currentbtxfirst
+ \else
+ \currentbtxfirst
+ \btxcitevariantparameter\v!inbetween
+ \currentbtxsecond
+ \fi
+ } [
+ \s!internal(\currentbtxinternal)
+ ]
+ \else
+ \ifx\currentbtxsecond\empty
+ \currentbtxfirst
+ \else
+ \currentbtxfirst
+ \btxcitevariantparameter\v!inbetween
+ \currentbtxsecond
+ \fi
+ \fi
\stopsetups
-\startsetups btx:cite:key
- \currentbtxtag % \btxcitevariant{tag}
+% \startsetups \s!btx:\s!cite:render:range
+% \directsetup{\s!btx:\s!cite:concat}
+% \ifconditional\btxinteractive
+% \goto {
+% \directsetup{\s!btx:\s!cite:common:range}
+% } [
+% \s!internal(\currentbtxinternal)
+% ]
+% \else
+% \directsetup{\s!btx:\s!cite:common:range}
+% \fi
+% \stopsetups
+%
+% more efficient:
+
+\startsetups \s!btx:\s!cite:render:range
+ \directsetup{\s!btx:\s!cite:concat}
+ \ifconditional\btxinteractive
+ \goto {
+ \ifx\currentbtxsecond\empty
+ \currentbtxfirst
+ \else
+ \currentbtxfirst
+ \btxcitevariantparameter\c!range
+ \currentbtxsecond
+ \fi
+ } [
+ \s!internal(\currentbtxinternal)
+ ]
+ \else
+ \ifx\currentbtxsecond\empty
+ \currentbtxfirst
+ \else
+ \currentbtxfirst
+ \btxcitevariantparameter\c!range
+ \currentbtxsecond
+ \fi
+ \fi
\stopsetups
-\startsetups btx:cite:doi
- todo: \btxcitevariant{doi}
+\startsetups \s!btx:\s!cite:render:variant
+ \directsetup{\s!btx:\s!cite:concat}
+ \ifconditional\btxinteractive
+ \goto {
+ \directsetup{\s!btx:\s!cite:render:\currentbtxcitevariant}
+ } [
+ \s!internal(\currentbtxinternal)
+ ]
+ \else
+ \directsetup{\s!btx:\s!cite:render:\currentbtxcitevariant}
+ \fi
\stopsetups
-\startsetups btx:cite:url
- todo: \btxcitevariant{url}
+% author lists: can be less
+
+\startsetups \s!btx:\s!cite:common:author
+ \ifx\currentbtxcitevariant\v!normal
+ \currentbtxfirst
+ \else
+ \currentbtxciteauthor
+ \fi
\stopsetups
-\startsetups btx:cite:type
- \btxcitevariant{category}
+\startsetups \s!btx:\s!cite:render:author
+ \directsetup{\s!btx:\s!cite:common:author}
+\stopsetups
+\startsetups \s!btx:\s!cite:render:authoryear
+ \directsetup{\s!btx:\s!cite:common:author}
+\stopsetups
+\startsetups \s!btx:\s!cite:render:authoryears
+ \directsetup{\s!btx:\s!cite:common:author}
+\stopsetups
+\startsetups \s!btx:\s!cite:render:authornum
+ \directsetup{\s!btx:\s!cite:common:author}
\stopsetups
-\startsetups btx:cite:page
- \btxcitevariant{page}
+\startsetups \s!btx:\s!cite:author:num
+ \directsetup{\s!btx:\s!cite:render:range}
+\stopsetups
+\startsetups \s!btx:\s!cite:author:year
+ \directsetup{\s!btx:\s!cite:render:range}
+\stopsetups
+\startsetups \s!btx:\s!cite:author:years
+ \directsetup{\s!btx:\s!cite:render:range}
\stopsetups
-\startsetups btx:cite:none
- % dummy
+\startsetups \s!btx:\s!cite:author
+ \directsetup{\s!btx:\s!cite:render:variant}
+\stopsetups
+\startsetups \s!btx:\s!cite:authoryear
+ \directsetup{\s!btx:\s!cite:render:variant}
+\stopsetups
+\startsetups \s!btx:\s!cite:authoryears
+ \directsetup{\s!btx:\s!cite:render:variant}
+\stopsetups
+\startsetups \s!btx:\s!cite:authornum
+ \directsetup{\s!btx:\s!cite:render:variant}
\stopsetups
-\startsetups btx:cite:num
- \btxcitevariant{num}
+\startsetups \s!btx:\s!cite:year
+ \directsetup{\s!btx:\s!cite:render:range}
+\stopsetups
+\startsetups \s!btx:\s!cite:short
+ \directsetup{\s!btx:\s!cite:render:normal}
+\stopsetups
+\startsetups \s!btx:\s!cite:serial
+ \directsetup{\s!btx:\s!cite:render:range}
+\stopsetups
+\startsetups \s!btx:\s!cite:tag
+ \directsetup{\s!btx:\s!cite:render:normal}
+\stopsetups
+\startsetups \s!btx:\s!cite:key
+ \directsetup{\s!btx:\s!cite:render:normal}
\stopsetups
+\startsetups \s!btx:\s!cite:doi
+ \directsetup{\s!btx:\s!cite:render:normal}
+\stopsetups
+\startsetups \s!btx:\s!cite:url
+ \directsetup{\s!btx:\s!cite:render:normal}
+\stopsetups
+\startsetups \s!btx:\s!cite:category
+ \directsetup{\s!btx:\s!cite:render:normal}
+\stopsetups
+\startsetups \s!btx:\s!cite:type
+ \directsetup{\s!btx:\s!cite:render:normal}
+\stopsetups
+\startsetups \s!btx:\s!cite:num
+ \directsetup{\s!btx:\s!cite:render:range}
+\stopsetups
+\startsetups \s!btx:\s!cite:page
+ \directsetup{\s!btx:\s!cite:render:normal}
+\stopsetups
+
+\protect
diff --git a/Master/texmf-dist/tex/context/base/publ-ini.lua b/Master/texmf-dist/tex/context/base/publ-ini.lua
index e25c57e297d..d713f552cb5 100644
--- a/Master/texmf-dist/tex/context/base/publ-ini.lua
+++ b/Master/texmf-dist/tex/context/base/publ-ini.lua
@@ -6,10 +6,12 @@ if not modules then modules = { } end modules ['publ-ini'] = {
license = "see context related readme files"
}
--- for the moment here
+-- we could store the destinations in the user list entries
+
+-- will move:
local lpegmatch = lpeg.match
-local P, C, Ct, Cs = lpeg.P, lpeg.C, lpeg.Ct, lpeg.Cs
+local P, R, C, Ct, Cs = lpeg.P, lpeg.R, lpeg.C, lpeg.Ct, lpeg.Cs
local lpegmatch = lpeg.match
local pattern = Cs((1 - P(1) * P(-1))^0 * (P(".")/"" + P(1)))
@@ -41,19 +43,26 @@ end
-- use: for rest in gmatch(reference,"[^, ]+") do
-local next, rawget, type = next, rawget, type
+local next, rawget, type, tostring, tonumber = next, rawget, type, tostring, tonumber
local match, gmatch, format, gsub = string.match, string.gmatch, string.format, string.gsub
-local concat, sort = table.concat, table.sort
+local concat, sort, tohash = table.concat, table.sort, table.tohash
local utfsub = utf.sub
local formatters = string.formatters
local allocate = utilities.storage.allocate
local settings_to_array, settings_to_set = utilities.parsers.settings_to_array, utilities.parsers.settings_to_set
local sortedkeys, sortedhash = table.sortedkeys, table.sortedhash
+local setmetatableindex = table.setmetatableindex
local lpegmatch = lpeg.match
local P, C, Ct = lpeg.P, lpeg.C, lpeg.Ct
-local report = logs.reporter("publications")
-local trace = false trackers.register("publications", function(v) trace = v end)
+local report = logs.reporter("publications")
+local report_cite = logs.reporter("publications","cite")
+local report_reference = logs.reporter("publications","reference")
+
+local trace = false trackers.register("publications", function(v) trace = v end)
+local trace_cite = false trackers.register("publications.cite", function(v) trace_cite = v end)
+local trace_missing = false trackers.register("publications.cite.missing", function(v) trace_missing = v end)
+local trace_references = false trackers.register("publications.cite.references", function(v) trace_references = v end)
local datasets = publications.datasets
@@ -70,7 +79,7 @@ local v_left = variables.left
local v_right = variables.right
local v_middle = variables.middle
local v_inbetween = variables.inbetween
-
+local v_yes = variables.yes
local v_short = variables.short
local v_cite = variables.cite
local v_default = variables.default
@@ -91,6 +100,8 @@ local sortcomparer = sorters.comparers.basic -- (a,b)
local sortstripper = sorters.strip
local sortsplitter = sorters.splitters.utf
+local settings_to_array = utilities.parsers.settings_to_array
+
local context = context
local ctx_btxlistparameter = context.btxlistparameter
@@ -105,8 +116,20 @@ local ctx_gobbleoneargument = context.gobbleoneargument
local ctx_btxdirectlink = context.btxdirectlink
local ctx_btxhandlelistentry = context.btxhandlelistentry
local ctx_btxchecklistentry = context.btxchecklistentry
-local ctx_dodirectfullreference = context.dodirectfullreference
+local ctx_btxchecklistcombi = context.btxchecklistcombi
+----- ctx_dodirectfullreference = context.dodirectfullreference
+local ctx_btxsetreference = context.btxsetreference
local ctx_directsetup = context.directsetup
+local ctx_btxmissing = context.btxmissing
+
+local ctx_btxsettag = context.btxsettag
+local ctx_btxcitesetup = context.btxcitesetup
+local ctx_btxsetfirst = context.btxsetfirst
+local ctx_btxsetsecond = context.btxsetsecond
+local ctx_btxsetinternal = context.btxsetinternal
+local ctx_btxsetconcat = context.btxsetconcat
+local ctx_btxstartsubcite = context.btxstartsubcite
+local ctx_btxstopsubcite = context.btxstopsubcite
statistics.register("publications load time", function()
local publicationsstats = publications.statistics
@@ -249,6 +272,197 @@ if not publications.authors then
initializer() -- for now, runtime loaded
end
+local usedentries = { }
+local initialized = false
+
+-- {
+-- ["metadata"]=1,
+-- ["references"]={
+-- ["block"]="bodypart",
+-- ["internal"]=2,
+-- ["realpage"]=1,
+-- ["section"]=0,
+-- },
+-- ["userdata"]={
+-- ["btxref"]="Cleveland1985",
+-- ["btxset"]="standard",
+-- },
+-- },
+
+setmetatableindex(usedentries,function(t,k)
+ if not initialized then
+ usedentries = { }
+ local internals = structures.references.internals
+ for i=1,#internals do
+ local entry = internals[i]
+ local metadata = entry.metadata
+ if metadata.kind == "full" then
+ local userdata = entry.userdata
+ if userdata then
+ local set = userdata.btxset
+ if set then
+ local tag = userdata.btxref
+ local s = usedentries[set]
+ if s then
+ local u = s[tag]
+ if u then
+ u[#u+1] = entry
+ else
+ u = { entry }
+ s[tag] = u
+ end
+ else
+ usedentries[set] = { [tag] = { entry } }
+ end
+ end
+ end
+ end
+ end
+ return usedentries[k]
+ end
+end)
+
+-- local subsets = nil
+-- local block = tex.count.btxblock
+-- local collected = references.collected
+-- local prefix = nil -- todo: dataset ?
+-- if prefix and prefix ~= "" then
+-- subsets = { collected[prefix] or collected[""] }
+-- else
+-- local components = references.productdata.components
+-- local subset = collected[""]
+-- if subset then
+-- subsets = { subset }
+-- else
+-- subsets = { }
+-- end
+-- for i=1,#components do
+-- local subset = collected[components[i]]
+-- if subset then
+-- subsets[#subsets+1] = subset
+-- end
+-- end
+-- end
+-- if #subsets == 0 then
+-- subsets = { collected[""] }
+-- end
+-- local list = type(reference) == "string" and settings_to_array(reference) or reference
+-- local todo = table.tohash(list)
+-- if #subsets > 0 then
+-- local result, nofresult, done = { }, 0, { }
+-- for i=1,#subsets do
+-- local subset = subsets[i]
+-- for i=1,#list do
+-- local rest = list[i]
+-- local blk, tag, found = block, nil, nil
+-- if block then
+-- tag = f_destination(dataset,blk,rest)
+-- found = subset[tag]
+-- if not found then
+-- for i=block-1,1,-1 do
+-- tag = f_destination(dataset,i,rest)
+-- found = subset[tag]
+-- if found then
+-- blk = i
+-- break
+-- end
+-- end
+-- end
+-- end
+-- if not found then
+-- blk = "*"
+-- tag = f_destination(dataset,blk,rest)
+-- found = subset[tag]
+-- end
+-- if found then
+-- local entries = found.entries
+-- if entries then
+-- local current = tonumber(entries.text) -- todo: no ranges when no tonumber
+-- if current and not done[current] then
+-- nofresult = nofresult + 1
+-- result[nofresult] = { blk, rest, current, found.references.internal }
+-- done[current] = true
+-- end
+-- end
+-- end
+-- end
+-- end
+
+local reported = { }
+
+local function findallused(dataset,reference,block,section)
+ local tags = settings_to_array(reference)
+ local todo = { }
+ local okay = { } -- only if mark
+ local set = usedentries[dataset]
+ local valid = datasets[dataset].luadata
+ if set then
+ for i=1,#tags do
+ local tag = tags[i]
+ if valid[tag] then
+ local entry = set[tag]
+ if entry then
+ -- only once in a list
+ if #entry == 1 then
+ entry = entry[1]
+ else
+ -- find best match (todo)
+ entry = entry[1] -- for now
+ end
+ okay[#okay+1] = entry
+ end
+ todo[tag] = true
+ elseif not reported[tag] then
+ reported[tag] = true
+ report_cite("non-existent entry %a in %a",tag,dataset)
+ end
+ end
+ else
+ for i=1,#tags do
+ local tag = tags[i]
+ if valid[tag] then
+ todo[tag] = true
+ elseif not reported[tag] then
+ reported[tag] = true
+ report_cite("non-existent entry %a in %a",tag,dataset)
+ end
+ end
+ end
+ return okay, todo, tags
+end
+
+local function flushcollected(flush,nofcollected)
+ if nofcollected > 0 then
+ flush(1,1)
+ if nofcollected > 2 then
+ for i=2,nofcollected-1 do
+ flush(i,2)
+ end
+ flush(nofcollected,3)
+ elseif nofcollected > 1 then
+ flush(nofcollected,4)
+ end
+ end
+end
+
+local function markcite(dataset,tag)
+ if trace_cite then
+ report_cite("mark, dataset: %s, tag: %s",dataset,tag)
+ end
+ ctx_btxdomarkcitation(dataset,tag)
+end
+
+local function flushmarked(dataset,list,todo)
+ if todo then
+ for i=1,#list do
+ local tag = list[i]
+ if todo[tag] then
+ markcite(dataset,tag)
+ end
+ end
+ end
+end
+
-- basic access
local function getfield(dataset,tag,name)
@@ -344,10 +558,10 @@ function publications.enhance(dataset) -- for the moment split runs (maybe publi
if type(tags) == "table" then
sort(tags)
for i=1,#tags do
--- details[tags[i]].short = short .. numbertochar(i)
-local detail = details[tags[i]]
-detail.short = short
-detail.suffix = numbertochar(i)
+ -- details[tags[i]].short = short .. numbertochar(i)
+ local detail = details[tags[i]]
+ detail.short = short
+ detail.suffix = numbertochar(i)
end
else
details[tags].short = short
@@ -402,9 +616,9 @@ end
-- rendering of fields (maybe multiple manipulators)
-local manipulation = utilities.parsers.manipulation
-local manipulators = utilities.parsers.manipulators
-
+-- local manipulation = utilities.parsers.manipulation
+-- local manipulators = utilities.parsers.manipulators
+--
-- local function checked(field)
-- local m, f = lpegmatch(manipulation,field)
-- if m then
@@ -415,6 +629,7 @@ local manipulators = utilities.parsers.manipulators
-- end
local manipulation = Ct((C((1-P("->"))^1) * P("->"))^1) * C(P(1)^0)
+local manipulators = utilities.parsers.manipulators
local function checked(field)
local m, f = lpegmatch(manipulation,field)
@@ -443,7 +658,6 @@ function commands.btxflush(name,tag,field)
local manipulator, field = checked(field)
local value = fields[field]
if type(value) == "string" then
- -- context(manipulator and manipulator(value) or value)
context(manipulator and manipulated(manipulator,value) or value)
return
end
@@ -451,7 +665,6 @@ function commands.btxflush(name,tag,field)
if details then
local value = details[field]
if type(value) == "string" then
- -- context(manipulator and manipulator(value) or value)
context(manipulator and manipulated(manipulator,value) or value)
return
end
@@ -473,7 +686,6 @@ function commands.btxdetail(name,tag,field)
local manipulator, field = checked(field)
local value = details[field]
if type(value) == "string" then
- -- context(manipulator and manipulator(value) or value)
context(manipulator and manipulated(manipulator,value) or value)
else
report("unknown detail %a of tag %a in dataset %a",field,tag,name)
@@ -494,7 +706,6 @@ function commands.btxfield(name,tag,field)
local manipulator, field = checked(field)
local value = fields[field]
if type(value) == "string" then
- -- context(manipulator and manipulator(value) or value)
context(manipulator and manipulated(manipulator,value) or value)
else
report("unknown field %a of tag %a in dataset %a",field,tag,name)
@@ -550,44 +761,6 @@ end
-- -- alternative approach: keep data at the tex end
-function publications.listconcat(t)
- local n = #t
- if n > 0 then
- context(t[1])
- if n > 1 then
- if n > 2 then
- for i=2,n-1 do
- ctx_btxlistparameter("sep")
- context(t[i])
- end
- ctx_btxlistparameter("finalsep")
- else
- ctx_btxlistparameter("lastsep")
- end
- context(t[n])
- end
- end
-end
-
-function publications.citeconcat(t)
- local n = #t
- if n > 0 then
- context(t[1])
- if n > 1 then
- if n > 2 then
- for i=2,n-1 do
- ctx_btxcitevariantparameter("sep")
- context(t[i])
- end
- ctx_btxcitevariantparameter("finalsep")
- else
- ctx_btxcitevariantparameter("lastsep")
- end
- context(t[n])
- end
- end
-end
-
function publications.singularorplural(singular,plural)
if lastconcatsize and lastconcatsize > 1 then
context(plural)
@@ -596,106 +769,6 @@ function publications.singularorplural(singular,plural)
end
end
--- function commands.makebibauthorlist(settings) -- ?
--- if not settings then
--- return
--- end
--- local dataset = datasets[settings.dataset]
--- if not dataset or dataset == "" then
--- return
--- end
--- local tag = settings.tag
--- if not tag or tag == "" then
--- return
--- end
--- local asked = settings_to_array(tag)
--- if #asked == 0 then
--- return
--- end
--- local compress = settings.compress
--- local interaction = settings.interactionn == v_start
--- local limit = tonumber(settings.limit)
--- local found = { }
--- local hash = { }
--- local total = 0
--- local luadata = dataset.luadata
--- for i=1,#asked do
--- local tag = asked[i]
--- local data = luadata[tag]
--- if data then
--- local author = data.a or "Xxxxxxxxxx"
--- local year = data.y or "0000"
--- if not compress or not hash[author] then
--- local t = {
--- author = author,
--- name = name, -- first
--- year = { [year] = name },
--- }
--- total = total + 1
--- found[total] = t
--- hash[author] = t
--- else
--- hash[author].year[year] = name
--- end
--- end
--- end
--- for i=1,total do
--- local data = found[i]
--- local author = data.author
--- local year = table.keys(data.year)
--- table.sort(year)
--- if interaction then
--- for i=1,#year do
--- year[i] = formatters["\\bibmaybeinteractive{%s}{%s}"](data.year[year[i]],year[i])
--- end
--- end
--- ctx_setvalue("currentbibyear",concat(year,","))
--- if author == "" then
--- ctx_setvalue("currentbibauthor","")
--- else -- needs checking
--- local authors = settings_to_array(author) -- {{}{}},{{}{}}
--- local nofauthors = #authors
--- if nofauthors == 1 then
--- if interaction then
--- author = formatters["\\bibmaybeinteractive{%s}{%s}"](data.name,author)
--- end
--- ctx_setvalue("currentbibauthor",author)
--- else
--- limit = limit or nofauthors
--- if interaction then
--- for i=1,#authors do
--- authors[i] = formatters["\\bibmaybeinteractive{%s}{%s}"](data.name,authors[i])
--- end
--- end
--- if limit == 1 then
--- ctx_setvalue("currentbibauthor",authors[1] .. "\\bibalternative{otherstext}")
--- elseif limit == 2 and nofauthors == 2 then
--- ctx_setvalue("currentbibauthor",concat(authors,"\\bibalternative{andtext}"))
--- else
--- for i=1,limit-1 do
--- authors[i] = authors[i] .. "\\bibalternative{namesep}"
--- end
--- if limit < nofauthors then
--- authors[limit+1] = "\\bibalternative{otherstext}"
--- ctx_setvalue("currentbibauthor",concat(authors,"",1,limit+1))
--- else
--- authors[limit-1] = authors[limit-1] .. "\\bibalternative{andtext}"
--- ctx_setvalue("currentbibauthor",concat(authors))
--- end
--- end
--- end
--- end
--- -- the following use: currentbibauthor and currentbibyear
--- if i == 1 then
--- context.ixfirstcommand()
--- elseif i == total then
--- context.ixlastcommand()
--- else
--- context.ixsecondcommand()
--- end
--- end
--- end
-
local patterns = { "publ-imp-%s.mkiv", "publ-imp-%s.tex" }
local function failure(name)
@@ -731,7 +804,7 @@ local sections = structures.sections
local renderings = { } --- per dataset
-table.setmetatableindex(renderings,function(t,k)
+setmetatableindex(renderings,function(t,k)
local v = {
list = { },
done = { },
@@ -788,8 +861,6 @@ local function validkeyword(dataset,tag,keyword)
end
local kw = dt.keyword
if kw then
--- inspect(keyword)
--- inspect(kw)
for k in next, keyword do
if kw[k] then
return true
@@ -804,12 +875,10 @@ function lists.collectentries(specification)
return
end
local rendering = renderings[dataset]
--- specification.names = "btx"
local method = rendering.method
if method == v_none then
return
end
--- method=v_local --------------------
local result = structures.lists.filter(specification)
--
local keyword = specification.keyword
@@ -948,16 +1017,32 @@ function lists.flushentries(dataset,sortvariant)
list = sort(dataset,rendering,list) or list
end
for i=1,#list do
- ctx_setvalue("currentbtxindex",i)
- ctx_btxhandlelistentry(list[i][1]) -- we can pass i here too ... more efficient to avoid the setvalue
- end
+-- ctx_setvalue("currentbtxindex",i) -- todo: helper
+-- -- todo: also flush combinations
+-- ctx_btxhandlelistentry(list[i][1]) -- we can pass i here too ... more efficient to avoid the setvalue
+ local tag = list[i][1]
+ local entry = datasets[dataset].luadata[tag]
+ if entry then
+ ctx_setvalue("currentbtxindex",i) -- todo: helper
+ local combined = entry.combined
+ if combined then
+ ctx_setvalue("currentbtxcombis",concat(combined,","))
+ else
+ ctx_setvalue("currentbtxcombis","")
+ end
+ ctx_btxhandlelistentry(tag) -- pas i instead
+ end
+ end
end
function lists.fetchentries(dataset)
local list = renderings[dataset].list
for i=1,#list do
- ctx_setvalue("currentbtxindex",i)
- ctx_btxchecklistentry(list[i][1])
+ local tag = list[i][1]
+ local entry = datasets[dataset].luadata[tag]
+ if entry then
+ ctx_btxchecklistentry(tag) -- integrate doifalreadyplaced here
+ end
end
end
@@ -987,158 +1072,38 @@ local function compare(a,b)
return aa and bb and aa < bb
end
--- maybe hash subsets
--- how efficient is this? old leftovers?
-
-- rendering ?
+-- todo: nicer refs
+
local f_reference = formatters["r:%s:%s:%s"] -- dataset, instance (block), tag
local f_destination = formatters["d:%s:%s:%s"] -- dataset, instance (block), tag
-
-function lists.resolve(dataset,reference) -- maybe already feed it split
- -- needs checking (the prefix in relation to components)
- local subsets = nil
- local block = tex.count.btxblock
- local collected = references.collected
- local prefix = nil -- todo: dataset ?
- if prefix and prefix ~= "" then
- subsets = { collected[prefix] or collected[""] }
- else
- local components = references.productdata.components
- local subset = collected[""]
- if subset then
- subsets = { subset }
- else
- subsets = { }
- end
- for i=1,#components do
- local subset = collected[components[i]]
- if subset then
- subsets[#subsets+1] = subset
- end
- end
- end
--- inspect(subsets)
- if #subsets > 0 then
- local result, nofresult, done = { }, 0, { }
- for i=1,#subsets do
- local subset = subsets[i]
- for rest in gmatch(reference,"[^, ]+") do
- local blk, tag, found = block, nil, nil
- if block then
- tag = f_destination(dataset,blk,rest)
- found = subset[tag]
- if not found then
- for i=block-1,1,-1 do
- tag = f_destination(dataset,blk,rest)
--- tag = i .. ":" .. rest
- found = subset[tag]
- if found then
- blk = i
- break
- end
- end
- end
- end
- if not found then
- blk = "*"
- tag = f_destination(dataset,blk,rest)
- found = subset[tag]
- end
- if found then
- local current = tonumber(found.entries and found.entries.text) -- tonumber needed
- if current and not done[current] then
- nofresult = nofresult + 1
- result[nofresult] = { blk, rest, current }
- done[current] = true
- end
- end
- end
- end
- local first, last, firsti, lasti, firstr, lastr
- local collected, nofcollected = { }, 0
- for i=1,nofresult do
- local r = result[i]
- local current = r[3]
- if not first then
- first, last, firsti, lasti, firstr, lastr = current, current, i, i, r, r
- elseif current == last + 1 then
- last, lasti, lastr = current, i, r
- else
- if last > first + 1 then
- nofcollected = nofcollected + 1
- collected[nofcollected] = { firstr, lastr }
- else
- nofcollected = nofcollected + 1
- collected[nofcollected] = firstr
- if last > first then
- nofcollected = nofcollected + 1
- collected[nofcollected] = lastr
- end
- end
- first, last, firsti, lasti, firstr, lastr = current, current, i, i, r, r
- end
- end
- if first and last then
- if last > first + 1 then
- nofcollected = nofcollected + 1
- collected[nofcollected] = { firstr, lastr }
- else
- nofcollected = nofcollected + 1
- collected[nofcollected] = firstr
- if last > first then
- nofcollected = nofcollected + 1
- collected[nofcollected] = lastr
- end
- end
- end
- if nofcollected > 0 then
--- inspect(reference)
--- inspect(result)
--- inspect(collected)
- for i=1,nofcollected do
- local c = collected[i]
- if i == nofcollected then
- ctx_btxlistvariantparameter("lastpubsep")
- elseif i > 1 then
- ctx_btxlistvariantparameter("pubsep")
- end
- if #c == 3 then -- a range (3 is first or last)
- ctx_btxdirectlink(f_reference(dataset,c[1],c[2]),c[3])
- else
- local f, l = c[2], c[2]
- ctx_btxdirectlink(f_reference(dataset,f[1],f[2]),f[3])
- context.endash() -- to do
- ctx_btxdirectlink(f_reference(dataset,l[4],l[5]),l[6])
- end
- end
- else
- context("[btx error 1]")
- end
- else
- context("[btx error 2]")
- end
-end
+local f_listentry = formatters["d:%s:%s:%s"] -- dataset, instance (block), tag
+local f_internal = formatters["internal(%s)"] -- dataset, instance (block), tag
local done = { }
function commands.btxreference(dataset,block,tag,data)
- local ref = f_reference(dataset,block,tag)
+ local ref = f_reference(dataset,block,tag) -- we just need a unique key
if not done[ref] then
+ if trace_references then
+ report_reference("link: %s",ref)
+ end
done[ref] = true
--- context("<%s>",data)
- ctx_dodirectfullreference(ref,data)
+ ctx_btxsetreference(dataset,tag,ref,data)
end
end
local done = { }
function commands.btxdestination(dataset,block,tag,data)
- local ref = f_destination(dataset,block,tag)
+ local ref = f_destination(dataset,block,tag) -- we just need a unique key
if not done[ref] then
+ if trace_references then
+ report_reference("link: %s",ref)
+ end
done[ref] = true
--- context("<<%s>>",data)
- ctx_dodirectfullreference(ref,data)
+ ctx_btxsetreference(dataset,tag,ref,data)
end
end
@@ -1184,11 +1149,48 @@ local function sortedtags(dataset,list,sorttype)
end
end
--- todo: standard : current
+-- if sorttype and sorttype ~= "" then
+-- tags = sortedtags(dataset,tags,sorttype)
+-- end
local prefixsplitter = lpeg.splitat("::")
-function commands.btxhandlecite(dataset,tag,mark,variant,sorttype,setup) -- variant for tracing
+function commands.btxhandlecite(specification)
+ local tag = specification.reference
+ if not tag or tag == "" then
+ return
+ end
+ --
+ local dataset = specification.dataset or ""
+ local mark = specification.markentry ~= false
+ local variant = specification.variant or "num"
+ local sorttype = specification.sorttype
+ local compress = specification.compress == v_yes
+ --
+ local prefix, rest = lpegmatch(prefixsplitter,tag)
+ if rest then
+ dataset = prefix
+ else
+ rest = tag
+ end
+ local action = citevariants[variant] -- there is always fallback on default
+ if trace_cite then
+ report_cite("inject, dataset: %s, tag: %s, variant: %s, compressed",dataset or "-",rest,variant)
+ end
+ ctx_setvalue("currentbtxdataset",dataset)
+ action(dataset,rest,mark,compress,variant)
+end
+
+function commands.btxhandlenocite(specification)
+ local mark = specification.markentry ~= false
+ if not mark then
+ return
+ end
+ local tag = specification.reference
+ if not tag or tag == "" then
+ return
+ end
+ local dataset = specification.dataset or ""
local prefix, rest = lpegmatch(prefixsplitter,tag)
if rest then
dataset = prefix
@@ -1197,190 +1199,551 @@ function commands.btxhandlecite(dataset,tag,mark,variant,sorttype,setup) -- vari
end
ctx_setvalue("currentbtxdataset",dataset)
local tags = settings_to_array(rest)
- if #tags > 0 then
- if sorttype and sorttype ~= "" then
- tags = sortedtags(dataset,tags,sorttype)
+ if trace_cite then
+ report_cite("mark, dataset: %s, tags: % | t",dataset or "-",tags)
+ end
+ for i=1,#tags do
+ markcite(dataset,tags[i])
+ end
+end
+
+-- function commands.btxcitevariant(dataset,block,tags,variant) -- uses? specification ?
+-- local action = citevariants[variant]
+-- if action then
+-- action(dataset,tags,variant)
+-- end
+-- end
+
+-- sorter
+
+local keysorter = function(a,b) return a.sortkey < b.sortkey end
+
+local function compresslist(source)
+ for i=1,#source do
+ if type(source[i].sortkey) ~= "number" then
+ return source
end
- ctx_btxcitevariantparameter(v_left)
- for i=1,#tags do
- local tag = tags[i]
- ctx_setvalue("currentbtxtag",tag)
- if i > 1 then
- ctx_btxcitevariantparameter(v_middle)
- end
- if mark ~= false then
- ctx_btxdomarkcitation(dataset,tag)
+ end
+ local first, last, firstr, lastr
+ local target, noftarget, tags = { }, 0, { }
+ sort(source,keysorter)
+ local function flushrange()
+ noftarget = noftarget + 1
+ if last > first + 1 then
+ target[noftarget] = {
+ first = firstr,
+ last = lastr,
+ tags = tags,
+ }
+ else
+ target[noftarget] = firstr
+ if last > first then
+ noftarget = noftarget + 1
+ target[noftarget] = lastr
end
- ctx_directsetup(setup) -- cite can become alternative
end
- ctx_btxcitevariantparameter(v_right)
- else
- -- error
+ tags = { }
end
+ for i=1,#source do
+ local entry = source[i]
+ local current = entry.sortkey
+ if not first then
+ first, last, firstr, lastr = current, current, entry, entry
+ elseif current == last + 1 then
+ last, lastr = current, entry
+ else
+ flushrange()
+ first, last, firstr, lastr = current, current, entry, entry
+ end
+ tags[#tags+1] = entry.tag
+ end
+ if first and last then
+ flushrange()
+ end
+ return target
end
-function commands.btxhandlenocite(dataset,tag,mark)
- if mark ~= false then
- local prefix, rest = lpegmatch(prefixsplitter,tag)
- if rest then
- dataset = prefix
+-- local source = {
+-- { tag = "one", internal = 1, value = "foo", page = 1 },
+-- { tag = "two", internal = 2, value = "bar", page = 2 },
+-- { tag = "three", internal = 3, value = "gnu", page = 3 },
+-- }
+--
+-- local target = compresslist(source)
+
+local numberonly = R("09")^1 / tonumber + P(1)^0
+local f_missing = formatters["<%s>"]
+
+-- maybe also sparse (e.g. pages)
+
+local function processcite(dataset,reference,mark,compress,setup,getter,setter,compressor)
+ reference = publications.parenttag(dataset,reference)
+ local found, todo, list = findallused(dataset,reference)
+ if found and setup then
+ local source = { }
+ local badkey = false
+ for i=1,#found do
+ local entry = found[i]
+ local tag = entry.userdata.btxref
+ local internal = entry.references.internal
+ local data = getter(dataset,tag,entry,internal)
+ if compress and not compressor then
+ local sortkey = data.sortkey
+ if sortkey then
+ local key = lpegmatch(numberonly,sortkey)
+ if key then
+ data.sortkey = key
+ else
+ badkey = true
+ end
+ else
+ badkey = true
+ end
+ end
+ source[i] = data
+ end
+ if compress and not badkey then
+ local target = (compressor or compresslist)(source)
+ local function flush(i,state)
+ local entry = target[i]
+ local first = entry.first
+ if first then
+ local tags = entry.tags
+ if mark then
+ for i=1,#tags do
+ local tag = tags[i]
+ markcite(dataset,tag)
+ todo[tag] = false
+ end
+ end
+ ctx_btxsettag(tags[1])
+ local internal = first.internal
+ if internal then
+ ctx_btxsetinternal(internal)
+ end
+ if not setter(first,entry.last) then
+ ctx_btxsetfirst(f_missing(first.tag))
+ end
+ else
+ local tag = entry.tag
+ if mark then
+ markcite(dataset,tag)
+ todo[tag] = false
+ end
+ ctx_btxsettag(tag)
+ local internal = entry.internal
+ if internal then
+ ctx_btxsetinternal(internal)
+ end
+ if not setter(entry) then
+ ctx_btxsetfirst(f_missing(entry.tag))
+ end
+ end
+ ctx_btxsetconcat(state)
+ ctx_btxcitesetup(setup)
+ end
+ flushcollected(flush,#target)
else
- rest = tag
+ local function flush(i,state)
+ local entry = source[i]
+ local tag = entry.tag
+ if mark then
+ markcite(dataset,tag)
+ todo[tag] = false
+ end
+ ctx_btxsettag(tag)
+ local internal = entry.internal
+ if internal then
+ ctx_btxsetinternal(internal)
+ end
+ ctx_btxsetconcat(state)
+ if not setter(entry) then
+ ctx_btxsetfirst(f_missing(entry.tag))
+ end
+ ctx_btxcitesetup(setup)
+ end
+ flushcollected(flush,#source)
end
- ctx_setvalue("currentbtxdataset",dataset)
- local tags = settings_to_array(rest)
- for i=1,#tags do
- ctx_btxdomarkcitation(dataset,tags[i])
+ end
+ if mark then
+ flushmarked(dataset,list,todo)
+ end
+end
+
+local function simplegetter(first,last,field)
+ local value = first[field]
+ if value then
+ ctx_btxsetfirst(value)
+ if last then
+ ctx_btxsetsecond(last[field])
end
+ return true
end
end
-function commands.btxcitevariant(dataset,block,tags,variant)
- local action = citevariants[variant] or citevariants.default
- if action then
- action(dataset,tags,variant)
+local setters = setmetatableindex({},function(t,k)
+ local v = function(dataset,tag,entry,internal)
+ local value = getfield(dataset,tag,k)
+ return {
+ tag = tag,
+ internal = internal,
+ [k] = value,
+ sortkey = value,
+ }
+ end
+ t[k] = v
+ return v
+end)
+
+local getters = setmetatableindex({},function(t,k)
+ local v = function(first,last)
+ return simplegetter(first,last,k)
+ end
+ t[k] = v
+ return v
+end)
+
+-- default
+
+setmetatableindex(citevariants,function(t,k)
+ local v = t.default
+ t[k] = v
+ return v
+end)
+
+function citevariants.default(dataset,reference,mark,compress,variant,setup)
+ processcite(dataset,reference,mark,compress,setup or variant,setters[variant],getters[variant])
+end
+
+-- short
+
+local function setter(dataset,tag,entry,internal)
+ return {
+ tag = tag,
+ internal = internal,
+ short = getfield(dataset,tag,"short"),
+ suffix = getfield(dataset,tag,"suffix"),
+ }
+end
+
+local function getter(first,last) -- last not used
+ local short = first.short
+ if short then
+ local suffix = first.suffix
+ if suffix then
+ ctx_btxsetfirst(short .. suffix)
+ else
+ ctx_btxsetfirst(short)
+ end
+ return true
end
end
-function citevariants.default(dataset,tags,variant)
- local content = getfield(dataset,tags,variant)
- if content then
- context(content)
+function citevariants.short(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,false,"short",setter,getter)
+end
+
+-- pages (no compress)
+
+local function setter(dataset,tag,entry,internal)
+ return {
+ tag = tag,
+ internal = internal,
+ pages = getdetail(dataset,tag,"pages"),
+ }
+end
+
+local function getter(first,last)
+ local pages = first.pages
+ if pages then
+ if type(pages) == "table" then
+ ctx_btxsetfirst(pages[1])
+ ctx_btxsetsecond(pages[2])
+ else
+ ctx_btxsetfirst(pages)
+ end
+ return true
end
end
+function citevariants.page(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,compress,"page",setter,getter)
+end
+
+-- num
+
+local function setter(dataset,tag,entry,internal)
+ local text = entry.entries.text
+ return {
+ tag = tag,
+ internal = internal,
+ num = text,
+ sortkey = text,
+ }
+end
+
+local function getter(first,last)
+ return simplegetter(first,last,"num")
+end
+
+function citevariants.num(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,compress,"num",setter,getter)
+end
+
+-- year
+
+local function setter(dataset,tag,entry,internal)
+ local year = getfield(dataset,tag,"year")
+ return {
+ tag = tag,
+ internal = internal,
+ year = year,
+ sortkey = year,
+ }
+end
+
+local function getter(first,last)
+ return simplegetter(first,last,"year")
+end
+
+function citevariants.year(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,compress,"year",setter,getter)
+end
+
+-- index | serial
+
+local function setter(dataset,tag,entry,internal)
+ local index = getfield(dataset,tag,"index")
+ return {
+ tag = tag,
+ internal = internal,
+ index = index,
+ sortkey = index,
+ }
+end
+
+local function getter(first,last)
+ return simplegetter(first,last,"index")
+end
+
+function citevariants.index(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,compress,"index",setter,getter)
+end
+
+function citevariants.serial(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,compress,"serial",setter,getter)
+end
+
+-- category | type
+
+local function setter(dataset,tag,entry,internal)
+ return {
+ tag = tag,
+ internal = internal,
+ category = getfield(dataset,tag,"category"),
+ }
+end
+
+local function getter(first,last)
+ return simplegetter(first,last,"category")
+end
+
+function citevariants.category(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,compress,"category",setter,getter)
+end
+
+function citevariants.type(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,compress,"type",setter,getter)
+end
+
+-- key | tag
+
+local function setter(dataset,tag,entry,internal)
+ return {
+ tag = tag,
+ internal = internal,
+ }
+end
+
+local function getter(first,last)
+ ctx_btxsetfirst(first.tag)
+ return true
+end
+
+function citevariants.key(dataset,reference,mark,compress) return
+ processcite(dataset,reference,mark,compress,"key",setter,getter)
+end
+
+function citevariants.tag(dataset,reference,mark,compress) return
+ processcite(dataset,reference,mark,compress,"tag",setter,getter)
+end
+
+-- author
+
+local function setter(dataset,tag,entry,internal)
+ return {
+ tag = tag,
+ internal = internal,
+ author = getfield(dataset,tag,"author"),
+ }
+end
+
+local function getter(first,last)
+ ctx_btxsetfirst(first.author) -- todo: formatted
+ return true
+end
+
+function citevariants.author(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,false,"author",setter,getter)
+end
+
-- todo : sort
-- todo : choose between publications or commands namespace
-- todo : use details.author
-- todo : sort details.author
+-- (name, name and name) .. how names? how sorted?
+-- todo: we loop at the tex end .. why not here
+-- \cite[{hh,afo},kvm]
-local function collectauthoryears(dataset,tags)
- local luadata = datasets[dataset].luadata
- local list = settings_to_array(tags)
- local found = { }
+-- common
+
+local function authorcompressor(found,key)
local result = { }
- local order = { }
- for i=1,#list do
- local tag = list[i]
- local entry = luadata[tag]
- if entry then
- local year = entry.year
- local author = entry.author
- if author and year then
- local a = found[author]
- if not a then
- a = { }
- found[author] = a
- order[#order+1] = author
- end
- local y = a[year]
- if not y then
- y = { }
- a[year] = y
- end
- y[#y+1] = tag
- end
+ local entries = { }
+ for i=1,#found do
+ local entry = found[i]
+ local author = entry.author
+ local aentries = entries[author]
+ -- will be just entry but for tracing ...
+ entry = { internal = entry.internal, author = author, [key] = entry[key], sortkey = entry.sortkey }
+ if aentries then
+ aentries[#aentries+1] = entry
+ else
+ entries[author] = { entry }
end
end
- -- found = { author = { year_1 = { e1, e2, e3 } } }
- for i=1,#order do
- local author = order[i]
- local years = found[author]
- local yrs = { }
- for year, entries in next, years do
- if subyears then
- -- -- add letters to all entries of an author and if so shouldn't
- -- -- we tag all years of an author as soon as we do this?
- -- if #entries > 1 then
- -- for i=1,#years do
- -- local entry = years[i]
- -- -- years[i] = year .. string.char(i + string.byte("0") - 1)
- -- end
- -- end
- else
- yrs[#yrs+1] = year
+ for i=1,#found do
+ local entry = found[i]
+ local author = entry.author
+ local aentries = entries[author]
+ if not aentries then
+ result[#result+1] = entry
+ elseif aentries == true then
+ -- already done
+ else
+ result[#result+1] = entry
+ entry.entries = aentries
+ entries[author] = true
+ end
+ end
+ -- todo: add letters (should we then tag all?)
+ return result
+end
+
+local function authorconcat(target,key,setup)
+ local function flush(i,state)
+ local entry = target[i]
+ local first = entry.first
+ if first then
+ local internal = first.internal
+ if internal then
+ ctx_btxsetinternal(internal)
end
+ ctx_btxsetfirst(first[key] or f_missing(first.tag))
+ ctx_btxsetsecond(entry.last[key])
+ else
+ local internal = entry.internal
+ if internal then
+ ctx_btxsetinternal(internal)
+ end
+ ctx_btxsetfirst(entry[key] or f_missing(entry.tag))
end
- result[i] = { author = author, years = yrs }
+ ctx_btxsetconcat(state)
+ ctx_btxcitesetup(setup)
end
- return result, order
+ ctx_btxstartsubcite(setup)
+ flushcollected(flush,#target)
+ ctx_btxstopsubcite()
end
--- (name, name and name) .. how names? how sorted?
--- todo: we loop at the tex end .. why not here
--- \cite[{hh,afo},kvm]
+local function authorsingle(entry,key,setup)
+ ctx_btxstartsubcite(setup)
+ ctx_btxsetfirst(entry[key] or f_missing(entry.tag))
+ ctx_btxcitesetup(setup)
+ ctx_btxstopsubcite()
+end
--- maybe we will move this tex anyway
+local function authorgetter(first,last,key,setup) -- only first
+ ctx_btxsetfirst(first.author) -- todo: reformat
+ local entries = first.entries
+ if entries then
+ local c = compresslist(entries)
+ ctx_btxsetsecond(function() authorconcat(c,key,setup) end)
+ else
+ ctx_btxsetsecond(function() authorsingle(first,key,setup) end)
+ end
+ return true
+end
-function citevariants.author(dataset,tags)
- local result, order = collectauthoryears(dataset,tags,method,what) -- we can have a collectauthors
- publications.citeconcat(order)
+-- authornum
+
+local function setter(dataset,tag,entry,internal)
+ local text = entry.entries.text
+ return {
+ tag = tag,
+ internal = internal,
+ author = getfield(dataset,tag,"author"),
+ num = text,
+ sortkey = text and lpegmatch(numberonly,text)
+ }
end
-local function authorandyear(dataset,tags,formatter)
- local result, order = collectauthoryears(dataset,tags,method,what) -- we can have a collectauthors
- for i=1,#result do
- local r = result[i]
- order[i] = formatter(r.author,r.years) -- reuse order
- end
- publications.citeconcat(order)
+local function getter(first,last)
+ authorgetter(first,last,"num","author:num")
+ return true
end
-function citevariants.authoryear(dataset,tags)
- authorandyear(dataset,tags,formatters["%s (%, t)"])
+local function compressor(found)
+ return authorcompressor(found,"num")
end
-function citevariants.authoryears(dataset,tags)
- authorandyear(dataset,tags,formatters["%s, %, t"])
+function citevariants.authornum(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,compress,"authornum",setter,getter,compressor)
end
-function citevariants.authornum(dataset,tags)
- local result, order = collectauthoryears(dataset,tags,method,what) -- we can have a collectauthors
- publications.citeconcat(order)
- ctx_btxcitevariantparameter(v_inbetween)
- lists.resolve(dataset,tags) -- left/right ?
+-- authoryear | authoryears
+
+local function setter(dataset,tag,entry,internal)
+ local year = getfield(dataset,tag,"year")
+ return {
+ tag = tag,
+ internal = internal,
+ author = getfield(dataset,tag,"author"),
+ year = year,
+ sortkey = year and lpegmatch(numberonly,year)
+ }
end
--- function citevariants.short(dataset,tags)
--- local short = getdetail(dataset,tags,"short")
--- if short then
--- context(short)
--- end
--- end
+local function getter(first,last)
+ authorgetter(first,last,"year","author:year")
+ return true
+end
-function citevariants.short(dataset,tags)
- local short = getdetail(dataset,tags,"short")
- local suffix = getdetail(dataset,tags,"suffix")
- if suffix then
- context(short .. suffix)
- elseif short then
- context(short)
- end
+local function compressor(found)
+ return authorcompressor(found,"year")
end
-function citevariants.page(dataset,tags)
- local pages = getdetail(dataset,tags,"pages")
- if not pages then
- -- nothing
- elseif type(pages) == "table" then
- context(pages[1])
- ctx_btxcitevariantparameter(v_inbetween)
- context(pages[2])
- else
- context(pages)
- end
+function citevariants.authoryear(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,compress,"authoryear",setter,getter,compressor)
end
-function citevariants.num(dataset,tags)
--- ctx_btxdirectlink(f_destination(dataset,block,tags),listindex) -- not okay yet
- lists.resolve(dataset,tags)
+local function getter(first,last)
+ authorgetter(first,last,"year","author:years")
+ return true
end
-function citevariants.serial(dataset,tags) -- the traditional fieldname is "serial" and not "index"
- local index = getfield(dataset,tags,"index")
- if index then
- context(index)
- end
+function citevariants.authoryears(dataset,reference,mark,compress)
+ processcite(dataset,reference,mark,compress,"authoryears",setter,getter,compressor)
end
-- List variants
@@ -1388,41 +1751,30 @@ end
local listvariants = { }
publications.listvariants = listvariants
--- function commands.btxhandlelist(dataset,block,tag,variant,setup)
--- if sorttype and sorttype ~= "" then
--- tags = sortedtags(dataset,tags,sorttype)
--- end
--- ctx_setvalue("currentbtxtag",tag)
--- ctx_btxlistvariantparameter(v_left)
--- ctx_directsetup(setup)
--- ctx_btxlistvariantparameter(v_right)
--- end
-
-function commands.btxlistvariant(dataset,block,tags,variant,listindex)
+function commands.btxlistvariant(dataset,block,tag,variant,listindex)
local action = listvariants[variant] or listvariants.default
if action then
- action(dataset,block,tags,variant,tonumber(listindex) or 0)
+ action(dataset,block,tag,variant,tonumber(listindex) or 0)
end
end
-function listvariants.default(dataset,block,tags,variant)
+function listvariants.default(dataset,block,tag,variant)
context("?")
end
-function listvariants.num(dataset,block,tags,variant,listindex)
- ctx_btxdirectlink(f_destination(dataset,block,tags),listindex) -- not okay yet
+function listvariants.num(dataset,block,tag,variant,listindex)
+ local lst = f_listentry(dataset,block,tag)
+ local ref = f_reference(dataset,block,tag)
+ if trace_references then
+ report_reference("list: %s",lst)
+ end
+ -- todo
+ ctx_btxdirectlink(ref,listindex) -- a goto
end
--- function listvariants.short(dataset,block,tags,variant,listindex)
--- local short = getdetail(dataset,tags,variant,variant)
--- if short then
--- context(short)
--- end
--- end
-
-function listvariants.short(dataset,block,tags,variant,listindex)
- local short = getdetail(dataset,tags,"short","short")
- local suffix = getdetail(dataset,tags,"suffix","suffix")
+function listvariants.short(dataset,block,tag,variant,listindex)
+ local short = getdetail(dataset,tag,"short","short")
+ local suffix = getdetail(dataset,tag,"suffix","suffix")
if suffix then
context(short .. suffix)
elseif short then
diff --git a/Master/texmf-dist/tex/context/base/publ-ini.mkiv b/Master/texmf-dist/tex/context/base/publ-ini.mkiv
index adbf8f7fcf0..68e185f2375 100644
--- a/Master/texmf-dist/tex/context/base/publ-ini.mkiv
+++ b/Master/texmf-dist/tex/context/base/publ-ini.mkiv
@@ -15,6 +15,7 @@
% todo: \v!cite => \s!cite
% todo: interface with (ml)bibtex (export -> call -> import)
% todo: check if 'all' etc are ok ... either use list or use other criterium
+% todo: \the\everysetupbtxciteplacement probably too often
% \definecolor[btx:field] [darkred]
% \definecolor[btx:crossref][darkblue]
@@ -44,7 +45,10 @@
\unprotect
-\def\s!btx{btx}
+\startcontextdefinitioncode
+
+\def\s!btx {btx}
+\def\s!cite {cite}
\def\v!btxlist{btxlist}
% a dedicated construction mechanism
@@ -346,12 +350,34 @@
\fi
\to \everydefinebtxrendering
+% \unexpanded\def\btx_entry_inject
+% {\begingroup
+% \edef\currentbtxcategory{\btxfield{category}}%
+% \ignorespaces
+% \directsetup{\s!btx:\currentbtxalternative:\currentbtxcategory}%
+% \removeunwantedspaces
+% \endgroup}
+
+\let\currentbtxcombis\empty % goes into the setups
+
\unexpanded\def\btx_entry_inject
{\begingroup
\edef\currentbtxcategory{\btxfield{category}}%
\ignorespaces
\directsetup{\s!btx:\currentbtxalternative:\currentbtxcategory}%
\removeunwantedspaces
+ \ifx\currentbtxcombis\empty \else
+ ;\space % todo .. parameter .. what is a good name .. problem: what if ends with .
+ \processcommacommand[\currentbtxcombis]\btx_entry_inject_combi
+ \fi
+ \endgroup}
+
+\def\btx_entry_inject_combi#1%
+ {\begingroup
+ \def\currentbtxtag{#1}%
+ \ignorespaces
+ \directsetup{\s!btx:\currentbtxalternative:\currentbtxcategory}%
+ \removeunwantedspaces
\endgroup}
\unexpanded\def\completebtxrendering{\dodoubleempty\publ_place_list_complete}
@@ -428,7 +454,8 @@
keyword = "\btxrenderingparameter\c!keyword",
}}%
% next we analyze the width
- \ifx\btx_reference_inject_indeed\relax \else
+ \ifx\btx_reference_inject_indeed\relax
+ \else
\edef\p_width{\btxrenderingparameter\c!width}%
\ifx\p_width\v!auto
\scratchcounter\btxcounter
@@ -484,6 +511,13 @@
\fi
\endgroup}
+\unexpanded\def\btxchecklistcombi#1% called at the lua end
+ {\begingroup
+ \edef\currentbtxtag{#1}%
+ ; % todo
+ \publ_check_list_entry
+ \endgroup}
+
\unexpanded\def\publ_check_list_entry
{\global\advance\btxcounter\plusone
% todo, switch to font
@@ -549,6 +583,13 @@
\unexpanded\def\btxflushauthorinverted {\btx_flush_author{inverted}} % #1
\unexpanded\def\btxflushauthorinvertedshort{\btx_flush_author{invertedshort}} % #1
+\unexpanded\def\currentbtxciteauthor % always author
+ {\ctxcommand{btxauthor("\currentbtxdataset","\currentbtxtag","author",{
+ combiner = "\btxcitevariantparameter\c!author",
+ etallimit = \number\btxcitevariantparameter\c!etallimit,
+ etaldisplay = \number\btxcitevariantparameter\c!etaldisplay,
+ })}}
+
% \btxflushauthor{author}
% \btxflushauthor{artauthor}
% \btxflushauthor{editor}
@@ -558,38 +599,44 @@
% \btxflushauthor[inverted]{author}
% \btxflushauthor[invertedshort]{author}
-% Interaction
+% Interaction: only list
\newconditional\btxinteractive
-\unexpanded\def\btxdoifelseinteraction
- {\iflocation
- \edef\p_interaction{\btxcitevariantparameter\c!interaction}%
- \ifx\p_interaction\v!stop
- \doubleexpandafter\secondoftwoarguments
- \else
- \doubleexpandafter\firstoftwoarguments
- \fi
- \else
- \expandafter\secondoftwoarguments
- \fi}
+\unexpanded\def\btxdoifelseinteraction{\secondoftwoarguments}
\appendtoks
\iflocation
\edef\p_interaction{\btxlistvariantparameter\c!interaction}%
\ifx\p_interaction\v!stop
- \let\doifelsebtxinteractionelse\secondoftwoarguments
+ \let\btxdoifelseinteraction\secondoftwoarguments
\setfalse\btxinteractive
\else
- \let\doifelsebtxinteractionelse\firstoftwoarguments
+ \let\btxdoifelseinteraction\firstoftwoarguments
\settrue\btxinteractive
\fi
\else
- \let\doifelsebtxinteractionelse\secondoftwoarguments
+ \let\btxdoifelseinteraction\secondoftwoarguments
\setfalse\btxinteractive
\fi
\to \everysetupbtxlistplacement
+\appendtoks
+ \iflocation
+ \edef\p_interaction{\btxcitevariantparameter\c!interaction}%
+ \ifx\p_interaction\v!stop
+ \let\btxdoifelseinteraction\secondoftwoarguments
+ \setfalse\btxinteractive
+ \else
+ \let\btxdoifelseinteraction\firstoftwoarguments
+ \settrue\btxinteractive
+ \fi
+ \else
+ \let\btxdoifelseinteraction\secondoftwoarguments
+ \setfalse\btxinteractive
+ \fi
+\to \everysetupbtxciteplacement
+
% bib -> btx
\unexpanded\def\btxgotolink#1[#2]{\doifreferencefoundelse{\bibrefprefix#2}{\goto{#1}[\bibrefprefix#2]}{#1}}
@@ -651,15 +698,21 @@
% \iftrialtypesetting \else
% \processcommacommand[\currentbtxtag]{\publ_cite_indeed\currentbtxrendering}%
% \fi}
+%
+% \def\publ_cite_indeed#1#2%
+% {\expanded{\writedatatolist[btx][btxset=#1,btxref=#2]}}
-\def\publ_cite_indeed#1#2%
- {\expanded{\writedatatolist[btx][btxset=#1,btxref=#2]}}
-
-\def\btxdomarkcitation#1#2% called from lua end
- {\iftrialtypesetting \else
- \writedatatolist[btx][btxset=#1,btxref=#2]% \c!location=\v!here
+\unexpanded\def\btxdomarkcitation % called from lua end
+ {\iftrialtypesetting
+ \expandafter\gobbletwoarguments
+ \else
+ \expandafter\publ_cite_mark_citation
\fi}
+\def\publ_cite_mark_citation#1#2% called from lua end
+ {\dontleavehmode
+ \writedatatolist[btx][btxset=#1,btxref=#2]} % \c!location=\v!here
+
%D \macros{cite,nocite,citation,nocitation,usecitation}
%D
%D The inline \type {\cite} command creates a (often) short reference to a publication
@@ -687,6 +740,7 @@
{\letinteractionparameter\c!style\empty
\edef\currentbtxcitevariant{\btxcitevariantparameter\c!alternative}%
\edef\currentbtxcitetag{#1}%
+ \the\everysetupbtxciteplacement
\publ_cite_variant
\endgroup}
@@ -695,21 +749,31 @@
\unexpanded\def\publ_cite_tags_options[#1]%
{\strictdoifnextoptionalelse{\publ_cite_tags_options_indeed{#1}}{\publ_cite_tags_indeed{#1}}}
+% \unexpanded\def\publ_cite_tags_options_indeed#1[#2]%
+% {\edef\currentbtxcitetag{#2}%
+% \doifassignmentelse{#1}
+% {\publ_cite_tags_settings_indeed{#1}}
+% {\publ_cite_tags_variants_indeed{#1}}}
+
\unexpanded\def\publ_cite_tags_options_indeed#1[#2]%
{\edef\currentbtxcitetag{#2}%
- \doifassignmentelse{#1}
- {\publ_cite_tags_settings_indeed{#1}}
- {\publ_cite_tags_variants_indeed{#1}}}
+ \doifassignmentelse{#1}\publ_cite_tags_settings_indeed\publ_cite_tags_variants_indeed{#1}}
\def\publ_cite_tags_settings_indeed#1%
{\letinteractionparameter\c!style\empty
%\letinteractionparameter\c!color\empty
- \getdummyparameters[\c!alternative=,\c!extras=,#1]%
+ \letdummyparameter\c!before \empty
+ \letdummyparameter\c!after \empty
+ \letdummyparameter\c!extras \empty
+ \letdummyparameter\c!alternative\empty
+ \getdummyparameters[#1]%
\edef\p_alternative{\dummyparameter\c!alternative}%
- \ifx\p_alternative\empty \else
+ \ifx\p_alternative\empty
+ \edef\currentbtxcitevariant{\btxcitevariantparameter\c!alternative}%
+ \else
\let\currentbtxcitevariant\p_alternative
\fi
- \setupcurrentbtxcitevariantparameters[#1]%
+ \setupcurrentbtxcitevariant[#1]%
\edef\p_extras{\dummyparameter\c!extras}%
\ifx\p_extras\empty \else
\edef\p_right{\btxcitevariantparameter\c!right}%
@@ -717,45 +781,53 @@
\setexpandedbtxcitevariantparameter\p_right{\p_extras\p_right}%
\fi
\fi
+ \edef\p_before{\dummyparameter\c!before}%
+ \edef\p_after {\dummyparameter\c!after}%
+ \ifx\p_before\empty \else
+ \p_before
+ \space
+ \fi
\publ_cite_variant
+ \ifx\p_after\empty \else
+ \optionalspace
+ \p_after
+ \fi
\endgroup}
\def\publ_cite_tags_variants_indeed#1%
{\letinteractionparameter\c!style\empty
\edef\currentbtxcitevariant{#1}%
+ \the\everysetupbtxciteplacement
\publ_cite_variant
\endgroup}
\newconditional\btxcitecompress
\def\publ_cite_variant
- {\edef\p_compress{\btxcitevariantparameter\c!compress}%
- % \ifx\p_compress\v!no
- % \setfalse\btxcitecompress
- % \else
- % \settrue\btxcitecompress
- % \fi
- \begingroup
+ {\begingroup
\settrue\c_publ_cite_write
\publ_cite_handle_variant_indeed[\currentbtxcitetag]}
\unexpanded\def\publ_cite_handle_variant#1%
{\begingroup
- \the\everysetupbtxciteplacement
\edef\currentbtxcitevariant{#1}%
+ \the\everysetupbtxciteplacement
\dosingleargument\publ_cite_handle_variant_indeed}
\def\publ_cite_handle_variant_indeed[#1]%
{\usebtxcitevariantstyleandcolor\c!style\c!color
\letbtxcitevariantparameter\c!alternative\currentbtxcitevariant
- \ctxcommand{btxhandlecite(%
- "\currentbtxdataset",%
- "#1",%
- \iftrialtypesetting false\else true\fi,%
- "\currentbtxcitevariant",%
- "\btxcitevariantparameter\c!sorttype",%
- "\btxcitevariantparameter\c!setups"%
- )}%
+ \btxcitevariantparameter\v!left
+ \ctxcommand{btxhandlecite{%
+ dataset = "\currentbtxdataset",%
+ reference = "#1",%
+ markentry = \iftrialtypesetting false\else true\fi,%
+ variant = "\currentbtxcitevariant",%
+ sorttype = "\btxcitevariantparameter\c!sorttype",%
+ compress = "\btxcitevariantparameter\c!compress",%
+ author = "\btxcitevariantparameter\c!author",%
+ }}%
+ \btxcitevariantparameter\v!right
\endgroup}
\unexpanded\def\btxcitation
@@ -775,9 +847,16 @@
\unexpanded\def\publ_cite_no[#1]%
{\iftrialtypesetting \else
- \ctxcommand{btxhandlenocite("\currentbtxdataset","#1",true)}%
+ \ctxcommand{btxhandlecite{%
+ dataset = "\currentbtxdataset",%
+ reference = "#1",%
+ markentry = \iftrialtypesetting false\else true\fi,%
+ }}%
\fi}
+\unexpanded\def\btxmissing#1%
+ {{\tttf<#1>}}
+
%D Compatibility:
\let\cite \btxcite
@@ -788,8 +867,42 @@
%D Cite helpers:
-\unexpanded\def\btxcitevariant#1%
- {\ctxcommand{btxcitevariant("\currentbtxdataset","\currentbtxblock","\currentbtxtag","#1")}}
+\newconstant\currentbtxconcat
+
+% \unexpanded\def\btxcitevariant#1%
+% {\ctxcommand{btxcitevariant("\currentbtxdataset","\currentbtxblock","\currentbtxtag","#1")}}
+
+\unexpanded\def\btxcitereset
+ {\let\currentbtxfirst \empty
+ \let\currentbtxsecond \empty
+ \let\currentbtxinternal\empty
+ \let\currentbtxtag \empty
+ \setconstant\currentbtxconcat\zerocount}
+
+\btxcitereset
+
+\unexpanded\def\btxcitesetup#1%
+ {\directsetup{btx:cite:#1}%
+ \btxcitereset}
+
+\unexpanded\def\btxsetfirst {\def\currentbtxfirst}
+\unexpanded\def\btxsetsecond {\def\currentbtxsecond}
+\unexpanded\def\btxsettag {\def\currentbtxtag}
+\unexpanded\def\btxsetinternal{\def\currentbtxinternal}
+\unexpanded\def\btxsetconcat#1{\setconstant\currentbtxconcat#1\relax}
+
+\unexpanded\def\btxsetreference#1#2% #3#4%
+ {\strc_references_direct_full_user{btxset="#1",btxref="#2"}}
+
+\unexpanded\def\btxstartsubcite#1%
+ {\bgroup
+ \btxcitereset
+ \def\currentbtxcitevariant{#1}%
+ \btxcitevariantparameter\c!left}
+
+\unexpanded\def\btxstopsubcite
+ {\btxcitevariantparameter\c!right
+ \egroup}
%D List helpers:
@@ -816,6 +929,8 @@
\loadbtxdefinitionfile[\btxrenderingparameter\c!alternative]
\to \everysetupbtxrendering
+\stopcontextdefinitioncode
+
%D Defaults:
\setupbtxrendering
@@ -842,9 +957,12 @@
\c!otherstext={ et al.},
\c!pubsep={, },
\c!lastpubsep={ and },
+ \c!finalpubsep={ and },
\c!compress=\v!no,
\c!inbetween={ },
+ \c!range=\endash,
\c!left=,
+ \c!middle=,
\c!right=]
\definebtxcitevariant
@@ -855,6 +973,11 @@
\c!right={)}]
\definebtxcitevariant
+ [authornum]
+ [author]
+ [\c!inbetween={ }]
+
+\definebtxcitevariant
[authoryear]
[\c!compress=\v!yes,
\c!inbetween={, },
@@ -867,62 +990,90 @@
[authoryear]
\definebtxcitevariant
+ [author:num]
[authornum]
- [author]
[\c!left={[},
\c!right={]}]
\definebtxcitevariant
+ [author:year]
+ [authoryear]
+ [\c!left={(},
+ \c!right={)}]
+
+\definebtxcitevariant
+ [author:years]
+ [authoryears]
+ [\c!left=,
+ \c!right=]
+
+\definebtxcitevariant
[year]
[\c!left={(},
+ \c!middle={, }, % is middle used?
\c!right={)}]
\definebtxcitevariant
- [key]
+ [tag]
[\c!left={[},
+ \c!middle={, },
\c!right={]}]
\definebtxcitevariant
+ [key]
+ [tag]
+
+\definebtxcitevariant
[serial]
[\c!left={[},
+ \c!middle={, },
\c!right={]}]
\definebtxcitevariant
[page]
[\c!left={[},
+ \c!middle={, },
\c!right={]}]
\definebtxcitevariant
[short]
[\c!left={[},
+ \c!middle={, },
\c!right={]}]
\definebtxcitevariant
- [type]
+ [category]
[\c!left={[},
+ \c!middle={, },
\c!right={]}]
\definebtxcitevariant
+ [type]
+ [category]
+
+\definebtxcitevariant
[doi]
[\c!left={[},
+ \c!middle={, },
\c!right={]}]
\definebtxcitevariant
[url]
[\c!left={[},
+ \c!middle={, },
\c!right={]}]
\definebtxcitevariant
[page]
[\c!left=,
- \c!right=,
- \c!inbetween=\endash]
+ \c!middle={, },
+ \c!right=]
\definebtxcitevariant
[num]
[\c!compress=\v!yes,
- \c!inbetween={--},
\c!left={[},
+ \c!middle={, },
\c!right={]}]
\setupbtxlistvariant
@@ -953,6 +1104,11 @@
[artauthor]
[author]
+\setupbtxcitevariant
+ [\c!author =\btxlistvariantparameter\c!author,
+ \c!etallimit =\btxlistvariantparameter\c!etallimit,
+ \c!etaldisplay =\btxlistvariantparameter\c!etaldisplay]
+
% Do we want these in the format? Loading them delayed is somewhat messy.
\loadbtxdefinitionfile[apa]
diff --git a/Master/texmf-dist/tex/context/base/s-math-coverage.lua b/Master/texmf-dist/tex/context/base/s-math-coverage.lua
index 5f1c7cc5a17..56880f76db0 100644
--- a/Master/texmf-dist/tex/context/base/s-math-coverage.lua
+++ b/Master/texmf-dist/tex/context/base/s-math-coverage.lua
@@ -6,76 +6,37 @@ if not modules then modules = { } end modules ['s-math-coverage'] = {
license = "see context related readme files"
}
-moduledata.math = moduledata.math or { }
-moduledata.math.coverage = moduledata.math.coverage or { }
-
local utfchar, utfbyte = utf.char, utf.byte
local formatters, lower = string.formatters, string.lower
local concat = table.concat
-local context = context
-local NC, NR, HL = context.NC, context.NR, context.HL
-local char, getglyph, bold = context.char, context.getglyph, context.bold
+moduledata.math = moduledata.math or { }
+moduledata.math.coverage = moduledata.math.coverage or { }
-local ucgreek = {
- 0x0391, 0x0392, 0x0393, 0x0394, 0x0395,
- 0x0396, 0x0397, 0x0398, 0x0399, 0x039A,
- 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
- 0x03A0, 0x03A1, 0x03A3, 0x03A4, 0x03A5,
- 0x03A6, 0x03A7, 0x03A8, 0x03A9
-}
+local context = context
-local lcgreek = {
- 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5,
- 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA,
- 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
- 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4,
- 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9,
- 0x03D1, 0x03D5, 0x03D6, 0x03F0, 0x03F1,
- 0x03F4, 0x03F5
-}
+local ctx_NC = context.NC
+local ctx_NR = context.NR
+local ctx_HL = context.HL
-local ucletters = {
- 0x00041, 0x00042, 0x00043, 0x00044, 0x00045,
- 0x00046, 0x00047, 0x00048, 0x00049, 0x0004A,
- 0x0004B, 0x0004C, 0x0004D, 0x0004E, 0x0004F,
- 0x00050, 0x00051, 0x00052, 0x00053, 0x00054,
- 0x00055, 0x00056, 0x00057, 0x00058, 0x00059,
- 0x0005A,
-}
+local ctx_rawmathematics = context.formatted.rawmathematics
+local ctx_mathematics = context.formatted.mathematics
+local ctx_startimath = context.startimath
+local ctx_stopimath = context.stopimath
+local ctx_setmathattribute = context.setmathattribute
+local ctx_underbar = context.underbar
+local ctx_getglyph = context.getglyph
-local lcletters = {
- 0x00061, 0x00062, 0x00063, 0x00064, 0x00065,
- 0x00066, 0x00067, 0x00068, 0x00069, 0x0006A,
- 0x0006B, 0x0006C, 0x0006D, 0x0006E, 0x0006F,
- 0x00070, 0x00071, 0x00072, 0x00073, 0x00074,
- 0x00075, 0x00076, 0x00077, 0x00078, 0x00079,
- 0x0007A,
-}
+local styles = mathematics.styles
+local alternatives = mathematics.alternatives
+local charactersets = mathematics.charactersets
-local digits = {
- 0x00030, 0x00031, 0x00032, 0x00033, 0x00034,
- 0x00035, 0x00036, 0x00037, 0x00038, 0x00039,
-}
-
-local styles = {
- "regular", "sansserif", "monospaced", "fraktur", "script", "blackboard"
-}
+local getboth = mathematics.getboth
+local remapalphabets = mathematics.remapalphabets
-local alternatives = {
- "normal", "bold", "italic", "bolditalic"
-}
-
-local alphabets = {
- ucletters, lcletters, ucgreek, lcgreek, digits,
-}
-
-local getboth = mathematics.getboth
-local remapalphabets = mathematics.remapalphabets
-
-local chardata = characters.data
-local superscripts = characters.superscripts
-local subscripts = characters.subscripts
+local chardata = characters.data
+local superscripts = characters.superscripts
+local subscripts = characters.subscripts
context.writestatus("math coverage","underline: not remapped")
@@ -85,37 +46,37 @@ function moduledata.math.coverage.showalphabets()
local style = styles[i]
for i=1,#alternatives do
local alternative = alternatives[i]
- for i=1,#alphabets do
- local alphabet = alphabets[i]
- NC()
+ for i=1,#charactersets do
+ local alphabet = charactersets[i]
+ ctx_NC()
if i == 1 then
context("%s %s",style,alternative)
end
- NC()
- context.startimath()
- context.setmathattribute(style,alternative)
+ ctx_NC()
+ ctx_startimath()
+ ctx_setmathattribute(style,alternative)
for i=1,#alphabet do
local letter = alphabet[i]
local id = getboth(style,alternative)
local unicode = remapalphabets(letter,id)
if not unicode then
- context.underbar(utfchar(letter))
+ ctx_underbar(utfchar(letter))
elseif unicode == letter then
context(utfchar(unicode))
else
context(utfchar(unicode))
end
end
- context.stopimath()
- NC()
+ ctx_stopimath()
+ ctx_NC()
local first = alphabet[1]
local last = alphabet[#alphabet]
local id = getboth(style,alternative)
local f_unicode = remapalphabets(first,id) or utfbyte(first)
local l_unicode = remapalphabets(last,id) or utfbyte(last)
context("%05X - %05X",f_unicode,l_unicode)
- NC()
- NR()
+ ctx_NC()
+ ctx_NR()
end
end
end
@@ -126,15 +87,15 @@ function moduledata.math.coverage.showcharacters()
context.startmixedcolumns()
context.setupalign { "nothyphenated" }
context.starttabulate { "|T|i2|Tpl|" }
- for u, d in table.sortedpairs(chardata) do
+ for u, d in table.sortedhash(chardata) do
local mathclass = d.mathclass
local mathspec = d.mathspec
if mathclass or mathspec then
- NC()
+ ctx_NC()
context("%05X",u)
- NC()
- getglyph("MathRoman",u)
- NC()
+ ctx_NC()
+ ctx_getglyph("MathRoman",u)
+ ctx_NC()
if mathspec then
local t = { }
for i=1,#mathspec do
@@ -145,8 +106,8 @@ function moduledata.math.coverage.showcharacters()
else
context(mathclass)
end
- NC()
- NR()
+ ctx_NC()
+ ctx_NR()
end
end
context.stoptabulate()
@@ -157,26 +118,33 @@ end
function moduledata.math.coverage.showscripts()
context.starttabulate { "|cT|c|cT|c|c|c|l|" }
- for k, v in table.sortedpairs(table.merged(superscripts,subscripts)) do
+ for k, v in table.sortedhash(table.merged(superscripts,subscripts)) do
local ck = utfchar(k)
local cv = utfchar(v)
local ss = superscripts[k] and "^" or "_"
- NC()
- context("%05X",k)
- NC()
- context(ck)
- NC()
- context("%05X",v)
- NC()
- context(cv)
- NC()
- context.formatted.rawmathematics("x%s = x%s%s",ck,ss,cv)
- NC()
- context.formatted.mathematics("x%s = x%s%s",ck,ss,cv)
- NC()
- context(lower(chardata[k].description))
- NC()
- NR()
+ ctx_NC() context("%05X",k)
+ ctx_NC() context(ck)
+ ctx_NC() context("%05X",v)
+ ctx_NC() context(cv)
+ ctx_NC() ctx_rawmathematics("x%s = x%s%s",ck,ss,cv)
+ ctx_NC() ctx_mathematics("x%s = x%s%s",ck,ss,cv)
+ ctx_NC() context(lower(chardata[k].description))
+ ctx_NC() ctx_NR()
+ end
+ context.stoptabulate()
+end
+
+-- Handy too.
+
+function moduledata.math.coverage.showbold()
+ context.starttabulate { "|lT|cm|lT|cm|lT|" }
+ for k, v in table.sortedhash(mathematics.boldmap) do
+ ctx_NC() context("%U",k)
+ ctx_NC() context("%c",k)
+ ctx_NC() context("%U",v)
+ ctx_NC() context("%c",v)
+ ctx_NC() context(chardata[k].description)
+ ctx_NC() ctx_NR()
end
context.stoptabulate()
end
diff --git a/Master/texmf-dist/tex/context/base/s-math-coverage.mkiv b/Master/texmf-dist/tex/context/base/s-math-coverage.mkiv
index d68ffe58751..9f084b2841c 100644
--- a/Master/texmf-dist/tex/context/base/s-math-coverage.mkiv
+++ b/Master/texmf-dist/tex/context/base/s-math-coverage.mkiv
@@ -18,6 +18,7 @@
\installmodulecommandluasingle \showmathalphabets {moduledata.math.coverage.showalphabets}
\installmodulecommandluasingle \showmathcharacters {moduledata.math.coverage.showcharacters}
\installmodulecommandluasingle \showmathscripts {moduledata.math.coverage.showscripts}
+\installmodulecommandluasingle \showmathbold {moduledata.math.coverage.showbold}
\stopmodule
@@ -30,5 +31,6 @@
\showmathalphabets \page
\showmathcharacters \page
\showmathscripts \page
+ \showmathbold \page
\stoptext
diff --git a/Master/texmf-dist/tex/context/base/spac-chr.lua b/Master/texmf-dist/tex/context/base/spac-chr.lua
index 1abba350ad8..5b3a15478ce 100644
--- a/Master/texmf-dist/tex/context/base/spac-chr.lua
+++ b/Master/texmf-dist/tex/context/base/spac-chr.lua
@@ -39,6 +39,7 @@ local setattr = nuts.setattr
local getfont = nuts.getfont
local getchar = nuts.getchar
+local insert_node_before = nuts.insert_before
local insert_node_after = nuts.insert_after
local remove_node = nuts.remove
local copy_node_list = nuts.copy_list
@@ -58,6 +59,7 @@ local glue_code = nodecodes.glue
local space_skip_code = skipcodes["spaceskip"]
local chardata = characters.data
+local is_punctuation = characters.is_punctuation
local typesetters = typesetters
@@ -162,6 +164,18 @@ local methods = {
-- The next one uses an attribute assigned to the character but still we
-- don't have the 'local' value.
+ [0x001F] = function(head,current)
+ local next = getnext(current)
+ if next and getid(next) == glyph_code then
+ local char = getchar(next)
+ head, current = remove_node(head,current,true)
+ if not is_punctuation[char] then
+ local p = fontparameters[getfont(next)]
+ head, current = insert_node_before(head,current,new_glue(p.space,p.space_stretch,p.space_shrink))
+ end
+ end
+ end,
+
[0x00A0] = function(head,current) -- nbsp
local next = getnext(current)
if next and getid(next) == glyph_code then
diff --git a/Master/texmf-dist/tex/context/base/spac-chr.mkiv b/Master/texmf-dist/tex/context/base/spac-chr.mkiv
index 54a25be34a8..f9dc6e16b5f 100644
--- a/Master/texmf-dist/tex/context/base/spac-chr.mkiv
+++ b/Master/texmf-dist/tex/context/base/spac-chr.mkiv
@@ -78,6 +78,8 @@
\let\zwnj\zerowidthnonjoiner
\let\zwj \zerowidthjoiner
+\chardef\optionalspace"1F % will be space unless before punctuation
+
% Shortcuts:
% unexpanded as otherwise we need to intercept / cleanup a lot
diff --git a/Master/texmf-dist/tex/context/base/status-files.pdf b/Master/texmf-dist/tex/context/base/status-files.pdf
index a4381c06d75..7efcee99719 100644
--- a/Master/texmf-dist/tex/context/base/status-files.pdf
+++ b/Master/texmf-dist/tex/context/base/status-files.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/status-lua.pdf b/Master/texmf-dist/tex/context/base/status-lua.pdf
index ad8475aedaa..ea3539ae7c5 100644
--- a/Master/texmf-dist/tex/context/base/status-lua.pdf
+++ b/Master/texmf-dist/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/base/strc-ref.lua b/Master/texmf-dist/tex/context/base/strc-ref.lua
index 0c8bb6e53e8..3f2c0608d2a 100644
--- a/Master/texmf-dist/tex/context/base/strc-ref.lua
+++ b/Master/texmf-dist/tex/context/base/strc-ref.lua
@@ -158,7 +158,7 @@ local function initializer() -- can we use a tobesaved as metatable for collecte
local r = data.references
local i = r.internal
if i then
- internals[i] = c
+ internals[i] = data
usedinternals[i] = r.used
end
end
diff --git a/Master/texmf-dist/tex/context/base/strc-ref.mkvi b/Master/texmf-dist/tex/context/base/strc-ref.mkvi
index 76d79b80221..359bb4a76ca 100644
--- a/Master/texmf-dist/tex/context/base/strc-ref.mkvi
+++ b/Master/texmf-dist/tex/context/base/strc-ref.mkvi
@@ -263,10 +263,11 @@
\lastdestinationattribute\attributeunsetvalue
\fi}
-\unexpanded\def\strc_references_direct_full#labels#text%
+\unexpanded\def\strc_references_direct_full_user#user#labels#text%
{\ifreferencing
\strc_references_start_destination_nodes
-\setnextinternalreference
+ \setnextinternalreference
+ \edef\m_strc_references_user{#user}%
\ctxcommand{setreferenceattribute("\s!full", "\referenceprefix","#labels",
{
references = {
@@ -280,6 +281,11 @@
entries = {
text = \!!bs#text\!!es
},
+ \ifx\m_strc_references_user\empty \else
+ userdata = {
+ \m_strc_references_user
+ }
+ \fi
},"\interactionparameter\c!focus")
}%
\strc_references_stop_destination_nodes
@@ -297,7 +303,10 @@
\prewordbreak % new
\fi}
-\let\dodirectfullreference\strc_references_direct_full % for at lua end
+\unexpanded\def\strc_references_direct_full
+ {\strc_references_direct_full_user\empty}
+
+\let\dodirectfullreference\strc_references_direct_full % for at lua end (no longer)
\def\strc_references_set_page_only_destination_box_attribute#cs#labels%
{\strc_references_set_page_only_destination_attribute{#labels}%
diff --git a/Master/texmf-dist/tex/context/base/tabl-ntb.mkiv b/Master/texmf-dist/tex/context/base/tabl-ntb.mkiv
index 3734e564768..a7a7ae50bc7 100644
--- a/Master/texmf-dist/tex/context/base/tabl-ntb.mkiv
+++ b/Master/texmf-dist/tex/context/base/tabl-ntb.mkiv
@@ -1255,12 +1255,29 @@
\fi
\dostoptagged} % right spot
+% \def\tabl_ntb_cell_finalize
+% {\doifnotinset\localwidth{\v!fit,\v!broad}% user set
+% {\scratchdimen\tabl_ntb_get_aut\c_tabl_ntb_col\relax
+% \ifdim\localwidth>\scratchdimen
+% \tabl_ntb_set_aut\c_tabl_ntb_col{\the\dimexpr\localwidth}%
+% \fi}}
+
\def\tabl_ntb_cell_finalize
- {\doifnotinset\localwidth{\v!fit,\v!broad}% user set
- {\scratchdimen\tabl_ntb_get_aut\c_tabl_ntb_col\relax
- \ifdim\localwidth>\scratchdimen
- \tabl_ntb_set_aut\c_tabl_ntb_col{\the\dimexpr\localwidth}%
- \fi}}
+ {\ifx\localwidth\v!fit
+ % nothing
+ \else\ifx\localwidth\v!broad
+ % nothing
+ \else\ifx\localwidth\empty
+ % nothing (safeguard)
+ \else
+ \tabl_ntb_cell_finalize_indeed
+ \fi\fi\fi}
+
+\def\tabl_ntb_cell_finalize_indeed
+ {\scratchdimen\tabl_ntb_get_aut\c_tabl_ntb_col\relax
+ \ifdim\localwidth>\scratchdimen
+ \tabl_ntb_set_aut\c_tabl_ntb_col{\the\dimexpr\localwidth}%
+ \fi}
\def\tabl_ntb_table_stop
{\setbox\scratchbox\hbox
diff --git a/Master/texmf-dist/tex/context/base/tabl-tbl.mkiv b/Master/texmf-dist/tex/context/base/tabl-tbl.mkiv
index d4d22af9716..c25d61741f4 100644
--- a/Master/texmf-dist/tex/context/base/tabl-tbl.mkiv
+++ b/Master/texmf-dist/tex/context/base/tabl-tbl.mkiv
@@ -1066,6 +1066,9 @@
\def\tabl_tabulate_insert_content
{\tabl_tabulate_insert_head
+ \ifcase\c_tabl_tabulate_repeathead \else
+ \tabulatenoalign{\penalty\zerocount}% added 7/5/2014 WS mail
+ \fi
\tabl_tabulate_insert_body
\tabl_tabulate_insert_foot
\tabl_tabulate_remove_funny_line}
diff --git a/Master/texmf-dist/tex/context/base/trac-deb.lua b/Master/texmf-dist/tex/context/base/trac-deb.lua
index af4f7c643a0..d52399bcf1f 100644
--- a/Master/texmf-dist/tex/context/base/trac-deb.lua
+++ b/Master/texmf-dist/tex/context/base/trac-deb.lua
@@ -130,7 +130,10 @@ function tracers.showlines(filename,linenumber,offset,luaerrorline)
local stop = "\\stopluacode"
local n = linenumber
for i=n,1,-1 do
- if find(lines[i],start) then
+ local line = lines[i]
+ if not line then
+ break
+ elseif find(line,start) then
n = i + luaerrorline - 1
if n <= linenumber then
linenumber = n
@@ -209,7 +212,7 @@ function tracers.printerror(specification)
report_nl()
if luaerrorline then
report("error on line %s in file %s:\n\n%s",linenumber,filename,lastluaerror)
--- report("error on line %s in file %s:\n\n%s",linenumber,filename,lasttexerror)
+ -- report("error on line %s in file %s:\n\n%s",linenumber,filename,lasttexerror)
else
report("error on line %s in file %s: %s",linenumber,filename,lasttexerror)
if tex.show_context then
diff --git a/Master/texmf-dist/tex/context/base/trac-log.lua b/Master/texmf-dist/tex/context/base/trac-log.lua
index 45cc550d491..72f271d9c3c 100644
--- a/Master/texmf-dist/tex/context/base/trac-log.lua
+++ b/Master/texmf-dist/tex/context/base/trac-log.lua
@@ -17,7 +17,7 @@ if not modules then modules = { } end modules ['trac-log'] = {
-- local texio_write_nl = texio.write_nl
-- local texio_write = texio.write
-- local io_write = io.write
-
+--
-- local write_nl = function(target,...)
-- if not io_write then
-- io_write = io.write
@@ -37,7 +37,7 @@ if not modules then modules = { } end modules ['trac-log'] = {
-- io_write(target,...)
-- end
-- end
-
+--
-- local write = function(target,...)
-- if not io_write then
-- io_write = io.write
@@ -54,7 +54,7 @@ if not modules then modules = { } end modules ['trac-log'] = {
-- io_write(target,...)
-- end
-- end
-
+--
-- texio.write = write
-- texio.write_nl = write_nl
--
diff --git a/Master/texmf-dist/tex/context/base/type-imp-cambria.mkiv b/Master/texmf-dist/tex/context/base/type-imp-cambria.mkiv
index 91288b6d0ac..9bfa2ee5c49 100644
--- a/Master/texmf-dist/tex/context/base/type-imp-cambria.mkiv
+++ b/Master/texmf-dist/tex/context/base/type-imp-cambria.mkiv
@@ -11,6 +11,10 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+%D We use Dejavu as it covers wider range of monospaced glyphs.
+
+\loadtypescriptfile[dejavu]
+
\starttypescriptcollection[cambria]
% microsoft: cambria.ttc cambriab.ttf cambriai.ttf cambriaz.ttf
@@ -60,13 +64,13 @@
\starttypescript [cambria,cambria-m,cambria-a]
% any
\definetypeface [cambria] [\s!rm] [\s!serif] [\typescriptone] [\s!default]
- \definetypeface [cambria] [\s!tt] [\s!mono] [modern] [\s!default]
+ \definetypeface [cambria] [\s!tt] [\s!mono] [dejavu] [\s!default]
\definetypeface [cambria] [\s!mm] [\s!math] [\typescriptone] [\s!default]
\stoptypescript
\starttypescript [cambria-x,cambria-y]
% test x
\definetypeface [\typescriptone] [\s!rm] [\s!serif] [cambria] [\s!default]
- \definetypeface [\typescriptone] [\s!tt] [\s!mono] [modern] [\s!default]
+ \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default]
\definetypeface [\typescriptone] [\s!mm] [\s!math] [\typescriptone] [\s!default]
\stoptypescript
diff --git a/Master/texmf-dist/tex/context/base/type-imp-lato.mkiv b/Master/texmf-dist/tex/context/base/type-imp-lato.mkiv
new file mode 100644
index 00000000000..8fb8647fceb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/type-imp-lato.mkiv
@@ -0,0 +1,56 @@
+%D \module
+%D [ file=type-imp-lato,
+%D version=2014.05.02,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Lato fonts,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% hai : hair / lta : italic
+% lig : light / lta : italic
+% reg : regular / lta : italic
+% bol : bold / lta : italic
+% bla : black / lta : italic
+
+\loadtypescriptfile[dejavu]
+\loadtypescriptfile[xits]
+
+\starttypescriptcollection[lato]
+
+ \starttypescript [\s!sans] [lato] [\s!name]
+ \setups[\s!font:\s!fallback:\s!sans]
+ \definefontsynonym [\s!Sans] [\s!file:lato-reg] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBold] [\s!file:lato-bol] [\s!features=\s!default]
+ \definefontsynonym [\s!SansItalic] [\s!file:lato-reglta] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBoldItalic] [\s!file:lato-bollta] [\s!features=\s!default]
+ \stoptypescript
+
+ \starttypescript [\s!sans] [lato-light] [\s!name]
+ \setups[\s!font:\s!fallback:\s!sans]
+ \definefontsynonym [\s!Sans] [\s!file:lato-lig] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBold] [\s!file:lato-reg] [\s!features=\s!default]
+ \definefontsynonym [\s!SansItalic] [\s!file:lato-liglta] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBoldItalic] [\s!file:lato-reglta] [\s!features=\s!default]
+ \stoptypescript
+
+ \starttypescript [\s!sans] [lato-dark] [\s!name]
+ \setups[\s!font:\s!fallback:\s!sans]
+ \definefontsynonym [\s!Sans] [\s!file:lato-bol] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBold] [\s!file:lato-bla] [\s!features=\s!default]
+ \definefontsynonym [\s!SansItalic] [\s!file:lato-bollta] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBoldItalic] [\s!file:lato-blalta] [\s!features=\s!default]
+ \stoptypescript
+
+ \starttypescript[lato,lato-light,lato-dark]
+ \definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default]
+ \definetypeface [\typescriptone] [\s!rm] [\s!serif] [dejavu] [\s!default]
+ \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default]
+ \definetypeface [\typescriptone] [\s!mm] [\s!math] [xits] [\s!default] [\s!rscale=1.2]
+ \stoptypescript
+
+\stoptypescriptcollection
diff --git a/Master/texmf-dist/tex/context/base/util-str.lua b/Master/texmf-dist/tex/context/base/util-str.lua
index 52c48badda8..5609cdf255d 100644
--- a/Master/texmf-dist/tex/context/base/util-str.lua
+++ b/Master/texmf-dist/tex/context/base/util-str.lua
@@ -284,6 +284,7 @@ end
-- octal %...o number
-- string %...s string number
-- float %...f number
+-- checked float %...F number
-- exponential %...e number
-- exponential %...E number
-- autofloat %...g number
@@ -526,7 +527,11 @@ end
local format_F = function(f)
n = n + 1
- return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ if not f or f == "" then
+ return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or (a%s == 1 and '1') or format('%%.9f',a%s))",n,n,n,n)
+ else
+ return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ end
end
local format_g = function(f)
diff --git a/Master/texmf-dist/tex/context/base/x-asciimath.lua b/Master/texmf-dist/tex/context/base/x-asciimath.lua
index 992c37eaebd..87f04b5ff7d 100644
--- a/Master/texmf-dist/tex/context/base/x-asciimath.lua
+++ b/Master/texmf-dist/tex/context/base/x-asciimath.lua
@@ -268,5 +268,7 @@ parser = Cs { "main",
}
-asciimath.reserved = reserved
-asciimath.convert = converted
+asciimath.reserved = reserved
+asciimath.convert = converted
+
+commands.convert = converted
diff --git a/Master/texmf-dist/tex/context/base/x-asciimath.mkiv b/Master/texmf-dist/tex/context/base/x-asciimath.mkiv
index b555115ffc3..fd385671a50 100644
--- a/Master/texmf-dist/tex/context/base/x-asciimath.mkiv
+++ b/Master/texmf-dist/tex/context/base/x-asciimath.mkiv
@@ -64,7 +64,8 @@
\writestatus{asciimath}{beware, this is an experimental (m4all only) module}
-\unexpanded\def\asciimath#1{\ctxmoduleasciimath{convert(\!!bs\detokenize{#1}\!!es,true)}}
+%unexpanded\def\asciimath#1{\ctxmoduleasciimath{convert(\!!bs\detokenize{#1}\!!es,true)}}
+\unexpanded\def\asciimath#1{\ctxcommand{convert(\!!bs\detokenize\expandafter{\normalexpanded{#1}}\!!es,true)}}
\protect
@@ -82,6 +83,7 @@
\asciimath{int_0^1 f(x)dx}
\asciimath{int^1_0 f(x)dx}
\asciimath{a//b}
+\asciimath{a//\alpha}
\asciimath{(a/b)/(d/c)}
\asciimath{((a*b))/(d/c)}
\asciimath{[[a,b],[c,d]]((n),(k))}
diff --git a/Master/texmf-dist/tex/context/base/x-mathml.lua b/Master/texmf-dist/tex/context/base/x-mathml.lua
index baf839ad8ae..15739eec76e 100644
--- a/Master/texmf-dist/tex/context/base/x-mathml.lua
+++ b/Master/texmf-dist/tex/context/base/x-mathml.lua
@@ -758,7 +758,7 @@ function mathml.mtable(root)
local framespacing = at.framespacing or "0pt"
local framespacing = at.framespacing or "-\\ruledlinewidth" -- make this an option
- context.bTABLE { frame = frametypes[frame or "none"] or "off", offset = framespacing }
+ context.bTABLE { frame = frametypes[frame or "none"] or "off", offset = framespacing, background = "" } -- todo: use xtables and definextable
for e in lxml.collected(root,"/(mml:mtr|mml:mlabeledtr)") do
context.bTR()
local at = e.at
diff --git a/Master/texmf-dist/tex/context/fonts/lm-math.lfg b/Master/texmf-dist/tex/context/fonts/lm-math.lfg
index 87c37cd78d9..b8c99697955 100644
--- a/Master/texmf-dist/tex/context/fonts/lm-math.lfg
+++ b/Master/texmf-dist/tex/context/fonts/lm-math.lfg
@@ -231,7 +231,7 @@ local seventeen = {
return {
name = "lm-math",
version = "1.00",
- comment = "Goodies that complement latin modern math.",
+ comment = "Goodies that complement latin modern math (virtual).",
author = "Hans Hagen",
copyright = "ConTeXt development team",
mathematics = {
diff --git a/Master/texmf-dist/tex/context/fonts/lm.lfg b/Master/texmf-dist/tex/context/fonts/lm.lfg
index 8d761471848..546d18defae 100644
--- a/Master/texmf-dist/tex/context/fonts/lm.lfg
+++ b/Master/texmf-dist/tex/context/fonts/lm.lfg
@@ -34,8 +34,19 @@ return {
[0x2213] = { -- ∓
yoffset = -100,
},
- }
- }
+ },
+ },
+-- parameters = {
+-- FractionNumeratorDisplayStyleShiftUp = function(value,target,original)
+-- local o = original.mathparameters.FractionNumeratorDisplayStyleShiftUp
+-- if o > 675 then
+-- o = 600
+-- else
+-- -- probably tuned
+-- end
+-- return o * target.parameters.factor
+-- end,
+-- }
},
filenames = {
["latinmodern-math-regular.otf"] = {
diff --git a/Master/texmf-dist/tex/context/interface/keys-cs.xml b/Master/texmf-dist/tex/context/interface/keys-cs.xml
index 0a0b9b9a639..7053ceed751 100644
--- a/Master/texmf-dist/tex/context/interface/keys-cs.xml
+++ b/Master/texmf-dist/tex/context/interface/keys-cs.xml
@@ -707,6 +707,7 @@
<cd:constant name='file' value='soubor'/>
<cd:constant name='filtercommand' value='filtercommand'/>
<cd:constant name='finalnamesep' value='finalnamesep'/>
+ <cd:constant name='finalpubsep' value='finalpubsep'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='prvnistranka'/>
<cd:constant name='focus' value='zaostreni'/>
diff --git a/Master/texmf-dist/tex/context/interface/keys-de.xml b/Master/texmf-dist/tex/context/interface/keys-de.xml
index 28b21b915d6..7164db6e30b 100644
--- a/Master/texmf-dist/tex/context/interface/keys-de.xml
+++ b/Master/texmf-dist/tex/context/interface/keys-de.xml
@@ -707,6 +707,7 @@
<cd:constant name='file' value='datei'/>
<cd:constant name='filtercommand' value='filtercommand'/>
<cd:constant name='finalnamesep' value='finalnamesep'/>
+ <cd:constant name='finalpubsep' value='finalpubsep'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='ersteseite'/>
<cd:constant name='focus' value='focus'/>
diff --git a/Master/texmf-dist/tex/context/interface/keys-en.xml b/Master/texmf-dist/tex/context/interface/keys-en.xml
index da433cdeec4..354b86d65fd 100644
--- a/Master/texmf-dist/tex/context/interface/keys-en.xml
+++ b/Master/texmf-dist/tex/context/interface/keys-en.xml
@@ -707,6 +707,7 @@
<cd:constant name='file' value='file'/>
<cd:constant name='filtercommand' value='filtercommand'/>
<cd:constant name='finalnamesep' value='finalnamesep'/>
+ <cd:constant name='finalpubsep' value='finalpubsep'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='firstpage'/>
<cd:constant name='focus' value='focus'/>
diff --git a/Master/texmf-dist/tex/context/interface/keys-fr.xml b/Master/texmf-dist/tex/context/interface/keys-fr.xml
index 6a8eaa9c557..0e4f9e51671 100644
--- a/Master/texmf-dist/tex/context/interface/keys-fr.xml
+++ b/Master/texmf-dist/tex/context/interface/keys-fr.xml
@@ -707,6 +707,7 @@
<cd:constant name='file' value='fichier'/>
<cd:constant name='filtercommand' value='filtercommand'/>
<cd:constant name='finalnamesep' value='finalnamesep'/>
+ <cd:constant name='finalpubsep' value='finalpubsep'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='premierepage'/>
<cd:constant name='focus' value='focus'/>
diff --git a/Master/texmf-dist/tex/context/interface/keys-it.xml b/Master/texmf-dist/tex/context/interface/keys-it.xml
index c7c9963189d..afc33eb225d 100644
--- a/Master/texmf-dist/tex/context/interface/keys-it.xml
+++ b/Master/texmf-dist/tex/context/interface/keys-it.xml
@@ -707,6 +707,7 @@
<cd:constant name='file' value='file'/>
<cd:constant name='filtercommand' value='filtercommand'/>
<cd:constant name='finalnamesep' value='finalnamesep'/>
+ <cd:constant name='finalpubsep' value='finalpubsep'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='primapagina'/>
<cd:constant name='focus' value='focus'/>
diff --git a/Master/texmf-dist/tex/context/interface/keys-nl.xml b/Master/texmf-dist/tex/context/interface/keys-nl.xml
index c87088a094e..9abfe5d7a90 100644
--- a/Master/texmf-dist/tex/context/interface/keys-nl.xml
+++ b/Master/texmf-dist/tex/context/interface/keys-nl.xml
@@ -707,6 +707,7 @@
<cd:constant name='file' value='file'/>
<cd:constant name='filtercommand' value='filtercommand'/>
<cd:constant name='finalnamesep' value='finalnamesep'/>
+ <cd:constant name='finalpubsep' value='finalpubsep'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='eerstepagina'/>
<cd:constant name='focus' value='focus'/>
diff --git a/Master/texmf-dist/tex/context/interface/keys-pe.xml b/Master/texmf-dist/tex/context/interface/keys-pe.xml
index 8e4d412d50a..517c41ed0d8 100644
--- a/Master/texmf-dist/tex/context/interface/keys-pe.xml
+++ b/Master/texmf-dist/tex/context/interface/keys-pe.xml
@@ -707,6 +707,7 @@
<cd:constant name='file' value='پرونده'/>
<cd:constant name='filtercommand' value='filtercommand'/>
<cd:constant name='finalnamesep' value='finalnamesep'/>
+ <cd:constant name='finalpubsep' value='finalpubsep'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='صفحه‌اول'/>
<cd:constant name='focus' value='تمرکز'/>
diff --git a/Master/texmf-dist/tex/context/interface/keys-ro.xml b/Master/texmf-dist/tex/context/interface/keys-ro.xml
index f9ef01b9fdf..b7f5b2e1904 100644
--- a/Master/texmf-dist/tex/context/interface/keys-ro.xml
+++ b/Master/texmf-dist/tex/context/interface/keys-ro.xml
@@ -707,6 +707,7 @@
<cd:constant name='file' value='fisier'/>
<cd:constant name='filtercommand' value='filtercommand'/>
<cd:constant name='finalnamesep' value='finalnamesep'/>
+ <cd:constant name='finalpubsep' value='finalpubsep'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='primapagina'/>
<cd:constant name='focus' value='focus'/>
diff --git a/Master/texmf-dist/tex/context/patterns/word-xx.lua b/Master/texmf-dist/tex/context/patterns/word-xx.lua
new file mode 100644
index 00000000000..f8b38fe755b
--- /dev/null
+++ b/Master/texmf-dist/tex/context/patterns/word-xx.lua
@@ -0,0 +1,14 @@
+return {
+ ["comment"]="test",
+ ["copyright"]="not relevant",
+ ["language"]="xx",
+ ["lists"]={
+ {
+-- ["data"]="we thrive information in thick worlds because of our marvelous and everyday capacity to select edit single out structure highlight group pair merge harmonize synthesize focus organize condense reduce boil down choose categorize catalog classify list abstract scan look into idealize isolate discriminate distinguish screen pigeonhole pick over sort integrate blend inspect filter lump skip smooth chunk average approximate cluster aggregate outline summarize itemize review dip into flip through browse glance into leaf through skim refine enumerate glean synopsize winnow the wheat from the chaff and separate the sheep from the goats",
+ ["data"]="abstract aggregate and approximate average because blend boil browse capacity catalog categorize chaff choose chunk classify cluster condense dip discriminate distinguish down edit enumerate everyday filter flip focus from glance glean goats group harmonize highlight idealize in information inspect integrate into isolate itemize leaf list look lump marvelous merge of organize our out outline over pair pick pigeonhole reduce refine review scan screen select separate sheep single skim skip smooth sort structure summarize synopsize synthesize the thick thrive through to we wheat winnow worlds",
+ },
+ },
+ ["timestamp"]="2013-05-20 14:15:21",
+ ["version"]="1.00",
+}
+
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-gen.lua b/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-gen.lua
index a304ab6aaa0..c19a49af39f 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-gen.lua
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-basics-gen.lua
@@ -353,3 +353,16 @@ end
function table.setmetatableindex(t,f)
setmetatable(t,{ __index = f })
end
+
+-- helper for plain:
+
+arguments = { }
+
+if arg then
+ for i=1,#arg do
+ local k, v = string.match(arg[i],"^%-%-([^=]+)=?(.-)$")
+ if k and v then
+ arguments[k] = v
+ end
+ end
+end
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-enc.lua b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-enc.lua
index e20c3a03b54..2e1c6a46674 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-enc.lua
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-enc.lua
@@ -11,9 +11,10 @@ if context then
os.exit()
end
-local fonts = fonts
-fonts.encodings = { }
-fonts.encodings.agl = { }
+local fonts = fonts
+fonts.encodings = { }
+fonts.encodings.agl = { }
+fonts.encodings.known = { }
setmetatable(fonts.encodings.agl, { __index = function(t,k)
if k == "unicodes" then
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
index 60083ae2fa0..4dfefd65644 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 05/05/14 22:31:19
+-- merge date : 05/18/14 15:57:13
do -- begin closure to overcome local limits and interference
@@ -125,7 +125,7 @@ local uppercase=R("AZ")
local underscore=P("_")
local hexdigit=digit+lowercase+uppercase
local cr,lf,crlf=P("\r"),P("\n"),P("\r\n")
-local newline=crlf+S("\r\n")
+local newline=P("\r")*(P("\n")+P(true))+P("\n")
local escaped=P("\\")*anything
local squote=P("'")
local dquote=P('"')
@@ -147,8 +147,8 @@ patterns.utfbom_32_le=utfbom_32_le
patterns.utfbom_16_be=utfbom_16_be
patterns.utfbom_16_le=utfbom_16_le
patterns.utfbom_8=utfbom_8
-patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
-patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
+patterns.utf_16_be_nl=P("\000\r\000\n")+P("\000\r")+P("\000\n")
+patterns.utf_16_le_nl=P("\r\000\n\000")+P("\r\000")+P("\n\000")
patterns.utf8one=R("\000\127")
patterns.utf8two=R("\194\223")*utf8next
patterns.utf8three=R("\224\239")*utf8next*utf8next
@@ -2853,7 +2853,11 @@ local format_f=function(f)
end
local format_F=function(f)
n=n+1
- return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ if not f or f=="" then
+ return format("(((a%s > -0.0000000005 and a%s < 0.0000000005) and '0') or (a%s == 1 and '1') or format('%%.9f',a%s))",n,n,n,n)
+ else
+ return format("((a%s == 0 and '0') or (a%s == 1 and '1') or format('%%%sf',a%s))",n,n,f,n)
+ end
end
local format_g=function(f)
n=n+1
@@ -3460,6 +3464,15 @@ end
function table.setmetatableindex(t,f)
setmetatable(t,{ __index=f })
end
+arguments={}
+if arg then
+ for i=1,#arg do
+ local k,v=string.match(arg[i],"^%-%-([^=]+)=?(.-)$")
+ if k and v then
+ arguments[k]=v
+ end
+ end
+end
end -- closure
@@ -4170,6 +4183,7 @@ function constructors.scale(tfmdata,specification)
if changed then
local c=changed[unicode]
if c then
+ local ligatures=character.ligatures
description=descriptions[c] or descriptions[unicode] or character
character=characters[c] or character
index=description.index or c
@@ -4181,6 +4195,9 @@ function constructors.scale(tfmdata,specification)
touni=tounicode[i]
end
end
+ if ligatures and not character.ligatures then
+ character.ligatures=ligatures
+ end
else
description=descriptions[unicode] or character
index=description.index or unicode
@@ -4858,6 +4875,7 @@ end
local fonts=fonts
fonts.encodings={}
fonts.encodings.agl={}
+fonts.encodings.known={}
setmetatable(fonts.encodings.agl,{ __index=function(t,k)
if k=="unicodes" then
texio.write(" <loading (extended) adobe glyph list>")
@@ -8542,13 +8560,14 @@ local function gref(descriptions,n)
return f_unicode(n)
end
elseif n then
- local num,nam={},{}
- for i=2,#n do
+ local num,nam,j={},{},0
+ for i=1,#n do
local ni=n[i]
if tonumber(ni) then
+ j=j+1
local di=descriptions[ni]
- num[i]=f_unicode(ni)
- nam[i]=di and di.name or "-"
+ num[j]=f_unicode(ni)
+ nam[j]=di and di.name or "-"
end
end
return f_unilist(num,nam)
@@ -8631,8 +8650,8 @@ local function finalize_ligatures(tfmdata,ligatures)
local ligature=ligatures[i]
if ligature then
local unicode,lookupdata=ligature[1],ligature[2]
- if trace then
- trace_ligatures_detail("building % a into %a",lookupdata,unicode)
+ if trace_ligatures_detail then
+ report_prepare("building % a into %a",lookupdata,unicode)
end
local size=#lookupdata
local firstcode=lookupdata[1]
@@ -8644,8 +8663,8 @@ local function finalize_ligatures(tfmdata,ligatures)
local firstdata=characters[firstcode]
if not firstdata then
firstcode=private
- if trace then
- trace_ligatures_detail("defining %a as %a",firstname,firstcode)
+ if trace_ligatures_detail then
+ report_prepare("defining %a as %a",firstname,firstcode)
end
unicodes[firstname]=firstcode
firstdata={ intermediate=true,ligatures={} }
@@ -8668,8 +8687,8 @@ local function finalize_ligatures(tfmdata,ligatures)
break
end
end
- if trace then
- trace_ligatures_detail("codes (%a,%a) + (%a,%a) -> %a",firstname,firstcode,secondname,secondcode,target)
+ if trace_ligatures_detail then
+ report_prepare("codes (%a,%a) + (%a,%a) -> %a",firstname,firstcode,secondname,secondcode,target)
end
local firstligs=firstdata.ligatures
if firstligs then
@@ -8680,6 +8699,8 @@ local function finalize_ligatures(tfmdata,ligatures)
firstcode=target
firstname=secondname
end
+ elseif trace_ligatures_detail then
+ report_prepare("no glyph (%a,%a) for building %a",firstname,firstcode,target)
end
if okay then
ligatures[i]=false
@@ -8689,12 +8710,14 @@ local function finalize_ligatures(tfmdata,ligatures)
end
alldone=done==0
end
- if trace then
- for k,v in next,characters do
- if v.ligatures then table.print(v,k) end
+ if trace_ligatures_detail then
+ for k,v in table.sortedhash(characters) do
+ if v.ligatures then
+ table.print(v,k)
+ end
end
end
- tfmdata.resources.private=private
+ resources.private=private
end
end
local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplist)
@@ -8913,7 +8936,7 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
end
changed[unicode]=data
elseif lookuptype=="alternate" then
- local replacement=data[alternate]
+ local replacement=data[alternate]
if replacement then
changed[unicode]=replacement
if trace_alternatives then
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-math.tex b/Master/texmf-dist/tex/generic/context/luatex/luatex-math.tex
index ab304b97486..604b4a1f8d9 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-math.tex
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-math.tex
@@ -19,15 +19,6 @@
% a bunch of fonts:
-\font\tenrm = file:lmroman10-regular.otf:+liga;+kern;+tlig;+trep at 10pt
-\font\sevenrm = file:lmroman7-regular.otf:+liga;+kern;+tlig;+trep at 7pt
-\font\fiverm = file:lmroman5-regular.otf:+liga;+kern;+tlig;+trep at 5pt
-
-\font\tentt = file:lmmono10-regular.otf at 10pt
-\font\tensl = file:lmromanslant10-regular.otf:+liga;+kern;+tlig;+trep at 10pt
-\font\tenit = file:lmroman10-italic.otf:+liga;+kern;+tlig;+trep at 10pt
-\font\tenbi = file:lmroman10-bolditalic.otf:+liga;+kern;+tlig;+trep at 10pt
-
\let \teni = \relax
\let \seveni = \relax
\let \fivei = \relax
@@ -35,19 +26,58 @@
\let \sevensy = \relax
\let \fivesy = \relax
\let \tenex = \relax
-\let \tenbf = \relax
\let \sevenbf = \relax
\let \fivebf = \relax
-\tenrm
+\def\latinmodern
+ {\font\tenrm = file:lmroman10-regular.otf:+liga;+kern;+tlig;+trep at 10pt
+ \font\sevenrm = file:lmroman7-regular.otf:+liga;+kern;+tlig;+trep at 7pt
+ \font\fiverm = file:lmroman5-regular.otf:+liga;+kern;+tlig;+trep at 5pt
+ %
+ \font\tentt = file:lmmono10-regular.otf at 10pt
+ \font\tensl = file:lmromanslant10-regular.otf:+liga;+kern;+tlig;+trep at 10pt
+ \font\tenit = file:lmroman10-italic.otf:+liga;+kern;+tlig;+trep at 10pt
+ \font\tenbf = file:lmroman10-bold.otf:+liga;+kern;+tlig;+trep at 10pt
+ \font\tenbi = file:lmroman10-bolditalic.otf:+liga;+kern;+tlig;+trep at 10pt
+ %
+ \font\mathfonttextupright = file:latinmodern-math.otf:ssty=0;fixmath=yes at 10pt
+ \font\mathfontscriptupright = file:latinmodern-math.otf:ssty=1;fixmath=yes at 7pt
+ \font\mathfontscriptscriptupright = file:latinmodern-math.otf:ssty=2;fixmath=yes at 5pt
+ %
+ \textfont 0 = \mathfonttextupright
+ \scriptfont 0 = \mathfontscriptupright
+ \scriptscriptfont 0 = \mathfontscriptscriptupright
+ %
+ \tenrm}
-\font\mathfonttextupright = file:latinmodern-math.otf:ssty=0;fixmath=yes at 10pt
-\font\mathfontscriptupright = file:latinmodern-math.otf:ssty=1;fixmath=yes at 7pt
-\font\mathfontscriptscriptupright = file:latinmodern-math.otf:ssty=2;fixmath=yes at 5pt
+\def\lucidabright
+ {\font\tenrm = file:lucidabrightot.otf:+liga;+kern;+tlig;+trep at 10pt
+ \font\sevenrm = file:lucidabrightot.otf:+liga;+kern;+tlig;+trep at 7pt
+ \font\fiverm = file:lucidabrightot.otf:+liga;+kern;+tlig;+trep at 5pt
+ %
+ \font\tentt = file:lucidabrightot.otf at 10pt
+ \font\tenit = file:lucidabrightot.otf:+liga;+kern;+tlig;+trep at 10pt
+ \font\tenit = file:lucidabrightot-italic.otf:+liga;+kern;+tlig;+trep at 10pt
+ \font\tenbf = file:lucidabrightot-demi.otf:+liga;+kern;+tlig;+trep at 10pt
+ \font\tenbi = file:lucidabrightot-demiitalic.otf:+liga;+kern;+tlig;+trep at 10pt
+ %
+ \font\mathfonttextupright = file:lucidabrightmathot.otf:ssty=0;fixmath=yes at 10pt
+ \font\mathfontscriptupright = file:lucidabrightmathot.otf:ssty=1;fixmath=yes at 7pt
+ \font\mathfontscriptscriptupright = file:lucidabrightmathot.otf:ssty=2;fixmath=yes at 5pt
+ %
+ \textfont 0 = \mathfonttextupright
+ \scriptfont 0 = \mathfontscriptupright
+ \scriptscriptfont 0 = \mathfontscriptscriptupright
+ %
+ \tenrm}
-\textfont 0 = \mathfonttextupright
-\scriptfont 0 = \mathfontscriptupright
-\scriptscriptfont 0 = \mathfontscriptscriptupright
+\directlua {
+ if arguments["mtx:lucidabright"] then
+ tex.print("\string\\lucidabright")
+ else
+ tex.print("\string\\latinmodern")
+ end
+}
\newtoks\everymathrm
\newtoks\everymathmit
@@ -58,12 +88,12 @@
\newtoks\everymathbi
\newtoks\everymathtt
-\def\rm{\fam0\relax\the\everymathmrm\relax\tenrm\relax}
-\def\it{\fam0\relax\the\everymathit \relax\tenit\relax}
-\def\sl{\fam0\relax\the\everymathsl \relax\tensl\relax}
-\def\bf{\fam0\relax\the\everymathbf \relax\tenbf\relax}
-\def\bi{\fam0\relax\the\everymathbi \relax\tenbi\relax}
-\def\tt{\fam0\relax\the\everymathtt \relax\tentt\relax}
+\def\rm{\fam0\relax\the\everymathrm\relax\tenrm\relax}
+\def\it{\fam0\relax\the\everymathit\relax\tenit\relax}
+\def\sl{\fam0\relax\the\everymathsl\relax\tensl\relax}
+\def\bf{\fam0\relax\the\everymathbf\relax\tenbf\relax}
+\def\bi{\fam0\relax\the\everymathbi\relax\tenbi\relax}
+\def\tt{\fam0\relax\the\everymathtt\relax\tentt\relax}
\let\mit \relax % use names or \Uchar or define a vector
\let\cal \relax % idem, i'm not in the mood for this now
@@ -1799,7 +1829,8 @@
% a few definitions:
-\def\sqrt{\Uroot "0 "221A }
+\def\sqrt {\Uroot "0 "221A{}}
+\def\root#1\of{\Uroot "0 "221A{#1}}
% \skewchar\teni='177 \skewchar\seveni='177 \skewchar\fivei='177
% \skewchar\tensy='60 \skewchar\sevensy='60 \skewchar\fivesy='60
diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-test.tex b/Master/texmf-dist/tex/generic/context/luatex/luatex-test.tex
index fbf8ce3cf2c..b822af66875 100644
--- a/Master/texmf-dist/tex/generic/context/luatex/luatex-test.tex
+++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-test.tex
@@ -84,4 +84,30 @@ $$\sqrt {2} { { {1} \over { {1} \over {x} } } } $$
\cows Hello World!
+% math test
+
+\latinmodern
+
+\def\sqrt{\Uroot "0 "221A{}}
+
+\def\root#1\of{\Uroot "0 "221A{#1}}
+
+Inline $\sqrt{x}{1.2}$ math. % same for $\root n of x$
+
+$\root3\of x$
+
+$\sin{x}$
+
+\lucidabright
+
+\def\sqrt{\Uroot "0 "221A{}}
+
+\def\root#1\of{\Uroot "0 "221A{#1}}
+
+Inline $\sqrt{x}{1.2}$ math. % same for $\root n of x$
+
+$\root3\of x$
+
+$\sin{x}$
+
\end
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index c5de6c99c7b..ff76d7a4784 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -5086,16 +5086,16 @@ sub POSTcontext {
# clean up files Hans wants in his distribution but are confusing or
# problematic in TeX Live.
&SYSTEM ("$MV colors tex/context/colors");
+ &SYSTEM ("$RM -f context/data/texworks/configuration/smart-quotes-modes.txt~");
&SYSTEM ("$RM -rf fonts/truetype/hoekwater/lm/");# lmtypewriter10-regular.ttf
&SYSTEM ("$RM -rf fonts/data/tests/"); # texmfhome.otf
- &SYSTEM ("$RM -rf web2c/"); # context*cnf*, texlive2011cnf.lua
+ &SYSTEM ("$RM -rf web2c/"); # context*cnf*, texlive*cnf.lua
&SYSTEM ("find -name koeiel\* -o -name jmn | xargs rm -rf");
# remove mptopdf files, since they are in a separate package.
chomp (my @mptopdf_files = `tlpfiles mptopdf | sed 's,[^/]*/,,'`);
&SYSTEM ("$RM -f @mptopdf_files ");
&SYSTEM ("$RM doc/context/scripts/mkii/mptopdf.man");
- &SYSTEM ("$RM scripts/context/stubs/mswin/mptopdf.exe");
print "still POST$package - user-level executables\n";
# executables go in both the Master bin dir and the
@@ -5107,8 +5107,8 @@ sub POSTcontext {
my $pkg_subdir = "stubs/unix"; # where hans keeps them
&xchdir ("$DEST/scripts/$package/$pkg_subdir");
my @exec = ();
- for my $exec (qw(context ctxtools luatools
- mtxrun pstopdf texexec texmfstart)) {
+ for my $exec (qw(context contextjit luatools
+ mtxrun mtxrunjit texexec texmfstart)) {
&SYSTEM ("chmod a+x $exec");
&bindirs_symlink ($exec);
&build_scripts_copy ($exec, $pkg_subdir);
diff --git a/Master/tlpkg/tlpsrc/context.tlpsrc b/Master/tlpkg/tlpsrc/context.tlpsrc
index 43d42ad1930..7406be2a960 100644
--- a/Master/tlpkg/tlpsrc/context.tlpsrc
+++ b/Master/tlpkg/tlpsrc/context.tlpsrc
@@ -57,19 +57,17 @@ srcpattern +!d texmf-dist/source/context/third
#
docpattern +!d texmf-dist/doc/generic/tex-virtual-academy-pl/context
docpattern +!d texmf-dist/doc/context/third
-docpattern +f texmf-dist/doc/man/man1/ctxtools.*
docpattern +f texmf-dist/doc/man/man1/luatools.*
-docpattern +f texmf-dist/doc/man/man1/pstopdf.*
docpattern +f texmf-dist/doc/man/man1/texexec.*
docpattern +f texmf-dist/doc/man/man1/texmfstart.*
docpattern +f texmf-dist/doc/man/man1/mtx-*
docpattern +f texmf-dist/doc/man/man1/mtxrun.*
#
binpattern f bin/${ARCH}/context
-binpattern f bin/${ARCH}/ctxtools
+binpattern f bin/${ARCH}/contextjit
binpattern f bin/${ARCH}/luatools
binpattern f bin/${ARCH}/mtxrun
-binpattern f bin/${ARCH}/pstopdf
+binpattern f bin/${ARCH}/mtxrunjit
binpattern f bin/${ARCH}/texexec
binpattern f bin/${ARCH}/texmfstart
binpattern f/win32 bin/win32/mtxrun.lua