summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-11-22 15:35:23 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-11-22 15:35:23 +0100
commit409a95f63883bd3b91699d39645e39a8a761457c (patch)
treee15b7563c06ea0a5a8c2a148f3ef04db5c841f69
parent5b9683a8f29dd473e17502aa1746a6bcc3036fe3 (diff)
downloadcontext-409a95f63883bd3b91699d39645e39a8a761457c.tar.gz
2017-11-22 13:41:00
-rw-r--r--context/data/scite/context/lexers/data/scite-context-data-tex.lua2
-rw-r--r--context/data/scite/context/scite-context-data-tex.properties4
-rw-r--r--context/data/textadept/context/data/scite-context-data-tex.lua2
-rw-r--r--doc/context/documents/general/manuals/pagecolumns.pdfbin0 -> 334360 bytes
-rw-r--r--doc/context/documents/general/manuals/tiptrick.pdfbin47419 -> 47528 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin834408 -> 840821 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin836210 -> 841428 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin839557 -> 845323 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin832459 -> 837455 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin836899 -> 842731 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin829823 -> 833540 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin830937 -> 837864 bytes
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-enhancements.tex10
-rw-r--r--doc/context/sources/general/manuals/pagecolumns/pagecolumns-000.tex72
-rw-r--r--doc/context/sources/general/manuals/pagecolumns/pagecolumns-001.tex24
-rw-r--r--doc/context/sources/general/manuals/pagecolumns/pagecolumns-002.tex79
-rw-r--r--doc/context/sources/general/manuals/pagecolumns/pagecolumns-003.tex53
-rw-r--r--doc/context/sources/general/manuals/pagecolumns/pagecolumns-004.tex54
-rw-r--r--doc/context/sources/general/manuals/pagecolumns/pagecolumns-005.tex52
-rw-r--r--doc/context/sources/general/manuals/pagecolumns/pagecolumns-006.tex45
-rw-r--r--doc/context/sources/general/manuals/pagecolumns/pagecolumns-007.tex70
-rw-r--r--doc/context/sources/general/manuals/pagecolumns/pagecolumns.tex395
-rw-r--r--scripts/context/lua/mtx-interface.lua11
-rw-r--r--scripts/context/lua/mtx-plain.lua3
-rw-r--r--scripts/context/lua/mtx-synctex.lua8
-rw-r--r--scripts/context/lua/mtxrun.lua46
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua46
-rw-r--r--scripts/context/stubs/unix/mtxrun46
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua46
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/core-uti.lua2
-rw-r--r--tex/context/base/mkiv/data-sch.lua4
-rw-r--r--tex/context/base/mkiv/math-ali.mkiv14
-rw-r--r--tex/context/base/mkiv/mtx-context-compare.tex113
-rw-r--r--tex/context/base/mkiv/mult-prm.lua1
-rw-r--r--tex/context/base/mkiv/node-syn.lua6
-rw-r--r--tex/context/base/mkiv/page-brk.mkiv14
-rw-r--r--tex/context/base/mkiv/page-cst.mkiv20
-rw-r--r--tex/context/base/mkiv/page-flt.mkiv19
-rw-r--r--tex/context/base/mkiv/page-ini.mkiv12
-rw-r--r--tex/context/base/mkiv/page-lay.mkiv10
-rw-r--r--tex/context/base/mkiv/page-mix.mkiv9
-rw-r--r--tex/context/base/mkiv/page-mul.mkiv8
-rw-r--r--tex/context/base/mkiv/page-one.mkiv22
-rw-r--r--tex/context/base/mkiv/page-otr.mkvi7
-rw-r--r--tex/context/base/mkiv/page-pcl.mkiv334
-rw-r--r--tex/context/base/mkiv/page-set.mkiv14
-rw-r--r--tex/context/base/mkiv/publ-aut.lua168
-rw-r--r--tex/context/base/mkiv/publ-ini.mkiv3
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25795 -> 25825 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin250550 -> 250644 bytes
-rw-r--r--tex/context/base/mkiv/strc-flt.mkvi6
-rw-r--r--tex/context/base/mkiv/util-lib.lua38
-rw-r--r--tex/context/base/mkiv/util-sql-imp-ffi.lua3
-rw-r--r--tex/context/base/mkiv/util-sql-imp-sqlite.lua3
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin839557 -> 845323 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60775 -> 60775 bytes
-rw-r--r--tex/context/interface/mkiv/i-section.xml188
-rw-r--r--tex/context/modules/common/s-abr-01.tex1
-rw-r--r--tex/context/modules/mkiv/m-scite.mkiv2
-rw-r--r--tex/context/modules/mkiv/x-setups-basics.mkiv103
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
65 files changed, 1619 insertions, 583 deletions
diff --git a/context/data/scite/context/lexers/data/scite-context-data-tex.lua b/context/data/scite/context/lexers/data/scite-context-data-tex.lua
index c9c8734c9..b36cd53b9 100644
--- a/context/data/scite/context/lexers/data/scite-context-data-tex.lua
+++ b/context/data/scite/context/lexers/data/scite-context-data-tex.lua
@@ -1,7 +1,7 @@
return {
["aleph"]={ "Alephminorversion", "Alephrevision", "Alephversion" },
["etex"]={ "botmarks", "clubpenalties", "currentgrouplevel", "currentgrouptype", "currentifbranch", "currentiflevel", "currentiftype", "detokenize", "dimexpr", "displaywidowpenalties", "eTeXVersion", "eTeXminorversion", "eTeXrevision", "eTeXversion", "everyeof", "firstmarks", "fontchardp", "fontcharht", "fontcharic", "fontcharwd", "glueexpr", "glueshrink", "glueshrinkorder", "gluestretch", "gluestretchorder", "gluetomu", "ifcsname", "ifdefined", "iffontchar", "interactionmode", "interlinepenalties", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "readline", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "tracingscantokens", "unexpanded", "unless", "widowpenalties" },
- ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "boxdir", "breakafterdirmode", "catcodetable", "clearmarks", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luaescapestring", "luafunction", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdisplayskipmode", "matheqnogapstep", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathscriptsmode", "mathscriptboxmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "synctex", "tagcode", "textdir", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource" },
+ ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "boxdir", "breakafterdirmode", "catcodetable", "clearmarks", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luaescapestring", "luafunction", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdisplayskipmode", "matheqnogapstep", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathscriptsmode", "mathscriptboxmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource" },
["omega"]={ "Omegaminorversion", "Omegarevision", "Omegaversion" },
["pdftex"]={ "ifpdfabsdim", "ifpdfabsnum", "ifpdfprimitive", "pdfadjustspacing", "pdfannot", "pdfcatalog", "pdfcolorstack", "pdfcolorstackinit", "pdfcompresslevel", "pdfcopyfont", "pdfcreationdate", "pdfdecimaldigits", "pdfdest", "pdfdestmargin", "pdfdraftmode", "pdfeachlinedepth", "pdfeachlineheight", "pdfendlink", "pdfendthread", "pdffirstlineheight", "pdffontattr", "pdffontexpand", "pdffontname", "pdffontobjnum", "pdffontsize", "pdfgamma", "pdfgentounicode", "pdfglyphtounicode", "pdfhorigin", "pdfignoreddimen", "pdfignoreunknownimages", "pdfimageaddfilename", "pdfimageapplygamma", "pdfimagegamma", "pdfimagehicolor", "pdfimageresolution", "pdfincludechars", "pdfinclusioncopyfonts", "pdfinclusionerrorlevel", "pdfinfo", "pdfinfoomitdate", "pdfinsertht", "pdflastannot", "pdflastlinedepth", "pdflastlink", "pdflastobj", "pdflastxform", "pdflastximage", "pdflastximagepages", "pdflastxpos", "pdflastypos", "pdflinkmargin", "pdfliteral", "pdfmapfile", "pdfmapline", "pdfmajorversion", "pdfminorversion", "pdfnames", "pdfnoligatures", "pdfnormaldeviate", "pdfobj", "pdfobjcompresslevel", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" },
["tex"]={ " ", "-", "/", "Uleft", "Umiddle", "Uright", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "boundary", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "closeout", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "csstring", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "firstvalidlanguage", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hoffset", "holdinginserts", "hpack", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "immediate", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noboundary", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "openout", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "protrusionboundary", "radical", "raise", "read", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "special", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tpack", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vpack", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "wordboundary", "write", "xdef", "xleaders", "xspaceskip", "year" },
diff --git a/context/data/scite/context/scite-context-data-tex.properties b/context/data/scite/context/scite-context-data-tex.properties
index 167a21304..4a39200ce 100644
--- a/context/data/scite/context/scite-context-data-tex.properties
+++ b/context/data/scite/context/scite-context-data-tex.properties
@@ -72,8 +72,8 @@ protrudechars pxdimen quitvmode randomseed rightghost \
rightmarginkern rpcode saveboxresource savecatcodetable saveimageresource \
savepos scantextokens setfontid setrandomseed shapemode \
suppressfontnotfounderror suppressifcsnameerror suppresslongerror suppressmathparerror suppressoutererror \
-synctex tagcode textdir toksapp tokspre \
-tracingfonts uniformdeviate useboxresource useimageresource
+suppressprimitiveerror synctex tagcode textdir toksapp \
+tokspre tracingfonts uniformdeviate useboxresource useimageresource
keywordclass.tex.omega=\
Omegaminorversion Omegarevision Omegaversion
diff --git a/context/data/textadept/context/data/scite-context-data-tex.lua b/context/data/textadept/context/data/scite-context-data-tex.lua
index c9c8734c9..b36cd53b9 100644
--- a/context/data/textadept/context/data/scite-context-data-tex.lua
+++ b/context/data/textadept/context/data/scite-context-data-tex.lua
@@ -1,7 +1,7 @@
return {
["aleph"]={ "Alephminorversion", "Alephrevision", "Alephversion" },
["etex"]={ "botmarks", "clubpenalties", "currentgrouplevel", "currentgrouptype", "currentifbranch", "currentiflevel", "currentiftype", "detokenize", "dimexpr", "displaywidowpenalties", "eTeXVersion", "eTeXminorversion", "eTeXrevision", "eTeXversion", "everyeof", "firstmarks", "fontchardp", "fontcharht", "fontcharic", "fontcharwd", "glueexpr", "glueshrink", "glueshrinkorder", "gluestretch", "gluestretchorder", "gluetomu", "ifcsname", "ifdefined", "iffontchar", "interactionmode", "interlinepenalties", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "readline", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "tracingscantokens", "unexpanded", "unless", "widowpenalties" },
- ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "boxdir", "breakafterdirmode", "catcodetable", "clearmarks", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luaescapestring", "luafunction", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdisplayskipmode", "matheqnogapstep", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathscriptsmode", "mathscriptboxmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "synctex", "tagcode", "textdir", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource" },
+ ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "boxdir", "breakafterdirmode", "catcodetable", "clearmarks", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luaescapestring", "luafunction", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdisplayskipmode", "matheqnogapstep", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathscriptsmode", "mathscriptboxmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource" },
["omega"]={ "Omegaminorversion", "Omegarevision", "Omegaversion" },
["pdftex"]={ "ifpdfabsdim", "ifpdfabsnum", "ifpdfprimitive", "pdfadjustspacing", "pdfannot", "pdfcatalog", "pdfcolorstack", "pdfcolorstackinit", "pdfcompresslevel", "pdfcopyfont", "pdfcreationdate", "pdfdecimaldigits", "pdfdest", "pdfdestmargin", "pdfdraftmode", "pdfeachlinedepth", "pdfeachlineheight", "pdfendlink", "pdfendthread", "pdffirstlineheight", "pdffontattr", "pdffontexpand", "pdffontname", "pdffontobjnum", "pdffontsize", "pdfgamma", "pdfgentounicode", "pdfglyphtounicode", "pdfhorigin", "pdfignoreddimen", "pdfignoreunknownimages", "pdfimageaddfilename", "pdfimageapplygamma", "pdfimagegamma", "pdfimagehicolor", "pdfimageresolution", "pdfincludechars", "pdfinclusioncopyfonts", "pdfinclusionerrorlevel", "pdfinfo", "pdfinfoomitdate", "pdfinsertht", "pdflastannot", "pdflastlinedepth", "pdflastlink", "pdflastobj", "pdflastxform", "pdflastximage", "pdflastximagepages", "pdflastxpos", "pdflastypos", "pdflinkmargin", "pdfliteral", "pdfmapfile", "pdfmapline", "pdfmajorversion", "pdfminorversion", "pdfnames", "pdfnoligatures", "pdfnormaldeviate", "pdfobj", "pdfobjcompresslevel", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" },
["tex"]={ " ", "-", "/", "Uleft", "Umiddle", "Uright", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "boundary", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "closeout", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "csstring", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "firstvalidlanguage", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hoffset", "holdinginserts", "hpack", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "immediate", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noboundary", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "openout", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "protrusionboundary", "radical", "raise", "read", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "special", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tpack", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vpack", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "wordboundary", "write", "xdef", "xleaders", "xspaceskip", "year" },
diff --git a/doc/context/documents/general/manuals/pagecolumns.pdf b/doc/context/documents/general/manuals/pagecolumns.pdf
new file mode 100644
index 000000000..a9a1e561b
--- /dev/null
+++ b/doc/context/documents/general/manuals/pagecolumns.pdf
Binary files differ
diff --git a/doc/context/documents/general/manuals/tiptrick.pdf b/doc/context/documents/general/manuals/tiptrick.pdf
index 6455b07f8..55d65029a 100644
--- a/doc/context/documents/general/manuals/tiptrick.pdf
+++ b/doc/context/documents/general/manuals/tiptrick.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index 421bb6fa7..4db161c3e 100644
--- a/doc/context/documents/general/qrcs/setup-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf
index 420b07a80..00872d94d 100644
--- a/doc/context/documents/general/qrcs/setup-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf
index 35b8810b8..4301961ca 100644
--- a/doc/context/documents/general/qrcs/setup-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf
index be181d883..5b68155d3 100644
--- a/doc/context/documents/general/qrcs/setup-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf
index 56914364e..9a631dcb1 100644
--- a/doc/context/documents/general/qrcs/setup-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf
index bcc7963ce..a0fab84fb 100644
--- a/doc/context/documents/general/qrcs/setup-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf
index 431fbba29..0a2c9159d 100644
--- a/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex b/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
index 9557f615b..775d11999 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
@@ -550,6 +550,16 @@ $ x + 1 =
a $
\stoptyping
+\subsection{\type {\suppressprimitiveerror}}
+
+When set to a non|-|zero value the following command will not issue an error:
+
+\starttyping
+\suppressprimitiveerror = 1
+
+\primitive\notaprimitive
+\stoptyping
+
\section {Math}
\subsection{Extensions}
diff --git a/doc/context/sources/general/manuals/pagecolumns/pagecolumns-000.tex b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-000.tex
new file mode 100644
index 000000000..418595aa1
--- /dev/null
+++ b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-000.tex
@@ -0,0 +1,72 @@
+% content=tex
+%
+% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+
+\startenvironment pagecolumns-000
+
+\usemodule[visual,simulate]
+
+\dontcomplain
+
+\useMPlibrary[dum]
+
+\setupbodyfont
+ [palatino]
+
+\setuplayout
+ [grid=yes]
+
+\setuplayout
+ [backspace=20mm,
+ cutspace=15mm,
+ width=middle,
+ height=middle]
+
+\setupsystem
+ [random=1234]
+
+\setuppagenumbering
+ [alternative=doublesided,
+ location=]
+
+\setupheadertexts
+ [pagenumber][right]
+ [left][pagenumber]
+
+\setupfootertexts
+ [\inputfilename]
+
+\setupfooter
+ [color=black,
+ style=\tttf]
+
+\setupheader
+ [color=black,
+ style=\tttf]
+
+\setuptolerance
+ [verytolerant,stretch]
+
+\definecolor[color-3][.5(red,black)]
+\definecolor[color-2][.5(green,black)]
+\definecolor[color-1][.5(blue,black)]
+\definecolor[color-4][.5(white,black)]
+\definecolor[color-5][.5(white,color-4)]
+
+\definecolor[fakerulecolor][white]
+
+\setupcolors
+ [textcolor=white]
+
+\startuniqueMPgraphic{frame}
+ fill OverlayBox withcolor \MPcolor{color-1} ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{contrast}
+ fill OverlayBox withcolor \MPcolor{color-3} ;
+\stopuniqueMPgraphic
+
+\defineoverlay[frame] [\uniqueMPgraphic{frame}]
+\defineoverlay[contrast][\uniqueMPgraphic{contrast}]
+
+\stopenvironment
diff --git a/doc/context/sources/general/manuals/pagecolumns/pagecolumns-001.tex b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-001.tex
new file mode 100644
index 000000000..afdca49aa
--- /dev/null
+++ b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-001.tex
@@ -0,0 +1,24 @@
+% content=tex
+%
+% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+
+\environment pagecolumns-000
+
+\definepagecolumns
+ [example]
+ [n=2]
+
+\setupbackgrounds
+ [text]
+ [background=color,
+ backgroundcolor=color-1]
+
+\starttext
+
+\startpagecolumns[example]
+
+ \dorecurse{20}{\fakewords{100}{200}\par}
+
+\stoppagecolumns
+
+\stoptext
diff --git a/doc/context/sources/general/manuals/pagecolumns/pagecolumns-002.tex b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-002.tex
new file mode 100644
index 000000000..d425d3b82
--- /dev/null
+++ b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-002.tex
@@ -0,0 +1,79 @@
+% content=tex
+%
+% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+
+\environment pagecolumns-000
+
+\definepagecolumns
+ [example]
+ [n=3,
+ distance=\emwidth]
+
+\setupbackgrounds
+ [text]
+ [background=color,
+ backgroundcolor=color-1]
+
+\starttext
+
+\startpagecolumns[example]
+
+\dorecurse {7} {
+ \startplacefigure[location={here,none}]
+ \framed
+ [width=\columnwidth,
+ height=1cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {Here: A.#1}
+ \stopplacefigure
+ \samplefile{tufte}
+ \startplacefigure[location={here,none}]
+ \framed
+ [width=\columnwidth,
+ height=1cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {Here: B.#1}
+ \stopplacefigure
+ \samplefile{tufte}
+ \startplacefigure[location={here,none}]
+ \framed
+ [width=\textwidth,
+ height=1cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {Here: C.#1}
+ \stopplacefigure
+ \startplacefigure[location={here,none}]
+ \framed
+ [width=\measure{twocolumns},
+ height=1cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {Here: D.#1}
+ \stopplacefigure
+ \samplefile{tufte}
+ \startplacefigure[location={force,none}]
+ \framed
+ [width=\columnwidth,
+ height=1cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {Force: E.#1}
+ \stopplacefigure
+}
+
+\dorecurse {7} {
+ \samplefile{tufte}
+ \par
+}
+
+\stoppagecolumns
+
+\stoptext
diff --git a/doc/context/sources/general/manuals/pagecolumns/pagecolumns-003.tex b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-003.tex
new file mode 100644
index 000000000..544458b34
--- /dev/null
+++ b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-003.tex
@@ -0,0 +1,53 @@
+% content=tex
+%
+% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+
+\environment pagecolumns-000
+
+\definepagecolumns
+ [example]
+ [n=3,
+ distance=\emwidth]
+
+\setupbackgrounds
+ [text]
+ [background=color,
+ backgroundcolor=color-1]
+
+\starttext
+
+\startpagecolumns[example]
+
+\dorecurse {7} {
+ \startplacefigure[location={top,none}]
+ \framed
+ [width=\textwidth,
+ height=1cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {A.#1}
+ \stopplacefigure
+ \startplacefigure[location={top,none}]
+ \framed
+ [width=\measure{twocolumns},
+ height=1cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-3]
+ {B.#1}
+ \stopplacefigure
+ \samplefile{tufte}
+ \par
+}
+
+\dorecurse {7} {
+ \samplefile{tufte}
+ \par
+}
+
+\stoppagecolumns
+
+\stoptext
+
+
diff --git a/doc/context/sources/general/manuals/pagecolumns/pagecolumns-004.tex b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-004.tex
new file mode 100644
index 000000000..2144d399b
--- /dev/null
+++ b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-004.tex
@@ -0,0 +1,54 @@
+% content=tex
+%
+% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+
+\environment pagecolumns-000
+
+\definepagecolumns
+ [example]
+ [n=3,
+ distance=\emwidth]
+
+\setupbackgrounds
+ [text]
+ [background=color,
+ backgroundcolor=color-1]
+
+\starttext
+
+\startpagecolumns[example]
+
+\dorecurse {7} {
+
+ \startplacefigure[location={top,none}]
+ \framed
+ [width=1cm,
+ height=1cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {A.#1}
+ \stopplacefigure
+
+ \startplacefigure[location={left,none}]
+ \framed
+ [width=1cm,
+ height=1cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {A.#1}
+ \stopplacefigure
+
+ \samplefile{tufte}
+ \footnote{foo #1.1}
+ \footnote{foo #1.2}
+
+ \par
+}
+
+\stoppagecolumns
+
+\stoptext
+
+
diff --git a/doc/context/sources/general/manuals/pagecolumns/pagecolumns-005.tex b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-005.tex
new file mode 100644
index 000000000..c714879fd
--- /dev/null
+++ b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-005.tex
@@ -0,0 +1,52 @@
+% content=tex
+%
+% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+
+\environment pagecolumns-000
+
+\definepagecolumns
+ [example]
+ [n=3,
+ distance=\emwidth]
+
+\setupbackgrounds
+ [text]
+ [background=color,
+ backgroundcolor=color-1]
+
+\starttext
+
+\startpagecolumns[example]
+
+\dorecurse {7} {
+
+ \startplacefigure[location={top,none}]
+ \framed
+ [width=1cm,
+ height=1cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {A.#1}
+ \stopplacefigure
+
+ \startplacefigure[location={left,none}]
+ \framed
+ [width=1cm,
+ height=6cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {B.#1}
+ \stopplacefigure
+
+ \samplefile{klein}\par
+ \samplefile{klein}\par
+
+}
+
+\stoppagecolumns
+
+\stoptext
+
+
diff --git a/doc/context/sources/general/manuals/pagecolumns/pagecolumns-006.tex b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-006.tex
new file mode 100644
index 000000000..b56470bbc
--- /dev/null
+++ b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-006.tex
@@ -0,0 +1,45 @@
+% content=tex
+%
+% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+
+\environment pagecolumns-000
+
+\definepagecolumns
+ [example]
+ [n=3,
+ distance=\emwidth]
+
+\setupbackgrounds
+ [text]
+ [background=color,
+ backgroundcolor=color-1]
+
+\starttext
+
+\startpagecolumns[example]
+
+\dorecurse {20} {
+ HERE #1.1
+ \samplefile{klein}\column
+ \samplefile{klein}\page
+}
+
+\page[right]
+
+RIGHT PAGE
+
+\page[left]
+
+LEFT PAGE
+
+\dorecurse {20} {
+ HERE #1.2
+ \samplefile{klein}\column
+ \samplefile{klein}\page
+}
+
+\stoppagecolumns
+
+\stoptext
+
+
diff --git a/doc/context/sources/general/manuals/pagecolumns/pagecolumns-007.tex b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-007.tex
new file mode 100644
index 000000000..aefa62588
--- /dev/null
+++ b/doc/context/sources/general/manuals/pagecolumns/pagecolumns-007.tex
@@ -0,0 +1,70 @@
+% content=tex
+%
+% copyright=pragma-ade readme=readme.pdf licence=cc-by-nc-sa
+
+\environment pagecolumns-000
+
+\definepagecolumns[example][n=2,distance=\emwidth]
+
+\setupbackgrounds[text][background=color,backgroundcolor=color-1]
+
+\useMPlibrary[dum]
+
+\starttext
+
+\startbuffer[small]
+ \framed
+ [width=3cm,
+ height=2cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {Small}
+\stopbuffer
+
+\startbuffer[large]
+ \framed
+ [width=12cm,
+ height=6cm,
+ frame=off,
+ background=color,
+ backgroundcolor=color-2]
+ {Large}
+\stopbuffer
+
+\startpagecolumns[example]
+ \samplefile{tufte}\par
+ \startplacefigure[location=here,title=Test]
+ \getbuffer[small]
+ \stopplacefigure
+ \startplacefigure[location=here,title=Test]
+ \getbuffer[small]
+ \stopplacefigure
+ \samplefile{tufte}\par
+\stoppagecolumns
+
+\startpagecolumns[example]
+ \samplefile{tufte}\par
+ \startplacefigure[location=here,title=Test]
+ \getbuffer[small]
+ \stopplacefigure
+ \startplacefigure[location=here,title=Test]
+ \getbuffer[large]
+ \stopplacefigure
+ \samplefile{tufte}\par
+\stoppagecolumns
+
+\startpagecolumns[example]
+ \samplefile{tufte}\par
+ \startplacefigure[location=here,title=Test]
+ \getbuffer[large]
+ \stopplacefigure
+ \startplacefigure[location=here,title=Test]
+ \getbuffer[large]
+ \stopplacefigure
+ \samplefile{tufte}\par
+\stoppagecolumns
+
+\stoptext
+
+
diff --git a/doc/context/sources/general/manuals/pagecolumns/pagecolumns.tex b/doc/context/sources/general/manuals/pagecolumns/pagecolumns.tex
new file mode 100644
index 000000000..40a396e1b
--- /dev/null
+++ b/doc/context/sources/general/manuals/pagecolumns/pagecolumns.tex
@@ -0,0 +1,395 @@
+% macros=mkvi language=uk
+
+\definemeasure[onecolumn] [\columnwidth]
+\definemeasure[twocolumns] [\dimexpr\plustwo \columnwidth+ \columndistance\relax]
+\definemeasure[threecolumns][\dimexpr\plusthree\columnwidth+\plustwo \columndistance\relax]
+\definemeasure[fourcolumns] [\dimexpr\plusfour \columnwidth+\plusthree\columndistance\relax]
+
+\usemodule[abr-04]
+
+\setupbodyfont
+ [dejavu,11pt]
+
+\definefont[QuiteLarge][SansBold sa 2.50]
+\definefont[NotSoLarge][SansBold sa 1.25]
+
+\setuplayout
+ [backspace=.1\paperwidth,
+ topspace=.025\paperheight,
+ header=0.025\paperheight,
+ footer=0.025\paperheight,
+ headerdistance=0.025\paperheight,
+ footerdistance=0.025\paperheight,
+ width=middle,
+ height=middle]
+
+\setuppagenumbering
+ [alternative=doublesided,
+ location=]
+
+\setupwhitespace
+ [line]
+
+\setupblank
+ [line]
+
+\setuptyping
+ [blank=halfline]
+
+\startsetups [pagenumber]
+ \hbox to .2\paperwidth {
+ \hss
+ Page \pagenumber
+ \hss
+ }
+\stopsetups
+
+\setupfooter [before=\vfill,after=\vfill,style=\bf,color=color-4]
+\setupheader [before=\vfill,after=\vfill,style=\bf,color=color-4]
+
+\setupfootertexts [] [\setups{pagenumber}]
+\setupheadertexts [] [\setups{chapterhead}]
+
+\startsetups [chapterhead]
+ \hbox to .2\paperwidth {
+ \hss
+ \getmarking[chapter]
+ \hss
+ }
+\stopsetups
+
+\setuphead
+ [chapter]
+ [header=empty]
+
+\definecolor[color-3][.5(red,black)]
+\definecolor[color-2][.5(green,black)]
+\definecolor[color-1][.5(blue,black)]
+\definecolor[color-4][.5(white,black)]
+\definecolor[color-5][.5(white,color-4)]
+\definecolor[color-6][.2(white,color-4)]
+
+\definecolor[fakerulecolor][white]
+
+\usemodule[typesetting]
+
+\setupcombination
+ [style=mono]
+
+\startuseMPgraphic{page}
+StartPage ;
+ path p ;
+ numeric n; n := PageNumber ;
+ numeric w; w := bbwidth(Page) ;
+ numeric h; h := bbheight(Page) ;
+ def DrawBit (expr bit, dx, dy) =
+ path p ; p := unitsquare xyscaled(w/5,h/40) shifted (dx*w/10,dy*(h-h/40)) ;
+ if n div bit > 0 :
+ n := n - (n div bit)*bit ;
+ fill p withcolor \MPcolor{color-1} ;
+ else :
+ fill p withcolor \MPcolor{color-2} ;
+ fi ;
+ enddef ;
+ DrawBit(32,7,1) ;
+ DrawBit(16,4,1) ;
+ DrawBit( 8,1,1) ;
+ DrawBit( 4,7,0) ;
+ DrawBit( 2,4,0) ;
+ DrawBit( 1,1,0) ;
+StopPage ;
+\stopuseMPgraphic
+
+\startuniqueMPgraphic{frame}
+ fill OverlayBox withcolor \MPcolor{color-5} ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{contrast}
+ fill OverlayBox withcolor \MPcolor{color-4} ;
+\stopuniqueMPgraphic
+
+\defineoverlay[page] [\useMPgraphic{page}]
+\defineoverlay[frame] [\useMPgraphic{frame}]
+\defineoverlay[contrast][\useMPgraphic{contrast}]
+
+\setuphead
+ [chapter]
+ [style=\QuiteLarge,
+ color=color-3,
+ number=no]
+
+\setuplist
+ [chapter]
+ [command=\MyListCommand,
+ alternative=command]
+
+\starttexdefinition unexpanded MyListCommand #1#2#3
+ \snaptogrid
+ [line,-line]\vbox {
+ \tfb
+ \setstrut
+ \strut#2
+ \quad#3
+ }
+\stoptexdefinition
+
+\setupmargindata
+ [style=\tttf,
+ color=color-3]
+
+\starttexdefinition unexpanded ShowFile #1
+ \margintext
+ {\cldcontext{string.match("#1","\letterpercent d+")}}
+ \typefile
+ [range={environment}]
+ {#1}
+\stoptexdefinition
+
+% \typefile[range=4] {...}
+% \typefile[range={=}]{...} % start after comment lines
+
+\starttexdefinition unexpanded ShowEnvironmentFile #1
+ \margintext
+ {\cldcontext{string.match("#1","\letterpercent d+")}}
+ \typefile
+ [range={=startenvironment}]
+ {#1}
+\stoptexdefinition
+
+\startdocument
+
+\startMPpage
+StartPage ;
+ path p ; numeric w, h, d ; picture q ;
+ if true :
+ q := image(draw textext.urt("\ssbf PAGES") withcolor \MPcolor{color-6}) ;
+ else :
+ q := image(draw textext.urt("\ssbf PAGECOLUMNS") withcolor \MPcolor{color-6}) ;
+ fi ;
+ w := bbwidth(Page) ;
+ h := bbheight(Page) ;
+ d := h/100 ;
+ fill Page withcolor \MPcolor{color-1} ;
+ p := Page xysized (w,d) ;
+ for i := 5d step 2d until h-5d :
+ fill p shifted (0,i) withcolor \MPcolor{color-2} ;
+ endfor
+ p := Page xysized(w/10,h) ;
+ for i = 0, .3, .6, .9 :
+ fill p shifted (i*w,0) withcolor \MPcolor{color-1} withtransparency(1,.75) ;
+ endfor ;
+ def do_it(expr sz, sh) =
+ p := Page xysized sz ;
+ fill p shifted sh withcolor \MPcolor{color-3} withtransparency(1,.5) ;
+ draw q xysized (bbwidth(p),bbheight(p)) shifted sh ;
+ enddef ;
+ do_it ((8w/10,13d),(.1w,81d)) ;
+ do_it ((5w/10,13d),(.4w,67d)) ;
+ do_it ((2w/10,17d),(.1w,20d)) ;
+ do_it ((2w/10,15d),(.1w,56d)) ;
+ do_it ((1w/10,10d),(.4w,40d)) ;
+ do_it ((2w/10,13d),(.7w,27d)) ;
+ draw textext.urt("\ssbf Hans Hagen")
+ xysized (5w/10,5d)
+ shifted (.4w,6d)
+ withcolor \MPcolor{color-5} ;
+StopPage ;
+\stopMPpage
+
+\page[empty] \setuppagenumber[number=1]
+
+\setupbackgrounds
+ [page]
+ [background=page]
+
+\starttitle[title=Contents]
+
+ \placelist[chapter]
+
+\stoptitle
+
+\startchapter[title=Introduction]
+
+{\em This manual as well as the mechanism it describes is under construction. Don't
+use page columns in production. Experimenting is of course fine.}
+
+The \TEX\ engine is a progressive typesetter: it takes input and does something
+with it and can do that for quite a while. It can process massive input and
+produce massive output. In that process it never looks back. Now, it is of course
+possible to collect content and delay some aspects of the rendering but to what
+extent that content can be manipulated is limited. In \LUATEX\ one can do a bit
+more but even then the basic typesetting process is mostly linear.
+
+When a text gets typeset there are several properties that play a role:
+
+\startitemize
+\startitem
+ the width of the lines in a paragraph which is the main unit of processing
+\stopitem
+\startitem
+ the target height of what gets output, normally this is the height of the
+ text area, excluding headers and footers
+\stopitem
+\startitem
+ the parameters that determine when the so called output routine gets called,
+ for instance successive broken lines, widow and club penalties
+\stopitem
+\startitem
+ the presence of so called inserts, for instance footnotes or floating bodies
+\stopitem
+\startitem
+ the space between lines and paragraphs
+\stopitem
+\startitem
+ explicitly entered elements or spacing or injected by macros hooked into for
+ instance \type {\everypar}
+\stopitem
+\stopitemize
+
+It is important to realize that \TEX\ has no concept of what a page is. It takes
+input and occasionally hand over the intermediate result to the output routine.
+There decisions are made to flush out a page, either of not with ornaments like
+headers, footers, content left over from previous encounters, footnotes as well
+as maybe specific trickery liked by the backend that targets at some viewer.
+
+That said, so called multi|-|column layouts are {\em not} part of the concepts
+present in \TEX. As far as the engine is concerned there is only one column.
+Among the reasons for not having a native mechanism for columns is that it is
+very hard to come up with a mechanism for splitting them in ways that suits
+everybody. In fact, the amount of control needed would make such a mechanism very
+complex and still limited. You can compare this to math typesetting. That
+subspace has some fixed characteristics if only because otherwise mathematicians
+could not communicate. However, there is some control over spacing and one can to
+some extend intervene. In \LUATEX\ some of the hard coded properties are made
+configureable but still one gets pretty much what the engine considers right.
+Such an approach would not work with columns. In fact, it doesn't even work well
+with tables, for which \TEX\ provides the alignment mechanism: different kind of
+tables demand different solutions, which is why in \CONTEXT\ we have old
+fashioned tables, tabulated tables (that span pages and can contain paragraphs),
+natural as well as extreme tables that resemble \HTML\ tables, line tables and
+framed tables.
+
+So, when we want to support columns we need to write something in \TEX\ lingua
+and for that the \type {\vsplit} operation can be of help. So far we have in
+\CONTEXT\ four mechanisms:
+
+\startitemize[n]
+\startitem
+ the original \MKII\ mechanism that permits mixed single and multi|-|column
+ text flows, with limited support for floating bodies
+\stopitem
+\startitem
+ a reimplementation of mixed columns in a mix of \TEX\ and \LUA, a bit better
+ with balancing and penalties for keeping section heads with the text, but
+ with very limited support for floating bodies; it works ok with grids
+\stopitem
+\startitem
+ a reimplementation of \MKII\ columnsets, a mechanism that is meant for
+ magazine like layouts where floats can span columns and positioned at will:
+ this one assumes relative simple text flows but as a bonus provides spreads;
+ this one is strongly grid based
+\stopitem
+\startitem
+ page based columns, where we use the normal (single column) page builder to
+ collect columns that then get combined into a page: this one is quite robust
+ but one has to keep an eye on floats as we don't span across columns
+ otherwise than in top or bottom floats but, on the other hand, one can use so
+ called side floats; this one is still experimental
+\stopitem
+\stopitemize
+
+Given specific demands one can come up with alternatives but it's very hard to
+combine all demands into one mechanismn simply because anything can be part of
+the text flow. Because it is not much fun to write such mechanisms and because
+no project ever pays for fundamental development, one just has to accept what
+\CONTEXT\ provides, be it with limitations.
+
+The first mechanism is more or less obsolete and replaced by the second. For
+instance, we now use the second one when we have an itemize that demands columns.
+I must admit that I don't like columns and never use them. I was involved in
+projects where the designer wanted columns but in the end the complexity of the
+content didn't work well with that that decision: inconsistent whitespace (due to
+many small sections, lots of images, many tables, math formulas, etc) as well as
+the result having more pages that the single column variant with side and margin
+floats. Occasionally I use columned itemize or columned tables of contents and of
+course registers are often in columns.
+
+One can wonder why columns are supported anyway. It's mostly useful for
+newspapers that have wide pages or journals that have small print. For magazines
+and special layout it's fine too although it can look bad when columns are narrow
+and fancy layout tricks are used. I guess that at some point their use will
+disappear. A document on a phone or tablet is one narrow columns. An internet
+page is one long column. A printed book, given that there will be such items in
+the future is normally typeset in one column. And journals as well as newspapers
+more and more get replaced by media that better serve their purpose. So, apart
+from an intellectual challenge, implementing extensive multi|-|column support is
+a waste of energy. Which is why we can accept limitations.
+
+\stopchapter
+
+\startchapter[title=Just text]
+
+As with the other mechanism you can define a column instance and use that later.
+You can also directly pass the settings with the \type {\startpagecolumns} command
+but best is to define an instance.
+
+\FourPages{pagecolumns-001}
+
+\ShowFile{pagecolumns-001}
+
+We always start at a new page and end on a new one. Footnotes and such don't span
+columns and we don't balance. When the number of columns equals one you get the
+normal routine but with the requested settings.
+
+\stopchapter
+
+\startchapter[title=Floats]
+
+You can have floating bodies in columns. When a float doesn't fit it will be
+flushed at the top of the next page.
+
+\FourPages{pagecolumns-002}
+
+\ShowFile{pagecolumns-002}
+
+\SixPages{pagecolumns-007}
+
+\ShowFile{pagecolumns-007}
+
+Side floats are also supported but we don't treat them special so you get the
+same behaviour as with single column layouts.
+
+\FourPages{pagecolumns-005}
+
+\ShowFile{pagecolumns-005}
+
+\FourPages{pagecolumns-003}
+
+\ShowFile{pagecolumns-003}
+
+
+\stopchapter
+
+\startchapter[title=Footnotes]
+
+Footnotes are supported but we assume sane usage. You can always revert to
+endnotes if needed.
+
+\FourPages{pagecolumns-004}
+
+\ShowFile{pagecolumns-004}
+
+\stopchapter
+
+\startchapter[title=Pages]
+
+Going to a new page happens with \type {\page} and progressing to the next column
+with \type {\column}.
+
+\FourSpread{pagecolumns-006}
+
+\ShowFile{pagecolumns-006}
+
+\stopchapter
+
+\stopdocument
diff --git a/scripts/context/lua/mtx-interface.lua b/scripts/context/lua/mtx-interface.lua
index 50743ae87..7ffdd924e 100644
--- a/scripts/context/lua/mtx-interface.lua
+++ b/scripts/context/lua/mtx-interface.lua
@@ -346,11 +346,14 @@ function scripts.interface.editor(editor,split,forcedinterfaces)
done = false
break
end
- elseif e.tg == "instance" then
- done[i] = name
else
- done = false
- break
+ local tg = e.tg
+ if tg == "instance" or tg == "instance:assignment" or tg == "instance:ownnumber" then
+ done[i] = name
+ else
+ done = false
+ break
+ end
end
end
if done then
diff --git a/scripts/context/lua/mtx-plain.lua b/scripts/context/lua/mtx-plain.lua
index 43ced20ef..72cc48f92 100644
--- a/scripts/context/lua/mtx-plain.lua
+++ b/scripts/context/lua/mtx-plain.lua
@@ -49,7 +49,8 @@ scripts = scripts or { }
scripts.plain = scripts.plain or { }
local passed_options = table.tohash {
- "utc"
+ "utc",
+ "synctex",
}
local function execute(...)
diff --git a/scripts/context/lua/mtx-synctex.lua b/scripts/context/lua/mtx-synctex.lua
index 30f3e7d51..3c4f6ee71 100644
--- a/scripts/context/lua/mtx-synctex.lua
+++ b/scripts/context/lua/mtx-synctex.lua
@@ -28,6 +28,7 @@ local helpinfo = [[
<flag name="edit"><short>open file at line: --line=.. --editor=.. sourcefile</short></flag>
<flag name="list"><short>show blob: synctexfile</short></flag>
<flag name="goto"><short>open file at position: --page=.. --x=.. --y=.. --editor=.. synctexfile</short></flag>
+ <flag name="report"><short>show file and line: --page=.. --x=.. --y=.. --console synctexfile</short></flag>
</subcategory>
</category>
</flags>
@@ -43,6 +44,9 @@ local application = logs.application {
local report = application.report
local editors = {
+ console = function(specification)
+ print(string.formatters["%q %i"](specification.filename,specification.linenumber or 1))
+ end,
scite = sandbox.registerrunner {
name = "scite",
program = {
@@ -203,7 +207,7 @@ local function showlocation(filename)
local ury = factor * ( y + tonumber(h) )
f = files[f]
if f then
- report(" [% 4i % 4i % 4i % 4i] : % 5i : %s",llx,lly,urx,ury,l,f)
+ report(" [% 4r % 4r % 4r % 4r] : % 5i : %s",llx,lly,urx,ury,l,f)
end
end
end
@@ -245,6 +249,8 @@ if argument("edit") then
editfile(filename,argument("line"),argument("editor"))
elseif argument("goto") then
gotolocation(filename,argument("page"),argument("x"),argument("y"),argument("editor"))
+elseif argument("report") then
+ gotolocation(filename,argument("page"),argument("x"),argument("y"),"console")
elseif argument("list") then
showlocation(filename)
elseif argument("exporthelp") then
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index a92192a2a..656f4493f 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -19897,7 +19897,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-sch"] = package.loaded["data-sch"] or true
--- original size: 6753, stripped down to: 5512
+-- original size: 6753, stripped down to: 5511
if not modules then modules={} end modules ['data-sch']={
version=1.001,
@@ -19953,7 +19953,7 @@ local runner=sandbox.registerrunner {
name="curl resolver",
method="execute",
program="curl",
- template="--silent -- insecure --create-dirs --output %cachename% %original%",
+ template="--silent --insecure --create-dirs --output %cachename% %original%",
checkers={
cachename="cache",
original="url",
@@ -20380,7 +20380,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-lib"] = package.loaded["util-lib"] or true
--- original size: 14415, stripped down to: 7927
+-- original size: 14943, stripped down to: 8305
if not modules then modules={} end modules ['util-lib']={
version=1.001,
@@ -20614,21 +20614,37 @@ if FFISUPPORTED and ffi and ffi.load then
local trace_ffilib=false
local savedffiload=ffi.load
trackers.register("resolvers.ffilib",function(v) trace_ffilib=v end)
+ local loaded={}
local function locateindeed(name)
- local message,library=pcall(savedffiload,removesuffix(name))
- if type(message)=="userdata" then
- return message
- elseif type(library)=="userdata" then
- return library
- else
- return false
+ name=removesuffix(name)
+ local l=loaded[name]
+ if l==nil then
+ local message,library=pcall(savedffiload,name)
+ if type(message)=="userdata" then
+ l=message
+ elseif type(library)=="userdata" then
+ l=library
+ else
+ l=false
+ end
+ loaded[name]=l
+ elseif trace_ffilib then
+ report_ffilib("reusing already loaded %a",name)
end
+ return l
end
- function ffilib(required,version)
- if version=="system" then
+ function ffilib(name,version)
+ name=removesuffix(name)
+ local l=loaded[name]
+ if l~=nil then
+ if trace_ffilib then
+ report_ffilib("reusing already loaded %a",name)
+ end
+ return l
+ elseif version=="system" then
return locateindeed(name)
else
- return locate(required,version,trace_ffilib,report_ffilib,locateindeed)
+ return locate(name,version,trace_ffilib,report_ffilib,locateindeed)
end
end
function ffi.load(name)
@@ -20989,8 +21005,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua 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 : 866119
--- stripped bytes : 315183
+-- original bytes : 866647
+-- stripped bytes : 315334
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index a92192a2a..656f4493f 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -19897,7 +19897,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-sch"] = package.loaded["data-sch"] or true
--- original size: 6753, stripped down to: 5512
+-- original size: 6753, stripped down to: 5511
if not modules then modules={} end modules ['data-sch']={
version=1.001,
@@ -19953,7 +19953,7 @@ local runner=sandbox.registerrunner {
name="curl resolver",
method="execute",
program="curl",
- template="--silent -- insecure --create-dirs --output %cachename% %original%",
+ template="--silent --insecure --create-dirs --output %cachename% %original%",
checkers={
cachename="cache",
original="url",
@@ -20380,7 +20380,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-lib"] = package.loaded["util-lib"] or true
--- original size: 14415, stripped down to: 7927
+-- original size: 14943, stripped down to: 8305
if not modules then modules={} end modules ['util-lib']={
version=1.001,
@@ -20614,21 +20614,37 @@ if FFISUPPORTED and ffi and ffi.load then
local trace_ffilib=false
local savedffiload=ffi.load
trackers.register("resolvers.ffilib",function(v) trace_ffilib=v end)
+ local loaded={}
local function locateindeed(name)
- local message,library=pcall(savedffiload,removesuffix(name))
- if type(message)=="userdata" then
- return message
- elseif type(library)=="userdata" then
- return library
- else
- return false
+ name=removesuffix(name)
+ local l=loaded[name]
+ if l==nil then
+ local message,library=pcall(savedffiload,name)
+ if type(message)=="userdata" then
+ l=message
+ elseif type(library)=="userdata" then
+ l=library
+ else
+ l=false
+ end
+ loaded[name]=l
+ elseif trace_ffilib then
+ report_ffilib("reusing already loaded %a",name)
end
+ return l
end
- function ffilib(required,version)
- if version=="system" then
+ function ffilib(name,version)
+ name=removesuffix(name)
+ local l=loaded[name]
+ if l~=nil then
+ if trace_ffilib then
+ report_ffilib("reusing already loaded %a",name)
+ end
+ return l
+ elseif version=="system" then
return locateindeed(name)
else
- return locate(required,version,trace_ffilib,report_ffilib,locateindeed)
+ return locate(name,version,trace_ffilib,report_ffilib,locateindeed)
end
end
function ffi.load(name)
@@ -20989,8 +21005,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua 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 : 866119
--- stripped bytes : 315183
+-- original bytes : 866647
+-- stripped bytes : 315334
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index a92192a2a..656f4493f 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -19897,7 +19897,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-sch"] = package.loaded["data-sch"] or true
--- original size: 6753, stripped down to: 5512
+-- original size: 6753, stripped down to: 5511
if not modules then modules={} end modules ['data-sch']={
version=1.001,
@@ -19953,7 +19953,7 @@ local runner=sandbox.registerrunner {
name="curl resolver",
method="execute",
program="curl",
- template="--silent -- insecure --create-dirs --output %cachename% %original%",
+ template="--silent --insecure --create-dirs --output %cachename% %original%",
checkers={
cachename="cache",
original="url",
@@ -20380,7 +20380,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-lib"] = package.loaded["util-lib"] or true
--- original size: 14415, stripped down to: 7927
+-- original size: 14943, stripped down to: 8305
if not modules then modules={} end modules ['util-lib']={
version=1.001,
@@ -20614,21 +20614,37 @@ if FFISUPPORTED and ffi and ffi.load then
local trace_ffilib=false
local savedffiload=ffi.load
trackers.register("resolvers.ffilib",function(v) trace_ffilib=v end)
+ local loaded={}
local function locateindeed(name)
- local message,library=pcall(savedffiload,removesuffix(name))
- if type(message)=="userdata" then
- return message
- elseif type(library)=="userdata" then
- return library
- else
- return false
+ name=removesuffix(name)
+ local l=loaded[name]
+ if l==nil then
+ local message,library=pcall(savedffiload,name)
+ if type(message)=="userdata" then
+ l=message
+ elseif type(library)=="userdata" then
+ l=library
+ else
+ l=false
+ end
+ loaded[name]=l
+ elseif trace_ffilib then
+ report_ffilib("reusing already loaded %a",name)
end
+ return l
end
- function ffilib(required,version)
- if version=="system" then
+ function ffilib(name,version)
+ name=removesuffix(name)
+ local l=loaded[name]
+ if l~=nil then
+ if trace_ffilib then
+ report_ffilib("reusing already loaded %a",name)
+ end
+ return l
+ elseif version=="system" then
return locateindeed(name)
else
- return locate(required,version,trace_ffilib,report_ffilib,locateindeed)
+ return locate(name,version,trace_ffilib,report_ffilib,locateindeed)
end
end
function ffi.load(name)
@@ -20989,8 +21005,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua 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 : 866119
--- stripped bytes : 315183
+-- original bytes : 866647
+-- stripped bytes : 315334
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index a92192a2a..656f4493f 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -19897,7 +19897,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-sch"] = package.loaded["data-sch"] or true
--- original size: 6753, stripped down to: 5512
+-- original size: 6753, stripped down to: 5511
if not modules then modules={} end modules ['data-sch']={
version=1.001,
@@ -19953,7 +19953,7 @@ local runner=sandbox.registerrunner {
name="curl resolver",
method="execute",
program="curl",
- template="--silent -- insecure --create-dirs --output %cachename% %original%",
+ template="--silent --insecure --create-dirs --output %cachename% %original%",
checkers={
cachename="cache",
original="url",
@@ -20380,7 +20380,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-lib"] = package.loaded["util-lib"] or true
--- original size: 14415, stripped down to: 7927
+-- original size: 14943, stripped down to: 8305
if not modules then modules={} end modules ['util-lib']={
version=1.001,
@@ -20614,21 +20614,37 @@ if FFISUPPORTED and ffi and ffi.load then
local trace_ffilib=false
local savedffiload=ffi.load
trackers.register("resolvers.ffilib",function(v) trace_ffilib=v end)
+ local loaded={}
local function locateindeed(name)
- local message,library=pcall(savedffiload,removesuffix(name))
- if type(message)=="userdata" then
- return message
- elseif type(library)=="userdata" then
- return library
- else
- return false
+ name=removesuffix(name)
+ local l=loaded[name]
+ if l==nil then
+ local message,library=pcall(savedffiload,name)
+ if type(message)=="userdata" then
+ l=message
+ elseif type(library)=="userdata" then
+ l=library
+ else
+ l=false
+ end
+ loaded[name]=l
+ elseif trace_ffilib then
+ report_ffilib("reusing already loaded %a",name)
end
+ return l
end
- function ffilib(required,version)
- if version=="system" then
+ function ffilib(name,version)
+ name=removesuffix(name)
+ local l=loaded[name]
+ if l~=nil then
+ if trace_ffilib then
+ report_ffilib("reusing already loaded %a",name)
+ end
+ return l
+ elseif version=="system" then
return locateindeed(name)
else
- return locate(required,version,trace_ffilib,report_ffilib,locateindeed)
+ return locate(name,version,trace_ffilib,report_ffilib,locateindeed)
end
end
function ffi.load(name)
@@ -20989,8 +21005,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua 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 : 866119
--- stripped bytes : 315183
+-- original bytes : 866647
+-- stripped bytes : 315334
-- end library merge
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 0b056f401..6a789e77d 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2017.11.19 20:15}
+\newcontextversion{2017.11.22 13:35}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index a659bad96..6c74abf3a 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2017.11.19 20:15}
+\edef\contextversion{2017.11.22 13:35}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 5d7d41a9d..37ce0c00b 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2017.11.19 20:15}
+\newcontextversion{2017.11.22 13:35}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 580304e12..0b1f3b097 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -41,7 +41,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2017.11.19 20:15}
+\edef\contextversion{2017.11.22 13:35}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/core-uti.lua b/tex/context/base/mkiv/core-uti.lua
index c9f003061..fda66ed73 100644
--- a/tex/context/base/mkiv/core-uti.lua
+++ b/tex/context/base/mkiv/core-uti.lua
@@ -298,7 +298,7 @@ function job.load(filename)
local initializer = list[3]
local result = accesstable(target,utilitydata)
if result then
- local done = packers.unpack(result,jobpacker,true)
+ local done = packers.unpack(result,jobpacker,true)
if done then
migratetable(target,mark(result))
if type(initializer) == "function" then
diff --git a/tex/context/base/mkiv/data-sch.lua b/tex/context/base/mkiv/data-sch.lua
index f6801cb4d..2e880e997 100644
--- a/tex/context/base/mkiv/data-sch.lua
+++ b/tex/context/base/mkiv/data-sch.lua
@@ -72,7 +72,7 @@ local runner = sandbox.registerrunner {
name = "curl resolver",
method = "execute",
program = "curl",
- template = "--silent -- insecure --create-dirs --output %cachename% %original%",
+ template = "--silent --insecure --create-dirs --output %cachename% %original%",
checkers = {
cachename = "cache",
original = "url",
@@ -151,7 +151,7 @@ local function http_handler(specification,cachename)
local tempname = cachename .. ".tmp"
local f = io.open(tempname,"wb")
local status, message = http.request {
- url = specification.original,
+ url = specification.original,
sink = ltn12.sink.file(f)
}
if not status then
diff --git a/tex/context/base/mkiv/math-ali.mkiv b/tex/context/base/mkiv/math-ali.mkiv
index 2b0cc0bc1..6e2972615 100644
--- a/tex/context/base/mkiv/math-ali.mkiv
+++ b/tex/context/base/mkiv/math-ali.mkiv
@@ -128,7 +128,7 @@
\aligntab
\math_first_in_eqalign
\hfil
- \math_left_of_equalign
+ \math_left_of_eqalign
\span
\math_math_in_eqalign{\alignmark\alignmark}%
\math_right_of_eqalign
@@ -136,7 +136,7 @@
\t_math_align_b
{\aligntab
\math_next_in_eqalign
- \math_left_of_equalign
+ \math_left_of_eqalign
\span
\math_math_in_eqalign{\alignmark\alignmark}%
\math_right_of_eqalign
@@ -177,7 +177,7 @@
\aligntab
\math_first_in_eqalign
\hfil
- \math_left_of_equalign
+ \math_left_of_eqalign
\span
\math_math_in_eqalign{\alignmark\alignmark}%
\math_right_of_eqalign
@@ -185,7 +185,7 @@
\t_math_align_b
{\aligntab
\math_next_in_eqalign
- \math_left_of_equalign
+ \math_left_of_eqalign
\span
\math_math_in_eqalign{\alignmark\alignmark}%
\math_right_of_eqalign
@@ -467,7 +467,7 @@
\dostoptagged % finish cell
\dostarttagged\t!mathtablecell\empty}
-\def\math_left_of_equalign
+\def\math_left_of_eqalign
{\ifcsname\??mathalignmentvariant\number\c_math_eqalign_column\endcsname
\ifcase\lastnamedcs \or \relax \or \hfill \or \hfill \fi
\fi}
@@ -832,7 +832,7 @@
\unexpanded\def\math_matrix_start_cell
{\dostarttagged\t!mathtablecell\empty
\hss
- %\math_left_of_equalign
+ \math_left_of_eqalign
\startimath
\math_matrix_set_style
\tabskip\zeropoint
@@ -840,7 +840,7 @@
\unexpanded\def\math_matrix_stop_cell
{\stopimath
- %\math_right_of_eqalign
+ \math_right_of_eqalign
\hss
\dostoptagged}
diff --git a/tex/context/base/mkiv/mtx-context-compare.tex b/tex/context/base/mkiv/mtx-context-compare.tex
new file mode 100644
index 000000000..ffa744013
--- /dev/null
+++ b/tex/context/base/mkiv/mtx-context-compare.tex
@@ -0,0 +1,113 @@
+%D \module
+%D [ file=mtx-context-compare,
+%D version=2015.07.14,
+%D title=\CONTEXT\ Extra Trickry,
+%D subtitle=Compare Files,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% begin help
+%
+% usage: context --extra=compare [options] file-1 file-2
+%
+% example: context --extra=compare file1.pdf file-2.pdf
+%
+% end help
+
+\input mtx-context-common.tex
+
+\starttext
+
+\starttexdefinition unexpanded ShowBoth #1#2#3
+ \startTEXpage
+ \startoverlay
+ {\externalfigure[#1][page=#3]}
+ {\externalfigure[#2][page=#3]}
+ \stopoverlay
+ \stopTEXpage
+\stoptexdefinition
+
+\starttexdefinition unexpanded ShowPage #1#2
+ \startTEXpage
+ \externalfigure[#1][page=#2]
+ \stopTEXpage
+\stoptexdefinition
+
+
+\startluacode
+
+local report = logs.reporter("compare")
+
+local fileone = document.files[1] or ""
+local filetwo = document.files[2] or ""
+
+if fileone == "" or filetwo == "" then
+ report("provide two filenames")
+ os.exit()
+end
+
+if not lfs.isfile(fileone) then
+ report("unknown file %a",fileone)
+ os.exit()
+end
+
+if not lfs.isfile(filetwo) then
+ report("unknown file %a",filetwo)
+ os.exit()
+end
+
+local function check(name)
+ local fig = figures.push { name = name }
+ figures.identify()
+ figures.check()
+ local used = fig.used
+ figures.pop()
+ return used
+end
+
+local one = check(fileone)
+local two = check(filetwo)
+
+if not one then
+ report("invalid file %a",fileone)
+ os.exit()
+end
+
+if not two then
+ report("invalid file %a",filetwo)
+ os.exit()
+end
+
+local n_one = tonumber(one.pages)
+local n_two = tonumber(two.pages)
+
+if not n_one or n_one ~= n_two then
+ report("files have different nofpages (%s vs %s)",n_one or "?",n_two or "?")
+end
+
+if n_one > n_two then
+ for i=1,n_two do
+ context.ShowBoth(fileone,filetwo,i)
+ end
+ for i=n_two+1,n_one do
+ context.ShowPage(fileone,i)
+ end
+else
+ for i=1,n_one do
+ context.ShowBoth(fileone,filetwo,i)
+ end
+ for i=n_one+1,n_two do
+ context.ShowPage(filetwo,i)
+ end
+end
+
+\stopluacode
+
+\stoptext
+
+\endinput
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 4542c1e85..3557bc0ff 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -343,6 +343,7 @@ return {
"suppresslongerror",
"suppressmathparerror",
"suppressoutererror",
+ "suppressprimitiveerror",
"synctex",
"tagcode",
"textdir",
diff --git a/tex/context/base/mkiv/node-syn.lua b/tex/context/base/mkiv/node-syn.lua
index d6730bb4d..d8320e3b3 100644
--- a/tex/context/base/mkiv/node-syn.lua
+++ b/tex/context/base/mkiv/node-syn.lua
@@ -205,6 +205,12 @@ local enabled = false
local paused = 0
local used = false
+-- get rid of overhead
+
+if tex.set_synctex_no_files then
+ tex.set_synctex_no_files(1)
+end
+
-- the file name stuff
local noftags = 0
diff --git a/tex/context/base/mkiv/page-brk.mkiv b/tex/context/base/mkiv/page-brk.mkiv
index b651cc8b4..7ab74c0e4 100644
--- a/tex/context/base/mkiv/page-brk.mkiv
+++ b/tex/context/base/mkiv/page-brk.mkiv
@@ -137,7 +137,7 @@
{\def\page_breaks_process[##1]{}}
\installpagebreakmethod \s!dummy
- {\page_otr_flush_all_floats
+ {\page_otr_command_flush_all_floats
\page_otr_command_next_page
\page_otr_insert_dummy_page}
@@ -150,11 +150,11 @@
\unexpanded\def\page_breaks_unknown % how often called ?
{\doifelseinstring{+}\page_breaks_current_option
- {\page_otr_flush_all_floats
+ {\page_otr_command_flush_all_floats
\page_otr_command_next_page
\dorecurse\page_breaks_current_option\page_otr_insert_dummy_page}
{\doifelsenumber\page_breaks_current_option
- {\page_otr_flush_all_floats
+ {\page_otr_command_flush_all_floats
\page_otr_command_next_page
\doloop
{\ifnum\userpageno<\page_breaks_current_option\relax
@@ -179,7 +179,7 @@
\installpagebreakmethod \v!yes
{\ifconditional\c_page_breaks_enabled
- \page_otr_flush_all_floats
+ \page_otr_command_flush_all_floats
\page_otr_command_next_page
\ifinsidecolumns % this will move to MUL
\page_otr_eject_page % otherwise sometimes no change
@@ -229,12 +229,12 @@
{\resetcurrentstructuremarkswithpage\page_otr_insert_dummy_page}
\installpagebreakmethod \v!left
- {\page_otr_flush_all_floats
+ {\page_otr_command_flush_all_floats
\page_otr_command_next_page_and_inserts
\doifbothsidesoverruled\donothing\page_reset_marks_and_insert_dummy\donothing}
\installpagebreakmethod \v!right
- {\page_otr_flush_all_floats
+ {\page_otr_command_flush_all_floats
\page_otr_command_next_page_and_inserts
\doifbothsidesoverruled\donothing\donothing\page_reset_marks_and_insert_dummy}
@@ -269,7 +269,7 @@
\fi}
\installpagebreakmethod \v!last
- {\page_otr_flush_all_floats
+ {\page_otr_command_flush_all_floats
\page_otr_command_next_page_and_inserts
\relax
\doifbothsidesoverruled
diff --git a/tex/context/base/mkiv/page-cst.mkiv b/tex/context/base/mkiv/page-cst.mkiv
index 26cb4ea98..f6eede68a 100644
--- a/tex/context/base/mkiv/page-cst.mkiv
+++ b/tex/context/base/mkiv/page-cst.mkiv
@@ -189,11 +189,11 @@
\def\page_grd_stop
{\endgraf % needed, else wrong vsize in one par case
\vfill % otherwise weird \placenotes[endnotes]
- \page_otr_command_set_vsize % needed
+ \page_grd_command_set_vsize % needed
\penalty\c_page_otr_eject_penalty
\page_grd_command_flush_page
\page_otr_fill_and_eject_page
- \page_otr_command_set_vsize % needed
+ \page_grd_command_set_vsize % why here
\egroup
\page_otr_command_set_vsize
\page_otr_command_set_hsize}
@@ -334,7 +334,7 @@
\unexpanded\def\page_grd_command_next_progress
{\strut
- \page_otr_flush_all_floats
+ \page_grd_command_flush_all_floats
\page_otr_eject_page
\ifcase\clf_columnsetnoto\else
\expandafter\page_grd_command_next_progress
@@ -354,10 +354,10 @@
\fi}
\unexpanded\def\page_grd_command_next_page_and_inserts
-% {\page_otr_eject_page_and_flush_inserts}
- {\page_otr_flush_all_floats
+ {\page_grd_command_flush_all_floats
\page_grd_command_next_page}
+\let\page_grd_command_flush_all_floats\page_one_command_flush_all_floats
\let\page_grd_command_package_contents\page_one_command_package_contents
\unexpanded\def\page_grd_command_flush_saved_floats
@@ -576,27 +576,31 @@
\unexpanded\def\page_grd_command_synchronize_hsize
{\page_grd_command_set_hsize}
+\unexpanded\def\page_grd_command_flush_all_floats
+ {\page_one_command_flush_all_floats}
+
\defineoutputroutine
[\s!pagegrid]
[\s!page_otr_command_routine =\page_grd_command_routine,
\s!page_otr_command_package_contents =\page_grd_command_package_contents,
\s!page_otr_command_set_vsize =\page_grd_command_set_vsize,
\s!page_otr_command_set_hsize =\page_grd_command_set_hsize, % tricky, goes wrong
+ \s!page_otr_command_synchronize_hsize =\page_grd_command_synchronize_hsize,
\s!page_otr_command_next_page =\page_grd_command_next_page,
\s!page_otr_command_next_page_and_inserts =\page_grd_command_next_page_and_inserts,
- \s!page_otr_command_synchronize_hsize =\page_grd_command_synchronize_hsize,
% \s!page_otr_command_set_top_insertions =\page_grd_command_set_top_insertions,
% \s!page_otr_command_set_bottom_insertions =\page_grd_command_set_bottom_insertions,
% \s!page_otr_command_flush_top_insertions =\page_grd_command_flush_top_insertions,
% \s!page_otr_command_flush_bottom_insertions =\page_grd_command_flush_bottom_insertions,
- % \s!page_otr_command_set_float_hsize =\page_grd_command_set_float_hsize,
\s!page_otr_command_check_if_float_fits =\page_grd_command_check_if_float_fits,
+ % \s!page_otr_command_set_float_hsize =\page_grd_command_set_float_hsize,
% \s!page_otr_command_flush_float_box =\page_grd_command_flush_float_box,
\s!page_otr_command_synchronize_side_floats =\page_grd_command_synchronize_side_floats,
\s!page_otr_command_side_float_output =\page_grd_command_side_float_output,
\s!page_otr_command_flush_floats =\page_grd_command_flush_floats,
\s!page_otr_command_flush_side_floats =\page_grd_command_flush_side_floats,
- \s!page_otr_command_flush_saved_floats =\page_grd_command_flush_saved_floats
+ \s!page_otr_command_flush_saved_floats =\page_grd_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats =\page_grd_command_flush_all_floats,
% \s!page_otr_command_flush_margin_blocks =\page_grd_command_flush_margin_blocks, % not used
]
diff --git a/tex/context/base/mkiv/page-flt.mkiv b/tex/context/base/mkiv/page-flt.mkiv
index 811248717..a06c90ec1 100644
--- a/tex/context/base/mkiv/page-flt.mkiv
+++ b/tex/context/base/mkiv/page-flt.mkiv
@@ -37,9 +37,22 @@
\newconstant\c_page_floats_insertions_topskip_mode % 1 = no topskip
-%def\page_floats_report_saved {\showmessage\m!floatblocks2{\the\totalnoffloats}}
-\def\page_floats_report_total {\showmessage\m!floatblocks4{\the\totalnoffloats,\floatlocation}}
-\def\page_floats_report_flushed{\showmessage\m!floatblocks3{\the\numexpr\totalnoffloats-\savednoffloats\relax}}
+% \def\page_floats_report_saved
+% {\showmessage\m!floatblocks2
+% {\the\totalnoffloats}}
+
+\def\page_floats_report_total
+ {\showmessage\m!floatblocks4%
+ {\the\totalnoffloats
+ \ifx\floatlocationmethod\empty
+ \ifx\floatlocation\empty\else,\floatlocation\fi
+ \else
+ ,\floatlocationmethod
+ \fi}}
+
+\def\page_floats_report_flushed
+ {\showmessage\m!floatblocks3%
+ {\the\numexpr\totalnoffloats-\savednoffloats\relax}}
%D Extra float registers.
diff --git a/tex/context/base/mkiv/page-ini.mkiv b/tex/context/base/mkiv/page-ini.mkiv
index 6440bd80d..8c8e9c089 100644
--- a/tex/context/base/mkiv/page-ini.mkiv
+++ b/tex/context/base/mkiv/page-ini.mkiv
@@ -67,17 +67,7 @@
\def\page_otr_flush_all_floats
{%\flushnotes already done
\ifconditional\c_page_floats_some_waiting
- \begingroup
- \c_page_floats_n_of_top\plusthousand
- \c_page_floats_n_of_bottom\zerocount
- % this is needed in case a float that has been stored
- % ends up at the current page; this border case occurs when
- % the calculated room is 'eps' smaller that the room available
- % when just flushing; so now we have (maybe optional):
- \pagebaselinecorrection % hm, needs checking, not needed when no floats
- % alas, this is tricky but needed (first surfaced in prikkels)
- \page_otr_command_flush_floats
- \endgroup
+ \page_otr_command_flush_all_floats
\fi}
\def\page_otr_insert_dummy_page
diff --git a/tex/context/base/mkiv/page-lay.mkiv b/tex/context/base/mkiv/page-lay.mkiv
index b078e1042..8da2b5017 100644
--- a/tex/context/base/mkiv/page-lay.mkiv
+++ b/tex/context/base/mkiv/page-lay.mkiv
@@ -1114,7 +1114,7 @@
\setsystemmode\v!footer
\fi}
-\def\calculatevsizes % name will change
+\unexpanded\def\calculatevsizes % name will change
{\textheight\makeupheight
\doifelselayoutsomeline\v!header\compensatevsizeheader\donothing
\doifelselayoutsomeline\v!footer\compensatevsizefooter\donothing
@@ -1122,14 +1122,14 @@
\resetglobal
\page_otr_command_set_vsize}
-\def\calculateglobalvsizes % name will change
+\unexpanded\def\calculateglobalvsizes % name will change
{\global\textheight\makeupheight
\doifelselayoutsomeline\v!header\globalcompensatevsizeheader\donothing
\doifelselayoutsomeline\v!footer\globalcompensatevsizefooter\donothing
\page_layouts_set_modes
\page_otr_command_set_vsize}
-\def\calculatereducedvsizes % name will change
+\unexpanded\def\calculatereducedvsizes % name will change
{\textheight\makeupheight
\doifelselayoutsomeline\v!header\compensatevsizeheader\compensatevsizeheaderzero
\doifelselayoutsomeline\v!footer\compensatevsizefooter\compensatevsizefooterzero}
@@ -1142,7 +1142,7 @@
\def\compensatedinnermakeupmargin
{\dimexpr\ifconditional\innermakeupcompensation+\innermakeupmargin\else\zeropoint\fi\relax}
-\def\freezetextwidth % name will change % \makeupwidth may be set to \textwidth
+\unexpanded\def\freezetextwidth % name will change % \makeupwidth may be set to \textwidth
{\textwidth\makeupwidth % which is a tricky but valid value
\edef\m_currentlayout_text_width {\layoutparameter\c!textwidth }%
\edef\m_currentlayout_text_margin{\layoutparameter\c!textmargin}%
@@ -1159,7 +1159,7 @@
\global\advance\innermakeupwidth-\scratchdimen
\advance\textwidth-\scratchdimen} % local
-\def\calculatehsizes % name will change
+\unexpanded\def\calculatehsizes % name will change
{\freezetextwidth
\page_otr_command_set_hsize}
diff --git a/tex/context/base/mkiv/page-mix.mkiv b/tex/context/base/mkiv/page-mix.mkiv
index 7f512732e..326d01994 100644
--- a/tex/context/base/mkiv/page-mix.mkiv
+++ b/tex/context/base/mkiv/page-mix.mkiv
@@ -971,27 +971,30 @@
%D We need to hook some handlers into the output routine and we define
%D a dedicated one:
+\let\page_mix_command_flush_all_floats\page_one_command_flush_all_floats
+
\defineoutputroutine
[\s!mixedcolumn]
[\s!page_otr_command_routine =\page_mix_command_routine,
\s!page_otr_command_package_contents =\page_mix_command_package_contents,
\s!page_otr_command_set_vsize =\page_mix_command_set_vsize,
\s!page_otr_command_set_hsize =\page_mix_command_set_hsize,
+ % \s!page_otr_command_synchronize_hsize =\page_mix_command_synchronize_hsize,
\s!page_otr_command_next_page =\page_mix_command_next_page,
\s!page_otr_command_next_page_and_inserts =\page_mix_command_next_page_and_inserts,
- % \s!page_otr_command_synchronize_hsize =\page_mix_command_synchronize_hsize,
% \s!page_otr_command_set_top_insertions =\page_mix_command_set_top_insertions,
% \s!page_otr_command_set_bottom_insertions =\page_mix_command_set_bottom_insertions,
% \s!page_otr_command_flush_top_insertions =\page_mix_command_flush_top_insertions,
% \s!page_otr_command_flush_bottom_insertions=\page_mix_command_flush_bottom_insertions,
- % \s!page_otr_command_set_float_hsize =\page_mix_command_set_float_hsize,
\s!page_otr_command_check_if_float_fits =\page_mix_command_check_if_float_fits,
+ % \s!page_otr_command_set_float_hsize =\page_mix_command_set_float_hsize,
\s!page_otr_command_flush_float_box =\page_mix_command_flush_float_box,
- \s!page_otr_command_synchronize_side_floats=\page_mix_command_synchronize_side_floats,
\s!page_otr_command_side_float_output =\page_mix_command_side_float_output,
+ \s!page_otr_command_synchronize_side_floats=\page_mix_command_synchronize_side_floats,
\s!page_otr_command_flush_floats =\page_mix_command_flush_floats,
\s!page_otr_command_flush_side_floats =\page_mix_command_flush_side_floats,
\s!page_otr_command_flush_saved_floats =\page_mix_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats =\page_mix_command_flush_all_floats,
% \s!page_otr_command_flush_margin_blocks =\page_mix_command_flush_margin_blocks, % not used
\s!page_otr_command_test_column =\page_mix_command_test_column
]
diff --git a/tex/context/base/mkiv/page-mul.mkiv b/tex/context/base/mkiv/page-mul.mkiv
index 5b4f064d0..51af24b6a 100644
--- a/tex/context/base/mkiv/page-mul.mkiv
+++ b/tex/context/base/mkiv/page-mul.mkiv
@@ -1820,6 +1820,7 @@
\let\page_mul_command_package_contents\page_one_command_package_contents
\let\page_mul_command_flush_float_box \page_one_command_flush_float_box
+\let\page_mul_command_flush_all_floats\page_one_command_flush_all_floats
\defineoutputroutine
[\s!multicolumn]
@@ -1827,21 +1828,22 @@
\s!page_otr_command_package_contents =\page_mul_command_package_contents,
\s!page_otr_command_set_vsize =\page_mul_command_set_vsize,
\s!page_otr_command_set_hsize =\page_mul_command_set_hsize,
+ % \s!page_otr_command_synchronize_hsize =\page_mul_command_synchronize_hsize,
\s!page_otr_command_next_page =\page_mul_command_next_page,
\s!page_otr_command_next_page_and_inserts =\page_mul_command_next_page_and_inserts,
- % \s!page_otr_command_synchronize_hsize =\page_mul_command_synchronize_hsize,
% \s!page_otr_command_set_top_insertions =\page_mul_command_set_top_insertions,
% \s!page_otr_command_set_bottom_insertions =\page_mul_command_set_bottom_insertions,
\s!page_otr_command_flush_top_insertions =\page_mul_command_flush_top_insertions,
% \s!page_otr_command_flush_bottom_insertions=\page_mul_command_flush_bottom_insertions,
- % \s!page_otr_command_set_float_hsize =\page_mul_command_set_float_hsize,
\s!page_otr_command_check_if_float_fits =\page_mul_command_check_if_float_fits,
+ % \s!page_otr_command_set_float_hsize =\page_mul_command_set_float_hsize,
\s!page_otr_command_flush_float_box =\page_mul_command_flush_float_box,
- \s!page_otr_command_synchronize_side_floats=\page_mul_command_synchronize_side_floats,
\s!page_otr_command_side_float_output =\page_mul_command_side_float_output,
+ \s!page_otr_command_synchronize_side_floats=\page_mul_command_synchronize_side_floats,
\s!page_otr_command_flush_floats =\page_mul_command_flush_floats,
\s!page_otr_command_flush_side_floats =\page_mul_command_flush_side_floats,
\s!page_otr_command_flush_saved_floats =\page_mul_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats =\page_mul_command_flush_all_floats,
% \s!page_otr_command_flush_margin_blocks =\page_mul_command_flush_margin_blocks, % not used
\s!page_otr_command_test_column =\page_mul_command_test_column
]
diff --git a/tex/context/base/mkiv/page-one.mkiv b/tex/context/base/mkiv/page-one.mkiv
index f8980b055..35233247b 100644
--- a/tex/context/base/mkiv/page-one.mkiv
+++ b/tex/context/base/mkiv/page-one.mkiv
@@ -600,27 +600,43 @@
\unexpanded\def\page_one_command_test_page
{\testpage}
+\unexpanded\def\page_one_command_flush_all_floats
+ {\ifconditional\c_page_floats_some_waiting
+ \begingroup
+ \c_page_floats_n_of_top\plusthousand
+ \c_page_floats_n_of_bottom\zerocount
+ % this is needed in case a float that has been stored
+ % ends up at the current page; this border case occurs when
+ % the calculated room is 'eps' smaller that the room available
+ % when just flushing; so now we have (maybe optional):
+ \pagebaselinecorrection % hm, needs checking, not needed when no floats
+ % alas, this is tricky but needed (first surfaced in prikkels)
+ \page_otr_command_flush_floats
+ \endgroup
+ \fi}
+
\defineoutputroutine
[\s!singlecolumn]
[\s!page_otr_command_routine =\page_one_command_routine,
\s!page_otr_command_package_contents =\page_one_command_package_contents,
\s!page_otr_command_set_vsize =\page_one_command_set_vsize,
\s!page_otr_command_set_hsize =\page_one_command_set_hsize,
+ % \s!page_otr_command_synchronize_hsize =\page_one_command_synchronize_hsize,
\s!page_otr_command_next_page =\page_one_command_next_page,
\s!page_otr_command_next_page_and_inserts =\page_one_command_next_page_and_inserts,
- % \s!page_otr_command_synchronize_hsize =\page_one_command_synchronize_hsize,
\s!page_otr_command_set_top_insertions =\page_one_command_set_top_insertions,
\s!page_otr_command_set_bottom_insertions =\page_one_command_set_bottom_insertions,
\s!page_otr_command_flush_top_insertions =\page_one_command_flush_top_insertions,
\s!page_otr_command_flush_bottom_insertions=\page_one_command_flush_bottom_insertions,
- % \s!page_otr_command_set_float_hsize =\page_one_command_set_float_hsize,
\s!page_otr_command_check_if_float_fits =\page_one_command_check_if_float_fits,
+ % \s!page_otr_command_set_float_hsize =\page_one_command_set_float_hsize,
\s!page_otr_command_flush_float_box =\page_one_command_flush_float_box,
- \s!page_otr_command_synchronize_side_floats=\page_one_command_synchronize_side_floats,
\s!page_otr_command_side_float_output =\page_one_command_side_float_output,
+ \s!page_otr_command_synchronize_side_floats=\page_one_command_synchronize_side_floats,
\s!page_otr_command_flush_floats =\page_one_command_flush_floats,
\s!page_otr_command_flush_side_floats =\page_one_command_flush_side_floats,
\s!page_otr_command_flush_saved_floats =\page_one_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats =\page_one_command_flush_all_floats,
\s!page_otr_command_flush_margin_blocks =\page_one_command_flush_margin_blocks,
\s!page_otr_command_test_column =\page_one_command_test_page
]
diff --git a/tex/context/base/mkiv/page-otr.mkvi b/tex/context/base/mkiv/page-otr.mkvi
index f4633f1fd..1fe928c36 100644
--- a/tex/context/base/mkiv/page-otr.mkvi
+++ b/tex/context/base/mkiv/page-otr.mkvi
@@ -259,7 +259,9 @@
{\writestatus\m!system{Sorry, you're not done yet, so no goodbye!}}
%D We define a few constants because that (1) provides some checking
-%D and (2) is handier when aligning definitions (checks nicer).
+%D and (2) is handier when aligning definitions (checks nicer). Most
+%D routines will use ard codes names but sometimes we want to adapt,
+%D which is why we have these:
\definesystemconstant{page_otr_command_routine}
\definesystemconstant{page_otr_command_package_contents}
@@ -280,12 +282,14 @@
\definesystemconstant{page_otr_command_flush_floats}
\definesystemconstant{page_otr_command_flush_side_floats}
\definesystemconstant{page_otr_command_flush_saved_floats}
+\definesystemconstant{page_otr_command_flush_all_floats}
\definesystemconstant{page_otr_command_flush_margin_blocks}
\definesystemconstant{page_otr_command_test_column}
\definesystemconstant{singlecolumn}
\definesystemconstant{multicolumn} % will move
\definesystemconstant{columnset} % will move
+\definesystemconstant{pagecolumn} % will move
\defineoutputroutinecommand
[\s!page_otr_command_routine,
@@ -307,6 +311,7 @@
\s!page_otr_command_flush_floats,
\s!page_otr_command_flush_side_floats,
\s!page_otr_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats,
\s!page_otr_command_flush_margin_blocks,
\s!page_otr_command_test_column]
diff --git a/tex/context/base/mkiv/page-pcl.mkiv b/tex/context/base/mkiv/page-pcl.mkiv
index 3b936dea5..086cf69b0 100644
--- a/tex/context/base/mkiv/page-pcl.mkiv
+++ b/tex/context/base/mkiv/page-pcl.mkiv
@@ -30,8 +30,6 @@
\definemeasure[threecolumns][\dimexpr\plusthree\columnwidth+\plustwo \columndistance\relax]
\definemeasure[fourcolumns] [\dimexpr\plusfour \columnwidth+\plusthree\columndistance\relax]
-\def\s!pagecolumn{pagecolumn}
-
\newcount\c_page_col_n_of_columns \c_page_col_n_of_columns\plusone
\newcount\c_page_col_current \c_page_col_current \plusone
\newdimen\d_page_col_distance
@@ -49,70 +47,51 @@
%D We need to step over empty columns.
\unexpanded\def\page_col_command_next_page
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_otr_eject_page
- \else
- \page_otr_eject_page_column
- \fi}
+ {\page_col_eject_page}
\unexpanded\def\page_col_column
{\page_otr_eject_page}
-\unexpanded\def\page_otr_eject_page_column
+\unexpanded\def\page_col_eject_page
{\begingroup
- \scratchcountertwo\realpageno
+ \scratchcountertwo \realpageno
\page_otr_eject_page
- \scratchcounterone\zerocount
+ \scratchcounterone \c_page_col_current
\scratchcounterthree\zerocount
\doloop{%
\ifnum\scratchcounterthree>\plushundred
+ % too many attempts
+ \exitloop
+ \else\ifnum\realpageno>\scratchcountertwo
+ % we advanced at least one page so we're done
\exitloop
\else
- \advance\scratchcounterthree\plusone
- \ifnum\scratchcountertwo=\realpageno
- \ifnum\c_page_col_current=\plusone
- \exitloop
- \else
- \ifnum\scratchcounterone=\c_page_col_current
- \dontleavehmode\null
- \fi
- \page_otr_eject_page
- \scratchcounterone\c_page_col_current
- \fi
- \else
- \exitloop
+ \ifnum\scratchcounterone=\c_page_col_current
+ \dontleavehmode\null
\fi
- \fi
+ \page_otr_eject_page
+ \scratchcounterone\c_page_col_current
+ \advance\scratchcounterthree\plusone
+ \fi\fi
}%
\endgroup}
%D \unknown
\unexpanded\def\page_col_command_next_page_and_inserts
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_otr_eject_page_and_flush_inserts
- \else
- \page_otr_eject_page_and_flush_inserts
- \fi}
+ {\page_otr_eject_page_and_flush_inserts}
%D \unknown
\unexpanded\def\page_col_command_set_hsize
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_one_command_set_hsize
- \else
- \page_col_command_set_hsize_indeed
- \fi}
-
-\unexpanded\def\page_col_command_set_hsize_indeed
{\global\hsize\d_page_col_column_width\relax
\global\d_page_col_available\dimexpr
\numexpr\c_page_col_n_of_columns-\c_page_col_current+\plusone\relax\d_page_col_column_width
+ \numexpr\c_page_col_n_of_columns-\c_page_col_current \relax\d_page_col_distance
\relax
- \global\d_page_col_sofar
+ \global\d_page_col_sofar
\ifnum\c_page_col_n_of_columns=\plusone
- \zerocount
+ \zeropoint
\else
\numexpr\c_page_col_n_of_columns-\plusone\relax
\dimexpr\d_page_col_column_width+\d_page_col_distance\relax
@@ -120,14 +99,7 @@
%D \unknown
-\unexpanded\def\page_col_command_set_vsize
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_one_command_set_vsize
- \else
- \page_col_command_set_vsize_indeed
- \fi}
-
-\unexpanded\def\page_col_command_set_vsize_indeed % \page_one_command_set_vsize minus the pagegoal setting
+\unexpanded\def\page_col_command_set_vsize % \page_one_command_set_vsize minus the pagegoal setting
{\ifgridsnapping
\ifcase\layoutlines
\getrawnoflines\textheight
@@ -141,12 +113,15 @@
%D \unknown
-\unexpanded\def\page_col_command_package_contents % \box<n> \unvbox<n> % this one will be redone (checked)
- {\ifnum\c_page_col_n_of_columns=\plusone
- \expandafter\page_one_command_package_contents
- \else
- \expandafter\page_col_command_package_contents_all
- \fi}
+\unexpanded\def\page_col_command_package_contents#1#2% \box<n> \unvbox<n> % this one will be redone (checked)
+ {\bgroup
+ \setbox\b_page_one_contents\vbox to \textheight
+ {\page_one_registered_text_area_a#1#2}%
+ \page_one_command_package_show_state
+ \ht\b_page_one_contents\textheight
+ \page_one_registered_text_area_b
+ {\box\b_page_one_contents}%
+ \egroup}
\unexpanded\def\page_col_command_package_contents_one#1#2% \box<n> \unvbox<n> % this one will be redone (checked)
{\bgroup
@@ -155,27 +130,27 @@
\strc_notes_check_if_bottom_present
\d_page_one_natural_depth\dp#2\relax
\setbox\b_page_one_contents\vbox to \textheight
- {\page_otr_command_flush_top_insertions
+ {\page_col_command_flush_top_insertions
\page_one_registered_text_area_a#1#2%
\hsize\d_page_col_column_width
\ifgridsnapping
\vskip\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax
\prevdepth\openstrutdepth
- \page_otr_command_flush_bottom_insertions
+ \page_col_command_flush_bottom_insertions
\vfil
\else\ifcase\bottomraggednessmode
% ragged (default)
\vskip\dimexpr\openstrutdepth-\d_page_one_natural_depth\relax
\prevdepth\openstrutdepth
- \page_otr_command_flush_bottom_insertions
+ \page_col_command_flush_bottom_insertions
\vfil
\or
% align (normal)
- \page_otr_command_flush_bottom_insertions
+ \page_col_command_flush_bottom_insertions
\or
% baseline
\kern\dimexpr\maxdepth-\d_page_one_natural_depth\relax
- \page_otr_command_flush_bottom_insertions
+ \page_col_command_flush_bottom_insertions
\fi\fi
\fakepagenotes}%
\page_one_command_package_show_state
@@ -211,26 +186,9 @@
\fi
\egroup}
-\unexpanded\def\page_col_command_package_contents_all#1#2% \box<n> \unvbox<n> % this one will be redone (checked)
- {\bgroup
- \setbox\b_page_one_contents\vbox to \textheight
- {\page_one_registered_text_area_a#1#2}%
- \page_one_command_package_show_state
- \ht\b_page_one_contents\textheight
- \page_one_registered_text_area_b
- {\box\b_page_one_contents}%
- \egroup}
-
%D \unknown
\unexpanded\def\page_col_command_side_float_output
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_one_command_side_float_output
- \else
- \page_col_command_side_float_output_indeed
- \fi}
-
-\unexpanded\def\page_col_command_side_float_output_indeed
{% % %
\ifvoid\namedinsertionnumber\s!topfloat\else
\scratchwidth\wd\namedinsertionnumber\s!topfloat
@@ -309,82 +267,115 @@
%D \unknown
-\unexpanded\def\page_col_command_check_if_float_fits
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_one_command_check_if_float_fits
- \else
- \page_col_command_check_if_float_fits_indeed
- \fi}
+% \unexpanded\def\page_col_command_check_if_float_fits
+% {\ifconditional\c_page_floats_not_permitted
+% \global\setfalse\c_page_floats_room
+% %\else\ifabsdim\dimexpr\d_page_col_available-\naturalfloatwd\relax<\onepoint
+% \else\ifdim\dimexpr\d_page_col_available-\naturalfloatwd\relax>-\onepoint
+% \global\settrue\c_page_floats_room
+% \else
+% \global\setfalse\c_page_floats_room
+% \fi\fi
+% \ifconditional\c_page_floats_room
+% \begingroup
+% \scratchdimen\dimexpr\pagetotal+\lineheight\relax
+% \ifdim\scratchdimen>\pagegoal
+% \goodbreak
+% \ifdim\dimexpr\d_page_col_available-\naturalfloatwd\relax>\onepoint
+% \global\setfalse\c_page_floats_room
+% \else
+% \global\settrue\c_page_floats_room
+% \fi
+% \fi
+% \endgroup
+% \fi
+% \ifconditional\c_page_floats_room
+% \ifdim\pagetotal>\zeropoint
+% \scratchdimenone\dimexpr\pagetotal+\floatheight+\d_strc_floats_top-\pageshrink\relax
+% \scratchdimentwo\pagegoal
+% \relax % needed
+% \ifcase\c_page_one_float_method
+% % method 0 : raw
+% \or
+% % method 1 : safe
+% \advance\scratchdimentwo -\strutdp
+% \or
+% % method 2 : tight
+% \advance\scratchdimenone -\onepoint
+% \fi
+% \relax % really needed ! ! ! !
+% \ifdim\scratchdimenone>\scratchdimentwo
+% \global\setfalse\c_page_floats_room
+% \fi
+% \fi
+% \ifconditional\c_page_floats_room
+% \global\setbox\floatbox\hpack to \d_page_col_available{\hss\box\floatbox\hss}%
+% \fi
+% \fi}
-\unexpanded\def\page_col_command_check_if_float_fits_indeed
+\unexpanded\def\page_col_command_check_if_float_fits
{\ifconditional\c_page_floats_not_permitted
+ % forget about it anyway
\global\setfalse\c_page_floats_room
- \else\ifabsdim\dimexpr\d_page_col_available-\naturalfloatwd\relax<\onepoint
- \global\settrue\c_page_floats_room
\else
- \global\setfalse\c_page_floats_room
- \fi\fi
- \ifconditional\c_page_floats_room
- \begingroup
- \scratchdimen\dimexpr\pagetotal+\lineheight\relax
- \ifdim\scratchdimen>\pagegoal
- \goodbreak
- \ifdim\dimexpr\d_page_col_available-\naturalfloatwd\relax>\onepoint
- \global\setfalse\c_page_floats_room
- \else
- \global\settrue\c_page_floats_room
- \fi
+ % first we check the current column
+% \ifdim\dimexpr\d_page_col_width-\naturalfloatwd\relax>-\onepoint
+ \ifdim\dimexpr\hsize-\naturalfloatwd\relax>-\onepoint
+ \global\settrue\c_page_floats_room
+ \else
+ \global\setfalse\c_page_floats_room
\fi
- \endgroup
- \fi
- \ifconditional\c_page_floats_room
- \ifdim\pagetotal>\zeropoint
- \scratchdimenone\dimexpr\pagetotal+\floatheight+\d_strc_floats_top-\pageshrink\relax
- \scratchdimentwo\pagegoal
- \relax % needed
- \ifcase\c_page_one_float_method
- % method 0 : raw
- \or
- % method 1 : safe
- \advance\scratchdimentwo -\strutdp
- \or
- % method 2 : tight
- \advance\scratchdimenone -\onepoint
+ \ifconditional\c_page_floats_room
+ % we fit in the column but do we have room
+ \ifdim\dimexpr\pagetotal+\lineheight\relax>\pagegoal
+ % try again later
+ \goodbreak
\fi
- \relax % really needed ! ! ! !
- \ifdim\scratchdimenone>\scratchdimentwo
- \global\setfalse\c_page_floats_room
+ \ifdim\pagetotal>\zeropoint
+ \scratchdimenone\dimexpr\pagetotal+\floatheight+\d_strc_floats_top-\pageshrink\relax
+ \scratchdimentwo\pagegoal
+ \relax % needed
+ \ifcase\c_page_one_float_method
+ % method 0 : raw
+ \or
+ % method 1 : safe
+ \advance\scratchdimentwo -\strutdp
+ \or
+ % method 2 : tight
+ \advance\scratchdimenone -\onepoint
+ \fi
+ \relax % really needed ! ! ! !
+ \ifdim\scratchdimenone>\scratchdimentwo
+ % there is no room, give up
+ \global\setfalse\c_page_floats_room
+ % now we can decide on a top float
+% \fi
+ \else
+% \ifconditional\c_page_floats_room
+% \global\setbox\floatbox\hpack to \d_page_col_float_available{\hss\box\floatbox\hss}%
+% \fi
+ \fi
\fi
\fi
- \ifconditional\c_page_floats_room
- \global\setbox\floatbox\hpack to \d_page_col_available{\hss\box\floatbox\hss}%
- \fi
\fi}
%D \unknown
-\unexpanded\def\page_col_command_flush_floats
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_one_command_flush_floats
- \else
- \page_col_command_flush_floats_indeed
- \fi}
-
\def\page_col_set_float_pack_hsize
{\ifnum\c_page_col_current=\c_page_col_n_of_columns
\c_page_col_current\plusone
\else
\advance\c_page_col_current\plusone
\fi
- \page_col_command_set_hsize_indeed
+ \page_col_command_set_hsize
\hsize\d_page_col_available}
-\unexpanded\def\page_col_command_flush_floats_indeed
+\unexpanded\def\page_col_command_flush_floats
{\global\settrue\c_page_floats_flushing
\ifconditional\c_page_floats_some_waiting
\par
\page_col_set_float_pack_hsize
- \page_col_command_flush_floats_indeed_indeed
+ \page_col_command_flush_floats_indeed
\fi
\global\savednoffloats\zerocount
\global\setfalse\c_page_floats_some_waiting
@@ -400,7 +391,7 @@
\let\page_floats_show_pack_state\gobbleoneargument
-\def\page_col_command_flush_floats_indeed_indeed % much in common with OTRSET
+\def\page_col_command_flush_floats_indeed % much in common with OTRSET
{\ifconditional\c_page_floats_some_waiting
\ifconditional\c_page_floats_pack_flushed
\setfalse\c_page_floats_center_box % not needed as we do call directly
@@ -439,7 +430,7 @@
\hfil}%
\doplacefloatbox
% \page_one_insert_top_float
- \doubleexpandafter\page_col_command_flush_floats_indeed_indeed
+ \doubleexpandafter\page_col_command_flush_floats_indeed
\else
% todo
\fi
@@ -447,7 +438,7 @@
\page_floats_get
% \page_one_insert_top_float
\doplacefloatbox
- \doubleexpandafter\page_col_command_flush_floats_indeed_indeed
+ \doubleexpandafter\page_col_command_flush_floats_indeed
\fi
\fi}
@@ -464,20 +455,6 @@
\fi\fi
\fi}
-\unexpanded\def\page_col_command_flush_top_insertions
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_one_command_flush_top_insertions
- \else
- \page_col_command_flush_top_insertions_indeed
- \fi}
-
-\unexpanded\def\page_col_command_flush_bottom_insertions
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_one_command_flush_bottom_insertions
- \else
- \page_col_command_flush_bottom_insertions_indeed
- \fi}
-
\unexpanded\def\page_col_command_set_top_insertions
{\bgroup
\ifconditional\c_page_floats_some_waiting
@@ -561,15 +538,8 @@
\fi
\page_col_command_set_top_insertions_indeed}
-\unexpanded\def\page_col_command_set_bottom_insertions
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_one_command_set_bottom_insertions
- \else
- \page_col_command_set_bottom_insertions_indeed
- \fi}
-
-\let\page_col_command_flush_top_insertions_indeed \page_one_command_flush_top_insertions
-\let\page_col_command_flush_bottom_insertions_indeed\page_one_command_flush_bottom_insertions
+\let\page_col_command_flush_top_insertions \page_one_command_flush_top_insertions
+\let\page_col_command_flush_bottom_insertions\page_one_command_flush_bottom_insertions
%let\page_col_command_set_top_insertions \page_one_command_set_top_insertions
\let\page_col_command_set_bottom_insertions \page_one_command_set_bottom_insertions
@@ -631,14 +601,7 @@
%D \unknown
-\unexpanded\def\page_col_command_routine % yet the same
- {\ifnum\c_page_col_n_of_columns=\plusone
- \page_sides_output_routine
- \else
- \page_sides_output_routine_column
- \fi}
-
-\def\page_sides_output_routine_column
+\unexpanded\def\page_col_command_routine
{\ifconditional\c_page_sides_short
\page_sides_output_routine_yes_column
\else
@@ -677,6 +640,8 @@
% why was this \global\holdinginserts\zerocount
\global\setfalse\c_page_sides_short}
+\let\page_col_command_flush_all_floats\relax
+
%D \unknown
\defineoutputroutine
@@ -685,21 +650,22 @@
\s!page_otr_command_package_contents =\page_col_command_package_contents,
\s!page_otr_command_set_vsize =\page_col_command_set_vsize,
\s!page_otr_command_set_hsize =\page_col_command_set_hsize,
+ % \s!page_otr_command_synchronize_hsize =\page_col_command_synchronize_hsize, % not done
\s!page_otr_command_next_page =\page_col_command_next_page,
\s!page_otr_command_next_page_and_inserts =\page_col_command_next_page_and_inserts,
- % \s!page_otr_command_synchronize_hsize =\page_col_command_synchronize_hsize, % not done
\s!page_otr_command_set_top_insertions =\page_col_command_set_top_insertions,
\s!page_otr_command_set_bottom_insertions =\page_col_command_set_bottom_insertions,
\s!page_otr_command_flush_top_insertions =\page_col_command_flush_top_insertions,
\s!page_otr_command_flush_bottom_insertions=\page_col_command_flush_bottom_insertions,
- % \s!page_otr_command_set_float_hsize =\page_col_command_set_float_hsize, % not done
\s!page_otr_command_check_if_float_fits =\page_col_command_check_if_float_fits,
+ % \s!page_otr_command_set_float_hsize =\page_col_command_set_float_hsize, % not done
\s!page_otr_command_flush_float_box =\page_col_command_flush_float_box,
- \s!page_otr_command_synchronize_side_floats=\page_col_command_synchronize_side_floats,
\s!page_otr_command_side_float_output =\page_col_command_side_float_output,
+ \s!page_otr_command_synchronize_side_floats=\page_col_command_synchronize_side_floats,
\s!page_otr_command_flush_floats =\page_col_command_flush_floats,
\s!page_otr_command_flush_side_floats =\page_col_command_flush_side_floats,
\s!page_otr_command_flush_saved_floats =\page_col_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats =\page_col_command_flush_all_floats,
\s!page_otr_command_flush_margin_blocks =\page_col_command_flush_margin_blocks,
\s!page_otr_command_test_column =\page_col_command_test_page
]
@@ -745,9 +711,6 @@
%D The main interface:
-\setupoutputroutine
- [\s!pagecolumn]
-
\installcorenamespace{pagecolumns}
\installframedcommandhandler \??pagecolumns {pagecolumns} \??pagecolumns
@@ -793,11 +756,15 @@
{\let\currentpagecolumns\empty
\setuppagecolumns[#1]}%
{\edef\currentpagecolumns{#1}}%
- %
- % \page_col_enable_grid_snapping
- %
- \d_page_col_distance \pagecolumnsparameter\c!distance\relax
- \c_page_col_n_of_columns \pagecolumnsparameter\c!n\relax
+ \c_page_col_n_of_columns\pagecolumnsparameter\c!n\relax
+ \ifnum\c_page_col_n_of_columns>\plusone
+ \expandafter\page_col_start_yes
+ \else
+ \expandafter\page_col_start_nop
+ \fi} % public
+
+\unexpanded\def\page_col_start_yes
+ {\d_page_col_distance \pagecolumnsparameter\c!distance\relax
% \d_page_col_max_height \pagecolumnsparameter\c!maxheight
\d_page_col_max_width \pagecolumnsparameter\c!maxwidth
% \d_page_col_balance_step \pagecolumnsparameter\c!step
@@ -829,20 +796,35 @@
\setupoutputroutine[\s!pagecolumn]%
%
\setupfloats[\c!ntop=\plusthousand]%
+ % \setupfloats[\c!nbottom=\plusthousand]%
%
\page_col_command_set_vsize
\page_col_command_set_hsize
%
- \nofcolumns\c_page_mix_n_of_columns} % public
+ \nofcolumns\c_page_mix_n_of_columns
+ %
+ \unexpanded\def\page_col_start[##1]%
+ {\page_col_start_nop}%
+ %
+ \let\stoppagecolumns\page_col_stop_yes}
+
+\unexpanded\def\page_col_start_nop
+ {\nofcolumns\c_page_mix_n_of_columns
+ \let\stoppagecolumns\page_col_stop_nop}
-\unexpanded\def\stoppagecolumns
+\unexpanded\def\page_col_stop_yes
{\column % \page_otr_eject_page
\page
\endgroup
- \setupoutputroutine[\s!singlecolumn]%
- \page_col_command_set_vsize
- \page_col_command_set_hsize
+ % \setupoutputroutine[\s!singlecolumn]%
+ \page_otr_command_set_vsize
+ \page_otr_command_set_hsize
\page
\endgroup}
+\unexpanded\def\page_col_stop_nop
+ {\page
+ \endgroup
+ \endgroup}
+
\protect \endinput
diff --git a/tex/context/base/mkiv/page-set.mkiv b/tex/context/base/mkiv/page-set.mkiv
index 261aabf7a..fb6f607a1 100644
--- a/tex/context/base/mkiv/page-set.mkiv
+++ b/tex/context/base/mkiv/page-set.mkiv
@@ -661,7 +661,7 @@
\installcolumnbreakmethod \s!columnset \v!local
{\OTRSETcolumnhbreak
- \page_otr_flush_all_floats
+ \page_set_command_flush_all_floats
\page_otr_eject_page
% no \page_set_command_set_hsize, can be mid smaller (like tabulate)
% also, this one should be executed at the outer level
@@ -2598,27 +2598,31 @@
\fi
\fi}
+\unexpanded\def\page_set_command_flush_all_floats
+ {\page_one_command_flush_all_floats}
+
\defineoutputroutine
[\s!columnset]
[\s!page_otr_command_routine =\page_set_command_routine,
\s!page_otr_command_package_contents =\page_set_command_package_contents,
\s!page_otr_command_set_vsize =\page_set_command_set_vsize,
% \s!page_otr_command_set_hsize =\page_one_command_set_hsize, % tricky, goes wrong
+ \s!page_otr_command_synchronize_hsize =\page_set_command_synchronize_hsize,
\s!page_otr_command_next_page =\page_set_command_next_page,
\s!page_otr_command_next_page_and_inserts =\page_set_command_next_page_and_inserts,
- \s!page_otr_command_synchronize_hsize =\page_set_command_synchronize_hsize,
\s!page_otr_command_set_top_insertions =\page_set_command_set_top_insertions,
\s!page_otr_command_set_bottom_insertions =\page_set_command_set_bottom_insertions,
\s!page_otr_command_flush_top_insertions =\page_set_command_flush_top_insertions,
\s!page_otr_command_flush_bottom_insertions =\page_set_command_flush_bottom_insertions,
- \s!page_otr_command_set_float_hsize =\page_set_command_set_float_hsize,
\s!page_otr_command_check_if_float_fits =\page_set_command_check_if_float_fits,
+ \s!page_otr_command_set_float_hsize =\page_set_command_set_float_hsize,
\s!page_otr_command_flush_float_box =\page_set_command_flush_float_box,
- \s!page_otr_command_synchronize_side_floats =\page_set_command_synchronize_side_floats,
\s!page_otr_command_side_float_output =\page_set_command_side_float_output,
+ \s!page_otr_command_synchronize_side_floats =\page_set_command_synchronize_side_floats,
\s!page_otr_command_flush_floats =\page_set_command_flush_floats,
\s!page_otr_command_flush_side_floats =\page_set_command_flush_side_floats,
- \s!page_otr_command_flush_saved_floats =\page_set_command_flush_saved_floats
+ \s!page_otr_command_flush_saved_floats =\page_set_command_flush_saved_floats,
+ \s!page_otr_command_flush_all_floats =\page_set_command_flush_all_floats,
% \s!page_otr_command_flush_margin_blocks =\page_set_command_flush_margin_blocks, % not used
]
diff --git a/tex/context/base/mkiv/publ-aut.lua b/tex/context/base/mkiv/publ-aut.lua
index becb7b125..76308825e 100644
--- a/tex/context/base/mkiv/publ-aut.lua
+++ b/tex/context/base/mkiv/publ-aut.lua
@@ -14,7 +14,7 @@ end
local lpeg = lpeg
local type, next, tostring, tonumber = type, next, tostring, tonumber
-local concat = table.concat
+local concat, sortedhash = table.concat, table.sortedhash
local utfsub = utf.sub
local formatters = string.formatters
@@ -123,19 +123,22 @@ end
local authormap = allocate()
publications.authormap = authormap
-local function splitauthor(author)
- local detail = cache[author]
- if detail then
- return detail
- end
- local remapped = authormap[author]
- if remapped then
- report("remapping %a to %a",author,remapped)
- local detail = cache[remapped]
+local function splitauthor(author,justsplit)
+ local detail, remapped
+ if not justsplit then
+ detail = cache[author]
if detail then
- cache[author] = detail
return detail
end
+ remapped = authormap[author]
+ if remapped then
+ report("remapping %a to %a",author,remapped)
+ local detail = cache[remapped]
+ if detail then
+ cache[author] = detail
+ return detail
+ end
+ end
end
local author = remapped or author
local firstnames, vons, surnames, initials, juniors, options
@@ -253,8 +256,10 @@ local function splitauthor(author)
if initials and #initials > 0 then detail.initials = initials end
if juniors and #juniors > 0 then detail.juniors = juniors end
if options and next(options) then detail.options = options end
- cache[author] = detail
- nofhits = nofhits + 1
+ if not justsplit then
+ cache[author] = detail
+ nofhits = nofhits + 1
+ end
return detail
end
@@ -293,8 +298,8 @@ local function splitauthorstring(str)
return authors
end
-publications.splitoneauthor = splitauthor
-publications.splitauthor = splitauthorstring
+publications.splitoneauthor = splitauthor
+publications.splitauthor = splitauthorstring
local function the_initials(initials,symbol,connector)
if not symbol then
@@ -307,18 +312,20 @@ local function the_initials(initials,symbol,connector)
for i=1,#initials do
local initial = initials[i]
if type(initial) == "table" then
+ -- J.-J.
local set, s = { }, 0
for i=1,#initial do
if i > 1 then
s = s + 1 ; set[s] = connector
end
s = s + 1 ; set[s] = initial[i]
+ s = s + 1 ; set[s] = symbol
end
- r = r + 1 ; result[r] = concat(set) .. symbol
+ r = r + 1 ; result[r] = concat(set)
else
+ -- J.
r = r + 1 ; result[r] = initial .. symbol
end
- -- r = r + 1 ; result[r] = symbol
end
return result
end
@@ -536,6 +543,9 @@ local collapsers = allocate { }
publications.authorcollapsers = collapsers
+-- making a constructor doesn't make the code nicer as the_initials is an
+-- exception
+
local function default(author) -- one author
local hash = author.hash
if hash then
@@ -713,8 +723,101 @@ authorhashers.normalshort = function(authors)
end
end
-authorhashers.normalinverted = authorhashers.normal
-authorhashers.invertedshort = authorhashers.normalshort
+local sequentialhash = function(authors)
+ if type(authors) == "table" then
+ local n = #authors
+ if n == 0 then
+ return ""
+ end
+ local result = { }
+ local nofresult = 0
+ for i=1,n do
+ local author = authors[i]
+ local vons = author.vons
+ local surnames = author.surnames
+ local firstnames = author.firstnames
+ local juniors = author.juniors
+ if firstnames and #firstnames > 0 then
+ for j=1,#firstnames do
+ nofresult = nofresult + 1
+ result[nofresult] = firstnames[j]
+ end
+ end
+ if vons and #vons > 0 then
+ for j=1,#vons do
+ nofresult = nofresult + 1
+ result[nofresult] = vons[j]
+ end
+ end
+ if surnames and #surnames > 0 then
+ for j=1,#surnames do
+ nofresult = nofresult + 1
+ result[nofresult] = surnames[j]
+ end
+ end
+ if juniors and #juniors > 0 then
+ for j=1,#juniors do
+ nofresult = nofresult + 1
+ result[nofresult] = juniors[j]
+ end
+ end
+ end
+ return concat(result," ")
+ else
+ return authors
+ end
+end
+
+local sequentialshorthash = function(authors)
+ if type(authors) == "table" then
+ local n = #authors
+ if n == 0 then
+ return ""
+ end
+ local result = { }
+ local nofresult = 0
+ for i=1,n do
+ local author = authors[i]
+ local vons = author.vons
+ local surnames = author.surnames
+ local initials = author.initials
+ local juniors = author.juniors
+ if initials and #initials > 0 then
+ initials = the_initials(initials)
+ for j=1,#initials do
+ nofresult = nofresult + 1
+ result[nofresult] = initials[j]
+ end
+ end
+ if vons and #vons > 0 then
+ for j=1,#vons do
+ nofresult = nofresult + 1
+ result[nofresult] = vons[j]
+ end
+ end
+ if surnames and #surnames > 0 then
+ for j=1,#surnames do
+ nofresult = nofresult + 1
+ result[nofresult] = surnames[j]
+ end
+ end
+ if juniors and #juniors > 0 then
+ for j=1,#juniors do
+ nofresult = nofresult + 1
+ result[nofresult] = juniors[j]
+ end
+ end
+ end
+ return concat(result," ")
+ else
+ return authors
+ end
+end
+
+authorhashers.sequential = sequentialhash
+authorhashers.sequentialshort = sequentialshorthash
+authorhashers.normalinverted = authorhashers.normal
+authorhashers.invertedshort = authorhashers.normalshort
local p_clean = Cs ( (
P("\\btxcmd") / "" -- better keep the argument
@@ -874,6 +977,31 @@ implement {
name = "btxremapauthor",
arguments = { "string", "string" },
actions = function(k,v)
- publications.authormap[k] = v
+ local a = { splitauthor(k,true) }
+ local s1 = sequentialhash(a)
+ local s2 = sequentialshorthash(a)
+ if not authormap[k] then
+ authormap[k] = v
+ report("%a mapped onto %a",k,v)
+ end
+ if not authormap[s1] then
+ authormap[s1] = v
+ report("%a mapped onto %a, derived from %a",s1,v,k)
+ end
+ if not authormap[s2] then
+ authormap[s2] = v
+ report("%a mapped onto %a, derived from %a",s2,v,k)
+ end
+ end
+}
+
+implement {
+ name = "btxshowauthorremapping",
+ actions = function(k,v)
+ report("start author remapping")
+ for k, v in sortedhash(authormap) do
+ report(" %s => %s",k,v)
+ end
+ report("stop author remapping")
end
}
diff --git a/tex/context/base/mkiv/publ-ini.mkiv b/tex/context/base/mkiv/publ-ini.mkiv
index 6c28bcf90..9f970547d 100644
--- a/tex/context/base/mkiv/publ-ini.mkiv
+++ b/tex/context/base/mkiv/publ-ini.mkiv
@@ -1140,6 +1140,9 @@
\def\btx_remap_author[#1][#2]%
{\clf_btxremapauthor{#1}{#2}}
+\unexpanded\def\btxshowauthorremapping
+ {\clf_btxshowauthorremapping}
+
\unexpanded\def\btxflushauthor
{\doifelsenextoptionalcs\btx_flush_author_yes\btx_flush_author_nop}
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 53fefa668..de25dd503 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index e2fd24d5b..8b8060c3f 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi
index 0a1f59335..45d395f21 100644
--- a/tex/context/base/mkiv/strc-flt.mkvi
+++ b/tex/context/base/mkiv/strc-flt.mkvi
@@ -494,6 +494,12 @@
% place
+\let\floatlabel \empty
+\let\floatcolumn \empty
+\let\floatrow \empty
+\let\floatlocation \empty
+\let\floatlocationmethod\empty
+
\def\strc_floats_analyze_location
{% moved here, will do more
\let\floatlabel \empty
diff --git a/tex/context/base/mkiv/util-lib.lua b/tex/context/base/mkiv/util-lib.lua
index 490cb3291..714cfd4c7 100644
--- a/tex/context/base/mkiv/util-lib.lua
+++ b/tex/context/base/mkiv/util-lib.lua
@@ -355,22 +355,39 @@ We use the same lookup logic for ffi loading.
-- local message, library = pcall(savedffiload,nameonly(name))
-- poplibpath()
+ local loaded = { }
+
local function locateindeed(name)
- local message, library = pcall(savedffiload,removesuffix(name))
- if type(message) == "userdata" then
- return message
- elseif type(library) == "userdata" then
- return library
- else
- return false
+ name = removesuffix(name)
+ local l = loaded[name]
+ if l == nil then
+ local message, library = pcall(savedffiload,name)
+ if type(message) == "userdata" then
+ l = message
+ elseif type(library) == "userdata" then
+ l = library
+ else
+ l = false
+ end
+ loaded[name] = l
+ elseif trace_ffilib then
+ report_ffilib("reusing already loaded %a",name)
end
+ return l
end
- function ffilib(required,version)
- if version == "system" then
+ function ffilib(name,version)
+ name = removesuffix(name)
+ local l = loaded[name]
+ if l ~= nil then
+ if trace_ffilib then
+ report_ffilib("reusing already loaded %a",name)
+ end
+ return l
+ elseif version == "system" then
return locateindeed(name)
else
- return locate(required,version,trace_ffilib,report_ffilib,locateindeed)
+ return locate(name,version,trace_ffilib,report_ffilib,locateindeed)
end
end
@@ -382,6 +399,7 @@ We use the same lookup logic for ffi loading.
if trace_ffilib then
report_ffilib("trying to load %a using normal loader",name)
end
+ -- so here we don't store
return savedffiload(name)
end
diff --git a/tex/context/base/mkiv/util-sql-imp-ffi.lua b/tex/context/base/mkiv/util-sql-imp-ffi.lua
index 4c0a17d27..213fce18e 100644
--- a/tex/context/base/mkiv/util-sql-imp-ffi.lua
+++ b/tex/context/base/mkiv/util-sql-imp-ffi.lua
@@ -143,7 +143,8 @@ ffi.cdef [[
]]
local sql = utilities.sql
-local mysql = ffi.load(os.name == "windows" and "libmysql" or "libmysqlclient")
+----- mysql = ffi.load(os.name == "windows" and "libmysql" or "libmysqlclient")
+local mysql = ffilib(os.name == "windows" and "libmysql" or "libmysqlclient")
local nofretries = 5
local retrydelay = 1
diff --git a/tex/context/base/mkiv/util-sql-imp-sqlite.lua b/tex/context/base/mkiv/util-sql-imp-sqlite.lua
index 85ef83d45..04d5ced3a 100644
--- a/tex/context/base/mkiv/util-sql-imp-sqlite.lua
+++ b/tex/context/base/mkiv/util-sql-imp-sqlite.lua
@@ -70,7 +70,8 @@ ffi.cdef [[
local ffi_tostring = ffi.string
-local sqlite = ffi.load("sqlite3")
+----- sqlite = ffi.load("sqlite3")
+local sqlite = ffilib("sqlite3")
sqlite.sqlite3_initialize();
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 35b8810b8..4301961ca 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index c941d4cc1..95cf9aa50 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-section.xml b/tex/context/interface/mkiv/i-section.xml
index 3f462db02..c2c8bbdd5 100644
--- a/tex/context/interface/mkiv/i-section.xml
+++ b/tex/context/interface/mkiv/i-section.xml
@@ -310,192 +310,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="part" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="chapter" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="section" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsection" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsection" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsubsection" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsubsubsection" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="title" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subject" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubject" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsubject" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsubsubject" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsubsubsubject" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="part" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="chapter" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="section" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsection" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsection" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsubsection" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsubsubsection" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="title" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subject" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubject" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsubject" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsubsubject" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="subsubsubsubsubject" type="environment" level="document" category="structure" file="strc-sec.mkiv">
- <cd:arguments>
- <cd:resolve name="assignment-sectiondata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="namedsection" type="environment" level="document" category="structure" file="strc-sec.mkiv">
<cd:arguments>
<cd:resolve name="keyword-section"/>
@@ -703,4 +517,4 @@
<cd:command name="headsetupspacing" level="system" category="structure" file="strc-ren.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/tex/context/modules/common/s-abr-01.tex b/tex/context/modules/common/s-abr-01.tex
index 48e9559d6..ee10bda6e 100644
--- a/tex/context/modules/common/s-abr-01.tex
+++ b/tex/context/modules/common/s-abr-01.tex
@@ -117,6 +117,7 @@
\logo [FLAC] {flac}
\logo [FAQ] {faq}
\logo [FDF] {fdf}
+\logo [FFI] {ffi}
\logo [FONTFORGE] {FontForge}
\logo [FOXET] {foXet}
\logo [FPTEX] {fp\TeXsuffix}
diff --git a/tex/context/modules/mkiv/m-scite.mkiv b/tex/context/modules/mkiv/m-scite.mkiv
index fb880f493..e6dffaeb5 100644
--- a/tex/context/modules/mkiv/m-scite.mkiv
+++ b/tex/context/modules/mkiv/m-scite.mkiv
@@ -62,7 +62,7 @@ local f_fore_bold = formatters["\\unexpanded\\def\\slx%s#1{{\\slxc%s\\bf#1}}%%"]
local f_none_bold = formatters["\\unexpanded\\def\\slx%s#1{{\\bf#1}}%%"]
local f_none_none = formatters["\\unexpanded\\def\\slx%s#1{{#1}}%%"]
local f_texstyled = formatters["\\slx%s{%s}"]
-local f_hanging = formatters["\\slxb{%s}%s\\slxe"]
+local f_hanging = formatters["\\slxb{%r}%s\\slxe"] -- we need to round: lua 5.3
local v_none = interfaces.variables.none
diff --git a/tex/context/modules/mkiv/x-setups-basics.mkiv b/tex/context/modules/mkiv/x-setups-basics.mkiv
index 6975df684..0836de76b 100644
--- a/tex/context/modules/mkiv/x-setups-basics.mkiv
+++ b/tex/context/modules/mkiv/x-setups-basics.mkiv
@@ -32,8 +32,14 @@
\defineregister
[texmacro]
+\unexpanded\def\texcommandmeaning#1{}
+\unexpanded\def\texcommandusage #1{}
+
\definesorting
[texcommand]
+ [texcommands]
+ [\texcommandmeaning]
+ [\texcommandusage]
\setupsorting
[texcommand]
@@ -108,7 +114,6 @@
\let\currentSETUPprefix\empty
}
\edef\currentSETUPname{\xmlatt{#1}{name}}
- \let\currentSETUPgenerated\empty
\doifelsenothing {\xmlatt{#1}{variant}} {
\let\currentSETUPvariant\empty
} {
@@ -118,7 +123,6 @@
\currentSETUPprefix
\currentSETUPname
\currentSETUPvariant
- \currentSETUPgenerated
}
\stopxmlsetups
@@ -132,8 +136,7 @@
} {
\let\currentSETUPprefix\empty
}
-% \edef\currentSETUPname{\xmlatt{#1}{name}}
- \let\currentSETUPgenerated\empty
+ \edef\currentSETUPname{\xmlatt{#1}{name}}
\doifelsenothing {\xmlatt{#1}{variant}} {
\let\currentSETUPvariant\empty
} {
@@ -143,58 +146,21 @@
\currentSETUPprefix
\currentSETUPname
\currentSETUPvariant
- \currentSETUPgenerated
}
\stopxmlsetups
-% \startxmlsetups xml:setups:register
-% \doifelse {\xmlatt{#1}{variant}} {instance} {
-% \def\docommand##1%
-% {\def\currentSETUPname{##1}%
-% \xmlsetup{#1}{xml:setups:assemblename:instance}
-% \expanded{\texcommand[stp:x:\currentSETUPfullname]{{#1}{##1}}}}%
-% \processcommacommand[\clf_getinstances{#1}]\docommand
-% } {
-% \xmlsetup{#1}{xml:setups:assemblename}
-% % not really needed if we just use setups
-% \expanded{\texcommand[stp:x:\currentSETUPfullname]{{#1}{}}}
-% }
-% \stopxmlsetups
-
-\settrue\c_cmd_show_registered
-
-\let\currentSETUPinclusion\empty
-
-\installtextracker
- {cmd.showregistered}
- {\settrue\c_cmd_show_registered}
- {\setfalse\c_cmd_show_registered}
-
\startxmlsetups xml:setups:register
- \ifconditional\c_cmd_show_registered
- \edef\currentSETUPinclusion{\xmlinclusionbase{#1}}%
- \ifx\currentSETUPinclusion\empty\else
- \edef\currentSETUPinclusion{\currentSETUPinclusion: }
- \fi
- \else
- \let\currentSETUPinclusion\empty
- \fi
- \doif {\xmlatt{#1}{variant}} {instance} {
+% \doif {\xmlatt{#1}{variant}} {instance} {
+ \doifcommon {\xmlatt{#1}{variant}} {instance,instance:assignment,instance:ownnumber} {
\def\docommand##1{
\xmlsetup{#1}{xml:setups:assemblename:instance}
- \ifconditional\c_cmd_show_registered
- %\writestatus{known setup}{\currentSETUPinclusion stp:x:\currentSETUPfullname:##1}%
- \writestatus{known setup}{\currentSETUPinclusion \currentSETUPfullname:##1}%
- \fi
- \expanded{\texcommand[stp:x:\currentSETUPfullname:##1]{{#1}{##1}}}}%
+% \expanded{\texcommand[stp:x:\currentSETUPfullname:##1]{{#1}{##1}}}}%
+ \expanded{\texcommand[\currentSETUPfullname:##1]{{#1}{##1}}}}%
\processcommacommand[\clf_getinstances{#1}]\docommand
}
\xmlsetup{#1}{xml:setups:assemblename}
- % not really needed if we just use setups
- \ifconditional\c_cmd_show_registered
- \writestatus{known setup}{\currentSETUPinclusion stp:x:\currentSETUPfullname}%
- \fi
- \expanded{\texcommand[stp:x:\currentSETUPfullname]{{#1}{}}}
+% \expanded{\texcommand[stp:x:\currentSETUPfullname]{{#1}{}}}
+ \expanded{\texcommand[\currentSETUPfullname]{{#1}{}}}
\stopxmlsetups
\startluacode
@@ -224,6 +190,9 @@
local definitions = { }
setups.definitions = definitions
+ local report = logs.reporter("command setup")
+ local report_known = logs.reporter("command setup","known")
+
function xml.functions.setups_define(id)
local x = lxmlgetid(id)
for c in xmlcollected(x,"cd:interface/cd:define") do
@@ -295,9 +264,9 @@
if resolved then
e.__p__.dt[e.ni] = resolved
resolve(resolved)
- -- logs.report("setups","resolved: %a",name)
+ -- report("resolved: %a",name)
else
- logs.report("setups","unable to resolve: %a",name)
+ report("unable to resolve: %a",name)
end
end
end
@@ -404,6 +373,31 @@
overload = true,
arguments = { "string" },
}
+
+ if structures then
+ local synonyms = structures.synonyms
+ if synonyms then
+ local collected = synonyms.collected
+ if collected then
+ local texcommand = collected.texcommand
+ if texcommand then
+ local entries = texcommand.entries
+ if entries then
+ local t = { }
+ local n = #entries
+ for i=1,n do
+-- t[i] = gsub(entries[i].definition.tag,"^stp:x:","")
+ t[i] = entries[i].definition.tag
+ end
+ table.sort(t)
+ for i=1,n do
+ report_known(t[i])
+ end
+ end
+ end
+ end
+ end
+ end
\stopluacode
% <?xml version="1.0" encoding="UTF-8"?>
@@ -494,15 +488,18 @@
\fi}
\def\cmd_show_setup_nop#1% this will trigger 'used'
- {\registersort[texcommand][stp:x:#1]%
+% {\registersort[texcommand][stp:x:#1]%
+ {\registersort[texcommand][#1]%
\ifconditional\c_cmd_show_setup
- \writestatus{setup}{#1 / \rawsynonymname{texcommand}{stp:x:#1}}%
+% \writestatus{setup}{#1 / \rawsynonymname{texcommand}{stp:x:#1}}%
+ \writestatus{setup}{#1 / \rawsynonymname{texcommand}{#1}}%
\fi
\startelement[setup][name=#1]%
\startelement[noexport][comment={setup definition #1}]%
- \edef\cmd_id{\rawsynonymname{texcommand}{stp:x:#1}}%
+% \edef\cmd_id{\rawsynonymname{texcommand}{stp:x:#1}}%
+ \edef\cmd_id{\rawsynonymname{texcommand}{#1}}%
\ifx\cmd_id\empty
- missing: stp:x:#1
+ missing: #1
\else
\ifx\m_cmd_instance\empty
\edef\m_cmd_instance{\expandafter\secondoftwoarguments\cmd_id}%
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 3e59cb448..ef0152436 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 11/19/17 20:15:33
+-- merge date : 11/22/17 13:35:39
do -- begin closure to overcome local limits and interference