summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-07-24 12:35:49 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-07-24 12:35:49 +0200
commit352517495e32813d30d0080f2a0c8dd1afea794a (patch)
tree346f33901602d6bd6db1c5913ff092fcf821fa10
parent82c674fdcf5bcff4ad0dc0936d638fc729145616 (diff)
downloadcontext-352517495e32813d30d0080f2a0c8dd1afea794a.tar.gz
2022-07-24 12:18:00
-rw-r--r--context/data/scite/context/lexers/data/scite-context-data-context.lua2
-rw-r--r--context/data/scite/context/lexers/data/scite-context-data-metafun.lua4
-rw-r--r--context/data/scite/context/lexers/data/scite-context-data-tex.lua2
-rw-r--r--context/data/scite/context/scite-context-data-context.properties91
-rw-r--r--context/data/scite/context/scite-context-data-metafun.properties185
-rw-r--r--context/data/scite/context/scite-context-data-tex.properties141
-rw-r--r--doc/context/documents/general/manuals/luametatex.pdfbin1278862 -> 1322429 bytes
-rw-r--r--doc/context/sources/general/manuals/luametatex/luametatex-differences.tex21
-rw-r--r--doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex523
-rw-r--r--doc/context/sources/general/manuals/luametatex/luametatex-math.tex725
-rw-r--r--doc/context/sources/general/manuals/luametatex/luametatex-rejected.tex94
-rw-r--r--doc/context/sources/general/manuals/luametatex/luametatex.tex4
-rw-r--r--metapost/context/base/mpxl/mp-lmtx.mpxl154
-rw-r--r--metapost/context/base/mpxl/mp-luas.mpxl4
-rw-r--r--metapost/context/base/mpxl/mp-tool.mpxl12
-rw-r--r--scripts/context/lua/mtxrun.lua36
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua36
-rw-r--r--scripts/context/stubs/unix/mtxrun36
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua36
-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/mkii/mult-cs.mkii5
-rw-r--r--tex/context/base/mkii/mult-it.mkii8
-rw-r--r--tex/context/base/mkii/mult-ro.mkii5
-rw-r--r--tex/context/base/mkiv/char-def.lua4
-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/mlib-pps.lua1
-rw-r--r--tex/context/base/mkiv/mult-fun.lua2
-rw-r--r--tex/context/base/mkiv/mult-low.lua11
-rw-r--r--tex/context/base/mkiv/mult-prm.lua8
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24614 -> 24590 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin258249 -> 258691 bytes
-rw-r--r--tex/context/base/mkiv/util-prs.lua27
-rw-r--r--tex/context/base/mkiv/util-tab.lua18
-rw-r--r--tex/context/base/mkxl/anch-box.mkxl3
-rw-r--r--tex/context/base/mkxl/anch-pgr.lmt38
-rw-r--r--tex/context/base/mkxl/buff-ini.lmt237
-rw-r--r--tex/context/base/mkxl/buff-ini.mkxl16
-rw-r--r--tex/context/base/mkxl/buff-ver.mkxl6
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl3
-rw-r--r--tex/context/base/mkxl/font-con.lmt4
-rw-r--r--tex/context/base/mkxl/font-ctx.lmt17
-rw-r--r--tex/context/base/mkxl/grph-fig.mkxl12
-rw-r--r--tex/context/base/mkxl/grph-trf.mkxl2
-rw-r--r--tex/context/base/mkxl/lpdf-emb.lmt1
-rw-r--r--tex/context/base/mkxl/lpdf-lmt.lmt3
-rw-r--r--tex/context/base/mkxl/math-act.lmt312
-rw-r--r--tex/context/base/mkxl/math-ali.mkxl437
-rw-r--r--tex/context/base/mkxl/math-dim.lmt279
-rw-r--r--tex/context/base/mkxl/math-fen.mkxl81
-rw-r--r--tex/context/base/mkxl/math-frc.mkxl45
-rw-r--r--tex/context/base/mkxl/math-ini.lmt1
-rw-r--r--tex/context/base/mkxl/math-ini.mkxl79
-rw-r--r--tex/context/base/mkxl/math-noa.lmt8
-rw-r--r--tex/context/base/mkxl/math-spa.lmt56
-rw-r--r--tex/context/base/mkxl/math-twk.mkxl60
-rw-r--r--tex/context/base/mkxl/math-vfu.lmt3
-rw-r--r--tex/context/base/mkxl/meta-ini.mkxl4
-rw-r--r--tex/context/base/mkxl/mlib-fio.lmt34
-rw-r--r--tex/context/base/mkxl/mlib-int.lmt6
-rw-r--r--tex/context/base/mkxl/mlib-pps.lmt1
-rw-r--r--tex/context/base/mkxl/mlib-scn.lmt24
-rw-r--r--tex/context/base/mkxl/node-ali.lmt238
-rw-r--r--tex/context/base/mkxl/strc-blk.mkxl32
-rw-r--r--tex/context/base/mkxl/strc-mat.mkxl214
-rw-r--r--tex/context/base/mkxl/supp-box.mkxl2
-rw-r--r--tex/context/base/mkxl/syst-aux.mkxl15
-rw-r--r--tex/context/base/mkxl/syst-ini.mkxl5
-rw-r--r--tex/context/base/mkxl/syst-mac.lmt2
-rw-r--r--tex/context/base/mkxl/tabl-tab.mkxl8
-rw-r--r--tex/context/base/mkxl/task-ini.lmt4
-rw-r--r--tex/context/base/mkxl/type-set.mkxl3
-rw-r--r--tex/context/base/mkxl/typo-bld.mkxl22
-rw-r--r--tex/context/base/mkxl/typo-lbx.lmt3
-rw-r--r--tex/context/base/mkxl/typo-lbx.mkxl4
-rw-r--r--tex/context/fonts/mkiv/bonum-math.lfg71
-rw-r--r--tex/context/fonts/mkiv/cambria-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/dejavu-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/garamond-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/kpfonts-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/libertinus-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/lm.lfg483
-rw-r--r--tex/context/fonts/mkiv/lucida-opentype-math.lfg4
-rw-r--r--tex/context/fonts/mkiv/pagella-math.lfg17
-rw-r--r--tex/context/fonts/mkiv/schola-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/stix-two-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/termes-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/type-imp-euler.mkiv9
-rw-r--r--tex/context/fonts/mkiv/type-imp-lucida-opentype.mkiv14
-rw-r--r--tex/context/interface/mkii/keys-cs.xml5
-rw-r--r--tex/context/interface/mkii/keys-it.xml8
-rw-r--r--tex/context/interface/mkii/keys-ro.xml5
-rw-r--r--tex/context/modules/mkiv/m-scite.mkiv2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
96 files changed, 3566 insertions, 1599 deletions
diff --git a/context/data/scite/context/lexers/data/scite-context-data-context.lua b/context/data/scite/context/lexers/data/scite-context-data-context.lua
index fa1e5da63..41af3f425 100644
--- a/context/data/scite/context/lexers/data/scite-context-data-context.lua
+++ b/context/data/scite/context/lexers/data/scite-context-data-context.lua
@@ -1,4 +1,4 @@
return {
- ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "centeringskip", "stretchingskip", "shrinkingskip", "centeringfillskip", "stretchingfillskip", "shrinkingfillskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "binaryshiftedten", "binaryshiftedtwenty", "binaryshiftedthirty", "thickermuskip", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "prerollrun", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "statuswrite", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "rlncatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", "hsizefrozenparcode", "skipfrozenparcode", "hangfrozenparcode", "indentfrozenparcode", "parfillfrozenparcode", "adjustfrozenparcode", "protrudefrozenparcode", "tolerancefrozenparcode", "stretchfrozenparcode", "loosenessfrozenparcode", "lastlinefrozenparcode", "linepenaltyfrozenparcode", "clubpenaltyfrozenparcode", "widowpenaltyfrozenparcode", "displaypenaltyfrozenparcode", "brokenpenaltyfrozenparcode", "demeritsfrozenparcode", "shapefrozenparcode", "linefrozenparcode", "hyphenationfrozenparcode", "shapingpenaltyfrozenparcode", "orphanpenaltyfrozenparcode", "allfrozenparcode", "mathpenaltyfrozenparcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "alsosimplegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "markautomigrationcode", "insertautomigrationcode", "adjustautomigrationcode", "preautomigrationcode", "postautomigrationcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode", "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "checkligatureandkernmathcontrolcode", "applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode", "reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode", "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "italicshapekernmathcontrolcode", "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", "noitaliccorrectionglyphoptioncode", "normalparcontextcode", "vmodeparcontextcode", "vboxparcontextcode", "vtopparcontextcode", "vcenterparcontextcode", "vadjustparcontextcode", "insertparcontextcode", "outputparcontextcode", "alignparcontextcode", "noalignparcontextcode", "spanparcontextcode", "resetparcontextcode", "leftoriginlistanchorcode", "leftheightlistanchorcode", "leftdepthlistanchorcode", "rightoriginlistanchorcode", "rightheightlistanchorcode", "rightdepthlistanchorcode", "centeroriginlistanchorcode", "centerheightlistanchorcode", "centerdepthlistanchorcode", "halfwaytotallistanchorcode", "halfwayheightlistanchorcode", "halfwaydepthlistanchorcode", "halfwayleftlistanchorcode", "halfwayrightlistanchorcode", "negatexlistsigncode", "negateylistsigncode", "negatelistsigncode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordinarycode", "mathordcode", "mathoperatorcode", "mathopcode", "mathbinarycode", "mathbincode", "mathrelationcode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctuationcode", "mathpunctcode", "mathovercode", "mathundercode", "mathinnercode", "mathradicalcode", "mathfractioncode", "mathmiddlecode", "mathaccentcode", "mathfencedcode", "mathghostcode", "mathvariablecode", "mathactivecode", "mathvcentercode", "mathconstructcode", "mathwrappedcode", "mathbegincode", "mathendcode", "mathexplicitcode", "mathdivisioncode", "mathfactorialcode", "mathdimensioncode", "mathexperimentalcode", "mathtextpunctuationcode", "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode", "mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationcode", "automatichyphenationcode", "explicithyphenationcode", "syllablehyphenationcode", "uppercasehyphenationcode", "collapsehyphenationcode", "compoundhyphenationcode", "strictstarthyphenationcode", "strictendhyphenationcode", "automaticpenaltyhyphenationcode", "explicitpenaltyhyphenationcode", "permitgluehyphenationcode", "permitallhyphenationcode", "permitmathreplacehyphenationcode", "forcecheckhyphenationcode", "lazyligatureshyphenationcode", "forcehandlerhyphenationcode", "feedbackcompoundhyphenationcode", "ignoreboundshyphenationcode", "partialhyphenationcode", "completehyphenationcode", "normalizelinenormalizecode", "parindentskipnormalizecode", "swaphangindentnormalizecode", "swapparsshapenormalizecode", "breakafterdirnormalizecode", "removemarginkernsnormalizecode", "clipwidthnormalizecode", "flattendiscretionariesnormalizecode", "discardzerotabskipsnormalizecode", "flattenhleadersnormalizecode", "normalizeparnormalizeparcode", "flattenvleadersnormalizeparcode", "nopreslackclassoptioncode", "nopostslackclassoptioncode", "lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode", "lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions", "checkligatureclassoptioncode", "flattenclassoptioncode", "omitpenaltyclassoptioncode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode", "noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noitaliccorrectionglyphoptioncode", "nokerningcode", "noligaturingcode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "ordmathflattencode", "binmathflattencode", "relmathflattencode", "punctmathflattencode", "innermathflattencode", "normalworddiscoptioncode", "preworddiscoptioncode", "postworddiscoptioncode", "continueifinputfile", "continuewhenlmtxmode", "continuewhenmkivmode" },
+ ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "centeringskip", "stretchingskip", "shrinkingskip", "centeringfillskip", "stretchingfillskip", "shrinkingfillskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "binaryshiftedten", "binaryshiftedtwenty", "binaryshiftedthirty", "thickermuskip", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "prerollrun", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "statuswrite", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "rlncatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", "hsizefrozenparcode", "skipfrozenparcode", "hangfrozenparcode", "indentfrozenparcode", "parfillfrozenparcode", "adjustfrozenparcode", "protrudefrozenparcode", "tolerancefrozenparcode", "stretchfrozenparcode", "loosenessfrozenparcode", "lastlinefrozenparcode", "linepenaltyfrozenparcode", "clubpenaltyfrozenparcode", "widowpenaltyfrozenparcode", "displaypenaltyfrozenparcode", "brokenpenaltyfrozenparcode", "demeritsfrozenparcode", "shapefrozenparcode", "linefrozenparcode", "hyphenationfrozenparcode", "shapingpenaltyfrozenparcode", "orphanpenaltyfrozenparcode", "allfrozenparcode", "mathpenaltyfrozenparcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "alsosimplegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "markautomigrationcode", "insertautomigrationcode", "adjustautomigrationcode", "preautomigrationcode", "postautomigrationcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode", "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "applyordinarykernpairmathcontrolcode", "applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode", "reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode", "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", "noitaliccorrectionglyphoptioncode", "normalparcontextcode", "vmodeparcontextcode", "vboxparcontextcode", "vtopparcontextcode", "vcenterparcontextcode", "vadjustparcontextcode", "insertparcontextcode", "outputparcontextcode", "alignparcontextcode", "noalignparcontextcode", "spanparcontextcode", "resetparcontextcode", "leftoriginlistanchorcode", "leftheightlistanchorcode", "leftdepthlistanchorcode", "rightoriginlistanchorcode", "rightheightlistanchorcode", "rightdepthlistanchorcode", "centeroriginlistanchorcode", "centerheightlistanchorcode", "centerdepthlistanchorcode", "halfwaytotallistanchorcode", "halfwayheightlistanchorcode", "halfwaydepthlistanchorcode", "halfwayleftlistanchorcode", "halfwayrightlistanchorcode", "negatexlistsigncode", "negateylistsigncode", "negatelistsigncode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordinarycode", "mathordcode", "mathoperatorcode", "mathopcode", "mathbinarycode", "mathbincode", "mathrelationcode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctuationcode", "mathpunctcode", "mathovercode", "mathundercode", "mathinnercode", "mathradicalcode", "mathfractioncode", "mathmiddlecode", "mathaccentcode", "mathfencedcode", "mathghostcode", "mathvariablecode", "mathactivecode", "mathvcentercode", "mathconstructcode", "mathwrappedcode", "mathbegincode", "mathendcode", "mathexplicitcode", "mathdivisioncode", "mathfactorialcode", "mathdimensioncode", "mathexperimentalcode", "mathtextpunctuationcode", "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode", "mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", "mathunarycode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationcode", "automatichyphenationcode", "explicithyphenationcode", "syllablehyphenationcode", "uppercasehyphenationcode", "collapsehyphenationcode", "compoundhyphenationcode", "strictstarthyphenationcode", "strictendhyphenationcode", "automaticpenaltyhyphenationcode", "explicitpenaltyhyphenationcode", "permitgluehyphenationcode", "permitallhyphenationcode", "permitmathreplacehyphenationcode", "forcecheckhyphenationcode", "lazyligatureshyphenationcode", "forcehandlerhyphenationcode", "feedbackcompoundhyphenationcode", "ignoreboundshyphenationcode", "partialhyphenationcode", "completehyphenationcode", "normalizelinenormalizecode", "parindentskipnormalizecode", "swaphangindentnormalizecode", "swapparsshapenormalizecode", "breakafterdirnormalizecode", "removemarginkernsnormalizecode", "clipwidthnormalizecode", "flattendiscretionariesnormalizecode", "discardzerotabskipsnormalizecode", "flattenhleadersnormalizecode", "normalizeparnormalizeparcode", "flattenvleadersnormalizeparcode", "nopreslackclassoptioncode", "nopostslackclassoptioncode", "lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode", "lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions", "checkligatureclassoptioncode", "checkitaliccorrectionclassoptioncode", "checkkernpairclassoptioncode", "flattenclassoptioncode", "omitpenaltyclassoptioncode", "unpackclassoptioncode", "raiseprimeclassoptioncode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode", "noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noitaliccorrectionglyphoptioncode", "nokerningcode", "noligaturingcode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "ordmathflattencode", "binmathflattencode", "relmathflattencode", "punctmathflattencode", "innermathflattencode", "normalworddiscoptioncode", "preworddiscoptioncode", "postworddiscoptioncode", "continueifinputfile", "continuewhenlmtxmode", "continuewhenmkivmode" },
["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "nofarguments", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "vpenalty", "hpenalty", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "untraceddonothing", "dontcomplain", "moreboxtracing", "lessboxtracing", "noboxtracing", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "forceinlinemath", "mathortext", "thebox", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchstring", "scratchstringone", "scratchstringtwo", "tempstring", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "scratchmacro", "scratchmacroone", "scratchmacrotwo", "scratchconditiontrue", "scratchconditionfalse", "ifscratchcondition", "scratchconditiononetrue", "scratchconditiononefalse", "ifscratchconditionone", "scratchconditiontwotrue", "scratchconditiontwofalse", "ifscratchconditiontwo", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "simplegroupedcommandcs", "pickupgroupedcommand", "pickupgroupedcommandcs", "mathgroupedcommandcs", "usedbaselineskip", "usedlineskip", "usedlineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "boxtostring", "contentostring", "prerolltostring", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "scratchitalic", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextcharcs", "doifnextcharcselse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doifelseassignmentcs", "doifassignmentelsecs", "validassignment", "novalidassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "quitcondition", "truecondition", "falsecondition", "tracingall", "tracingnone", "loggingall", "tracingcatcodes", "showluatokens", "aliasmacro", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeytabs", "obeypages", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "naturalspace", "controlspace", "normalspaces", "ignoretabs", "ignorelines", "ignorepages", "ignoreeofs", "setcontrolspaces", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "directmeasure", "setquantity", "setequantity", "setgquantity", "setxquantity", "definequantity", "freezequantity", "quantity", "quantitied", "directquantity", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "doloopovermatch", "doloopovermatched", "doloopoverlist", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "setconditional", "newmacro", "setnewmacro", "newfraction", "newsignal", "newboundary", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "mathclassvalue", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "aligncontentleft", "aligncontentmiddle", "aligncontentright", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "ordfracspacing", "ordradspacing", "ordmiddlespacing", "ordaccentspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "opfracspacing", "opradspacing", "opmiddlespacing", "opaccentspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "binfracspacing", "binradspacing", "binmiddlespacing", "binaccentspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "relfracspacing", "relradspacing", "relmiddlespacing", "relaccentspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "openfracspacing", "openradspacing", "openmiddlespacing", "openaccentspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "closefracspacing", "closeradspacing", "closemiddlespacing", "closeaccentspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "punctfracspacing", "punctradspacing", "punctmiddlespacing", "punctaccentspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "innerfracspacing", "innerradspacing", "innermiddlespacing", "inneraccentspacing", "fracordspacing", "fracopspacing", "fracbinspacing", "fracrelspacing", "fracopenspacing", "fracclosespacing", "fracpunctspacing", "fracinnerspacing", "fracfracspacing", "fracradspacing", "fracmiddlespacing", "fracaccentspacing", "radordspacing", "radopspacing", "radbinspacing", "radrelspacing", "radopenspacing", "radclosespacing", "radpunctspacing", "radinnerspacing", "radfracspacing", "radradspacing", "radmiddlespacing", "radaccentspacing", "middleordspacing", "middleopspacing", "middlebinspacing", "middlerelspacing", "middleopenspacing", "middleclosespacing", "middlepunctspacing", "middleinnerspacing", "middlefracspacing", "middleradspacing", "middlemiddlespacing", "middleaccentspacing", "accentordspacing", "accentopspacing", "accentbinspacing", "accentrelspacing", "accentopenspacing", "accentclosespacing", "accentpunctspacing", "accentinnerspacing", "accentfracspacing", "accentradspacing", "accentmiddlespacing", "accentaccentspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "normalprimescript", "superscript", "subscript", "nosuperscript", "nosubscript", "primescript", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", "uncramped", "cramped", "mathstyletrigger", "triggermathstyle", "triggeredmathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "ctxluamatch", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "freezeparagraphproperties", "defrostparagraphproperties", "setparagraphfreezing", "forgetparagraphfreezing", "updateparagraphproperties", "updateparagraphpenalties", "updateparagraphdemerits", "updateparagraphshapes", "updateparagraphlines", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "Umathtopaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "rtltext", "ltrtext", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "dohyphencollapsing", "nohyphencollapsing", "compounddiscretionary", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "hcontainer", "vcontainer", "tcontainer", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs", "openout", "closeout", "write", "openin", "closein", "read", "readline", "readfromterminal", "boxlines", "boxline", "setboxline", "copyboxline", "boxlinewd", "boxlineht", "boxlinedp", "boxlinenw", "boxlinenh", "boxlinend", "boxlinels", "boxliners", "boxlinelh", "boxlinerh", "boxlinelp", "boxlinerp", "boxlinein", "boxrangewd", "boxrangeht", "boxrangedp", "bitwiseset", "bitwiseand", "bitwiseor", "bitwisexor", "bitwisenot", "bitwisenil", "ifbitwiseand", "bitwise", "bitwiseshift", "bitwiseflip", "textdir", "linedir", "pardir", "boxdir", "prelistbox", "postlistbox", "prelistcopy", "postlistcopy", "setprelistbox", "setpostlistbox", "noligaturing", "nokerning", "noexpansion", "noprotrusion", "noleftkerning", "noleftligaturing", "norightkerning", "norightligaturing", "noitaliccorrection", "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", "pushoverloadmode", "popoverloadmode", "pushrunstate", "poprunstate", "suggestedalias", "showboxhere", "discoptioncodestring", "flagcodestring", "frozenparcodestring", "glyphoptioncodestring", "groupcodestring", "hyphenationcodestring", "mathcontrolcodestring", "mathflattencodestring", "normalizecodestring", "parcontextcodestring", "newlocalcount", "newlocaldimen", "newlocalskip", "newlocalmuskip", "newlocaltoks", "newlocalbox", "newlocalwrite", "newlocalread", "setnewlocalcount", "setnewlocaldimen", "setnewlocalskip", "setnewlocalmuskip", "setnewlocaltoks", "setnewlocalbox", "ifexpression" },
} \ No newline at end of file
diff --git a/context/data/scite/context/lexers/data/scite-context-data-metafun.lua b/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
index d2d5cec13..be9b2692a 100644
--- a/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
+++ b/context/data/scite/context/lexers/data/scite-context-data-metafun.lua
@@ -1,4 +1,4 @@
return {
- ["commands"]={ "loadfile", "loadimage", "loadmodule", "dispose", "nothing", "transparency", "tolist", "topath", "tocycle", "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "tanh", "zmod", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "randomizedcontrols", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "perpendicular", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "drawdoublearrows", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "boundingradius", "boundingcircle", "boundingpoint", "crossingunder", "insideof", "outsideof", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withcircularshade", "withlinearshade", "defineshade", "shaded", "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter", "withshadedirection", "withshaderadius", "withshadetransform", "withshadecenterone", "withshadecentertwo", "withshadestep", "withshadefraction", "withshadeorigin", "shownshadevector", "shownshadeorigin", "shownshadedirection", "shownshadecenter", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "figure", "register", "outlinetext", "filloutlinetext", "drawoutlinetext", "outlinetexttopath", "checkedbounds", "checkbounds", "strut", "rule", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "colordecimalslist", "textext", "thetextext", "rawtextext", "textextoffset", "texbox", "thetexbox", "rawtexbox", "istextext", "infotext", "rawmadetext", "validtexbox", "onetimetextext", "rawfmttext", "thefmttext", "fmttext", "onetimefmttext", "notcached", "keepcached", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "withopacity", "property", "properties", "withproperties", "asgroup", "withpattern", "withpatternscale", "withpatternfloat", "infont", "space", "crlf", "dquote", "percent", "SPACE", "CRLF", "DQUOTE", "PERCENT", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "colorlike", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedfunction", "constructedpath", "constructedpairs", "straightfunction", "straightpath", "straightpairs", "curvedfunction", "curvedpath", "curvedpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "resetarrows", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "basiccolors", "complementary", "complemented", "resolvedcolor", "normalfill", "normaldraw", "visualizepaths", "detailpaths", "naturalizepaths", "drawboundary", "drawwholepath", "drawpathonly", "visualizeddraw", "visualizedfill", "detaileddraw", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "pencilled", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "topair", "format", "formatted", "quotation", "quote", "startpassingvariable", "stoppassingvariable", "eofill", "eoclip", "nofill", "dofill", "fillup", "eofillup", "nodraw", "dodraw", "enfill", "area", "addbackground", "shadedup", "shadeddown", "shadedleft", "shadedright", "sortlist", "copylist", "shapedlist", "listtocurves", "listtolines", "listsize", "listlast", "uniquelist", "circularpath", "squarepath", "linearpath", "theoffset", "texmode", "systemmode", "texvar", "texstr", "isarray", "prefix", "dimension", "getmacro", "getdimen", "getcount", "gettoks", "setmacro", "setdimen", "setcount", "settoks", "setglobalmacro", "setglobaldimen", "setglobalcount", "setglobaltoks", "positionpath", "positioncurve", "positionxy", "positionparagraph", "positioncolumn", "positionwhd", "positionpage", "positionregion", "positionbox", "positionx", "positiony", "positionanchor", "positioninregion", "positionatanchor", "positioncolumnbox", "overlaycolumnbox", "positioncolumnatx", "getposboxes", "getmultipars", "getpospage", "getposparagraph", "getposcolumn", "getposregion", "getposx", "getposy", "getposwidth", "getposheight", "getposdepth", "getposleftskip", "getposrightskip", "getposhsize", "getposparindent", "getposhangindent", "getposhangafter", "getposxy", "getposupperleft", "getposlowerleft", "getposupperright", "getposlowerright", "getposllx", "getposlly", "getposurx", "getposury", "wdpart", "htpart", "dppart", "texvar", "texstr", "inpath", "pointof", "leftof", "rightof", "utfnum", "utflen", "utfsub", "newhash", "disposehash", "inhash", "tohash", "fromhash", "isarray", "prefix", "isobject", "comment", "report", "lua", "lualist", "mp", "MP", "luacall", "mirrored", "mirroredabout", "xslanted", "yslanted", "scriptindex", "newscriptindex", "newcolor", "newrgbcolor", "newcmykcolor", "newnumeric", "newboolean", "newtransform", "newpath", "newpicture", "newstring", "newpair", "mpvard", "mpvarn", "mpvars", "mpvar", "withtolerance", "hatched", "withdashes", "processpath", "pencilled", "sortedintersectiontimes", "intersectionpath", "firstintersectionpath", "secondintersectionpath", "intersectionsfound", "cutbeforefirst", "cutafterfirst", "cutbeforelast", "cutafterlast", "xnormalized", "ynormalized", "xynormalized", "phantom", "scrutinized" },
- ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "shadeoffset", "textextoffset", "textextanchor", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "ahvariant", "ahdimple", "ahfactor", "ahscale", "metapostversion", "maxdimensions", "drawoptionsfactor", "dq", "sq", "crossingscale", "crossingoption", "crossingdebug", "contextlmtxmode", "metafunversion", "minifunversion", "getparameters", "presetparameters", "hasparameter", "hasoption", "getparameter", "getparameterdefault", "getparametercount", "getmaxparametercount", "getparameterpath", "getparameterpen", "getparametertext", "applyparameters", "pushparameters", "popparameters", "setluaparameter", "definecolor", "record", "newrecord", "setrecord", "getrecord", "cntrecord", "anchorxy", "anchorx", "anchory", "anchorht", "anchordp", "anchorul", "anchorll", "anchorlr", "anchorur", "localanchorbox", "localanchorcell", "localanchorspan", "anchorbox", "anchorcell", "anchorspan", "matrixbox", "matrixcell", "matrixspan", "pensilcolor", "pensilstep" },
+ ["commands"]={ "loadfile", "loadimage", "loadmodule", "dispose", "nothing", "transparency", "tolist", "topath", "tocycle", "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "tanh", "zmod", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle", "unitoctagon", "fulloctagon", "unithexagon", "fullhexagon", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "randomizedcontrols", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "perpendicular", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "drawdoublearrows", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "boundingradius", "boundingcircle", "boundingpoint", "crossingunder", "insideof", "outsideof", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withcircularshade", "withlinearshade", "defineshade", "shaded", "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter", "withshadedirection", "withshaderadius", "withshadetransform", "withshadecenterone", "withshadecentertwo", "withshadestep", "withshadefraction", "withshadeorigin", "shownshadevector", "shownshadeorigin", "shownshadedirection", "shownshadecenter", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "figure", "register", "outlinetext", "filloutlinetext", "drawoutlinetext", "outlinetexttopath", "checkedbounds", "checkbounds", "strut", "rule", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "colordecimalslist", "textext", "thetextext", "rawtextext", "textextoffset", "texbox", "thetexbox", "rawtexbox", "istextext", "infotext", "rawmadetext", "validtexbox", "onetimetextext", "rawfmttext", "thefmttext", "fmttext", "onetimefmttext", "notcached", "keepcached", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "withopacity", "property", "properties", "withproperties", "asgroup", "withpattern", "withpatternscale", "withpatternfloat", "infont", "space", "crlf", "dquote", "percent", "SPACE", "CRLF", "DQUOTE", "PERCENT", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "colorlike", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedfunction", "constructedpath", "constructedpairs", "straightfunction", "straightpath", "straightpairs", "curvedfunction", "curvedpath", "curvedpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "resetarrows", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "basiccolors", "complementary", "complemented", "resolvedcolor", "normalfill", "normaldraw", "visualizepaths", "detailpaths", "naturalizepaths", "drawboundary", "drawwholepath", "drawpathonly", "visualizeddraw", "visualizedfill", "detaileddraw", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "pencilled", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "topair", "format", "formatted", "quotation", "quote", "startpassingvariable", "stoppassingvariable", "eofill", "eoclip", "nofill", "dofill", "fillup", "eofillup", "nodraw", "dodraw", "enfill", "area", "addbackground", "shadedup", "shadeddown", "shadedleft", "shadedright", "sortlist", "copylist", "shapedlist", "listtocurves", "listtolines", "listsize", "listlast", "uniquelist", "circularpath", "squarepath", "linearpath", "theoffset", "texmode", "systemmode", "texvar", "texstr", "isarray", "prefix", "dimension", "getmacro", "getdimen", "getcount", "gettoks", "setmacro", "setdimen", "setcount", "settoks", "setglobalmacro", "setglobaldimen", "setglobalcount", "setglobaltoks", "positionpath", "positioncurve", "positionxy", "positionparagraph", "positioncolumn", "positionwhd", "positionpage", "positionregion", "positionbox", "positionx", "positiony", "positionanchor", "positioninregion", "positionatanchor", "positioncolumnbox", "overlaycolumnbox", "positioncolumnatx", "getposboxes", "getmultipars", "getpospage", "getposparagraph", "getposcolumn", "getposregion", "getposx", "getposy", "getposwidth", "getposheight", "getposdepth", "getposleftskip", "getposrightskip", "getposhsize", "getposparindent", "getposhangindent", "getposhangafter", "getposxy", "getposupperleft", "getposlowerleft", "getposupperright", "getposlowerright", "getposllx", "getposlly", "getposurx", "getposury", "wdpart", "htpart", "dppart", "texvar", "texstr", "inpath", "pointof", "leftof", "rightof", "utfnum", "utflen", "utfsub", "newhash", "disposehash", "inhash", "tohash", "fromhash", "isarray", "prefix", "isobject", "comment", "report", "lua", "lualist", "mp", "MP", "luacall", "mirrored", "mirroredabout", "xslanted", "yslanted", "scriptindex", "newscriptindex", "newcolor", "newrgbcolor", "newcmykcolor", "newnumeric", "newboolean", "newtransform", "newpath", "newpicture", "newstring", "newpair", "mpvard", "mpvarn", "mpvars", "mpvar", "withtolerance", "hatched", "withdashes", "processpath", "pencilled", "sortedintersectiontimes", "intersectionpath", "firstintersectionpath", "secondintersectionpath", "intersectionsfound", "cutbeforefirst", "cutafterfirst", "cutbeforelast", "cutafterlast", "xnormalized", "ynormalized", "xynormalized", "phantom", "scrutinized" },
+ ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "shadeoffset", "textextoffset", "textextanchor", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "ahvariant", "ahdimple", "ahfactor", "ahscale", "metapostversion", "maxdimensions", "drawoptionsfactor", "dq", "sq", "crossingscale", "crossingoption", "crossingdebug", "contextlmtxmode", "metafunversion", "minifunversion", "getparameters", "presetparameters", "hasparameter", "hasoption", "getparameter", "getparameterdefault", "getparametercount", "getmaxparametercount", "getparameterpath", "getparameterpen", "getparametertext", "applyparameters", "mergeparameters", "pushparameters", "popparameters", "setluaparameter", "definecolor", "record", "newrecord", "setrecord", "getrecord", "cntrecord", "anchorxy", "anchorx", "anchory", "anchorht", "anchordp", "anchorul", "anchorll", "anchorlr", "anchorur", "localanchorbox", "localanchorcell", "localanchorspan", "anchorbox", "anchorcell", "anchorspan", "matrixbox", "matrixcell", "matrixspan", "pensilcolor", "pensilstep" },
} \ No newline at end of file
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 42d66790a..28b463116 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", "everyeof", "firstmarks", "fontchardp", "fontcharht", "fontcharic", "fontcharwd", "glueexpr", "glueshrink", "glueshrinkorder", "gluestretch", "gluestretchorder", "gluetomu", "ifcsname", "ifdefined", "iffontchar", "interactionmode", "interlinepenalties", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracinglevels", "tracingnesting", "unexpanded", "unless", "widowpenalties" },
- ["luatex"]={ "Uabove", "Uabovewithdelims", "Uatop", "Uatopwithdelims", "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "UmathDelimiterPercent", "UmathDelimiterShortfall", "Umathaccent", "Umathaccentbasedepth", "Umathaccentbaseheight", "Umathaccentbottomoverschoot", "Umathaccentbottomshiftdown", "Umathaccentsuperscriptdrop", "Umathaccentsuperscriptpercent", "Umathaccenttopovershoot", "Umathaccenttopshiftup", "Umathaccentvariant", "Umathadapttoleft", "Umathadapttoright", "Umathaxis", "Umathbotaccentvariant", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclass", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathdegreevariant", "Umathdelimiterovervariant", "Umathdelimiterundervariant", "Umathdenominatorvariant", "Umathextrasubpreshift", "Umathextrasubprespace", "Umathextrasubshift", "Umathextrasubspace", "Umathextrasuppreshift", "Umathextrasupprespace", "Umathextrasupshift", "Umathextrasupspace", "Umathflattenedaccentbasedepth", "Umathflattenedaccentbaseheight", "Umathflattenedaccentbottomshiftdown", "Umathflattenedaccenttopshiftup", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathfractionvariant", "Umathhextensiblevariant", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathlimits", "Umathnoaxis", "Umathnolimits", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathnumeratorvariant", "Umathopenupdepth", "Umathopenupheight", "Umathoperatorsize", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervariant", "Umathoverdelimitervgap", "Umathoverlayaccentvariant", "Umathoverlinevariant", "Umathphantom", "Umathpresubshiftdistance", "Umathpresupshiftdistance", "Umathprimeraise", "Umathprimeshiftdrop", "Umathprimeshiftup", "Umathprimespaceafter", "Umathprimevariant", "Umathprimewidth", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvariant", "Umathradicalvgap", "Umathruledepth", "Umathruleheight", "Umathskeweddelimitertolerance", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathsource", "Umathspaceafterscript", "Umathspacebeforescript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvariant", "Umathstackvgap", "Umathsubscriptvariant", "Umathsubshiftdistance", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsuperscriptvariant", "Umathsupshiftdistance", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathtopaccentvariant", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervariant", "Umathunderdelimitervgap", "Umathunderlinevariant", "Umathuseaxis", "Umathvextensiblevariant", "Umathvoid", "Umathxscale", "Umathyscale", "Umiddle", "Unosubprescript", "Unosubscript", "Unosuperprescript", "Unosuperscript", "Uoperator", "Uover", "Uoverdelimiter", "Uoverwithdelims", "Uprimescript", "Uradical", "Uright", "Uroot", "Ushiftedsubprescript", "Ushiftedsubscript", "Ushiftedsuperprescript", "Ushiftedsuperscript", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Ustyle", "Usubprescript", "Usubscript", "Usuperprescript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "adjustspacingshrink", "adjustspacingstep", "adjustspacingstretch", "afterassigned", "aftergrouped", "aliased", "alignmark", "alignmentcellsource", "alignmentwrapsource", "aligntab", "allcrampedstyles", "alldisplaystyles", "allmathstyles", "allscriptscriptstyles", "allscriptstyles", "allsplitstyles", "alltextstyles", "alluncrampedstyles", "atendofgroup", "atendofgrouped", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenpenalty", "automigrationmode", "autoparagraphmode", "begincsname", "beginlocalcontrol", "beginmathgroup", "beginsimplegroup", "boundary", "boxadapt", "boxanchor", "boxanchors", "boxattribute", "boxdirection", "boxfreeze", "boxgeometry", "boxorientation", "boxshift", "boxsource", "boxtarget", "boxtotal", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "catcodetable", "clearmarks", "copymathatomrule", "copymathparent", "copymathspacing", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "currentloopiterator", "currentloopnesting", "currentmarks", "defcsname", "dimensiondef", "dimexpression", "directlua", "edefcsname", "efcode", "endlocalcontrol", "endmathgroup", "endsimplegroup", "enforced", "etoks", "etoksapp", "etokspre", "everybeforepar", "everymathatom", "everytab", "exceptionpenalty", "expand", "expandafterpars", "expandafterspaces", "expandcstoken", "expanded", "expandedafter", "expandedloop", "expandtoken", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", "flushmarks", "fontcharta", "fontid", "fontmathcontrol", "fontspecdef", "fontspecid", "fontspecifiedsize", "fontspecscale", "fontspecxscale", "fontspecyscale", "fonttextcontrol", "formatname", "frozen", "futurecsname", "futuredef", "futureexpand", "futureexpandis", "futureexpandisap", "gdefcsname", "gleaders", "glet", "gletcsname", "glettonothing", "gluespecdef", "glyphdatafield", "glyphoptions", "glyphscale", "glyphscriptfield", "glyphscriptscale", "glyphscriptscriptscale", "glyphstatefield", "glyphtextscale", "glyphxoffset", "glyphxscale", "glyphxscaled", "glyphyoffset", "glyphyscale", "glyphyscaled", "gtoksapp", "gtokspre", "hccode", "hjcode", "hpack", "hyphenationmin", "hyphenationmode", "ifabsdim", "ifabsnum", "ifarguments", "ifboolean", "ifchkdim", "ifchknum", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", "ifdimexpression", "ifdimval", "ifempty", "ifflags", "ifhaschar", "ifhastok", "ifhastoks", "ifhasxtoks", "ifincsname", "ifinsert", "ifmathparameter", "ifmathstyle", "ifnumexpression", "ifnumval", "ifparameter", "ifparameters", "ifrelax", "iftok", "ignorearguments", "ignorepars", "immediate", "immutable", "inherited", "initcatcodetable", "insertbox", "insertcopy", "insertdepth", "insertdistance", "insertheight", "insertheights", "insertlimit", "insertmaxdepth", "insertmode", "insertmultiplier", "insertpenalty", "insertprogress", "insertstorage", "insertstoring", "insertunbox", "insertuncopy", "insertwidth", "instance", "integerdef", "lastarguments", "lastboundary", "lastchkdim", "lastchknum", "lastleftclass", "lastloopiterator", "lastnamedcs", "lastnodesubtype", "lastpageextra", "lastparcontext", "lastrightclass", "leftmarginkern", "letcharcode", "letcsname", "letfrozen", "letmathatomrule", "letmathparent", "letmathspacing", "letprotected", "lettonothing", "linebreakcriterium", "linedirection", "localbrokenpenalty", "localcontrol", "localcontrolled", "localcontrolledloop", "localinterlinepenalty", "localleftbox", "localleftboxbox", "localmiddlebox", "localmiddleboxbox", "localrightbox", "localrightboxbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathaccent", "mathatom", "mathatomglue", "mathatomskip", "mathbackwardpenalties", "mathbeginclass", "mathdelimitersmode", "mathdirection", "mathdisplaymode", "mathdisplayskipmode", "mathdoublescriptmode", "mathendclass", "matheqnogapstep", "mathfenced", "mathfencesmode", "mathfontcontrol", "mathforwardpenalties", "mathfrac", "mathghost", "mathgluemode", "mathgroupingmode", "mathleftclass", "mathlimitsmode", "mathmiddle", "mathnolimitsmode", "mathpenaltiesmode", "mathrad", "mathrightclass", "mathrulesfam", "mathrulesmode", "mathscale", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathslackmode", "mathspacingmode", "mathstackstyle", "mathstyle", "mathstylefontid", "mathsurroundmode", "mathsurroundskip", "maththreshold", "mugluespecdef", "mutable", "noaligned", "noatomruling", "noboundary", "nohrule", "norelax", "normalizelinemode", "normalizeparmode", "nospaces", "novrule", "numericscale", "numexpression", "orelse", "orphanpenalties", "orphanpenalty", "orunless", "outputbox", "overloaded", "overloadmode", "pageboundary", "pageboundarypenalty", "pageextragoal", "pagevsize", "parametercount", "parametermark", "parattribute", "pardirection", "permanent", "pettymuskip", "postexhyphenchar", "posthyphenchar", "postinlinepenalty", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "preinlinepenalty", "prerelpenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitloop", "quitvmode", "resetmathspacing", "retokenized", "rightmarginkern", "rpcode", "savecatcodetable", "scaledemwidth", "scaledexheight", "scaledextraspace", "scaledinterwordshrink", "scaledinterwordspace", "scaledinterwordstretch", "scaledslantperpoint", "scantextokens", "semiexpanded", "semiprotected", "setdefaultmathcodes", "setfontid", "setmathatomrule", "setmathignore", "setmathoptions", "setmathpostpenalty", "setmathprepenalty", "setmathspacing", "shapingpenaltiesmode", "shapingpenalty", "skewed", "skewedwithdelims", "snapshotpar", "supmarkmode", "swapcsvalues", "tabsize", "textdirection", "thewithoutunit", "tinymuskip", "todimension", "tohexadecimal", "tointeger", "tokenized", "toksapp", "tokspre", "tolerant", "tomathstyle", "toscaled", "tosparsedimension", "tosparsescaled", "tpack", "tracingadjusts", "tracingalignments", "tracingexpressions", "tracingfonts", "tracingfullboxes", "tracinghyphenation", "tracinginserts", "tracingmarks", "tracingmath", "tracingnodes", "tracingpenalties", "uleaders", "undent", "unexpandedloop", "unletfrozen", "unletprotected", "untraced", "vpack", "wordboundary", "wrapuppar", "xdefcsname", "xtoks", "xtoksapp", "xtokspre" },
+ ["luatex"]={ "Uabove", "Uabovewithdelims", "Uatop", "Uatopwithdelims", "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "UmathDelimiterPercent", "UmathDelimiterShortfall", "Umathaccent", "Umathaccentbasedepth", "Umathaccentbaseheight", "Umathaccentbottomoverschoot", "Umathaccentbottomshiftdown", "Umathaccentsuperscriptdrop", "Umathaccentsuperscriptpercent", "Umathaccenttopovershoot", "Umathaccenttopshiftup", "Umathaccentvariant", "Umathadapttoleft", "Umathadapttoright", "Umathaxis", "Umathbotaccentvariant", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclass", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathdegreevariant", "Umathdelimiterovervariant", "Umathdelimiterundervariant", "Umathdenominatorvariant", "Umathextrasubpreshift", "Umathextrasubprespace", "Umathextrasubshift", "Umathextrasubspace", "Umathextrasuppreshift", "Umathextrasupprespace", "Umathextrasupshift", "Umathextrasupspace", "Umathflattenedaccentbasedepth", "Umathflattenedaccentbaseheight", "Umathflattenedaccentbottomshiftdown", "Umathflattenedaccenttopshiftup", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathfractionvariant", "Umathhextensiblevariant", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathlimits", "Umathnoaxis", "Umathnolimits", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathnumeratorvariant", "Umathopenupdepth", "Umathopenupheight", "Umathoperatorsize", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervariant", "Umathoverdelimitervgap", "Umathoverlayaccentvariant", "Umathoverlinevariant", "Umathphantom", "Umathpresubshiftdistance", "Umathpresupshiftdistance", "Umathprimeraise", "Umathprimeshiftdrop", "Umathprimeshiftup", "Umathprimespaceafter", "Umathprimevariant", "Umathprimewidth", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvariant", "Umathradicalvgap", "Umathruledepth", "Umathruleheight", "Umathskeweddelimitertolerance", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathsource", "Umathspaceafterscript", "Umathspacebeforescript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvariant", "Umathstackvgap", "Umathsubscriptvariant", "Umathsubshiftdistance", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsuperscriptvariant", "Umathsupshiftdistance", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathtopaccentvariant", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervariant", "Umathunderdelimitervgap", "Umathunderlinevariant", "Umathuseaxis", "Umathvextensiblevariant", "Umathvoid", "Umathxscale", "Umathyscale", "Umiddle", "Unosubprescript", "Unosubscript", "Unosuperprescript", "Unosuperscript", "Uoperator", "Uover", "Uoverdelimiter", "Uoverwithdelims", "Uprimescript", "Uradical", "Uright", "Uroot", "Ushiftedsubprescript", "Ushiftedsubscript", "Ushiftedsuperprescript", "Ushiftedsuperscript", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Ustyle", "Usubprescript", "Usubscript", "Usuperprescript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "adjustspacingshrink", "adjustspacingstep", "adjustspacingstretch", "afterassigned", "aftergrouped", "aliased", "alignmark", "alignmentcellsource", "alignmentwrapsource", "aligntab", "allcrampedstyles", "alldisplaystyles", "allmathstyles", "allscriptscriptstyles", "allscriptstyles", "allsplitstyles", "alltextstyles", "alluncrampedstyles", "atendofgroup", "atendofgrouped", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenpenalty", "automigrationmode", "autoparagraphmode", "begincsname", "beginlocalcontrol", "beginmathgroup", "beginsimplegroup", "boundary", "boxadapt", "boxanchor", "boxanchors", "boxattribute", "boxdirection", "boxfreeze", "boxgeometry", "boxorientation", "boxrepack", "boxshift", "boxsource", "boxtarget", "boxtotal", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "catcodetable", "clearmarks", "copymathatomrule", "copymathparent", "copymathspacing", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "currentloopiterator", "currentloopnesting", "currentmarks", "defcsname", "detokenized", "dimensiondef", "dimexpression", "directlua", "edefcsname", "efcode", "endlocalcontrol", "endmathgroup", "endsimplegroup", "enforced", "etoks", "etoksapp", "etokspre", "everybeforepar", "everymathatom", "everytab", "exceptionpenalty", "expand", "expandafterpars", "expandafterspaces", "expandcstoken", "expanded", "expandedafter", "expandedloop", "expandtoken", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", "flushmarks", "fontcharta", "fontid", "fontmathcontrol", "fontspecdef", "fontspecid", "fontspecifiedsize", "fontspecscale", "fontspecxscale", "fontspecyscale", "fonttextcontrol", "formatname", "frozen", "futurecsname", "futuredef", "futureexpand", "futureexpandis", "futureexpandisap", "gdefcsname", "gleaders", "glet", "gletcsname", "glettonothing", "gluespecdef", "glyphdatafield", "glyphoptions", "glyphscale", "glyphscriptfield", "glyphscriptscale", "glyphscriptscriptscale", "glyphstatefield", "glyphtextscale", "glyphxoffset", "glyphxscale", "glyphxscaled", "glyphyoffset", "glyphyscale", "glyphyscaled", "gtoksapp", "gtokspre", "hccode", "hjcode", "hpack", "hyphenationmin", "hyphenationmode", "ifabsdim", "ifabsnum", "ifarguments", "ifboolean", "ifchkdim", "ifchknum", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", "ifdimexpression", "ifdimval", "ifempty", "ifflags", "ifhaschar", "ifhastok", "ifhastoks", "ifhasxtoks", "ifincsname", "ifinsert", "ifmathparameter", "ifmathstyle", "ifnumexpression", "ifnumval", "ifparameter", "ifparameters", "ifrelax", "iftok", "ignorearguments", "ignorepars", "immediate", "immutable", "indexofcharacter", "indexofregister", "inherited", "initcatcodetable", "insertbox", "insertcopy", "insertdepth", "insertdistance", "insertheight", "insertheights", "insertlimit", "insertmaxdepth", "insertmode", "insertmultiplier", "insertpenalty", "insertprogress", "insertstorage", "insertstoring", "insertunbox", "insertuncopy", "insertwidth", "instance", "integerdef", "lastarguments", "lastboundary", "lastchkdim", "lastchknum", "lastleftclass", "lastloopiterator", "lastnamedcs", "lastnodesubtype", "lastpageextra", "lastparcontext", "lastrightclass", "leftmarginkern", "letcharcode", "letcsname", "letfrozen", "letmathatomrule", "letmathparent", "letmathspacing", "letprotected", "lettonothing", "linebreakcriterium", "linedirection", "localbrokenpenalty", "localcontrol", "localcontrolled", "localcontrolledloop", "localinterlinepenalty", "localleftbox", "localleftboxbox", "localmiddlebox", "localmiddleboxbox", "localrightbox", "localrightboxbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathaccent", "mathatom", "mathatomglue", "mathatomskip", "mathbackwardpenalties", "mathbeginclass", "mathcheckfencesmode", "mathdirection", "mathdisplaymode", "mathdisplayskipmode", "mathdoublescriptmode", "mathendclass", "matheqnogapstep", "mathfenced", "mathfontcontrol", "mathforwardpenalties", "mathfrac", "mathghost", "mathgluemode", "mathgroupingmode", "mathleftclass", "mathlimitsmode", "mathmiddle", "mathnolimitsmode", "mathpenaltiesmode", "mathrad", "mathrightclass", "mathrulesfam", "mathrulesmode", "mathscale", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathslackmode", "mathspacingmode", "mathstackstyle", "mathstyle", "mathstylefontid", "mathsurroundmode", "mathsurroundskip", "maththreshold", "mugluespecdef", "mutable", "noaligned", "noatomruling", "noboundary", "nohrule", "norelax", "normalizelinemode", "normalizeparmode", "nospaces", "novrule", "numericscale", "numexpression", "orelse", "orphanpenalties", "orphanpenalty", "orunless", "outputbox", "overloaded", "overloadmode", "pageboundary", "pageboundarypenalty", "pageextragoal", "pagevsize", "parametercount", "parametermark", "parattribute", "pardirection", "permanent", "pettymuskip", "postexhyphenchar", "posthyphenchar", "postinlinepenalty", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "preinlinepenalty", "prerelpenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitloop", "quitvmode", "resetmathspacing", "retokenized", "rightmarginkern", "rpcode", "savecatcodetable", "scaledemwidth", "scaledexheight", "scaledextraspace", "scaledinterwordshrink", "scaledinterwordspace", "scaledinterwordstretch", "scaledslantperpoint", "scantextokens", "semiexpand", "semiexpanded", "semiprotected", "setdefaultmathcodes", "setfontid", "setmathatomrule", "setmathignore", "setmathoptions", "setmathpostpenalty", "setmathprepenalty", "setmathspacing", "shapingpenaltiesmode", "shapingpenalty", "skewed", "skewedwithdelims", "snapshotpar", "supmarkmode", "swapcsvalues", "tabsize", "textdirection", "thewithoutunit", "tinymuskip", "todimension", "tohexadecimal", "tointeger", "tokenized", "toksapp", "tokspre", "tolerant", "tomathstyle", "toscaled", "tosparsedimension", "tosparsescaled", "tpack", "tracingadjusts", "tracingalignments", "tracingexpressions", "tracingfonts", "tracingfullboxes", "tracinghyphenation", "tracinginserts", "tracingmarks", "tracingmath", "tracingnodes", "tracingpenalties", "uleaders", "undent", "unexpandedloop", "unletfrozen", "unletprotected", "untraced", "vpack", "wordboundary", "wrapuppar", "xdefcsname", "xtoks", "xtoksapp", "xtokspre" },
["omega"]={ "Omegaminorversion", "Omegarevision", "Omegaversion" },
["pdftex"]={ "ifpdfabsdim", "ifpdfabsnum", "ifpdfprimitive", "pdfadjustspacing", "pdfannot", "pdfcatalog", "pdfcolorstack", "pdfcolorstackinit", "pdfcompresslevel", "pdfcopyfont", "pdfcreationdate", "pdfdecimaldigits", "pdfdest", "pdfdestmargin", "pdfdraftmode", "pdfeachlinedepth", "pdfeachlineheight", "pdfendlink", "pdfendthread", "pdffirstlineheight", "pdffontattr", "pdffontexpand", "pdffontname", "pdffontobjnum", "pdffontsize", "pdfgamma", "pdfgentounicode", "pdfglyphtounicode", "pdfhorigin", "pdfignoreddimen", "pdfignoreunknownimages", "pdfimageaddfilename", "pdfimageapplygamma", "pdfimagegamma", "pdfimagehicolor", "pdfimageresolution", "pdfincludechars", "pdfinclusioncopyfonts", "pdfinclusionerrorlevel", "pdfinfo", "pdfinfoomitdate", "pdfinsertht", "pdflastannot", "pdflastlinedepth", "pdflastlink", "pdflastobj", "pdflastxform", "pdflastximage", "pdflastximagepages", "pdflastxpos", "pdflastypos", "pdflinkmargin", "pdfliteral", "pdfmajorversion", "pdfmapfile", "pdfmapline", "pdfminorversion", "pdfnames", "pdfnoligatures", "pdfnormaldeviate", "pdfobj", "pdfobjcompresslevel", "pdfomitcharset", "pdfomitcidset", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrecompress", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" },
["tex"]={ " ", "-", "/", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "aligncontent", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "floatingpenalty", "font", "fontdimen", "fontname", "fontspecifiedname", "futurelet", "gdef", "global", "globaldefs", "glyph", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "holdinginserts", "holdingmigrations", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mark", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "meaningasis", "meaningfull", "meaningless", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overshoot", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillleftskip", "parfillskip", "parindent", "parinitleftskip", "parinitrightskip", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "radical", "raise", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scaledfontdimen", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "shownodedetails", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "srule", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "unboundary", "underline", "unhbox", "unhcopy", "unhpack", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "unvpack", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "xdef", "xleaders", "xspaceskip", "year" },
diff --git a/context/data/scite/context/scite-context-data-context.properties b/context/data/scite/context/scite-context-data-context.properties
index d6c96b00d..9fe8d0412 100644
--- a/context/data/scite/context/scite-context-data-context.properties
+++ b/context/data/scite/context/scite-context-data-context.properties
@@ -53,44 +53,44 @@ vmodeifcode hmodeifcode mmodeifcode innerifcode voidifcode \
hboxifcode vboxifcode xifcode eofifcode trueifcode \
falseifcode caseifcode definedifcode csnameifcode fontcharifcode \
overrulemathcontrolcode underrulemathcontrolcode radicalrulemathcontrolcode fractionrulemathcontrolcode accentskewhalfmathcontrolcode \
-accentskewapplymathcontrolcode checkligatureandkernmathcontrolcode applyverticalitalickernmathcontrolcode applyordinaryitalickernmathcontrolcode applycharitalickernmathcontrolcode \
+accentskewapplymathcontrolcode applyordinarykernpairmathcontrolcode applyverticalitalickernmathcontrolcode applyordinaryitalickernmathcontrolcode applycharitalickernmathcontrolcode \
reboxcharitalickernmathcontrolcode applyboxeditalickernmathcontrolcode staircasekernmathcontrolcode applytextitalickernmathcontrolcode applyscriptitalickernmathcontrolcode \
-italicshapekernmathcontrolcode checkspaceitalickernmathcontrolcode checktextitalickernmathcontrolcode noligaturingglyphoptioncode nokerningglyphoptioncode \
-noexpansionglyphoptioncode noprotrusionglyphoptioncode noleftkerningglyphoptioncode noleftligaturingglyphoptioncode norightkerningglyphoptioncode \
-norightligaturingglyphoptioncode noitaliccorrectionglyphoptioncode normalparcontextcode vmodeparcontextcode vboxparcontextcode \
-vtopparcontextcode vcenterparcontextcode vadjustparcontextcode insertparcontextcode outputparcontextcode \
-alignparcontextcode noalignparcontextcode spanparcontextcode resetparcontextcode leftoriginlistanchorcode \
-leftheightlistanchorcode leftdepthlistanchorcode rightoriginlistanchorcode rightheightlistanchorcode rightdepthlistanchorcode \
-centeroriginlistanchorcode centerheightlistanchorcode centerdepthlistanchorcode halfwaytotallistanchorcode halfwayheightlistanchorcode \
-halfwaydepthlistanchorcode halfwayleftlistanchorcode halfwayrightlistanchorcode negatexlistsigncode negateylistsigncode \
-negatelistsigncode fontslantperpoint fontinterwordspace fontinterwordstretch fontinterwordshrink \
-fontexheight fontemwidth fontextraspace slantperpoint mathexheight \
-mathemwidth interwordspace interwordstretch interwordshrink exheight \
-emwidth extraspace mathaxisheight muquad startmode \
-stopmode startnotmode stopnotmode startmodeset stopmodeset \
-doifmode doifelsemode doifmodeelse doifnotmode startmodeset \
-stopmodeset startallmodes stopallmodes startnotallmodes stopnotallmodes \
-doifallmodes doifelseallmodes doifallmodeselse doifnotallmodes startenvironment \
-stopenvironment environment startcomponent stopcomponent component \
-startproduct stopproduct product startproject stopproject \
-project starttext stoptext startnotext stopnotext \
-startdocument stopdocument documentvariable unexpandeddocumentvariable setupdocument \
-presetdocument doifelsedocumentvariable doifdocumentvariableelse doifdocumentvariable doifnotdocumentvariable \
-startmodule stopmodule usemodule usetexmodule useluamodule \
-setupmodule currentmoduleparameter moduleparameter everystarttext everystoptext \
-startTEXpage stopTEXpage enablemode disablemode preventmode \
-definemode globalenablemode globaldisablemode globalpreventmode pushmode \
-popmode typescriptone typescripttwo typescriptthree mathsizesuffix \
-mathordinarycode mathordcode mathoperatorcode mathopcode mathbinarycode \
-mathbincode mathrelationcode mathrelcode mathopencode mathclosecode \
-mathpunctuationcode mathpunctcode mathovercode mathundercode mathinnercode \
-mathradicalcode mathfractioncode mathmiddlecode mathaccentcode mathfencedcode \
-mathghostcode mathvariablecode mathactivecode mathvcentercode mathconstructcode \
-mathwrappedcode mathbegincode mathendcode mathexplicitcode mathdivisioncode \
-mathfactorialcode mathdimensioncode mathexperimentalcode mathtextpunctuationcode mathimaginarycode \
-mathdifferentialcode mathexponentialcode mathellipsiscode mathfunctioncode mathdigitcode \
-mathalphacode mathboxcode mathchoicecode mathnothingcode mathlimopcode \
-mathnolopcode mathunsetcode mathunspacedcode mathallcode mathfakecode \
+checkspaceitalickernmathcontrolcode checktextitalickernmathcontrolcode noligaturingglyphoptioncode nokerningglyphoptioncode noexpansionglyphoptioncode \
+noprotrusionglyphoptioncode noleftkerningglyphoptioncode noleftligaturingglyphoptioncode norightkerningglyphoptioncode norightligaturingglyphoptioncode \
+noitaliccorrectionglyphoptioncode normalparcontextcode vmodeparcontextcode vboxparcontextcode vtopparcontextcode \
+vcenterparcontextcode vadjustparcontextcode insertparcontextcode outputparcontextcode alignparcontextcode \
+noalignparcontextcode spanparcontextcode resetparcontextcode leftoriginlistanchorcode leftheightlistanchorcode \
+leftdepthlistanchorcode rightoriginlistanchorcode rightheightlistanchorcode rightdepthlistanchorcode centeroriginlistanchorcode \
+centerheightlistanchorcode centerdepthlistanchorcode halfwaytotallistanchorcode halfwayheightlistanchorcode halfwaydepthlistanchorcode \
+halfwayleftlistanchorcode halfwayrightlistanchorcode negatexlistsigncode negateylistsigncode negatelistsigncode \
+fontslantperpoint fontinterwordspace fontinterwordstretch fontinterwordshrink fontexheight \
+fontemwidth fontextraspace slantperpoint mathexheight mathemwidth \
+interwordspace interwordstretch interwordshrink exheight emwidth \
+extraspace mathaxisheight muquad startmode stopmode \
+startnotmode stopnotmode startmodeset stopmodeset doifmode \
+doifelsemode doifmodeelse doifnotmode startmodeset stopmodeset \
+startallmodes stopallmodes startnotallmodes stopnotallmodes doifallmodes \
+doifelseallmodes doifallmodeselse doifnotallmodes startenvironment stopenvironment \
+environment startcomponent stopcomponent component startproduct \
+stopproduct product startproject stopproject project \
+starttext stoptext startnotext stopnotext startdocument \
+stopdocument documentvariable unexpandeddocumentvariable setupdocument presetdocument \
+doifelsedocumentvariable doifdocumentvariableelse doifdocumentvariable doifnotdocumentvariable startmodule \
+stopmodule usemodule usetexmodule useluamodule setupmodule \
+currentmoduleparameter moduleparameter everystarttext everystoptext startTEXpage \
+stopTEXpage enablemode disablemode preventmode definemode \
+globalenablemode globaldisablemode globalpreventmode pushmode popmode \
+typescriptone typescripttwo typescriptthree mathsizesuffix mathordinarycode \
+mathordcode mathoperatorcode mathopcode mathbinarycode mathbincode \
+mathrelationcode mathrelcode mathopencode mathclosecode mathpunctuationcode \
+mathpunctcode mathovercode mathundercode mathinnercode mathradicalcode \
+mathfractioncode mathmiddlecode mathaccentcode mathfencedcode mathghostcode \
+mathvariablecode mathactivecode mathvcentercode mathconstructcode mathwrappedcode \
+mathbegincode mathendcode mathexplicitcode mathdivisioncode mathfactorialcode \
+mathdimensioncode mathexperimentalcode mathtextpunctuationcode mathimaginarycode mathdifferentialcode \
+mathexponentialcode mathellipsiscode mathfunctioncode mathdigitcode mathalphacode \
+mathboxcode mathchoicecode mathnothingcode mathlimopcode mathnolopcode \
+mathunsetcode mathunspacedcode mathallcode mathfakecode mathunarycode \
constantnumber constantnumberargument constantdimen constantdimenargument constantemptyargument \
luastringsep !!bs !!es lefttorightmark righttoleftmark \
lrm rlm bidilre bidirle bidipop \
@@ -110,14 +110,15 @@ swaphangindentnormalizecode swapparsshapenormalizecode breakafterdirnormalizecod
flattendiscretionariesnormalizecode discardzerotabskipsnormalizecode flattenhleadersnormalizecode normalizeparnormalizeparcode flattenvleadersnormalizeparcode \
nopreslackclassoptioncode nopostslackclassoptioncode lefttopkernclassoptioncode righttopkernclassoptioncode leftbottomkernclassoptioncode \
rightbottomkernclassoptioncode lookaheadforendclassoptioncode noitaliccorrectionclassoptioncode defaultmathclassoptions checkligatureclassoptioncode \
-flattenclassoptioncode omitpenaltyclassoptioncode noligaturingglyphoptioncode nokerningglyphoptioncode noleftligatureglyphoptioncode \
-noleftkernglyphoptioncode norightligatureglyphoptioncode norightkernglyphoptioncode noexpansionglyphoptioncode noprotrusionglyphoptioncode \
-noitaliccorrectionglyphoptioncode nokerningcode noligaturingcode frozenflagcode tolerantflagcode \
-protectedflagcode primitiveflagcode permanentflagcode noalignedflagcode immutableflagcode \
-mutableflagcode globalflagcode overloadedflagcode immediateflagcode conditionalflagcode \
-valueflagcode instanceflagcode ordmathflattencode binmathflattencode relmathflattencode \
-punctmathflattencode innermathflattencode normalworddiscoptioncode preworddiscoptioncode postworddiscoptioncode \
-continueifinputfile continuewhenlmtxmode continuewhenmkivmode
+checkitaliccorrectionclassoptioncode checkkernpairclassoptioncode flattenclassoptioncode omitpenaltyclassoptioncode unpackclassoptioncode \
+raiseprimeclassoptioncode noligaturingglyphoptioncode nokerningglyphoptioncode noleftligatureglyphoptioncode noleftkernglyphoptioncode \
+norightligatureglyphoptioncode norightkernglyphoptioncode noexpansionglyphoptioncode noprotrusionglyphoptioncode noitaliccorrectionglyphoptioncode \
+nokerningcode noligaturingcode frozenflagcode tolerantflagcode protectedflagcode \
+primitiveflagcode permanentflagcode noalignedflagcode immutableflagcode mutableflagcode \
+globalflagcode overloadedflagcode immediateflagcode conditionalflagcode valueflagcode \
+instanceflagcode ordmathflattencode binmathflattencode relmathflattencode punctmathflattencode \
+innermathflattencode normalworddiscoptioncode preworddiscoptioncode postworddiscoptioncode continueifinputfile \
+continuewhenlmtxmode continuewhenmkivmode
keywordclass.context.helpers=\
startsetups stopsetups startxmlsetups stopxmlsetups \
diff --git a/context/data/scite/context/scite-context-data-metafun.properties b/context/data/scite/context/scite-context-data-metafun.properties
index 38c17f2f3..abb45d25c 100644
--- a/context/data/scite/context/scite-context-data-metafun.properties
+++ b/context/data/scite/context/scite-context-data-metafun.properties
@@ -7,91 +7,92 @@ sin cos tan cot atan \
asin acos invsin invcos invtan \
acosh asinh sinh cosh tanh \
zmod paired tripled unitcircle fulldiamond \
-unitdiamond fullsquare unittriangle fulltriangle llcircle \
-lrcircle urcircle ulcircle tcircle bcircle \
-lcircle rcircle lltriangle lrtriangle urtriangle \
-ultriangle uptriangle downtriangle lefttriangle righttriangle \
-triangle smoothed cornered superellipsed randomized \
-randomizedcontrols squeezed enlonged shortened punked \
-curved unspiked simplified blownup stretched \
-enlarged leftenlarged topenlarged rightenlarged bottomenlarged \
-crossed laddered randomshifted interpolated perpendicular \
-paralleled cutends peepholed llenlarged lrenlarged \
-urenlarged ulenlarged llmoved lrmoved urmoved \
-ulmoved rightarrow leftarrow centerarrow drawdoublearrows \
-boundingbox innerboundingbox outerboundingbox pushboundingbox popboundingbox \
-boundingradius boundingcircle boundingpoint crossingunder insideof \
-outsideof bottomboundary leftboundary topboundary rightboundary \
-xsized ysized xysized sized xyscaled \
-intersection_point intersection_found penpoint bbwidth bbheight \
-withshade withcircularshade withlinearshade defineshade shaded \
-shadedinto withshadecolors withshadedomain withshademethod withshadefactor \
-withshadevector withshadecenter withshadedirection withshaderadius withshadetransform \
-withshadecenterone withshadecentertwo withshadestep withshadefraction withshadeorigin \
-shownshadevector shownshadeorigin shownshadedirection shownshadecenter cmyk \
-spotcolor multitonecolor namedcolor drawfill undrawfill \
-inverted uncolored softened grayed greyed \
-onlayer along graphictext loadfigure externalfigure \
-figure register outlinetext filloutlinetext drawoutlinetext \
-outlinetexttopath checkedbounds checkbounds strut rule \
-withmask bitmapimage colordecimals ddecimal dddecimal \
-ddddecimal colordecimalslist textext thetextext rawtextext \
-textextoffset texbox thetexbox rawtexbox istextext \
-infotext rawmadetext validtexbox onetimetextext rawfmttext \
-thefmttext fmttext onetimefmttext notcached keepcached \
-verbatim thelabel label autoalign transparent \
-withtransparency withopacity property properties withproperties \
-asgroup withpattern withpatternscale withpatternfloat infont \
-space crlf dquote percent SPACE \
-CRLF DQUOTE PERCENT grayscale greyscale \
-withgray withgrey colorpart colorlike readfile \
-clearxy unitvector center epsed anchored \
-originpath infinite break xstretched ystretched \
-snapped pathconnectors function constructedfunction constructedpath \
-constructedpairs straightfunction straightpath straightpairs curvedfunction \
-curvedpath curvedpairs evenly oddly condition \
-pushcurrentpicture popcurrentpicture arrowpath resetarrows tensecircle \
-roundedsquare colortype whitecolor blackcolor basiccolors \
-complementary complemented resolvedcolor normalfill normaldraw \
-visualizepaths detailpaths naturalizepaths drawboundary drawwholepath \
-drawpathonly visualizeddraw visualizedfill detaileddraw draworigin \
-drawboundingbox drawpath drawpoint drawpoints drawcontrolpoints \
-drawcontrollines drawpointlabels drawlineoptions drawpointoptions drawcontroloptions \
-drawlabeloptions draworiginoptions drawboundoptions drawpathoptions resetdrawoptions \
-undashed pencilled decorated redecorated undecorated \
-passvariable passarrayvariable tostring topair format \
-formatted quotation quote startpassingvariable stoppassingvariable \
-eofill eoclip nofill dofill fillup \
-eofillup nodraw dodraw enfill area \
-addbackground shadedup shadeddown shadedleft shadedright \
-sortlist copylist shapedlist listtocurves listtolines \
-listsize listlast uniquelist circularpath squarepath \
-linearpath theoffset texmode systemmode texvar \
-texstr isarray prefix dimension getmacro \
-getdimen getcount gettoks setmacro setdimen \
-setcount settoks setglobalmacro setglobaldimen setglobalcount \
-setglobaltoks positionpath positioncurve positionxy positionparagraph \
-positioncolumn positionwhd positionpage positionregion positionbox \
-positionx positiony positionanchor positioninregion positionatanchor \
-positioncolumnbox overlaycolumnbox positioncolumnatx getposboxes getmultipars \
-getpospage getposparagraph getposcolumn getposregion getposx \
-getposy getposwidth getposheight getposdepth getposleftskip \
-getposrightskip getposhsize getposparindent getposhangindent getposhangafter \
-getposxy getposupperleft getposlowerleft getposupperright getposlowerright \
-getposllx getposlly getposurx getposury wdpart \
-htpart dppart texvar texstr inpath \
-pointof leftof rightof utfnum utflen \
-utfsub newhash disposehash inhash tohash \
-fromhash isarray prefix isobject comment \
-report lua lualist mp MP \
-luacall mirrored mirroredabout xslanted yslanted \
-scriptindex newscriptindex newcolor newrgbcolor newcmykcolor \
-newnumeric newboolean newtransform newpath newpicture \
-newstring newpair mpvard mpvarn mpvars \
-mpvar withtolerance hatched withdashes processpath \
-pencilled sortedintersectiontimes intersectionpath firstintersectionpath secondintersectionpath \
-intersectionsfound cutbeforefirst cutafterfirst cutbeforelast cutafterlast \
-xnormalized ynormalized xynormalized phantom scrutinized
+unitdiamond fullsquare unittriangle fulltriangle unitoctagon \
+fulloctagon unithexagon fullhexagon llcircle lrcircle \
+urcircle ulcircle tcircle bcircle lcircle \
+rcircle lltriangle lrtriangle urtriangle ultriangle \
+uptriangle downtriangle lefttriangle righttriangle triangle \
+smoothed cornered superellipsed randomized randomizedcontrols \
+squeezed enlonged shortened punked curved \
+unspiked simplified blownup stretched enlarged \
+leftenlarged topenlarged rightenlarged bottomenlarged crossed \
+laddered randomshifted interpolated perpendicular paralleled \
+cutends peepholed llenlarged lrenlarged urenlarged \
+ulenlarged llmoved lrmoved urmoved ulmoved \
+rightarrow leftarrow centerarrow drawdoublearrows boundingbox \
+innerboundingbox outerboundingbox pushboundingbox popboundingbox boundingradius \
+boundingcircle boundingpoint crossingunder insideof outsideof \
+bottomboundary leftboundary topboundary rightboundary xsized \
+ysized xysized sized xyscaled intersection_point \
+intersection_found penpoint bbwidth bbheight withshade \
+withcircularshade withlinearshade defineshade shaded shadedinto \
+withshadecolors withshadedomain withshademethod withshadefactor withshadevector \
+withshadecenter withshadedirection withshaderadius withshadetransform withshadecenterone \
+withshadecentertwo withshadestep withshadefraction withshadeorigin shownshadevector \
+shownshadeorigin shownshadedirection shownshadecenter cmyk spotcolor \
+multitonecolor namedcolor drawfill undrawfill inverted \
+uncolored softened grayed greyed onlayer \
+along graphictext loadfigure externalfigure figure \
+register outlinetext filloutlinetext drawoutlinetext outlinetexttopath \
+checkedbounds checkbounds strut rule withmask \
+bitmapimage colordecimals ddecimal dddecimal ddddecimal \
+colordecimalslist textext thetextext rawtextext textextoffset \
+texbox thetexbox rawtexbox istextext infotext \
+rawmadetext validtexbox onetimetextext rawfmttext thefmttext \
+fmttext onetimefmttext notcached keepcached verbatim \
+thelabel label autoalign transparent withtransparency \
+withopacity property properties withproperties asgroup \
+withpattern withpatternscale withpatternfloat infont space \
+crlf dquote percent SPACE CRLF \
+DQUOTE PERCENT grayscale greyscale withgray \
+withgrey colorpart colorlike readfile clearxy \
+unitvector center epsed anchored originpath \
+infinite break xstretched ystretched snapped \
+pathconnectors function constructedfunction constructedpath constructedpairs \
+straightfunction straightpath straightpairs curvedfunction curvedpath \
+curvedpairs evenly oddly condition pushcurrentpicture \
+popcurrentpicture arrowpath resetarrows tensecircle roundedsquare \
+colortype whitecolor blackcolor basiccolors complementary \
+complemented resolvedcolor normalfill normaldraw visualizepaths \
+detailpaths naturalizepaths drawboundary drawwholepath drawpathonly \
+visualizeddraw visualizedfill detaileddraw draworigin drawboundingbox \
+drawpath drawpoint drawpoints drawcontrolpoints drawcontrollines \
+drawpointlabels drawlineoptions drawpointoptions drawcontroloptions drawlabeloptions \
+draworiginoptions drawboundoptions drawpathoptions resetdrawoptions undashed \
+pencilled decorated redecorated undecorated passvariable \
+passarrayvariable tostring topair format formatted \
+quotation quote startpassingvariable stoppassingvariable eofill \
+eoclip nofill dofill fillup eofillup \
+nodraw dodraw enfill area addbackground \
+shadedup shadeddown shadedleft shadedright sortlist \
+copylist shapedlist listtocurves listtolines listsize \
+listlast uniquelist circularpath squarepath linearpath \
+theoffset texmode systemmode texvar texstr \
+isarray prefix dimension getmacro getdimen \
+getcount gettoks setmacro setdimen setcount \
+settoks setglobalmacro setglobaldimen setglobalcount setglobaltoks \
+positionpath positioncurve positionxy positionparagraph positioncolumn \
+positionwhd positionpage positionregion positionbox positionx \
+positiony positionanchor positioninregion positionatanchor positioncolumnbox \
+overlaycolumnbox positioncolumnatx getposboxes getmultipars getpospage \
+getposparagraph getposcolumn getposregion getposx getposy \
+getposwidth getposheight getposdepth getposleftskip getposrightskip \
+getposhsize getposparindent getposhangindent getposhangafter getposxy \
+getposupperleft getposlowerleft getposupperright getposlowerright getposllx \
+getposlly getposurx getposury wdpart htpart \
+dppart texvar texstr inpath pointof \
+leftof rightof utfnum utflen utfsub \
+newhash disposehash inhash tohash fromhash \
+isarray prefix isobject comment report \
+lua lualist mp MP luacall \
+mirrored mirroredabout xslanted yslanted scriptindex \
+newscriptindex newcolor newrgbcolor newcmykcolor newnumeric \
+newboolean newtransform newpath newpicture newstring \
+newpair mpvard mpvarn mpvars mpvar \
+withtolerance hatched withdashes processpath pencilled \
+sortedintersectiontimes intersectionpath firstintersectionpath secondintersectionpath intersectionsfound \
+cutbeforefirst cutafterfirst cutbeforelast cutafterlast xnormalized \
+ynormalized xynormalized phantom scrutinized
keywordclass.metafun.internals=\
nocolormodel greycolormodel graycolormodel rgbcolormodel \
@@ -104,11 +105,11 @@ metapostversion maxdimensions drawoptionsfactor dq sq \
crossingscale crossingoption crossingdebug contextlmtxmode metafunversion \
minifunversion getparameters presetparameters hasparameter hasoption \
getparameter getparameterdefault getparametercount getmaxparametercount getparameterpath \
-getparameterpen getparametertext applyparameters pushparameters popparameters \
-setluaparameter definecolor record newrecord setrecord \
-getrecord cntrecord anchorxy anchorx anchory \
-anchorht anchordp anchorul anchorll anchorlr \
-anchorur localanchorbox localanchorcell localanchorspan anchorbox \
-anchorcell anchorspan matrixbox matrixcell matrixspan \
-pensilcolor pensilstep
+getparameterpen getparametertext applyparameters mergeparameters pushparameters \
+popparameters setluaparameter definecolor record newrecord \
+setrecord getrecord cntrecord anchorxy anchorx \
+anchory anchorht anchordp anchorul anchorll \
+anchorlr anchorur localanchorbox localanchorcell localanchorspan \
+anchorbox anchorcell anchorspan matrixbox matrixcell \
+matrixspan pensilcolor pensilstep
diff --git a/context/data/scite/context/scite-context-data-tex.properties b/context/data/scite/context/scite-context-data-tex.properties
index 4f38df4a8..5ea769029 100644
--- a/context/data/scite/context/scite-context-data-tex.properties
+++ b/context/data/scite/context/scite-context-data-tex.properties
@@ -58,76 +58,77 @@ alltextstyles alluncrampedstyles atendofgroup atendofgrouped attribute \
attributedef automaticdiscretionary automatichyphenpenalty automigrationmode autoparagraphmode \
begincsname beginlocalcontrol beginmathgroup beginsimplegroup boundary \
boxadapt boxanchor boxanchors boxattribute boxdirection \
-boxfreeze boxgeometry boxorientation boxshift boxsource \
-boxtarget boxtotal boxxmove boxxoffset boxymove \
-boxyoffset catcodetable clearmarks copymathatomrule copymathparent \
-copymathspacing crampeddisplaystyle crampedscriptscriptstyle crampedscriptstyle crampedtextstyle \
-csstring currentloopiterator currentloopnesting currentmarks defcsname \
-dimensiondef dimexpression directlua edefcsname efcode \
-endlocalcontrol endmathgroup endsimplegroup enforced etoks \
-etoksapp etokspre everybeforepar everymathatom everytab \
-exceptionpenalty expand expandafterpars expandafterspaces expandcstoken \
-expanded expandedafter expandedloop expandtoken explicitdiscretionary \
-explicithyphenpenalty firstvalidlanguage flushmarks fontcharta fontid \
-fontmathcontrol fontspecdef fontspecid fontspecifiedsize fontspecscale \
-fontspecxscale fontspecyscale fonttextcontrol formatname frozen \
-futurecsname futuredef futureexpand futureexpandis futureexpandisap \
-gdefcsname gleaders glet gletcsname glettonothing \
-gluespecdef glyphdatafield glyphoptions glyphscale glyphscriptfield \
-glyphscriptscale glyphscriptscriptscale glyphstatefield glyphtextscale glyphxoffset \
-glyphxscale glyphxscaled glyphyoffset glyphyscale glyphyscaled \
-gtoksapp gtokspre hccode hjcode hpack \
-hyphenationmin hyphenationmode ifabsdim ifabsnum ifarguments \
-ifboolean ifchkdim ifchknum ifcmpdim ifcmpnum \
-ifcondition ifcstok ifdimexpression ifdimval ifempty \
-ifflags ifhaschar ifhastok ifhastoks ifhasxtoks \
-ifincsname ifinsert ifmathparameter ifmathstyle ifnumexpression \
-ifnumval ifparameter ifparameters ifrelax iftok \
-ignorearguments ignorepars immediate immutable inherited \
-initcatcodetable insertbox insertcopy insertdepth insertdistance \
-insertheight insertheights insertlimit insertmaxdepth insertmode \
-insertmultiplier insertpenalty insertprogress insertstorage insertstoring \
-insertunbox insertuncopy insertwidth instance integerdef \
-lastarguments lastboundary lastchkdim lastchknum lastleftclass \
-lastloopiterator lastnamedcs lastnodesubtype lastpageextra lastparcontext \
-lastrightclass leftmarginkern letcharcode letcsname letfrozen \
-letmathatomrule letmathparent letmathspacing letprotected lettonothing \
-linebreakcriterium linedirection localbrokenpenalty localcontrol localcontrolled \
-localcontrolledloop localinterlinepenalty localleftbox localleftboxbox localmiddlebox \
-localmiddleboxbox localrightbox localrightboxbox lpcode luabytecode \
-luabytecodecall luacopyinputnodes luadef luaescapestring luafunction \
-luafunctioncall luatexbanner luatexrevision luatexversion mathaccent \
-mathatom mathatomglue mathatomskip mathbackwardpenalties mathbeginclass \
-mathdelimitersmode mathdirection mathdisplaymode mathdisplayskipmode mathdoublescriptmode \
-mathendclass matheqnogapstep mathfenced mathfencesmode mathfontcontrol \
-mathforwardpenalties mathfrac mathghost mathgluemode mathgroupingmode \
-mathleftclass mathlimitsmode mathmiddle mathnolimitsmode mathpenaltiesmode \
-mathrad mathrightclass mathrulesfam mathrulesmode mathscale \
-mathscriptboxmode mathscriptcharmode mathscriptsmode mathslackmode mathspacingmode \
-mathstackstyle mathstyle mathstylefontid mathsurroundmode mathsurroundskip \
-maththreshold mugluespecdef mutable noaligned noatomruling \
-noboundary nohrule norelax normalizelinemode normalizeparmode \
-nospaces novrule numericscale numexpression orelse \
-orphanpenalties orphanpenalty orunless outputbox overloaded \
-overloadmode pageboundary pageboundarypenalty pageextragoal pagevsize \
-parametercount parametermark parattribute pardirection permanent \
-pettymuskip postexhyphenchar posthyphenchar postinlinepenalty prebinoppenalty \
-predisplaygapfactor preexhyphenchar prehyphenchar preinlinepenalty prerelpenalty \
-protrudechars protrusionboundary pxdimen quitloop quitvmode \
-resetmathspacing retokenized rightmarginkern rpcode savecatcodetable \
-scaledemwidth scaledexheight scaledextraspace scaledinterwordshrink scaledinterwordspace \
-scaledinterwordstretch scaledslantperpoint scantextokens semiexpanded semiprotected \
-setdefaultmathcodes setfontid setmathatomrule setmathignore setmathoptions \
-setmathpostpenalty setmathprepenalty setmathspacing shapingpenaltiesmode shapingpenalty \
-skewed skewedwithdelims snapshotpar supmarkmode swapcsvalues \
-tabsize textdirection thewithoutunit tinymuskip todimension \
-tohexadecimal tointeger tokenized toksapp tokspre \
-tolerant tomathstyle toscaled tosparsedimension tosparsescaled \
-tpack tracingadjusts tracingalignments tracingexpressions tracingfonts \
-tracingfullboxes tracinghyphenation tracinginserts tracingmarks tracingmath \
-tracingnodes tracingpenalties uleaders undent unexpandedloop \
-unletfrozen unletprotected untraced vpack wordboundary \
-wrapuppar xdefcsname xtoks xtoksapp xtokspre
+boxfreeze boxgeometry boxorientation boxrepack boxshift \
+boxsource boxtarget boxtotal boxxmove boxxoffset \
+boxymove boxyoffset catcodetable clearmarks copymathatomrule \
+copymathparent copymathspacing crampeddisplaystyle crampedscriptscriptstyle crampedscriptstyle \
+crampedtextstyle csstring currentloopiterator currentloopnesting currentmarks \
+defcsname detokenized dimensiondef dimexpression directlua \
+edefcsname efcode endlocalcontrol endmathgroup endsimplegroup \
+enforced etoks etoksapp etokspre everybeforepar \
+everymathatom everytab exceptionpenalty expand expandafterpars \
+expandafterspaces expandcstoken expanded expandedafter expandedloop \
+expandtoken explicitdiscretionary explicithyphenpenalty firstvalidlanguage flushmarks \
+fontcharta fontid fontmathcontrol fontspecdef fontspecid \
+fontspecifiedsize fontspecscale fontspecxscale fontspecyscale fonttextcontrol \
+formatname frozen futurecsname futuredef futureexpand \
+futureexpandis futureexpandisap gdefcsname gleaders glet \
+gletcsname glettonothing gluespecdef glyphdatafield glyphoptions \
+glyphscale glyphscriptfield glyphscriptscale glyphscriptscriptscale glyphstatefield \
+glyphtextscale glyphxoffset glyphxscale glyphxscaled glyphyoffset \
+glyphyscale glyphyscaled gtoksapp gtokspre hccode \
+hjcode hpack hyphenationmin hyphenationmode ifabsdim \
+ifabsnum ifarguments ifboolean ifchkdim ifchknum \
+ifcmpdim ifcmpnum ifcondition ifcstok ifdimexpression \
+ifdimval ifempty ifflags ifhaschar ifhastok \
+ifhastoks ifhasxtoks ifincsname ifinsert ifmathparameter \
+ifmathstyle ifnumexpression ifnumval ifparameter ifparameters \
+ifrelax iftok ignorearguments ignorepars immediate \
+immutable indexofcharacter indexofregister inherited initcatcodetable \
+insertbox insertcopy insertdepth insertdistance insertheight \
+insertheights insertlimit insertmaxdepth insertmode insertmultiplier \
+insertpenalty insertprogress insertstorage insertstoring insertunbox \
+insertuncopy insertwidth instance integerdef lastarguments \
+lastboundary lastchkdim lastchknum lastleftclass lastloopiterator \
+lastnamedcs lastnodesubtype lastpageextra lastparcontext lastrightclass \
+leftmarginkern letcharcode letcsname letfrozen letmathatomrule \
+letmathparent letmathspacing letprotected lettonothing linebreakcriterium \
+linedirection localbrokenpenalty localcontrol localcontrolled localcontrolledloop \
+localinterlinepenalty localleftbox localleftboxbox localmiddlebox localmiddleboxbox \
+localrightbox localrightboxbox lpcode luabytecode luabytecodecall \
+luacopyinputnodes luadef luaescapestring luafunction luafunctioncall \
+luatexbanner luatexrevision luatexversion mathaccent mathatom \
+mathatomglue mathatomskip mathbackwardpenalties mathbeginclass mathcheckfencesmode \
+mathdirection mathdisplaymode mathdisplayskipmode mathdoublescriptmode mathendclass \
+matheqnogapstep mathfenced mathfontcontrol mathforwardpenalties mathfrac \
+mathghost mathgluemode mathgroupingmode mathleftclass mathlimitsmode \
+mathmiddle mathnolimitsmode mathpenaltiesmode mathrad mathrightclass \
+mathrulesfam mathrulesmode mathscale mathscriptboxmode mathscriptcharmode \
+mathscriptsmode mathslackmode mathspacingmode mathstackstyle mathstyle \
+mathstylefontid mathsurroundmode mathsurroundskip maththreshold mugluespecdef \
+mutable noaligned noatomruling noboundary nohrule \
+norelax normalizelinemode normalizeparmode nospaces novrule \
+numericscale numexpression orelse orphanpenalties orphanpenalty \
+orunless outputbox overloaded overloadmode pageboundary \
+pageboundarypenalty pageextragoal pagevsize parametercount parametermark \
+parattribute pardirection permanent pettymuskip postexhyphenchar \
+posthyphenchar postinlinepenalty prebinoppenalty predisplaygapfactor preexhyphenchar \
+prehyphenchar preinlinepenalty prerelpenalty protrudechars protrusionboundary \
+pxdimen quitloop quitvmode resetmathspacing retokenized \
+rightmarginkern rpcode savecatcodetable scaledemwidth scaledexheight \
+scaledextraspace scaledinterwordshrink scaledinterwordspace scaledinterwordstretch scaledslantperpoint \
+scantextokens semiexpand semiexpanded semiprotected setdefaultmathcodes \
+setfontid setmathatomrule setmathignore setmathoptions setmathpostpenalty \
+setmathprepenalty setmathspacing shapingpenaltiesmode shapingpenalty skewed \
+skewedwithdelims snapshotpar supmarkmode swapcsvalues tabsize \
+textdirection thewithoutunit tinymuskip todimension tohexadecimal \
+tointeger tokenized toksapp tokspre tolerant \
+tomathstyle toscaled tosparsedimension tosparsescaled tpack \
+tracingadjusts tracingalignments tracingexpressions tracingfonts tracingfullboxes \
+tracinghyphenation tracinginserts tracingmarks tracingmath tracingnodes \
+tracingpenalties uleaders undent unexpandedloop unletfrozen \
+unletprotected untraced vpack wordboundary wrapuppar \
+xdefcsname xtoks xtoksapp xtokspre
keywordclass.tex.omega=\
Omegaminorversion Omegarevision Omegaversion
diff --git a/doc/context/documents/general/manuals/luametatex.pdf b/doc/context/documents/general/manuals/luametatex.pdf
index 224d64fd1..ab8f8b347 100644
--- a/doc/context/documents/general/manuals/luametatex.pdf
+++ b/doc/context/documents/general/manuals/luametatex.pdf
Binary files differ
diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex b/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
index 8dcd2f2d1..403f1a029 100644
--- a/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
+++ b/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
@@ -281,17 +281,21 @@ if luatex and luametatex then
local match = string.match
- local index = structures.registers.collected and structures.registers.collected.luatexindex
local found = { }
- if index then
- local data = index.entries
- for i=1,#data do
- found[match(data[i].list[1][1],"\\tex%s*{(.-)}") or ""] = true
+ local function collect(index)
+ if index then
+ local data = index.entries
+ for i=1,#data do
+ found[match(data[i].list[1][1],"\\tex%s*{(.-)}") or ""] = true
+ end
+ -- inspect(found)
end
- -- inspect(found)
end
+ collect(structures.registers.collected and structures.registers.collected.texindex)
+ collect(structures.registers.collected and structures.registers.collected.luatexindex)
+
luatex = table.tohash(luatex)
luametatex = table.tohash(luametatex)
@@ -316,8 +320,9 @@ if luatex and luametatex then
-- context.page()
- context("The following primitives are available in \\LUAMETATEX\\ only. ")
- context("At some point in time some might be added to \\LUATEX.")
+ context("The following primitives are available in \\LUAMETATEX\\ only. In the meantime ")
+ context("the \\LUAMETATEX\\ code base is so different from \\LUATEX\\ that backporting ")
+ context("is no longer reasonable.")
context.blank()
context.startcolumns { n = 2 }
diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex b/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex
index bdac9047c..e82a41118 100644
--- a/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex
+++ b/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex
@@ -876,6 +876,14 @@ expand the passed general text. The \type {g} and \type {x} variants are global.
\stopsubsection
+\startsubsection[title={\prm {etoks} and \prm {xtoks}}]
+
+A mix between the previously discussed append and prepend primitives and simple
+toks register assignments are these two. They act like \prm {toks} but expand
+their content first. The \type {x} variant does a global assignment.
+
+\stopsubsection
+
\startsubsection[title={\prm {csstring}, \prm {begincsname} and \prm {lastnamedcs}}]
These are somewhat special. The \prm {csstring} primitive is like
@@ -1015,19 +1023,84 @@ but faster (only measurable with millions of calls) and probably more convenient
\stopsubsection
-\startsubsection[title={\prm {defcsname}, \prm {edefcsname}, \prm {edefcsname} and \prm {xdefcsname}}]
+\startsubsection[title={\prm {defcsname}, \prm {edefcsname}, \prm {gdefcsname} and \prm {xdefcsname}}]
Although we can implement these primitives easily using macros it makes sense,
given the popularity of \prm {csname} to have these as primitives. It also saves
some \prm {expandafter} usage and it looks a bit better in the source.
\starttyping
-\def\gdefcsname foo\endcsname{oof}
+\gdefcsname foo\endcsname{oof}
+\stoptyping
+
+\stopsubsection
+
+\startsubsection[title={\prm {letcsname} and \prm {gletcsname}}]
+
+These can also be implemented using macros but again they are natively provided
+by the engine for the same reasons: less code and less tracing clutter.
+
+\starttyping
+\gletcsname foo\endcsname \relax
+\stoptyping
+
+\stopsubsection
+
+\startsubsection[title={\prm {futuredef} and \prm {futurecsname}}]
+
+This is just the definition variant of \prm {futurelet} and a simple example
+shows the difference:
+
+\startbuffer
+\def\whatever{[\next:\meaning\next]}
+\futurelet\next\whatever A
+\futuredef\next\whatever B
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+The next one was more an experiment that then stayed around, just to see what
+surprising abuse of this primitive will happen:
+
+\startbuffer
+\def\whateveryes{[YES]}
+\def\whatevernop{[NOP]}
+\let\whatever\undefined
+\futurecsname\whatevernop whatever\endcsname
+\futurecsname\whatevernop whateveryes\endcsname
+\stopbuffer
+
+\typebuffer
+
+When the assembles control sequence is undefined the given one will be expanded,
+a weird one, right? I will probably apply it some day in cases where I want less
+tracing and a more direct expansion of an assembled name.
+
+\getbuffer
+
+Here is a usage example:
+
+\starttyping
+\xdef\Whatever{\futurecsname\whatevernop whatever\endcsname}
+\xdef\Whatever{\futurecsname\whateveryes whateveryes\endcsname}
+\xdef\Whatever{\ifcsname whatever\endcsname\lastnamedcs\else\whatevernop\fi}
+\xdef\Whatever{\ifcsname whateveryes\endcsname\lastnamedcs\else\whatevernop\fi}
+\xdef\Whatever{\ifcsname whatever\endcsname\csname whatever\endcsname\else\whatevernop\fi}
+\xdef\Whatever{\ifcsname whateveryes\endcsname\csname whateveryes\endcsname\else\whatevernop\fi}
\stoptyping
+The timings for one million times defining each of these definitions are 0.277,
+0.313, 0.310, 0.359, 0.352 and 0.573 seconds (on a 2018 Dell 7250 Precision
+laptop with mobile E3-1505M v6 processor), so there is a little gain here, but of
+course in practice no one will notice that because not that many such macros are
+defined (or used).
+
\stopsubsection
-\startsubsection[title={\prm {expanded}}]
+\startsubsection[title={\prm {expanded}, \prm {localcontrol}, \prm
+{localcontrolled}, \prm {beginlocalcontrol} and \prm {endlocalcontrol}}]
\topicindex {expansion}
@@ -1036,113 +1109,115 @@ can come in handy: it avoids a tricky mix of \prm {expandafter} and \prm
{noexpand}. You can compare it with what happens inside the body of an \prm
{edef}. The \tex {immediateassignment} and \tex {immediateassigned} commands are
gone because we have the more powerful local control commands. They are a tad
-slower but this mechanism isn't used that much anyway. Inside an \prm {edef} you
-can use the \type {\immediate} prefix anyway, so if you really want these
-primitives back you can say:
+slower but this mechanism isn't used that much anyway.
\starttyping
-\let\immediateassignment\immediate
-\let\immediateassigned \localcontrolled
+\let\immediateassigned\localcontrolled % sort of what \LUATEX provides
\stoptyping
+Say that we define:
+
+\startbuffer
+\edef\TestA
+ {\advance\scratchcounter\plusone}
+\edef\TestB
+ {\localcontrol\TestA
+ \the\scratchcounter}
+\edef\TestC
+ {\localcontrolled{\advance\scratchcounter\plusone}%
+ \the\scratchcounter}
+\edef\TestD
+ {\beginlocalcontrol\advance\scratchcounter\plusone\endlocalcontrol
+ \the\scratchcounter}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+With this example:
+
+\startbuffer
+\scratchcounter 10 \meaningasis\TestA
+\scratchcounter 20 \meaningasis\TestB
+\scratchcounter 30 \meaningasis\TestC
+\scratchcounter 40 \meaningasis\TestD
+\stopbuffer
+
+\typebuffer
+
+We get this:
+
+\startlines
+\tttf \getbuffer
+\stoplines
+
+These local control primitives are a bit tricky and error message can be
+confusing. Future versions might have a bit better recovery but in practice it
+works as expected.
+
\stopsubsection
-% \startsubsection[title={\prm {expanded}, \prm {immediateassignment} and \prm {immediateassigned}}]
-%
-% \topicindex {expansion}
-%
-% The \prm {expanded} primitive takes a token list and expands its content which can
-% come in handy: it avoids a tricky mix of \prm {expandafter} and \prm {noexpand}.
-% You can compare it with what happens inside the body of an \prm {edef}. But this
-% kind of expansion still doesn't expand some primitive operations.
-%
-% \startbuffer
-% \newcount\NumberOfCalls
-%
-% \def\TestMe{\advance\NumberOfCalls1 }
-%
-% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
-% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
-% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
-%
-% \meaning\Tested
-% \stopbuffer
-%
-% \typebuffer
-%
-% The result is a macro that has the not expanded code in its body:
-%
-% \getbuffer
-%
-% Instead we can define \tex {TestMe} in a way that expands the assignment
-% immediately. You need of course to be aware of preventing look ahead interference
-% by using a space or \tex {relax} (often an expression works better as it doesn't
-% leave an \tex {relax}).
-%
-% \startbuffer
-% \def\TestMe{\immediateassignment\advance\NumberOfCalls1 }
-%
-% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
-% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
-% \edef\Tested{\TestMe foo:\the\NumberOfCalls}
-%
-% \meaning\Tested
-% \stopbuffer
-%
-% \typebuffer
-%
-% This time the counter gets updates and we don't see interference in the
-% resulting \tex {Tested} macro:
-%
-% \getbuffer
-%
-% Here is a somewhat silly example of expanded comparison:
-%
-% \startbuffer
-% \def\expandeddoifelse#1#2#3#4%
-% {\immediateassignment\edef\tempa{#1}%
-% \immediateassignment\edef\tempb{#2}%
-% \ifx\tempa\tempb
-% \immediateassignment\def\next{#3}%
-% \else
-% \immediateassignment\def\next{#4}%
-% \fi
-% \next}
-%
-% \edef\Tested
-% {(\expandeddoifelse{abc}{def}{yes}{nop}/%
-% \expandeddoifelse{abc}{abc}{yes}{nop})}
-%
-% \meaning\Tested
-% \stopbuffer
-%
-% \typebuffer
-%
-% It gives:
-%
-% \getbuffer
-%
-% A variant is:
-%
-% \starttyping
-% \def\expandeddoifelse#1#2#3#4%
-% {\immediateassigned{
-% \edef\tempa{#1}%
-% \edef\tempb{#2}%
-% }%
-% \ifx\tempa\tempb
-% \immediateassignment\def\next{#3}%
-% \else
-% \immediateassignment\def\next{#4}%
-% \fi
-% \next}
-% \stoptyping
-%
-% The possible error messages are the same as using assignments in preambles of
-% alignments and after the \prm {accent} command. The supported assignments are the
-% so called prefixed commands (except box assignments).
-%
-% \stopsubsection
+\startsubsection[title={\prm {semiprotected}, \prm {semiexpanded}, \prm {expand} and
+\prm {semiexpand}}]
+
+These primitives can best be explained with a few examples. The semi boils down to
+a bit more controlled usage of \prm {protected} macros.
+
+\startbuffer
+ \def\Test {test}
+ \def\TestA{\Test}
+\protected \def\TestB{\Test}
+\semiprotected \def\TestC{\Test}
+ \edef\TestD{\Test}
+ \edef\TestE{\TestA}
+ \edef\TestF{\TestB}
+ \edef\TestG{\TestC}
+ \edef\TestH{\normalexpanded{\TestB\TestC}} % ctx has \expanded defined
+ \edef\TestI{\semiexpanded{\TestB\TestC}}
+ \edef\TestJ{\expand\TestB\expand\TestC}
+ \edef\TestK{\semiexpand\TestB\semiexpand\TestC}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+The effective meanings are given next (we use \prm {meaningasis} for this):
+
+\startlines \tttf
+\meaningasis\Test
+\meaningasis\TestA
+\meaningasis\TestB
+\meaningasis\TestC
+\meaningasis\TestD
+\meaningasis\TestE
+\meaningasis\TestF
+\meaningasis\TestG
+\meaningasis\TestH
+\meaningasis\TestI
+\meaningasis\TestJ
+\meaningasis\TestK
+\stoplines
+
+\stopsubsection
+
+\startsubsection[title={\prm {norelax}}]
+
+There are a few cases where the \TEX\ scanned skips over spaces and \prm {relax} as
+well as quits on a \prm {relax} in which case it gets pushed back. An example is
+given below:
+
+\startbuffer
+\edef\TestA{\ifnum1=1\relax Y\else N\fi} \meaningasis\TestA
+\edef\TestB{\ifnum1=1\norelax Y\else N\fi} \meaningasis\TestB
+\stopbuffer
+
+\typebuffer
+
+The second line also contains a sentinel but this time we use \prm {norelax}
+which will not be pushed back. So, this feature is just a trick to get rid of (in
+itself reasonable) side effects.
+
+\startlines\getbuffer \stoplines
+
+\stopsubsection
\startsubsection[title={\prm {ignorepars}}]
@@ -1369,6 +1444,42 @@ one might evolve).
\stopsubsection
+\startsubsection[title={\prm {ifhastok}, \prm {ifhastoks}, \prm {ifhasxtoks} and \prm {ifhaschar}}]
+
+\topicindex {conditions+tokens}
+\topicindex {tokens}
+
+The first three test primitives run over a token list in order to encounter a
+single token or a sequence. The \type {x} variants applies expansion.
+
+\startbuffer
+\def\ab {ab}
+\def\abc{abc}
+\ifhastok 1 {12} Y\else N\fi
+\ifhastoks {ab} {abc}Y\else N\fi
+\ifhastoks {ab} {\abc}Y\else N\fi
+\ifhastoks {\ab}{\abc}Y\else N\fi
+\ifhasxtoks{ab} {\abc}Y\else N\fi
+\ifhastok 3 {12} Y\else N\fi
+\ifhastoks {de} {abc}Y\else N\fi
+\stopbuffer
+
+\typebuffer \startpacked[blank] {\tt\nospacing\getbuffer} \stoppacked
+
+The \prm {ifhaschar} primitive differs from \prm {ifhastok} in that it handles
+nested balanced \quote {lists}, as in:
+
+\startbuffer
+\ifhastok a {abc}Y\else N\fi
+\ifhaschar a {abc}Y\else N\fi
+\ifhastok a{{a}bc}Y\else N\fi
+\ifhaschar a{{a}bc}Y\else N\fi
+\stopbuffer
+
+\typebuffer \startpacked[blank] {\tt\nospacing\getbuffer} \stoppacked
+
+\stopsubsection
+
\startsubsection[title={\prm {ifarguments}, \prm {ifparameters} and \prm {ifparameter}}]
These are part of the extended macro argument parsing features. The \type
@@ -1645,6 +1756,113 @@ a split of the given size but result has the natural dimensions then.
\stopsubsection
+\startsubsection[title={\prm {boxxoffset}, \prm {boxyoffset}, \prm {boxxmove}, \prm {boxymove},
+\prm{boxorientation} and \prm{boxgeometry}}]
+
+This repertoire of primitives can be used to do relative positioning. The offsets
+are virtual while the moves adapt the dimensions. The orientation bitset can be
+used to rotate the box over 90, 180 and 270 degrees. It also influences the
+corner, midpoint or baseline.
+
+{\em There is information in the \CONTEXT\ low level manuals and in due time I
+will add a few examples here. This feature needs support in the backend when used
+(as in \CONTEXT) so it might influence performance.}
+
+\stopsubsection
+
+\startsubsection[title={\prm {boxtotal}}]
+
+The \prm {boxtotal} primitive returns the sum of the height and depth and is less
+useful as setter: it just sets the height and depth to half of the given value.
+
+\stopsubsection
+
+\startsubsection[title={\prm {boxshift}}]
+
+In traditional \TEX\ a box has height, depth, width and a shift where the later
+relates to \prm {raise}, \prm {lower}, \prm {moveleft} and \prm {moveright}. This
+primitive can be used to query and set this property.
+
+\startbuffer
+\setbox0\hbox{test test test}
+\setbox2\hbox{test test test} \boxshift2 -10pt
+\ruledhbox{x \raise10pt\box0\ x}
+\ruledhbox{x \box2\ x}
+\stopbuffer
+
+\typebuffer
+
+\stopsubsection
+
+\startsubsection[title={\prm {boxanchor}, \prm {boxanchors}, \prm {boxsource} and \prm {boxtarget}}]
+
+{\em These are experimental.}
+
+\stopsubsection
+
+\startsubsection[title={\prm {boxfreeze}, \prm {boxadapt} and \prm {boxrepack}}]
+
+This operation will freeze the glue in the given box, something that normally is
+delayed and delegated to the backend.
+
+\startbuffer
+\setbox 0 \hbox to 5cm {\hss test}
+\setbox 2 \hbox to 5cm {\hss test}
+\boxfreeze 2 0
+\ruledhbox{\unhbox 0}
+\ruledhbox{\unhbox 2}
+\stopbuffer
+
+\typebuffer
+
+The second parameter to \prm {boxfreeze} determines recursion. Here we just
+freeze the outer level:
+
+\getbuffer
+
+Repacking will take the content of an existing box and add or subtract from it:
+
+\startbuffer
+\setbox 0 \hbox {test test test}
+\setbox 2 \hbox {\red test test test} \boxrepack0 +.2em
+\setbox 4 \hbox {\green test test test} \boxrepack0 -.2em
+\ruledhbox{\box0} \vskip-\lineheight
+\ruledhbox{\box0} \vskip-\lineheight
+\ruledhbox{\box0}
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+We can use this primitive to check the natural dimensions:
+
+\startbuffer
+\setbox 0 \hbox spread 10pt {test test test}
+\ruledhbox{\box0} (\the\boxrepack0,\the\wd0)
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+Adapting will recalculate the dimensions with a scale factor for the glue:
+
+\startbuffer
+\setbox 0 \hbox {test test test}
+\setbox 2 \hbox {\red test test test} \boxadapt 0 200
+\setbox 4 \hbox {\blue test test test} \boxadapt 0 -200
+\ruledhbox{\box0} \vskip-\lineheight
+\ruledhbox{\box0} \vskip-\lineheight
+\ruledhbox{\box0}
+\stopbuffer
+
+\typebuffer
+
+\getbuffer
+
+\stopsubsection
+
\startsubsection[title={Images and reused box objects},reference=sec:imagesandforms]
In original \TEX\ image support is dealt with via specials. It's not a native
@@ -1731,6 +1949,14 @@ mode.
\stopsubsection
+\startsubsection[title={\prm {unhpack}, \prm {unvpack}}]
+
+These two are somewhat experimental. They ignore the accumulated pre- and
+postmigrated material bound to a box. I needed it for some experiment so the
+functionality might change when I really need it.
+
+\stopsubsection
+
\startsubsection[title={\prm {gleaders}},reference=sec:gleaders]
\topicindex {leaders}
@@ -1852,6 +2078,15 @@ they will be stable.
\stopsubsection
+\startsubsection[title={\prm {lastboundary} and \prm {unboundary}}]
+
+There are \prm {lastpenalty}, \prm {lastskip}, \prm {lastkern} and \prm {lastbox}
+primitives and \LUAMETATEX\ also offers \prm {lastboundary} which gives the value
+assigned to a user boundary node. This means that we also have a \prm
+{unboundary} to complement the other \tex {un...} primitives.
+
+\stopsubsection
+
\stopsection
\startsection[title={Files}]
@@ -2516,7 +2751,8 @@ experimental so what gets displayed might change.
\stopsection
-\startsection[title={Constants with \prm{integerdef} and \prm {dimensiondef}}]
+\startsection[title={Constants with \prm{integerdef}, \prm {dimensiondef},
+\prm {gluespecdef} and \prm {mugluespecdef}}]
It is rather common to store constant values in a register or character
definition.
@@ -2530,8 +2766,10 @@ definition.
But in \LUAMETATEX\ we also can do this:
\starttyping
-\integerdef \MyConstantC 456
-\dimensiondef\MyConstantD 456pt
+\integerdef \MyConstantI 456
+\dimensiondef \MyConstantD 456pt
+\gluespecdef \MyConstantG 987pt minus 654pt plus 321pt
+\mugluespecdef \MyConstantG 3mu plus 2mu minus 1mu
\stoptyping
These two are stored as efficient as a register but don't occupy a register slot.
@@ -2544,14 +2782,52 @@ in a previous section.
\stopsection
-\startsection[title={Serialization with \prm {todimension}, \prm {toscaled} and \prm {tointeger}}]
+\startsection[title={Getting internal indices with \prm {indexofcharacter} and \prm {indexofregister}}]
+
+When you have defined a register with one of the \tex {...def} primitives but for
+some reasons needs to know the register index you can query that:
+
+\startbuffer
+\the\indexofregister \scratchcounterone,
+\the\indexofregister \scratchcountertwo,
+\the\indexofregister \scratchwidth,
+\the\indexofregister \scratchheight,
+\the\indexofregister \scratchdepth,
+\the\indexofregister \scratchbox
+\stopbuffer
-These three serializers take a verbose or symbolic quantity:
+\typebuffer
+
+We lie a little here because in \CONTEXT\ the box index \tex {scratchbox} is
+actually defined as: \normalexpanded {\typ {\meaningasis \scratchbox}} but it
+still is a number so it fits in.
+
+\getbuffer
+
+A similar primitive gives us the (normally \UNICODE) value of a character:
+
+\startbuffer
+\chardef\MyCharA=65
+\the\indexofcharacter A
+\the\indexofcharacter \MyCharA
+\stopbuffer
+
+\typebuffer
+
+The result is equivalent to \type {\number `A} but avoids the back quote:
+\inlinebuffer.
+
+\stopsection
+
+\startsection[title={Serialization with \prm {todimension}, \prm {toscaled}, \prm {tohexadecimal} and \prm {tointeger}}]
+
+These serializers take a verbose or symbolic quantity:
\starttyping
-\todimension 10pt \todimension \scratchdimen % with unit
-\toscaled 10pt \toscaled \scratchdimen % without unit
-\tointeger 10 \tointeger \scratchcounter
+\todimension 10pt \todimension \scratchdimen % with unit
+\toscaled 10pt \toscaled \scratchdimen % without unit
+\tointeger 10 \tointeger \scratchcounter
+\tohexadecimal 10 \tohexadecimal \scratchcounter
\stoptyping
This is particularly handy in cases where you don't know what you deal with, for instance
@@ -2565,6 +2841,29 @@ is often overkill and gives more noise in a trace.
\stopsection
+\startsection[title={Serialization with \prm {thewithoutunit}, \prm {tosparsedimension} and \prm {tosparsescaled}}]
+
+By default \TEX\ lets \type {1pt} come out as \type {1.0pt} which is why we also have
+two sparse variants:
+
+\startbuffer
+\todimension 10pt\quad\tosparsedimension 10pt
+\todimension 1.2pt\quad\tosparsedimension 1.2pt
+\toscaled 10pt\quad\tosparsescaled 10pt
+\toscaled 1.2pt\quad\tosparsescaled 1.2pt
+\stopbuffer
+
+\typebuffer
+
+This time trailing zeros (and a trailing period) will be dropped:
+
+\startlines \getbuffer \stoplines
+
+The \prm {thewithoutunit} primitive is like \prm {the} on a dimension but it
+omits the unit.
+
+\stopsection
+
\startsection[title=Expressions with \prm {numexpression}, \prm {dimexpression}]
The \ETEX\ expression primitives are handy but have some limitations. Although
diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-math.tex b/doc/context/sources/general/manuals/luametatex/luametatex-math.tex
index eb3f6c61d..31ee85b77 100644
--- a/doc/context/sources/general/manuals/luametatex/luametatex-math.tex
+++ b/doc/context/sources/general/manuals/luametatex/luametatex-math.tex
@@ -10,7 +10,8 @@
\topicindex {math}
-End 2021 this chapter started with this:
+Because we started from \LUATEX, by the end of 2021 this chapter started with
+this, even if we already reworked the engine:
\startquotation
At this point there is no difference between \LUAMETATEX\ and \LUATEX\ with
@@ -61,10 +62,10 @@ don't expect other macro packages to use the new features anyway.
For various reasons we need to encode a math character in a 32 bit number and
because we often also need to keep track of families and classes the range of
-characters is limited to 20 bits. There are upto 64 classes (more than in
-\LUATEX) and 64 families (less than in \LUATEX). The upper limit of characters is
-less that what \UNICODE\ offers but for math we're okay. If needed we can provide
-less families.
+characters is limited to 20 bits. There are upto 64 classes (which is a lot more
+than in \LUATEX) and 64 families (less than in \LUATEX). The upper limit of
+characters is less that what \UNICODE\ offers but for math we're okay. If needed
+we can provide less families.
The math primitives from \TEX\ are kept as they are, except for the ones that
convert from input to math commands: \type {mathcode}, and \type {delcode}. These
@@ -103,7 +104,7 @@ The unaltered ones are:
In \LUATEX\ we support the single number primitives *with \type {num} in their
name) conforming the \XETEX\ method. For the moment that still works but you need
to figure out the number yourself. The split number variants are more future safe
-with respect to classes and families. Wd don't document \prm {Umathcharnumdef},
+with respect to classes and families. We don't document \prm {Umathcharnumdef},
\prm {Umathcharnum}, \prm {Umathcodenum} and \prm {Udelcodenum} here any longer.
\starttabulate[|l|l|c|c|c|]
@@ -120,12 +121,12 @@ with respect to classes and families. Wd don't document \prm {Umathcharnumdef},
\stoptabulate
So, there are upto 64 classes of which at this moment about 20 are predefined so,
-taking some future usage by the engine into account,you can assume 32 upto 63 to
+taking some future usage by the engine into account,you can assume 32 upto 60 to
be available for any purpose. The number of families has been reduced from 256 to
64 which is plenty for daily use in an \OPENTYPE\ setup. If we ever need to
-expand the \UNICODE\ range there will be less families. The values of begin and
-end classes and the number of classes can be fetched from the \LUA\ status
-table.
+expand the \UNICODE\ range there will be less families or we just go for a larger
+internal record. The values of begin and end classes and the number of classes
+can be fetched from the \LUA\ status table.
Given the above, specifications typically look like:
@@ -144,23 +145,20 @@ that moment the distinction between small and large delimiters will be gone. Of
course an alternative is to support a specific large size but that is unlikely to
happen.
-% For some of these primitives, all information is packed into a single signed
-% integer. For the first two (\prm {Umathcharnum} and \prm {Umathcodenum}), the
-% lowest 21 bits are the character code, the 3 bits above that represent the math
-% class, and the family data is kept in the topmost bits. This means that the values
-% for math families 128--255 are actually negative. For \prm {Udelcodenum} there
-% is no math class. The math family information is stored in the bits directly on
-% top of the character code. Using these three commands is not as natural as using
-% the two- and three|-|value commands, so unless you know exactly what you are
-% doing and absolutely require the speedup resulting from the faster input
-% scanning, it is better to use the verbose commands instead.
-
-The \prm {Umathaccent} command accepts optional keywords to control various
-details regarding math accents. See \in {section} [mathacc] below for details.
-
-There are more new primitives and all of these will be explained in following
+This means that future versions of \LUAMETATEX\ might drop for instance the large
+family in delimiters, if only because we assume a coherent setup where
+extensibles come from the same font so that we don't need to worry about clashing
+font parameters. This is a condition that we can easily meet in \CONTEXT, which is
+the reference for \LUAMETATEX.
+
+% Constructor related primitives like \prm {Umathaccent} accepts optional keywords
+% to control various details regarding their treatment and rendering. See for
+% instance \in {section} [mathacc] for details. Some keywords are specific, but
+% some are shared between the math nodes (aka noads).
+
+There are more new primitives and most of these will be explained in following
sections. For instance these are variants of radicals and delimiters all are
-set the same::
+set the same:
\starttabulate[|l|c|c|c|]
\DB primitive \BC class \BC family \NC character \NC \NR
@@ -186,10 +184,90 @@ options and keywords.
\topicindex{math+control}
-Processing math is controlled by \prm {mathfontcontrol}, a numeric bitset
-parameter. The recommended bits are marked with a star but it really depends on
-the macro package to set up the machinery well. Of course one can just enable all
-and see what happens.
+Rendering math has long been dominated by \TEX\ but that changed when \MICROSOFT\
+came with \OPENTYPE\ math: an implementation as well as a font. Some of that was
+modelled after \TEX\ and some was dictated (we think) by the way word processors
+deal with math. For instance, traditional \TEX\ math has a limited set of glyph
+properties and therefore has a somewhat complex interplay between width and
+italic correction. There are no kerns, contrary to \OPENTYPE\ math fonts that
+provides staircase kerns. Interestingly \TEX\ does have some ligature building
+going on in the engine.
+
+In traditional \TEX\ italic correction gets added to the width and selectively
+removed later (or compensated by some shift and|/|or cheating with the box
+width). When we started with \LUATEX\ we had to gamble quite a bit about how to
+apply parameters and glyph properties which resulted in different code paths,
+heuristics, etc. That worked on the average but fonts are often not perfect and
+when served as an example for another one the bad bits can be inherited. That
+said, over time the descriptions improved and this is what the \OPENTYPE\
+specification has to say about italic correction now \footnote {\type
+{https://docs.microsoft.com/en-us/typography/opentype/spec/math}}:
+
+\startitemize [n]
+ \startitem
+ When a run of slanted characters is followed by a straight character
+ (such as an operator or a delimiter), the italics correction of the last
+ glyph is added to its advance width.
+ \stopitem
+ \startitem
+ When positioning limits on an N-ary operator (e.g., integral sign), the
+ horizontal position of the upper limit is moved to the right by half the
+ italics correction, while the position of the lower limit is moved to the
+ left by the same distance.
+ \stopitem
+ \startitem
+ When positioning superscripts and subscripts, their default horizontal
+ positions are also different by the amount of the italics correction of
+ the preceding glyph.
+ \stopitem
+\stopitemize
+
+The first rule is complicated by the fact that \quote {followed} is vague: in
+\TEX\ the sequence \type {$ a b c def $} results in six separate atoms, separated
+by inter atom spacing. The characters in these atoms are the nucleus and there
+can be a super- and|/|or subscript attached and in \LUAMETATEX\ also a prime,
+superprescript and/or subprescript.
+
+The second rule comes from \TEX\ and one can wonder why the available top accent
+anchor is not used. Maybe because bottom accent anchors are missing? Anyway,
+we're stuck with this now.
+
+The third rule also seems to come from \TEX. Take the \quote {\it f} character:
+in \TEX\ fonts that one has a narrow width and part sticks out (in some even at
+the left edge). That means that when the subscript gets attached it will move
+inwards relative to the real dimensions. Before the superscript an italic
+correction is added so what that correction is non|-|zero the scripts are
+horizontally shifted relative to each other.
+
+Now look at this specification of staircase kerns \footnote {Idem.}:
+
+\startnarrower
+ The \type {MathKernInfo} table provides mathematical kerning values used for
+ kerning of subscript and superscript glyphs relative to a base glyph. Its
+ purpose is to improve spacing in situations such as omega with superscript f
+ or capital V with subscript capital A.
+
+ Mathematical kerning is height dependent; that is, different kerning amounts
+ can be specified for different heights within a glyph’s vertical extent. For
+ any given glyph, different values can be specified for four corner positions,
+ top|-|right, to|-|left, etc., allowing for different kerning adjustments
+ according to whether the glyph occurs as a subscript, a superscript, a base
+ being kerned with a subscript, or a base being kerned with a superscript.
+\stopnarrower
+
+Again we're talking super- and subscripts and should we now look at the italic
+correction or assume that the kerns do the job? This is a mixed bag because
+scripts are not always (single) characters. We have to guess a bit here. After
+years of experimenting we came to the conclusion that it will never be okay so
+that's why we settled on controls and runtime fixes to fonts.
+
+This means that processing math is controlled by \prm {mathfontcontrol}, a
+numeric bitset parameter. The recommended bits are marked with a star but it
+really depends on the macro package to set up the machinery well. Of course one
+can just enable all and see what happens. \footnote {This model was more granular
+and could even be font (and character) specific but that was dropped because
+fonts are too inconsistent and an occasional fit is more robust that a generally
+applied rule.}
\starttabulate[|l|l|c|]
\DB bit \BC name \NC \NC \NR
@@ -212,21 +290,21 @@ and see what happens.
\NC \type {0x08000} \NC \type {checktextitalickern} \NC \star \NR
\NC \type {0x10000} \NC \type {checkspaceitalickern} \NC \NR
\NC \type {0x20000} \NC \type {applyscriptitalickern} \NC \star \NR
-\NC \type {0x40000} \NC \type {italicshapekern} \NC \star \NR
+%NC \type {0x40000} \NC \type {italicshapekern} \NC \star \NR now default
\LL
\stoptabulate
-One reason for this approach is that traditional and \OPENTYPE\ fonts have
-different approaches (especially when it comes to dealing with the width and
-italic corrections) and is even more complicated by the fact that the fonts are
-often inconsistent (within and between). In \CONTEXT\ we deal with this by
-runtime fixes to fonts. In any case the Cambria font is taken as reference.
+So, to summarize: the reason for this approach is that traditional and \OPENTYPE\
+fonts have different approaches (especially when it comes to dealing with the
+width and italic corrections) and is even more complicated by the fact that the
+fonts are often inconsistent (within and between). In \CONTEXT\ we deal with this
+by runtime fixes to fonts. In any case the Cambria font is taken as reference.
\stopsection
\startsection[title={Math styles}]
-\startsubsection[title={\prm {mathstyle}}]
+\startsubsection[title={\prm {mathstyle}, \prm {mathstackstyle} and \prm {Ustyle}}]
\topicindex {math+styles}
@@ -235,7 +313,7 @@ expandable fashion (while the math list is still being read). To make this
possible, \LUATEX\ adds the new primitive: \prm {mathstyle}. This is a \quote
{convert command} like e.g. \prm {romannumeral}: its value can only be read,
not set. Beware that contrary to \LUATEX\ this is now a proper number so you need
-to use \type {\number} o r\type {\the} in order to serialize it.
+to use \type {\number} or \type {\the} in order to serialize it.
The returned value is between 0 and 7 (in math mode), or $-1$ (all other modes).
For easy testing, the eight math style commands have been altered so that they can
@@ -341,6 +419,69 @@ gets converted in the second pass. It all makes sense and it illustrates the
importance of grouping. In fact, the math choice style being effective afterwards
has advantages. It would be hard to get it otherwise.
+So far for the more \LUATEX ish approach. One problem with \prm {mathstyle} is
+that when you got it, and want to act upon it, you need to remap it onto say \prm
+{scriptstyle} which can be done with an eight branched \prm {ifcase}. This is
+why we also have a more efficient alternative that you can use in macros:
+
+\starttyping
+\normalexpand{ ... \Ustyle\the\mathstyle ...}
+\normalexpand{ ... \Ustyle\the\mathstackstyle ...}
+\stoptyping
+
+This new primitive \prm {Ustyle} accepts a numeric value. The \prm
+{mathstackstyle} primitive is just a bonus (it complements \prm {Ustack}).
+
+The styles that the different math components and their subcomponents start out
+with are no longer hard coded but can be set at runtime:
+
+\starttabulate
+\DB primitive name \BC default \NC \NR
+\TB
+\NC \prm {Umathoverlinevariant} \NC cramped \NC \NR
+\NC \prm {Umathunderlinevariant} \NC normal \NC \NR
+\NC \prm {Umathoverdelimitervariant} \NC small \NC \NR
+\NC \prm {Umathunderdelimitervariant} \NC small \NC \NR
+\NC \prm {Umathdelimiterovervariant} \NC normal \NC \NR
+\NC \prm {Umathdelimiterundervariant} \NC normal \NC \NR
+\NC \prm {Umathhextensiblevariant} \NC normal \NC \NR
+\NC \prm {Umathvextensiblevariant} \NC normal \NC \NR
+\NC \prm {Umathfractionvariant} \NC cramped \NC \NR
+\NC \prm {Umathradicalvariant} \NC cramped \NC \NR
+\NC \prm {Umathdegreevariant} \NC doublesuperscript \NC \NR
+\NC \prm {Umathaccentvariant} \NC cramped \NC \NR
+\NC \prm {Umathtopaccentvariant} \NC cramped \NC \NR
+\NC \prm {Umathbotaccentvariant} \NC cramped \NC \NR
+\NC \prm {Umathoverlayaccentvariant} \NC cramped \NC \NR
+\NC \prm {Umathnumeratorvariant} \NC numerator \NC \NR
+\NC \prm {Umathdenominatorvariant} \NC denominator \NC \NR
+\NC \prm {Umathsuperscriptvariant} \NC superscript \NC \NR
+\NC \prm {Umathsubscriptvariant} \NC subscript \NC \NR
+\NC \prm {Umathprimevariant} \NC superscript \NC \NR
+\NC \prm {Umathstackvariant} \NC numerator \NC \NR
+\LL
+\stoptabulate
+
+These defaults remap styles are as follows:
+
+\starttabulate[|Tl|l|l|]
+\DB default \BC result \BC mapping \NC \NR
+\TB
+\NC cramped \NC cramp the style \NC D' D' T' T' S' S' SS' SS' \NC \NR
+\NC subscript \NC smaller and cramped \NC S' S' S' S' SS' SS' SS' SS' \NC \NR
+\NC small \NC smaller \NC S S S S SS SS SS SS \NC \NR
+\NC superscript \NC smaller \NC S S S S SS SS SS SS \NC \NR
+\NC smaller \NC smaller unless already SS \NC S S' S S' SS SS' SS SS' \NC \NR
+\NC numerator \NC smaller unless already SS \NC S S' S S' SS SS' SS SS' \NC \NR
+\NC denominator \NC smaller, all cramped \NC S' S' S' S' SS' SS' SS' SS' \NC \NR
+\NC doublesuperscript \NC smaller, keep cramped \NC S S' S S' SS SS' SS SS' \NC \NR
+\LL
+\stoptabulate
+
+The main reason for opening this up was that it permits experiments and removed
+hard coded internal values. But as these defaults served well for decades there
+are no real reasons to change them.
+
\stopsubsection
\startsubsection[title={\prm {Ustack}}]
@@ -358,7 +499,8 @@ $\Ustack {a \over b}$
\stoptyping
The \prm {Ustack} command will scan the next brace and start a new math group
-with the correct (numerator) math style.
+with the correct (numerator) math style. The \prm {ustackstyle} relates to this
+feature.
\stopsubsection
@@ -423,7 +565,8 @@ we force styles in the script using \prm {scriptstyle} and \prm
\getbuffer[demo]
-Now we set the following parameters
+Now we set the following parameters using \prm {setmathspacing} that accepts two
+class identifier, a style and a value.
\startbuffer[setup]
\setmathspacing 0 3 \scriptstyle = 30mu
@@ -465,12 +608,14 @@ In \LUATEX, the font dimension parameters that \TEX\ used in math typesetting ar
now accessible via primitive commands. In fact, refactoring of the math engine
has resulted in turning some hard codes properties into parameters.
+{\em The next needs checking ...}
+
\starttabulate
\DB primitive name \BC description \NC \NR
\TB
\NC \prm {Umathquad} \NC the width of 18 mu's \NC \NR
\NC \prm {Umathaxis} \NC height of the vertical center axis of
- the math formula above the baseline \NC \NR
+ the math formula above the baseline \NC \NR
\NC \prm {Umathoperatorsize} \NC minimum size of large operators in display mode \NC \NR
\NC \prm {Umathoverbarkern} \NC vertical clearance above the rule \NC \NR
\NC \prm {Umathoverbarrule} \NC the width of the rule \NC \NR
@@ -526,33 +671,81 @@ has resulted in turning some hard codes properties into parameters.
\LL
\stoptabulate
-In addition to the above official \OPENTYPE\ font parameters we have these:
+In addition to the above official \OPENTYPE\ font parameters we have these (the
+undefined will get presets, quite likely zero):
\starttabulate
-\DB primitive name \BC description \NC \NR
+\DB primitive name \BC description \NC \NR
\TB
-\NC \prm{Umathprimeraisepercent} \NC the percentage that the vertical position is scaled \NC \NR
-\NC \prm{Umathprimeshiftup} \NC the prime variant of \prm {SuperscriptShiftUp} \NC \NR
-\NC \prm{Umathprimebaselinedropmax} \NC the prime variant of \prm {SuperscriptBaselineDropMax} \NC \NR
-\NC \prm{Umathprimeshiftupcramped} \NC the prime variant of \prm {SuperscriptShiftUpCramped} \NC \NR
-\NC \prm{Umathprimespaceafter} \NC the prime variant of \prm {UmathSpaceAfterScript} \NC \NR
-\NC \prm{Umathprimewidthpercent} \NC the percentage of width that gets added \NC \NR
-\NC \prm{Umathspacebeforescript} \NC the prescript variant of \prm {UmathSpaceAfterScript} \NC \NR
-\NC \prm{Umathnolimitsupfactor} \NC a multiplier for the way limits are shifted up and down \NC \NR
-\NC \prm{Umathnolimitsubfactor} \NC a multiplier for the way limits are shifted up and down \NC \NR
-\NC \prm{Umathaccenttopshiftup} \NC the amount that a top accent is shifted up \NC \NR
-\NC \prm{Umathaccentbottomshiftdown} \NC the amount that a bottom accent is shifted down \NC \NR
-\NC \prm{Umathflattenedaccenttopshiftup} \NC the amount that a wide top accent is shifted up \NC \NR
-\NC \prm{Umathflattenedaccentbottomshiftdown} \NC the amount that a wide bottom accent is shifted down \NC \NR
-\NC \prm{Umathaccentbasedepth} \NC the complement of \prm {UmathAccentBaseHeight} \NC \NR
-\NC \prm{Umathaccentflattenedbasedepth} \NC the complement of \prm {UmathFlattenedAccentBaseHeight} \NC \NR
-\LL
+\NC \prm {Umathconnectoroverlapmin} \NC \NC \NR
+\NC \prm {Umathsubscriptsuperscriptshiftdown} \NC \NC \NR
+\NC \prm {Umathfractiondelsize} \NC \NC \NR
+\NC \prm {Umathfractiondelsize} \NC \NC \NR
+\NC \prm {Umathnolimitsupfactor} \NC a multiplier for the way limits are shifted up and down \NC \NR
+\NC \prm {Umathnolimitsubfactor} \NC a multiplier for the way limits are shifted up and down \NC \NR
+\NC \prm {Umathaccentbasedepth} \NC the complement of \prm {UmathAccentBaseHeight} \NC \NR
+\NC \prm {Umathflattenedaccentbasedepth} \NC the complement of \prm {UmathFlattenedAccentBaseHeight} \NC \NR
+\NC \prm {Umathspacebeforescript} \NC \NC \NR
+\NC \prm {Umathraisepercent} \NC the percentage that the vertical position is scaled \NC \NR
+\NC \prm {Umathprimeshiftup} \NC the prime variant of \prm {SuperscriptShiftUp} \NC \NR
+\NC \prm {Umathprimeshiftupcramped} \NC the prime variant of \prm {SuperscriptShiftUpCramped} \NC \NR
+\NC \prm {Umathprimespaceafter} \NC the prescript variant of \prm {UmathSpaceAfterScript} \NC \NR
+\NC \prm {Umathprimebaselinedropmax} \NC the prime variant of \prm {SuperscriptBaselineDropMax} \NC \NR
+\NC \prm {Umathprimewidthpercent} \NC the percentage of width that gets added \NC \NR
+\NC \prm {Umathskeweddelimitertolerance} \NC \NC \NR
+\NC \prm {Umathaccenttopshiftup} \NC the amount that a top accent is shifted up \NC \NR
+\NC \prm {Umathaccentbottomshiftdown} \NC the amount that a bottom accent is shifted down \NC \NR
+\NC \prm {Umathaccenttopovershoot} \NC \NC \NR
+\NC \prm {Umathaccentbottomovershoot} \NC \NC \NR
+\NC \prm {Umathaccentsuperscriptdrop} \NC \NC \NR
+\NC \prm {Umathaccentsuperscriptpercent} \NC \NC \NR
+\NC \prm {Umathflattenedaccenttopshiftup} \NC the amount that a wide top accent is shifted up \NC \NR
+\NC \prm {Umathflattenedaccentbottomshiftdown} \NC the amount that a wide bottom accent is shifted down \NC \NR
+\NC \prm {Umathdelimiterpercent} \NC \NC \NR
+\NC \prm {Umathdelimitershortfall} \NC \NC \NR
+\stoptabulate
+
+These relate to the font parameters and in \CONTEXT\ we assign some different
+defaults and tweak them in the goodie files:
+
+\starttabulate[|T|T|c|]
+\DB font parameter \BC primitive name \BC default \NC \NR
+\TB
+\NC MinConnectorOverlap \NC \prm {Umathconnectoroverlapmin} \NC 0 \NC \NR
+\NC SubscriptShiftDownWithSuperscript \NC \prm {Umathsubscriptsuperscriptshiftdown} \NC inherited \NC \NR
+\NC FractionDelimiterSize \NC \prm {Umathfractiondelsize} \NC undefined \NC \NR
+\NC FractionDelimiterDisplayStyleSize \NC \prm {Umathfractiondelsize} \NC undefined \NC \NR
+\NC NoLimitSubFactor \NC \prm {Umathnolimitsupfactor} \NC 0 \NC \NR
+\NC NoLimitSupFactor \NC \prm {Umathnolimitsubfactor} \NC 0 \NC \NR
+\NC AccentBaseDepth \NC \prm {Umathaccentbasedepth} \NC reserved \NC \NR
+\NC FlattenedAccentBaseDepth \NC \prm {Umathflattenedaccentbasedepth} \NC reserved \NC \NR
+\NC SpaceBeforeScript \NC \prm {Umathspacebeforescript} \NC 0 \NC \NR
+\NC PrimeRaisePercent \NC \prm {Umathprimeraise} \NC 0 \NC \NR
+\NC PrimeShiftUp \NC \prm {Umathprimeshiftup} \NC 0 \NC \NR
+\NC PrimeShiftUpCramped \NC \prm {Umathprimeshiftupcramped} \NC 0 \NC \NR
+\NC PrimeSpaceAfter \NC \prm {Umathprimespaceafter} \NC 0 \NC \NR
+\NC PrimeBaselineDropMax \NC \prm {Umathprimebaselinedropmax} \NC 0 \NC \NR
+\NC PrimeWidthPercent \NC \prm {Umathprimewidth} \NC 0 \NC \NR
+\NC SkewedDelimiterTolerance \NC \prm {Umathskeweddelimitertolerance} \NC 0 \NC \NR
+\NC AccentTopShiftUp \NC \prm {Umathaccenttopshiftup} \NC undefined \NC \NR
+\NC AccentBottomShiftDown \NC \prm {Umathaccentbottomshiftdown} \NC undefined \NC \NR
+\NC AccentTopOvershoot \NC \prm {Umathaccenttopovershoot} \NC 0 \NC \NR
+\NC AccentBottomOvershoot \NC \prm {Umathaccentbottomovershoot} \NC 0 \NC \NR
+\NC AccentSuperscriptDrop \NC \prm {Umathaccentsuperscriptdrop} \NC 0 \NC \NR
+\NC AccentSuperscriptPercent \NC \prm {Umathaccentsuperscriptpercent} \NC 0 \NC \NR
+\NC FlattenedAccentTopShiftUp \NC \prm {Umathflattenedaccenttopshiftup} \NC undefined \NC \NR
+\NC FlattenedAccentBottomShiftDown \NC \prm {Umathflattenedaccentbottomshiftdown} \NC undefined \NC \NR
+\NC DelimiterPercent \NC \prm {Umathdelimiterpercent} \NC 0 \NC \NR
+\NC DelimiterShortfall \NC \prm {Umathdelimitershortfall} \NC 0 \NC \NR
\stoptabulate
These parameters not only provide a bit more control over rendering, they also
can be used in compensating issues in font, because no font is perfect. Some are
the side effects of experiments and they have CamelCase companions in the \type
-{MathConstants} table.
+{MathConstants} table. For historical reasons the names are a bit inconsistent as
+some originate in \TEX\ so we prefer to keep those names. Not many users will
+mess around with these font parameters anyway. \footnote {I wonder if some names
+should change, so that decision is pending.}
Each of the parameters in this section can be set by a command like this:
@@ -589,6 +782,9 @@ post atom penalties and atom rules.
\topicindex {math+parameters}
+We already introduced the font specific math parameters but we tell abit more
+about them and how they relate to the original \TEX\ font dimensions.
+
While it is nice to have these math parameters available for tweaking, it would
be tedious to have to set each of them by hand. For this reason, \LUATEX\
initializes a bunch of these parameters whenever you assign a font identifier to
@@ -613,117 +809,187 @@ dimension parameter. For math fonts, this should be set to zero.
\def\MathLine#1#2#3#4#5%
{\TB
- \NC \llap{\high{\tx #2\enspace}}\ttbf \string #1 \NC \tt #5 \NC \NR
+ \NC \llap{\high{\tx #2\enspace}}\ttbf \prm {#1} \NC \tt #5 \NC \NR
\NC \tx #3 \NC \tt #4 \NC \NR}
\starttabulate[|l|l|]
\DB variable / style \BC tfm / opentype \NC \NR
-\MathLine{\Umathaxis} {} {} {AxisHeight} {axis_height}
-\MathLine{\Umathoperatorsize} {6} {D, D'} {DisplayOperatorMinHeight} {\emdash}
-\MathLine{\Umathfractiondelsize} {9} {D, D'} {FractionDelimiterDisplayStyleSize} {delim1}
-\MathLine{\Umathfractiondelsize} {9} {T, T', S, S', SS, SS'}{FractionDelimiterSize} {delim2}
-\MathLine{\Umathfractiondenomdown} {} {D, D'} {FractionDenominatorDisplayStyleShiftDown}{denom1}
-\MathLine{\Umathfractiondenomdown} {} {T, T', S, S', SS, SS'}{FractionDenominatorShiftDown} {denom2}
-\MathLine{\Umathfractiondenomvgap} {} {D, D'} {FractionDenominatorDisplayStyleGapMin} {3*default_rule_thickness}
-\MathLine{\Umathfractiondenomvgap} {} {T, T', S, S', SS, SS'}{FractionDenominatorGapMin} {default_rule_thickness}
-\MathLine{\Umathfractionnumup} {} {D, D'} {FractionNumeratorDisplayStyleShiftUp} {num1}
-\MathLine{\Umathfractionnumup} {} {T, T', S, S', SS, SS'}{FractionNumeratorShiftUp} {num2}
-\MathLine{\Umathfractionnumvgap} {} {D, D'} {FractionNumeratorDisplayStyleGapMin} {3*default_rule_thickness}
-\MathLine{\Umathfractionnumvgap} {} {T, T', S, S', SS, SS'}{FractionNumeratorGapMin} {default_rule_thickness}
-\MathLine{\Umathfractionrule} {} {} {FractionRuleThickness} {default_rule_thickness}
-\MathLine{\Umathskewedfractionhgap} {} {} {SkewedFractionHorizontalGap} {math_quad/2}
-\MathLine{\Umathskewedfractionvgap} {} {} {SkewedFractionVerticalGap} {math_x_height}
-\MathLine{\Umathlimitabovebgap} {} {} {UpperLimitBaselineRiseMin} {big_op_spacing3}
-\MathLine{\Umathlimitabovekern} {1} {} {0} {big_op_spacing5}
-\MathLine{\Umathlimitabovevgap} {} {} {UpperLimitGapMin} {big_op_spacing1}
-\MathLine{\Umathlimitbelowbgap} {} {} {LowerLimitBaselineDropMin} {big_op_spacing4}
-\MathLine{\Umathlimitbelowkern} {1} {} {0} {big_op_spacing5}
-\MathLine{\Umathlimitbelowvgap} {} {} {LowerLimitGapMin} {big_op_spacing2}
-\MathLine{\Umathoverdelimitervgap} {} {} {StretchStackGapBelowMin} {big_op_spacing1}
-\MathLine{\Umathoverdelimiterbgap} {} {} {StretchStackTopShiftUp} {big_op_spacing3}
-\MathLine{\Umathunderdelimitervgap} {} {} {StretchStackGapAboveMin} {big_op_spacing2}
-\MathLine{\Umathunderdelimiterbgap} {} {} {StretchStackBottomShiftDown} {big_op_spacing4}
-\MathLine{\Umathoverbarkern} {} {} {OverbarExtraAscender} {default_rule_thickness}
-\MathLine{\Umathoverbarrule} {} {} {OverbarRuleThickness} {default_rule_thickness}
-\MathLine{\Umathoverbarvgap} {} {} {OverbarVerticalGap} {3*default_rule_thickness}
-\MathLine{\Umathquad} {1} {} {<font_size(f)>} {math_quad}
-\MathLine{\Umathradicalkern} {} {} {RadicalExtraAscender} {default_rule_thickness}
-\MathLine{\Umathradicalrule} {2} {} {RadicalRuleThickness} {<not set>}
-\MathLine{\Umathradicalvgap} {3} {D, D'} {RadicalDisplayStyleVerticalGap} {default_rule_thickness+abs(math_x_height)/4}
-\MathLine{\Umathradicalvgap} {3} {T, T', S, S', SS, SS'}{RadicalVerticalGap} {default_rule_thickness+abs(default_rule_thickness)/4}
-\MathLine{\Umathradicaldegreebefore}{2} {} {RadicalKernBeforeDegree} {<not set>}
-\MathLine{\Umathradicaldegreeafter} {2} {} {RadicalKernAfterDegree} {<not set>}
-\MathLine{\Umathradicaldegreeraise} {2,7}{} {RadicalDegreeBottomRaisePercent} {<not set>}
-\MathLine{\Umathspaceafterscript} {4} {} {SpaceAfterScript} {script_space}
-\MathLine{\Umathstackdenomdown} {} {D, D'} {StackBottomDisplayStyleShiftDown} {denom1}
-\MathLine{\Umathstackdenomdown} {} {T, T', S, S', SS, SS'}{StackBottomShiftDown} {denom2}
-\MathLine{\Umathstacknumup} {} {D, D'} {StackTopDisplayStyleShiftUp} {num1}
-\MathLine{\Umathstacknumup} {} {T, T', S, S', SS, SS'}{StackTopShiftUp} {num3}
-\MathLine{\Umathstackvgap} {} {D, D'} {StackDisplayStyleGapMin} {7*default_rule_thickness}
-\MathLine{\Umathstackvgap} {} {T, T', S, S', SS, SS'}{StackGapMin} {3*default_rule_thickness}
-\MathLine{\Umathsubshiftdown} {} {} {SubscriptShiftDown} {sub1}
-\MathLine{\Umathsubshiftdrop} {} {} {SubscriptBaselineDropMin} {sub_drop}
-\MathLine{\Umathsubsupshiftdown} {8} {} {SubscriptShiftDownWithSuperscript} {\emdash}
-\MathLine{\Umathsubtopmax} {} {} {SubscriptTopMax} {abs(math_x_height*4)/5}
-\MathLine{\Umathsubsupvgap} {} {} {SubSuperscriptGapMin} {4*default_rule_thickness}
-\MathLine{\Umathsupbottommin} {} {} {SuperscriptBottomMin} {abs(math_x_height/4)}
-\MathLine{\Umathsupshiftdrop} {} {} {SuperscriptBaselineDropMax} {sup_drop}
-\MathLine{\Umathsupshiftup} {} {D} {SuperscriptShiftUp} {sup1}
-\MathLine{\Umathsupshiftup} {} {T, S, SS,} {SuperscriptShiftUp} {sup2}
-\MathLine{\Umathsupshiftup} {} {D', T', S', SS'} {SuperscriptShiftUpCramped} {sup3}
-\MathLine{\Umathsupsubbottommax} {} {} {SuperscriptBottomMaxWithSubscript} {abs(math_x_height*4)/5}
-\MathLine{\Umathunderbarkern} {} {} {UnderbarExtraDescender} {default_rule_thickness}
-\MathLine{\Umathunderbarrule} {} {} {UnderbarRuleThickness} {default_rule_thickness}
-\MathLine{\Umathunderbarvgap} {} {} {UnderbarVerticalGap} {3*default_rule_thickness}
-\MathLine{\Umathconnectoroverlapmin}{5} {} {MinConnectorOverlap} {0}
+\MathLine{Umathaxis} {} {} {AxisHeight} {axis_height}
+\MathLine{Umathaccentbaseheight} {} {} {AccentBaseHeight} {xheight}
+\MathLine{Umathflattenedaccentbaseheight}{} {} {FlattenedAccentBaseHeight} {xheight}
+\MathLine{Umathoperatorsize} {6} {D, D'} {DisplayOperatorMinHeight} {\emdash}
+\MathLine{Umathfractiondelsize} {9} {D, D'} {FractionDelimiterDisplayStyleSize} {delim1}
+\MathLine{Umathfractiondelsize} {9} {T, T', S, S', SS, SS'}{FractionDelimiterSize} {delim2}
+\MathLine{Umathfractiondenomdown} {} {D, D'} {FractionDenominatorDisplayStyleShiftDown}{denom1}
+\MathLine{Umathfractiondenomdown} {} {T, T', S, S', SS, SS'}{FractionDenominatorShiftDown} {denom2}
+\MathLine{Umathfractiondenomvgap} {} {D, D'} {FractionDenominatorDisplayStyleGapMin} {3*default_rule_thickness}
+\MathLine{Umathfractiondenomvgap} {} {T, T', S, S', SS, SS'}{FractionDenominatorGapMin} {default_rule_thickness}
+\MathLine{Umathfractionnumup} {} {D, D'} {FractionNumeratorDisplayStyleShiftUp} {num1}
+\MathLine{Umathfractionnumup} {} {T, T', S, S', SS, SS'}{FractionNumeratorShiftUp} {num2}
+\MathLine{Umathfractionnumvgap} {} {D, D'} {FractionNumeratorDisplayStyleGapMin} {3*default_rule_thickness}
+\MathLine{Umathfractionnumvgap} {} {T, T', S, S', SS, SS'}{FractionNumeratorGapMin} {default_rule_thickness}
+\MathLine{Umathfractionrule} {} {} {FractionRuleThickness} {default_rule_thickness}
+\MathLine{Umathskewedfractionhgap} {} {} {SkewedFractionHorizontalGap} {math_quad/2}
+\MathLine{Umathskewedfractionvgap} {} {} {SkewedFractionVerticalGap} {math_x_height}
+\MathLine{Umathlimitabovebgap} {} {} {UpperLimitBaselineRiseMin} {big_op_spacing3}
+\MathLine{Umathlimitabovekern} {1} {} {0} {big_op_spacing5}
+\MathLine{Umathlimitabovevgap} {} {} {UpperLimitGapMin} {big_op_spacing1}
+\MathLine{Umathlimitbelowbgap} {} {} {LowerLimitBaselineDropMin} {big_op_spacing4}
+\MathLine{Umathlimitbelowkern} {1} {} {0} {big_op_spacing5}
+\MathLine{Umathlimitbelowvgap} {} {} {LowerLimitGapMin} {big_op_spacing2}
+\MathLine{Umathoverdelimitervgap} {} {} {StretchStackGapBelowMin} {big_op_spacing1}
+\MathLine{Umathoverdelimiterbgap} {} {} {StretchStackTopShiftUp} {big_op_spacing3}
+\MathLine{Umathunderdelimitervgap} {} {} {StretchStackGapAboveMin} {big_op_spacing2}
+\MathLine{Umathunderdelimiterbgap} {} {} {StretchStackBottomShiftDown} {big_op_spacing4}
+\MathLine{Umathoverbarkern} {} {} {OverbarExtraAscender} {default_rule_thickness}
+\MathLine{Umathoverbarrule} {} {} {OverbarRuleThickness} {default_rule_thickness}
+\MathLine{Umathoverbarvgap} {} {} {OverbarVerticalGap} {3*default_rule_thickness}
+\MathLine{Umathquad} {1} {} {<font_size(f)>} {math_quad}
+\MathLine{Umathradicalkern} {} {} {RadicalExtraAscender} {default_rule_thickness}
+\MathLine{Umathradicalrule} {2} {} {RadicalRuleThickness} {<not set>}
+\MathLine{Umathradicalvgap} {3} {D, D'} {RadicalDisplayStyleVerticalGap} {default_rule_thickness+abs(math_x_height)/4}
+\MathLine{Umathradicalvgap} {3} {T, T', S, S', SS, SS'}{RadicalVerticalGap} {default_rule_thickness+abs(default_rule_thickness)/4}
+\MathLine{Umathradicaldegreebefore} {2} {} {RadicalKernBeforeDegree} {<not set>}
+\MathLine{Umathradicaldegreeafter} {2} {} {RadicalKernAfterDegree} {<not set>}
+\MathLine{Umathradicaldegreeraise} {2,7}{} {RadicalDegreeBottomRaisePercent} {<not set>}
+\MathLine{Umathspaceafterscript} {4} {} {SpaceAfterScript} {script_space}
+\MathLine{Umathstackdenomdown} {} {D, D'} {StackBottomDisplayStyleShiftDown} {denom1}
+\MathLine{Umathstackdenomdown} {} {T, T', S, S', SS, SS'}{StackBottomShiftDown} {denom2}
+\MathLine{Umathstacknumup} {} {D, D'} {StackTopDisplayStyleShiftUp} {num1}
+\MathLine{Umathstacknumup} {} {T, T', S, S', SS, SS'}{StackTopShiftUp} {num3}
+\MathLine{Umathstackvgap} {} {D, D'} {StackDisplayStyleGapMin} {7*default_rule_thickness}
+\MathLine{Umathstackvgap} {} {T, T', S, S', SS, SS'}{StackGapMin} {3*default_rule_thickness}
+\MathLine{Umathsubshiftdown} {} {} {SubscriptShiftDown} {sub1}
+\MathLine{Umathsubshiftdrop} {} {} {SubscriptBaselineDropMin} {sub_drop}
+\MathLine{Umathsubsupshiftdown} {8} {} {SubscriptShiftDownWithSuperscript} {\emdash}
+\MathLine{Umathsubtopmax} {} {} {SubscriptTopMax} {abs(math_x_height*4)/5}
+\MathLine{Umathsubsupvgap} {} {} {SubSuperscriptGapMin} {4*default_rule_thickness}
+\MathLine{Umathsupbottommin} {} {} {SuperscriptBottomMin} {abs(math_x_height/4)}
+\MathLine{Umathsupshiftdrop} {} {} {SuperscriptBaselineDropMax} {sup_drop}
+\MathLine{Umathsupshiftup} {} {D} {SuperscriptShiftUp} {sup1}
+\MathLine{Umathsupshiftup} {} {T, S, SS,} {SuperscriptShiftUp} {sup2}
+\MathLine{Umathsupshiftup} {} {D', T', S', SS'} {SuperscriptShiftUpCramped} {sup3}
+\MathLine{Umathsupsubbottommax} {} {} {SuperscriptBottomMaxWithSubscript} {abs(math_x_height*4)/5}
+\MathLine{Umathunderbarkern} {} {} {UnderbarExtraDescender} {default_rule_thickness}
+\MathLine{Umathunderbarrule} {} {} {UnderbarRuleThickness} {default_rule_thickness}
+\MathLine{Umathunderbarvgap} {} {} {UnderbarVerticalGap} {3*default_rule_thickness}
+\MathLine{Umathconnectoroverlapmin} {5} {} {MinConnectorOverlap} {0}
\LL
\stoptabulate
-{\em Todo: add the extra ones.}
+A few notes:
+
+\startitemize[n]
+
+\startitem
+ \OPENTYPE\ fonts set \prm {Umathlimitabovekern} and \prm
+ {Umathlimitbelowkern} to zero and set \prm {Umathquad} to the font size of
+ the used font, because these are not supported in the \type {MATH} table.
+\stopitem
+
+\startitem
+ Traditional \TFM\ fonts do not set \prm {Umathradicalrule} because \TEX82\
+ uses the height of the radical instead. When this parameter is indeed not set
+ when \LUATEX\ has to typeset a radical, a backward compatibility mode will
+ kick in that assumes that an oldstyle \TEX\ font is used. Also, they do not
+ set \prm {Umathradicaldegreebefore}, \prm {Umathradicaldegreeafter}, and \prm
+ {Umathradicaldegreeraise}. These are then automatically initialized to
+ $5/18$quad, $-10/18$quad, and 60.
+\stopitem
+
+\startitem
+ If \TFM\ fonts are used, then the \prm {Umathradicalvgap} is not set until
+ the first time \LUATEX\ has to typeset a formula because this needs
+ parameters from both family~2 and family~3. This provides a partial backward
+ compatibility with \TEX82, but that compatibility is only partial: once the
+ \prm {Umathradicalvgap} is set, it will not be recalculated any more.
+\stopitem
+
+\startitem
+ When \TFM\ fonts are used a similar situation arises with respect to \prm
+ {Umathspaceafterscript}: it is not set until the first time \LUATEX\ has to
+ typeset a formula. This provides some backward compatibility with \TEX82. But
+ once the \prm {Umathspaceafterscript} is set, \prm {scriptspace} will never
+ be looked at again.
+\stopitem
+
+\startitem
+ Traditional \TFM\ fonts set \prm {Umathconnectoroverlapmin} to zero because
+ \TEX82\ always stacks extensibles without any overlap.
+\stopitem
+
+\startitem
+ The \prm {Umathoperatorsize} is only used in \prm {displaystyle}, and is only
+ set in \OPENTYPE\ fonts. In \TFM\ font mode, it is artificially set to one
+ scaled point more than the initial attempt's size, so that always the \quote
+ {first next} will be tried, just like in \TEX82.
+\stopitem
+
+\startitem
+ The \prm {Umathradicaldegreeraise} is a special case because it is the only
+ parameter that is expressed in a percentage instead of a number of scaled
+ points.
+\stopitem
+
+\startitem
+ \type {SubscriptShiftDownWithSuperscript} does not actually exist in the
+ \quote {standard} \OPENTYPE\ math font Cambria, but it is useful enough to be
+ added.
+\stopitem
+
+\startitem
+ \type {FractionDelimiterDisplayStyleSize} and \type {FractionDelimiterSize}
+ do not actually exist in the \quote {standard} \OPENTYPE\ math font Cambria,
+ but were useful enough to be added.
+\stopitem
+
+\stopitemize
+
+As this mostly refers to \LUATEX\ there is more to tell about how \LUAMETATEX\
+deals with it. However, it is enough to know that much more behavior is
+configurable.
+
+\stopsubsection
-Note 1: \OPENTYPE\ fonts set \prm {Umathlimitabovekern} and \prm
-{Umathlimitbelowkern} to zero and set \prm {Umathquad} to the font size of the
-used font, because these are not supported in the \type {MATH} table,
+\stopsection
-Note 2: Traditional \TFM\ fonts do not set \prm {Umathradicalrule} because
-\TEX82\ uses the height of the radical instead. When this parameter is indeed not
-set when \LUATEX\ has to typeset a radical, a backward compatibility mode will
-kick in that assumes that an oldstyle \TEX\ font is used. Also, they do not set
-\prm {Umathradicaldegreebefore}, \prm {Umathradicaldegreeafter}, and \prm
-{Umathradicaldegreeraise}. These are then automatically initialized to
-$5/18$quad, $-10/18$quad, and 60.
+\startsection[title={Extra parameters}]
-Note 3: If \TFM\ fonts are used, then the \prm {Umathradicalvgap} is not set
-until the first time \LUATEX\ has to typeset a formula because this needs
-parameters from both family~2 and family~3. This provides a partial backward
-compatibility with \TEX82, but that compatibility is only partial: once the \prm
-{Umathradicalvgap} is set, it will not be recalculated any more.
+\startsubsection[title={Style related parameters}]
-Note 4: When \TFM\ fonts are used a similar situation arises with respect to \prm
-{Umathspaceafterscript}: it is not set until the first time \LUATEX\ has to
-typeset a formula. This provides some backward compatibility with \TEX82. But
-once the \prm {Umathspaceafterscript} is set, \prm {scriptspace} will never be
-looked at again.
+There are a couple of parameters that don't relate to the font but are more generally
+influencing the appearances. Some were added for experimenting.
-Note 5: Traditional \TFM\ fonts set \prm {Umathconnectoroverlapmin} to zero
-because \TEX82\ always stacks extensibles without any overlap.
+\starttabulate[|l|l|]
+\DB primitive \BC meaning \NC \NR
+\prm {Umathextrasubpreshift} \NC \NR
+\prm {Umathextrasubprespace} \NC \NR
+\prm {Umathextrasubshift} \NC \NR
+\prm {Umathextrasubspace} \NC \NR
+\prm {Umathextrasuppreshift} \NC \NR
+\prm {Umathextrasupprespace} \NC \NR
+\prm {Umathextrasupshift} \NC \NR
+\prm {Umathextrasupspace} \NC \NR
+\prm {Umathsubshiftdistance} \NC \NR
+\prm {Umathsupshiftdistance} \NC \NR
+\prm {Umathpresubshiftdistance} \NC \NR
+\prm {Umathpresupshiftdistance} \NC \NR
+\prm {Umathprimeshiftdrop} \NC \NR
+\LL
+\stoptabulate
-Note 6: The \prm {Umathoperatorsize} is only used in \prm {displaystyle}, and is
-only set in \OPENTYPE\ fonts. In \TFM\ font mode, it is artificially set to one
-scaled point more than the initial attempt's size, so that always the \quote
-{first next} will be tried, just like in \TEX82.
+\stopsubsection
-Note 7: The \prm {Umathradicaldegreeraise} is a special case because it is the
-only parameter that is expressed in a percentage instead of a number of scaled
-points.
+\startsubsection[title={Math struts}]
-Note 8: \type {SubscriptShiftDownWithSuperscript} does not actually exist in the
-\quote {standard} \OPENTYPE\ math font Cambria, but it is useful enough to be
-added.
+Todo:
-Note 9: \type {FractionDelimiterDisplayStyleSize} and \type
-{FractionDelimiterSize} do not actually exist in the \quote {standard} \OPENTYPE\
-math font Cambria, but were useful enough to be added.
+\starttabulate[|l|l|]
+\DB primitive \BC meaning \NC \NR
+\NC \prm {Umathruleheight} \NC \NR
+\NC \prm {Umathruledepth} \NC \NR
+\LL
+\stoptabulate
\stopsubsection
@@ -818,7 +1084,9 @@ For ease of use as well as for backward compatibility, \prm {thinmuskip}, \prm
{medmuskip} and \prm {thickmuskip} are treated specially. In their case a pointer
to the corresponding internal parameter is saved, not the actual \prm {muskip}
value. This means that any later changes to one of these three parameters will be
-taken into account. As a bonus we also introduced a \prm {tinymuskip} primitive.
+taken into account. As a bonus we also introduced the \prm {tinymuskip} and \prm
+{pettymuskip} primitives, just because we consider these fundamental, but they
+are not assigned internally to atom spacing combinations.
In \LUAMETATEX\ we go a bit further. Any named dimension, glue and mu glue
register as well as the constants with these properties can be bound to a pair by
@@ -880,6 +1148,46 @@ unprocessed math list. The result looks as follows:
\stopsubsection
+\startsubsection[title={Arbitrary atoms with \prm {mathatom} etc.}]
+
+The original \TEX\ engine has primitives like \prm {mathord} and a limited set of
+possible atoms. In \LUAMETATEX\ we have many more built in and you can add more.
+It will take a while before we have documented all the new math features and more
+details can be found in the manuals that come with \CONTEXT\ for which all this
+was implemented. In addition to \prm {mathord}, \prm {mathop}, \prm {mathbin},
+\prm {mathrel}, \prm {mathopen}, \prm {mathclose}, \prm {mathpunct} and \prm
+{mathinner} we have \prm {mathfrac}, \prm {mathrad}, \prm {mathmiddle}, \prm
+{mathaccent}, \prm {mathfenced}. \prm {mathghost} and the existing \prm
+{underline} and \prm {overline} class driven atoms.
+
+The \prm {mathatom} primitive is the generic one and it accepts a couple of
+keywords:
+
+\starttabulate[|cT|l|]
+\DB keyword \BC argument \NC meaning \NC \NR
+\TB
+\NC attr \NC int int \NC attributes to be applied to this atom \NC \NR
+\NC leftclass \NC class \NC the left edge class that determines spacing etc \NC \NR
+\NC rightclass \NC class \NC the right edge class that determines spacing etc \NC \NR
+\NC class \NC class \NC the general class \NC \NR
+\NC unpack \NC \NC unpack this atom in inline math \NC \NR
+\NC source \NC int \NC a symbolic index of the resulting box \NC \NR
+\NC textfont \NC \NC use the current text font \NC \NR
+\NC mathfont \NC \NC use the current math font \NC \NR
+\NC limits \NC \NC put scripts on top and below \NC \NR
+\NC nolimits \NC \NC force scripts to be postscripts \NC \NR
+\NC nooverflow \NC \NC keep (extensible) within target dimensions \NC \NR
+\NC options \NC int \NC bitset with options \NC \NR
+\NC void \NC \NC discard content and ignore dimensions \NC \NR
+\NC phantom \NC \NC discard content but retain dimensions \NC \NR
+\LL
+\stoptabulate
+
+To what extend the options kick in depends on the class as well where and how the
+atom is used.
+
+\stopsubsection
+
\startsubsection[title={Checking a state with \prm {ifmathparameter}}]
When you adapt math parameters it might make sense to see if they are set at all.
@@ -1188,52 +1496,10 @@ is divided by 1000 which is the usual way to mimmick floating point factors in
\startsection[title={Math constructs}]
-\startsubsection[title={Unscaled fences and \prm{mathdelimitersmode}}]
+\startsubsection[title={Cheating with fences}]
\topicindex {math+fences}
-The \prm {mathdelimitersmode} primitive is experimental and deals with the
-following (potential) problems. Three bits can be set. The first bit prevents an
-unwanted shift when the fence symbol is not scaled (a cambria side effect). The
-second bit forces italic correction between a preceding character ordinal and the
-fenced subformula, while the third bit turns that subformula into an ordinary so
-that the same spacing applies as with unfenced variants.
-
-\starttexdefinition Whatever #1
- \NC \type{\mathdelimitersmode = #1}
- \NC \mathdelimitersmode#1\ruledhbox{\showglyphs\showfontkerns\showfontitalics$f(x)$}
- \NC \mathdelimitersmode#1\ruledhbox{\showglyphs\showfontkerns\showfontitalics$f\left(x\right)$}
- \NC \NR
-\stoptexdefinition
-
-\start
- \switchtobodyfont[cambria]
- \starttabulate[|l|l|l|]
- \Whatever{0}\Whatever{1}\Whatever{2}\Whatever{3}%
- \Whatever{4}\Whatever{5}\Whatever{6}\Whatever{7}%
- \stoptabulate
-\stop
-
-So, when set to 7 fenced subformulas with unscaled delimiters come out the same
-as unfenced ones. This can be handy for cases where one is forced to use \prm
-{left} and \prm {right} always because of unpredictable content. As said, it's an
-experimental feature (which somehow fits in the exceptional way fences are dealt
-with in the engine). The full list of flags is given in the next table:
-
-\starttabulate[|c|l|]
-\DB value \BC meaning \NC \NR
-\TB
-\NC \type{"01} \NC don't apply the usual shift \NC \NR
-\NC \type{"02} \NC apply italic correction when possible \NC \NR
-\NC \type{"04} \NC force an ordinary subformula \NC \NR
-\NC \type{"08} \NC no shift when a base character \NC \NR
-\NC \type{"10} \NC only shift when an extensible \NC \NR
-\LL
-\stoptabulate
-
-The effect can depend on the font (and for Cambria one can use for instance \type
-{"16}).
-
Sometimes you might want to act upon the size of a delimiter, something that is
not really possible because of the fact that they are calculated {\em after} most
has been typeset already. For this we have two keyword: \type {phantom} and
@@ -1756,12 +2022,12 @@ the four mathon|/|mathoff commands with explicit dollar sign(s).
\stopsubsection
-\startsubsection[title={Script commands \prm {Unosuperscript} and \prm {Unosubscript}}]
+\startsubsection[title={Script commands \prm {Unosuperscript}, \prm {Unosubscript}, \prm {Unosuperprescript} and \prm {Unosubprescript}}]
\topicindex {math+styles}
\topicindex {math+scripts}
-These two commands result in super- and subscripts but with the current style (at the
+These commands result in super- and subscripts but with the current style (at the
time of rendering). So,
\startbuffer[script]
@@ -1779,13 +2045,55 @@ results in \inlinebuffer[script].
\stopsubsection
-\startsubsection[title={Injecting primes with {Uprimescript}}]
+\startsubsection[title={Script commands \prm {Ushiftedsuperscript}, \prm {Ushiftedsubscript}, \prm {Ushiftedsuperprescript} and \prm {Ushiftedsubprescript}}]
+
+\topicindex {math+styles}
+\topicindex {math+scripts}
+\topicindex {math+indices}
+
+Sometimes a script acts as an index in which case is should be anchored
+differently. For that we have four extra primitives. Here the shifted postscripts
+are shown:
+
+\startbuffer[script]
+$
+ x\Usuperscript {1}\Usubscript {2} =
+ x\Ushiftedsuperscript{1}\Ushiftedsubscript{2} =
+ x\Usuperscript {1}\Ushiftedsubscript{2} =
+ x\Ushiftedsuperscript{1}\Usubscript {2}
+$
+\stopbuffer
-{\em Todo: explain this one.}
+\typebuffer[script]
+
+results in \inlinebuffer[script].
\stopsubsection
-\startsubsection[title={Prescripts with \prm {Usuperprescript} and {Usubprescript}}]
+\startsubsection[title={Injecting primes with \prm {Uprimescript}}]
+
+This one is a bit special. In \LUAMETATEX\ a prime is a native element of a
+nucleus, alongside the two prescript and two postscripts. The most confusing
+combination of primes and postscripts is the case where we have a prime and
+superscript. In that case we assume that in order to avoid confusion parenthesis
+are applied so we don't covert it. That leaves three cases:
+
+\startbuffer[script]
+$
+ a \Uprimescript{1} \Usuperscript{2} \Usubscript {3} +
+ b \Usubscript {3} \Uprimescript{1} +
+ c \Uprimescript{1} \Usubscript {3} = d
+$
+\stopbuffer
+
+\typebuffer[script]
+
+This gets rendered as: \inlinebuffer[script]. In this case a subscript is handled as if
+it were an index.
+
+\stopsubsection
+
+\startsubsection[title={Prescripts with \prm {Usuperprescript} and \prm {Usubprescript}}]
\startbuffer
\hbox{$
@@ -1957,6 +2265,15 @@ effect and use a 20\percent\ scaling:
\stopsubsection
+\startsubsection[title={Spreading math with \prm {maththreshold}}]
+
+Small formulas that don't get unpacked can be made to act like glue, that is,
+they become a sort of leader and permit the par builder to prevent excessive
+spacing because the embedded inter atom glue can now participate in the
+calculations. The \prm {maththreshold} primitive is a regular glue parameter.
+
+\stopsubsection
+
\stopsection
\stopchapter
diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-rejected.tex b/doc/context/sources/general/manuals/luametatex/luametatex-rejected.tex
new file mode 100644
index 000000000..2cf7edf81
--- /dev/null
+++ b/doc/context/sources/general/manuals/luametatex/luametatex-rejected.tex
@@ -0,0 +1,94 @@
+% language=us runpath=texruns:manuals/luametatex
+
+\environment luametatex-style
+
+\startcomponent luametatex-rejected
+
+\startchapter[reference=rejected,title={Rejected features}]
+
+\startsection[title=Introduction]
+
+I should have started this chapter sooner because some experiments were removed
+without them being documented. This chapter is mostly for myself so that I don't
+revisit rejected features.
+
+\stopsection
+
+\startsection[title=Text]
+
+{\em todo}
+
+\stopsection
+
+\startsection[title=Math]
+
+\startsubsection[title=Fences]
+
+The \tex {mathfencesmode} primitive could be used to force the atom class of the
+fake fences to be the old inner class instead of the new fence class but we
+dropped that: it's now always a fence subtype (class). Unpacking is therefore now
+controlled by a class option and not enforced by the (new in \LUAMETATEX) subtype.
+
+\stopsubsection
+
+\startsubsection[title=Delimiters]
+
+The \tex {mathdelimitersmode} primitive was experimental and dealt with the
+following (potential) problems. Three bits can be set. The first bit prevents an
+unwanted shift when the fence symbol is not scaled (a cambria side effect). The
+second bit forces italic correction between a preceding character ordinal and the
+fenced subformula, while the third bit turns that subformula into an ordinary so
+that the same spacing applies as with unfenced variants.
+
+So, when set to 7 fenced subformulas with unscaled delimiters came out the same
+as unfenced ones. This could be handy for cases where one was forced to use \prm
+{left} and \prm {right} always because of unpredictable content. The full list of
+flags that we had at the time of removal is given in the next table:
+
+\starttabulate[|c|l|]
+\DB value \BC meaning \NC \NR
+\TB
+\NC \type{"01} \NC don't apply the usual shift \NC \NR
+\NC \type{"02} \NC apply italic correction when possible \NC \NR
+\NC \type{"04} \NC force an ordinary subformula \NC \NR
+\NC \type{"08} \NC no shift when a base character \NC \NR
+\NC \type{"10} \NC only shift when an extensible \NC \NR
+\NC \type{"20} \NC don't error on a missing right \NC \NR
+\LL
+\stoptabulate
+
+Because the effect depends on the font (and for Cambria one could use for
+instance \type {"16}) we finally decided to kick it out and correct the font
+instead using the font goodie file. After all it's more a \CONTEXT\ preference
+than an overall demand (read: we think no one else cares much about this).
+
+The \type {"20} options to not error on a missing right fence has been turned
+into \prm {mathcheckfencesmode}.
+
+\stopsubsection
+
+\startsubsection[title=Flattening]
+
+The \tex {mathflattenmode} primitive is gone as we have other ways to deal with
+this now. It related to italic corrections in traditional fonts.
+
+\stopsubsection
+
+\startsubsection[title=Rules]
+
+The \tex {mathrulethicknessmode} feature has been turned into a class option
+which is more granular.
+
+\stopsection
+
+\startsubsection[title=Control]
+
+Although it has its use when developing \LUAMETATEX\ the \tex {mathcontrolmode}
+parameters is no longer there. We have plenty of (more) detailed control now.
+
+\stopsection
+
+
+\stopchapter
+
+\stopcomponent
diff --git a/doc/context/sources/general/manuals/luametatex/luametatex.tex b/doc/context/sources/general/manuals/luametatex/luametatex.tex
index 69bfc9509..f2becf0b7 100644
--- a/doc/context/sources/general/manuals/luametatex/luametatex.tex
+++ b/doc/context/sources/general/manuals/luametatex/luametatex.tex
@@ -96,6 +96,9 @@
% with mimalloc and msvc we get a better native performance than crosscompiled
+% On the 2018 Dell 7520 Precission Xeon laptop runtime for 322 pages is now exactly
+% 8 seconds (just below 40 pages per second), we talking July 16, 2022.
+
% \enableexperiments [tabulateusesize]
% \enableexperiments [tabulatesparseskips]
@@ -151,6 +154,7 @@
\component luametatex-pdf
\component luametatex-libraries
\component luametatex-primitives % this generates a list
+ \component luametatex-rejected
\stopbodymatter
\startbackmatter
diff --git a/metapost/context/base/mpxl/mp-lmtx.mpxl b/metapost/context/base/mpxl/mp-lmtx.mpxl
index be4ae716b..acf3dcbef 100644
--- a/metapost/context/base/mpxl/mp-lmtx.mpxl
+++ b/metapost/context/base/mpxl/mp-lmtx.mpxl
@@ -1,5 +1,5 @@
%D \module
-%D [ file=mp-luas.lmtx,
+%D [ file=mp-lmtx.lmtx,
%D version=2019.06.23,
%D title=\CONTEXT\ \METAPOST\ graphics,
%D subtitle=\LUA,
@@ -1041,9 +1041,11 @@ presetparameters "chart" [
"darkyellow", "darkmagenta", "darkcyan",
"darkgray"
},
+ linecolors = { },
colormode = "global",
linewidth = .25mm,
+ % linegap = 0,
legendcolor = "",
legendstyle = "",
@@ -1082,16 +1084,18 @@ def lmt_chart_bar = applyparameters "chart:bar" "lmt_do_chart_bar"
def lmt_do_chart_start (expr what) =
pushparameters what ;
- save width, height, distance, linewidth, labelgap, labelfraction, value, nofsamples, nofsamplesets ;
- save fillcolor, drawcolor, labelcolor, labelstyle, labelformat, labelstrut, labelanchor, colormode ;
- string fillcolor, drawcolor, labelcolor, labelstyle, labelformat, labelstrut, labelanchor, colormode ;
+ save width, height, depth, distance, linewidth, linegap, labelgap, labelfraction, value, nofsamples, nofsamplesets ;
+ save fillcolor, linecolor, drawcolor, labelcolor, labelstyle, labelformat, labelstrut, labelanchor, colormode ;
+ string fillcolor, linecolor, drawcolor, labelcolor, labelstyle, labelformat, labelstrut, labelanchor, colormode ;
if hasparameter "sampleset" :
setluaparameter what "samples" (getparameter "sampleset") ;
fi ;
height := getparameter "height" ;
+ depth := max((getparameter "originsize"), (getparameter "innerradius")) ;
width := getparameter "width" ;
distance := getparameter "distance" ;
linewidth := getparameter "linewidth" ;
+ linegap := getparameterdefault "linegap" linewidth ;
drawcolor := getparameter "drawcolor" ;
colormode := getparameter "colormode" ;
labelcolor := getparameter "labelcolor" ;
@@ -1168,75 +1172,28 @@ def lmt_do_chart_legend =
fi ;
enddef ;
-% vardef lmt_do_chart_circle =
-% image (
-% lmt_do_chart_start("chart:circle") ;
-% if (nofsamplesets > 0) and (nofsamples > 0) :
-% nofsamplesets := 1 ;
-% save p, r, s, first, last, total, factor, n, percentage ;
-% path p, r, s[] ; boolean percentage ;
-% percentage := getparameter "percentage" ;
-% total := 0 ;
-% for i = 1 upto nofsamples :
-% total := total + getparameter "samples" (1) i ; % () is needed else 1i
-% endfor ;
-% factor := 100/total ;
-% first := 0 ;
-% p := fullcircle ysized (height) ;
-% r := origin -- (2*height,0) ;
-% for i = 1 upto nofsamples :
-% fillcolor := getparameter "fillcolors" i ;
-% value := (getparameter "samples" (1) i) * factor ;
-% last := first + (360/100) * value ;
-% s[i] := ((p cutbefore (r rotated first)) cutafter (r rotated last)) ;
-% % fill
-% % (if innerradius > 0 : reverse (s[i] scaled innerradius) else : origin fi) -- s[i] -- cycle
-% % withcolor fillcolor
-% % ;
-% fill origin -- s[i] -- cycle withcolor fillcolor ;
-% first := last ;
-% endfor ;
-% if linewidth > 0 :
-% if drawcolor = "" :
-% drawcolor := backgroundcolor ;
-% fi ;
-% for i = 1 upto nofsamples :
-% interim linecap := butt ;
-% draw origin -- (point 0 of s[i]) withpen pencircle scaled linewidth withcolor drawcolor ;
-% draw origin -- (point length(s[i]) of s[i]) withpen pencircle scaled linewidth withcolor drawcolor ;
-% endfor ;
-% fi ;
-% if getparameter "showlabels" :
-% first := 0 ;
-% for i = 1 upto nofsamples :
-% value := getparameter "samples" (1) i ;
-% last := first + (360/100) * value * factor ;
-% draw lmt_do_chart_text (s,i,value)
-% shifted ((labelfraction*(height/2),0) rotated ((first+last)/2)) ;
-% first := last ;
-% endfor ;
-% fi ;
-% lmt_do_chart_legend ;
-% n := getparameter "originsize" ;
-% if n > 0 :
-% fill fullcircle scaled n withcolor "white" ;
-% fi ;
-% n := getparameter "innerradius" ;
-% if n > 0 :
-% fill fullcircle scaled n withcolor "white" ;
-% fi ;
-% fi ;
-% lmt_do_chart_stop ;
-% )
-% enddef ;
+% draw lmt_chart_circle [
+% height = 4cm,
+% innerradius = 2.0cm,
+% samples = { { 10, 20, 30, 40, 50 } },
+% percentage = false,
+% initialangle = 90,
+% linewidth = .125mm,
+% originsize = 0,
+% showlabels = false,
+% drawcolor = "white",
+% fillcolors = { "red", "green", "blue", "", "cyan" },
+% linecolors = { "magenta", "orange", "darkgray", "orange", "darkgray" }
+% linecolors = { "", "orange", "", "orange", "" }
+% ] ;
vardef lmt_do_chart_circle =
image (
lmt_do_chart_start("chart:circle") ;
if (nofsamplesets > 0) and (nofsamples > 0) :
nofsamplesets := 1 ;
- save p, r, s, first, last, total, factor, n, percentage, initial, clockwise ;
- path p, r, s[] ; boolean percentage, clockwise ;
+ save p, q, r, s, t, pl, ql, first, last, total, factor, n, percentage, initial, clockwise ;
+ path p, q, r, s[], t[] ; boolean percentage, clockwise ;
clockwise := true ;
percentage := getparameter "percentage" ;
initial := if not clockwise : - fi getparameter "initialangle" ; % watch sign
@@ -1248,54 +1205,67 @@ vardef lmt_do_chart_circle =
first := initial ;
if clockwise :
p := (reverse fullcircle rotated first) ysized (height) ;
+ q := (reverse fullcircle rotated first) ysized (depth) ;
else :
p := fullcircle ysized (height) ;
+ q := fullcircle ysized (depth) ;
fi ;
r := origin -- (2*height,0) ;
+ pl := ((linewidth + linegap) / (arclength p)) * 360;
+ ql := ((linewidth + linegap) / (arclength q)) * 360;
for i = 1 upto nofsamples :
fillcolor := getparameter "fillcolors" i ;
- value := (getparameter "samples" (1) i) * factor ;
- if (value > -eps) and (value < eps) :
- value := eps ; % otherwise weird effects with zero
+ linecolor := getparameterdefault "linecolors" i "" ;
+ if linecolor = "" :
+ linecolor := fillcolor ;
fi ;
+ value := (getparameter "samples" (1) i) * factor ;
+if (value > -eps) and (value < eps) :
+ s[i] := origin ;
+ t[i] := origin ;
+else :
+% if (value > -eps) and (value < eps) :
+% value := eps ; % otherwise weird effects with zero
+% fi ;
last := first if clockwise : - else : + fi (360/100) * value ;
- s[i] := ((p cutbefore (r rotated first)) cutafter (r rotated last)) ;
- % fill
- % (if innerradius > 0 : reverse (s[i] scaled innerradius) else : origin fi) -- s[i] -- cycle
- % withcolor fillcolor
- % ;
- fill origin -- s[i] -- cycle withcolor fillcolor ;
+ s[i] := ((p cutbefore (r rotated first)) cutafter (r rotated (last + pl))) ;
+ t[i] := reverse ((q cutbefore (r rotated first)) cutafter (r rotated (last + ql))) ;
+ path piece ; piece := s[i] -- t[i] -- cycle ;
+ if fillcolor <> "" :
+ fill piece
+ withpen pencircle scaled linewidth
+ withcolor fillcolor
+ ;
+ fi ;
+ if linecolor <> "" :
+ if linewidth > 0 :
+ interim linecap := butt ;
+ draw piece
+ withpen pencircle scaled linewidth
+ withcolor if linecolor <> "" : linecolor else drawcolor : fi
+ ;
+ fi ;
+ fi ;
first := last ;
+fi ;
endfor ;
if linewidth > 0 :
- if drawcolor = "" :
- drawcolor := backgroundcolor ;
- fi ;
- for i = 1 upto nofsamples :
- interim linecap := butt ;
- draw origin -- (point 0 of s[i]) withpen pencircle scaled linewidth withcolor drawcolor ;
- draw origin -- (point length(s[i]) of s[i]) withpen pencircle scaled linewidth withcolor drawcolor ;
- endfor ;
+ clip currentpicture to p enlarged linewidth ;
fi ;
if getparameter "showlabels" :
first := initial ;
for i = 1 upto nofsamples :
value := getparameter "samples" (1) i ;
last := first if clockwise : - else : + fi (360/100) * value * factor ;
+if (value > -eps) and (value < eps) :
+else :
draw lmt_do_chart_text (s,i,value)
shifted ((labelfraction*(height/2),0) rotated ((first+last)/2)) ;
first := last ;
+fi ;
endfor ;
fi ;
lmt_do_chart_legend ;
- n := getparameter "originsize" ;
- if n > 0 :
- fill fullcircle scaled n withcolor "white" ;
- fi ;
- n := getparameter "innerradius" ;
- if n > 0 :
- fill fullcircle scaled n withcolor "white" ;
- fi ;
fi ;
lmt_do_chart_stop ;
)
diff --git a/metapost/context/base/mpxl/mp-luas.mpxl b/metapost/context/base/mpxl/mp-luas.mpxl
index c5c4c77db..7e11b1c9c 100644
--- a/metapost/context/base/mpxl/mp-luas.mpxl
+++ b/metapost/context/base/mpxl/mp-luas.mpxl
@@ -301,6 +301,7 @@ newscriptindex mfid_getparameterpen ; mfid_getparameterpen := scriptin
newscriptindex mfid_getparametertext ; mfid_getparametertext := scriptindex "getparametertext" ;
% mfid_getparameteroption ; mfid_getparameteroption := scriptindex "getparameteroption" ;
newscriptindex mfid_applyparameters ; mfid_applyparameters := scriptindex "applyparameters" ;
+newscriptindex mfid_mergeparameters ; mfid_mergeparameters := scriptindex "mergeparameters" ;
newscriptindex mfid_pushparameters ; mfid_pushparameters := scriptindex "pushparameters" ;
newscriptindex mfid_popparameters ; mfid_popparameters := scriptindex "popparameters" ;
newscriptindex mfid_setluaparameter ; mfid_setluaparameter := scriptindex "setluaparameter" ;
@@ -318,13 +319,14 @@ def getparameterpen = runscript mfid_getparameterpen enddef ;
def getparametertext = runscript mfid_getparametertext enddef ;
% getparameteroption = runscript mfid_getparameteroption enddef ;
def applyparameters = runscript mfid_applyparameters enddef ;
+def mergeparameters = runscript mfid_mergeparameters enddef ;
def pushparameters = runscript mfid_pushparameters enddef ;
def popparameters = runscript mfid_popparameters enddef ;
def setluaparameter = runscript mfid_setluaparameter enddef ;
permanent getparameters, presetparameters, hasparameter, hasoption, getparameter, getparameterdefault,
getparametercount, getmaxparametercount, getparameterpath, getparameterpen, getparametertext, % getparameteroption,
- applyparameters, pushparameters, popparameters, setluaparameter ;
+ applyparameters, mergeparameters, pushparameters, popparameters, setluaparameter ;
newscriptindex mfun_newrecord ; mfun_newrecord := scriptindex "newrecord" ;
newscriptindex mfun_setrecord ; mfun_setrecord := scriptindex "setrecord" ;
diff --git a/metapost/context/base/mpxl/mp-tool.mpxl b/metapost/context/base/mpxl/mp-tool.mpxl
index e448ebb5a..e77314439 100644
--- a/metapost/context/base/mpxl/mp-tool.mpxl
+++ b/metapost/context/base/mpxl/mp-tool.mpxl
@@ -995,10 +995,16 @@ path unitdiamond, fulldiamond ;
unitdiamond := (.5,0) -- (1,.5) -- (.5,1) -- (0,.5) -- cycle ;
fulldiamond := unitdiamond shifted - center unitdiamond ;
+path unitoctagon, fulloctagon ;
+
+unitoctagon := for i within (unitcircle rotated 45/2) : pathpoint -- endfor cycle ;
+fulloctagon := unitoctagon shifted - center unitoctagon ;
+
path unithexagon, fullhexagon ;
-unithexagon := for i within (unitcircle rotated 45/2) : pathpoint -- endfor cycle ;
-fullhexagon := unithexagon shifted - center unithexagon ;
+%%%%hexagon := for i = 0 upto 5 : .5dir (60i) -- endfor cycle ;
+fullhexagon := for i = 0 step 60 until 360 : .5 dir(i) -- endfor cycle ;
+unithexagon := fullhexagon shifted (.5,.5) ;
permanent
fullsquare, unitcircle,
@@ -1006,7 +1012,7 @@ permanent
tcircle, bcircle, lcircle, rcircle,
urtriangle, ultriangle, lltriangle, lrtriangle,
triangle, uptriangle, downtriangle, lefttriangle, righttriangle,
- unitdiamond, fulldiamond, unithexagon, fullhexagon ;
+ unitdiamond, fulldiamond, unitoctagon, fulloctagon, unithexagon, fullhexagon ;
%D More robust:
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 042ef82c7..4df6d3f5b 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -7491,7 +7491,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-tab"] = package.loaded["util-tab"] or true
--- original size: 33089, stripped down to: 18163
+-- original size: 33507, stripped down to: 18420
if not modules then modules={} end modules ['util-tab']={
version=1.001,
@@ -8226,6 +8226,21 @@ function table.ordered(t)
return function() end
end
end
+function combine(target,source)
+ if target then
+ for k,v in next,source do
+ if type(v)=="table" then
+ target[k]=combine(target[k],source[k])
+ else
+ target[k]=v
+ end
+ end
+ return target
+ else
+ return source
+ end
+end
+table.combine=combine
end -- of closure
@@ -9284,7 +9299,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 25254, stripped down to: 16630
+-- original size: 25542, stripped down to: 16783
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9759,9 +9774,18 @@ local endofstring=lpegpatterns.endofstring
local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1
local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+(P("*")+endofstring)*Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1*endofstring
function parsers.stepper(str,n,action)
+ local ts=type(str)
if type(n)=="function" then
- lpegmatch(stepper,str,1,false,n or print)
- else
+ if ts=="number" then
+ n(str)
+ elseif ts=="table" then
+ for i=1,#str do
+ n(str[i])
+ end
+ else
+ lpegmatch(stepper,str,1,false,n or print)
+ end
+ elseif ts=="string" then
lpegmatch(stepper,str,1,n,action or print)
end
end
@@ -26038,8 +26062,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1033170
--- stripped bytes : 406679
+-- original bytes : 1033876
+-- stripped bytes : 406975
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 042ef82c7..4df6d3f5b 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -7491,7 +7491,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-tab"] = package.loaded["util-tab"] or true
--- original size: 33089, stripped down to: 18163
+-- original size: 33507, stripped down to: 18420
if not modules then modules={} end modules ['util-tab']={
version=1.001,
@@ -8226,6 +8226,21 @@ function table.ordered(t)
return function() end
end
end
+function combine(target,source)
+ if target then
+ for k,v in next,source do
+ if type(v)=="table" then
+ target[k]=combine(target[k],source[k])
+ else
+ target[k]=v
+ end
+ end
+ return target
+ else
+ return source
+ end
+end
+table.combine=combine
end -- of closure
@@ -9284,7 +9299,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 25254, stripped down to: 16630
+-- original size: 25542, stripped down to: 16783
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9759,9 +9774,18 @@ local endofstring=lpegpatterns.endofstring
local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1
local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+(P("*")+endofstring)*Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1*endofstring
function parsers.stepper(str,n,action)
+ local ts=type(str)
if type(n)=="function" then
- lpegmatch(stepper,str,1,false,n or print)
- else
+ if ts=="number" then
+ n(str)
+ elseif ts=="table" then
+ for i=1,#str do
+ n(str[i])
+ end
+ else
+ lpegmatch(stepper,str,1,false,n or print)
+ end
+ elseif ts=="string" then
lpegmatch(stepper,str,1,n,action or print)
end
end
@@ -26038,8 +26062,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1033170
--- stripped bytes : 406679
+-- original bytes : 1033876
+-- stripped bytes : 406975
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 042ef82c7..4df6d3f5b 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -7491,7 +7491,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-tab"] = package.loaded["util-tab"] or true
--- original size: 33089, stripped down to: 18163
+-- original size: 33507, stripped down to: 18420
if not modules then modules={} end modules ['util-tab']={
version=1.001,
@@ -8226,6 +8226,21 @@ function table.ordered(t)
return function() end
end
end
+function combine(target,source)
+ if target then
+ for k,v in next,source do
+ if type(v)=="table" then
+ target[k]=combine(target[k],source[k])
+ else
+ target[k]=v
+ end
+ end
+ return target
+ else
+ return source
+ end
+end
+table.combine=combine
end -- of closure
@@ -9284,7 +9299,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 25254, stripped down to: 16630
+-- original size: 25542, stripped down to: 16783
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9759,9 +9774,18 @@ local endofstring=lpegpatterns.endofstring
local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1
local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+(P("*")+endofstring)*Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1*endofstring
function parsers.stepper(str,n,action)
+ local ts=type(str)
if type(n)=="function" then
- lpegmatch(stepper,str,1,false,n or print)
- else
+ if ts=="number" then
+ n(str)
+ elseif ts=="table" then
+ for i=1,#str do
+ n(str[i])
+ end
+ else
+ lpegmatch(stepper,str,1,false,n or print)
+ end
+ elseif ts=="string" then
lpegmatch(stepper,str,1,n,action or print)
end
end
@@ -26038,8 +26062,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1033170
--- stripped bytes : 406679
+-- original bytes : 1033876
+-- stripped bytes : 406975
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index 042ef82c7..4df6d3f5b 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -7491,7 +7491,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-tab"] = package.loaded["util-tab"] or true
--- original size: 33089, stripped down to: 18163
+-- original size: 33507, stripped down to: 18420
if not modules then modules={} end modules ['util-tab']={
version=1.001,
@@ -8226,6 +8226,21 @@ function table.ordered(t)
return function() end
end
end
+function combine(target,source)
+ if target then
+ for k,v in next,source do
+ if type(v)=="table" then
+ target[k]=combine(target[k],source[k])
+ else
+ target[k]=v
+ end
+ end
+ return target
+ else
+ return source
+ end
+end
+table.combine=combine
end -- of closure
@@ -9284,7 +9299,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-prs"] = package.loaded["util-prs"] or true
--- original size: 25254, stripped down to: 16630
+-- original size: 25542, stripped down to: 16783
if not modules then modules={} end modules ['util-prs']={
version=1.001,
@@ -9759,9 +9774,18 @@ local endofstring=lpegpatterns.endofstring
local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1
local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+(P("*")+endofstring)*Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1*endofstring
function parsers.stepper(str,n,action)
+ local ts=type(str)
if type(n)=="function" then
- lpegmatch(stepper,str,1,false,n or print)
- else
+ if ts=="number" then
+ n(str)
+ elseif ts=="table" then
+ for i=1,#str do
+ n(str[i])
+ end
+ else
+ lpegmatch(stepper,str,1,false,n or print)
+ end
+ elseif ts=="string" then
lpegmatch(stepper,str,1,n,action or print)
end
end
@@ -26038,8 +26062,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1033170
--- stripped bytes : 406679
+-- original bytes : 1033876
+-- stripped bytes : 406975
-- end library merge
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index a02511e2c..377684c2c 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{2022.07.06 21:34}
+\newcontextversion{2022.07.24 12:17}
%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 385df8685..2310671e9 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{2022.07.06 21:34}
+\edef\contextversion{2022.07.24 12:17}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-cs.mkii b/tex/context/base/mkii/mult-cs.mkii
index e7987a2d6..b5e93a66c 100644
--- a/tex/context/base/mkii/mult-cs.mkii
+++ b/tex/context/base/mkii/mult-cs.mkii
@@ -870,6 +870,7 @@
\setinterfaceconstant{frameradius}{polomerramecku}
\setinterfaceconstant{frames}{ramecky}
\setinterfaceconstant{freeregion}{freeregion}
+\setinterfaceconstant{freezespacing}{freezespacing}
\setinterfaceconstant{from}{z}
\setinterfaceconstant{functioncolor}{functioncolor}
\setinterfaceconstant{functionstyle}{functionstyle}
@@ -950,6 +951,7 @@
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{vlevo}
+\setinterfaceconstant{leftclass}{leftclass}
\setinterfaceconstant{leftcolor}{barvavlevo}
\setinterfaceconstant{leftcompoundhyphen}{leftcompoundhyphen}
\setinterfaceconstant{leftedge}{levahrana}
@@ -1008,6 +1010,7 @@
\setinterfaceconstant{menu}{menu}
\setinterfaceconstant{method}{metoda}
\setinterfaceconstant{middle}{stredni}
+\setinterfaceconstant{middleclass}{middleclass}
\setinterfaceconstant{middlecolor}{middlecolor}
\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlesource}{middlesource}
@@ -1120,6 +1123,7 @@
\setinterfaceconstant{palet}{paleta}
\setinterfaceconstant{paper}{papir}
\setinterfaceconstant{paragraph}{odstavec}
+\setinterfaceconstant{penalties}{penalties}
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{umistit}
\setinterfaceconstant{placehead}{umistihlavicku}
@@ -1173,6 +1177,7 @@
\setinterfaceconstant{reverse}{reverse}
\setinterfaceconstant{right}{vpravo}
\setinterfaceconstant{rightchars}{rightchars}
+\setinterfaceconstant{rightclass}{rightclass}
\setinterfaceconstant{rightcolor}{barvavpravo}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{pravahrana}
diff --git a/tex/context/base/mkii/mult-it.mkii b/tex/context/base/mkii/mult-it.mkii
index 0e91646df..6541e8db4 100644
--- a/tex/context/base/mkii/mult-it.mkii
+++ b/tex/context/base/mkii/mult-it.mkii
@@ -870,6 +870,7 @@
\setinterfaceconstant{frameradius}{raggiocornice}
\setinterfaceconstant{frames}{cornici}
\setinterfaceconstant{freeregion}{freeregion}
+\setinterfaceconstant{freezespacing}{freezespacing}
\setinterfaceconstant{from}{da}
\setinterfaceconstant{functioncolor}{functioncolor}
\setinterfaceconstant{functionstyle}{functionstyle}
@@ -950,6 +951,7 @@
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{sinistra}
+\setinterfaceconstant{leftclass}{leftclass}
\setinterfaceconstant{leftcolor}{coloresinistra}
\setinterfaceconstant{leftcompoundhyphen}{leftcompoundhyphen}
\setinterfaceconstant{leftedge}{bordosinistro}
@@ -1008,6 +1010,7 @@
\setinterfaceconstant{menu}{menu}
\setinterfaceconstant{method}{metodo}
\setinterfaceconstant{middle}{centro}
+\setinterfaceconstant{middleclass}{middleclass}
\setinterfaceconstant{middlecolor}{middlecolor}
\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlesource}{middlesource}
@@ -1054,6 +1057,8 @@
\setinterfaceconstant{numberconversionset}{numberconversionset}
\setinterfaceconstant{numberdistance}{numberdistance}
\setinterfaceconstant{numbering}{numerazione}
+\setinterfaceconstant{numberlocation}{numberlocation}
+\setinterfaceconstant{numbermethod}{numbermethod}
\setinterfaceconstant{numberorder}{numberorder}
\setinterfaceconstant{numberprefix}{numberprefix}
\setinterfaceconstant{numbersegments}{numbersegments}
@@ -1064,6 +1069,7 @@
\setinterfaceconstant{numberstopper}{numberstopper}
\setinterfaceconstant{numberstrut}{numberstrut}
\setinterfaceconstant{numberstyle}{stilenumero}
+\setinterfaceconstant{numberthreshold}{numberthreshold}
\setinterfaceconstant{numberwidth}{numberwidth}
\setinterfaceconstant{nx}{nx}
\setinterfaceconstant{ny}{ny}
@@ -1117,6 +1123,7 @@
\setinterfaceconstant{palet}{tavolozza}
\setinterfaceconstant{paper}{carta}
\setinterfaceconstant{paragraph}{capoverso}
+\setinterfaceconstant{penalties}{penalties}
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{metti}
\setinterfaceconstant{placehead}{mettitesta}
@@ -1170,6 +1177,7 @@
\setinterfaceconstant{reverse}{invertito}
\setinterfaceconstant{right}{destra}
\setinterfaceconstant{rightchars}{rightchars}
+\setinterfaceconstant{rightclass}{rightclass}
\setinterfaceconstant{rightcolor}{coloredestra}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{bordodestro}
diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii
index e52732b6b..79c0349ea 100644
--- a/tex/context/base/mkii/mult-ro.mkii
+++ b/tex/context/base/mkii/mult-ro.mkii
@@ -870,6 +870,7 @@
\setinterfaceconstant{frameradius}{razaframe}
\setinterfaceconstant{frames}{frames}
\setinterfaceconstant{freeregion}{freeregion}
+\setinterfaceconstant{freezespacing}{freezespacing}
\setinterfaceconstant{from}{dela}
\setinterfaceconstant{functioncolor}{functioncolor}
\setinterfaceconstant{functionstyle}{functionstyle}
@@ -950,6 +951,7 @@
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{stanga}
+\setinterfaceconstant{leftclass}{leftclass}
\setinterfaceconstant{leftcolor}{culoarestanga}
\setinterfaceconstant{leftcompoundhyphen}{leftcompoundhyphen}
\setinterfaceconstant{leftedge}{bordurastanga}
@@ -1008,6 +1010,7 @@
\setinterfaceconstant{menu}{meniu}
\setinterfaceconstant{method}{metoda}
\setinterfaceconstant{middle}{mijloc}
+\setinterfaceconstant{middleclass}{middleclass}
\setinterfaceconstant{middlecolor}{middlecolor}
\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlesource}{middlesource}
@@ -1120,6 +1123,7 @@
\setinterfaceconstant{palet}{paleta}
\setinterfaceconstant{paper}{hartie}
\setinterfaceconstant{paragraph}{paragraf}
+\setinterfaceconstant{penalties}{penalties}
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{pune}
\setinterfaceconstant{placehead}{punetitlu}
@@ -1173,6 +1177,7 @@
\setinterfaceconstant{reverse}{reverse}
\setinterfaceconstant{right}{dreapta}
\setinterfaceconstant{rightchars}{rightchars}
+\setinterfaceconstant{rightclass}{rightclass}
\setinterfaceconstant{rightcolor}{culoaredreapta}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{borduradreapta}
diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua
index 3b057b674..967a11d07 100644
--- a/tex/context/base/mkiv/char-def.lua
+++ b/tex/context/base/mkiv/char-def.lua
@@ -27,8 +27,8 @@ Todo: get rid of specials = { "font", ... } in math ... we have already vectors.
]]--
local variants_emoji={
- [0xFE0E]="text style",
- [0xFE0F]="emoji style",
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
}
local variants_forms={
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 34002f06d..70c83cf67 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2022.07.06 21:34}
+\newcontextversion{2022.07.24 12:17}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 40b49d386..6a1e2c95e 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -49,7 +49,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2022.07.06 21:34}
+\edef\contextversion{2022.07.24 12:17}
%D Kind of special:
diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua
index 303c02fe6..c3635d517 100644
--- a/tex/context/base/mkiv/mlib-pps.lua
+++ b/tex/context/base/mkiv/mlib-pps.lua
@@ -13,7 +13,6 @@ local insert, remove, concat = table.insert, table.remove, table.concat
local Cs, Cf, C, Cg, Ct, P, S, V, Carg = lpeg.Cs, lpeg.Cf, lpeg.C, lpeg.Cg, lpeg.Ct, lpeg.P, lpeg.S, lpeg.V, lpeg.Carg
local lpegmatch, tsplitat, tsplitter = lpeg.match, lpeg.tsplitat, lpeg.tsplitter
local formatters = string.formatters
-local exists, savedata = io.exists, io.savedata
local mplib = mplib
local metapost = metapost
diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua
index 5a3725b32..0926b5d12 100644
--- a/tex/context/base/mkiv/mult-fun.lua
+++ b/tex/context/base/mkiv/mult-fun.lua
@@ -34,6 +34,7 @@ return {
"getparametertext",
-- "getparameteroption",
"applyparameters",
+ "mergeparameters",
"pushparameters",
"popparameters",
"setluaparameter",
@@ -60,6 +61,7 @@ return {
"zmod",
"paired", "tripled",
"unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle",
+ "unitoctagon", "fulloctagon", "unithexagon", "fullhexagon",
-- "halfcircle", "quartercircle",
"llcircle", "lrcircle", "urcircle", "ulcircle",
"tcircle", "bcircle", "lcircle", "rcircle",
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index ae31c547e..ace2b0e9b 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -105,11 +105,11 @@ return {
"mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode",
"trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode",
--
- "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode",
- "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "checkligatureandkernmathcontrolcode",
+ "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode",
+ "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "applyordinarykernpairmathcontrolcode",
"applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode",
"reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode",
- "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "italicshapekernmathcontrolcode",
+ "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode",
"checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode",
--
"noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode",
@@ -171,7 +171,7 @@ return {
"mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode",
-- "mathtopaccentcode", "mathbottomaccentcode", "mathdelimitercode", "mathrootcode", "mathprintcode", --
"mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode",
- "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode",
+ "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", "mathunarycode",
--
"constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument",
--
@@ -211,7 +211,8 @@ return {
"lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode",
"lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions",
-- "openfenceclassoptioncode", "closefenceclassoptioncode", "middlefenceclassoptioncode",
- "checkligatureclassoptioncode", "flattenclassoptioncode", "omitpenaltyclassoptioncode",
+ "checkligatureclassoptioncode", "checkitaliccorrectionclassoptioncode", "checkkernpairclassoptioncode",
+ "flattenclassoptioncode", "omitpenaltyclassoptioncode", "unpackclassoptioncode", "raiseprimeclassoptioncode",
--
"noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode",
"noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode",
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 43e9515db..ac7f7511e 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -276,6 +276,7 @@ return {
"boxfreeze",
"boxgeometry",
"boxorientation",
+ "boxrepack",
"boxshift",
"boxsource",
"boxtarget",
@@ -298,6 +299,7 @@ return {
"currentloopnesting",
"currentmarks",
"defcsname",
+ "detokenized",
"dimensiondef",
"dimexpression",
"directlua",
@@ -402,6 +404,8 @@ return {
"ignorepars",
"immediate",
"immutable",
+ "indexofcharacter",
+ "indexofregister",
"inherited",
"initcatcodetable",
"insertbox",
@@ -473,7 +477,7 @@ return {
"mathatomskip",
"mathbackwardpenalties",
"mathbeginclass",
- "mathdelimitersmode",
+ "mathcheckfencesmode",
"mathdirection",
"mathdisplaymode",
"mathdisplayskipmode",
@@ -481,7 +485,6 @@ return {
"mathendclass",
"matheqnogapstep",
"mathfenced",
- "mathfencesmode",
"mathfontcontrol",
"mathforwardpenalties",
"mathfrac",
@@ -566,6 +569,7 @@ return {
"scaledinterwordstretch",
"scaledslantperpoint",
"scantextokens",
+ "semiexpand",
"semiexpanded",
"semiprotected",
"setdefaultmathcodes",
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 42bb6d94a..543b25c19 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 983543d0f..78fefb060 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/util-prs.lua b/tex/context/base/mkiv/util-prs.lua
index 6c2a15adf..635b610e0 100644
--- a/tex/context/base/mkiv/util-prs.lua
+++ b/tex/context/base/mkiv/util-prs.lua
@@ -622,12 +622,6 @@ end
-- local list, names = mycsvsplitter(crap,true) inspect(list) inspect(names)
-- local list, names = mycsvsplitter(crap) inspect(list) inspect(names)
--- parsers.stepper("1,7-",9,function(i) print(">>>",i) end)
--- parsers.stepper("1-3,7,8,9")
--- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end)
--- parsers.stepper(" 1 : 3, ,7 ")
--- parsers.stepper("1:4,9:13,24:*",30)
-
local function ranger(first,last,n,action)
if not first then
-- forget about it
@@ -655,14 +649,29 @@ local stepper = spacers * ( cardinal * ( spacers * S(":-") * spacers * ( cardin
* Carg(1) * Carg(2) / ranger * S(", ")^0 )^1 * endofstring -- we're sort of strict (could do without endofstring)
function parsers.stepper(str,n,action)
+ local ts = type(str)
if type(n) == "function" then
- lpegmatch(stepper,str,1,false,n or print)
- else
+ if ts == "number" then
+ n(str)
+ elseif ts == "table" then
+ for i=1,#str do
+ n(str[i])
+ end
+ else
+ lpegmatch(stepper,str,1,false,n or print)
+ end
+ elseif ts == "string" then
lpegmatch(stepper,str,1,n,action or print)
end
end
---
+-- parsers.stepper("1,7-",9,function(i) print(">>>",i) end)
+-- parsers.stepper("1-3,7,8,9")
+-- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end)
+-- parsers.stepper(" 1 : 3, ,7 ")
+-- parsers.stepper("1:4,9:13,24:*",30)
+-- parsers.stepper(1,print)
+-- parsers.stepper({1,3,4},print)
local pattern_math = Cs((P("%")/"\\percent " + P("^") * Cc("{") * lpegpatterns.integer * Cc("}") + anything)^0)
local pattern_text = Cs((P("%")/"\\percent " + (P("^")/"\\high") * Cc("{") * lpegpatterns.integer * Cc("}") + anything)^0)
diff --git a/tex/context/base/mkiv/util-tab.lua b/tex/context/base/mkiv/util-tab.lua
index a92b47b3f..7f372b6b5 100644
--- a/tex/context/base/mkiv/util-tab.lua
+++ b/tex/context/base/mkiv/util-tab.lua
@@ -978,3 +978,21 @@ end
-- return remove(t,random(1,n))
-- end
-- end
+
+function combine(target,source)
+ -- no copy so if that is needed one needs to deepcopy source first
+ if target then
+ for k, v in next, source do
+ if type(v) == "table" then
+ target[k] = combine(target[k],source[k])
+ else
+ target[k] = v
+ end
+ end
+ return target
+ else
+ return source
+ end
+end
+
+table.combine = combine
diff --git a/tex/context/base/mkxl/anch-box.mkxl b/tex/context/base/mkxl/anch-box.mkxl
index 570f8862d..0dec78838 100644
--- a/tex/context/base/mkxl/anch-box.mkxl
+++ b/tex/context/base/mkxl/anch-box.mkxl
@@ -27,7 +27,8 @@
\defineboxanchor[#6]%
\setboxanchor[#6][#2][#4]\hpack{\xypos{\namespacedboxanchor{#6}}}%
\ifparameter#4\or\setupboxanchorcontent[#1][#4]\fi
- \startpositionoverlay{text-1}% will become configurable region
+% \startpositionoverlay{text-1}% will become configurable region
+ \startpositionoverlay{text+1}% will become configurable region
\setMPpositiongraphic
{\namespacedboxanchor{#5}}%
{\namedboxanchorcontentparameter{#1}\c!mp}%
diff --git a/tex/context/base/mkxl/anch-pgr.lmt b/tex/context/base/mkxl/anch-pgr.lmt
index 5261a2afa..5ef6ecacb 100644
--- a/tex/context/base/mkxl/anch-pgr.lmt
+++ b/tex/context/base/mkxl/anch-pgr.lmt
@@ -106,7 +106,9 @@ local jobpositions = job.positions
local getpos = jobpositions.getpos
local getfree = jobpositions.getfree
+----- data = { }
local realpage = 1
+----- recycle = 1000 -- only tables can overflow this
local enabled = false
-- Freeing the data is somewhat tricky as we can have backgrounds spanning many
@@ -164,7 +166,7 @@ local function check(specification)
wn[3] = dp
end
end
- -- inspect(w)
+-- inspect(w)
end
local index = 0
@@ -173,6 +175,7 @@ local registervalue = attributes.registervalue
local getvalue = attributes.getvalue
local function flush(head,f,l,a,parent,depth)
+ -- local d = data[a]
local d = getvalue(a_textbackground,a)
if d then
local ix = index
@@ -194,9 +197,40 @@ local function flush(head,f,l,a,parent,depth)
return head, true
end
+-- local function registerbackground(name)
+-- local n = #data + 1
+-- if n > recycle then
+-- -- we could also free all e: that are beyond a page but we don't always
+-- -- know the page so a recycle is nicer and the s lists are kept anyway
+-- -- so the amount of kept data is not that large
+-- n = 1
+-- end
+-- local b = jobpositions.tobesaved["b:"..name]
+-- if b then
+-- local s = setmetatableindex("table")
+-- b.s = s
+-- data[n] = {
+-- bpos = b,
+-- name = name,
+-- n = n,
+-- shapes = s,
+-- count = 0,
+-- sindex = 0,
+-- }
+-- texsetattribute(a_textbackground,n)
+-- if not enabled then
+-- enableaction("contributers", "nodes.handlers.textbackgrounds")
+-- enabled = true
+-- end
+-- else
+-- texsetattribute(a_textbackground,unsetvalue)
+-- end
+-- end
+
local function registerbackground(name)
local b = jobpositions.tobesaved["b:"..name]
if b then
+ local n = registervalue(a_textbackground,t)
local s = setmetatableindex("table")
b.s = s
local t = {
@@ -207,7 +241,7 @@ local function registerbackground(name)
count = 0,
sindex = 0,
}
- texsetattribute(a_textbackground,registervalue(a_textbackground,t))
+ texsetattribute(a_textbackground,n)
if not enabled then
enableaction("contributers", "nodes.handlers.textbackgrounds")
enabled = true
diff --git a/tex/context/base/mkxl/buff-ini.lmt b/tex/context/base/mkxl/buff-ini.lmt
index a14056f7d..985c834ff 100644
--- a/tex/context/base/mkxl/buff-ini.lmt
+++ b/tex/context/base/mkxl/buff-ini.lmt
@@ -25,7 +25,7 @@ local trace_visualize = false trackers.register("buffers.visualize", function
local report_buffers = logs.reporter("buffers","usage")
local report_typeset = logs.reporter("buffers","typeset")
------ report_grabbing = logs.reporter("buffers","grabbing")
+local report_grabbing = logs.reporter("buffers","grabbing")
local context = context
local commands = commands
@@ -43,6 +43,9 @@ local scantokencode = scanners.tokencode
local getters = tokens.getters
local gettoken = getters.token
+local createtoken = token.create
+local grabtokens = token.grab
+
local getcommand = tokens.accessors.command
local getnextchar = tokens.scanners.nextchar
@@ -350,50 +353,6 @@ end
buffers.undent = undent
--- function commands.grabbuffer(name,begintag,endtag,bufferdata,catcodes,doundent) -- maybe move \\ to call
--- local dn = getcontent(name)
--- if dn == "" then
--- nesting = 0
--- continue = false
--- end
--- if trace_grab then
--- if #bufferdata > 30 then
--- report_grabbing("%s => |%s..%s|",name,sub(bufferdata,1,10),sub(bufferdata,-10,#bufferdata))
--- else
--- report_grabbing("%s => |%s|",name,bufferdata)
--- end
--- end
--- local counter = counters[begintag]
--- if not counter then
--- counter = countnesting(begintag,endtag)
--- counters[begintag] = counter
--- end
--- nesting = nesting + lpegmatch(counter,bufferdata)
--- local more = nesting > 0
--- if more then
--- dn = dn .. sub(bufferdata,2,-1) .. endtag
--- nesting = nesting - 1
--- continue = true
--- else
--- if continue then
--- dn = dn .. sub(bufferdata,2,-2) -- no \r, \n is more generic
--- elseif dn == "" then
--- dn = sub(bufferdata,2,-2)
--- else
--- dn = dn .. "\n" .. sub(bufferdata,2,-2) -- no \r, \n is more generic
--- end
--- local last = sub(dn,-1)
--- if last == "\n" or last == "\r" then -- \n is unlikely as \r is the endlinechar
--- dn = sub(dn,1,-2)
--- end
--- if doundent or (autoundent and doundent == nil) then
--- dn = undent(dn)
--- end
--- end
--- assign(name,dn,catcodes)
--- commands.doifelse(more)
--- end
-
local split = table.setmetatableindex(function(t,k)
local v = totable(k)
t[k] = v
@@ -418,17 +377,17 @@ local experiment = false
local experiment = scantokencode and true
local function pickup(start,stop)
- local stoplist = split[stop] -- totable(stop)
- local stoplength = #stoplist
- local stoplast = stoplist[stoplength]
- local startlist = split[start] -- totable(start)
- local startlength = #startlist
- local startlast = startlist[startlength]
- local list = { }
- local size = 0
- local depth = 0
- -- local done = 32
- local scancode = experiment and scantokencode or scancode
+ local stoplist = split[stop] -- totable(stop)
+ local stoplength = #stoplist
+ local stoplast = stoplist[stoplength]
+ local startlist = split[start] -- totable(start)
+ local startlength = #startlist
+ local startlast = startlist[startlength]
+ local list = { }
+ local size = 0
+ local depth = 0
+ -- local done = 32
+ local scancode = experiment and scantokencode or scancode
while true do -- or use depth
local char = scancode()
if char then
@@ -537,132 +496,17 @@ local function pickup(start,stop)
end
end
--- -- lmtx:
---
--- local function pickup(start,stop)
--- local stoplist = split[stop] -- totable(stop)
--- local stoplength = #stoplist
--- local stoplast = stoplist[stoplength]
--- local startlist = split[start] -- totable(start)
--- local startlength = #startlist
--- local startlast = startlist[startlength]
--- local list = { }
--- local size = 0
--- local depth = 0
--- getnextchar() -- we start with a \relax
--- while true do -- or use depth
--- local char = getnextchar()
--- if char then
--- size = size + 1
--- list[size] = char
--- if char == stoplast and size >= stoplength then
--- local done = true
--- local last = size
--- for i=stoplength,1,-1 do
--- if stoplist[i] ~= list[last] then
--- done = false
--- break
--- end
--- last = last - 1
--- end
--- if done then
--- if depth > 0 then
--- depth = depth - 1
--- else
--- break
--- end
--- char = false -- trick: let's skip the next (start) test
--- end
--- end
--- if char == startlast and size >= startlength then
--- local done = true
--- local last = size
--- for i=startlength,1,-1 do
--- if startlist[i] ~= list[last] then
--- done = false
--- break
--- end
--- last = last - 1
--- end
--- if done then
--- depth = depth + 1
--- end
--- end
--- else
--- local t = gettoken()
--- if t then
--- -- we're skipping leading stuff, like obeyedlines and relaxes
--- if experiment and size > 0 then
--- -- we're probably in a macro
--- local char = tochar[getcommand(t)]
--- if char then
--- size = size + 1 ; list[size] = char
--- else
--- -- local csname = getcsname(t)
--- local csname = scancsname(t)
--- if csname == stop then
--- stoplength = 0
--- break
--- else
--- size = size + 1 ; list[size] = "\\"
--- size = size + 1 ; list[size] = csname
--- size = size + 1 ; list[size] = " "
--- end
--- end
--- else
--- -- ignore and hope for the best
--- end
--- else
--- break
--- end
--- end
--- end
--- local start = 1
--- local stop = size - stoplength - 1
--- -- not good enough: only empty lines, but even then we miss the leading
--- -- for verbatim
--- --
--- -- the next is not yet adapted to the new scanner ... we don't need lpeg here
--- --
--- for i=start,stop do
--- local li = list[i]
--- if lpegmatch(blackspace,li) then
--- -- keep going
--- elseif lpegmatch(eol,li) then
--- -- okay
--- start = i + 1
--- else
--- break
--- end
--- end
--- for i=stop,start,-1 do
--- if lpegmatch(whitespace,list[i]) then
--- stop = i - 1
--- else
--- break
--- end
--- end
--- --
--- if start <= stop then
--- return concat(list,"",start,stop)
--- else
--- return ""
--- end
--- end
-
--- function buffers.pickup(name,start,stop,finish,catcodes,doundent)
--- local data = tokens.pickup(start,stop)
--- if doundent or (autoundent and doundent == nil) then
--- data = buffers.undent(data)
--- end
--- buffers.assign(name,data,catcodes)
--- context(finish)
--- end
-
--- commands.pickupbuffer = buffers.pickup
-
tokens.pickup = pickup
+local function showpickup(name,bufferdata,catcodes,undented)
+ undented = undented and ">" or "="
+ if #bufferdata > 50 then
+ report_grabbing("%s : %i =%s |%s..%s|",name,catcodes,undented,sub(bufferdata,1,20),sub(bufferdata,-20,#bufferdata))
+ else
+ report_grabbing("%s : %i =%s |%s|",name,catcodes,undented,bufferdata)
+ end
+end
+
implement {
name = "pickupbuffer",
actions = function()
@@ -672,12 +516,41 @@ implement {
local stop = scanstring()
local finish = scancsname()
local catcodes = scaninteger()
- local doundent = scanboolean()
+ local doundent = scaninteger() == 1 -- better than a keyword scan
-- could be a scanner:
local data = pickup(start,stop)
- if doundent or (autoundent and doundent == nil) then
+ local undented = doundent or (autoundent and doundent == nil)
+ if undented then
data = undent(data)
end
+ if trace_grab then
+ showpickup(name,data,catcodes,undented)
+ end
+ assign(name,data,catcodes)
+ context[finish]()
+ end
+}
+
+implement {
+ name = "grabbuffer",
+ actions = function()
+ -- let's pickup all here (no arguments)
+ local name = scanstring()
+ local start = scanstring()
+ local stop = scanstring()
+ local finish = scancsname()
+ local catcodes = scaninteger()
+ local doundent = scaninteger() == 1 -- better than a keyword scan
+ local starttok = createtoken(start,true)
+ local stoptok = createtoken(stop,true)
+ local data = grabtokens(starttok,stoptok,true,13) -- strip first and last \endoflineasciicode
+ local undented = doundent or (autoundent and doundent == nil)
+ if undented then
+ data = undent(data)
+ end
+ if trace_grab then
+ showpickup(name,data,catcodes,undented)
+ end
assign(name,data,catcodes)
context[finish]()
end
diff --git a/tex/context/base/mkxl/buff-ini.mkxl b/tex/context/base/mkxl/buff-ini.mkxl
index 530058f46..c6aa6de3f 100644
--- a/tex/context/base/mkxl/buff-ini.mkxl
+++ b/tex/context/base/mkxl/buff-ini.mkxl
@@ -74,7 +74,8 @@
{\begingroup % (1)
#4%
\begingroup % (2)
- \scratchcounter\catcodetable
+ \scratchcounterone\catcodetable
+ \scratchcountertwo#6\relax
\clf_erasebuffer{#1}%
\setcatcodetable\vrbcatcodes
\protected\def\buff_finish
@@ -84,17 +85,18 @@
% todo: we need to skip the first lineending which is an active character
% but sometimes we have something different ... this is a side effect of
% checking for optional arguments i.e. the next token is already tokenized
- % and for that reason we have the \relax as well as the \string
+ % and for that reason we had the \relax as well as the \string
\clf_pickupbuffer
{#1}%
{#2}%
{#3}%
-% {\string\dofinishpickupbuffer}%
+ % {\string\dofinishpickupbuffer}%
\buff_finish
- \scratchcounter
- \ifnum#6=\plusone\s!true\else\s!false\fi
- % \relax}
- \expandafter\relax\string} % maybe \normalexpanded{\relax\utfchar{7}}} signal
+ % \ifnum#6=\plusone\s!true\else\s!false\fi
+ % \expandafter\relax\string} % dirty trick
+ \scratchcounterone
+ % better than \string but still a dirty trick to avoid \par mess in blocks
+ \expandafter\scratchcountertwo\detokenized}
\protected\def\buff_stop#1%
{\endgroup % (3 & 4 & 5 & 6)
diff --git a/tex/context/base/mkxl/buff-ver.mkxl b/tex/context/base/mkxl/buff-ver.mkxl
index fd49bd421..ec7ef5fc3 100644
--- a/tex/context/base/mkxl/buff-ver.mkxl
+++ b/tex/context/base/mkxl/buff-ver.mkxl
@@ -774,11 +774,13 @@
{\buff_verbatim_type_defined_buffer[\v!buffer][\thedefinedbuffer{#1}]}%
\appendtoks
- \frozen\instance\setuevalue{\e!type\currentbuffer}{\buff_verbatim_type_defined_buffer[\v!buffer][\currentdefinedbuffer]}%
+ \frozen\instance\protected\edefcsname\e!type\currentbuffer\endcsname
+ {\buff_verbatim_type_defined_buffer[\v!buffer][\currentdefinedbuffer]}%
\to \everydefinebuffer
\appendtoks % \e!buffer
- \frozen\instance\setuevalue{\e!type\currenttyping\v!buffer}{\buff_verbatim_type_buffer_class{\currenttyping}}%
+ \frozen\instance\protected\edefcsname\e!type\currenttyping\v!buffer\endcsname
+ {\buff_verbatim_type_buffer_class{\currenttyping}}%
\to \everydefinetyping
\tolerant\protected\def\buff_verbatim_type_buffer[#1]#*[#2]%
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 4af336828..9017ea449 100644
--- a/tex/context/base/mkxl/cont-new.mkxl
+++ b/tex/context/base/mkxl/cont-new.mkxl
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2022.07.06 21:34}
+\newcontextversion{2022.07.24 12:17}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl
index db7781ea3..f68cb838d 100644
--- a/tex/context/base/mkxl/context.mkxl
+++ b/tex/context/base/mkxl/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2022.07.06 21:34}
+\immutable\edef\contextversion{2022.07.24 12:17}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
@@ -498,6 +498,7 @@
\loadmkxlfile{math-dis}
%loadmkxlfile{math-lan}
\loadmkxlfile{math-toy}
+\loadmkxlfile{math-twk}
\loadmkxlfile{strc-mat}
diff --git a/tex/context/base/mkxl/font-con.lmt b/tex/context/base/mkxl/font-con.lmt
index 5da757230..5763d1039 100644
--- a/tex/context/base/mkxl/font-con.lmt
+++ b/tex/context/base/mkxl/font-con.lmt
@@ -156,6 +156,10 @@ function constructors.aftercopyingcharacters(target,original)
-- can be used for additional tweaking
end
+function constructors.beforepassingfonttotex(tfmdata)
+ -- can be used for additional tweaking
+end
+
function constructors.trytosharefont(target,tfmdata)
-- implemented in font-def.lmt
end
diff --git a/tex/context/base/mkxl/font-ctx.lmt b/tex/context/base/mkxl/font-ctx.lmt
index 399de7421..585547cbf 100644
--- a/tex/context/base/mkxl/font-ctx.lmt
+++ b/tex/context/base/mkxl/font-ctx.lmt
@@ -504,6 +504,22 @@ do
end
end
+ local beforepassingfonttotex = sequencers.new {
+ name = "beforepassingfonttotex",
+ arguments = "tfmdata",
+ }
+
+ appendgroup(beforepassingfonttotex,"before") -- user
+ appendgroup(beforepassingfonttotex,"system") -- private
+ appendgroup(beforepassingfonttotex,"after" ) -- user
+
+ function constructors.beforepassingfonttotex(tfmdata)
+ local runner = beforepassingfonttotex.runner
+ if runner then
+ runner(tfmdata)
+ end
+ end
+
end
--[[ldx--
@@ -1381,6 +1397,7 @@ do -- else too many locals
busy = false
mathematics.finishfallbacks(tfmdata,specification,fallbacks)
tfmdata.original = specification.specification
+constructors.beforepassingfonttotex(tfmdata)
local id = definefont(tfmdata,properties.id)
csnames[id] = specification.cs
properties.id = id -- already set
diff --git a/tex/context/base/mkxl/grph-fig.mkxl b/tex/context/base/mkxl/grph-fig.mkxl
index 9f16747e3..dc709c477 100644
--- a/tex/context/base/mkxl/grph-fig.mkxl
+++ b/tex/context/base/mkxl/grph-fig.mkxl
@@ -141,8 +141,8 @@
\linewidth\onepoint
\setuppositioning
[\c!unit=pt,%
- \c!xscale=\withoutpt\the\d_grph_steps_x,%
- \c!yscale=\withoutpt\the\d_grph_steps_y,%
+ \c!xscale=\toscaled\d_grph_steps_x,%
+ \c!yscale=\toscaled\d_grph_steps_y,%
\c!factor=1]%
\ignorespaces#4%
\enforced\let\referring\grph_steps_two_referring
@@ -219,9 +219,9 @@
\position(0,0)
{\basegrid
[\c!nx=\externalfigureparameter\c!xmax,%
- \c!dx=\withoutpt\the\d_grph_steps_x,%
+ \c!dx=\toscaled\d_grph_steps_x,%
\c!ny=\externalfigureparameter\c!ymax,%
- \c!dy=\withoutpt\the\d_grph_steps_y,%
+ \c!dy=\toscaled\d_grph_steps_y,%
\c!xstep=1,%
\c!ystep=1,%
\c!scale=1,%
@@ -229,8 +229,8 @@
\c!unit=pt]}%
\setuppositioning
[\c!unit=pt,%
- \c!xscale=\withoutpt\the\d_grph_steps_x,%
- \c!yscale=\withoutpt\the\d_grph_steps_y,%
+ \c!xscale=\toscaled\d_grph_steps_x,%
+ \c!yscale=\toscaled\d_grph_steps_y,%
\c!factor=1]%
\linewidth\onepoint
\ignorespaces#4\removeunwantedspaces % or just grab #4 unspaced
diff --git a/tex/context/base/mkxl/grph-trf.mkxl b/tex/context/base/mkxl/grph-trf.mkxl
index c7e0f5e2f..a08cec904 100644
--- a/tex/context/base/mkxl/grph-trf.mkxl
+++ b/tex/context/base/mkxl/grph-trf.mkxl
@@ -558,7 +558,7 @@
{\hbox}
\def\grph_scale_fast_yes#1%
- {\edef\finalscaleboxxscale{\withoutpt\the\dimexpr#1\onepoint/1000\relax}% brrr
+ {\edef\finalscaleboxxscale{\toscaled\dimexpr#1\onepoint/1000\relax}% brrr
\let\finalscaleboxyscale\finalscaleboxxscale
\dowithnextboxcs\grph_scale_fast_finish\hbox} % container ?
diff --git a/tex/context/base/mkxl/lpdf-emb.lmt b/tex/context/base/mkxl/lpdf-emb.lmt
index d6252ae02..6932879e7 100644
--- a/tex/context/base/mkxl/lpdf-emb.lmt
+++ b/tex/context/base/mkxl/lpdf-emb.lmt
@@ -1656,6 +1656,7 @@ do
local xforms = pdfdictionary()
local nofglyphs = 0
local scale = 10 * details.parameters.size/details.parameters.designsize
+scale = scale * (7200/7227) -- test on extensibles
local units = details.parameters.units
local function boxtopdf(image,data) -- image == glyph
nofglyphs = nofglyphs + 1
diff --git a/tex/context/base/mkxl/lpdf-lmt.lmt b/tex/context/base/mkxl/lpdf-lmt.lmt
index cb1b5c7a9..cef18529c 100644
--- a/tex/context/base/mkxl/lpdf-lmt.lmt
+++ b/tex/context/base/mkxl/lpdf-lmt.lmt
@@ -554,7 +554,7 @@ do
tmry = effect.squeeze or fontparameters.squeezefactor or 1
tmrx = effect.extend or fontparameters.extendfactor or 1
need_mode = effect.mode or fontparameters.mode or 0
- need_width = effect.line or fontparameters.width or 0
+ need_width = effect.line or fontparameters.width or 0 -- scale sensitive!
c_effect = effect
else
-- we could check if effects have changed but effects use unique tables; for
@@ -566,6 +566,7 @@ do
tmrx = fontparameters.extendfactor or 1
need_mode = fontparameters.mode or 0
need_width = fontparameters.width or 0
+ c_effect = nil
end
tmrx = expand * tmrx
diff --git a/tex/context/base/mkxl/math-act.lmt b/tex/context/base/mkxl/math-act.lmt
index d1a6b80e1..4cfad32fe 100644
--- a/tex/context/base/mkxl/math-act.lmt
+++ b/tex/context/base/mkxl/math-act.lmt
@@ -64,35 +64,41 @@ function fonts.constructors.assignmathparameters(original,target) -- wrong way a
end
end
+local undefined <const> = 0x3FFFFFFF -- maxdimen or undefined_math_parameter
+
function mathematics.initializeparameters(target,original)
local mathparameters = original.mathparameters
if mathparameters and next(mathparameters) then
mathparameters = mathematics.dimensions(mathparameters)
- if not mathparameters.PrimeRaisePercent then mathparameters.PrimeRaisePercent = 25 end
- if not mathparameters.PrimeShiftUp then mathparameters.PrimeShiftUp = mathparameters.SuperscriptShiftUp end
- if not mathparameters.PrimeBaselineDropMax then mathparameters.PrimeBaselineDropMax = mathparameters.SuperscriptBaselineDropMax end
- if not mathparameters.PrimeShiftUpCramped then mathparameters.PrimeShiftUpCramped = mathparameters.SuperscriptShiftUpCramped end
- if not mathparameters.PrimeSpaceAfter then mathparameters.PrimeSpaceAfter = 0 end
- if not mathparameters.PrimeWidthPercent then mathparameters.PrimeWidthPercent = 50 end
- if not mathparameters.SpaceBeforeScript then mathparameters.SpaceBeforeScript = mathparameters.SpaceAfterScript end
- if not mathparameters.NoLimitSupFactor then mathparameters.NoLimitSupFactor = 0 end
- if not mathparameters.NoLimitSubFactor then mathparameters.NoLimitSubFactor = 0 end
- if not mathparameters.AccentTopShiftUp then mathparameters.AccentTopShiftUp = 0 end
- if not mathparameters.AccentBottomShiftDown then mathparameters.AccentBottomShiftDown = 0 end
- if not mathparameters.FlattenedAccentTopShiftUp then mathparameters.AccentTopShiftUp = 0 end
- if not mathparameters.FlattenedAccentBottomShiftDown then mathparameters.AccentBottomShiftDown = 0 end
- if not mathparameters.AccentBaseDepth then mathparameters.AccentBaseDepth = 0 end
- if not mathparameters.AccentFlattenedBaseDepth then mathparameters.AccentFlattenedBaseDepth = 0 end
- if not mathparameters.AccentTopOvershoot then mathparameters.AccentTopOvershoot = 0 end
- if not mathparameters.AccentBottomOvershoot then mathparameters.AccentBottomOvershoot = 0 end
- if not mathparameters.AccentSuperscriptDrop then mathparameters.AccentSuperscriptDrop = 0 end
- if not mathparameters.AccentSuperscriptPercent then mathparameters.AccentSuperscriptPercent = 0 end
- if not mathparameters.DelimiterPercent then mathparameters.DelimiterPercent = 100 end
- if not mathparameters.DelimiterShortfall then mathparameters.DelimiterShortfall = 0 end
- --
- -- we don't want to reset that each time .. but then we also can't show what the value was
--
- -- mathparameters.RadicalDegreeBefore = 0
+ if not mathparameters.MinConnectorOverlap then mathparameters.MinConnectorOverlap = undefined end
+ if not mathparameters.SubscriptShiftDownWithSuperscript then mathparameters.SubscriptShiftDownWithSuperscript = undefined end -- a tex one
+ if not mathparameters.FractionDelimiterSize then mathparameters.FractionDelimiterSize = undefined end
+ if not mathparameters.FractionDelimiterDisplayStyleSize then mathparameters.FractionDelimiterDisplayStyleSize = undefined end
+ if not mathparameters.SkewedDelimiterTolerance then mathparameters.SkewedDelimiterTolerance = undefined end
+ -- some more can be undefined:
+ if not mathparameters.PrimeRaisePercent then mathparameters.PrimeRaisePercent = 50 end
+ if not mathparameters.PrimeRaiseComposedPercent then mathparameters.PrimeRaiseComposedPercent = 25 end
+ if not mathparameters.PrimeShiftUp then mathparameters.PrimeShiftUp = mathparameters.SuperscriptShiftUp end
+ if not mathparameters.PrimeBaselineDropMax then mathparameters.PrimeBaselineDropMax = mathparameters.SuperscriptBaselineDropMax end
+ if not mathparameters.PrimeShiftUpCramped then mathparameters.PrimeShiftUpCramped = mathparameters.SuperscriptShiftUpCramped end
+ if not mathparameters.PrimeSpaceAfter then mathparameters.PrimeSpaceAfter = 0 end
+ if not mathparameters.PrimeWidthPercent then mathparameters.PrimeWidthPercent = 50 end
+ if not mathparameters.SpaceBeforeScript then mathparameters.SpaceBeforeScript = mathparameters.SpaceAfterScript end
+ if not mathparameters.NoLimitSupFactor then mathparameters.NoLimitSupFactor = 0 end
+ if not mathparameters.NoLimitSubFactor then mathparameters.NoLimitSubFactor = 0 end
+ if not mathparameters.AccentTopShiftUp then mathparameters.AccentTopShiftUp = 0 end
+ if not mathparameters.AccentBottomShiftDown then mathparameters.AccentBottomShiftDown = 0 end
+ if not mathparameters.FlattenedAccentTopShiftUp then mathparameters.AccentTopShiftUp = 0 end
+ if not mathparameters.FlattenedAccentBottomShiftDown then mathparameters.AccentBottomShiftDown = 0 end
+ if not mathparameters.AccentBaseDepth then mathparameters.AccentBaseDepth = 0 end
+ if not mathparameters.AccentFlattenedBaseDepth then mathparameters.AccentFlattenedBaseDepth = 0 end
+ if not mathparameters.AccentTopOvershoot then mathparameters.AccentTopOvershoot = 0 end
+ if not mathparameters.AccentBottomOvershoot then mathparameters.AccentBottomOvershoot = 0 end
+ if not mathparameters.AccentSuperscriptDrop then mathparameters.AccentSuperscriptDrop = 0 end
+ if not mathparameters.AccentSuperscriptPercent then mathparameters.AccentSuperscriptPercent = 0 end
+ if not mathparameters.DelimiterPercent then mathparameters.DelimiterPercent = 100 end
+ if not mathparameters.DelimiterShortfall then mathparameters.DelimiterShortfall = 0 end
--
target.mathparameters = mathparameters
end
@@ -109,6 +115,7 @@ local how = {
NoLimitSupFactor = "unscaled",
NoLimitSubFactor = "unscaled",
PrimeRaisePercent = "unscaled",
+ PrimeRaiseComposedPercent = "unscaled",
PrimeWidthPercent = "unscaled",
AccentTopOvershoot = "unscaled",
AccentBottomOvershoot = "unscaled",
@@ -246,7 +253,8 @@ mathematics.tweaks = mathtweaks
local function report_tweak(fmt,target,original,...)
if fmt then
- local metadata = original.shared.rawdata.metadata
+ local metadata = (original and original.shared.rawdata.metadata) or
+ (target and target .shared.rawdata.metadata)
local parameters = target.parameters
report_mathtweak(
"%a, size %p, math size %i, %s",
@@ -278,16 +286,17 @@ end
do
- local stepper = utilities.parsers.stepper
- local count = 0
- local splitter = lpeg.tsplitat(".")
- local toeffect = fonts.toeffect
+ local stepper = utilities.parsers.stepper
+ local count = 0
+ local splitter = lpeg.tsplitat(".")
+ local toeffect = fonts.toeffect
+ local privateslot = fonts.helpers.privateslot
local function adapt(list,target,original,targetcharacters,originalcharacters,k,v,compact,n)
k = mathgaps[k] or k
local character = targetcharacters[k]
if character then
- if not character.tweaked then
+ if not character.tweaked then -- todo: add a force
local t = type(v)
if t == "number" then
v = list[v]
@@ -337,6 +346,8 @@ do
if width and width ~= 0 then
if advancefactor then
character.advance = advancefactor * width
+ else
+ character.advance = width -- so advance is oldwidth
end
if widthfactor then
character.width = widthfactor * width
@@ -366,12 +377,23 @@ do
if anchorfactor then
character.topaccent = anchorfactor * (topaccent or width)
end
- -- todo: check once per tweak
- character.effect = toeffect(v)
+ -- begin experiment
+ local line = v.wline
+ if line then
+ local parameters = target.parameters
+ v.line = parameters.hfactor * line / parameters.units
+ end
+ -- end experiment
+ character.effect = toeffect(v) -- todo: move wline test inside here
+ -- begin experiment
+ v.line = line
+ -- end experiment
if trace_tweaking then
report_tweak("adapting dimensions of %U ",target,original,k)
end
- local smaller = originalcharacters[k].smaller
+ -- missing when private
+ local originaldata = originalcharacters[k] -- or targetcharacters[k]
+ local smaller = originaldata and originaldata.smaller
if compact and smaller and smaller ~= k then
adapt(list,target,original,targetcharacters,originalcharacters,smaller,v,compact,n+1)
end
@@ -474,7 +496,7 @@ do
if t == "number" then
adapt(list,target,original,targetcharacters,originalcharacters,k,v,compact,1)
elseif t == "string" then
- local d = detail(targetcharacters,k)
+ local d = privateslot(k) or detail(targetcharacters,k) -- watch the private here
local t = type(d)
if t == "table" then
for i=1,#d do
@@ -513,6 +535,14 @@ end
do
+ function mathtweaks.message(target,original,parameters)
+ report_mathtweak(parameters.text or "no message")
+ end
+
+end
+
+do
+
function mathtweaks.wipevariants(target,original,parameters)
local list = parameters.list
if list then
@@ -591,7 +621,7 @@ do
local originalcharacters = original.characters
local getsubstitution = fonts.handlers.otf.getsubstitution
local count = 0
- for k, v in sortedhash(list) do
+ for k, v in next, list do -- no need for sortedhash(list) unless we report
local sub = getsubstitution(original,k,v,true)
if sub then
targetcharacters[mathgaps[k] or k] = targetcharacters[mathgaps[sub] or sub]
@@ -611,6 +641,82 @@ end
do
+ -- maybe we'll have a different name
+
+ mathtweaks.subsets = {
+ acenorsuvxz = { 0x1D44E, 0x1D450, 0x1D452, 0x1D45B, 0x1D45C, 0x1D45F, 0x1D460, 0x1D462, 0x1D463, 0x1D465, 0x1D467 },
+ bhklt = { 0x1D44F, 0x1D455, 0x1D458, 0x1D459, 0x1D461 },
+ d = { 0x1D451 },
+ f = { 0x1D453 },
+ gjqy = { 0x1D454, 0x1D457, 0x1D45E, 0x1D466 },
+ i = { 0x1D456 },
+ mw = { 0x1D45A, 0x1D464},
+ p = { 0x1D45D },
+ }
+
+ function mathtweaks.kernpairs(target,original,parameters)
+ local list = parameters.list
+ if list then
+ local targetcharacters = target.characters
+ local originalcharacters = original.characters
+ local count = 0
+
+ local function add(v,n)
+ local chardata = targetcharacters[mathgaps[n] or n]
+ if chardata then
+ local width = chardata.width
+ if width then
+ local kerns = chardata.kerns or { }
+ for kk, vv in next, v do
+-- for kk, vv in sortedhash(v) do
+ stepper(kk,function(nn) -- todo: also make stepper accept a table
+ local t = mathgaps[nn] or nn
+ if t then
+ kerns[t] = vv * width
+ count = count + 1
+ end
+ end)
+ end
+ chardata.kerns = kerns
+ end
+ end
+ end
+
+ for k, v in next, list do -- no need for sortedhash(list) unless we report
+-- for k, v in sortedhash(list) do -- no need for sortedhash(list) unless we report
+ stepper(k,function(n) -- todo: also make stepper accept a table
+ add(v,n)
+ end)
+ end
+
+-- for k, v in next, list do -- no need for sortedhash(list) unless we report
+-- local chardata = targetcharacters[mathgaps[k] or k]
+-- if chardata then
+-- local width = chardata.width
+-- if width then
+-- local kerns = chardata.kerns or { }
+-- for kk, vv in next, v do
+-- local t = mathgaps[kk] or kk
+-- if t then
+-- kerns[t] = vv * width
+-- count = count + 1
+-- end
+-- end
+-- chardata.kerns = kerns
+-- end
+-- end
+-- end
+
+ if trace_tweaking and count > 0 then
+ report_mathtweak("%i kern pairs",count)
+ end
+ end
+ end
+
+end
+
+do
+
-- What a mess ... should be a different alphabet.
local function expand(target,original,list,selector,feature)
@@ -800,6 +906,118 @@ end
do
+ local copytable = table.copy
+ local nps = fonts.helpers.newprivateslot
+
+ local privates = {
+ [0x2212] = nps("unary minus"),
+ [0x002B] = nps("unary plus"),
+ [0x00B1] = nps("unary plus minus"),
+ [0x2213] = nps("unary minus plus"),
+ }
+
+ -- these are the values tested with texgyre-bonum
+
+ local predefined = {
+ ["unary minus"] = {
+ original = 0x2212,
+ extend = .5,
+ width = .5,
+ unicode = 0x002D, -- hyphen minus
+ },
+ ["unary plus"] = {
+ original = 0x002B,
+ extend = .5,
+ squeeze = .5,
+ width = .5,
+ height = .5,
+ yoffset = .2,
+ mode = 2,
+ wline = .5,
+ unicode = 0x002B,
+ },
+ ["unary plus minus"] = {
+ original = 0x00B1,
+ extend = .5,
+ squeeze = .5,
+ width = .5,
+ height = .5,
+ yoffset = .2,
+ mode = 2,
+ wline = .5,
+ },
+ ["unary minus plus"] = {
+ original = 0x2213,
+ extend = .5,
+ squeeze = .5,
+ width = .5,
+ height = .5,
+ yoffset = .2,
+ mode = 2,
+ wline = .5,
+ },
+ }
+
+ -- {
+ -- tweak = "addprivates",
+ -- list = {
+ -- -- for specific parameters see act file
+ -- ["unary minus"] = { preset = "unary minus" },
+ -- ["unary plus"] = { preset = "unary plus" },
+ -- ["unary plus minus"] = { preset = "unary plus minus" },
+ -- ["unary minus plus"] = { preset = "unary minus plus" },
+ -- },
+ -- },
+
+ function mathtweaks.addprivates(target,original,parameters)
+ local list = parameters.list or predefined
+ if list then
+ local targetcharacters = target.characters
+ local targetparameters = target.parameters
+ local originalcharacters = original.characters
+ local processedprivates = { }
+ for name, v in sortedhash(list) do
+ if type(v) == "table" then
+ local preset = v.preset
+ if preset then
+ local p = predefined[preset]
+ if p then
+ -- p = table.copy(p)
+ v = table.combine(p,v)
+ p.preset = nil
+ else
+ goto NEXT
+ end
+ end
+ local charslot = v.original
+ if charslot then
+ local chardata = targetcharacters[charslot]
+ if chardata then
+ local clonedata = copytable(chardata)
+ local cloneslot = nps(name)
+ local unicode = v.unicode or clonedata.unicode
+ clonedata.uncode = unicode
+ targetcharacters[cloneslot] = clonedata
+ if trace_tweaking then
+ report_tweak("cloning %a from %C into %U with tounicode %U",target,original,name,charslot,cloneslot,unicode)
+ end
+ end
+ processedprivates[name] = v
+ end
+ ::NEXT::
+ end
+ end
+ mathtweaks.dimensions(target,original,{
+ tweak = parameters.tweak,
+ list = processedprivates,
+ })
+ end
+ end
+
+end
+
+do
+
function mathtweaks.fixanchors(target,original,parameters)
local targetcharacters= target.characters
local factor = tonumber(parameters.factor) or 0
@@ -807,7 +1025,7 @@ do
for k, v in next, targetcharacters do
local a = v.topaccent
if a and a > 0 then
- v.topaccent = a * factor
+ v.topaccent = a * factor
end
end
end
@@ -1471,7 +1689,11 @@ local function applytweaks(when,target,original)
if type(tweak) == "table" then
local action = mathtweaks[tweak.tweak or ""]
if action then
- action(target,original,tweak)
+ if original then
+ action(target,original,tweak)
+ else
+ action(target,tweak)
+ end
end
end
end
@@ -1502,6 +1724,15 @@ function mathematics.tweakaftercopyingfont(target,original)
end
end
+function mathematics.beforepassingfonttotex(target)
+ if use_math_goodies then
+ local mathparameters = target.mathparameters -- why not hasmath
+ if mathparameters then
+ applytweaks("beforepassing",target,target)
+ end
+ end
+end
+
sequencers.appendaction("mathparameters","system","mathematics.overloadparameters")
sequencers.appendaction("mathparameters","system","mathematics.scaleparameters")
sequencers.appendaction("mathparameters","system","mathematics.checkaccentbaseheight") -- should go in lfg instead
@@ -1509,6 +1740,7 @@ sequencers.appendaction("mathparameters","system","mathematics.checkaccentbasehe
sequencers.appendaction("beforecopyingcharacters","system","mathematics.tweakbeforecopyingfont")
sequencers.appendaction("aftercopyingcharacters", "system","mathematics.tweakaftercopyingfont")
+sequencers.appendaction("beforepassingfonttotex", "system","mathematics.beforepassingfonttotex")
-- no, it's a feature now (see good-mth):
--
@@ -1661,6 +1893,8 @@ interfaces.implement { -- will be shared with text
actions = mathematics.registerfallbackid,
}
+-- todo: run this directly .. can be done in luametatex
+
function mathematics.resolvefallbacks(target,specification,fallbacks)
local definitions = fonts.collections.definitions[fallbacks]
if definitions then
@@ -1673,7 +1907,7 @@ function mathematics.resolvefallbacks(target,specification,fallbacks)
local name = definition.font
local features = definition.features or ""
local size = size * (definition.rscale or 1)
--- compact: size = 655360
+ -- compact: size = 655360
context.font_fallbacks_register_math(i,name,features,size)
if trace_collecting then
report_math("registering fallback font %i, name %a, size %a, features %a",i,name,size,features)
@@ -1696,7 +1930,7 @@ function mathematics.finishfallbacks(target,specification,fallbacks)
local fonts = target.fonts
local size = specification.size -- target.size
local characters = target.characters
--- compact: size = 655360
+ -- compact: size = 655360
if not fonts then
fonts = { }
target.fonts = fonts
diff --git a/tex/context/base/mkxl/math-ali.mkxl b/tex/context/base/mkxl/math-ali.mkxl
index e2d7d8d69..a9e9af722 100644
--- a/tex/context/base/mkxl/math-ali.mkxl
+++ b/tex/context/base/mkxl/math-ali.mkxl
@@ -81,18 +81,14 @@
\newdimen\d_math_eqalign_number_distance
\newcount\c_math_eqalign_repeat
+\mutable\def\displayopenupvalue{.25\bodyfontsize}
+
\protected\def\math_eqalign_distance
- {\relax
- \ifdim\d_math_eqalign_distance>\zeropoint
- \tabskip\d_math_eqalign_distance
- \fi
- %global\expandafter\integerdef\csname\??mathbeginclass\the\c_math_eqalign_column\endcsname\mathbegincode
+ {%global\expandafter\integerdef\csname\??mathbeginclass\the\c_math_eqalign_column\endcsname\mathbegincode
\global\expandafter\integerdef\csname\??mathendclass \the\c_math_eqalign_column\endcsname\mathendcode
\mathalignmentparameter\c!separator
\relax}
-\mutable\def\displayopenupvalue{.25\bodyfontsize}
-
\def\math_build_eqalign
{\scratchtoks\emptytoks
\d_math_eqalign_distance\mathalignmentparameter\c!distance\relax
@@ -110,7 +106,10 @@
\dorecurse{\numexpr\scratchcounterone*\scratchcountertwo-\plusone\relax}
{\ifnum\scratchcounter=\scratchcountertwo
\scratchcounter\plusone
- \toksapp\scratchtoks{\math_eqalign_distance}%
+ % preamble expansion hell ...
+ \toksapp\scratchtoks {\tabskip\d_math_eqalign_distance}%
+ % so ...
+ \toksapp\scratchtoks {\relax\math_eqalign_distance}%
\etoksapp\scratchtoks{\global\advance\c_math_eqalign_repeat\the\scratchcountertwo\relax}%
\else
\advance\scratchcounter\plusone
@@ -132,7 +131,7 @@
\global\expandafter\integerdef\csname\??mathendclass \the\zerocount\endcsname\mathendcode
\protected\def\math_math_in_eqalign#1%
- {\mathbeginclass\csname\??mathendclass\the\numexpr\c_math_eqalign_column-\plusone\relax\endcsname
+ {\mathbeginclass\ifcsname\??mathendclass\the\numexpr\c_math_eqalign_column-\plusone\relax\endcsname\lastnamedcs\else\mathunsetcode\fi
\startforceddisplaymath
\tabskip\zeropoint
\everycr\emptytoks
@@ -362,7 +361,8 @@
% \math_halign_checked_nop \fi}
\def\math_halign_checked
- {\halign
+ {\enablematrixalign
+ \halign
\ifconditional\c_math_align_overflow_mode
callback
attr
@@ -397,11 +397,12 @@
{\begingroup
\setbox\scratchbox\hbox{\letformulaparameter\c!location\empty#1}%
\ifzeropt\wd\scratchbox\else
+ %\enablematrixalign
\hpack
- \s!attr \mathnumberlocationattribute \numexpr\c_strc_math_ragged_status * \plussixteen + \plusone\relax
- \s!attr \mathnumberthresholdattribute \numexpr\d_math_eqalign_number_threshold\relax
- {\strc_formulas_add_distance \plustwo\v!left\mathalignmentparameter
- \box\scratchbox}%
+ \s!attr \mathnumberlocationattribute \numexpr\c_strc_math_ragged_status * \plussixteen + \plusone\relax
+ \s!attr \mathnumberthresholdattribute \numexpr\d_math_eqalign_number_threshold\relax
+ {\strc_formulas_add_distance \plustwo\v!left\mathalignmentparameter
+ \box\scratchbox}%
\fi
\global\d_math_eqalign_number_threshold\zeropoint % move to begin of row
\endgroup}
@@ -410,11 +411,12 @@
{\begingroup
\setbox\scratchbox\hbox{\letformulaparameter\c!location\empty#1}%
\ifzeropt\wd\scratchbox\else
+ %\enablematrixalign
\hpack
- \s!attr \mathnumberlocationattribute \numexpr\c_strc_math_ragged_status * \plussixteen + \plustwo\relax
- \s!attr \mathnumberthresholdattribute \numexpr\d_math_eqalign_number_threshold\relax
- {\box\scratchbox
- \strc_formulas_add_distance \plustwo\v!right\mathalignmentparameter}%
+ \s!attr \mathnumberlocationattribute \numexpr\c_strc_math_ragged_status * \plussixteen + \plustwo\relax
+ \s!attr \mathnumberthresholdattribute \numexpr\d_math_eqalign_number_threshold\relax
+ {\box\scratchbox
+ \strc_formulas_add_distance \plustwo\v!right\mathalignmentparameter}%
\fi
\global\d_math_eqalign_number_threshold\zeropoint % move to begin of row
\endgroup}
@@ -968,7 +970,8 @@
\global\c_math_eqalign_row\plusone
\global\c_math_cases_nc\zerocount
\strc_math_setup_spacing_aligned\mathcasesparameter
- \halign callback \s!attr \mathnumberlocationattribute \zerocount \bgroup
+ \enablematrixalign
+ \halign callback \s!attr \mathnumberlocationattribute \zerocount \bgroup % use \indexofregister here
\ifmmode\else\startimath\fi
\mathcasesparameter\c!style
\aligncontent
@@ -1064,6 +1067,9 @@
%D different which is a side effect of getting the tagging right. In
%D retrospect the main alignment could be done this way but \unknown
+%D In the end is is way easier to not use alignments and just paste boxes together
+%D but let's be a bit texie.
+
\installcorenamespace{mathmatrix}
\installcommandhandler \??mathmatrix {mathmatrix} \??mathmatrix
@@ -1085,9 +1091,12 @@
\frozen\instance \defcsname \e!stop \currentmathmatrix\endcsname{\math_matrix_stop}% no u else lookahead problem
\to \everydefinemathmatrix
+\newcount\c_math_matrix_columns
+
\def\math_matrix_start_table
{\global\c_math_eqalign_column\zerocount
\global\c_math_eqalign_row\zerocount
+ \global\c_math_matrix_columns\zerocount
\dostarttagged\t!math\empty
\dostarttagged\t!mtable\empty}
@@ -1097,6 +1106,7 @@
\def\math_matrix_start_row
{\beginlocalcontrol
+ \global\c_math_matrix_columns\c_math_eqalign_column
\global\c_math_eqalign_column\zerocount
\global\advance\c_math_eqalign_row\plusone
\dostarttagged\t!mtablerow\empty
@@ -1121,6 +1131,100 @@
\hss
\dostoptagged}
+% \dorecurse{10}{test }
+%
+% \startformula
+% \startmatrix[left=\left(,right=\right)]
+% \NC x \NC \NC yy \NC \NC zzz \NR
+% \NC x \NC \dots \NC yy \NC \dots \NC zzz \NR
+% \HF[2] \NR
+% \NC x \NC \dots \NC yy \NC \dots \NC zzz \NR
+% \HF \NR
+% \NC x \NC \dots \NC yy \NC \dots \NC zzz \NR
+% \NC \HF[2] \NR
+% \NC x \NC \dots \NC yy \NC \dots \NC zzz \NR
+% \NC \NC \HF[2][rule] \NR
+% \NC x \NC \dots \NC yy \NC \dots \NC zzz \NR
+% \HL
+% \NC x \VL \dots \VL yy \NC \dots \VL zzz \NR
+% \NC x \VL \dots \VL yy \NC \dots \VL zzz \NR
+% \HL
+% \stopmatrix
+% \stopformula
+%
+% \dorecurse{10}{test }
+%
+% \startformula
+% \startmatrix[left=\left(,right=\right)]
+% \NC \TT \ttx 1 \NC \TT \ttx 2 \NC \TT \ttx 3 \NC \NR
+% \LT \ttx 1 \NC a \NC \dots \NC aa \NC \dots \NC aaa \RT \ttx 1 \NR
+% \LT \ttx 2 \NC b \NC \dots \NC bb \NC \dots \NC bbb \RT \ttx 2 \NR
+% \LT \ttx 3 \NC c \NC \dots \NC cc \NC \dots \NC ccc \RT \ttx 3 \NR
+% \NC \BT \ttx 1 \NC \BT \ttx 2 \NC \BT \ttx 3 \NC \NR
+% \stopmatrix
+% \stopformula
+%
+% \dorecurse{10}{test }
+%
+% \startformula
+% \startmatrix[left=\left(,right=\right)]
+% \NC \TT \ttx 1 \NC \TT \ttx 2 \NC \TT \ttx 3 \NR
+% \LT \ttx 1 \NC a \NC \dots \NC aa \NC \dots \NC aaa \NR
+% \LT \ttx 2 \NC b \NC \dots \NC bb \NC \dots \NC bbb \NR
+% \LT \ttx 3 \NC c \NC \dots \NC cc \NC \dots \NC ccc \NR
+% \NC \BT \ttx 1 \NC \BT \ttx 2 \NC \BT \ttx 3 \NR
+% \stopmatrix
+% \stopformula
+%
+% \dorecurse{10}{test }
+
+\newtoks\everymathmatrix
+
+\tolerant\permanent\def\math_matrix_HF[#1]#*[#2]% [n] [name] | [name] | [n]
+ {\expandedloop
+ \plusone
+ \numexpr\ifchknum#1\or#1\else(\c_math_matrix_columns+\minusone)\fi*\plustwo\relax
+ \plusone
+ {\omit\span}%
+ \normalexpanded{\filler[%
+ \ifcsname\??filleralternative matrix:#1\endcsname matrix:#1\orelse
+ \ifcsname\??filleralternative matrix:#2\endcsname matrix:#2\orelse
+ \ifcsname\??filleralternative #1\endcsname #1\orelse
+ \ifcsname\??filleralternative #2\endcsname #2\else
+ matrix:\v!normal\fi
+ ]}}
+
+\appendtoks
+ \enforced\let\HF\math_matrix_HF
+\to \everymathmatrix
+
+\definefiller
+ [matrix:\v!normal]
+ [\c!symbol=\textperiod,
+ \c!style=\v!normal,
+ \c!method=\v!broad,
+ \c!width=\emwidth,
+ \c!leftmargin=-.1\emwidth,
+ \c!rightmargin=-.1\emwidth]
+
+\definefiller
+ [matrix:\v!middle]
+ [\c!symbol=\textperiod,
+ \c!style=\v!normal,
+ \c!method=\v!middle,
+ \c!width=\emwidth,
+ \c!leftmargin=.5\emwidth,
+ \c!rightmargin=.5\emwidth]
+
+\definefiller
+ [matrix:ldots]
+ [matrix:\v!normal]
+
+\definefiller
+ [matrix:cdots]
+ [matrix:\v!normal]
+ [\c!symbol=\cdot]
+
% We could construct a preamble with alignment and such embedded but the number
% of matrices with many rows is normally so low that it doesn't pay of at all.
@@ -1175,7 +1279,7 @@
\aligntab
\aligntab
\math_matrix_anchor
- \hskip.5\d_math_eqalign_distance
+ \hskip.5\d_math_eqalign_distance % kern
\aligncontent
\aligntab
\global\advance\c_math_eqalign_column\plusone
@@ -1201,11 +1305,14 @@
\permanent\protected\def\math_matrix_NC_yes{\global\setfalse\c_math_matrix_first}
\permanent\protected\def\math_matrix_NC_nop{\aligntab\aligntab} % avoids lookahead
-
\def\math_matrix_check_rule_step#1%
- {\doifelsenumber{#1}
- {\scratchdimen#1\d_math_eqalign_rulethickness}
- {\edef\p_rulecolor{#1}}}
+ {\ifchkdim#1\or
+ \scratchdimen#1\relax
+ \orelse\ifchknum#1\or
+ \scratchdimen#1\d_math_eqalign_rulethickness
+ \else
+ \edef\p_rulecolor{#1}
+ \fi}
\def\math_matrix_check_rule[#1]%
{\d_math_eqalign_rulethickness\mathmatrixparameter\c!rulethickness\relax
@@ -1218,33 +1325,157 @@
\dousecolorparameter\p_rulecolor
\fi}
+% \noaligned\permanent\tolerant\protected\def\math_matrix_HL[#1]#*%
+% {\noalign\bgroup
+% \math_matrix_check_rule[#1]%
+% \divide\scratchdimen\plustwo
+% \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax
+% \egroup}
+%
+% \permanent\tolerant\protected\def\math_matrix_VL[#1]#*%
+% {\NC
+% \math_matrix_check_rule[#1]%
+% \divide\d_math_eqalign_distance\plustwo
+% \hskip-\d_math_eqalign_distance
+% \autorule\s!width\scratchdimen\relax
+% \hskip-\d_math_eqalign_distance
+% \NC}
+
+% These offset are an experiment so we abuse some existing keys or we have to
+% cook up new ones. Maybe we then should provide small medium big halfline etc.
+% but all depends on actual demand for this feature.
+
+\definesystemattribute[mathalignmentvrule][public]
+
+\setupmathmatrix
+ [%c!toffset=\zeropoint,
+ \c!toffset=.25\exheight,
+ \c!boffset=\mathmatrixparameter\c!toffset]
+
\noaligned\permanent\tolerant\protected\def\math_matrix_HL[#1]#*%
{\noalign\bgroup
\math_matrix_check_rule[#1]%
\divide\scratchdimen\plustwo
- \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax
+ \ifdim\scratchdimen>\zeropoint
+ % \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax
+ \scratchdistance\mathmatrixparameter\c!toffset\relax
+ \ifdim\scratchdistance>\zeropoint
+ \nohrule
+ \s!attr \mathalignmentvruleattribute\plustwo
+ \s!height\scratchdistance
+ \s!depth \zeropoint
+ \relax
+ \fi
+ \hrule
+ \s!attr \mathalignmentvruleattribute\plusthree
+ \s!height\scratchdimen
+ \s!depth \scratchdimen
+ \relax
+ \scratchdistance\mathmatrixparameter\c!boffset\relax
+ \ifdim\scratchdistance>\zeropoint
+ \nohrule
+ \s!attr \mathalignmentvruleattribute\plusfour
+ \s!height\zeropoint
+ \s!depth \scratchdistance
+ \relax
+ \fi
+ \else
+ % zero dimensions disable the rule
+ \fi
\egroup}
+\protected\def\math_matrix_vertical_rule#1%
+ {\math_matrix_check_rule[#1]%
+ \enablematrixrules
+ \vrule
+ \s!attr \mathalignmentvruleattribute\plusone
+ \s!width \scratchdimen
+ \s!top -\dimexpr\mathmatrixparameter\c!toffset\relax
+ \s!bottom-\dimexpr\mathmatrixparameter\c!boffset\relax
+ \relax}
+
+
\permanent\tolerant\protected\def\math_matrix_VL[#1]#*%
+ {\span\omit
+ \hskip.5\d_math_eqalign_distance
+ \math_matrix_vertical_rule{#1}%
+ \hskip.5\d_math_eqalign_distance
+ \aligntab}
+
+\permanent\tolerant\protected\def\math_matrix_VC[#1]#*%
{\NC
- \math_matrix_check_rule[#1]%
- \divide\d_math_eqalign_distance\plustwo
- \hskip-\d_math_eqalign_distance
- \autorule\s!width\scratchdimen\relax
- \hskip-\d_math_eqalign_distance
+ \math_matrix_vertical_rule{#1}%
\NC}
-\newtoks\everymathmatrix
+\permanent\tolerant\protected\def\math_matrix_VT[#1]#*%
+ {\span\omit
+ \math_matrix_vertical_rule{#1}%
+ \aligntab}
+
+\def\math_matrix_start_row
+ {\beginlocalcontrol
+ \global\c_math_matrix_columns\c_math_eqalign_column
+ \global\c_math_eqalign_column\zerocount
+ \global\advance\c_math_eqalign_row\plusone
+ \dostarttagged\t!mtablerow\empty
+ \endlocalcontrol}
\appendtoks
\enforced\let\NR\math_matrix_NR
\enforced\let\NC\math_matrix_NC
\enforced\let\MC\math_matrix_NC
- \enforced\let\HL\math_matrix_HL
- \enforced\let\VL\math_matrix_VL
+ \enforced\let\HL\math_matrix_HL % like the old ones
+ \enforced\let\VL\math_matrix_VL % like the old ones
+ \enforced\let\VC\math_matrix_VC % bonus, extra column
+ \enforced\let\VT\math_matrix_VT % bonus, idem but tight
\enforced\let\TB\math_common_TB
\to \everymathmatrix
+\definesystemattribute[mathmatrixornament][public]
+
+\newdimen\d_math_matrix_margin_l
+\newdimen\d_math_matrix_margin_r
+\newdimen\d_math_matrix_margin_t
+\newdimen\d_math_matrix_margin_b
+
+\newboundary\c_math_matrix_ornament_l
+\newboundary\c_math_matrix_ornament_r
+\newboundary\c_math_matrix_ornament_t
+\newboundary\c_math_matrix_ornament_b
+
+% anchors are wrong now
+
+\newconditional\c_math_matrix_text
+\newconditional\c_math_matrix_text_l
+\newconditional\c_math_matrix_text_r
+\newconditional\c_math_matrix_text_t
+\newconditional\c_math_matrix_text_b
+
+\def\math_matrix_ornaments#1#2%
+ {\NC
+ \enablematrixornaments
+ \global\settrue\c_math_matrix_text
+ \global\settrue#1
+ \boundary#2%
+ \ignorespaces}
+
+\permanent\protected\def\math_matrix_LT{\math_matrix_ornaments\c_math_matrix_text_l\c_math_matrix_ornament_l}
+\permanent\protected\def\math_matrix_RT{\math_matrix_ornaments\c_math_matrix_text_r\c_math_matrix_ornament_r}
+\permanent\protected\def\math_matrix_TT{\math_matrix_ornaments\c_math_matrix_text_t\c_math_matrix_ornament_t}
+\permanent\protected\def\math_matrix_BT{\math_matrix_ornaments\c_math_matrix_text_b\c_math_matrix_ornament_b}
+
+\appendtoks
+ \global\setfalse\c_math_matrix_text
+ \global\setfalse\c_math_matrix_text_l
+ \global\setfalse\c_math_matrix_text_r
+ \global\setfalse\c_math_matrix_text_t
+ \global\setfalse\c_math_matrix_text_b
+ \enforced\let\LT\math_matrix_LT
+ \enforced\let\RT\math_matrix_RT
+ \enforced\let\TT\math_matrix_TT
+ \enforced\let\BT\math_matrix_BT
+\to \everymathmatrix
+
\def\math_matrix_start_processing
{\ifmmode
\mathatom \s!class \mathwrappedcode
@@ -1252,6 +1483,10 @@
\dontleavehmode
\fi
\bgroup
+ \d_math_matrix_margin_l\mathmatrixparameter\c!leftmargin \relax
+ \d_math_matrix_margin_r\mathmatrixparameter\c!rightmargin\relax
+ \d_math_matrix_margin_t\strutdp
+ \d_math_matrix_margin_b\strutht
%\tabskip.5\d_math_eqalign_distance
\tabskip\zeropoint
\math_matrix_pickup
@@ -1259,7 +1494,11 @@
%
\setbox\nextbox\vbox\bgroup
\math_matrix_start_table
- \halign \bgroup
+ \halign
+ callback
+ \s!attr \mathmatrixornamentattribute "10
+ \s!attr \mathalignmentvruleattribute \plusone
+ \bgroup
% preamble
\span\math_matrix_preamble
% done
@@ -1343,20 +1582,34 @@
\def\math_matrix_finish_nextbox
{\scratchcounter\mathstyle\relax
- \begincsname\??mathmatrixalignlocation\mathmatrixparameter\c!location\endcsname\hbox\bgroup
+ \scratchwidth\wd\nextbox
+ \setbox\scratchbox\begincsname\??mathmatrixalignlocation\mathmatrixparameter\c!location\endcsname\hbox\bgroup
\normalstartimath
\Ustyle\scratchcounter
- \scratchdimen\mathmatrixparameter\c!leftmargin\relax
- \ifzeropt\scratchdimen\else\kern\scratchdimen\fi
+ \ifzeropt\d_math_matrix_margin_l\else\kern\d_math_matrix_margin_l\fi
\mathmatrixparameter\c!left\relax
\math_fenced_start_wrap{\mathmatrixparameter\c!fences}%
\mathatom \s!class \mathconstructcode {\vcenter{\box\nextbox}}% \was \vcenter
\math_fenced_stop_wrap
\mathmatrixparameter\c!right\relax
- \scratchdimen\mathmatrixparameter\c!rightmargin\relax
- \ifzeropt\scratchdimen\else\kern\scratchdimen\fi
+ \ifzeropt\d_math_matrix_margin_r\else\kern\d_math_matrix_margin_r\fi
\normalstopimath
- \egroup}
+ \egroup
+ \ifconditional\c_math_matrix_text
+ \ifcstok{\mathmatrixparameter\c!left\mathmatrixparameter\c!right}\emptytoks\else
+ \scratchdistance\dimexpr(\wd\scratchbox-\scratchwidth)/\plustwo\relax
+ \advance\d_math_matrix_margin_l\scratchdistance
+ \advance\d_math_matrix_margin_r\scratchdistance
+ \clf_shiftmatrixornaments\scratchbox
+ \fi
+ \fi
+ \ifconditional\c_math_matrix_text_b
+ \dp\scratchbox\dimexpr\dp\scratchbox+\lineheight\relax
+ \fi
+ \ifconditional\c_math_matrix_text_t
+ \ht\scratchbox\dimexpr\ht\scratchbox+\lineheight\relax
+ \fi
+ \box\scratchbox}
\definemathmatrix[matrix]
\definemathmatrix[\v!mathmatrix]
@@ -1760,7 +2013,30 @@
{\dontleavehmode
\box\b_strc_math_display}
-\protected\def\strc_math_flush_aligned_boxed
+\def\strc_math_flush_aligned_left_number_indeed
+ {\ifvoid\b_strc_formulas_number\else
+ \scratchwidth\wd\b_strc_formulas_number
+ \setbox\b_strc_formulas_number\hbox to \displaywidth{\hss\hbox{\box\b_strc_formulas_number}}%
+ \ifcase\c_strc_math_number_location\or
+ \boxxoffset\b_strc_formulas_number\dimexpr-\displaywidth+\scratchwidth\relax
+ \boxyoffset\b_strc_formulas_number-\d_strc_math_first_height
+ \htdp\b_strc_formulas_number\zeropoint
+ \box\b_strc_formulas_number % left
+ \fi
+ \fi}
+
+\def\strc_math_flush_aligned_right_number_indeed
+ {\ifvoid\b_strc_formulas_number\else
+ \scratchwidth\wd\b_strc_formulas_number
+ \setbox\b_strc_formulas_number\hbox to \displaywidth{\hss\hbox{\box\b_strc_formulas_number}}%
+ \ifcase\c_strc_math_number_location\or\else
+ \boxyoffset\b_strc_formulas_number\d_strc_math_last_depth
+ \htdp\b_strc_formulas_number\zeropoint
+ \box\b_strc_formulas_number % right
+ \fi
+ \fi}
+
+\protected\def\strc_math_flush_aligned_indeed
{\ifcase\c_strc_math_ragged_status
% align: error
\strc_math_flush_aligned_boxed_direct_yes
@@ -1769,42 +2045,33 @@
\strc_math_flush_aligned_boxed_direct_yes
\or
% align: middle
- \ifnum\c_strc_math_split_mode=\c_strc_math_line_mode
+ \ifnum\c_strc_math_split_mode=\c_strc_math_line_mode
\leftskip \zeropoint
\rightskip\zeropoint
\strc_math_flush_aligned_boxed_direct_yes
- \else
-% \dontleavehmode
-% \ifnum\c_strc_math_split_mode=\c_strc_math_wrap_mode
-% \vbox\bgroup % to be tested, maybe \vcenter
-% \fi
-% \ifvbox\b_strc_math_display\unvbox\else\box\fi\b_strc_math_display
-% \setbox\b_strc_formulas_number\hbox to \displaywidth{\hss\hbox{\box\b_strc_formulas_number}}%
-% \boxyoffset\b_strc_formulas_number\d_strc_math_last_depth % todo: use anchors instead
-% \htdp\b_strc_formulas_number\zeropoint
-% \box\b_strc_formulas_number
-% \ifnum\c_strc_math_split_mode=\c_strc_math_wrap_mode
-% \egroup
-% \fi
- \ifnum\c_strc_math_split_mode=\c_strc_math_wrap_mode
- \dontleavehmode
- \vbox\bgroup % to be tested, maybe \vcenter
- \orelse\ifhmode
- \dontleavehmode
- \box\b_strc_math_display
- \orelse\ifvbox\b_strc_math_display
- \unvbox\b_strc_math_display
- \else
- \dontleavehmode
- \box\b_strc_math_display
- \fi
- \setbox\b_strc_formulas_number\hbox to \displaywidth{\hss\hbox{\box\b_strc_formulas_number}}%
- \boxyoffset\b_strc_formulas_number\d_strc_math_last_depth % todo: use anchors instead
- \htdp\b_strc_formulas_number\zeropoint
- \box\b_strc_formulas_number
- \ifnum\c_strc_math_split_mode=\c_strc_math_wrap_mode
- \egroup
- \fi
+ \orelse\ifnum\c_strc_math_split_mode=\c_strc_math_wrap_mode
+ \dontleavehmode
+ \vbox\bgroup
+ \strc_math_flush_aligned_left_number_indeed
+ \unvbox\b_strc_math_display
+ \strc_math_flush_aligned_right_number_indeed
+ \egroup
+ \orelse\ifhmode
+ % untested
+ \dontleavehmode
+ \strc_math_flush_aligned_left_number_indeed
+ \box\b_strc_math_display
+ \strc_math_flush_aligned_right_number_indeed
+ \orelse\ifvbox\b_strc_math_display
+ \strc_math_flush_aligned_left_number_indeed
+ \unvbox\b_strc_math_display
+ \strc_math_flush_aligned_right_number_indeed
+ \else
+ % untested
+ \dontleavehmode
+ \strc_math_flush_aligned_left_number_indeed
+ \box\b_strc_math_display
+ \strc_math_flush_aligned_right_number_indeed
\fi
\or
% align: flushright
@@ -1841,14 +2108,6 @@
\nointerlineskip
\fi}
-% \protected\def\strc_math_flush_aligned_unboxed
-% {\begingroup
-% \ifvbox\b_strc_math_display\unvbox\else\box\fi\b_strc_math_display
-% \par
-% \endgroup}
-
-\let\strc_math_flush_aligned_unboxed\strc_math_flush_aligned_boxed
-
\protected\def\strc_math_flush_aligned_simple
{\ifcase\c_strc_math_ragged_status\or\or\hfill\or\hfill\fi
\box\b_strc_math_display
@@ -1857,11 +2116,10 @@
\protected\def\strc_math_flush_aligned
{\ifnum\c_strc_math_split_mode=\c_strc_math_line_mode
\strc_math_flush_aligned_simple
- % \strc_math_flush_aligned_boxed
\orelse\ifconditional\c_strc_math_indent
% in this case the already set text align is overloaded
\strc_math_setup_align_auto
- \strc_math_flush_aligned_unboxed
+ \strc_math_flush_aligned_indeed
\else
% normally we don't end up here
\strc_math_setup_spacing_aligned\mathalignmentparameter
@@ -2224,9 +2482,9 @@
\fi
\fi
\else
- \box\b_strc_formulas_number
- \hfill
- \strc_math_flush_aligned
+ % \box\b_strc_formulas_number
+ % \hfill
+ \strc_math_flush_aligned % we flush in here, otherwise wrong positioning of number (we need to unvbox)
\fi}
\def\strc_math_flush_number_right
@@ -2250,8 +2508,8 @@
\fi
\else
\strc_math_flush_aligned
- \hfill
- \box\b_strc_formulas_number
+ % \hfill
+ % \box\b_strc_formulas_number % we flush in here
\fi}
%D Some inline math tweak.
@@ -2379,6 +2637,7 @@
\global\c_math_eqalign_row\plusone
\edef\m_simplealign_distance{\mathsimplealignparameter\c!distance}%
\strc_math_setup_spacing_aligned\mathcasesparameter
+ \enablematrixalign
\halign callback \s!attr \mathnumberlocationattribute \zerocount \bgroup
\global\c_math_eqalign_column\zerocount
\global\advance\c_math_eqalign_row\zerocount
diff --git a/tex/context/base/mkxl/math-dim.lmt b/tex/context/base/mkxl/math-dim.lmt
index 0dd348184..e0730da95 100644
--- a/tex/context/base/mkxl/math-dim.lmt
+++ b/tex/context/base/mkxl/math-dim.lmt
@@ -21,86 +21,87 @@ if not modules then modules = { } end modules ['math-dim'] = {
local abs, next = math.abs, next
local defaults = {
- axis = { default = { "AxisHeight", "axisheight" }, },
- accent_base_height = { default = { "AccentBaseHeight", "xheight" }, },
- fraction_del_size = { default = { "FractionDelimiterSize", "delim2" },
- cramped_display_style = { "FractionDelimiterDisplayStyleSize", "delim1" },
- display_style = { "FractionDelimiterDisplayStyleSize", "delim1" }, },
- fraction_denom_down = { default = { "FractionDenominatorShiftDown", "denom2" },
- cramped_display_style = { "FractionDenominatorDisplayStyleShiftDown", "denom1" },
- display_style = { "FractionDenominatorDisplayStyleShiftDown", "denom1" }, },
- fraction_denom_vgap = { default = { "FractionDenominatorGapMin", "defaultrulethickness" },
- cramped_display_style = { "FractionDenominatorDisplayStyleGapMin", "3*defaultrulethickness" },
- display_style = { "FractionDenominatorDisplayStyleGapMin", "3*defaultrulethickness" }, },
- fraction_num_up = { default = { "FractionNumeratorShiftUp", "num2" },
- cramped_display_style = { "FractionNumeratorDisplayStyleShiftUp", "num1" },
- display_style = { "FractionNumeratorDisplayStyleShiftUp", "num1" }, },
- fraction_num_vgap = { default = { "FractionNumeratorGapMin", "defaultrulethickness" },
- cramped_display_style = { "FractionNumeratorDisplayStyleGapMin", "3*defaultrulethickness" },
- display_style = { "FractionNumeratorDisplayStyleGapMin", "3*defaultrulethickness" }, },
- skewed_fraction_hgap = { default = { "SkewedFractionHorizontalGap", "mathquad/2" },
- cramped_display_style = { "SkewedFractionHorizontalGap", "mathquad/2" },
- display_style = { "SkewedFractionHorizontalGap", "mathquad/2" }, },
- skewed_fraction_vgap = { default = { "SkewedFractionVerticalGap", "xheight" },
- cramped_display_style = { "SkewedFractionVerticalGap", "xheight" },
- display_style = { "SkewedFractionVerticalGap", "xheight" }, },
- fraction_rule = { default = { "FractionRuleThickness", "defaultrulethickness" }, },
- limit_above_bgap = { default = { "UpperLimitBaselineRiseMin", "bigopspacing3" }, },
- limit_above_vgap = { default = { "UpperLimitGapMin", "bigopspacing1" }, },
- limit_above_kern = { default = { "0", "bigopspacing5" }, },
- limit_below_bgap = { default = { "LowerLimitBaselineDropMin", "bigopspacing4" }, },
- limit_below_vgap = { default = { "LowerLimitGapMin", "bigopspacing2" }, },
- limit_below_kern = { default = { "0", "bigopspacing5" }, },
- math_operator_size = { default = { "DisplayOperatorMinHeight", "mathxheight*3" }, }, -- 2
- overbar_kern = { default = { "OverbarExtraAscender", "defaultrulethickness" }, },
- overbar_rule = { default = { "OverbarRuleThickness", "defaultrulethickness" }, },
- overbar_vgap = { default = { "OverbarVerticalGap", "3*defaultrulethickness" }, },
- quad = { default = { "fontsize(f)", "mathquad" }, },
- radical_kern = { default = { "RadicalExtraAscender", "defaultrulethickness" }, },
- radical_rule = { default = { "RadicalRuleThickness", "defaultrulethickness" }, },
- -- default = { "surdheight(f)", "defaultrulethickness" },
- radical_vgap = { default = { "RadicalVerticalGap", "defaultrulethickness+(abs(defaultrulethickness)/4)" },
- display_style = { "RadicalDisplayStyleVerticalGap", "defaultrulethickness+(abs(mathxheight)/4)" }, },
- space_after_script = { default = { "SpaceAfterScript", "scriptspace" }, },
- space_before_script = { default = { "SpaceAfterScript", "scriptspace" }, },
- stack_denom_down = { default = { "StackBottomShiftDown", "denom2" },
- cramped_display_style = { "StackBottomDisplayStyleShiftDown", "denom1" },
- display_style = { "StackBottomDisplayStyleShiftDown", "denom1" }, },
- stack_num_up = { default = { "StackTopShiftUp", "num3" },
- cramped_display_style = { "StackTopDisplayStyleShiftUp", "num1" },
- display_style = { "StackTopDisplayStyleShiftUp", "num1" }, },
- stack_vgap = { default = { "StackGapMin", "3*defaultrulethickness" },
- cramped_display_style = { "StackDisplayStyleGapMin", "7*defaultrulethickness" },
- display_style = { "StackDisplayStyleGapMin", "7*defaultrulethickness" }, },
- sub_shift_down = { default = { "SubscriptShiftDown", "sub1" }, },
- sub_shift_drop = { default = { "SubscriptBaselineDropMin", "subdrop" }, },
- sub_sup_shift_down = { default = { "SubscriptShiftDown", "sub2" }, },
- sub_top_max = { default = { "SubscriptTopMax", "abs(mathxheight*4)/5" }, },
- subsup_vgap = { default = { "SubSuperscriptGapMin", "4*defaultrulethickness" }, },
- sup_bottom_min = { default = { "SuperscriptBottomMin", "abs(mathxheight)/4" }, },
- sup_shift_drop = { default = { "SuperscriptBaselineDropMax", "supdrop" }, },
- sup_shift_up = { cramped_display_style = { "SuperscriptShiftUpCramped", "sup3" },
- cramped_script_script_style = { "SuperscriptShiftUpCramped", "sup3" },
- cramped_script_style = { "SuperscriptShiftUpCramped", "sup3" },
- cramped_text_style = { "SuperscriptShiftUpCramped", "sup3" },
- display_style = { "SuperscriptShiftUp", "sup1" },
- script_script_style = { "SuperscriptShiftUp", "sup2" },
- script_style = { "SuperscriptShiftUp", "sup2" },
- text_style = { "SuperscriptShiftUp", "sup2" }, },
- sup_sub_bottom_max = { default = { "SuperscriptBottomMaxWithSubscript", "abs(mathxheight*4)/5" }, },
- underbar_kern = { default = { "UnderbarExtraDescender", "0" }, },
- underbar_rule = { default = { "UnderbarRuleThickness", "defaultrulethickness" }, },
- underbar_vgap = { default = { "UnderbarVerticalGap", "3*defaultrulethickness" }, },
- connector_overlap_min = { default = { "MinConnectorOverlap", "0.25*defaultrulethickness" }, },
- over_delimiter_vgap = { default = { "StretchStackGapBelowMin", "bigopspacing1" }, },
- over_delimiter_bgap = { default = { "StretchStackTopShiftUp", "bigopspacing3" }, },
- under_delimiter_vgap = { default = { "StretchStackGapAboveMin", "bigopspacing2" }, },
- under_delimiter_bgap = { default = { "StretchStackBottomShiftDown", "bigopspacing4" }, },
- radical_degree_before = { default = { "RadicalKernBeforeDegree", "(5/18)*quad" }, },
- radical_degree_after = { default = { "RadicalKernAfterDegree", "(-10/18)*quad" }, },
- radical_degree_raise = { default = { "RadicalDegreeBottomRaisePercent", "60" }, },
- no_limit_sub_factor = { default = { "NoLimitSubFactor", "0" }, },
- no_limit_sup_factor = { default = { "NoLimitSupFactor", "0" }, },
+ axis = { default = { "AxisHeight", "axisheight" }, },
+ accent_base_height = { default = { "AccentBaseHeight", "xheight" }, },
+ flattened_accent_base_height = { default = { "FlattenedAccentBaseHeight", "xheight" }, },
+ fraction_del_size = { default = { "FractionDelimiterSize", "delim2" },
+ cramped_display_style = { "FractionDelimiterDisplayStyleSize", "delim1" },
+ display_style = { "FractionDelimiterDisplayStyleSize", "delim1" }, },
+ fraction_denom_down = { default = { "FractionDenominatorShiftDown", "denom2" },
+ cramped_display_style = { "FractionDenominatorDisplayStyleShiftDown", "denom1" },
+ display_style = { "FractionDenominatorDisplayStyleShiftDown", "denom1" }, },
+ fraction_denom_vgap = { default = { "FractionDenominatorGapMin", "defaultrulethickness" },
+ cramped_display_style = { "FractionDenominatorDisplayStyleGapMin", "3*defaultrulethickness" },
+ display_style = { "FractionDenominatorDisplayStyleGapMin", "3*defaultrulethickness" }, },
+ fraction_num_up = { default = { "FractionNumeratorShiftUp", "num2" },
+ cramped_display_style = { "FractionNumeratorDisplayStyleShiftUp", "num1" },
+ display_style = { "FractionNumeratorDisplayStyleShiftUp", "num1" }, },
+ fraction_num_vgap = { default = { "FractionNumeratorGapMin", "defaultrulethickness" },
+ cramped_display_style = { "FractionNumeratorDisplayStyleGapMin", "3*defaultrulethickness" },
+ display_style = { "FractionNumeratorDisplayStyleGapMin", "3*defaultrulethickness" }, },
+ skewed_fraction_hgap = { default = { "SkewedFractionHorizontalGap", "mathquad/2" },
+ cramped_display_style = { "SkewedFractionHorizontalGap", "mathquad/2" },
+ display_style = { "SkewedFractionHorizontalGap", "mathquad/2" }, },
+ skewed_fraction_vgap = { default = { "SkewedFractionVerticalGap", "xheight" },
+ cramped_display_style = { "SkewedFractionVerticalGap", "xheight" },
+ display_style = { "SkewedFractionVerticalGap", "xheight" }, },
+ fraction_rule = { default = { "FractionRuleThickness", "defaultrulethickness" }, },
+ limit_above_bgap = { default = { "UpperLimitBaselineRiseMin", "bigopspacing3" }, },
+ limit_above_vgap = { default = { "UpperLimitGapMin", "bigopspacing1" }, },
+ limit_above_kern = { default = { "0", "bigopspacing5" }, },
+ limit_below_bgap = { default = { "LowerLimitBaselineDropMin", "bigopspacing4" }, },
+ limit_below_vgap = { default = { "LowerLimitGapMin", "bigopspacing2" }, },
+ limit_below_kern = { default = { "0", "bigopspacing5" }, },
+ math_operator_size = { default = { "DisplayOperatorMinHeight", "mathxheight*3" }, }, -- 2
+ overbar_kern = { default = { "OverbarExtraAscender", "defaultrulethickness" }, },
+ overbar_rule = { default = { "OverbarRuleThickness", "defaultrulethickness" }, },
+ overbar_vgap = { default = { "OverbarVerticalGap", "3*defaultrulethickness" }, },
+ quad = { default = { "fontsize(f)", "mathquad" }, },
+ radical_kern = { default = { "RadicalExtraAscender", "defaultrulethickness" }, },
+ radical_rule = { default = { "RadicalRuleThickness", "defaultrulethickness" }, },
+ -- default = { "surdheight(f)", "defaultrulethickness" },
+ radical_vgap = { default = { "RadicalVerticalGap", "defaultrulethickness+(abs(defaultrulethickness)/4)" },
+ display_style = { "RadicalDisplayStyleVerticalGap", "defaultrulethickness+(abs(mathxheight)/4)" }, },
+ space_after_script = { default = { "SpaceAfterScript", "scriptspace" }, },
+ space_before_script = { default = { "SpaceAfterScript", "scriptspace" }, },
+ stack_denom_down = { default = { "StackBottomShiftDown", "denom2" },
+ cramped_display_style = { "StackBottomDisplayStyleShiftDown", "denom1" },
+ display_style = { "StackBottomDisplayStyleShiftDown", "denom1" }, },
+ stack_num_up = { default = { "StackTopShiftUp", "num3" },
+ cramped_display_style = { "StackTopDisplayStyleShiftUp", "num1" },
+ display_style = { "StackTopDisplayStyleShiftUp", "num1" }, },
+ stack_vgap = { default = { "StackGapMin", "3*defaultrulethickness" },
+ cramped_display_style = { "StackDisplayStyleGapMin", "7*defaultrulethickness" },
+ display_style = { "StackDisplayStyleGapMin", "7*defaultrulethickness" }, },
+ sub_shift_down = { default = { "SubscriptShiftDown", "sub1" }, },
+ sub_shift_drop = { default = { "SubscriptBaselineDropMin", "subdrop" }, },
+ sub_sup_shift_down = { default = { "SubscriptShiftDown", "sub2" }, },
+ sub_top_max = { default = { "SubscriptTopMax", "abs(mathxheight*4)/5" }, },
+ subsup_vgap = { default = { "SubSuperscriptGapMin", "4*defaultrulethickness" }, },
+ sup_bottom_min = { default = { "SuperscriptBottomMin", "abs(mathxheight)/4" }, },
+ sup_shift_drop = { default = { "SuperscriptBaselineDropMax", "supdrop" }, },
+ sup_shift_up = { cramped_display_style = { "SuperscriptShiftUpCramped", "sup3" },
+ cramped_script_script_style = { "SuperscriptShiftUpCramped", "sup3" },
+ cramped_script_style = { "SuperscriptShiftUpCramped", "sup3" },
+ cramped_text_style = { "SuperscriptShiftUpCramped", "sup3" },
+ display_style = { "SuperscriptShiftUp", "sup1" },
+ script_script_style = { "SuperscriptShiftUp", "sup2" },
+ script_style = { "SuperscriptShiftUp", "sup2" },
+ text_style = { "SuperscriptShiftUp", "sup2" }, },
+ sup_sub_bottom_max = { default = { "SuperscriptBottomMaxWithSubscript", "abs(mathxheight*4)/5" }, },
+ underbar_kern = { default = { "UnderbarExtraDescender", "0" }, },
+ underbar_rule = { default = { "UnderbarRuleThickness", "defaultrulethickness" }, },
+ underbar_vgap = { default = { "UnderbarVerticalGap", "3*defaultrulethickness" }, },
+ connector_overlap_min = { default = { "MinConnectorOverlap", "0.25*defaultrulethickness" }, },
+ over_delimiter_vgap = { default = { "StretchStackGapBelowMin", "bigopspacing1" }, },
+ over_delimiter_bgap = { default = { "StretchStackTopShiftUp", "bigopspacing3" }, },
+ under_delimiter_vgap = { default = { "StretchStackGapAboveMin", "bigopspacing2" }, },
+ under_delimiter_bgap = { default = { "StretchStackBottomShiftDown", "bigopspacing4" }, },
+ radical_degree_before = { default = { "RadicalKernBeforeDegree", "(5/18)*quad" }, },
+ radical_degree_after = { default = { "RadicalKernAfterDegree", "(-10/18)*quad" }, },
+ radical_degree_raise = { default = { "RadicalDegreeBottomRaisePercent", "60" }, },
+ no_limit_sub_factor = { default = { "NoLimitSubFactor", "0" }, },
+ no_limit_sup_factor = { default = { "NoLimitSupFactor", "0" }, },
}
local styles = {
@@ -129,6 +130,10 @@ end
-- mt.__index = function(t,s)
-- return t.default or t.text_style or 0
-- end
+--
+-- This will all go away in \LMTX\ becuase itv makes no sense to support old fonts any longer,
+-- even when we assemble them one really needs to think about proper values. Okay, there is
+-- some historic value in here.
function mathematics.dimensions(dimens) -- beware, dimens get spoiled
if dimens.SpaceAfterScript then
@@ -175,72 +180,70 @@ function mathematics.dimensions(dimens) -- beware, dimens get spoiled
t[variable] = tt
end
local d = {
- AccentBaseHeight = t . accent_base_height . text_style,
- AxisHeight = t . axis . text_style,
+ AccentBaseHeight = t . accent_base_height . text_style,
+ FlattenedAccentBaseHeight = t . flattened_accent_base_height . text_style,
+ AxisHeight = t . axis . text_style,
-- DelimitedSubFormulaMinHeight
- DisplayOperatorMinHeight = t . math_operator_size . text_style, -- no longer let tex decide (weird values)
- -- FlattenedAccentBaseHeight
- FractionDenominatorDisplayStyleGapMin = t . fraction_denom_vgap . display_style,
- FractionDenominatorDisplayStyleShiftDown = t . fraction_denom_down . display_style,
- FractionDenominatorGapMin = t . fraction_denom_vgap . text_style,
- FractionDenominatorShiftDown = t . fraction_denom_down . text_style,
- FractionNumeratorDisplayStyleGapMin = t . fraction_num_vgap . display_style,
- FractionNumeratorDisplayStyleShiftUp = t . fraction_num_up . display_style,
- FractionNumeratorGapMin = t . fraction_num_vgap . text_style,
- FractionNumeratorShiftUp = t . fraction_num_up . text_style,
- FractionRuleThickness = t . fraction_rule . text_style,
- FractionDelimiterSize = t . fraction_del_size . text_style,
- FractionDelimiterDisplayStyleSize = t . fraction_del_size . display_style,
- LowerLimitBaselineDropMin = t . limit_below_bgap . text_style,
- LowerLimitGapMin = t . limit_below_vgap . text_style,
+ DisplayOperatorMinHeight = t . math_operator_size . text_style, -- no longer let tex decide (weird values)
+ FractionDenominatorDisplayStyleGapMin = t . fraction_denom_vgap . display_style,
+ FractionDenominatorDisplayStyleShiftDown = t . fraction_denom_down . display_style,
+ FractionDenominatorGapMin = t . fraction_denom_vgap . text_style,
+ FractionDenominatorShiftDown = t . fraction_denom_down . text_style,
+ FractionNumeratorDisplayStyleGapMin = t . fraction_num_vgap . display_style,
+ FractionNumeratorDisplayStyleShiftUp = t . fraction_num_up . display_style,
+ FractionNumeratorGapMin = t . fraction_num_vgap . text_style,
+ FractionNumeratorShiftUp = t . fraction_num_up . text_style,
+ FractionRuleThickness = t . fraction_rule . text_style,
+ FractionDelimiterSize = t . fraction_del_size . text_style,
+ FractionDelimiterDisplayStyleSize = t . fraction_del_size . display_style,
+ LowerLimitBaselineDropMin = t . limit_below_bgap . text_style,
+ LowerLimitGapMin = t . limit_below_vgap . text_style,
-- MathLeading
- MinConnectorOverlap = t . connector_overlap_min . text_style,
- OverbarExtraAscender = t . overbar_kern . text_style,
- OverbarRuleThickness = t . overbar_rule . text_style,
- OverbarVerticalGap = t . overbar_vgap . text_style,
- RadicalDisplayStyleVerticalGap = t . radical_vgap . display_style,
- RadicalExtraAscender = t . radical_kern . text_style,
- RadicalRuleThickness = t . radical_rule . text_style,
- RadicalVerticalGap = t . radical_vgap . text_style,
- RadicalKernBeforeDegree = t . radical_degree_before . display_style,
- RadicalKernAfterDegree = t . radical_degree_after . display_style,
- RadicalDegreeBottomRaisePercent = t . radical_degree_raise . display_style,
+ MinConnectorOverlap = t . connector_overlap_min . text_style,
+ OverbarExtraAscender = t . overbar_kern . text_style,
+ OverbarRuleThickness = t . overbar_rule . text_style,
+ OverbarVerticalGap = t . overbar_vgap . text_style,
+ RadicalDisplayStyleVerticalGap = t . radical_vgap . display_style,
+ RadicalExtraAscender = t . radical_kern . text_style,
+ RadicalRuleThickness = t . radical_rule . text_style,
+ RadicalVerticalGap = t . radical_vgap . text_style,
+ RadicalKernBeforeDegree = t . radical_degree_before . display_style,
+ RadicalKernAfterDegree = t . radical_degree_after . display_style,
+ RadicalDegreeBottomRaisePercent = t . radical_degree_raise . display_style,
-- ScriptPercentScaleDown
-- ScriptScriptPercentScaleDown
-- SkewedFractionHorizontalGap
-- SkewedFractionVerticalGap
- SpaceAfterScript = t . space_after_script . text_style,
- StackBottomDisplayStyleShiftDown = t . stack_denom_down . display_style,
- StackBottomShiftDown = t . stack_denom_down . text_style,
- StackDisplayStyleGapMin = t . stack_vgap . display_style,
- StackGapMin = t . stack_vgap . text_style,
- StackTopDisplayStyleShiftUp = t . stack_num_up . display_style,
- StackTopShiftUp = t . stack_num_up . text_style,
- StretchStackGapBelowMin = t . over_delimiter_vgap . text_style,
- StretchStackTopShiftUp = t . over_delimiter_bgap . text_style,
- StretchStackGapAboveMin = t . under_delimiter_vgap . text_style,
- StretchStackBottomShiftDown = t . under_delimiter_bgap . text_style,
- SubSuperscriptGapMin = t . subsup_vgap . text_style,
- SubscriptBaselineDropMin = t . sub_shift_drop . text_style,
- SubscriptShiftDown = t . sub_shift_down . text_style,
- SubscriptShiftDownWithSuperscript = t . sub_sup_shift_down . text_style,
- SubscriptTopMax = t . sub_top_max . text_style,
- SuperscriptBaselineDropMax = t . sup_shift_drop . text_style,
- SuperscriptBottomMaxWithSubscript = t . sup_sub_bottom_max . text_style,
- SuperscriptBottomMin = t . sup_bottom_min . text_style,
- SuperscriptShiftUp = t . sup_shift_up . text_style,
- SuperscriptShiftUpCramped = t . sup_shift_up . cramped_text_style,
- UnderbarExtraDescender = t . underbar_kern . text_style,
- UnderbarRuleThickness = t . underbar_rule . text_style,
- UnderbarVerticalGap = t . underbar_vgap . text_style,
- UpperLimitBaselineRiseMin = t . limit_above_bgap . text_style,
- UpperLimitGapMin = t . limit_above_vgap . text_style,
+ SpaceAfterScript = t . space_after_script . text_style,
+ StackBottomDisplayStyleShiftDown = t . stack_denom_down . display_style,
+ StackBottomShiftDown = t . stack_denom_down . text_style,
+ StackDisplayStyleGapMin = t . stack_vgap . display_style,
+ StackGapMin = t . stack_vgap . text_style,
+ StackTopDisplayStyleShiftUp = t . stack_num_up . display_style,
+ StackTopShiftUp = t . stack_num_up . text_style,
+ StretchStackGapBelowMin = t . over_delimiter_vgap . text_style,
+ StretchStackTopShiftUp = t . over_delimiter_bgap . text_style,
+ StretchStackGapAboveMin = t . under_delimiter_vgap . text_style,
+ StretchStackBottomShiftDown = t . under_delimiter_bgap . text_style,
+ SubSuperscriptGapMin = t . subsup_vgap . text_style,
+ SubscriptBaselineDropMin = t . sub_shift_drop . text_style,
+ SubscriptShiftDown = t . sub_shift_down . text_style,
+ SubscriptShiftDownWithSuperscript = t . sub_sup_shift_down . text_style,
+ SubscriptTopMax = t . sub_top_max . text_style,
+ SuperscriptBaselineDropMax = t . sup_shift_drop . text_style,
+ SuperscriptBottomMaxWithSubscript = t . sup_sub_bottom_max . text_style,
+ SuperscriptBottomMin = t . sup_bottom_min . text_style,
+ SuperscriptShiftUp = t . sup_shift_up . text_style,
+ SuperscriptShiftUpCramped = t . sup_shift_up . cramped_text_style,
+ UnderbarExtraDescender = t . underbar_kern . text_style,
+ UnderbarRuleThickness = t . underbar_rule . text_style,
+ UnderbarVerticalGap = t . underbar_vgap . text_style,
+ UpperLimitBaselineRiseMin = t . limit_above_bgap . text_style,
+ UpperLimitGapMin = t . limit_above_vgap . text_style,
}
-
-- too fragile for tx/px ... even the same values give different results
- d.DisplayOperatorMinHeight = nil
- --
- d.AccentBaseHeight = 0 -- here? still?
+ -- d.DisplayOperatorMinHeight = nil
+ -- d.AccentBaseHeight = 0 -- here? still? or maybe undedined i.e. maxdimen
return d, t -- t only for diagnostics
else
return { }, { }
diff --git a/tex/context/base/mkxl/math-fen.mkxl b/tex/context/base/mkxl/math-fen.mkxl
index 5725c5ee1..85a28acca 100644
--- a/tex/context/base/mkxl/math-fen.mkxl
+++ b/tex/context/base/mkxl/math-fen.mkxl
@@ -15,20 +15,6 @@
\unprotect
-% ignore missign right message, so we can have left extensibles (int or so)
-%
-% \mathdelimitersmode"20 (todo: flipbit)
-
-% maybe always "method=auto" for:
-%
-% \switchtobodyfont[cambria]
-% \ruledhbox{$f(x)$}
-% \ruledhbox{\mathdelimitersmode6$f\left(x\right)$}
-% \ruledhbox{\mathdelimitersmode7$f\left(x\right)$}
-% \ruledhbox{$f\left(\frac{1}{x}\right)$}
-
-% todo: mathstyle
-
% \definemathfence [fancybracket] [bracket] [command=yes,color=blue]
%
% test $|x|$ test \par
@@ -185,6 +171,9 @@
\Uvextensible
\else
#1% \Uleft \Umiddle \Uleft
+ \ifx#1\Umiddle
+ nooverflow %
+ \fi
\fi
\orelse\ifx\p_factor\v!none
\math_fenced_common_factor_none
@@ -457,25 +446,6 @@
\fi
\math_fenced_force_size\bigmathdelimitervariant\c_math_fenced_level\relax}
-% integral experiment (but no scripts)
-%
-% \protected\def\math_fenced_fenced_simple#1%
-% {\pushmacro\currentmathfence
-% \edef\currentmathfence{#1}%
-% \math_fenced_fenced_common
-% \math_fenced_left
-% \popmacro\currentmathfence
-% \stopusemathstyleparameter}
-%
-% \immutable\protected\def\integral {\math_fenced_fenced_simple{integral}}
-%
-% let's keep this weird hack:
-%
-% \mathdelimitersmode"20
-% \startformula
-% x = \integral {\vrule height 20mm depth 18mm width 5mm}^^{2\,}__{2\,}
-% \stopformula
-
% todo: | in mathmode letter
%
% \appendtoks
@@ -814,7 +784,7 @@
\bigmathdelimitervariant\mathfenceparameter\c!alternative\relax % controls lua
\to \everysetupmathfence
-\setupmathfence[\c!alternative=1] % or 5
+\setupmathfence[\c!alternative=5] % the rest will probably go
\permanent\protected\def\choosemathbig
{\mathortext\math_choosemathbig_math\math_choosemathbig_text}
@@ -912,38 +882,45 @@
\permanent\protected\def\disableautofences
{\setfalse\c_math_fences_auto}
-\protected\def\math_fences_used_left
+\permanent\protected\def\math_fences_used_left
{\ifconditional\c_math_fences_auto
\expandafter\math_fences_auto_left
\else
\expandafter\math_fences_normal_left
\fi}
-\protected\def\math_fences_used_right
+\permanent\protected\def\math_fences_used_right
{\ifconditional\c_math_fences_auto
\expandafter\math_fences_auto_right
\else
\expandafter\math_fences_normal_right
\fi}
-\protected\def\math_fences_used_middle
+\permanent\protected\def\math_fences_used_middle
{\ifconditional\c_math_fences_auto
\expandafter\math_fences_auto_middle
\else
\expandafter\math_fences_normal_middle
\fi}
-\protected\def\math_fences_used_both
+\permanent\protected\def\math_fences_used_both
{\ifconditional\c_math_fences_auto
\expandafter\math_fences_auto_both
\else
\expandafter\math_fences_normal_both
\fi}
-\permanent\let\left \math_fences_used_left
-\permanent\let\right \math_fences_used_right
-\permanent\let\middle \math_fences_used_middle
-\permanent\let\leftorright\math_fences_used_both
+\aliased\let\left \math_fences_used_left
+\aliased\let\right \math_fences_used_right
+\aliased\let\middle \math_fences_used_middle
+\aliased\let\leftorright\math_fences_used_both
+
+% \appendtoks
+% \enforced\let\left \math_fences_used_left
+% \enforced\let\right \math_fences_used_right
+% \enforced\let\middle \math_fences_used_middle
+% \enforced\let\leftorright\math_fences_used_both
+% \to \everymathematics
% wrappers
@@ -954,30 +931,18 @@
\permanent\protected\def\stopcheckedfences
{\endgroup}
-% \appendtoks
- % maybe: safeguard against overloading
- %
- % \let\left \math_fences_used_left
- % \let\right \math_fences_used_right
- % \let\middle \math_fences_used_middle
- % \let\leftorright\math_fences_used_both
-% \to \everymathematics
-
\appendtoks
\ifempty\currentmathfence
- \doifelse{\mathfenceparameter\c!state}\v!auto\enableautofences\disableautofences
+ \ifcstok{\mathfenceparameter\c!state}\v!auto\enableautofences\else\disableautofences\fi
\fi
\to \everysetupmathfence
-\newconstant\c_math_fences_delimiters_mode \c_math_fences_delimiters_mode"16 % \numexpr"02+"04+"10\relax
-
-%permanent\protected\def\enableautofencemode {\mathdelimitersmode\plussix} % the shift (1) is too fragile
-\permanent\protected\def\enableautofencemode {\mathdelimitersmode\c_math_fences_delimiters_mode}
-\permanent\protected\def\disableautofencemode{\mathdelimitersmode\zerocount}
+\permanent\protected\def\enableautofencemode {\mathcheckfencesmode\plusone}
+\permanent\protected\def\disableautofencemode{\mathcheckfencesmode\zerocount}
\appendtoks
\ifempty\currentmathfence
- \doifelse{\mathfenceparameter\c!method}\v!auto\enableautofencemode\disableautofencemode
+ \ifcstok{\mathfenceparameter\c!method}\v!auto\enableautofencemode\else\disableautofencemode\fi
\fi
\to \everysetupmathfence
diff --git a/tex/context/base/mkxl/math-frc.mkxl b/tex/context/base/mkxl/math-frc.mkxl
index 2e16e061f..3577a6b2f 100644
--- a/tex/context/base/mkxl/math-frc.mkxl
+++ b/tex/context/base/mkxl/math-frc.mkxl
@@ -150,6 +150,12 @@
% So far for control.
+% no : \ruledhbox{\m{\frac[strut=no] {28}{8\times29}}} \par
+% tight : \ruledhbox{\m{\frac[strut=tight]{28}{8\times29}}} \par
+% yes : \ruledhbox{\m{\frac[strut=yes] {28}{8\times29}}} \par
+% math : \ruledhbox{\m{\frac[strut=math] {28}{8\times29}}} \par
+% text : \ruledhbox{\m{\frac[strut=text] {28}{8\times29}}} \par
+
\installcorenamespace{mathfractionstrut}
\def\math_frac_no_strut
@@ -170,6 +176,10 @@
{\enforced\let\m_fractions_strut_top\mathdepthstrut
\enforced\let\m_fractions_strut_bot\mathheightstrut}
+\defcsname\??mathfractionstrut\v!text\endcsname
+ {\enforced\let\m_fractions_strut_top\strut
+ \enforced\let\m_fractions_strut_bot\strut}
+
\math_frac_no_strut
\newdimen\d_math_fraction_margin
@@ -413,39 +423,46 @@
\ifempty\currentmathfraction
\edef\p_threshold{\mathfractionparameter\c!inlinethreshold}%
\ifempty\p_threshold
- \let\math_fraction_set_threshold_inline\relax
+ \let\math_fraction_set_threshold_inline\math_fraction_set_threshold_inline_auto
\orelse\ifx\p_threshold\v!auto
- \let\math_fraction_set_threshold_inline\relax
+ \let\math_fraction_set_threshold_inline\math_fraction_set_threshold_inline_auto
\else
- \let\math_fraction_set_threshold_inline\math_fraction_set_theshold_inline
+ \let\math_fraction_set_threshold_inline\math_fraction_set_threshold_inline_ratio
\fi
\edef\p_threshold{\mathfractionparameter\c!displaythreshold}%
\ifempty\p_threshold
- \let\math_fraction_set_threshold_display\relax
+ \let\math_fraction_set_threshold_display\math_fraction_set_threshold_display_auto
\orelse\ifx\p_threshold\v!auto
- \let\math_fraction_set_threshold_display\relax
+ \let\math_fraction_set_threshold_display\math_fraction_set_threshold_display_auto
\else
- \let\math_fraction_set_threshold_display\math_fraction_set_theshold_display
+ \let\math_fraction_set_threshold_display\math_fraction_set_threshold_display_ratio
\fi
\fi
\to \everysetupmathfraction
-\def\math_fraction_set_theshold_inline
+\def\math_fraction_set_threshold_inline_auto
+ {\Umathfractiondelsize\textstyle \maxdimen
+ \Umathfractiondelsize\scriptstyle \maxdimen
+ \Umathfractiondelsize\scriptscriptstyle\maxdimen}
+
+\def\math_fraction_set_threshold_display_auto
+ {\Umathfractiondelsize\displaystyle \maxdimen}
+
+\def\math_fraction_set_threshold_inline_ratio
{\edef\p_threshold{\mathfractionparameter\c!inlinethreshold}%
\Umathfractiondelsize\textstyle \p_threshold\dimexpr\textface\relax
\Umathfractiondelsize\scriptstyle \p_threshold\dimexpr\scriptface\relax
\Umathfractiondelsize\scriptscriptstyle\p_threshold\dimexpr\scriptscriptface\relax}
-\def\math_fraction_set_theshold_display
+\def\math_fraction_set_threshold_display_ratio
{\edef\p_threshold{\mathfractionparameter\c!displaythreshold}%
- \Umathfractiondelsize\displaystyle \p_threshold\dimexpr\textface\relax}
-
-%D This is a variant
+ \Umathfractiondelsize\displaystyle \p_threshold\dimexpr\textface\relax
+ \Umathfractiondelsize\displaystyle \maxdimen}
\setupmathfractions
- [%\c!inlinethreshold=.25, % no unit but fraction
- %\c!displaythreshold=.25, % no unit but fraction
- \c!threshold=.5\exheight] % wrong name, better is margin or offset or so
+ [\c!inlinethreshold=.25, % no unit but fraction
+ \c!displaythreshold=\v!auto, % no unit but fraction
+ \c!threshold=.25\exheight]
\appendtoks
\Umathskeweddelimitertolerance\allmathstyles\mathfractionparameter\c!threshold
diff --git a/tex/context/base/mkxl/math-ini.lmt b/tex/context/base/mkxl/math-ini.lmt
index 184e56672..654e29d2b 100644
--- a/tex/context/base/mkxl/math-ini.lmt
+++ b/tex/context/base/mkxl/math-ini.lmt
@@ -134,6 +134,7 @@ registerengineclass("factorial", "fac")
registerengineclass("wrapped", "wra")
registerengineclass("construct", "con")
registerengineclass("dimension", "dim")
+registerengineclass("unary", "una")
registerengineclass("textpunctuation", "tpu")
registerengineclass("unspaced")
registerengineclass("experimental")
diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl
index 19123ab8a..f5c422612 100644
--- a/tex/context/base/mkxl/math-ini.mkxl
+++ b/tex/context/base/mkxl/math-ini.mkxl
@@ -1,9 +1,9 @@
-%D \module
+ %D \module
%D [ file=math-ini,
%D version=2008.01.02,
%D title=\CONTEXT\ Math Macros,
%D subtitle=Initializations,
-%D author=Hans Hagen,
+%D author={Hans Hagen \& Mikael Sundqvist},
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
@@ -72,7 +72,7 @@
%D Basic spacing:
-\mathfencesmode \plusone % unpack
+% \mathfencesmode \plusone % gone
\delimiterfactor \plusthousand
\delimitershortfall \zeropoint
@@ -92,7 +92,7 @@
+\fractionrulemathcontrolcode % idem
+\accentskewhalfmathcontrolcode % fall back to half width skewing when no topaccent is given
+\accentskewapplymathcontrolcode % use topaccent, otherwise use skew char
- % + checkligatureandkernmathcontrolcode % old fonts
+ +\applyordinarykernpairmathcontrolcode % old fonts
+\applyverticalitalickernmathcontrolcode % best do this indeed
+\applyordinaryitalickernmathcontrolcode % best do this indeed
% +\applycharitalickernmathcontrolcode % not done
@@ -103,7 +103,7 @@
+\checktextitalickernmathcontrolcode
% +\checkspaceitalickernmathcontrolcode % old code path
+\applyscriptitalickernmathcontrolcode
- +\italicshapekernmathcontrolcode % instead of adding pre italic to the shift, inject a kern
+ % +\italicshapekernmathcontrolcode % obsolete: instead of adding pre italic to the shift, inject a kern
\relax
% \mathpenaltiesmode\plusone
@@ -172,6 +172,7 @@
\setnewconstant\mathtextpunctuationcode \mathclassvalue textpunctuation % for punctuation in text font followed by interword spacing
\setnewconstant\mathunspacedcode \mathclassvalue unspaced % for cases where we don't want spacing at all
\setnewconstant\mathexperimentalcode \mathclassvalue experimental % for MS and HH testing purposed only
+\setnewconstant\mathunarycode \mathclassvalue unary % dedicated to Alan
\setnewconstant\mathbegincode \mathclassvalue begin
\setnewconstant\mathendcode \mathclassvalue end
@@ -197,6 +198,7 @@
\copymathspacing \mathdigitcode \mathordinarycode
\copymathspacing \mathfunctioncode \mathoperatorcode
\copymathspacing \mathwrappedcode \mathfractioncode
+\copymathspacing \mathunarycode \mathordinarycode
\setnewconstant\mathlimopcode \plusone
\setnewconstant\mathnolopcode \plusone
@@ -233,6 +235,7 @@
\untraced\protected\def\mathdimension {\mathatom \s!class \mathdimensioncode }
%untraced\protected\def\mathbegin {\mathatom \s!class \mathbegincode } % dangerous
%untraced\protected\def\mathend {\mathatom \s!class \mathendcode } % dangerous
+\untraced\protected\def\mathunary {\mathatom \s!class \mathunarycode }
% obsolete
@@ -422,6 +425,17 @@
\mathgroupingmode \plusone
%mathdoublescriptmode\zerocount % -1 will give an error (as usual) .. "LLRR (left class, right class)
+%D \starttyping
+%D \startTEXpage[offset=1dk]
+%D $ 1 {\red +} 2$\par
+%D $ 1 \color[red]{+} 2$\par
+%D \mathgroupingmode0
+%D $ 1 {\red +} 2$\par
+%D $ 1 \mathbin{\red +} 2$\par
+%D $ 1 \color[red]{+} 2$\par
+%D \stopTEXpage
+%D \stoptyping
+
% $x ^^1__2 ^3_4 ^5_6 ^7_8 $
\mathdoublescriptmode
@@ -442,6 +456,7 @@
% +\closefenceclassoptioncode % at some point we want to have to have access to it at
% +\middlefenceclassoptioncode % lua end ... so we keep it (also in the engine) commented
% +\checkligatureclassoptioncode % no font provides this so it is more a compatibility feature
+ % +\checkkernpairclassoptioncode
% +\flattenclassoptioncode
% +\omitpenaltyclassoptioncode % old school check, we do pairwise instead
\relax
@@ -449,12 +464,14 @@
\setmathoptions\mathordinarycode\numexpr
\noitaliccorrectionclassoptioncode
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
+\flattenclassoptioncode
\relax
\setmathoptions\mathoperatorcode\numexpr
\defaultmathclassoptions
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
\relax
\setmathoptions\mathbinarycode\numexpr
@@ -462,6 +479,7 @@
+\lookaheadforendclassoptioncode
+\noitaliccorrectionclassoptioncode
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
+\flattenclassoptioncode
\relax
@@ -469,6 +487,7 @@
\defaultmathclassoptions
+\noitaliccorrectionclassoptioncode
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
+\flattenclassoptioncode
% +\omitpenaltyclassoptioncode
\relax
@@ -478,6 +497,7 @@
+\noitaliccorrectionclassoptioncode
% +\openfenceclassoptioncode
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
\relax
\setmathoptions\mathclosecode\numexpr
@@ -485,6 +505,8 @@
+\noitaliccorrectionclassoptioncode
% +\closefenceclassoptioncode
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
+ +\raiseprimeclassoptioncode
\relax
\setmathoptions\mathpunctuationcode\numexpr
@@ -492,6 +514,7 @@
+\noitaliccorrectionclassoptioncode
% +\checkligatureclassoptioncode
+\flattenclassoptioncode
+ +\checkkernpairclassoptioncode
\relax
\setmathoptions\mathvariablecode\numexpr
@@ -510,10 +533,17 @@
\setmathoptions\mathmiddlecode\numexpr
\noitaliccorrectionclassoptioncode
% +\middlefenceclassoptioncode
+ +\raiseprimeclassoptioncode
\relax
\setmathoptions\mathfractioncode\numexpr
\defaultmathclassoptions
+ +\raiseprimeclassoptioncode
+\relax
+
+\setmathoptions\mathradicalcode\numexpr
+ \defaultmathclassoptions
+ +\raiseprimeclassoptioncode
\relax
\setmathoptions\mathaccentcode\numexpr
@@ -533,9 +563,19 @@
\setmathoptions\mathbegincode
\nopostslackclassoptioncode
+\relax
\setmathoptions\mathendcode
\nopreslackclassoptioncode
+\relax
+
+% Fenced is only used internally as these fences become open, middle and close
+% subtypes. If we don't set the following we should actually also define the
+% spacing rules.
+
+\setmathoptions\mathfencedcode
+ \unpackclassoptioncode
+\relax
%D For now \unknown (todo: make it adapt to style but we're in text anyway)
@@ -3922,6 +3962,35 @@
\clf_traverseblock{#1}\mathtraversecommand
\popmacro\mathtraversecommand}
+%D Just some features:
+%D
+%D \starttyping
+%D $ x + \mathatom class \mathordcode {xxx} \Umathphantom + x $\par
+%D $ x + \mathatom class \mathordcode {xxx} \Umathvoid + x $\par
+%D $ x + \mathatom phantom class \mathordcode {xxx} + x $\par
+%D $ x + \mathatom void class \mathordcode {xxx} + x $\par
+%D
+%D \def\rab{\Umathchar"1"00"007C }
+%D
+%D $
+%D \color[green]{\rab\Umathadapttoright^{\black 1}_{\black 2}^^3__4}
+%D \color[blue] {\mathinner{\vrule height 30mm depth 30mm width 5mm}}
+%D \color[red] {\rab\Umathadapttoleft ^5_6^^{\black 7}__{\black 8}}
+%D $
+%D
+%D $
+%D \rab\Umathadapttoright^1_2^^3__4
+%D \mathinner{\vrule height 30mm depth 30mm width 5mm}
+%D \rab\Umathadapttoleft^5_6^^7__8
+%D $
+%D \stoptyping
+
+%D Just in case someone uses it:
+
+\appendtoks
+ \scriptspace.05\Umathquad\textstyle % for Mikael
+\to \everymathematics
+
\protect \endinput
% % not used (yet)
diff --git a/tex/context/base/mkxl/math-noa.lmt b/tex/context/base/mkxl/math-noa.lmt
index f93201459..9ba92bbc7 100644
--- a/tex/context/base/mkxl/math-noa.lmt
+++ b/tex/context/base/mkxl/math-noa.lmt
@@ -116,7 +116,6 @@ local setattrlist = nuts.setattrlist
local setwidth = nuts.setwidth
local setheight = nuts.setheight
local setdepth = nuts.setdepth
-local setoptions = nuts.setoptions
local getfield = nuts.getfield
local getnext = nuts.getnext
@@ -1960,7 +1959,6 @@ do
end
do
- -- todo: make a primes class
local fixscripts = { }
@@ -1983,7 +1981,9 @@ do
[fraction_code] = true,
}
- fixscripts[mathchar_code] = function(pointer,what,n,parent,nested) -- todo: switch to turn in on and off
+ -- [prime|sub|sup]first
+
+ fixscripts[mathchar_code] = function(pointer,what,n,parent,nested) -- todo: switch to turn it on and off
if parent then
local char = getchar(pointer)
if char and primes[char] then
@@ -1995,7 +1995,7 @@ do
local prevsub = getsub(prev)
local primesup = getsup(parent)
local primesub = getsub(parent)
- setfield(prev,"scriptorder",prevsub and 2 or 1) -- sub first
+ setfield(prev,"scriptorder",prevsub and 2 or 1) -- sub first, then prime
if primesup and not prevsup then
setsup(prev,primesup)
primesup = nil
diff --git a/tex/context/base/mkxl/math-spa.lmt b/tex/context/base/mkxl/math-spa.lmt
index 487d9e4a4..698692a2c 100644
--- a/tex/context/base/mkxl/math-spa.lmt
+++ b/tex/context/base/mkxl/math-spa.lmt
@@ -15,6 +15,7 @@ local hlist_code = nodes.nodecodes.hlist
local glue_code = nodes.nodecodes.glue
local line_code = nodes.listcodes.line
local ghost_code = nodes.listcodes.ghost
+local middle_code = nodes.listcodes.middle
local nuts = nodes.nuts
local tonut = nodes.tonut
@@ -26,12 +27,14 @@ local getnext = nuts.getnext
local getwidth = nuts.getwidth
local getdata = nuts.getdata
local getdepth = nuts.getdepth
+local getheight = nuts.getheight
local getlist = nuts.getlist
local setglue = nuts.setglue
local getdimensions = nuts.dimensions
local getnormalizedline = node.direct.getnormalizedline
local getbox = nuts.getbox
local setoffsets = nuts.setoffsets
+local addxoffset = nuts.addxoffset
local nextglue = nuts.traversers.glue
local nextlist = nuts.traversers.list
@@ -73,43 +76,60 @@ stages[1] = function(specification,stage)
end
end
+local function reposition(n,offset)
+ -- We need to relocate the local boxes that we use to push something left or
+ -- right ... quite horrible and one needs a bit twisted mindset for this.
+ for n, id, subtype, list in nextlist, getlist(n) do
+ if subtype == middle_code then
+ addxoffset(n,-offset)
+ end
+ end
+ addxoffset(n,offset)
+end
+
stages[2] = function(specification,stage)
- local head = getlist(getbox(specification.box))
- local align = specification.alignstate
- local max = false
- local cnt = 0
- local width = 0
- local depth = 0
+ local head = getlist(getbox(specification.box))
+ local align = specification.alignstate
+ local maxwidth = false
+ local cnt = 0
+ local lastwidth = 0
+ local firstheight = 0
+ local lastdepth = 0
for n, id, subtype, list in nextlist, head do
if subtype == line_code then
local t = getnormalizedline(n)
local m = t.rightskip + t.parfillrightskip
- if not max then
- max = m
- elseif m < max then
- max = m
+ if not maxwidth then
+ maxwidth = m
+ firstheight = getheight(n)
+ firstwidth = m
+ elseif m < maxwidth then
+ maxwidth = m
end
- cnt = cnt + 1
- width = m
- depth = getdepth(n)
+ cnt = cnt + 1
+ lastwidth = m
+ lastdepth = getdepth(n)
end
end
if stage == 2 and (align == 2 or align == 3) then
for n, id, subtype, list in nextlist, head do
if subtype == line_code then
if align == 1 then -- flushleft
+ -- todo
elseif align == 2 then -- middle
- setoffsets(n,max/2,0)
+ reposition(n,maxwidth/2)
elseif align == 3 then -- flushright
- setoffsets(n,max,0)
+ reposition(n,maxwidth)
end
end
end
end
texsetcount("global","c_strc_math_n_of_lines",cnt)
- texsetdimen("global","d_strc_math_max_width",max)
- texsetdimen("global","d_strc_math_last_width",width)
- texsetdimen("global","d_strc_math_last_depth",depth)
+ texsetdimen("global","d_strc_math_max_width",maxwidth)
+ texsetdimen("global","d_strc_math_first_width",firstwidth)
+ texsetdimen("global","d_strc_math_last_width",lastwidth)
+ texsetdimen("global","d_strc_math_first_height",firstheight)
+ texsetdimen("global","d_strc_math_last_depth",lastdepth)
end
stages[3] = stages[2]
diff --git a/tex/context/base/mkxl/math-twk.mkxl b/tex/context/base/mkxl/math-twk.mkxl
new file mode 100644
index 000000000..1d48cb50e
--- /dev/null
+++ b/tex/context/base/mkxl/math-twk.mkxl
@@ -0,0 +1,60 @@
+ %D \module
+%D [ file=math-ini,
+%D version=2022.07.24,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Extensions aka Tweaks,
+%D author={Hans Hagen \& Mikael Sundqvist},
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Math Macros / Tweaks}
+
+%D This file deals with some ommisions in \UNICODE\ (at least we flag them as such).
+%D Some of the definitione done elsewhere will be moved here.
+
+\unprotect
+
+% Mathematics - Hollie + Metropole Orkest (conducted by Jules Buckley) .. more than minusses
+
+% \startbuffer
+% \startTEXpage[offset=2dk]\showmakeup[mathglue]\mathspacingmode1 % \tracingmath3\tracingonline2
+% $ a + - 1 $ \quad
+% $ - 2 $ \quad
+% $ \um 3 $ \quad
+% $ a + \um 4 $ \par
+% $ \ump 3 $ \quad
+% $ a + \ump 4 $ \quad
+% $ \up 5 $ \par
+% $ a - \up 6 $ \quad
+% $ \upm 5 $ \quad
+% $ a - \upm 6 $ \quad
+% \par
+% $\textstyle - + \um \up \upm \ump $ \quad
+% $\scriptstyle - + \um \up \upm \ump $ \quad
+% $\scriptscriptstyle - + \um \up \upm \ump $ \quad
+% \stopTEXpage
+% \stopbuffer
+%
+% \setupbodyfont[bonum] \getbuffer
+% \setupbodyfont[pagella] \getbuffer
+
+\Umathchardef \unaryminus \mathunarycode \zerocount \privatecharactercode{unary minus}
+\Umathchardef \unaryplus \mathunarycode \zerocount \privatecharactercode{unary plus}
+\Umathchardef \unaryplusminus \mathunarycode \zerocount \privatecharactercode{unary plus minus}
+\Umathchardef \unaryminusplus \mathunarycode \zerocount \privatecharactercode{unary minus plus}
+
+\permanent\protected\def\um {\mathortext\unaryminus \textminus}
+\permanent\protected\def\up {\mathortext\unaryplus \textplus}
+\permanent\protected\def\upm{\mathortext\unaryplusminus\textpm}
+\permanent\protected\def\ump{\mathortext\unaryminusplus\textmp}
+
+\permanent\protected\def\una#1{\mathatom class \mathunarycode {#1}}
+\permanent\protected\def\bin#1{\mathatom class \mathbinarycode {#1}}
+\permanent\protected\def\rel#1{\mathatom class \mathrelationcode{#1}}
+\permanent\protected\def\ord#1{\mathatom class \mathordinarycode{#1}}
+
+\protect
diff --git a/tex/context/base/mkxl/math-vfu.lmt b/tex/context/base/mkxl/math-vfu.lmt
index 0540331ab..c58906a10 100644
--- a/tex/context/base/mkxl/math-vfu.lmt
+++ b/tex/context/base/mkxl/math-vfu.lmt
@@ -631,6 +631,7 @@ local function copy_glyph(main,target,original,unicode,slot)
height = olddata.height,
depth = olddata.depth,
italic = olddata.italic,
+ topaccent = olddata.topaccent,
kerns = olddata.kerns,
tounicode = olddata.tounicode,
commands = { { "slot", slot, unicode } },
@@ -644,6 +645,8 @@ local function copy_glyph(main,target,original,unicode,slot)
width = oldnextdata.width,
height = oldnextdata.height,
depth = oldnextdata.depth,
+ italic = oldnextdata.italic,
+ topaccent = oldnextdata.topaccent,
tounicode = olddata.tounicode,
commands = { { "slot", slot, nextglyph } },
}
diff --git a/tex/context/base/mkxl/meta-ini.mkxl b/tex/context/base/mkxl/meta-ini.mkxl
index 700191ef8..55a0d8043 100644
--- a/tex/context/base/mkxl/meta-ini.mkxl
+++ b/tex/context/base/mkxl/meta-ini.mkxl
@@ -1273,8 +1273,8 @@
%D Goody for preventing overflows:
-%frozen\def\MPdivten[#1]{\withoutpt\the\dimexpr#1pt/10\relax}
-\permanent\def\MPdivten[#1]{\thewithoutunit\dimexpr#1pt/10\relax}
+% frozen\def\MPdivten[#1]{\toscaled\dimexpr#1pt/10\relax}
+\permanent\def\MPdivten[#1]{\toscaled\dimexpr#1pt/10\relax}
%D There is no way to distinguish the black color that you get when you issue a
%D \type {draw} without color specification from a color that has an explicit black
diff --git a/tex/context/base/mkxl/mlib-fio.lmt b/tex/context/base/mkxl/mlib-fio.lmt
index 7bb6c0e9b..e4db28cea 100644
--- a/tex/context/base/mkxl/mlib-fio.lmt
+++ b/tex/context/base/mkxl/mlib-fio.lmt
@@ -85,13 +85,37 @@ local function findmpfile(name,ftype)
return nil
end
+-- variant 1
+
+-- finders.file = function(specification,name,mode,kind)
+-- if mode == "r" then
+-- return findmpfile(name,kind)
+-- elseif file.is_writable(name) then
+-- return name
+-- else
+-- return nil
+-- end
+-- end
+
+-- variant 2
+
+-- finders.file = function(specification,name,mode,kind)
+-- if not mode or mode == "r" then
+-- return findmpfile(name,kind)
+-- elseif file.is_writable(name) then
+-- return name
+-- else
+-- return nil
+-- end
+-- end
+
+-- variant 3
+
finders.file = function(specification,name,mode,kind)
- if mode == "r" then
- return findmpfile(name,kind)
- elseif file.is_writable(name) then
- return name
+ if mode == "w" then
+ return file.is_writable(name) and name or nil
else
- return nil
+ return findmpfile(name,kind) or nil
end
end
diff --git a/tex/context/base/mkxl/mlib-int.lmt b/tex/context/base/mkxl/mlib-int.lmt
index ace2fee17..7a094dbfd 100644
--- a/tex/context/base/mkxl/mlib-int.lmt
+++ b/tex/context/base/mkxl/mlib-int.lmt
@@ -111,7 +111,7 @@ registerdirect("PaperBleed", function() return getdimen("paperbleed")
registerdirect("RealPageNumber", function() return getcount("realpageno") end)
registerdirect("LastPageNumber", function() return getcount("lastpageno") end)
-registerdirect("PageNumber", function() return getcount("pageno") end)
+registerdirect("PageNumber", function() return getcount("userpageno") end)
registerdirect("NOfPages", function() return getcount("lastpageno") end)
registerdirect("SubPageNumber", function() return getcount("subpageno") end)
@@ -128,10 +128,6 @@ registerdirect("TopSkip", function() return get ("topskip",true
registerdirect("StrutHeight", function() return getdimen("strutht") * factor end)
registerdirect("StrutDepth", function() return getdimen("strutdp") * factor end)
-registerdirect("PageNumber", function() return getcount("pageno") end)
-registerdirect("RealPageNumber", function() return getcount("realpageno") end)
-registerdirect("NOfPages", function() return getcount("lastpageno") end)
-
registerdirect("CurrentWidth", function() return get ("hsize") * factor end)
registerdirect("CurrentHeight", function() return get ("vsize") * factor end)
diff --git a/tex/context/base/mkxl/mlib-pps.lmt b/tex/context/base/mkxl/mlib-pps.lmt
index 3cb26d044..fbb507a3f 100644
--- a/tex/context/base/mkxl/mlib-pps.lmt
+++ b/tex/context/base/mkxl/mlib-pps.lmt
@@ -14,7 +14,6 @@ local insert, remove, concat = table.insert, table.remove, table.concat
local Cs, Cf, C, Cg, Ct, P, S, V, Carg = lpeg.Cs, lpeg.Cf, lpeg.C, lpeg.Cg, lpeg.Ct, lpeg.P, lpeg.S, lpeg.V, lpeg.Carg
local lpegmatch, tsplitat, tsplitter = lpeg.match, lpeg.tsplitat, lpeg.tsplitter
local formatters, toboolean = string.formatters, string.toboolean
-local exists, savedata = io.exists, io.savedata
local stepper = utilities.parsers.stepper
local mplib = mplib
diff --git a/tex/context/base/mkxl/mlib-scn.lmt b/tex/context/base/mkxl/mlib-scn.lmt
index 0ed211dd3..ed56e113d 100644
--- a/tex/context/base/mkxl/mlib-scn.lmt
+++ b/tex/context/base/mkxl/mlib-scn.lmt
@@ -28,7 +28,7 @@ if not modules then modules = { } end modules ['mlib-scn'] = {
local type, next, rawget, getmetatable, tonumber = type, next, rawget, getmetatable, tonumber
local byte, gmatch = string.byte, string.gmatch
-local insert, remove = table.insert, table.remove
+local insert, remove, combine = table.insert, table.remove, table.combine
local mplib = mplib
local metapost = metapost
@@ -291,6 +291,27 @@ local function getparameters()
namespaces[namespace] = parameters
end
+local function mergeparameters()
+ local namespace = scanstring()
+ local parameters = get_parameters()
+ local target = namespaces[namespace]
+ if target then
+ combine(target,parameters)
+ else
+ -- same as below
+ local presets = presets[namespace]
+ local passed = passed[namespace]
+ if passed then
+ if presets then
+ setmetatableindex(passed,presets)
+ end
+ setmetatableindex(parameters,passed)
+ elseif presets then
+ setmetatableindex(parameters,presets)
+ end
+ end
+end
+
local function applyparameters()
local saved = namespaces
local namespace = scanstring()
@@ -755,6 +776,7 @@ local registertokens = metapost.registertokens
registerdirect("getparameters", getparameters) -- nothing
registertokens("applyparameters", applyparameters) -- action : todo "token"
+registerdirect("mergeparameters", mergeparameters) -- nothing
registerdirect("presetparameters", presetparameters) -- nothing
registerdirect("hasparameter", hasparameter) -- boolean
registerdirect("hasoption", hasoption) -- boolean
diff --git a/tex/context/base/mkxl/node-ali.lmt b/tex/context/base/mkxl/node-ali.lmt
index ca3c97536..9209a520b 100644
--- a/tex/context/base/mkxl/node-ali.lmt
+++ b/tex/context/base/mkxl/node-ali.lmt
@@ -20,6 +20,7 @@ local getattr = nuts.getattr
local setnext = nuts.setnext
local getnext = nuts.getnext
local getprev = nuts.getprev
+local getboth = nuts.getboth
local setglue = nuts.setglue
local getglue = nuts.getglue
local setglue = nuts.setglue
@@ -55,6 +56,7 @@ local nextglue = traversers.glue
local nextboundary = traversers.boundary
local nextnode = traversers.node
local nextlist = traversers.list
+local nextrule = traversers.rule
local nodecodes = nodes.nodecodes
local glyph_code = nodecodes.glyph
@@ -63,6 +65,7 @@ local kern_code = nodecodes.kern
local disc_code = nodecodes.disc
local unset_code = nodecodes.unset
local alignrecord_code = nodecodes.alignrecord
+local rule_code = nodecodes.rule
local spaceskip_code = nodes.gluecodes.spaceskip
local xspaceskip_code = nodes.gluecodes.xspaceskip
@@ -310,7 +313,7 @@ interfaces.implement {
end,
}
--- Let's put it here (for now):
+-- Let's put it here (for now) (some locals above) .. will be cleaned up!
do
@@ -331,6 +334,7 @@ do
local alignrecord_code = nodecodes.alignrecord
local hlist_code = nodecodes.hlist
local unset_code = nodecodes.unset
+ -- local rule_code = nodecodes.rule
local nextnode = nuts.traversers.node
@@ -596,6 +600,8 @@ deltas = { }
openup({ inbetween = inbetween }, head)
end
+ -- This will become a bit more pluggable so that we have less checking.
+
-- maybe zero pass: preamble pass
function nodes.handlers.fixmathalign(head,where,attr,preamble)
@@ -609,10 +615,236 @@ deltas = { }
if signal == 0x40 then
second_pass(head,attr,preamble)
end
- -- maybe also signal
- third_pass(head,attr,preamble)
+ if signal then
+ third_pass(head,attr,preamble)
+ end
+ end
+ end
+
+ --
+
+do
+
+ local a_mathalignmentvrule = attributes.private("mathalignmentvrule")
+
+ local function first_pass(head,attr,preamble)
+ for row, id, subtype, list in nextlist, head do
+ if id == hlist_code and subtype == row_code then
+ for cell, id, subtype, list in nextlist, list do
+ if list then
+ for n, id, subtype in nextrule, list do
+ local signal = getattr(n,a_mathalignmentvrule)
+ if signal then
+ local prv, nxt = getboth(row)
+ if prv then
+ if getid(prv) ~= rule_code or not getattr(prv,a_mathalignmentvrule) then
+ prv = nil
+ end
+ end
+ if nxt then
+ if getid(nxt) ~= rule_code or not getattr(nxt,a_mathalignmentvrule) then
+ nxt = nil
+ end
+ end
+ setoffsets(n,nil,nil,not prv and 0 or nil,not nxt and 0 or nil)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ function nodes.handlers.mathmatrixrules(head,where,attr,preamble)
+ if where == "wrapup" then
+ local signal = getattr(attr,a_mathalignmentvrule)
+ if signal == 1 then -- matrix
+ first_pass(head,attr,preamble)
+ end
end
end
+
+ local enabled = false
+
+ interfaces.implement {
+ name = "enablematrixrules",
+ -- onlyonce = true,
+ public = true,
+ protected = true,
+ actions = function()
+ if not enabled then
+ nodes.tasks.enableaction("alignments", "nodes.handlers.mathmatrixrules")
+ enabled = true
+ end
+ end,
+ }
+
+end
+
+ --
+
+ local a_ornament = attributes.system("mathmatrixornament")
+
+ local leftornament = tex.boundaries.system("c_math_matrix_ornament_l")
+ local rightornament = tex.boundaries.system("c_math_matrix_ornament_r")
+ local topornament = tex.boundaries.system("c_math_matrix_ornament_t")
+ local bottomornament = tex.boundaries.system("c_math_matrix_ornament_b")
+
+ local left = 0
+ local right = 0
+ local nofcells = 0
+ local found = false
+
+ local lefts = false
+ local rights = false
+ local tops = false
+ local bottoms = false
+
+ local function first_pass(head,attr,preamble)
+ nofcells = 0
+ left = 0
+ right = 0
+ found = false
+ lefts = { }
+ rights = { }
+ tops = { }
+ bottoms = { }
+ for n in nextrecord, preamble do
+ nofcells = nofcells + 1
+ end
+ local cells = { }
+ for row in nextunset, head do
+ local c = 0
+ for cell in nextunset, getlist(row) do
+ local list = getlist(cell)
+ c = c + 1
+ for bound in nextboundary, list do
+ local ornament = getdata(bound)
+ if ornament == leftornament then
+ if c == 1 then
+ local w = getwidth(cell)
+ if w > left then
+ left = w
+ end
+ setwidth(cell,0)
+ cells[c+1] = true
+ cells[c] = true
+ found = true
+ lefts[#lefts+1] = cell
+ end
+ elseif ornament == rightornament then
+ if c == nofcells then
+ local w = getwidth(cell)
+ if w > right then
+ right = w
+ end
+ setwidth(cell,0)
+ cells[c-1] = true
+ cells[c] = true
+ found = true
+ rights[#rights+1] = cell
+ end
+ elseif ornament == topornament then
+ setheight(row,0)
+ setdepth(row,0)
+ found = true
+ tops[#tops+1] = cell
+ elseif ornament == bottomornament then
+ setheight(row,0)
+ setdepth(row,0)
+ found = true
+ bottoms[#bottoms+1] = cell
+ end
+ end
+ end
+ end
+ if next(cells) then
+ local c = 0
+ for n in nextrecord, preamble do
+ c = c + 1
+ if cells[c] then
+ setwidth(n)
+ end
+ end
+ end
+ end
+
+ local function second_pass(box)
+ if found then
+ local head = getlist(nuts.getbox(box))
+ local leftmargin = texgetdimen("d_math_matrix_margin_l")
+ local rightmargin = texgetdimen("d_math_matrix_margin_r")
+ local topmargin = texgetdimen("d_math_matrix_margin_t")
+ local bottommargin = texgetdimen("d_math_matrix_margin_b")
+ for i=1,#lefts do
+ setoffsets(lefts[i],-(left+leftmargin),0)
+ end
+ for i=1,#rights do
+ setoffsets(rights[i], (rightmargin),0)
+ end
+ for i=1,#tops do
+ setoffsets(tops[i],0,topmargin)
+ end
+ for i=1,#bottoms do
+ setoffsets(bottoms[i],0,-bottommargin)
+ end
+ lefts = false
+ rights = false
+ tops = false
+ bottoms = false
+ end
+ end
+
+ function nodes.handlers.mathmatrixornaments(head,where,attr,preamble)
+ if where == "preroll" then
+ local signal = getattr(attr,a_ornament)
+ if signal == 0x10 then
+ first_pass(head,attr,preamble)
+ end
+ -- elseif where == "wrapup" then
+ -- local signal = getattr(attr,a_ornament)
+ -- if signal == 0x10 then
+ -- second_pass(head,attr,preamble)
+ -- end
+ end
+ end
+
+ interfaces.implement {
+ name = "shiftmatrixornaments",
+ actions = second_pass,
+ arguments = "integer",
+ }
+
+ local enabled = false
+
+ interfaces.implement {
+ name = "enablematrixalign",
+ -- onlyonce = true,
+ public = true,
+ protected = true,
+ actions = function()
+ if not enabled then
+ nodes.tasks.enableaction("alignments", "nodes.handlers.fixmathalign")
+ enabled = true
+ end
+ end,
+ }
+
+ local enabled = false
+
+ interfaces.implement {
+ name = "enablematrixornaments",
+ -- onlyonce = true,
+ public = true,
+ protected = true,
+ actions = function()
+ if not enabled then
+ nodes.tasks.enableaction("alignments", "nodes.handlers.mathmatrixornaments")
+ enabled = true
+ end
+ end,
+ }
+
end
local report = logs.reporter("alignment","preamble")
diff --git a/tex/context/base/mkxl/strc-blk.mkxl b/tex/context/base/mkxl/strc-blk.mkxl
index 6b1daa0cc..97ae671f1 100644
--- a/tex/context/base/mkxl/strc-blk.mkxl
+++ b/tex/context/base/mkxl/strc-blk.mkxl
@@ -34,8 +34,8 @@
\appendtoks
\clf_definestructureblock{\currentblock}%
- \frozen\setuevalue{\e!begin\currentblock}{\strc_blocks_begin{\currentblock}}%
- \frozen\letvalue {\e!end \currentblock}\donothing
+ \frozen\protected\edefcsname\e!begin\currentblock\endcsname{\strc_blocks_begin{\currentblock}}%
+ \frozen \letcsname \e!end \currentblock\endcsname\donothing
\to \everydefineblock
% We need to prevent too much lookahead which will gobble newlines that are needed
@@ -73,6 +73,30 @@
{\clf_savestructureblock{\m_block}{\m_subblock}{#1}{\??block}}%
\plusone}
+% \tolerant\protected\def\strc_blocks_begin#1#*[#2]#*[#3]% #:#/% get rid of spaces and pars
+% {\edef\m_block{#1}%
+% \let\m_subblock\empty
+% \ifhastok={#2}%
+% \expandafter\strc_blocks_begin_a % [settings]
+% \orelse\ifparameter#2\or
+% \expandafter\strc_blocks_begin_b % [tag] [settings]
+% \else
+% \expandafter\strc_blocks_begin_c %
+% \fi{#2}{#3}}% #4}
+%
+% \protected\def\strc_blocks_begin_a#1#2% settings dummy
+% {\normalexpanded{\buff_pickup{\??block}{\e!begin\m_block}{\e!end\m_block}}%
+% {}%
+% {\clf_savestructureblock{\m_block}{\m_subblock}{#1}{\??block}}%
+% \plusone}
+%
+% \protected\def\strc_blocks_begin_b#1#2% tag settings
+% {\edef\m_subblock{#1}%
+% \strc_blocks_begin_a{#2}{}}
+%
+% \protected\def\strc_blocks_begin_c#1#2%
+% {\strc_blocks_begin_a{}{}}
+
\let\strc_blocks_setup\relax
\newconstant \c_strc_blocks_index
@@ -145,11 +169,11 @@
\ifhastok={#3}%
\getparameters[\??blocktemp][\c!criterium=\v!text,#3]%
\def\strc_blocks_setup{\setupcurrentblock[#3]}%
- \clf_selectstructureblock{#1}{#2}{}{\csname\??blocktemp\c!criterium\endcsname}%
+ \clf_selectstructureblock{#1}{#2}{}{\begincsname\??blocktemp\c!criterium\endcsname}%
\else
\getparameters[\??blocktemp][\c!criterium=\v!text,#4]%
\def\strc_blocks_setup{\setupcurrentblock[#4]}%
- \clf_selectstructureblock{#1}{#2}{#3}{\csname\??blocktemp\c!criterium\endcsname}%
+ \clf_selectstructureblock{#1}{#2}{#3}{\begincsname\??blocktemp\c!criterium\endcsname}%
\fi
\endgroup}
diff --git a/tex/context/base/mkxl/strc-mat.mkxl b/tex/context/base/mkxl/strc-mat.mkxl
index 7e03624dc..0aabc64a0 100644
--- a/tex/context/base/mkxl/strc-mat.mkxl
+++ b/tex/context/base/mkxl/strc-mat.mkxl
@@ -362,8 +362,10 @@
\protected\def\strc_formulas_place_current_number
{\ifempty\namedformulaentry
- \labeltexts\currentformula{\convertedcounter[\v!formula][]}%
+ \begingroup
\strc_formulas_handle_current_references
+ \labeltexts\currentformula{\convertedcounter[\v!formula][]}%
+ \endgroup
\else
\expandafter % hm, the next one reset \namedformulaentry
\strc_formulas_handle_current_references
@@ -1061,48 +1063,144 @@
%
% \blank[line] \ruledhbox{zzzz} \blank[line]
+% \tolerant\protected\def\strc_math_text_here[#1]#:#*#=%
+% {\ifparameter#2\or
+% \ifnum\lastboundary=\c_math_begin_boundary\else
+% \ifcstok{#1}\v!right\else
+% \strc_math_break_here
+% \fi
+% \fi
+% \vadjust
+% \ifcstok{#1}\v!before
+% pre
+% \orelse\ifcstok{#1}\v!left
+% pre
+% baseline
+% depth before -\thousandpoint
+% \orelse\ifcstok{#1}\v!right
+% post
+% baseline
+% \fi
+% \bgroup
+% \hbox to \displaywidth \bgroup
+% \strut
+% \ifcstok{#1}\v!right
+% \hfill#2%
+% \else
+% #2\hss
+% \fi
+% \strut
+% \egroup
+% \egroup
+% \ifcstok{#1}\v!right
+% \strc_math_break_here
+% \else
+% % \mathatom class \mathexplicitcode{}%
+% \strc_math_pickup_again
+% \fi
+% \orelse\ifcstok{#1}\v!page
+% \strc_math_page_here
+% \orelse\ifcstok{#1}\v!samepage
+% \strc_math_same_here
+% \else
+% \strc_math_break_here
+% \fi}
+
+\definelocalboxes
+ [\v!lefttext]
+ [\c!command=\localmarginlefttext\zeropoint,
+ \c!repeat=\v!no,
+ \c!distance=\zeropoint,
+ \c!location=\v!middle]
+
+\definelocalboxes
+ [\v!righttext]
+ [\c!command=\localmarginrighttext\zeropoint,
+ \c!repeat=\v!no,
+ \c!distance=\zeropoint,
+ \c!location=\v!middle]
+
+\installcorenamespace{mathtexthere}
+\installcorenamespace{mathbreakhere}
+
+\def\strc_math_text_here_right#1%
+ {\localbox[\v!righttext]{\llap{#1}}}
+
+\def\strc_math_text_here_left#1%
+ {\localbox[\v!lefttext]{\rlap{#1}}}
+
+\def\strc_math_text_here_before#1%
+ {\vadjust pre \bgroup
+ \hbox to \displaywidth \bgroup
+ \strut
+ #1\hss
+ \strut
+ \egroup
+ \egroup}
+
+\def\strc_math_text_here_after#1%
+ {\vadjust \bgroup
+ \hbox to \displaywidth \bgroup
+ \strut
+ #1\hss
+ \strut
+ \egroup
+ \egroup}
+
+\letcsname\??mathtexthere\v!left \endcsname\strc_math_text_here_left
+\letcsname\??mathtexthere\v!right \endcsname\strc_math_text_here_right
+\letcsname\??mathtexthere\v!before\endcsname\strc_math_text_here_before
+\letcsname\??mathtexthere\v!after \endcsname\strc_math_text_here_after
+
+\defcsname\??mathbreakhere\v!left\endcsname#1%
+ {\ifnum\lastboundary=\c_math_begin_boundary\else
+ \strc_math_line_here
+ \fi
+ \strc_math_text_here_left{#1}%
+ \strc_math_pickup_again}
+
+\defcsname\??mathbreakhere\v!right\endcsname#1%
+ {\strc_math_text_here_right{#1}%
+ \strc_math_line_here
+ \strc_math_pickup_again}
+
+\defcsname\??mathbreakhere\v!before\endcsname#1%
+ {\ifnum\lastboundary=\c_math_begin_boundary\else
+ \strc_math_line_here
+ \fi
+ \strc_math_text_here_before{#1}%
+ \strc_math_pickup_again}
+
+\defcsname\??mathbreakhere\v!after\endcsname#1%
+ {\ifnum\lastboundary=\c_math_begin_boundary\else
+ \strc_math_line_here
+ \fi
+ \strc_math_text_here_after{#1}%
+ \strc_math_pickup_again}
+
+\tolerant\protected\def\strc_math_break_here[#1]#:#*#=%
+ {\ifparameter#2\or
+ \ifcsname\??mathbreakhere#1\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \csname\??mathbreakhere\v!after\expandafter\endcsname
+ \fi{#2}%
+ \orelse\ifcstok{#1}\v!page
+ \strc_math_page_here
+ \orelse\ifcstok{#1}\v!samepage
+ \strc_math_same_here
+ \else
+ \strc_math_line_here
+ \fi}
+
\tolerant\protected\def\strc_math_text_here[#1]#:#*#=%
{\ifparameter#2\or
- \ifnum\lastboundary=\c_math_begin_boundary\else
- \ifcstok{#1}\v!right\else
- \strc_math_break_here
- \fi
- \fi
- \vadjust
- \ifcstok{#1}\v!before
- pre
- \orelse\ifcstok{#1}\v!left
- pre
- baseline
- depth before -\thousandpoint
- \orelse\ifcstok{#1}\v!right
- post
- baseline
- \fi
- \bgroup
- \hbox to \displaywidth \bgroup
- \strut
- \ifcstok{#1}\v!right
- \hfill#2%
- \else
- #2\hss
- \fi
- \strut
- \egroup
- \egroup
- \ifcstok{#1}\v!right
- \strc_math_break_here
- \else
- % \mathatom class \mathexplicitcode{}%
- \strc_math_pickup_again
- \fi
- \orelse\ifcstok{#1}\v!page
- \strc_math_page_here
- \orelse\ifcstok{#1}\v!samepage
- \strc_math_same_here
- \else
- \strc_math_break_here
- \fi}
+ \ifcsname\??mathtexthere#1\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \csname\??mathtexthere\v!after\expandafter\endcsname
+ \fi{#2}%
+ \fi}
\protected\def\strc_math_page_here
{\ifmmode
@@ -1124,7 +1222,7 @@
\strc_math_pickup_again
\fi}
-\protected\def\strc_math_break_here
+\protected\def\strc_math_line_here
{\ifmmode
\ifconditional\c_strc_math_trace_hang
\strc_math_trace_okay{darkgreen}{B}%
@@ -1134,16 +1232,16 @@
\fi}
\ifdefined\alignhere \else \aliased\let\alignhere\relax \fi
-%ifdefined\texthere \else \aliased\let\texthere \relax \fi
+\ifdefined\texthere \else \aliased\let\texthere \relax \fi
\ifdefined\skiphere \else \aliased\let\skiphere \relax \fi
\ifdefined\breakhere \else \aliased\let\breakhere\relax \fi
\appendtoks % must move to alignment
\enforced\let\alignhere\strc_math_align_here
- \enforced\let\breakhere\strc_math_text_here
+ \enforced\let\breakhere\strc_math_break_here
\enforced\let\skiphere \strc_math_skip_here
- %enforced\let\texthere \strc_math_text_here
-% \global\setfalse\c_strc_math_aligned_here
+ \enforced\let\texthere \strc_math_text_here
+ % \global\setfalse\c_strc_math_aligned_here
\to \everymathematics
\installcorenamespace{mathtextalign}
@@ -1180,7 +1278,11 @@
{\raggedslanted
%\mathgluemode\plustwo
\c_strc_math_ragged_status\plustwo
- \parfillrightskip\wd\b_strc_formulas_number % should normally fit
+ \ifcase\c_strc_math_number_location\or
+ \parinitleftskip\wd\b_strc_formulas_number % should normally fit
+ \else
+ \parfillrightskip\wd\b_strc_formulas_number % should normally fit
+ \fi
\updateparagraphproperties} % not needed
\def\strc_math_setup_align
@@ -1245,15 +1347,19 @@
\newcount\c_strc_math_n_of_lines
\newdimen\d_strc_math_max_width
+\newdimen\d_strc_math_first_width
\newdimen\d_strc_math_last_width
+\newdimen\d_strc_math_first_height
\newdimen\d_strc_math_last_depth
\appendtoks
- \global\d_strc_math_indent \zeropoint
- \global\c_strc_math_n_of_lines\zerocount
- \global\d_strc_math_max_width \zeropoint
- \global\d_strc_math_last_width\zeropoint
- \global\d_strc_math_last_depth\zeropoint
+ \global\d_strc_math_indent \zeropoint
+ \global\c_strc_math_n_of_lines \zerocount
+ \global\d_strc_math_max_width \zeropoint
+ \global\d_strc_math_first_width \zeropoint
+ \global\d_strc_math_first_height\zeropoint
+ \global\d_strc_math_last_width \zeropoint
+ \global\d_strc_math_last_depth \zeropoint
\to \everyresetformulas
\newbox\b_strc_math_display % most code is in math-ali (for historical reasons)
@@ -1502,9 +1608,9 @@
\permanent\protected\def\stopdisplaymath
{\endgroup % less interference with upcoming a \over b
- \ifhmode
+% \ifrelax\strc_formulas_begstrut\else
\strc_formulas_endstrut
- \fi
+% \fi
\stopinnermath
\afterdisplayspace
\egroup}
diff --git a/tex/context/base/mkxl/supp-box.mkxl b/tex/context/base/mkxl/supp-box.mkxl
index 21d810671..5a45396d1 100644
--- a/tex/context/base/mkxl/supp-box.mkxl
+++ b/tex/context/base/mkxl/supp-box.mkxl
@@ -1688,7 +1688,7 @@
% \fi
% \divide\scratchdimen \hsize
% \multiply\scratchdimen 64
-% \xdef\vboxtohboxfactor{\withoutpt\the\scratchdimen}%
+% \xdef\vboxtohboxfactor{\toscaled\scratchdimen}%
% \egroup}
%
% \protected\def\startvboxtohbox
diff --git a/tex/context/base/mkxl/syst-aux.mkxl b/tex/context/base/mkxl/syst-aux.mkxl
index ced19dcd2..018a95eb2 100644
--- a/tex/context/base/mkxl/syst-aux.mkxl
+++ b/tex/context/base/mkxl/syst-aux.mkxl
@@ -4971,7 +4971,9 @@
% that \TEX\ was written, it made no sense to add a lot of that. After decades we know
% what extras we need.
-\permanent\def\withoutpt#1{\thewithoutunit\dimexpr#1} % best use the primitive directly
+% \permanent\def\withoutpt#1{\thewithoutunit\dimexpr#1}
+
+\aliased\let\withoutpt\toscaled
%D The capitals are needed because \type {p} and \type {t} have catcode~12, while
%D macronames only permit tokens with the catcode~11. As a result we cannot use the
@@ -4979,10 +4981,9 @@
%D manipulations, we advice to study the \TEX book in detail. Because this macro
%D does not do any assignment, we can use it in the following way too.
-% \def\PtToCm#1%
-% {\withoutpt\the\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
+% \permanent\def\PtToCm#1{\thewithoutunit\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
-\permanent\def\PtToCm#1{\thewithoutunit\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
+\permanent\def\PtToCm#1{\toscaled\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
%D We also support:
%D
@@ -5627,11 +5628,9 @@
%D \PointsToReal {dimension} \target
%D \stoptyping
-% \protected\def\PointsToReal#1#2%
-% {\edef#2{\withoutpt\the\dimexpr#1}}
+% \permanent\protected\def\PointsToReal#1#2{\edef#2{\thewithoutunit\dimexpr#1}}
-\permanent\protected\def\PointsToReal#1#2%
- {\edef#2{\thewithoutunit\dimexpr#1}}
+\permanent\protected\def\PointsToReal#1#2{\edef#2{\toscaled#1}}
%D \macros
%D {dontleavehmode}
diff --git a/tex/context/base/mkxl/syst-ini.mkxl b/tex/context/base/mkxl/syst-ini.mkxl
index d94579548..ce2f50942 100644
--- a/tex/context/base/mkxl/syst-ini.mkxl
+++ b/tex/context/base/mkxl/syst-ini.mkxl
@@ -1256,10 +1256,9 @@
\immutable\integerdef\eTeXversion 2
\immutable\def \eTeXrevision {2}
-%D Just in case users use this (or some styles still have it):
+% %D Just in case users use this (or some styles still have it):
-\aliased\let\immediateassignment\immediate
-\aliased\let\immediateassigned \localcontrolled
+\aliased\let\immediateassigned\localcontrolled
%D Needed (maybe no longer the multiple next ones):
diff --git a/tex/context/base/mkxl/syst-mac.lmt b/tex/context/base/mkxl/syst-mac.lmt
index 74502f4ee..bd1d8476f 100644
--- a/tex/context/base/mkxl/syst-mac.lmt
+++ b/tex/context/base/mkxl/syst-mac.lmt
@@ -110,7 +110,7 @@ implement {
arguments = "3 strings",
actions = function(start,stop,command)
gobbletoken(createtoken(start),createtoken(stop))
- if command then
+ if command and command ~= "" then
context[command]()
end
end
diff --git a/tex/context/base/mkxl/tabl-tab.mkxl b/tex/context/base/mkxl/tabl-tab.mkxl
index d8a71943c..ad9bfdd45 100644
--- a/tex/context/base/mkxl/tabl-tab.mkxl
+++ b/tex/context/base/mkxl/tabl-tab.mkxl
@@ -1027,8 +1027,8 @@
\def\tabl_table_Right #1{\hfill#1}
\def\tabl_table_OpenUp#1#2%
- {\edef\tablestrutheightfactor{\withoutpt\the\dimexpr\tablestrutheightfactor\points+#1\points}%
- \edef\tablestrutdepthfactor {\withoutpt\the\dimexpr\tablestrutdepthfactor \points+#2\points}}
+ {\edef\tablestrutheightfactor{\toscaled\dimexpr\tablestrutheightfactor\points+#1\points}%
+ \edef\tablestrutdepthfactor {\toscaled\dimexpr\tablestrutdepthfactor \points+#2\points}}
% SetTableToWidth -> textwidth=dimension [to dimension]
% Expand -> textwidth=max [to \hsize]
@@ -2192,8 +2192,8 @@
\else
\let\tablestrutdepthfactor\p_tabl_table_depth
\fi
- \edef\tablestrutheightfactor{\withoutpt\the\dimexpr10\dimexpr\tablestrutheightfactor\points}%
- \edef\tablestrutdepthfactor {\withoutpt\the\dimexpr10\dimexpr\tablestrutdepthfactor \points}%
+ \edef\tablestrutheightfactor{\toscaled\dimexpr10\dimexpr\tablestrutheightfactor\points}%
+ \edef\tablestrutdepthfactor {\toscaled\dimexpr10\dimexpr\tablestrutdepthfactor \points}%
\d_tabl_table_strut_unit \dimexpr\normalbaselineskip/12\relax % 12 is default bodyfont
\d_tabl_table_kern_unit .5em\relax
\s_tabl_table_inter_column_space_unit.5em plus 1fil minus .25em\relax
diff --git a/tex/context/base/mkxl/task-ini.lmt b/tex/context/base/mkxl/task-ini.lmt
index fcaad17e3..1f53a13b9 100644
--- a/tex/context/base/mkxl/task-ini.lmt
+++ b/tex/context/base/mkxl/task-ini.lmt
@@ -161,7 +161,9 @@ appendaction("everypar", "normalizers", "nodes.handlers.checkparcounter",
appendaction("alignments", "normalizers", "nodes.handlers.showpreamble", nil, "nut", "enabled" )
appendaction("alignments", "normalizers", "nodes.handlers.aligncharacter", nil, "nut", "disabled" )
-appendaction("alignments", "normalizers", "nodes.handlers.fixmathalign", nil, "nut", "enabled" ) -- maybe delay
+appendaction("alignments", "normalizers", "nodes.handlers.fixmathalign", nil, "nut", "disabled" )
+appendaction("alignments", "normalizers", "nodes.handlers.mathmatrixornaments", nil, "nut", "disabled" )
+appendaction("alignments", "normalizers", "nodes.handlers.mathmatrixrules", nil, "nut", "disabled" )
appendaction("localboxes", "lists", "typesetters.localboxes.handler", nil, "nut", "enabled" )
diff --git a/tex/context/base/mkxl/type-set.mkxl b/tex/context/base/mkxl/type-set.mkxl
index 8a11888e5..a14a99630 100644
--- a/tex/context/base/mkxl/type-set.mkxl
+++ b/tex/context/base/mkxl/type-set.mkxl
@@ -63,7 +63,8 @@
\definefilesynonym [type-imp-modern-latin.mkiv] [type-imp-modernlatin.mkiv]
\definefilesynonym [type-imp-less-modern-latin.mkiv] [type-imp-modernlatin.mkiv]
-\definefilesynonym [type-imp-lucida.mkiv] [type-imp-lucida-typeone.mkiv]
+%definefilesynonym [type-imp-lucida.mkiv] [type-imp-lucida-typeone.mkiv]
+\definefilesynonym [type-imp-lucida.mkiv] [type-imp-lucida-opentype.mkiv]
\definefilesynonym [type-imp-lucidaot.mkiv] [type-imp-lucida-opentype.mkiv]
\definefilesynonym [type-imp-lucidadk.mkiv] [type-imp-lucida-opentype.mkiv]
diff --git a/tex/context/base/mkxl/typo-bld.mkxl b/tex/context/base/mkxl/typo-bld.mkxl
index ff1f569cb..a84b0ef2c 100644
--- a/tex/context/base/mkxl/typo-bld.mkxl
+++ b/tex/context/base/mkxl/typo-bld.mkxl
@@ -33,6 +33,28 @@
% \dorecurse{100}{\input ward \par}
% \stopparbuilder
+% \startluacode
+% function builders.paragraphs.constructors.methods.preroll_a(head)
+% local result, info = tex.linebreak(head)
+% tex.prevdepth = info.prevdepth
+% tex.prevgraf = info.prevgraf
+% return result
+% end
+% function builders.paragraphs.constructors.methods.preroll_b(head)
+% local result, info = tex.linebreak(nodes.nuts.copylist(head))
+% return true
+% end
+% \stopluacode
+%
+% \defineparbuilder[preroll_a]
+% \defineparbuilder[preroll_b]
+%
+% \starttext
+% \setmainparbuilder[default] \input tufte \par \input tufte \page
+% \setmainparbuilder[preroll_a] \input tufte \par \input tufte \page
+% \setmainparbuilder[preroll_b] \input tufte \par \input tufte \page
+% \stoptext
+
\unprotect
\registerctxluafile{typo-bld}{autosuffix}
diff --git a/tex/context/base/mkxl/typo-lbx.lmt b/tex/context/base/mkxl/typo-lbx.lmt
index ac67959d6..55b9a9ca7 100644
--- a/tex/context/base/mkxl/typo-lbx.lmt
+++ b/tex/context/base/mkxl/typo-lbx.lmt
@@ -153,7 +153,8 @@ do
end
end
- -- these two are now more or less the same so ...
+ -- these two are now more or less the same so ... todo: add
+ -- warning about non zero width
local function processleftbox(box)
local list = getlist(box)
diff --git a/tex/context/base/mkxl/typo-lbx.mkxl b/tex/context/base/mkxl/typo-lbx.mkxl
index 61060362d..a57564f61 100644
--- a/tex/context/base/mkxl/typo-lbx.mkxl
+++ b/tex/context/base/mkxl/typo-lbx.mkxl
@@ -357,8 +357,8 @@
%D % \protected\def\LeftNumber {\hbox to \localboxesparameter{width}{\strut\box\localboxcontentbox\hss)}}
%D % \protected\def\RightNumber{\hbox to \localboxesparameter{width}{\strut(\hss\box\localboxcontentbox)}}
%D
-%D \protected\def\LeftText #1{#1\quad}
-%D \protected\def\RightText#1{\quad#1}
+%D \protected\def\LeftText {\localboxcontentbox\quad}
+%D \protected\def\RightText{\quad\localboxcontentbox}
%D
%D \start
%D \localbox[linenumber]{}%
diff --git a/tex/context/fonts/mkiv/bonum-math.lfg b/tex/context/fonts/mkiv/bonum-math.lfg
index 3b3f02343..154f7c346 100644
--- a/tex/context/fonts/mkiv/bonum-math.lfg
+++ b/tex/context/fonts/mkiv/bonum-math.lfg
@@ -35,6 +35,10 @@ return {
DisplayOperatorMinHeight = 1900, -- 1250 in font
-- AccentSuperscriptDrop = 100,
-- AccentSuperscriptPercent = 20,
+ -- PrimeRaisePercent = 50,
+ PrimeRaiseComposedPercent = 0,
+ -- PrimeShiftUp = 0,
+ -- PrimeBaselineDropMax = 0,
},
tweaks = {
aftercopying = {
@@ -186,6 +190,11 @@ return {
topleft = -0.2,
bottomright = -0.2,
},
+-- [0x1D453] = {
+-- [0x0210E] = {
+-- topleft = 0.5,
+-- bottomright = -0.2,
+-- },
-- [0x28] = { -- left parenthesis. No!
-- topleft = -0.1,
-- bottomleft = -0.1,
@@ -374,6 +383,16 @@ return {
factor = 1,--1.1
},
{
+ tweak = "addprivates",
+ -- list = {
+ -- -- for specific parameters see act file
+ -- ["unary minus"] = { preset = "unary minus" },
+ -- ["unary plus"] = { preset = "unary plus" },
+ -- ["unary plus minus"] = { preset = "unary plus minus" },
+ -- ["unary minus plus"] = { preset = "unary minus plus" },
+ -- },
+ },
+ {
tweak = "addscripts",
},
{
@@ -382,6 +401,58 @@ return {
{
tweak = "addrules",
},
+ {
+ tweak = "kernpairs",
+ list = {
+ [mathematics.tweaks.subsets.acenorsuvxz] = {
+ [0x1D453] = -.1, -- f
+ [0x1D457] = -.1, -- j
+ },
+ [mathematics.tweaks.subsets.bhklt] = {
+ [0x1D453] = -.1, -- f
+ [0x1D457] = -.1, -- j
+ },
+ [mathematics.tweaks.subsets.d] = {
+ [0x1D453] = -.075, -- f
+ [0x1D457] = -.075, -- j
+ },
+ [mathematics.tweaks.subsets.f] = {
+ -- [mathematics.tweaks.subsets.aceimnorsuvwxz] = -.05,
+ [mathematics.tweaks.subsets.gjqy] = -.15,
+ [0x1D453] = -.2, -- ff
+ },
+ [mathematics.tweaks.subsets.i] = {
+ [0x1D453] = -.2, -- f
+ [0x1D457] = -.2, -- j
+ },
+ [mathematics.tweaks.subsets.mw] = {
+ [0x1D453] = -.05, -- f
+ [0x1D457] = -.05, -- j
+ },
+ [mathematics.tweaks.subsets.p] = {
+ [0x1D453] = -.05, -- f
+ [0x1D457] = -.05, -- j
+ },
+ [0x1D45F] = { -- r
+ [0x1D460] = -.1, -- s
+ },
+-- [mathematics.tweaks.subsets.acenorsuvxz] = {
+-- [mathematics.tweaks.subsets.acenorsuvxz] = 2,
+-- },
+-- [0x1D452] = {
+-- [0x1D453] = -.05,
+-- [0x1D465] = -.3,
+-- },
+-- [0x1D453] = {
+-- [0x1D453] = -.1,
+-- [0x1D454] = -.1,
+-- [0x1D465] = -.3,
+-- },
+-- [0x1D465] = {
+-- [0x1D465] = .1,
+-- }
+ }
+ },
-- {
-- tweak = "fixanchors",
-- factor = .5,
diff --git a/tex/context/fonts/mkiv/cambria-math.lfg b/tex/context/fonts/mkiv/cambria-math.lfg
index 7a28eb2b6..a76e68e13 100644
--- a/tex/context/fonts/mkiv/cambria-math.lfg
+++ b/tex/context/fonts/mkiv/cambria-math.lfg
@@ -57,6 +57,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 2800, -- 2500 in font
+ PrimeRaisePercent = 75, -- 50 default
+ -- PrimeRaiseComposedPercent = 25, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/dejavu-math.lfg b/tex/context/fonts/mkiv/dejavu-math.lfg
index 6f5dfc7b3..cbba910ce 100644
--- a/tex/context/fonts/mkiv/dejavu-math.lfg
+++ b/tex/context/fonts/mkiv/dejavu-math.lfg
@@ -27,6 +27,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 1800, -- 1333 in font
+ -- PrimeRaisePercent = 50, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/garamond-math.lfg b/tex/context/fonts/mkiv/garamond-math.lfg
index d385b6c7a..cdefd8077 100644
--- a/tex/context/fonts/mkiv/garamond-math.lfg
+++ b/tex/context/fonts/mkiv/garamond-math.lfg
@@ -19,6 +19,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
-- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ PrimeRaisePercent = 85, -- 50 default
+ -- PrimeRaiseComposedPercent = 25, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/kpfonts-math.lfg b/tex/context/fonts/mkiv/kpfonts-math.lfg
index ffec77b56..cb75644a9 100644
--- a/tex/context/fonts/mkiv/kpfonts-math.lfg
+++ b/tex/context/fonts/mkiv/kpfonts-math.lfg
@@ -15,6 +15,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
-- DisplayOperatorMinHeight = 1800, -- 1500 in font (only one)
+ PrimeRaisePercent = 25, -- 50 default
+ -- PrimeRaiseComposedPercent = 25, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/libertinus-math.lfg b/tex/context/fonts/mkiv/libertinus-math.lfg
index c5a4bcbcb..f0b542f42 100644
--- a/tex/context/fonts/mkiv/libertinus-math.lfg
+++ b/tex/context/fonts/mkiv/libertinus-math.lfg
@@ -26,6 +26,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
-- DisplayOperatorMinHeight = 1800, -- 1250 in font (only one)
+ PrimeRaisePercent = 70, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/lm.lfg b/tex/context/fonts/mkiv/lm.lfg
index 0c0b0a1dc..e3dbfc6b8 100644
--- a/tex/context/fonts/mkiv/lm.lfg
+++ b/tex/context/fonts/mkiv/lm.lfg
@@ -70,174 +70,175 @@ return {
{
tweak = "dimensions",
list = {
- -- [0x00060] = { yoffset = -0.05 }, -- grave
- -- [0x000B4] = { yoffset = -0.05 }, -- acute
- -- -- [0x002C6] = { yoffset = -0.05 }, -- hat
- -- [0x002DC] = { yoffset = -0.05 }, -- tilde
- -- [0x000AF] = { yoffset = -0.075 }, -- bar
- -- [0x002D8] = { yoffset = -0.05 }, -- breve
- -- [0x002D9] = { yoffset = -0.05 }, -- dot
- -- [0x000A8] = { yoffset = -0.05 }, -- ddot
- -- [0x020DB] = { yoffset = 0.2 }, -- dddot (done below!)
- [0x002DA] = { width = 0, }, -- ring (bounding box is wrong)
- -- [0x002C7] = { yoffset = -0.05 }, -- check
- -- [0x020D7] = { yoffset = -0.05 }, -- vec
+ -- [0x00060] = { yoffset = -0.05 }, -- grave
+ -- [0x000B4] = { yoffset = -0.05 }, -- acute
+ -- [0x002C6] = { yoffset = -0.05 }, -- hat
+ -- [0x002DC] = { yoffset = -0.05 }, -- tilde
+ -- [0x000AF] = { yoffset = -0.075 }, -- bar
+ -- [0x002D8] = { yoffset = -0.05 }, -- breve
+ -- [0x002D9] = { yoffset = -0.05 }, -- dot
+ -- [0x000A8] = { yoffset = -0.05 }, -- ddot
+ -- [0x020DB] = { yoffset = 0.2 }, -- dddot (done below!)
+ [0x002DA] = { width = 0 }, -- ring (bounding box is wrong)
+ -- [0x002C7] = { yoffset = -0.05 }, -- check
+ -- [0x020D7] = { yoffset = -0.05 }, -- vec
+
[0x00300] = { yoffset = -0.03, all = true }, -- widegrave
[0x00301] = { yoffset = -0.03, all = true }, -- wideacute
- [0x00302] = { yoffset = -0.075, all = true }, -- widehat
+ [0x00302] = { yoffset = -0.075, all = true }, -- widehat
[0x00303] = { yoffset = -0.05, all = true }, -- widetilde
[0x00304] = { yoffset = -0.02, all = true }, -- widebar
[0x00306] = { yoffset = -0.05, all = true }, -- widebreve
- [0x00307] = { yoffset = -0.027, all = true }, -- widedot
- [0x00308] = { yoffset = -0.027, all = true }, -- wideddot
+ [0x00307] = { yoffset = -0.027, all = true }, -- widedot
+ [0x00308] = { yoffset = -0.027, all = true }, -- wideddot
[0x020DB] = { yoffset = -0.065, all = true }, -- widedddot
- [0x0030C] = { yoffset = -0.05, all = true }, -- widecheck
- [0x0030A] = { yoffset = -0.025, all = true }, -- widering
-
- -- [0x0212C] = { width = 0.95, italic = 0.05 }, -- script B
- -- [0x1D49E] = { width = 0.8, italic = 0.25 }, -- script C
- -- [0x1D49F] = { width = 0.9, italic = 0.11 }, -- script D
- -- [0x02130] = { width = 0.85, italic = 0.18 }, -- script E
- -- [0x02131] = { width = 0.75, italic = 0.3 }, -- script F
- -- [0x1D4A2] = { width = 0.9, italic = 0.11 }, -- script G
- -- [0x0210B] = { width = 0.85, italic = 0.18 }, -- script H
- -- [0x02110] = { width = 0.8, italic = 0.25 }, -- script I
- -- [0x1D4A5] = { width = 0.8, italic = 0.25 }, -- script J
- -- [0x1D4A6] = { width = 0.9, italic = 0.11 }, -- script K
- -- [0x02112] = { width = 0.95, italic = 0.05 }, -- script L
- -- [0x02133] = { width = 0.9, italic = 0.11 }, -- script M
- -- [0x1D4A9] = { width = 0.85, italic = 0.18 }, -- script N
- -- [0x1D4AA] = { width = 0.95, italic = 0.05 }, -- script O
- -- [0x1D4AB] = { width = 0.8, italic = 0.25 }, -- script P
- -- [0x1D4AB] = { width = 0.95, italic = 0.05 }, -- script Q
- -- [0x0211B] = { width = 0.95, italic = 0.05 }, -- script R
- -- [0x1D4AE] = { width = 0.9, italic = 0.11 }, -- script S
- -- [0x1D4AF] = { width = 0.75, italic = 0.33 }, -- script T
- -- [0x1D4B0] = { width = 0.9, italic = 0.11 }, -- script U
- -- [0x1D4B1] = { width = 0.8, italic = 0.25 }, -- script V
- -- [0x1D4B2] = { width = 0.8, italic = 0.25 }, -- script W
- -- [0x1D4B3] = { width = 0.9, italic = 0.11 }, -- script X
- -- [0x1D4B4] = { width = 0.85, italic = 0.18 }, -- script Y
- -- [0x1D4B5] = { width = 0.95, italic = 0.05 }, -- script Z
+ [0x0030C] = { yoffset = -0.05, all = true }, -- widecheck
+ [0x0030A] = { yoffset = -0.025, all = true }, -- widering
+
+ -- [0x0212C] = { width = 0.95, italic = 0.05 }, -- script B
+ -- [0x1D49E] = { width = 0.8, italic = 0.25 }, -- script C
+ -- [0x1D49F] = { width = 0.9, italic = 0.11 }, -- script D
+ -- [0x02130] = { width = 0.85, italic = 0.18 }, -- script E
+ -- [0x02131] = { width = 0.75, italic = 0.3 }, -- script F
+ -- [0x1D4A2] = { width = 0.9, italic = 0.11 }, -- script G
+ -- [0x0210B] = { width = 0.85, italic = 0.18 }, -- script H
+ -- [0x02110] = { width = 0.8, italic = 0.25 }, -- script I
+ -- [0x1D4A5] = { width = 0.8, italic = 0.25 }, -- script J
+ -- [0x1D4A6] = { width = 0.9, italic = 0.11 }, -- script K
+ -- [0x02112] = { width = 0.95, italic = 0.05 }, -- script L
+ -- [0x02133] = { width = 0.9, italic = 0.11 }, -- script M
+ -- [0x1D4A9] = { width = 0.85, italic = 0.18 }, -- script N
+ -- [0x1D4AA] = { width = 0.95, italic = 0.05 }, -- script O
+ -- [0x1D4AB] = { width = 0.8, italic = 0.25 }, -- script P
+ -- [0x1D4AB] = { width = 0.95, italic = 0.05 }, -- script Q
+ -- [0x0211B] = { width = 0.95, italic = 0.05 }, -- script R
+ -- [0x1D4AE] = { width = 0.9, italic = 0.11 }, -- script S
+ -- [0x1D4AF] = { width = 0.75, italic = 0.33 }, -- script T
+ -- [0x1D4B0] = { width = 0.9, italic = 0.11 }, -- script U
+ -- [0x1D4B1] = { width = 0.8, italic = 0.25 }, -- script V
+ -- [0x1D4B2] = { width = 0.8, italic = 0.25 }, -- script W
+ -- [0x1D4B3] = { width = 0.9, italic = 0.11 }, -- script X
+ -- [0x1D4B4] = { width = 0.85, italic = 0.18 }, -- script Y
+ -- [0x1D4B5] = { width = 0.95, italic = 0.05 }, -- script Z
-- Setting anchors to shift the location of accents
-- Note: Many non-italic alphabets are wiped below
-- Todo: Check the less common italic alphabets
- -- [0x1D483] = { anchor = 1.15, }, -- bold italic b
- -- [0x1D485] = { anchor = 0.8, }, -- bold italic d
- [0x1D487] = { anchor = 0.9, }, -- bold italic f
- [0x1D489] = { anchor = 1.2, }, -- bold italic h
- [0x1D48C] = { anchor = 1.2, }, -- bold italic k
- [0x1D48F] = { anchor = 1.1, }, -- bold italic n
- [0x1D491] = { anchor = 1.2, }, -- bold italic p
- [0x1D492] = { anchor = 0.9, }, -- bold italic q
- [0x1D49B] = { anchor = 0.9, }, -- bold italic z
-
- [0x1D736] = { anchor = 0.9, }, -- bold italic alpha
- [0x1D737] = { anchor = 0.9, }, -- bold italic beta
- [0x1D738] = { anchor = 1.1, }, -- bold italic gamma
- [0x1D740] = { anchor = 1.2, }, -- bold italic lambda
- [0x1D744] = { anchor = 1.2, }, -- bold italic omicron
-
- [0x1D6FE] = { anchor = 1.1, }, -- italic gamma
- [0x1D702] = { anchor = 1.1, }, -- italic eta
- -- [0x1D70A] = { anchor = 1.2, }, -- italic omicron -- no difference
- -- [0x1D70D] = { anchor = 1.2, }, -- italic varsigma -- no difference
-
- [0x1D44F] = { anchor = 1.15, }, -- italic b
+
+ -- [0x1D483] = { anchor = 1.15 }, -- bold italic b
+ -- [0x1D485] = { anchor = 0.8 }, -- bold italic d
+ [0x1D487] = { anchor = 0.9 }, -- bold italic f
+ [0x1D489] = { anchor = 1.2 }, -- bold italic h
+ [0x1D48C] = { anchor = 1.2 }, -- bold italic k
+ [0x1D48F] = { anchor = 1.1 }, -- bold italic n
+ [0x1D491] = { anchor = 1.2 }, -- bold italic p
+ [0x1D492] = { anchor = 0.9 }, -- bold italic q
+ [0x1D49B] = { anchor = 0.9 }, -- bold italic z
+
+ [0x1D736] = { anchor = 0.9 }, -- bold italic alpha
+ [0x1D737] = { anchor = 0.9 }, -- bold italic beta
+ [0x1D738] = { anchor = 1.1 }, -- bold italic gamma
+ [0x1D740] = { anchor = 1.2 }, -- bold italic lambda
+ [0x1D744] = { anchor = 1.2 }, -- bold italic omicron
+
+ [0x1D6FE] = { anchor = 1.1 }, -- italic gamma
+ [0x1D702] = { anchor = 1.1 }, -- italic eta
+ -- [0x1D70A] = { anchor = 1.2 }, -- italic omicron -- no difference
+ -- [0x1D70D] = { anchor = 1.2 }, -- italic varsigma -- no difference
+
+ [0x1D44F] = { anchor = 1.15 }, -- italic b
[0x1D451] = { anchor = 0.8, }, -- italic d
- [0x1D455] = { anchor = 1.15, }, -- italic h
- -- [0x1D456] = { anchor = 1.15, }, -- italic i (wrong code?)
- [0x1D458] = { anchor = 1.15, }, -- italic k
- [0x1D45B] = { anchor = 1.1, }, -- italic n
- [0x1D45D] = { anchor = 1.1, }, -- italic p
- [0x1D45E] = { anchor = 0.9, }, -- italic q
- [0x1D467] = { anchor = 0.9, }, -- italic z
-
- [0x1D6FE] = { anchor = 1.2, }, -- italic gamma
- [0x1D706] = { anchor = 1.2, }, -- italic lambda
- [0x1D70A] = { anchor = 1.1, }, -- italic omikron
- [0x1D70D] = { anchor = 1.1, }, -- italic varsigma
-
- [0x1D46A] = { anchor = 0.75, }, -- bold italic C
- [0x1D46B] = { anchor = 1.1, }, -- bold italic D
- [0x1D46E] = { anchor = 0.75, }, -- bold italic G
- [0x1D479] = { anchor = 1.2, }, -- bold italic R
- [0x1D47A] = { anchor = 0.8, }, -- bold italic S
+ [0x1D455] = { anchor = 1.15 }, -- italic h
+ -- [0x1D456] = { anchor = 1.15 }, -- italic i (wrong code?)
+ [0x1D458] = { anchor = 1.15 }, -- italic k
+ [0x1D45B] = { anchor = 1.1 }, -- italic n
+ [0x1D45D] = { anchor = 1.1 }, -- italic p
+ [0x1D45E] = { anchor = 0.9 }, -- italic q
+ [0x1D467] = { anchor = 0.9 }, -- italic z
+
+ [0x1D6FE] = { anchor = 1.2 }, -- italic gamma
+ [0x1D706] = { anchor = 1.2 }, -- italic lambda
+ [0x1D70A] = { anchor = 1.1 }, -- italic omikron
+ [0x1D70D] = { anchor = 1.1 }, -- italic varsigma
+
+ [0x1D46A] = { anchor = 0.75 }, -- bold italic C
+ [0x1D46B] = { anchor = 1.1 }, -- bold italic D
+ [0x1D46E] = { anchor = 0.75 }, -- bold italic G
+ [0x1D479] = { anchor = 1.2 }, -- bold italic R
+ [0x1D47A] = { anchor = 0.8 }, -- bold italic S
-- uppercaseboldscript could be improved
- [0x1D435] = { anchor = 1.05, }, -- italic B
- [0x1D436] = { anchor = 0.7, }, -- italic C
- [0x1D437] = { anchor = 1.05, }, -- italic D
- [0x1D43A] = { anchor = 0.8, }, -- italic G
- [0x1D443] = { anchor = 1.1, }, -- italic P
- [0x1D445] = { anchor = 1.05, }, -- italic R
- [0x1D446] = { anchor = 0.85, }, -- italic S
-
- [0x1D49C] = { anchor = 0.9 }, -- script A
- [0x1D49D] = { anchor = 0.95, }, -- script B
- [0x1D49E] = { anchor = 0.8, }, -- script C
- [0x1D49F] = { anchor = 0.95, }, -- script D
- [0x1D4A0] = { anchor = 0.85, }, -- script E
- [0x1D4A1] = { anchor = 0.75, }, -- script F
- [0x1D4A2] = { anchor = 0.9, }, -- script G
- [0x1D4A3] = { anchor = 0.85, }, -- script H
- [0x1D4A4] = { anchor = 0.8, }, -- script I
- [0x1D4A5] = { anchor = 0.8, }, -- script J
- [0x1D4A6] = { anchor = 0.85, }, -- script K
- [0x1D4A7] = { anchor = 0.75, }, -- script L
- [0x1D4A8] = { anchor = 0.9, }, -- script M
- [0x1D4A9] = { anchor = 0.85, }, -- script N
- [0x1D4AA] = { anchor = 0.95, }, -- script O
- [0x1D4AB] = { anchor = 0.95, }, -- script P
- [0x1D4AC] = { anchor = 0.95, }, -- script Q
- [0x1D4AD] = { anchor = 0.95, }, -- script R
- [0x1D4AE] = { anchor = 0.9, }, -- script S
- [0x1D4AF] = { anchor = 0.75, }, -- script T
- [0x1D4B0] = { anchor = 0.9, }, -- script U
- [0x1D4B1] = { anchor = 0.95, }, -- script V
- [0x1D4B2] = { anchor = 0.95, }, -- script W
- [0x1D4B3] = { anchor = 0.95, }, -- script X
- [0x1D4B4] = { anchor = 0.9, }, -- script Y
- [0x1D4B5] = { anchor = 1, }, -- script Z
-
--- [984874]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984881]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984888]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984895]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984902]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984909]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984916]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- ["0x7C.variants.*"]={ squeeze = 0.75, height = 0.75, depth = 0.75, extend = 1.15, width = 1.15 }, -- squeeze: glyph, height, depth: bbox
--- ["0x7C.variants.*"]={ squeeze = 0.75, height = 0.8, depth = 0.8, extend = 1.1, width = 1.1 }, -- squeeze: glyph, height, depth: bbox
-
-
-["0x7C.variants.1"]={ squeeze = 0.90, height = 0.90, depth = 0.90 },
-["0x7C.variants.2"]={ squeeze = 0.85, height = 0.85, depth = 0.85 },
-["0x7C.variants.3"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-["0x7C.variants.4"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-["0x7C.variants.5"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-["0x7C.variants.6"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-["0x7C.variants.7"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-
-
--- [utf.byte("1")] = {
--- original = utf.byte("2"),
--- mode = 1,
--- scale = 2,
--- },
--- ["lowercasegreeksansserifbolditalic"] = {
--- delta = 0x003B1 - 0x1D7AA,
--- slant = 0.4,
--- slant = -0.2,
--- line = 0.1,
--- -- line = 0.4,
--- mode = 1,
--- width = 1.25,
--- width = 0.95,
--- scale = 0.975,
--- },
+ [0x1D435] = { anchor = 1.05 }, -- italic B
+ [0x1D436] = { anchor = 0.7 }, -- italic C
+ [0x1D437] = { anchor = 1.05 }, -- italic D
+ [0x1D43A] = { anchor = 0.8 }, -- italic G
+ [0x1D443] = { anchor = 1.1 }, -- italic P
+ [0x1D445] = { anchor = 1.05 }, -- italic R
+ [0x1D446] = { anchor = 0.85 }, -- italic S
+
+ [0x1D49C] = { anchor = 0.9 }, -- script A
+ [0x1D49D] = { anchor = 0.95 }, -- script B
+ [0x1D49E] = { anchor = 0.8 }, -- script C
+ [0x1D49F] = { anchor = 0.95 }, -- script D
+ [0x1D4A0] = { anchor = 0.85 }, -- script E
+ [0x1D4A1] = { anchor = 0.75 }, -- script F
+ [0x1D4A2] = { anchor = 0.9 }, -- script G
+ [0x1D4A3] = { anchor = 0.85 }, -- script H
+ [0x1D4A4] = { anchor = 0.8 }, -- script I
+ [0x1D4A5] = { anchor = 0.8 }, -- script J
+ [0x1D4A6] = { anchor = 0.85 }, -- script K
+ [0x1D4A7] = { anchor = 0.75 }, -- script L
+ [0x1D4A8] = { anchor = 0.9 }, -- script M
+ [0x1D4A9] = { anchor = 0.85 }, -- script N
+ [0x1D4AA] = { anchor = 0.95 }, -- script O
+ [0x1D4AB] = { anchor = 0.95 }, -- script P
+ [0x1D4AC] = { anchor = 0.95 }, -- script Q
+ [0x1D4AD] = { anchor = 0.95 }, -- script R
+ [0x1D4AE] = { anchor = 0.9 }, -- script S
+ [0x1D4AF] = { anchor = 0.75 }, -- script T
+ [0x1D4B0] = { anchor = 0.9, }, -- script U
+ [0x1D4B1] = { anchor = 0.95 }, -- script V
+ [0x1D4B2] = { anchor = 0.95 }, -- script W
+ [0x1D4B3] = { anchor = 0.95 }, -- script X
+ [0x1D4B4] = { anchor = 0.9 }, -- script Y
+ [0x1D4B5] = { anchor = 1 }, -- script Z
+
+ -- [984874] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984881] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984888] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984895] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984902] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984909] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984916] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+
+ -- ["0x7C.variants.*"] = { squeeze = 0.75, height = 0.75, depth = 0.75, extend = 1.15, width = 1.15 }, -- squeeze: glyph, height, depth: bbox
+ -- ["0x7C.variants.*"] = { squeeze = 0.75, height = 0.8, depth = 0.8, extend = 1.1, width = 1.1 }, -- squeeze: glyph, height, depth: bbox
+
+ ["0x7C.variants.1"]={ squeeze = 0.90, height = 0.90, depth = 0.90 },
+ ["0x7C.variants.2"]={ squeeze = 0.85, height = 0.85, depth = 0.85 },
+ ["0x7C.variants.3"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
+ ["0x7C.variants.4"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
+ ["0x7C.variants.5"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
+ ["0x7C.variants.6"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
+ ["0x7C.variants.7"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
+
+ -- [utf.byte("1")] = {
+ -- original = utf.byte("2"),
+ -- mode = 1,
+ -- scale = 2,
+ -- },
+
+ -- ["lowercasegreeksansserifbolditalic"] = {
+ -- delta = 0x003B1 - 0x1D7AA,
+ -- slant = 0.4,
+ -- slant = -0.2,
+ -- line = 0.1,
+ -- mode = 1,
+ -- width = 1.25,
+ -- width = 0.95,
+ -- scale = 0.975,
+ -- },
},
},
{
@@ -280,82 +281,82 @@ return {
[0x1D4B5] = { bottomright = -0.05, }, -- script Z
},
},
- -- {
- -- tweak = "staircase",
- -- list = {
- -- },
- -- },
+ -- {
+ -- tweak = "staircase",
+ -- list = {
+ -- },
+ -- },
{
-- For upright alphabets, we unset the anchor.
- -- This means that accents are placed
+ -- This means that accents are placed
-- centered over the character
tweak = "wipeanchors",
- -- list = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 }, -- todo: ranges
- list = {
- "digitsbold",
- "digitsdoublestruck",
- "digitsmonospace",
- "digitsnormal",
- "digitssansserifbold",
- "digitssansserifnormal",
- "lowercasebold",
- "lowercaseboldfraktur",
- "lowercasedoublestruck",
- "lowercasefraktur",
- "lowercasegreekbold",
- "lowercasegreeknormal",
- "lowercasegreeksansserifbold",
- "lowercasemonospace",
- "lowercasenormal",
- "lowercasesansserifbold",
- "lowercasesansserifnormal",
- "uppercasebold",
- "uppercaseboldfraktur",
- "uppercasedoublestruck",
- "uppercasefraktur",
- "uppercasegreekbold",
- "uppercasegreeknormal",
- "uppercasegreeksansserifbold",
- "uppercasemonospace",
- "uppercasenormal", -- they are italic!
- "uppercasesansserifbold",
- "uppercasesansserifnormal",
- },
- },
- {
- -- For non-italic alphabets we
+ -- list = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 }, -- todo: ranges
+ list = {
+ "digitsbold",
+ "digitsdoublestruck",
+ "digitsmonospace",
+ "digitsnormal",
+ "digitssansserifbold",
+ "digitssansserifnormal",
+ "lowercasebold",
+ "lowercaseboldfraktur",
+ "lowercasedoublestruck",
+ "lowercasefraktur",
+ "lowercasegreekbold",
+ "lowercasegreeknormal",
+ "lowercasegreeksansserifbold",
+ "lowercasemonospace",
+ "lowercasenormal",
+ "lowercasesansserifbold",
+ "lowercasesansserifnormal",
+ "uppercasebold",
+ "uppercaseboldfraktur",
+ "uppercasedoublestruck",
+ "uppercasefraktur",
+ "uppercasegreekbold",
+ "uppercasegreeknormal",
+ "uppercasegreeksansserifbold",
+ "uppercasemonospace",
+ "uppercasenormal", -- they are italic!
+ "uppercasesansserifbold",
+ "uppercasesansserifnormal",
+ },
+ },
+ {
+ -- For non-italic alphabets we
-- remove italic correction.
tweak = "wipeitalics",
list = {
- -- "digitsbold",
- -- "digitsdoublestruck",
- -- "digitsmonospace",
- -- "digitsnormal",
- -- "digitssansserifbold",
- -- "digitssansserifnormal",
- -- "lowercasebold",
- -- "lowercaseboldfraktur",
- -- "lowercasedoublestruck",
- -- "lowercasefraktur",
- "lowercasemonospace",
- "lowercasenormal",
- -- "lowercasesansserifbold",
- -- "lowercasesansserifnormal",
- -- "lowercasegreeknormal",
- "uppercasebold",
- -- "uppercaseboldfraktur",
- -- "uppercasedoublestruck",
- -- "uppercasefraktur",
- -- "uppercasegreekbold",
- -- "uppercasegreeknormal",
- -- "uppercasegreeksansserifbold",
- "uppercasemonospace",
- "uppercasesansserifbold",
- "uppercasesanserifnormal",
+ -- "digitsbold",
+ -- "digitsdoublestruck",
+ -- "digitsmonospace",
+ -- "digitsnormal",
+ -- "digitssansserifbold",
+ -- "digitssansserifnormal",
+ -- "lowercasebold",
+ -- "lowercaseboldfraktur",
+ -- "lowercasedoublestruck",
+ -- "lowercasefraktur",
+ "lowercasemonospace",
+ "lowercasenormal",
+ -- "lowercasesansserifbold",
+ -- "lowercasesansserifnormal",
+ -- "lowercasegreeknormal",
+ "uppercasebold",
+ -- "uppercaseboldfraktur",
+ -- "uppercasedoublestruck",
+ -- "uppercasefraktur",
+ -- "uppercasegreekbold",
+ -- "uppercasegreeknormal",
+ -- "uppercasegreeksansserifbold",
+ "uppercasemonospace",
+ "uppercasesansserifbold",
+ "uppercasesanserifnormal",
},
},
{
- -- This one fakes margins to get larger/smaller accents
+ -- This one fakes margins to get larger/smaller accents
-- with for example \widetilde.
tweak = "margins",
list = {
@@ -397,10 +398,9 @@ return {
[0x00393] = { left = .1, right = .1 }, -- upfight Gamma
[0x00396] = { left = .1, right = .1 }, -- upfight Zeta
-
[0x1D5D8] = { left = .1, right = .1 }, -- sans bold E
[0x1D5D9] = { left = .1, right = .1 }, -- sans bold F
- -- [0x1D5DD] = { left = .2, right = .2 }, -- sans bold J -- nope
+ -- [0x1D5DD] = { left = .2, right = .2 }, -- sans bold J -- nope
[0x1D5DF] = { left = .1, right = .1 }, -- sans bold L
[0x1D5E6] = { left = .1, right = .1 }, -- sans bold S
@@ -409,7 +409,7 @@ return {
[0x1D5A2] = { left = .1, right = .1 }, -- sans C
[0x1D5A4] = { left = .1, right = .1 }, -- sans E
[0x1D5A5] = { left = .1, right = .1 }, -- sans F
- -- [0x1D5AB] = { left = .1, right = .1 }, -- sans L -- nope
+ -- [0x1D5AB] = { left = .1, right = .1 }, -- sans L -- nope
[0x1D5AF] = { left = .1, right = .1 }, -- sans P
[0x1D5B2] = { left = .1, right = .1 }, -- sans S
[0x1D5B9] = { left = .1, right = .1 }, -- sans Z
@@ -418,19 +418,16 @@ return {
[0x1D4AE] = { left = .1, right = .1 }, -- script S
[0x1D4B4] = { left = .1, right = .1 }, -- script Y
- -- [0x4A] = { left = .2, right = .2 }, -- J
+ -- [0x4A] = { left = .2, right = .2 }, -- J
[0x4C] = { left = .1, right = .1 }, -- L
[0x53] = { left = .1, right = .1 }, -- S
[0x5A] = { left = .1, right = .1 }, -- Z
- [0x1D43D] = { left = -.1, right = -.1 }, -- italic J
-
- [0x1D409] = { left = -.1, right = -.1 }, -- bold J
-
- [0x1D471] = { left = -.1, right = -.1 }, -- bold italic J
-
+ [0x1D43D] = { left = -.1, right = -.1 }, -- italic J
+ [0x1D409] = { left = -.1, right = -.1 }, -- bold J
+ [0x1D471] = { left = -.1, right = -.1 }, -- bold italic J
[0x1D4D9] = { left = -.05, right = -.05 }, -- bold script J
- },
+ },
},
{
tweak = "fixprimes",
@@ -463,17 +460,19 @@ return {
},
},
parameters = {
- FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function
- NoLimitSupFactor = 0,
- NoLimitSubFactor = 900,
- -- AccentBaseHeight = 0,
- -- AccentBaseDepth = 0,
- -- AccentTopOvershoot = 66,
- AccentSuperscriptDrop = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?)
- AccentSuperscriptPercent = 0,
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function
+ NoLimitSupFactor = 0,
+ NoLimitSubFactor = 900,
+ -- AccentBaseHeight = 0,
+ -- AccentBaseDepth = 0,
+ -- AccentTopOvershoot = 66,
+ AccentSuperscriptDrop = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?)
+ AccentSuperscriptPercent = 0,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ PrimeRaisePercent = 60, -- 50 default
+ PrimeRaiseComposedPercent = 15, -- 25 default
},
bigslots = {
1, 3, 5, 7 -- In fact, 6 is the last one.
diff --git a/tex/context/fonts/mkiv/lucida-opentype-math.lfg b/tex/context/fonts/mkiv/lucida-opentype-math.lfg
index 20dc3aeb1..f02cc2aea 100644
--- a/tex/context/fonts/mkiv/lucida-opentype-math.lfg
+++ b/tex/context/fonts/mkiv/lucida-opentype-math.lfg
@@ -40,10 +40,12 @@ return {
AccentBaseDepth = 150,
RadicalDegreeBottomRaisePercent = 50,
RadicalKernAfterDegree = -600,
- RadicalRuleThickness = 35, -- 40 in font (46 in demi)
+ -- RadicalRuleThickness = 35, -- 40 in font (46 in demi)
DelimiterPercent = 90,
DelimiterShortfall = 400,
-- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ PrimeRaisePercent = 60, -- 50 default
+ PrimeRaiseComposedPercent = 50, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/pagella-math.lfg b/tex/context/fonts/mkiv/pagella-math.lfg
index 4ace3e650..88018193d 100644
--- a/tex/context/fonts/mkiv/pagella-math.lfg
+++ b/tex/context/fonts/mkiv/pagella-math.lfg
@@ -40,12 +40,16 @@ return {
AccentTopShiftUp = 30,
-- AccentBaseHeight = 0,
AccentBaseDepth = 80,
+-- SpaceAfterScript = 0,
+-- SpaceAfterScript = 30,
RadicalDegreeBottomRaisePercent = 60,
RadicalKernAfterDegree = -500,
RadicalRuleThickness = 54, -- 60 in font
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 1800, -- 1500 in font
+ PrimeRaisePercent = 75, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
@@ -103,7 +107,7 @@ return {
[0x1D450] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- c
[0x1D451] = { xoffset = 0, width = 1, italic = 0, anchor = 0.7 }, -- d
[0x1D452] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- e
- [0x1D453] = { xoffset = 0.50, width = 1.70, italic = 0.6 }, -- f
+ [0x1D453] = { xoffset = 0.50, width = 1.70, italic = 0.6, anchor = 1.2 }, -- f
[0x1D454] = { xoffset = 0.10, width = 1.15, italic = 0.2 }, -- g
[0x0210E] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- h
[0x1D458] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- k
@@ -132,6 +136,14 @@ return {
-- topright = 0,
bottomright = -0.2,
},
+
+-- [0x1D453] = {
+-- topleft = 3,
+-- bottomleft = 3,
+-- topright = 3,
+-- bottomright = 3,
+-- },
+
},
},
{
@@ -148,6 +160,9 @@ return {
tweak = "addscripts",
},
{
+ tweak = "addprivates",
+ },
+ {
tweak = "accentdimensions",
},
{
diff --git a/tex/context/fonts/mkiv/schola-math.lfg b/tex/context/fonts/mkiv/schola-math.lfg
index 21062320c..1287f19d0 100644
--- a/tex/context/fonts/mkiv/schola-math.lfg
+++ b/tex/context/fonts/mkiv/schola-math.lfg
@@ -28,6 +28,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 1800, -- 1333 in font
+ -- PrimeRaisePercent = 50, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/stix-two-math.lfg b/tex/context/fonts/mkiv/stix-two-math.lfg
index b61b0b2bf..d543a4e9b 100644
--- a/tex/context/fonts/mkiv/stix-two-math.lfg
+++ b/tex/context/fonts/mkiv/stix-two-math.lfg
@@ -33,6 +33,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 1800, -- 1800 in font
+ PrimeRaisePercent = 75, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/termes-math.lfg b/tex/context/fonts/mkiv/termes-math.lfg
index 977217b1c..b7e3b2d45 100644
--- a/tex/context/fonts/mkiv/termes-math.lfg
+++ b/tex/context/fonts/mkiv/termes-math.lfg
@@ -35,6 +35,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ PrimeRaisePercent = 60, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/type-imp-euler.mkiv b/tex/context/fonts/mkiv/type-imp-euler.mkiv
index 6c2266579..00df63458 100644
--- a/tex/context/fonts/mkiv/type-imp-euler.mkiv
+++ b/tex/context/fonts/mkiv/type-imp-euler.mkiv
@@ -28,7 +28,6 @@
\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x02100-0x02BFF] [\s!check=yes]
\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x1D400-0x1D7FF] [\s!check=yes]
-\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x1D400-0x1D7FF] [\s!check=yes]
\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x0210E] [\s!check=yes,\c!force=\v!yes]
%definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x1D538-0x1D550] [\s!check=yes]
@@ -67,11 +66,15 @@
\stoptypescript
\starttypescript [\s!math] [euleroverpagella] [\s!name]
- \definefontsynonym [MathRoman] [texgyrepagella-math] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=euleroverpagella]
+ \definefontsynonym [MathRoman] [texgyrepagella-math] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=euleroverpagella%
+ ,\s!goodies=pagella-with-euler-math%
+ ]
\stoptypescript
\starttypescript [\s!math] [pagellaovereuler] [\s!name]
- \definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=pagellaovereuler]
+ \definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=pagellaovereuler%
+ ,\s!goodies=euler-with-pagella-math%
+ ]
\stoptypescript
\starttypescript [pagella-with-euler]
diff --git a/tex/context/fonts/mkiv/type-imp-lucida-opentype.mkiv b/tex/context/fonts/mkiv/type-imp-lucida-opentype.mkiv
index 4ac23d4c1..7237f7d08 100644
--- a/tex/context/fonts/mkiv/type-imp-lucida-opentype.mkiv
+++ b/tex/context/fonts/mkiv/type-imp-lucida-opentype.mkiv
@@ -21,7 +21,7 @@
\starttypescriptcollection[lucida-opentype]
- \starttypescript [lucidaot,lucidadk]
+ \starttypescript [lucida,lucidaot,lucidadk]
\loadfontgoodies[lucida-opentype-math]
\definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!features=\s!default]
\definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] [\s!features=\s!default]
@@ -33,7 +33,7 @@
\quittypescriptscanning
\stoptypescript
- \starttypescript [\s!serif] [lucidaot,lucidadk]
+ \starttypescript [\s!serif] [lucida,lucidaot,lucidadk]
\definefontsynonym [\s!Serif] [\s!file:LucidaBrightOT.otf]
\definefontsynonym [\s!SerifBold] [\s!file:LucidaBrightOT-Demi.otf]
\definefontsynonym [\s!SerifItalic] [\s!file:LucidaBrightOT-Italic.otf]
@@ -42,7 +42,7 @@
\definefontsynonym [\s!SerifBoldSlanted] [\s!SerifBoldItalic]
\stoptypescript
- \starttypescript [\s!sans] [lucidaot,lucidadk]
+ \starttypescript [\s!sans] [lucida,lucidaot,lucidadk]
\definefontsynonym [\s!Sans] [\s!file:LucidaSansOT.otf]
\definefontsynonym [\s!SansBold] [\s!file:LucidaSansOT-Demi.otf]
\definefontsynonym [\s!SansItalic] [\s!file:LucidaSansOT-Italic.otf]
@@ -51,7 +51,7 @@
\definefontsynonym [\s!SansBoldSlanted] [\s!SansBoldItalic]
\stoptypescript
- \starttypescript [\s!mono] [lucidaot]
+ \starttypescript [\s!mono] [lucida,lucidaot]
\definefontsynonym [\s!Mono] [\s!file:LucidaSansTypewriterOT.otf]
\definefontsynonym [\s!MonoBold] [\s!file:LucidaSansTypewriterOT-Bold.otf]
\definefontsynonym [\s!MonoItalic] [\s!file:LucidaSansTypewriterOT-Oblique.otf]
@@ -69,16 +69,16 @@
\definefontsynonym [\s!MonoBoldSlanted] [\s!MonoBoldItalic]
\stoptypescript
- \starttypescript [\s!math] [lucidaot,lucidadk]
+ \starttypescript [\s!math] [lucida,lucidaot,lucidadk]
\definefontsynonym [\s!MathRoman] [\s!file:LucidaBrightMathOT.otf] [\s!features={\s!math\mathsizesuffix,mathlucida,mathextra},\s!goodies=lucida-opentype-math]
\definefontsynonym [\s!MathRomanBold] [\s!file:LucidaBrightMathOT-Demi.otf] [\s!features={\s!math\mathsizesuffix,mathlucida,mathextra},\s!goodies=lucida-opentype-math]
\stoptypescript
- \starttypescript [\s!handwriting] [lucidaot,lucidadk]
+ \starttypescript [\s!handwriting] [lucida,lucidaot,lucidadk]
\definefontsynonym [\s!Handwriting] [\s!file:LucidaHandwritingOT.otf]
\stoptypescript
- \starttypescript [\s!calligraphy] [lucidaot,lucidadk]
+ \starttypescript [\s!calligraphy] [lucida,lucidaot,lucidadk]
\definefontsynonym [\s!Calligraphy] [\s!file:LucidaCalligraphyOT.otf]
\stoptypescript
diff --git a/tex/context/interface/mkii/keys-cs.xml b/tex/context/interface/mkii/keys-cs.xml
index 5b470d75b..58002a9f3 100644
--- a/tex/context/interface/mkii/keys-cs.xml
+++ b/tex/context/interface/mkii/keys-cs.xml
@@ -876,6 +876,7 @@
<cd:constant name='frameradius' value='polomerramecku'/>
<cd:constant name='frames' value='ramecky'/>
<cd:constant name='freeregion' value='freeregion'/>
+ <cd:constant name='freezespacing' value='freezespacing'/>
<cd:constant name='from' value='z'/>
<cd:constant name='functioncolor' value='functioncolor'/>
<cd:constant name='functionstyle' value='functionstyle'/>
@@ -956,6 +957,7 @@
<cd:constant name='lastpubsep' value='lastpubsep'/>
<cd:constant name='layout' value='layout'/>
<cd:constant name='left' value='vlevo'/>
+ <cd:constant name='leftclass' value='leftclass'/>
<cd:constant name='leftcolor' value='barvavlevo'/>
<cd:constant name='leftcompoundhyphen' value='leftcompoundhyphen'/>
<cd:constant name='leftedge' value='levahrana'/>
@@ -1014,6 +1016,7 @@
<cd:constant name='menu' value='menu'/>
<cd:constant name='method' value='metoda'/>
<cd:constant name='middle' value='stredni'/>
+ <cd:constant name='middleclass' value='middleclass'/>
<cd:constant name='middlecolor' value='middlecolor'/>
<cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlesource' value='middlesource'/>
@@ -1126,6 +1129,7 @@
<cd:constant name='palet' value='paleta'/>
<cd:constant name='paper' value='papir'/>
<cd:constant name='paragraph' value='odstavec'/>
+ <cd:constant name='penalties' value='penalties'/>
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='umistit'/>
<cd:constant name='placehead' value='umistihlavicku'/>
@@ -1179,6 +1183,7 @@
<cd:constant name='reverse' value='reverse'/>
<cd:constant name='right' value='vpravo'/>
<cd:constant name='rightchars' value='rightchars'/>
+ <cd:constant name='rightclass' value='rightclass'/>
<cd:constant name='rightcolor' value='barvavpravo'/>
<cd:constant name='rightcompoundhyphen' value='rightcompoundhyphen'/>
<cd:constant name='rightedge' value='pravahrana'/>
diff --git a/tex/context/interface/mkii/keys-it.xml b/tex/context/interface/mkii/keys-it.xml
index 8a2dc7180..eedcdaa82 100644
--- a/tex/context/interface/mkii/keys-it.xml
+++ b/tex/context/interface/mkii/keys-it.xml
@@ -876,6 +876,7 @@
<cd:constant name='frameradius' value='raggiocornice'/>
<cd:constant name='frames' value='cornici'/>
<cd:constant name='freeregion' value='freeregion'/>
+ <cd:constant name='freezespacing' value='freezespacing'/>
<cd:constant name='from' value='da'/>
<cd:constant name='functioncolor' value='functioncolor'/>
<cd:constant name='functionstyle' value='functionstyle'/>
@@ -956,6 +957,7 @@
<cd:constant name='lastpubsep' value='lastpubsep'/>
<cd:constant name='layout' value='layout'/>
<cd:constant name='left' value='sinistra'/>
+ <cd:constant name='leftclass' value='leftclass'/>
<cd:constant name='leftcolor' value='coloresinistra'/>
<cd:constant name='leftcompoundhyphen' value='leftcompoundhyphen'/>
<cd:constant name='leftedge' value='bordosinistro'/>
@@ -1014,6 +1016,7 @@
<cd:constant name='menu' value='menu'/>
<cd:constant name='method' value='metodo'/>
<cd:constant name='middle' value='centro'/>
+ <cd:constant name='middleclass' value='middleclass'/>
<cd:constant name='middlecolor' value='middlecolor'/>
<cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlesource' value='middlesource'/>
@@ -1060,6 +1063,8 @@
<cd:constant name='numberconversionset' value='numberconversionset'/>
<cd:constant name='numberdistance' value='numberdistance'/>
<cd:constant name='numbering' value='numerazione'/>
+ <cd:constant name='numberlocation' value='numberlocation'/>
+ <cd:constant name='numbermethod' value='numbermethod'/>
<cd:constant name='numberorder' value='numberorder'/>
<cd:constant name='numberprefix' value='numberprefix'/>
<cd:constant name='numbersegments' value='numbersegments'/>
@@ -1070,6 +1075,7 @@
<cd:constant name='numberstopper' value='numberstopper'/>
<cd:constant name='numberstrut' value='numberstrut'/>
<cd:constant name='numberstyle' value='stilenumero'/>
+ <cd:constant name='numberthreshold' value='numberthreshold'/>
<cd:constant name='numberwidth' value='numberwidth'/>
<cd:constant name='nx' value='nx'/>
<cd:constant name='ny' value='ny'/>
@@ -1123,6 +1129,7 @@
<cd:constant name='palet' value='tavolozza'/>
<cd:constant name='paper' value='carta'/>
<cd:constant name='paragraph' value='capoverso'/>
+ <cd:constant name='penalties' value='penalties'/>
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='metti'/>
<cd:constant name='placehead' value='mettitesta'/>
@@ -1176,6 +1183,7 @@
<cd:constant name='reverse' value='invertito'/>
<cd:constant name='right' value='destra'/>
<cd:constant name='rightchars' value='rightchars'/>
+ <cd:constant name='rightclass' value='rightclass'/>
<cd:constant name='rightcolor' value='coloredestra'/>
<cd:constant name='rightcompoundhyphen' value='rightcompoundhyphen'/>
<cd:constant name='rightedge' value='bordodestro'/>
diff --git a/tex/context/interface/mkii/keys-ro.xml b/tex/context/interface/mkii/keys-ro.xml
index 175143c2c..78255c1cc 100644
--- a/tex/context/interface/mkii/keys-ro.xml
+++ b/tex/context/interface/mkii/keys-ro.xml
@@ -876,6 +876,7 @@
<cd:constant name='frameradius' value='razaframe'/>
<cd:constant name='frames' value='frames'/>
<cd:constant name='freeregion' value='freeregion'/>
+ <cd:constant name='freezespacing' value='freezespacing'/>
<cd:constant name='from' value='dela'/>
<cd:constant name='functioncolor' value='functioncolor'/>
<cd:constant name='functionstyle' value='functionstyle'/>
@@ -956,6 +957,7 @@
<cd:constant name='lastpubsep' value='lastpubsep'/>
<cd:constant name='layout' value='layout'/>
<cd:constant name='left' value='stanga'/>
+ <cd:constant name='leftclass' value='leftclass'/>
<cd:constant name='leftcolor' value='culoarestanga'/>
<cd:constant name='leftcompoundhyphen' value='leftcompoundhyphen'/>
<cd:constant name='leftedge' value='bordurastanga'/>
@@ -1014,6 +1016,7 @@
<cd:constant name='menu' value='meniu'/>
<cd:constant name='method' value='metoda'/>
<cd:constant name='middle' value='mijloc'/>
+ <cd:constant name='middleclass' value='middleclass'/>
<cd:constant name='middlecolor' value='middlecolor'/>
<cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlesource' value='middlesource'/>
@@ -1126,6 +1129,7 @@
<cd:constant name='palet' value='paleta'/>
<cd:constant name='paper' value='hartie'/>
<cd:constant name='paragraph' value='paragraf'/>
+ <cd:constant name='penalties' value='penalties'/>
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='pune'/>
<cd:constant name='placehead' value='punetitlu'/>
@@ -1179,6 +1183,7 @@
<cd:constant name='reverse' value='reverse'/>
<cd:constant name='right' value='dreapta'/>
<cd:constant name='rightchars' value='rightchars'/>
+ <cd:constant name='rightclass' value='rightclass'/>
<cd:constant name='rightcolor' value='culoaredreapta'/>
<cd:constant name='rightcompoundhyphen' value='rightcompoundhyphen'/>
<cd:constant name='rightedge' value='borduradreapta'/>
diff --git a/tex/context/modules/mkiv/m-scite.mkiv b/tex/context/modules/mkiv/m-scite.mkiv
index a34d4921c..7686b0ec1 100644
--- a/tex/context/modules/mkiv/m-scite.mkiv
+++ b/tex/context/modules/mkiv/m-scite.mkiv
@@ -454,6 +454,7 @@ moduledata.scite = scite
\unexpanded\def\module_scite_buffer_inline[#1][#2]%
{\dontleavehmode
\begingroup
+ \lettypingparameter\c!margin\zeropoint
\setcatcodetable\ctxcatcodes % needed in xml
\ifsecondargument
\clf_scitelexbuffer{#2}{#1}%
@@ -465,6 +466,7 @@ moduledata.scite = scite
\module_scite_inherit_typing
\dontcomplain
\getbuffer[lex]%
+ \removeunwantedspaces
\endgroup}
\unexpanded\def\startInlineScite#1%
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 33524ae92..8379da1b8 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 : 2022-07-06 21:34
+-- merge date : 2022-07-24 12:17
do -- begin closure to overcome local limits and interference