summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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-tex.lua4
-rw-r--r--context/data/scite/context/scite-context-data-context.properties29
-rw-r--r--context/data/scite/context/scite-context-data-tex.properties53
-rw-r--r--context/data/textadept/context/data/scite-context-data-context.lua2
-rw-r--r--context/data/textadept/context/data/scite-context-data-tex.lua4
-rw-r--r--doc/context/documents/general/manuals/luatex.pdfbin1384272 -> 1392856 bytes
-rw-r--r--doc/context/documents/general/manuals/onandon.pdfbin3312529 -> 3326371 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin846978 -> 846819 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin845618 -> 845575 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin850668 -> 850578 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin845219 -> 845266 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin848501 -> 848482 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-cs.pdfbin359664 -> 359506 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-de.pdfbin442934 -> 442889 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-en.pdfbin356959 -> 356876 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-fr.pdfbin359479 -> 359529 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-it.pdfbin358599 -> 358569 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-nl.pdfbin357550 -> 357606 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-ro.pdfbin612007 -> 611991 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin841063 -> 841125 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin843757 -> 843749 bytes
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-enhancements.tex14
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-nodes.tex6
-rw-r--r--doc/context/sources/general/manuals/onandon/onandon-110.tex113
-rw-r--r--doc/context/sources/general/manuals/onandon/onandon.tex2
-rw-r--r--metapost/context/base/mpiv/mp-grap.mpiv28
-rw-r--r--scripts/context/lua/mtxrun.lua255
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua255
-rw-r--r--scripts/context/stubs/unix/mtxrun255
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua255
-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.mkii3
-rw-r--r--tex/context/base/mkii/mult-it.mkii1
-rw-r--r--tex/context/base/mkiv/attr-ini.mkiv4
-rw-r--r--tex/context/base/mkiv/buff-ver.lua2
-rw-r--r--tex/context/base/mkiv/char-ini.mkiv4
-rw-r--r--tex/context/base/mkiv/char-tex.lua18
-rw-r--r--tex/context/base/mkiv/cldf-bas.lua15
-rw-r--r--tex/context/base/mkiv/cldf-ini.lua471
-rw-r--r--tex/context/base/mkiv/cldf-scn.lua2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv5
-rw-r--r--tex/context/base/mkiv/core-env.lua6
-rw-r--r--tex/context/base/mkiv/core-env.mkiv12
-rw-r--r--tex/context/base/mkiv/data-res.lua2
-rw-r--r--tex/context/base/mkiv/file-job.lua3
-rw-r--r--tex/context/base/mkiv/font-dsp.lua212
-rw-r--r--tex/context/base/mkiv/font-otr.lua81
-rw-r--r--tex/context/base/mkiv/font-syn.lua2
-rw-r--r--tex/context/base/mkiv/font-ttf.lua69
-rw-r--r--tex/context/base/mkiv/l-dir.lua83
-rw-r--r--tex/context/base/mkiv/l-lpeg.lua8
-rw-r--r--tex/context/base/mkiv/l-os.lua7
-rw-r--r--tex/context/base/mkiv/l-table.lua3
-rw-r--r--tex/context/base/mkiv/luat-ini.mkiv127
-rw-r--r--tex/context/base/mkiv/lxml-ini.mkiv3
-rw-r--r--tex/context/base/mkiv/lxml-lpt.lua159
-rw-r--r--tex/context/base/mkiv/lxml-tex.lua296
-rw-r--r--tex/context/base/mkiv/math-ini.mkiv62
-rw-r--r--tex/context/base/mkiv/mult-low.lua6
-rw-r--r--tex/context/base/mkiv/mult-prm.lua21
-rw-r--r--tex/context/base/mkiv/spac-ver.mkiv6
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26151 -> 26071 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin257583 -> 259115 bytes
-rw-r--r--tex/context/base/mkiv/strc-mar.lua61
-rw-r--r--tex/context/base/mkiv/syst-aux.lua75
-rw-r--r--tex/context/base/mkiv/syst-ini.mkiv4
-rw-r--r--tex/context/base/mkiv/syst-lua.lua8
-rw-r--r--tex/context/base/mkiv/task-ini.lua1
-rw-r--r--tex/context/base/mkiv/toks-ini.lua108
-rw-r--r--tex/context/base/mkiv/toks-ini.mkiv5
-rw-r--r--tex/context/base/mkiv/toks-scn.mkiv22
-rw-r--r--tex/context/base/mkiv/util-fil.lua37
-rw-r--r--tex/context/base/mkiv/util-sac.lua37
-rw-r--r--tex/context/interface/mkii/keys-cs.xml3
-rw-r--r--tex/context/interface/mkii/keys-it.xml1
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin850668 -> 850578 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin61088 -> 61086 bytes
-rw-r--r--tex/context/modules/mkiv/s-fonts-shapes.lua33
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua216
82 files changed, 2355 insertions, 1232 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 59b64e2c6..80c92718f 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", "plussixteen", "plushundred", "plustwohundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip" },
- ["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", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "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", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "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", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installctxfunctioncall", "installprotectedctxfunction", "installprotectedctxfunctioncall", "installctxscanner", "installctxscannercall", "resetctxscanner", "installprotectedctxscanner", "installprotectedctxscannercall", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "frule", "compoundhyphenpenalty", "start", "stop" },
+ ["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", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "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", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "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", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "frule", "compoundhyphenpenalty", "start", "stop" },
} \ 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 57d66776c..d52347dcc 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,9 +1,9 @@
return {
["aleph"]={ "Alephminorversion", "Alephrevision", "Alephversion" },
["etex"]={ "botmarks", "clubpenalties", "currentgrouplevel", "currentgrouptype", "currentifbranch", "currentiflevel", "currentiftype", "detokenize", "dimexpr", "displaywidowpenalties", "eTeXVersion", "eTeXminorversion", "eTeXrevision", "eTeXversion", "everyeof", "firstmarks", "fontchardp", "fontcharht", "fontcharic", "fontcharwd", "glueexpr", "glueshrink", "glueshrinkorder", "gluestretch", "gluestretchorder", "gluetomu", "ifcsname", "ifdefined", "iffontchar", "interactionmode", "interlinepenalties", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "readline", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "tracingscantokens", "unexpanded", "unless", "widowpenalties" },
- ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "xtoksapp", "xtokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "glet", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "immediateassignment", "immediateassigned", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "gtoksapp", "gtokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource" },
+ ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "gtoksapp", "gtokspre", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifcondition", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "immediateassigned", "immediateassignment", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource", "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", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" },
- ["tex"]={ " ", "-", "/", "Uleft", "Umiddle", "Uright", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "boundary", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "closeout", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "csstring", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "firstvalidlanguage", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hoffset", "holdinginserts", "hpack", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "immediate", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noboundary", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "openout", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "protrusionboundary", "radical", "raise", "read", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "special", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tpack", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vpack", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "wordboundary", "write", "xdef", "xleaders", "xspaceskip", "year" },
+ ["tex"]={ " ", "-", "/", "Uleft", "Umiddle", "Uright", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "boundary", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "closeout", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "firstvalidlanguage", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "glet", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hoffset", "holdinginserts", "hpack", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "immediate", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noboundary", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "openout", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "protrusionboundary", "radical", "raise", "read", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "special", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tpack", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vpack", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "wordboundary", "write", "xdef", "xleaders", "xspaceskip", "year" },
["xetex"]={ "XeTeXversion" },
} \ No newline at end of file
diff --git a/context/data/scite/context/scite-context-data-context.properties b/context/data/scite/context/scite-context-data-context.properties
index 7fcc51646..860dee40f 100644
--- a/context/data/scite/context/scite-context-data-context.properties
+++ b/context/data/scite/context/scite-context-data-context.properties
@@ -216,19 +216,18 @@ registerctxluafile ctxloadluafile luaversion luamajorversion luaminorversion \
ctxluacode luaconditional luaexpanded startluaparameterset stopluaparameterset \
luaparameterset definenamedlua obeylualines obeyluatokens startluacode \
stopluacode startlua stoplua startctxfunction stopctxfunction \
-ctxfunction startctxfunctiondefinition stopctxfunctiondefinition installctxfunction installctxfunctioncall \
-installprotectedctxfunction installprotectedctxfunctioncall installctxscanner installctxscannercall resetctxscanner \
-installprotectedctxscanner installprotectedctxscannercall cldprocessfile cldloadfile cldloadviafile \
-cldcontext cldcommand carryoverpar lastlinewidth assumelongusagecs \
-Umathbotaccent righttolefthbox lefttorighthbox righttoleftvbox lefttorightvbox \
-righttoleftvtop lefttorightvtop rtlhbox ltrhbox rtlvbox \
-ltrvbox rtlvtop ltrvtop autodirhbox autodirvbox \
-autodirvtop leftorrighthbox leftorrightvbox leftorrightvtop lefttoright \
-righttoleft checkedlefttoright checkedrighttoleft synchronizelayoutdirection synchronizedisplaydirection \
-synchronizeinlinedirection dirlre dirrle dirlro dirrlo \
-lesshyphens morehyphens nohyphens dohyphens Ucheckedstartdisplaymath \
-Ucheckedstopdisplaymath break nobreak allowbreak goodbreak \
-nospace nospacing dospacing naturalhbox naturalvbox \
-naturalvtop naturalhpack naturalvpack frule compoundhyphenpenalty \
-start stop
+ctxfunction startctxfunctiondefinition stopctxfunctiondefinition installctxfunction installprotectedctxfunction \
+installprotectedctxscanner installctxscanner resetctxscanner cldprocessfile cldloadfile \
+cldloadviafile cldcontext cldcommand carryoverpar lastlinewidth \
+assumelongusagecs Umathbotaccent righttolefthbox lefttorighthbox righttoleftvbox \
+lefttorightvbox righttoleftvtop lefttorightvtop rtlhbox ltrhbox \
+rtlvbox ltrvbox rtlvtop ltrvtop autodirhbox \
+autodirvbox autodirvtop leftorrighthbox leftorrightvbox leftorrightvtop \
+lefttoright righttoleft checkedlefttoright checkedrighttoleft synchronizelayoutdirection \
+synchronizedisplaydirection synchronizeinlinedirection dirlre dirrle dirlro \
+dirrlo lesshyphens morehyphens nohyphens dohyphens \
+Ucheckedstartdisplaymath Ucheckedstopdisplaymath break nobreak allowbreak \
+goodbreak nospace nospacing dospacing naturalhbox \
+naturalvbox naturalvtop naturalhpack naturalvpack frule \
+compoundhyphenpenalty start stop
diff --git a/context/data/scite/context/scite-context-data-tex.properties b/context/data/scite/context/scite-context-data-tex.properties
index 4a9418b32..b0847982d 100644
--- a/context/data/scite/context/scite-context-data-tex.properties
+++ b/context/data/scite/context/scite-context-data-tex.properties
@@ -50,17 +50,18 @@ Uunderdelimiter Uvextensible adjustspacing alignmark aligntab \
attribute attributedef automaticdiscretionary automatichyphenmode automatichyphenpenalty \
begincsname bodydir bodydirection boxdir boxdirection \
breakafterdirmode catcodetable clearmarks compoundhyphenmode copyfont \
-crampeddisplaystyle crampedscriptscriptstyle crampedscriptstyle crampedtextstyle draftmode \
-dviextension dvifeedback dvivariable efcode etoksapp \
-etokspre xtoksapp xtokspre exceptionpenalty expanded \
-expandglyphsinfont explicitdiscretionary explicithyphenpenalty fontid formatname \
-gleaders glet hjcode hyphenationbounds hyphenationmin \
-hyphenpenaltymode ifabsdim ifabsnum ifincsname ifprimitive \
-ignoreligaturesinfont immediateassignment immediateassigned initcatcodetable insertht \
-lastnamedcs lastsavedboxresourceindex lastsavedimageresourceindex lastsavedimageresourcepages lastxpos \
-lastypos latelua leftghost leftmarginkern letcharcode \
-letterspacefont linedir linedirection localbrokenpenalty localinterlinepenalty \
-localleftbox localrightbox lpcode luaescapestring luafunction \
+crampeddisplaystyle crampedscriptscriptstyle crampedscriptstyle crampedtextstyle csstring \
+draftmode dviextension dvifeedback dvivariable efcode \
+etoksapp etokspre exceptionpenalty expanded expandglyphsinfont \
+explicitdiscretionary explicithyphenpenalty fontid formatname gleaders \
+gtoksapp gtokspre hjcode hyphenationbounds hyphenationmin \
+hyphenpenaltymode ifabsdim ifabsnum ifcondition ifincsname \
+ifprimitive ignoreligaturesinfont immediateassigned immediateassignment initcatcodetable \
+insertht lastnamedcs lastsavedboxresourceindex lastsavedimageresourceindex lastsavedimageresourcepages \
+lastxpos lastypos latelua leftghost leftmarginkern \
+letcharcode letterspacefont linedir linedirection localbrokenpenalty \
+localinterlinepenalty localleftbox localrightbox lpcode luabytecode \
+luabytecodecall luacopyinputnodes luadef luaescapestring luafunction \
luafunctioncall luatexbanner luatexrevision luatexversion mathdelimitersmode \
mathdir mathdirection mathdisplayskipmode matheqnogapstep mathflattenmode \
mathitalicsmode mathnolimitsmode mathoption mathpenaltiesmode mathrulesfam \
@@ -76,8 +77,8 @@ randomseed rightghost rightmarginkern rpcode saveboxresource \
savecatcodetable saveimageresource savepos scantextokens setfontid \
setrandomseed shapemode suppressfontnotfounderror suppressifcsnameerror suppresslongerror \
suppressmathparerror suppressoutererror suppressprimitiveerror synctex tagcode \
-textdir textdirection toksapp tokspre gtoksapp \
-gtokspre tracingfonts uniformdeviate useboxresource useimageresource
+textdir textdirection toksapp tokspre tracingfonts \
+uniformdeviate useboxresource useimageresource xtoksapp xtokspre
keywordclass.tex.omega=\
Omegaminorversion Omegarevision Omegaversion
@@ -115,19 +116,19 @@ batchmode begingroup belowdisplayshortskip belowdisplayskip binoppenalty \
botmark boundary box boxmaxdepth brokenpenalty \
catcode char chardef cleaders closein \
closeout clubpenalty copy count countdef \
-cr crcr csname csstring day \
-deadcycles def defaulthyphenchar defaultskewchar delcode \
-delimiter delimiterfactor delimitershortfall dimen dimendef \
-directlua discretionary displayindent displaylimits displaystyle \
-displaywidowpenalty displaywidth divide doublehyphendemerits dp \
-dump edef else emergencystretch end \
-endcsname endgroup endinput endlinechar eqno \
-errhelp errmessage errorcontextlines errorstopmode escapechar \
-everycr everydisplay everyhbox everyjob everymath \
-everypar everyvbox exhyphenchar exhyphenpenalty expandafter \
-fam fi finalhyphendemerits firstmark firstvalidlanguage \
-floatingpenalty font fontdimen fontname futurelet \
-gdef global globaldefs halign hangafter \
+cr crcr csname day deadcycles \
+def defaulthyphenchar defaultskewchar delcode delimiter \
+delimiterfactor delimitershortfall dimen dimendef directlua \
+discretionary displayindent displaylimits displaystyle displaywidowpenalty \
+displaywidth divide doublehyphendemerits dp dump \
+edef else emergencystretch end endcsname \
+endgroup endinput endlinechar eqno errhelp \
+errmessage errorcontextlines errorstopmode escapechar everycr \
+everydisplay everyhbox everyjob everymath everypar \
+everyvbox exhyphenchar exhyphenpenalty expandafter fam \
+fi finalhyphendemerits firstmark firstvalidlanguage floatingpenalty \
+font fontdimen fontname futurelet gdef \
+glet global globaldefs halign hangafter \
hangindent hbadness hbox hfil hfill \
hfilneg hfuzz hoffset holdinginserts hpack \
hrule hsize hskip hss ht \
diff --git a/context/data/textadept/context/data/scite-context-data-context.lua b/context/data/textadept/context/data/scite-context-data-context.lua
index 59b64e2c6..80c92718f 100644
--- a/context/data/textadept/context/data/scite-context-data-context.lua
+++ b/context/data/textadept/context/data/scite-context-data-context.lua
@@ -1,4 +1,4 @@
return {
["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred", "plustwohundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip" },
- ["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", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "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", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "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", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installctxfunctioncall", "installprotectedctxfunction", "installprotectedctxfunctioncall", "installctxscanner", "installctxscannercall", "resetctxscanner", "installprotectedctxscanner", "installprotectedctxscannercall", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "frule", "compoundhyphenpenalty", "start", "stop" },
+ ["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", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "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", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "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", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "frule", "compoundhyphenpenalty", "start", "stop" },
} \ No newline at end of file
diff --git a/context/data/textadept/context/data/scite-context-data-tex.lua b/context/data/textadept/context/data/scite-context-data-tex.lua
index 57d66776c..d52347dcc 100644
--- a/context/data/textadept/context/data/scite-context-data-tex.lua
+++ b/context/data/textadept/context/data/scite-context-data-tex.lua
@@ -1,9 +1,9 @@
return {
["aleph"]={ "Alephminorversion", "Alephrevision", "Alephversion" },
["etex"]={ "botmarks", "clubpenalties", "currentgrouplevel", "currentgrouptype", "currentifbranch", "currentiflevel", "currentiftype", "detokenize", "dimexpr", "displaywidowpenalties", "eTeXVersion", "eTeXminorversion", "eTeXrevision", "eTeXversion", "everyeof", "firstmarks", "fontchardp", "fontcharht", "fontcharic", "fontcharwd", "glueexpr", "glueshrink", "glueshrinkorder", "gluestretch", "gluestretchorder", "gluetomu", "ifcsname", "ifdefined", "iffontchar", "interactionmode", "interlinepenalties", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "readline", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "tracingscantokens", "unexpanded", "unless", "widowpenalties" },
- ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "xtoksapp", "xtokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "glet", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "immediateassignment", "immediateassigned", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "gtoksapp", "gtokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource" },
+ ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "gtoksapp", "gtokspre", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifcondition", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "immediateassigned", "immediateassignment", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource", "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", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" },
- ["tex"]={ " ", "-", "/", "Uleft", "Umiddle", "Uright", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "boundary", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "closeout", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "csstring", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "firstvalidlanguage", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hoffset", "holdinginserts", "hpack", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "immediate", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noboundary", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "openout", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "protrusionboundary", "radical", "raise", "read", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "special", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tpack", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vpack", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "wordboundary", "write", "xdef", "xleaders", "xspaceskip", "year" },
+ ["tex"]={ " ", "-", "/", "Uleft", "Umiddle", "Uright", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "boundary", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "closeout", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "firstvalidlanguage", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "glet", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hoffset", "holdinginserts", "hpack", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "immediate", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noboundary", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "openout", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "protrusionboundary", "radical", "raise", "read", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "special", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tpack", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vpack", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "wordboundary", "write", "xdef", "xleaders", "xspaceskip", "year" },
["xetex"]={ "XeTeXversion" },
} \ No newline at end of file
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf
index 4d5a34676..b0c19c3a8 100644
--- a/doc/context/documents/general/manuals/luatex.pdf
+++ b/doc/context/documents/general/manuals/luatex.pdf
Binary files differ
diff --git a/doc/context/documents/general/manuals/onandon.pdf b/doc/context/documents/general/manuals/onandon.pdf
index 7fd98afb0..16eef6dc8 100644
--- a/doc/context/documents/general/manuals/onandon.pdf
+++ b/doc/context/documents/general/manuals/onandon.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index 1acda5388..a6f330af2 100644
--- a/doc/context/documents/general/qrcs/setup-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf
index 75666c82b..12d60d994 100644
--- a/doc/context/documents/general/qrcs/setup-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf
index 77855e8c0..43387f6a1 100644
--- a/doc/context/documents/general/qrcs/setup-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf
index 491e647df..fe6870541 100644
--- a/doc/context/documents/general/qrcs/setup-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf
index 767a79d03..405880b5d 100644
--- a/doc/context/documents/general/qrcs/setup-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
index a136f976f..d726bd883 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf
index b677cddab..88ad41a0d 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf
index ae4117ff0..762c5c56e 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
index 749fed664..d7ec4ff21 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf
index 337068bd6..15981436a 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
index dc396e38e..2b80971be 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
index 91365f93f..4bb508c2e 100644
--- a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf
index 0b53962af..1f1ced3a4 100644
--- a/doc/context/documents/general/qrcs/setup-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf
index 20be9a004..323e98812 100644
--- a/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex b/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
index 1cf9bae41..243dc6985 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
@@ -40,7 +40,7 @@ assumes that you have executed the \prm {directlua} command as given above.
The startup behaviour documented above is considered stable in the sense that
there will not be backward|-|incompatible changes any more. We have promoted some
rather generic \PDFTEX\ primitives to core \LUATEX\ ones, and the ones inherited
-frome \ALEPH\ (\OMEGA) are also promoted. Effectively this means that we now only
+from \ALEPH\ (\OMEGA) are also promoted. Effectively this means that we now only
have the \type {tex}, \type {etex} and \type {luatex} sets left.
In \in {Chapter} [modifications] we discuss several primitives that are derived
@@ -466,7 +466,7 @@ in a separate file and load it using \LUA's \type {dofile}:
\directlua { dofile('mysetups.lua') }
\stoptyping
-\subsection{\lpr {luafunction} and \lpr {luafunctioncall}}
+\subsection{\lpr {luafunction}, \lpr {luafunctioncall} and \lpr {luadef}}
The \prm {directlua} commands involves tokenization of its argument (after
picking up an optional name or number specification). The tokenlist is then
@@ -500,7 +500,15 @@ in the following example the number \type {8} gets typeset.
\stoptyping
The \lpr {luafunctioncall} primitive does the same but is unexpandable, for
-instance in an \prm {edef}.
+instance in an \prm {edef}. In addition \LUATEX\ provides a definer:
+
+\starttyping
+ \luadef\MyFunctionA 1
+ \global\luadef\MyFunctionB 2
+\protected\global\luadef\MyFunctionC 3
+\stoptyping
+
+
\subsection{\lpr {luabytecode} and \lpr {luabytecodecall}}
diff --git a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
index e354a643c..8b8668b3e 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
@@ -1217,12 +1217,12 @@ can be handy for tracing.
\topicindex {nodes+functions}
\startfunctioncall
-<boolean> t =
+<boolean|integer> t =
node.is_node(<any> item)
\stopfunctioncall
-This function returns true if the argument is a userdata object of
-type \type {<node>}.
+This function returns a number (the internal index of the node) if the argument
+is a userdata object of type \type {<node>} and false when no node is passed.
\subsubsection{\type {node.types}}
diff --git a/doc/context/sources/general/manuals/onandon/onandon-110.tex b/doc/context/sources/general/manuals/onandon/onandon-110.tex
new file mode 100644
index 000000000..78ec96588
--- /dev/null
+++ b/doc/context/sources/general/manuals/onandon/onandon-110.tex
@@ -0,0 +1,113 @@
+% language=uk
+
+% After watching \quotation {What Makes This Song Great 30: Alanis Morisette} by
+% Rick Beato, it's tempting to poder \quotation {What makes \TEX\ great}.
+
+\startcomponent onandon-110
+
+\environment onandon-environment
+
+\startchapter[title={Getting there, version 1.10}]
+
+When we decided to turn experiments with a \LUA\ extensions to \PDFTEX\ into
+developing \LUATEX\ as alternative engine we had, in addition to opening up some
+of \TEX's internals, some extensions in mind. Around version 1.00 most was
+already achieved and with version 1.10 we're pretty close to where we want to be.
+The question is, when are we ready? In order to answer that I will look at four
+aspects:
+
+\startitemize[packed]
+\startitem objectives \stopitem
+\startitem functionality \stopitem
+\startitem performance \stopitem
+\startitem stability \stopitem
+\stopitemize
+
+The main {\em objective} was to open up \TEX\ in a way that permit extensions
+without the need to patch the engine. Although it might suit us, we don't want to
+change too much the internals, first of all because \TEX\ is \TEX, the documented
+program with a large legacy. \footnote {This is reflected in the keywords that
+exposed mechanisms use: they reflect internal variable names and constants and as
+a consequence there is inconsistency there.} Discussions about how to extend
+\TEX\ are not easy and seldom lead to an agreement so better is to provide a way
+to do what you like without bothering other users and|/|or interfering with macro
+packages. I think that this objective is met quite well now. Other objectives,
+like embedding basic graphic capabilities using \METAPOST\ have already been met
+long ago. There is more control over the backend and modern fonts can be dealt
+with.
+
+The {\em functionality} in terms of primitives has been extended but within
+reasonable bounds: we only added things that make coding a bit more natural but
+we realize that this is very subjective. So, here again we can say that we met
+our goals. A lot can be achieved via \LUA\ code and users and developers need to
+get accustomed to that if they want to move on with \LUATEX. We will not
+introduce features that get added to or are part of other engines.
+
+We wanted to keeping {\em performance} acceptable. The core \TEX\ engine is
+already pretty fast and it's often the implementation of macros (in macro
+packages) that creates a performance hit. Going \UTF\ has a price as do modern
+fonts. At the time of this writing processing the 270 page \LUATEX\ manual takes
+about 12 seconds (one run), which boils down to over 27 pages per second.
+
+\starttabulate[||c|c|]
+\NC \BC runtime \BC overhead \NC \NR
+\BC \LUATEX \NC $12.0$ \NC $+0.6$ \NC \NR
+\BC \LUAJITTEX \NC $ 9.7$ \NC $+0.5$ \NC \NR
+\stoptabulate
+
+Is this fast or slow? One can do tests with specific improvements (using new
+primitives) but in practice it's very hard to improve performance significantly.
+This is because a test with millions of calls that show a .05 second improvement
+disappears when one only has a few thousand calls. Many small improvements can
+add up, but less that one thinks, especially when macros are already quite
+optimal. Also this runtime includes time normally used for running additional
+programs (e.g.\ for getting bibliographies right).
+
+You also have to take into account that having a browser open in the background
+of a \TEX\ run has way more impact than a few tenths of a second in \LUATEX\
+performance. The same is true for memory usage: why bother about \LUATEX\ taking
+tens of megabytes for fonts while a few tabs in a browser can bump memory
+consumption to gigabytes of memory usage. Also, using a large \TEX\ tree (say the
+whole of \TEXLIVE) can have a bit of a performance hit! Or what about inefficient
+callbacks, using inefficient \LUA\ code of badly designed solutions? What we
+could gain here we loose there, so I think we can safely say that the current
+implementation of \LUATEX\ is as good as you can (and will) get. Why should we
+introduce obscure optimizations where on workstations \TEX\ is just one of the
+many processes? Why should we bother too much to speed up on servers that have
+start|-|up or job management overhead or are connected to relatively slow remote
+file system? Why squeeze out a few more milliseconds when badly written macros or
+styles can have an way more impact on performance? So, for now we're satisfied
+with performance. Just for the record, the ratio between \CONTEXT\ \MKII\
+running other engines and \LUATEX\ with \MKIV\ for the next snippet of code:
+
+\starttyping
+\dorecurse{250}{\input tufte\par}
+\stoptyping
+
+is 2.8 seconds for \XETEX, 1.5 seconds for \LUATEX, 1.2 seconds for \LUAJITTEX,
+and 0.9 seconds for \PDFTEX. Of course this is not really a practical test but it
+demonstrates the baseline performance on just text. The 64 bit version of \PDFTEX\
+is actually quite a bit slower on my machine. Anyway, \LUATEX\ (1.09) with \MKIV\
+is doing okey here.
+
+That brings us to {\em stability}. In order to achieve that we will not introduce
+many more extensions. That way users get accustomed to what is there (read: there
+is no need to search for what else is possible). Also, it makes that existing
+functionality can become bug free because no new features can interfere. So, at
+some point we have to decide that this is it. If we can do what we want now,
+there are no strong arguments for more. in that perspective version 1.10 can be
+considered very close to what we want to achieve.
+
+Of course development will continue. For instance, the \PDF\ inclusion code will
+be replaced by more lightweight and independent code. Names of functions and
+symbolic constants might be normalized (as mentioned, currently they are often
+related to or derived from internals). More documentation will be added. We will
+quite probably keep up with \LUA\ versions. Also the \FFI\ interface will become
+more stable. And for sure bugs will be fixed. We might add a few more options to
+control behaviour of for instance of math rendering. Some tricky internals (like
+alignments) might get better attribute support if possible. But currently we
+think that most fundamental issues have been dealt with.
+
+\stopchapter
+
+\stopcomponent
diff --git a/doc/context/sources/general/manuals/onandon/onandon.tex b/doc/context/sources/general/manuals/onandon/onandon.tex
index 593de3e75..65a7f5712 100644
--- a/doc/context/sources/general/manuals/onandon/onandon.tex
+++ b/doc/context/sources/general/manuals/onandon/onandon.tex
@@ -67,6 +67,8 @@
\startchapter[title={More expansion}] Maybe first published in user group magazines. \stopchapter
% \component onandon-expansion
+
+ \component onandon-110
\stopbodymatter
\stopproduct
diff --git a/metapost/context/base/mpiv/mp-grap.mpiv b/metapost/context/base/mpiv/mp-grap.mpiv
index e799f629c..0299c0587 100644
--- a/metapost/context/base/mpiv/mp-grap.mpiv
+++ b/metapost/context/base/mpiv/mp-grap.mpiv
@@ -266,19 +266,27 @@ enddef ;
graph_margin_fraction.low=-.07 ; % bbox fraction for default range start
graph_margin_fraction.high=1.07 ; % bbox fraction for default range stop
+%def graph_with_pen_and_color(expr q) =
+% withpen penpart q
+% withcolor
+% if colormodel q=1 :
+% false
+% elseif colormodel q=3 :
+% (greypart q)
+% elseif colormodel q=5 :
+% (redpart q, greenpart q, bluepart q)
+% elseif colormodel q=7 :
+% (cyanpart q, magentapart q, yellowpart q, blackpart q)
+% fi
+% withprescript prescriptpart q
+% withpostscript postscriptpart q
+%enddef ;
+
def graph_with_pen_and_color(expr q) =
- withpen penpart q withcolor
- if colormodel q=1 :
- false
- elseif colormodel q=3 :
- (greypart q)
- elseif colormodel q=5 :
- (redpart q, greenpart q, bluepart q)
- elseif colormodel q=7 :
- (cyanpart q, magentapart q, yellowpart q, blackpart q)
- fi
+ withproperties q
enddef ;
+
% Add picture component q to picture @# and change part p to tp,
% where p is something from q that needs coordinate transformation.
% The type of p is pair or path.
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index dfc90ac56..4e8678e04 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -981,7 +981,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 39305, stripped down to: 21144
+-- original size: 39398, stripped down to: 21142
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -1150,8 +1150,8 @@ patterns.propername=(uppercase+lowercase+underscore)*(uppercase+lowercase+unders
patterns.somecontent=(anything-newline-space)^1
patterns.beginline=#(1-newline)
patterns.longtostring=Cs(whitespace^0/""*((patterns.quoted+nonwhitespace^1+whitespace^1/""*(P(-1)+Cc(" ")))^0))
-local function anywhere(pattern)
- return P { P(pattern)+1*V(1) }
+function anywhere(pattern)
+ return (1-P(pattern))^0*P(pattern)
end
lpeg.anywhere=anywhere
function lpeg.instringchecker(p)
@@ -1946,7 +1946,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-table"] = package.loaded["l-table"] or true
--- original size: 40782, stripped down to: 23986
+-- original size: 40802, stripped down to: 24000
if not modules then modules={} end modules ['l-table']={
version=1.001,
@@ -2861,8 +2861,9 @@ end
function table.reverse(t)
if t then
local n=#t
+ local m=n+1
for i=1,floor(n/2) do
- local j=n-i+1
+ local j=m-i
t[i],t[j]=t[j],t[i]
end
return t
@@ -3583,7 +3584,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-os"] = package.loaded["l-os"] or true
--- original size: 16592, stripped down to: 9462
+-- original size: 16683, stripped down to: 9462
if not modules then modules={} end modules ['l-os']={
version=1.001,
@@ -4778,7 +4779,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-dir"] = package.loaded["l-dir"] or true
--- original size: 17703, stripped down to: 11691
+-- original size: 18035, stripped down to: 11890
if not modules then modules={} end modules ['l-dir']={
version=1.001,
@@ -4842,6 +4843,8 @@ local function glob_pattern_function(path,patt,recurse,action)
usedpath=path
end
local dirs
+ local nofdirs=0
+ local noffiles=#result
for name in walkdir(usedpath) do
if name~="." and name~=".." then
local full=path..name
@@ -4851,16 +4854,18 @@ local function glob_pattern_function(path,patt,recurse,action)
action(full)
end
elseif recurse and mode=="directory" then
- if not dirs then
- dirs={ full }
+ if dirs then
+ nofdirs=nofdirs+1
+ dirs[nofdirs]=full
else
- dirs[#dirs+1]=full
+ nofdirs=1
+ dirs={ full }
end
end
end
end
if dirs then
- for i=1,#dirs do
+ for i=1,nofdirs do
glob_pattern_function(dirs[i],patt,recurse,action)
end
end
@@ -4870,38 +4875,41 @@ local function glob_pattern_table(path,patt,recurse,result)
if not result then
result={}
end
- if isdir(path) then
- local usedpath
- if path=="/" then
- usedpath="/."
- elseif not find(path,"/$") then
- usedpath=path.."/."
- path=path.."/"
- else
- usedpath=path
- end
- local dirs
- for name in walkdir(usedpath) do
- if name~="." and name~=".." then
- local full=path..name
- local mode=attributes(full,'mode')
- if mode=='file' then
- if not patt or find(full,patt) then
- result[#result+1]=full
- end
- elseif recurse and mode=="directory" then
- if not dirs then
- dirs={ full }
- else
- dirs[#dirs+1]=full
- end
+ local usedpath
+ if path=="/" then
+ usedpath="/."
+ elseif not find(path,"/$") then
+ usedpath=path.."/."
+ path=path.."/"
+ else
+ usedpath=path
+ end
+ local dirs
+ local nofdirs=0
+ local noffiles=#result
+ for name,a in walkdir(usedpath) do
+ if name~="." and name~=".." then
+ local full=path..name
+ local mode=attributes(full,'mode')
+ if mode=='file' then
+ if not patt or find(full,patt) then
+ noffiles=noffiles+1
+ result[noffiles]=full
+ end
+ elseif recurse and mode=="directory" then
+ if dirs then
+ nofdirs=nofdirs+1
+ dirs[nofdirs]=full
+ else
+ nofdirs=1
+ dirs={ full }
end
end
end
- if dirs then
- for i=1,#dirs do
- glob_pattern_table(dirs[i],patt,recurse,result)
- end
+ end
+ if dirs then
+ for i=1,nofdirs do
+ glob_pattern_table(dirs[i],patt,recurse,result)
end
end
return result
@@ -4911,12 +4919,13 @@ local function globpattern(path,patt,recurse,method)
if patt and sub(patt,1,-3)==path then
patt=false
end
+ local okay=isdir(path)
if kind=="function" then
- return glob_pattern_function(path,patt,recurse,method)
+ return okay and glob_pattern_function(path,patt,recurse,method) or {}
elseif kind=="table" then
- return glob_pattern_table(path,patt,recurse,method)
+ return okay and glob_pattern_table(path,patt,recurse,method) or method
else
- return glob_pattern_table(path,patt,recurse,{})
+ return okay and glob_pattern_table(path,patt,recurse,{}) or {}
end
end
dir.globpattern=globpattern
@@ -7604,7 +7613,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-fil"] = package.loaded["util-fil"] or true
--- original size: 7787, stripped down to: 5858
+-- original size: 9034, stripped down to: 6958
if not modules then modules={} end modules ['util-fil']={
version=1.001,
@@ -7866,6 +7875,35 @@ if fio and fio.readcardinal1 then
skipposition(f,4*(n or 1))
end
end
+if fio and fio.readcardinaltable then
+ files.readcardinaltable=fio.readcardinaltable
+ files.readintegertable=fio.readintegertable
+else
+ local readcardinal1=files.readcardinal1
+ local readcardinal2=files.readcardinal2
+ local readcardinal3=files.readcardinal3
+ local readcardinal4=files.readcardinal4
+ function files.readcardinaltable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readcardinal1(f) end
+ elseif b==2 then for i=1,n do t[i]=readcardinal2(f) end
+ elseif b==3 then for i=1,n do t[i]=readcardinal3(f) end
+ elseif b==4 then for i=1,n do t[i]=readcardinal4(f) end end
+ return t
+ end
+ local readinteger1=files.readinteger1
+ local readinteger2=files.readinteger2
+ local readinteger3=files.readinteger3
+ local readinteger4=files.readinteger4
+ function files.readintegertable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readinteger1(f) end
+ elseif b==2 then for i=1,n do t[i]=readinteger2(f) end
+ elseif b==3 then for i=1,n do t[i]=readinteger3(f) end
+ elseif b==4 then for i=1,n do t[i]=readinteger4(f) end end
+ return t
+ end
+end
end -- of closure
@@ -7874,7 +7912,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 8716, stripped down to: 6754
+-- original size: 9987, stripped down to: 7878
if not modules then modules={} end modules ['util-sac']={
version=1.001,
@@ -8207,6 +8245,35 @@ if sio and sio.readcardinal2 then
streams.readcardinal=streams.readcardinal1
streams.readinteger=streams.readinteger1
end
+if sio and sio.readcardinaltable then
+ streams.readcardinaltable=sio.readcardinaltable
+ streams.readintegertable=sio.readintegertable
+else
+ local readcardinal1=streams.readcardinal1
+ local readcardinal2=streams.readcardinal2
+ local readcardinal3=streams.readcardinal3
+ local readcardinal4=streams.readcardinal4
+ function streams.readcardinaltable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readcardinal1(f) end
+ elseif b==2 then for i=1,n do t[i]=readcardinal2(f) end
+ elseif b==3 then for i=1,n do t[i]=readcardinal3(f) end
+ elseif b==4 then for i=1,n do t[i]=readcardinal4(f) end end
+ return t
+ end
+ local readinteger1=streams.readinteger1
+ local readinteger2=streams.readinteger2
+ local readinteger3=streams.readinteger3
+ local readinteger4=streams.readinteger4
+ function streams.readintegertable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readinteger1(f) end
+ elseif b==2 then for i=1,n do t[i]=readinteger2(f) end
+ elseif b==3 then for i=1,n do t[i]=readinteger3(f) end
+ elseif b==4 then for i=1,n do t[i]=readinteger4(f) end end
+ return t
+ end
+end
end -- of closure
@@ -13668,7 +13735,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 53326, stripped down to: 32477
+-- original size: 54551, stripped down to: 33353
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -13753,18 +13820,32 @@ apply_axis['child']=function(list)
local ll=list[l]
local dt=ll.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ ll.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
+ ll.en=1
end
+ else
+ local en=0
+ for k=1,#dt do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ end
+ end
+ ll.en=en
end
- ll.en=en
end
end
return collected
@@ -13772,19 +13853,36 @@ end
local function collect(list,collected,c)
local dt=list.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ list.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
c=collect(dk,collected,c)
+ list.en=1
+ else
+ list.en=0
+ end
+ else
+ local en=0
+ for k=1,n do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ c=collect(dk,collected,c)
+ end
end
+ list.en=en
end
- list.en=en
end
return c
end
@@ -13798,19 +13896,34 @@ end
local function collect(list,collected,c)
local dt=list.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ list.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
c=collect(dk,collected,c)
+ list.en=1
+ end
+ else
+ local en=0
+ for k=1,#dt do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ c=collect(dk,collected,c)
+ end
end
+ list.en=en
end
- list.en=en
end
return c
end
@@ -17792,7 +17905,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-res"] = package.loaded["data-res"] or true
--- original size: 68261, stripped down to: 47789
+-- original size: 68255, stripped down to: 47783
if not modules then modules={} end modules ['data-res']={
version=1.001,
@@ -19366,7 +19479,7 @@ function resolvers.dowithfilesintree(pattern,handle,before,after)
end
end
if after then
- after(blobtype,blobpath,pattern,total,checked,done)
+ after(blobtype,blobpath,pattern,checked,done)
end
end
end
@@ -21478,8 +21591,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 882905
--- stripped bytes : 319293
+-- original bytes : 887178
+-- stripped bytes : 320261
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index dfc90ac56..4e8678e04 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -981,7 +981,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 39305, stripped down to: 21144
+-- original size: 39398, stripped down to: 21142
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -1150,8 +1150,8 @@ patterns.propername=(uppercase+lowercase+underscore)*(uppercase+lowercase+unders
patterns.somecontent=(anything-newline-space)^1
patterns.beginline=#(1-newline)
patterns.longtostring=Cs(whitespace^0/""*((patterns.quoted+nonwhitespace^1+whitespace^1/""*(P(-1)+Cc(" ")))^0))
-local function anywhere(pattern)
- return P { P(pattern)+1*V(1) }
+function anywhere(pattern)
+ return (1-P(pattern))^0*P(pattern)
end
lpeg.anywhere=anywhere
function lpeg.instringchecker(p)
@@ -1946,7 +1946,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-table"] = package.loaded["l-table"] or true
--- original size: 40782, stripped down to: 23986
+-- original size: 40802, stripped down to: 24000
if not modules then modules={} end modules ['l-table']={
version=1.001,
@@ -2861,8 +2861,9 @@ end
function table.reverse(t)
if t then
local n=#t
+ local m=n+1
for i=1,floor(n/2) do
- local j=n-i+1
+ local j=m-i
t[i],t[j]=t[j],t[i]
end
return t
@@ -3583,7 +3584,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-os"] = package.loaded["l-os"] or true
--- original size: 16592, stripped down to: 9462
+-- original size: 16683, stripped down to: 9462
if not modules then modules={} end modules ['l-os']={
version=1.001,
@@ -4778,7 +4779,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-dir"] = package.loaded["l-dir"] or true
--- original size: 17703, stripped down to: 11691
+-- original size: 18035, stripped down to: 11890
if not modules then modules={} end modules ['l-dir']={
version=1.001,
@@ -4842,6 +4843,8 @@ local function glob_pattern_function(path,patt,recurse,action)
usedpath=path
end
local dirs
+ local nofdirs=0
+ local noffiles=#result
for name in walkdir(usedpath) do
if name~="." and name~=".." then
local full=path..name
@@ -4851,16 +4854,18 @@ local function glob_pattern_function(path,patt,recurse,action)
action(full)
end
elseif recurse and mode=="directory" then
- if not dirs then
- dirs={ full }
+ if dirs then
+ nofdirs=nofdirs+1
+ dirs[nofdirs]=full
else
- dirs[#dirs+1]=full
+ nofdirs=1
+ dirs={ full }
end
end
end
end
if dirs then
- for i=1,#dirs do
+ for i=1,nofdirs do
glob_pattern_function(dirs[i],patt,recurse,action)
end
end
@@ -4870,38 +4875,41 @@ local function glob_pattern_table(path,patt,recurse,result)
if not result then
result={}
end
- if isdir(path) then
- local usedpath
- if path=="/" then
- usedpath="/."
- elseif not find(path,"/$") then
- usedpath=path.."/."
- path=path.."/"
- else
- usedpath=path
- end
- local dirs
- for name in walkdir(usedpath) do
- if name~="." and name~=".." then
- local full=path..name
- local mode=attributes(full,'mode')
- if mode=='file' then
- if not patt or find(full,patt) then
- result[#result+1]=full
- end
- elseif recurse and mode=="directory" then
- if not dirs then
- dirs={ full }
- else
- dirs[#dirs+1]=full
- end
+ local usedpath
+ if path=="/" then
+ usedpath="/."
+ elseif not find(path,"/$") then
+ usedpath=path.."/."
+ path=path.."/"
+ else
+ usedpath=path
+ end
+ local dirs
+ local nofdirs=0
+ local noffiles=#result
+ for name,a in walkdir(usedpath) do
+ if name~="." and name~=".." then
+ local full=path..name
+ local mode=attributes(full,'mode')
+ if mode=='file' then
+ if not patt or find(full,patt) then
+ noffiles=noffiles+1
+ result[noffiles]=full
+ end
+ elseif recurse and mode=="directory" then
+ if dirs then
+ nofdirs=nofdirs+1
+ dirs[nofdirs]=full
+ else
+ nofdirs=1
+ dirs={ full }
end
end
end
- if dirs then
- for i=1,#dirs do
- glob_pattern_table(dirs[i],patt,recurse,result)
- end
+ end
+ if dirs then
+ for i=1,nofdirs do
+ glob_pattern_table(dirs[i],patt,recurse,result)
end
end
return result
@@ -4911,12 +4919,13 @@ local function globpattern(path,patt,recurse,method)
if patt and sub(patt,1,-3)==path then
patt=false
end
+ local okay=isdir(path)
if kind=="function" then
- return glob_pattern_function(path,patt,recurse,method)
+ return okay and glob_pattern_function(path,patt,recurse,method) or {}
elseif kind=="table" then
- return glob_pattern_table(path,patt,recurse,method)
+ return okay and glob_pattern_table(path,patt,recurse,method) or method
else
- return glob_pattern_table(path,patt,recurse,{})
+ return okay and glob_pattern_table(path,patt,recurse,{}) or {}
end
end
dir.globpattern=globpattern
@@ -7604,7 +7613,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-fil"] = package.loaded["util-fil"] or true
--- original size: 7787, stripped down to: 5858
+-- original size: 9034, stripped down to: 6958
if not modules then modules={} end modules ['util-fil']={
version=1.001,
@@ -7866,6 +7875,35 @@ if fio and fio.readcardinal1 then
skipposition(f,4*(n or 1))
end
end
+if fio and fio.readcardinaltable then
+ files.readcardinaltable=fio.readcardinaltable
+ files.readintegertable=fio.readintegertable
+else
+ local readcardinal1=files.readcardinal1
+ local readcardinal2=files.readcardinal2
+ local readcardinal3=files.readcardinal3
+ local readcardinal4=files.readcardinal4
+ function files.readcardinaltable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readcardinal1(f) end
+ elseif b==2 then for i=1,n do t[i]=readcardinal2(f) end
+ elseif b==3 then for i=1,n do t[i]=readcardinal3(f) end
+ elseif b==4 then for i=1,n do t[i]=readcardinal4(f) end end
+ return t
+ end
+ local readinteger1=files.readinteger1
+ local readinteger2=files.readinteger2
+ local readinteger3=files.readinteger3
+ local readinteger4=files.readinteger4
+ function files.readintegertable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readinteger1(f) end
+ elseif b==2 then for i=1,n do t[i]=readinteger2(f) end
+ elseif b==3 then for i=1,n do t[i]=readinteger3(f) end
+ elseif b==4 then for i=1,n do t[i]=readinteger4(f) end end
+ return t
+ end
+end
end -- of closure
@@ -7874,7 +7912,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 8716, stripped down to: 6754
+-- original size: 9987, stripped down to: 7878
if not modules then modules={} end modules ['util-sac']={
version=1.001,
@@ -8207,6 +8245,35 @@ if sio and sio.readcardinal2 then
streams.readcardinal=streams.readcardinal1
streams.readinteger=streams.readinteger1
end
+if sio and sio.readcardinaltable then
+ streams.readcardinaltable=sio.readcardinaltable
+ streams.readintegertable=sio.readintegertable
+else
+ local readcardinal1=streams.readcardinal1
+ local readcardinal2=streams.readcardinal2
+ local readcardinal3=streams.readcardinal3
+ local readcardinal4=streams.readcardinal4
+ function streams.readcardinaltable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readcardinal1(f) end
+ elseif b==2 then for i=1,n do t[i]=readcardinal2(f) end
+ elseif b==3 then for i=1,n do t[i]=readcardinal3(f) end
+ elseif b==4 then for i=1,n do t[i]=readcardinal4(f) end end
+ return t
+ end
+ local readinteger1=streams.readinteger1
+ local readinteger2=streams.readinteger2
+ local readinteger3=streams.readinteger3
+ local readinteger4=streams.readinteger4
+ function streams.readintegertable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readinteger1(f) end
+ elseif b==2 then for i=1,n do t[i]=readinteger2(f) end
+ elseif b==3 then for i=1,n do t[i]=readinteger3(f) end
+ elseif b==4 then for i=1,n do t[i]=readinteger4(f) end end
+ return t
+ end
+end
end -- of closure
@@ -13668,7 +13735,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 53326, stripped down to: 32477
+-- original size: 54551, stripped down to: 33353
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -13753,18 +13820,32 @@ apply_axis['child']=function(list)
local ll=list[l]
local dt=ll.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ ll.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
+ ll.en=1
end
+ else
+ local en=0
+ for k=1,#dt do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ end
+ end
+ ll.en=en
end
- ll.en=en
end
end
return collected
@@ -13772,19 +13853,36 @@ end
local function collect(list,collected,c)
local dt=list.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ list.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
c=collect(dk,collected,c)
+ list.en=1
+ else
+ list.en=0
+ end
+ else
+ local en=0
+ for k=1,n do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ c=collect(dk,collected,c)
+ end
end
+ list.en=en
end
- list.en=en
end
return c
end
@@ -13798,19 +13896,34 @@ end
local function collect(list,collected,c)
local dt=list.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ list.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
c=collect(dk,collected,c)
+ list.en=1
+ end
+ else
+ local en=0
+ for k=1,#dt do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ c=collect(dk,collected,c)
+ end
end
+ list.en=en
end
- list.en=en
end
return c
end
@@ -17792,7 +17905,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-res"] = package.loaded["data-res"] or true
--- original size: 68261, stripped down to: 47789
+-- original size: 68255, stripped down to: 47783
if not modules then modules={} end modules ['data-res']={
version=1.001,
@@ -19366,7 +19479,7 @@ function resolvers.dowithfilesintree(pattern,handle,before,after)
end
end
if after then
- after(blobtype,blobpath,pattern,total,checked,done)
+ after(blobtype,blobpath,pattern,checked,done)
end
end
end
@@ -21478,8 +21591,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 882905
--- stripped bytes : 319293
+-- original bytes : 887178
+-- stripped bytes : 320261
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index dfc90ac56..4e8678e04 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -981,7 +981,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 39305, stripped down to: 21144
+-- original size: 39398, stripped down to: 21142
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -1150,8 +1150,8 @@ patterns.propername=(uppercase+lowercase+underscore)*(uppercase+lowercase+unders
patterns.somecontent=(anything-newline-space)^1
patterns.beginline=#(1-newline)
patterns.longtostring=Cs(whitespace^0/""*((patterns.quoted+nonwhitespace^1+whitespace^1/""*(P(-1)+Cc(" ")))^0))
-local function anywhere(pattern)
- return P { P(pattern)+1*V(1) }
+function anywhere(pattern)
+ return (1-P(pattern))^0*P(pattern)
end
lpeg.anywhere=anywhere
function lpeg.instringchecker(p)
@@ -1946,7 +1946,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-table"] = package.loaded["l-table"] or true
--- original size: 40782, stripped down to: 23986
+-- original size: 40802, stripped down to: 24000
if not modules then modules={} end modules ['l-table']={
version=1.001,
@@ -2861,8 +2861,9 @@ end
function table.reverse(t)
if t then
local n=#t
+ local m=n+1
for i=1,floor(n/2) do
- local j=n-i+1
+ local j=m-i
t[i],t[j]=t[j],t[i]
end
return t
@@ -3583,7 +3584,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-os"] = package.loaded["l-os"] or true
--- original size: 16592, stripped down to: 9462
+-- original size: 16683, stripped down to: 9462
if not modules then modules={} end modules ['l-os']={
version=1.001,
@@ -4778,7 +4779,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-dir"] = package.loaded["l-dir"] or true
--- original size: 17703, stripped down to: 11691
+-- original size: 18035, stripped down to: 11890
if not modules then modules={} end modules ['l-dir']={
version=1.001,
@@ -4842,6 +4843,8 @@ local function glob_pattern_function(path,patt,recurse,action)
usedpath=path
end
local dirs
+ local nofdirs=0
+ local noffiles=#result
for name in walkdir(usedpath) do
if name~="." and name~=".." then
local full=path..name
@@ -4851,16 +4854,18 @@ local function glob_pattern_function(path,patt,recurse,action)
action(full)
end
elseif recurse and mode=="directory" then
- if not dirs then
- dirs={ full }
+ if dirs then
+ nofdirs=nofdirs+1
+ dirs[nofdirs]=full
else
- dirs[#dirs+1]=full
+ nofdirs=1
+ dirs={ full }
end
end
end
end
if dirs then
- for i=1,#dirs do
+ for i=1,nofdirs do
glob_pattern_function(dirs[i],patt,recurse,action)
end
end
@@ -4870,38 +4875,41 @@ local function glob_pattern_table(path,patt,recurse,result)
if not result then
result={}
end
- if isdir(path) then
- local usedpath
- if path=="/" then
- usedpath="/."
- elseif not find(path,"/$") then
- usedpath=path.."/."
- path=path.."/"
- else
- usedpath=path
- end
- local dirs
- for name in walkdir(usedpath) do
- if name~="." and name~=".." then
- local full=path..name
- local mode=attributes(full,'mode')
- if mode=='file' then
- if not patt or find(full,patt) then
- result[#result+1]=full
- end
- elseif recurse and mode=="directory" then
- if not dirs then
- dirs={ full }
- else
- dirs[#dirs+1]=full
- end
+ local usedpath
+ if path=="/" then
+ usedpath="/."
+ elseif not find(path,"/$") then
+ usedpath=path.."/."
+ path=path.."/"
+ else
+ usedpath=path
+ end
+ local dirs
+ local nofdirs=0
+ local noffiles=#result
+ for name,a in walkdir(usedpath) do
+ if name~="." and name~=".." then
+ local full=path..name
+ local mode=attributes(full,'mode')
+ if mode=='file' then
+ if not patt or find(full,patt) then
+ noffiles=noffiles+1
+ result[noffiles]=full
+ end
+ elseif recurse and mode=="directory" then
+ if dirs then
+ nofdirs=nofdirs+1
+ dirs[nofdirs]=full
+ else
+ nofdirs=1
+ dirs={ full }
end
end
end
- if dirs then
- for i=1,#dirs do
- glob_pattern_table(dirs[i],patt,recurse,result)
- end
+ end
+ if dirs then
+ for i=1,nofdirs do
+ glob_pattern_table(dirs[i],patt,recurse,result)
end
end
return result
@@ -4911,12 +4919,13 @@ local function globpattern(path,patt,recurse,method)
if patt and sub(patt,1,-3)==path then
patt=false
end
+ local okay=isdir(path)
if kind=="function" then
- return glob_pattern_function(path,patt,recurse,method)
+ return okay and glob_pattern_function(path,patt,recurse,method) or {}
elseif kind=="table" then
- return glob_pattern_table(path,patt,recurse,method)
+ return okay and glob_pattern_table(path,patt,recurse,method) or method
else
- return glob_pattern_table(path,patt,recurse,{})
+ return okay and glob_pattern_table(path,patt,recurse,{}) or {}
end
end
dir.globpattern=globpattern
@@ -7604,7 +7613,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-fil"] = package.loaded["util-fil"] or true
--- original size: 7787, stripped down to: 5858
+-- original size: 9034, stripped down to: 6958
if not modules then modules={} end modules ['util-fil']={
version=1.001,
@@ -7866,6 +7875,35 @@ if fio and fio.readcardinal1 then
skipposition(f,4*(n or 1))
end
end
+if fio and fio.readcardinaltable then
+ files.readcardinaltable=fio.readcardinaltable
+ files.readintegertable=fio.readintegertable
+else
+ local readcardinal1=files.readcardinal1
+ local readcardinal2=files.readcardinal2
+ local readcardinal3=files.readcardinal3
+ local readcardinal4=files.readcardinal4
+ function files.readcardinaltable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readcardinal1(f) end
+ elseif b==2 then for i=1,n do t[i]=readcardinal2(f) end
+ elseif b==3 then for i=1,n do t[i]=readcardinal3(f) end
+ elseif b==4 then for i=1,n do t[i]=readcardinal4(f) end end
+ return t
+ end
+ local readinteger1=files.readinteger1
+ local readinteger2=files.readinteger2
+ local readinteger3=files.readinteger3
+ local readinteger4=files.readinteger4
+ function files.readintegertable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readinteger1(f) end
+ elseif b==2 then for i=1,n do t[i]=readinteger2(f) end
+ elseif b==3 then for i=1,n do t[i]=readinteger3(f) end
+ elseif b==4 then for i=1,n do t[i]=readinteger4(f) end end
+ return t
+ end
+end
end -- of closure
@@ -7874,7 +7912,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 8716, stripped down to: 6754
+-- original size: 9987, stripped down to: 7878
if not modules then modules={} end modules ['util-sac']={
version=1.001,
@@ -8207,6 +8245,35 @@ if sio and sio.readcardinal2 then
streams.readcardinal=streams.readcardinal1
streams.readinteger=streams.readinteger1
end
+if sio and sio.readcardinaltable then
+ streams.readcardinaltable=sio.readcardinaltable
+ streams.readintegertable=sio.readintegertable
+else
+ local readcardinal1=streams.readcardinal1
+ local readcardinal2=streams.readcardinal2
+ local readcardinal3=streams.readcardinal3
+ local readcardinal4=streams.readcardinal4
+ function streams.readcardinaltable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readcardinal1(f) end
+ elseif b==2 then for i=1,n do t[i]=readcardinal2(f) end
+ elseif b==3 then for i=1,n do t[i]=readcardinal3(f) end
+ elseif b==4 then for i=1,n do t[i]=readcardinal4(f) end end
+ return t
+ end
+ local readinteger1=streams.readinteger1
+ local readinteger2=streams.readinteger2
+ local readinteger3=streams.readinteger3
+ local readinteger4=streams.readinteger4
+ function streams.readintegertable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readinteger1(f) end
+ elseif b==2 then for i=1,n do t[i]=readinteger2(f) end
+ elseif b==3 then for i=1,n do t[i]=readinteger3(f) end
+ elseif b==4 then for i=1,n do t[i]=readinteger4(f) end end
+ return t
+ end
+end
end -- of closure
@@ -13668,7 +13735,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 53326, stripped down to: 32477
+-- original size: 54551, stripped down to: 33353
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -13753,18 +13820,32 @@ apply_axis['child']=function(list)
local ll=list[l]
local dt=ll.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ ll.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
+ ll.en=1
end
+ else
+ local en=0
+ for k=1,#dt do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ end
+ end
+ ll.en=en
end
- ll.en=en
end
end
return collected
@@ -13772,19 +13853,36 @@ end
local function collect(list,collected,c)
local dt=list.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ list.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
c=collect(dk,collected,c)
+ list.en=1
+ else
+ list.en=0
+ end
+ else
+ local en=0
+ for k=1,n do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ c=collect(dk,collected,c)
+ end
end
+ list.en=en
end
- list.en=en
end
return c
end
@@ -13798,19 +13896,34 @@ end
local function collect(list,collected,c)
local dt=list.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ list.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
c=collect(dk,collected,c)
+ list.en=1
+ end
+ else
+ local en=0
+ for k=1,#dt do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ c=collect(dk,collected,c)
+ end
end
+ list.en=en
end
- list.en=en
end
return c
end
@@ -17792,7 +17905,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-res"] = package.loaded["data-res"] or true
--- original size: 68261, stripped down to: 47789
+-- original size: 68255, stripped down to: 47783
if not modules then modules={} end modules ['data-res']={
version=1.001,
@@ -19366,7 +19479,7 @@ function resolvers.dowithfilesintree(pattern,handle,before,after)
end
end
if after then
- after(blobtype,blobpath,pattern,total,checked,done)
+ after(blobtype,blobpath,pattern,checked,done)
end
end
end
@@ -21478,8 +21591,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 882905
--- stripped bytes : 319293
+-- original bytes : 887178
+-- stripped bytes : 320261
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index dfc90ac56..4e8678e04 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -981,7 +981,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-lpeg"] = package.loaded["l-lpeg"] or true
--- original size: 39305, stripped down to: 21144
+-- original size: 39398, stripped down to: 21142
if not modules then modules={} end modules ['l-lpeg']={
version=1.001,
@@ -1150,8 +1150,8 @@ patterns.propername=(uppercase+lowercase+underscore)*(uppercase+lowercase+unders
patterns.somecontent=(anything-newline-space)^1
patterns.beginline=#(1-newline)
patterns.longtostring=Cs(whitespace^0/""*((patterns.quoted+nonwhitespace^1+whitespace^1/""*(P(-1)+Cc(" ")))^0))
-local function anywhere(pattern)
- return P { P(pattern)+1*V(1) }
+function anywhere(pattern)
+ return (1-P(pattern))^0*P(pattern)
end
lpeg.anywhere=anywhere
function lpeg.instringchecker(p)
@@ -1946,7 +1946,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-table"] = package.loaded["l-table"] or true
--- original size: 40782, stripped down to: 23986
+-- original size: 40802, stripped down to: 24000
if not modules then modules={} end modules ['l-table']={
version=1.001,
@@ -2861,8 +2861,9 @@ end
function table.reverse(t)
if t then
local n=#t
+ local m=n+1
for i=1,floor(n/2) do
- local j=n-i+1
+ local j=m-i
t[i],t[j]=t[j],t[i]
end
return t
@@ -3583,7 +3584,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-os"] = package.loaded["l-os"] or true
--- original size: 16592, stripped down to: 9462
+-- original size: 16683, stripped down to: 9462
if not modules then modules={} end modules ['l-os']={
version=1.001,
@@ -4778,7 +4779,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-dir"] = package.loaded["l-dir"] or true
--- original size: 17703, stripped down to: 11691
+-- original size: 18035, stripped down to: 11890
if not modules then modules={} end modules ['l-dir']={
version=1.001,
@@ -4842,6 +4843,8 @@ local function glob_pattern_function(path,patt,recurse,action)
usedpath=path
end
local dirs
+ local nofdirs=0
+ local noffiles=#result
for name in walkdir(usedpath) do
if name~="." and name~=".." then
local full=path..name
@@ -4851,16 +4854,18 @@ local function glob_pattern_function(path,patt,recurse,action)
action(full)
end
elseif recurse and mode=="directory" then
- if not dirs then
- dirs={ full }
+ if dirs then
+ nofdirs=nofdirs+1
+ dirs[nofdirs]=full
else
- dirs[#dirs+1]=full
+ nofdirs=1
+ dirs={ full }
end
end
end
end
if dirs then
- for i=1,#dirs do
+ for i=1,nofdirs do
glob_pattern_function(dirs[i],patt,recurse,action)
end
end
@@ -4870,38 +4875,41 @@ local function glob_pattern_table(path,patt,recurse,result)
if not result then
result={}
end
- if isdir(path) then
- local usedpath
- if path=="/" then
- usedpath="/."
- elseif not find(path,"/$") then
- usedpath=path.."/."
- path=path.."/"
- else
- usedpath=path
- end
- local dirs
- for name in walkdir(usedpath) do
- if name~="." and name~=".." then
- local full=path..name
- local mode=attributes(full,'mode')
- if mode=='file' then
- if not patt or find(full,patt) then
- result[#result+1]=full
- end
- elseif recurse and mode=="directory" then
- if not dirs then
- dirs={ full }
- else
- dirs[#dirs+1]=full
- end
+ local usedpath
+ if path=="/" then
+ usedpath="/."
+ elseif not find(path,"/$") then
+ usedpath=path.."/."
+ path=path.."/"
+ else
+ usedpath=path
+ end
+ local dirs
+ local nofdirs=0
+ local noffiles=#result
+ for name,a in walkdir(usedpath) do
+ if name~="." and name~=".." then
+ local full=path..name
+ local mode=attributes(full,'mode')
+ if mode=='file' then
+ if not patt or find(full,patt) then
+ noffiles=noffiles+1
+ result[noffiles]=full
+ end
+ elseif recurse and mode=="directory" then
+ if dirs then
+ nofdirs=nofdirs+1
+ dirs[nofdirs]=full
+ else
+ nofdirs=1
+ dirs={ full }
end
end
end
- if dirs then
- for i=1,#dirs do
- glob_pattern_table(dirs[i],patt,recurse,result)
- end
+ end
+ if dirs then
+ for i=1,nofdirs do
+ glob_pattern_table(dirs[i],patt,recurse,result)
end
end
return result
@@ -4911,12 +4919,13 @@ local function globpattern(path,patt,recurse,method)
if patt and sub(patt,1,-3)==path then
patt=false
end
+ local okay=isdir(path)
if kind=="function" then
- return glob_pattern_function(path,patt,recurse,method)
+ return okay and glob_pattern_function(path,patt,recurse,method) or {}
elseif kind=="table" then
- return glob_pattern_table(path,patt,recurse,method)
+ return okay and glob_pattern_table(path,patt,recurse,method) or method
else
- return glob_pattern_table(path,patt,recurse,{})
+ return okay and glob_pattern_table(path,patt,recurse,{}) or {}
end
end
dir.globpattern=globpattern
@@ -7604,7 +7613,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-fil"] = package.loaded["util-fil"] or true
--- original size: 7787, stripped down to: 5858
+-- original size: 9034, stripped down to: 6958
if not modules then modules={} end modules ['util-fil']={
version=1.001,
@@ -7866,6 +7875,35 @@ if fio and fio.readcardinal1 then
skipposition(f,4*(n or 1))
end
end
+if fio and fio.readcardinaltable then
+ files.readcardinaltable=fio.readcardinaltable
+ files.readintegertable=fio.readintegertable
+else
+ local readcardinal1=files.readcardinal1
+ local readcardinal2=files.readcardinal2
+ local readcardinal3=files.readcardinal3
+ local readcardinal4=files.readcardinal4
+ function files.readcardinaltable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readcardinal1(f) end
+ elseif b==2 then for i=1,n do t[i]=readcardinal2(f) end
+ elseif b==3 then for i=1,n do t[i]=readcardinal3(f) end
+ elseif b==4 then for i=1,n do t[i]=readcardinal4(f) end end
+ return t
+ end
+ local readinteger1=files.readinteger1
+ local readinteger2=files.readinteger2
+ local readinteger3=files.readinteger3
+ local readinteger4=files.readinteger4
+ function files.readintegertable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readinteger1(f) end
+ elseif b==2 then for i=1,n do t[i]=readinteger2(f) end
+ elseif b==3 then for i=1,n do t[i]=readinteger3(f) end
+ elseif b==4 then for i=1,n do t[i]=readinteger4(f) end end
+ return t
+ end
+end
end -- of closure
@@ -7874,7 +7912,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-sac"] = package.loaded["util-sac"] or true
--- original size: 8716, stripped down to: 6754
+-- original size: 9987, stripped down to: 7878
if not modules then modules={} end modules ['util-sac']={
version=1.001,
@@ -8207,6 +8245,35 @@ if sio and sio.readcardinal2 then
streams.readcardinal=streams.readcardinal1
streams.readinteger=streams.readinteger1
end
+if sio and sio.readcardinaltable then
+ streams.readcardinaltable=sio.readcardinaltable
+ streams.readintegertable=sio.readintegertable
+else
+ local readcardinal1=streams.readcardinal1
+ local readcardinal2=streams.readcardinal2
+ local readcardinal3=streams.readcardinal3
+ local readcardinal4=streams.readcardinal4
+ function streams.readcardinaltable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readcardinal1(f) end
+ elseif b==2 then for i=1,n do t[i]=readcardinal2(f) end
+ elseif b==3 then for i=1,n do t[i]=readcardinal3(f) end
+ elseif b==4 then for i=1,n do t[i]=readcardinal4(f) end end
+ return t
+ end
+ local readinteger1=streams.readinteger1
+ local readinteger2=streams.readinteger2
+ local readinteger3=streams.readinteger3
+ local readinteger4=streams.readinteger4
+ function streams.readintegertable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readinteger1(f) end
+ elseif b==2 then for i=1,n do t[i]=readinteger2(f) end
+ elseif b==3 then for i=1,n do t[i]=readinteger3(f) end
+ elseif b==4 then for i=1,n do t[i]=readinteger4(f) end end
+ return t
+ end
+end
end -- of closure
@@ -13668,7 +13735,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true
--- original size: 53326, stripped down to: 32477
+-- original size: 54551, stripped down to: 33353
if not modules then modules={} end modules ['lxml-lpt']={
version=1.001,
@@ -13753,18 +13820,32 @@ apply_axis['child']=function(list)
local ll=list[l]
local dt=ll.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ ll.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
+ ll.en=1
end
+ else
+ local en=0
+ for k=1,#dt do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ end
+ end
+ ll.en=en
end
- ll.en=en
end
end
return collected
@@ -13772,19 +13853,36 @@ end
local function collect(list,collected,c)
local dt=list.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ list.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
c=collect(dk,collected,c)
+ list.en=1
+ else
+ list.en=0
+ end
+ else
+ local en=0
+ for k=1,n do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ c=collect(dk,collected,c)
+ end
end
+ list.en=en
end
- list.en=en
end
return c
end
@@ -13798,19 +13896,34 @@ end
local function collect(list,collected,c)
local dt=list.dt
if dt then
- local en=0
- for k=1,#dt do
- local dk=dt[k]
+ local n=#dt
+ if n==0 then
+ list.en=0
+ elseif n==1 then
+ local dk=dt[1]
if dk.tg then
c=c+1
collected[c]=dk
- dk.ni=k
- en=en+1
- dk.ei=en
+ dk.ni=1
+ dk.ei=1
c=collect(dk,collected,c)
+ list.en=1
+ end
+ else
+ local en=0
+ for k=1,#dt do
+ local dk=dt[k]
+ if dk.tg then
+ c=c+1
+ en=en+1
+ collected[c]=dk
+ dk.ni=k
+ dk.ei=en
+ c=collect(dk,collected,c)
+ end
end
+ list.en=en
end
- list.en=en
end
return c
end
@@ -17792,7 +17905,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["data-res"] = package.loaded["data-res"] or true
--- original size: 68261, stripped down to: 47789
+-- original size: 68255, stripped down to: 47783
if not modules then modules={} end modules ['data-res']={
version=1.001,
@@ -19366,7 +19479,7 @@ function resolvers.dowithfilesintree(pattern,handle,before,after)
end
end
if after then
- after(blobtype,blobpath,pattern,total,checked,done)
+ after(blobtype,blobpath,pattern,checked,done)
end
end
end
@@ -21478,8 +21591,8 @@ end -- of closure
-- used libraries : l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 882905
--- stripped bytes : 319293
+-- original bytes : 887178
+-- stripped bytes : 320261
-- end library merge
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index ba09a88df..bcbde1da7 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{2018.05.24 15:49}
+\newcontextversion{2018.06.02 22:34}
%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 3ba85bde6..d060c0332 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{2018.05.24 15:49}
+\edef\contextversion{2018.06.02 22:34}
%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 9a4cc112b..ce6d82a5b 100644
--- a/tex/context/base/mkii/mult-cs.mkii
+++ b/tex/context/base/mkii/mult-cs.mkii
@@ -853,7 +853,7 @@
\setinterfaceconstant{headseparator}{headseparator}
\setinterfaceconstant{headstyle}{stylhlavicky}
\setinterfaceconstant{height}{vyska}
-\setinterfaceconstant{hfactor}{vfaktor}
+\setinterfaceconstant{hfactor}{hfaktor}
\setinterfaceconstant{hfil}{hfil}
\setinterfaceconstant{hidenumber}{hidenumber}
\setinterfaceconstant{hoffset}{hoffset}
@@ -1274,6 +1274,7 @@
\setinterfaceconstant{vcompact}{vcompact}
\setinterfaceconstant{vector}{vector}
\setinterfaceconstant{veroffset}{offsethlavicky}
+\setinterfaceconstant{vfactor}{vfaktor}
\setinterfaceconstant{vfil}{vfil}
\setinterfaceconstant{viewerprefix}{viewerprefix}
\setinterfaceconstant{voffset}{voffset}
diff --git a/tex/context/base/mkii/mult-it.mkii b/tex/context/base/mkii/mult-it.mkii
index 38fb2de40..6716084c0 100644
--- a/tex/context/base/mkii/mult-it.mkii
+++ b/tex/context/base/mkii/mult-it.mkii
@@ -1274,6 +1274,7 @@
\setinterfaceconstant{vcompact}{vcompact}
\setinterfaceconstant{vector}{vector}
\setinterfaceconstant{veroffset}{veroffset}
+\setinterfaceconstant{vfactor}{vfactor}
\setinterfaceconstant{vfil}{vfil}
\setinterfaceconstant{viewerprefix}{viewerprefix}
\setinterfaceconstant{voffset}{voffset}
diff --git a/tex/context/base/mkiv/attr-ini.mkiv b/tex/context/base/mkiv/attr-ini.mkiv
index 451ab9dfa..e3d328e3d 100644
--- a/tex/context/base/mkiv/attr-ini.mkiv
+++ b/tex/context/base/mkiv/attr-ini.mkiv
@@ -84,8 +84,8 @@
\let\dompattribute\gobbletwoarguments
-\unexpanded\def\resetglobalattributes{\the\t_attr_list_global}
-\unexpanded\def\resetlocalattributes {\the\t_attr_list_local }
+\unexpanded\def\resetglobalattributes{\the\t_attr_list_global\attribute\zerocount\zerocount}
+\unexpanded\def\resetlocalattributes {\the\t_attr_list_local \attribute\zerocount\zerocount}
\let\resetallattributes\resetlocalattributes
diff --git a/tex/context/base/mkiv/buff-ver.lua b/tex/context/base/mkiv/buff-ver.lua
index d9178b1df..2e9489e61 100644
--- a/tex/context/base/mkiv/buff-ver.lua
+++ b/tex/context/base/mkiv/buff-ver.lua
@@ -445,7 +445,7 @@ function visualizers.registerescapecommand(name,token,normalmethod,escapecommand
end
token = P(token)
local notoken = hack((1 - token)^1)
- local cstoken = name_pattern * space_pattern
+ local cstoken = Cs(name_pattern * (space_pattern/""))
escapepattern = (
(token / "")
* (cstoken / (escapecommand or texcommand))
diff --git a/tex/context/base/mkiv/char-ini.mkiv b/tex/context/base/mkiv/char-ini.mkiv
index 9c41df673..229e07633 100644
--- a/tex/context/base/mkiv/char-ini.mkiv
+++ b/tex/context/base/mkiv/char-ini.mkiv
@@ -42,8 +42,8 @@
% use \normalUchar when possible .. the next one is nice for documents and it also accepts
% 0x prefixed numbers
-\def\utfchar #1{\clf_utfchar \numexpr#1\relax}
-\def\safechar#1{\clf_safechar\numexpr#1\relax}
+\def\utfchar #1{\clf_utfchar {#1}}
+\def\safechar#1{\clf_safechar{#1}}
\unexpanded\def\Ux #1{\Uchar\numexpr"#1\relax} % used in xml
\def\eUx#1{\Uchar\numexpr"#1\relax} % used in xml
diff --git a/tex/context/base/mkiv/char-tex.lua b/tex/context/base/mkiv/char-tex.lua
index 065152881..66997a647 100644
--- a/tex/context/base/mkiv/char-tex.lua
+++ b/tex/context/base/mkiv/char-tex.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['char-tex'] = {
local lpeg = lpeg
local tonumber, next, type = tonumber, next, type
-local format, find, gmatch = string.format, string.find, string.gmatch
+local format, find, gmatch, match = string.format, string.find, string.gmatch, string.match
local utfchar, utfbyte = utf.char, utf.byte
local concat, tohash = table.concat, table.tohash
local P, C, R, S, V, Cs, Cc = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.V, lpeg.Cs, lpeg.Cc
@@ -462,16 +462,24 @@ function commands.makeactive(n,name) -- not used
-- context("\\catcode%s=13\\unexpanded\\def %s{\\%s}",n,utfchar(n),name)
end
+local function to_number(s)
+ local n = tonumber(s)
+ if n then
+ return n
+ end
+ return tonumber(match(s,'^"(.*)$'),16) or 0
+end
+
implement {
name = "utfchar",
- actions = { utfchar, contextsprint },
- arguments = "integer"
+ actions = { to_number, utfchar, contextsprint },
+ arguments = "string"
}
implement {
name = "safechar",
- actions = { texcharacters.safechar, contextsprint },
- arguments = "integer"
+ actions = { to_number, texcharacters.safechar, contextsprint },
+ arguments = "string"
}
implement {
diff --git a/tex/context/base/mkiv/cldf-bas.lua b/tex/context/base/mkiv/cldf-bas.lua
index 070546637..15e941db2 100644
--- a/tex/context/base/mkiv/cldf-bas.lua
+++ b/tex/context/base/mkiv/cldf-bas.lua
@@ -89,11 +89,15 @@ function context.glyph(id,k)
local glyph = new_glyph(id,k)
glyph.attr = current_attr()
context(glyph)
+ -- context.node(glyph)
end
end
-local function ctx_par () context("\\par") end
-local function ctx_space() context("\\space") end
+-- local function ctx_par () context("\\par") end
+-- local function ctx_space() context("\\space") end
+
+local ctx_par = context.cs.par
+local ctx_space = context.cs.space
context.par = ctx_par
context.space = ctx_space
@@ -101,8 +105,11 @@ context.space = ctx_space
ctxcore.par = ctx_par
ctxcore.space = ctx_space
-local function ctx_bgroup() context("{") end
-local function ctx_egroup() context("}") end
+-- local function ctx_bgroup() context("{") end
+-- local function ctx_egroup() context("}") end
+
+local ctx_bgroup = context.cs.bgroup
+local ctx_egroup = context.cs.egroup
context.bgroup = ctx_bgroup
context.egroup = ctx_egroup
diff --git a/tex/context/base/mkiv/cldf-ini.lua b/tex/context/base/mkiv/cldf-ini.lua
index f3bd0f563..71529f96c 100644
--- a/tex/context/base/mkiv/cldf-ini.lua
+++ b/tex/context/base/mkiv/cldf-ini.lua
@@ -52,6 +52,11 @@ if not modules then modules = { } end modules ['cldf-ini'] = {
-- watching Trio Hiromi Uehara, Anthony Jackson & Simon Phillips (discovered via the
-- later on YT). Hopefully the video breaks made the following better in the end.
+-- This module is also a test bed for experimental features so the content changes over
+-- time (for the better or worse). There have been no fundamental changes for many years
+-- and performance has not changed much either.
+
+
local format, stripstring = string.format, string.strip
local next, type, tostring, tonumber, unpack, select, rawset = next, type, tostring, tonumber, unpack, select, rawset
local insert, remove, concat = table.insert, table.remove, table.concat
@@ -84,6 +89,12 @@ local texgetcount = tex.getcount
local isnode = node.is_node
local writenode = node.write
local copynodelist = node.copy_list
+local tonut = node.direct.todirect
+
+local istoken = token.is_token
+local newtoken = token.new
+local createtoken = token.create
+local setluatoken = token.set_lua
local catcodenumbers = catcodes.numbers
@@ -104,16 +115,46 @@ local report_cld = logs.reporter("cld","stack")
local processlines = true -- experiments.register("context.processlines", function(v) processlines = v end)
+local tokenflushmode = false
+local nodeflushmode = false
+local scannerdefmode = false
+local maxflushnodeindex = 0x10FFFF - 1
+
+if LUATEXFUNCTIONALITY and LUATEXFUNCTIONALITY > 6780 then
+
+ -- The gain in performasnce is neglectable.
+
+ tokenflushmode = true
+ nodeflushmode = true
+ scannerdefmode = true
+ maxflushnodeindex = token.biggest_char() - 1
+
+end
+
+-- tokenflushmode = false
+-- scannerdefmode = false
+-- nodeflushmode = false
+
-- In earlier experiments a function tables was referred to as lua.calls and the
-- primitive \luafunctions was \luacall and we used our own implementation of
-- a function table (more indirectness).
+local trialtypesettingstate = 0
+
+function context.trialtypesetting()
+ return texgetcount(trialtypesettingstate) ~= 0
+end
+
+function context.registertrialtypesetting(name)
+ trialtypesettingstate = createtoken(name).index
+end
+
local knownfunctions = lua.get_functions_table()
local showstackusage = false
trackers.register("context.stack",function(v) showstackusage = v end)
-local freed, nofused, noffreed = { }, 0, 0 -- maybe use the number of @@trialtypesetting
+local freed, nofused, noffreed = { }, 0, 0
local usedstack = function()
return nofused, noffreed
@@ -122,7 +163,7 @@ end
local flushfunction = function(slot,arg)
if arg() then
-- keep
- elseif texgetcount("@@trialtypesetting") == 0 then -- @@trialtypesetting is private!
+ elseif texgetcount(trialtypesettingstate) == 0 then
noffreed = noffreed + 1
freed[noffreed] = slot
knownfunctions[slot] = false
@@ -147,7 +188,7 @@ local storefunction = function(arg)
end
local flushnode = function(slot,arg)
- if texgetcount("@@trialtypesetting") == 0 then -- @@trialtypesetting is private!
+ if texgetcount(trialtypesettingstate) == 0 then
writenode(arg)
noffreed = noffreed + 1
freed[noffreed] = slot
@@ -182,9 +223,13 @@ local f_resolve = nil
local p_resolve = ((1-lpegP("."))^1 / function(s) f_resolve = f_resolve[s] end * lpegP(".")^0)^1
local function resolvestoredfunction(str)
- f_resolve = global
- lpegmatch(p_resolve,str)
- return f_resolve
+ if type(str) == "string" then
+ f_resolve = global
+ lpegmatch(p_resolve,str)
+ return f_resolve
+ else
+ return str
+ end
end
local function expose(slot,f,...) -- so we can register yet undefined functions
@@ -246,17 +291,17 @@ local registerfunction = function(f,direct) -- either f=code or f=namespace,dire
func = resolvestoredfunction(f)
end
if type(func) ~= "function" then
- func = function() report_cld("invalid resolve %A",f) end
+ func = function() report_cld("invalid resolve %A, case %s",f,1) end
end
elseif type(f) == "string" then
func = loadstring(f)
if type(func) ~= "function" then
- func = function() report_cld("invalid code %A",f) end
+ func = function() report_cld("invalid code %A, case %s",f,2) end
end
elseif type(f) == "function" then
func = f
else
- func = function() report_cld("invalid function %A",f) end
+ func = function() report_cld("invalid function %A, case %s",f,3) end
end
knownfunctions[slot] = func
return slot
@@ -305,53 +350,52 @@ local storedscanners = interfaces.storedscanners
storage.register("interfaces/storedscanners", storedscanners, "interfaces.storedscanners")
local interfacescanners = setmetatablenewindex(function(t,k,v)
+ rawset(t,k,v)
if storedscanners[k] then
- -- report_cld("warning: scanner %a is already set",k)
+ -- report_cld("warning: scanner %a is already set (mode 1a)",k)
-- os.exit()
-- \scan_<k> is already in the format
-- report_cld("using interface scanner: %s",k)
+ elseif scannerdefmode then
+ -- report_cld("installing interface scanner: %s (mode 1b)",k)
+ -- local n = registerfunction(interfaces.scanners[k],true)
+ local n = registerfunction("interfaces.scanners."..k,true)
+ storedscanners[k] = n
+ local name = "clf_" .. k
+ setluatoken(name,n,"global") -- todo : protected and "protected" or ""
else
- -- todo: allocate slot here and pass it
+ -- report_cld("installing interface scanner: %s (mode 1c)",k)
storedscanners[k] = true
- -- report_cld("installing interface scanner: %s",k)
context("\\installctxscanner{clf_%s}{interfaces.scanners.%s}",k,k)
end
- rawset(t,k,v)
+ -- rawset(t,k,v)
end)
function interfaces.registerscanner(name,action,protected,public,call)
+ rawset(interfacescanners,name,action)
if storedscanners[name] then
- -- report_cld("warning: scanner %a is already set",k)
+ -- report_cld("warning: scanner %a is already set (mode 2a)",name)
-- os.exit()
-- \scan_<k> is already in the format
-- report_cld("using interface scanner: %s",k)
+ elseif scannerdefmode then
+ -- report_cld("installing interface scanner: %s (mode 2b)",name)
+ -- local n = registerfunction(action,true) -- todo
+ local n = registerfunction("interfaces.scanners."..name,true)
+ storedscanners[name] = n
+ local name = public and name or ("clf_" .. name)
+ setluatoken(name,n,"global",protected and "protected" or "")
else
storedscanners[name] = true
--- if protected then
--- -- report_cld("installing expandable interface scanner: %s",k)
--- if public then
--- context("\\installprotectedctxscanner{%s}{interfaces.scanners.%s}",name,name)
--- else
--- context("\\installprotectedctxscanner{clf_%s}{interfaces.scanners.%s}",name,name)
--- end
--- else
--- -- report_cld("installing protected interface scanner: %s",k)
--- if public then
--- context("\\installctxscanner{%s}{interfaces.scanners.%s}",name,name)
--- else
--- context("\\installctxscanner{clf_%s}{interfaces.scanners.%s}",name,name)
--- end
--- end
- -- report_cld("installing interface scanner: %s",k)
- context("\\install%sctxscanner%s{%s%s}{interfaces.scanners.%s}",
- protected and "protected" or "",
- call and "call" or "",
- public and "" or "clf_",
- name,
- name
- )
- end
- rawset(interfacescanners,name,action)
+ -- report_cld("installing interface scanner: %s (mode 2c)",name)
+ context("\\install%sctxscanner{%s%s}{interfaces.scanners.%s}",
+ protected and "protected" or "",
+ public and "" or "clf_",
+ name,
+ name
+ )
+ end
+ -- rawset(interfacescanners,name,action)
end
interfaces.scanners = storage.mark(interfacescanners)
@@ -379,7 +423,7 @@ end
local function dummy() end
-function commands.ctxresetter(name)
+function commands.ctxresetter(name) -- to be checked
return function()
if storedscanners[name] then
rawset(interfacescanners,name,dummy)
@@ -388,10 +432,6 @@ function commands.ctxresetter(name)
end
end
-function context.trialtypesetting()
- return texgetcount("@@trialtypesetting") ~= 0
-end
-
-- Should we keep the catcodes with the function?
local catcodestack = { }
@@ -683,8 +723,17 @@ local s_cldl_argument_e = "}"
-- local s_cldl_argument_b = "{"
-- local s_cldl_argument_f = "{ "
+local t_cldl_luafunction = createtoken("luafunctioncall")
+local lua_expandable_call_code = token.command_id and token.command_id("lua_expandable_call")
+
local function writer(parent,command,...) -- already optimized before call
- flush(currentcatcodes,command) -- todo: ctx|prt|texcatcodes
+
+ if type(command) == "string" then -- for now
+ flush(currentcatcodes,command) -- todo: ctx|prt|texcatcodes
+ else
+ flush(command) -- todo: ctx|prt|texcatcodes
+ end
+
local direct = false
-- local t = { ... }
-- for i=1,#t do
@@ -751,7 +800,16 @@ local function writer(parent,command,...) -- already optimized before call
elseif tn == 1 then -- some 20% faster than the next loop
local tj = ti[1]
if type(tj) == "function" then
- flush(currentcatcodes,s_cldl_option_b,storefunction(tj),s_cldl_option_e)
+ tj = storefunction(tj)
+ if tokenflushmode then
+ if newtoken then
+ flush(currentcatcodes,"[",newtoken(tj,lua_expandable_call_code),"]")
+ else
+ flush(currentcatcodes,"[",t_cldl_luafunction,tj,"]")
+ end
+ else
+ flush(currentcatcodes,s_cldl_option_b,tj,s_cldl_option_e)
+ end
else
flush(currentcatcodes,"[",tj,"]")
end
@@ -760,10 +818,15 @@ local function writer(parent,command,...) -- already optimized before call
for j=1,tn do
local tj = ti[j]
if type(tj) == "function" then
- if j == tn then
- flush(currentcatcodes,s_cldl_option_s,storefunction(tj),"]")
+ tj = storefunction(tj)
+ if tokenflushmode then
+ if newtoken then
+ flush(currentcatcodes,"[",newtoken(tj,lua_expandable_call_code),j == tn and "]" or ",")
+ else
+ flush(currentcatcodes,"[",t_cldl_luafunction,tj,j == tn and "]" or ",")
+ end
else
- flush(currentcatcodes,s_cldl_option_s,storefunction(tj),",")
+ flush(currentcatcodes,s_cldl_option_s,tj,j == tn and "]" or ",")
end
else
if j == tn then
@@ -776,7 +839,16 @@ local function writer(parent,command,...) -- already optimized before call
end
elseif typ == "function" then
-- todo: ctx|prt|texcatcodes
- flush(currentcatcodes,s_cldl_argument_f,storefunction(ti),s_cldl_argument_e)
+ ti = storefunction(ti)
+ if tokenflushmode then
+ if newtoken then
+ flush(currentcatcodes,"{",newtoken(ti,lua_expandable_call_code),"}")
+ else
+ flush(currentcatcodes,"{",t_cldl_luafunction,ti,"}")
+ end
+ else
+ flush(currentcatcodes,s_cldl_argument_f,ti,s_cldl_argument_e)
+ end
elseif typ == "boolean" then
if ti then
flushdirect(currentcatcodes,"\r")
@@ -785,62 +857,99 @@ local function writer(parent,command,...) -- already optimized before call
end
elseif typ == "thread" then
report_context("coroutines not supported as we cannot yield across boundaries")
- elseif isnode(ti) then -- slow
- flush(currentcatcodes,s_cldl_argument_b,storenode(ti),s_cldl_argument_e)
+ elseif isnode(ti) then -- slow | why {} here ?
+ if nodeflushmode then
+ local n = tonut(ti)
+ if n <= maxflushnodeindex then
+ flush(currentcatcodes,"{",ti,"}")
+ else
+ flush(currentcatcodes,s_cldl_argument_b,storenode(ti),s_cldl_argument_e)
+ end
+ else
+ flush(currentcatcodes,s_cldl_argument_b,storenode(ti),s_cldl_argument_e)
+ end
else
report_context("error: %a gets a weird argument %a",command,ti)
end
+-- else
+-- local n = isnode(ti)
+-- if n then
+-- if nodeflushmode and n <= maxflushnodeindex then
+-- flush(ti)
+-- else
+-- flush(currentcatcodes,s_cldl_argument_b,storenode(ti),s_cldl_argument_e)
+-- end
+-- else
+-- report_context("error: %a gets a weird argument %a",command,ti)
+-- end
+-- end
end
end
end
--- if performance really matters we can consider a compiler but it will never
--- pay off
-
--- local function prtwriter(command,...) -- already optimized before call
--- flush(prtcatcodes,command)
--- for i=1,select("#",...) do
--- local ti = select(i,...)
--- if ti == nil then
--- -- nothing
--- elseif ti == "" then
--- flush(prtcatcodes,"{}")
--- else
--- local tp = type(ti)
--- if tp == "string" or tp == "number"then
--- flush(prtcatcodes,"{",ti,"}")
--- elseif tp == "function" then
--- flush(prtcatcodes,s_cldl_argument_f,storefunction(ti),s_cldl_argument_e)
--- elseif isnode(ti) then
--- flush(prtcatcodes,s_cldl_argument_b,storenode(ti),s_cldl_argument_e)
--- else
--- report_context("fatal error: prt %a gets a weird argument %a",command,ti)
--- end
--- end
--- end
--- end
+local core
+
+if tokenflushmode then -- combine them
+
+ local toks = tokens.cache
+
+ context.tokenizedcs = toks
-local core = setmetatableindex(function(parent,k)
- local c = "\\" .. k -- tostring(k)
- local f = function(first,...)
- if first == nil then
+ core = setmetatableindex(function(parent,k)
+ local t
+ local f = function(first,...)
+ if not t then
+ t = toks[k]
+ end
+ if first == nil then
+ flush(t)
+ else
+ return writer(context,t,first,...)
+ end
+ end
+ parent[k] = f
+ return f
+ end)
+
+ core.cs = setmetatableindex(function(parent,k)
+ local t
+ local f = function()
+ if not t then
+ t = toks[k]
+ end
+ flush(t)
+ end
+ parent[k] = f
+ return f
+ end)
+
+else
+
+ context.tokenizedcs = false
+
+ core = setmetatableindex(function(parent,k)
+ local c = "\\" .. k
+ local f = function(first,...)
+ if first == nil then
+ flush(currentcatcodes,c)
+ else
+ return writer(context,c,first,...)
+ end
+ end
+ parent[k] = f
+ return f
+ end)
+
+ core.cs = setmetatableindex(function(parent,k)
+ local c = "\\" .. k -- tostring(k)
+ local f = function()
flush(currentcatcodes,c)
- else
- return writer(context,c,first,...)
end
- end
- parent[k] = f
- return f
-end)
+ parent[k] = f
+ return f
+ end)
-core.cs = setmetatableindex(function(parent,k)
- local c = "\\" .. k -- tostring(k)
- local f = function()
- flush(currentcatcodes,c)
- end
- parent[k] = f
- return f
-end)
+end
local indexer = function(parent,k)
if type(k) == "string" then
@@ -935,8 +1044,16 @@ local caller = function(parent,f,a,...)
end
elseif typ == "function" then
-- ignored: a ...
- flush(currentcatcodes,"{\\cldl",storefunction(f),"}") -- todo: ctx|prt|texcatcodes
- -- flush(currentcatcodes,"{",storefunction(f),"}") -- todo: ctx|prt|texcatcodes
+ f = storefunction(f)
+ if tokenflushmode then
+ if newtoken then
+ flush(currentcatcodes,"{",newtoken(f,lua_expandable_call_code),"}")
+ else
+ flush(currentcatcodes,"{",t_cldl_luafunction,f,"}")
+ end
+ else
+ flush(currentcatcodes,s_cldl_argument_b,f,s_cldl_argument_e) -- todo: ctx|prt|texcatcodes
+ end
elseif typ == "boolean" then
if f then
if a ~= nil then
@@ -955,20 +1072,46 @@ local caller = function(parent,f,a,...)
elseif typ == "thread" then
report_context("coroutines not supported as we cannot yield across boundaries")
elseif isnode(f) then -- slow
- -- writenode(f)
- flush(currentcatcodes,"\\cldl",storenode(f)," ")
- -- flush(currentcatcodes,"",storenode(f)," ")
+ if nodeflushmode then
+ local n = tonut(f)
+ if n <= maxflushnodeindex then
+ flush(f)
+ else
+ flush(currentcatcodes,s_cldl_option_s,storenode(f)," ")
+ end
+ else
+ flush(currentcatcodes,s_cldl_option_s,storenode(f)," ")
+ end
else
report_context("error: %a gets a weird argument %a","context",f)
end
+-- else
+-- local n = isnode(f)
+-- if n then
+-- if nodeflushmode and n <= maxflushnodeindex then
+-- flush(f)
+-- else
+-- flush(currentcatcodes,s_cldl_option_s,storenode(f)," ")
+-- end
+-- else
+-- report_context("error: %a gets a weird argument %a","context",f)
+-- end
+-- end
end
end
-context.nodes = {
+context.nodes = { -- todo
store = storenode,
flush = function(n)
- flush(currentcatcodes,"\\cldl",storenode(n)," ")
- -- flush(currentcatcodes,"",storenode(n)," ")
+ if nodeflushmode then
+ if tonut(n) <= maxflushnodeindex then
+ flush(n)
+ else
+ flush(currentcatcodes,s_cldl_option_s,storenode(n)," ")
+ end
+ else
+ flush(currentcatcodes,s_cldl_option_s,storenode(n)," ")
+ end
end,
}
@@ -1014,8 +1157,8 @@ local nofflushes = 0
local tracingpermitted = true
local visualizer = lpeg.replacer {
- { "\n","<<newline>>" },
- { "\r","<<par>>" },
+ { "\n", "<<newline>>" },
+ { "\r", "<<par>>" },
}
statistics.register("traced context", function()
@@ -1028,13 +1171,47 @@ statistics.register("traced context", function()
end
end)
+local function userdata(argument)
+ if isnode(argument) then
+ return formatters["<< %s node %i>>"](nodes.nodecodes[argument.id],tonut(argument))
+ end
+ if istoken(argument) then
+ local csname = argument.csname
+ if csname then
+ -- return formatters["<<\\%s>>"](csname)
+ return formatters["\\%s"](csname)
+ end
+ local cmdname = argument.cmdname
+ if cmdname == "lua_expandable_call" or cmdname == "lua_call" then
+ return "<<function>>" -- argument.mode
+ end
+ return "<<token>>"
+ end
+ return "<<userdata>>"
+end
+
+
local tracedwriter = function(parent,...) -- also catcodes ?
nofwriters = nofwriters + 1
local savedflush = flush
local savedflushdirect = flushdirect -- unlikely to be used here
local t, n = { "w : - : " }, 1
local traced = function(catcodes,...) -- todo: check for catcodes
- local s = concat({...})
+ local s = type(catcodes) == "number" and { ... } or { catcodes, ... }
+ for i=1,#s do
+ local argument = s[i]
+ local argtype = type(argument)
+ if argtype == "string" then
+ s[i] = lpegmatch(visualizer,argument)
+ elseif argtype == "number" then
+ s[i] = argument
+ elseif argtype == "userdata" then
+ s[i] = userdata(argument)
+ else
+ s[i] = formatters["<<%S>>"](argument)
+ end
+ end
+ s = concat(s)
s = lpegmatch(visualizer,s)
n = n + 1
t[n] = s
@@ -1073,6 +1250,8 @@ local traced = function(one,two,...)
collapsed[c] = lpegmatch(visualizer,argument)
elseif argtype == "number" then
collapsed[c] = argument
+ elseif argtype == "userdata" then
+ collapsed[c] = userdata(argument)
else
collapsed[c] = formatters["<<%S>>"](argument)
end
@@ -1085,6 +1264,8 @@ local traced = function(one,two,...)
currenttrace(formatters["f : - : %s"](lpegmatch(visualizer,one)))
elseif argtype == "number" then
currenttrace(formatters["f : - : %s"](one))
+ elseif argtype == "userdata" then
+ currenttrace(formatters["f : - : %s"](userdata(one)))
else
currenttrace(formatters["f : - : <<%S>>"](one))
end
@@ -1367,14 +1548,22 @@ function context.newindexer(catcodes,cmdcodes)
contentcatcodes = savedcatcodes
end
- handler.cs = setmetatableindex(function(parent,k)
- local c = "\\" .. k -- tostring(k)
- local f = function()
- flush(cmdcodes,c)
- end
- parent[k] = f
- return f
- end)
+ if tokenflushmode then
+
+ handler.cs = core.cs
+
+ else
+
+ handler.cs = setmetatableindex(function(parent,k)
+ local c = "\\" .. k -- tostring(k)
+ local f = function()
+ flush(cmdcodes,c)
+ end
+ parent[k] = f
+ return f
+ end)
+
+ end
setmetatableindex(handler,indexer)
setmetatablecall (handler,caller)
@@ -1427,21 +1616,51 @@ do
end
end
- local function indexer(parent,k)
- if type(k) == "string" then
- local c = "\\" .. k
- local f = function(first,...)
- if first == nil then
- flush(currentcatcodes,c)
- else
- return formattedflush(parent,c,first,...)
+ local indexer
+
+ if tokenflushmode then -- combine them
+
+ local toks = tokens.cache
+
+ indexer = function(parent,k)
+ if type(k) == "string" then
+ local t
+ local f = function(first,...)
+ if not t then
+ t = toks[k]
+ end
+ if first == nil then
+ flush(t)
+ else
+ return formattedflush(parent,t,first,...)
+ end
end
+ parent[k] = f
+ return f
+ else
+ return context -- catch
end
- parent[k] = f
- return f
- else
- return context -- catch
end
+
+ else
+
+ indexer = function(parent,k)
+ if type(k) == "string" then
+ local c = "\\" .. k
+ local f = function(first,...)
+ if first == nil then
+ flush(currentcatcodes,c)
+ else
+ return formattedflush(parent,c,first,...)
+ end
+ end
+ parent[k] = f
+ return f
+ else
+ return context -- catch
+ end
+ end
+
end
-- formatted([catcodes,]format[,...])
diff --git a/tex/context/base/mkiv/cldf-scn.lua b/tex/context/base/mkiv/cldf-scn.lua
index a8dddc6c8..d0b16e034 100644
--- a/tex/context/base/mkiv/cldf-scn.lua
+++ b/tex/context/base/mkiv/cldf-scn.lua
@@ -77,7 +77,7 @@ function interfaces.implement(specification)
if scanners[name] and not specification.overload then
report("warning: 'scanners.%s' is redefined",name)
end
--- scanners[name] = scanner
+ -- scanners[name] = scanner -- we now use:
register(name,scanner,specification.protected,specification.public,specification.call)
if private then
return
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 2790235d5..c064cb4d5 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2018.05.24 15:49}
+\newcontextversion{2018.06.02 22:34}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index f88d9bc4c..84cd66a3f 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -42,7 +42,7 @@
%D has to match \type {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.05.24 15:49}
+\edef\contextversion{2018.06.02 22:34}
\edef\contextkind {beta}
%D For those who want to use this:
@@ -106,6 +106,7 @@
\loadmarkfile{catc-ctx}
\loadmarkfile{catc-sym}
+\loadmarkfile{toks-ini}
\loadmarkfile{cldf-ini}
% \tracecatcodetables
@@ -114,7 +115,7 @@
% \unexpanded long before etex came around.
\loadmarkfile{luat-ini}
-\loadmarkfile{toks-ini}
+\loadmarkfile{toks-scn}
\loadmarkfile{syst-aux}
\loadmarkfile{syst-lua}
diff --git a/tex/context/base/mkiv/core-env.lua b/tex/context/base/mkiv/core-env.lua
index 0ef37a6d6..23f7ca178 100644
--- a/tex/context/base/mkiv/core-env.lua
+++ b/tex/context/base/mkiv/core-env.lua
@@ -42,11 +42,7 @@ local systemmodes = { }
-- undefined: mode == 0 or cmdname = "undefined_cs"
-local cache = setmetatableindex(function(t,k)
- local v = createtoken(k)
- t[k] = v
- return v
-end)
+local cache = tokens.cache
-- we can have a modes cache too
diff --git a/tex/context/base/mkiv/core-env.mkiv b/tex/context/base/mkiv/core-env.mkiv
index c93350db0..185df780f 100644
--- a/tex/context/base/mkiv/core-env.mkiv
+++ b/tex/context/base/mkiv/core-env.mkiv
@@ -87,18 +87,22 @@
% demo: trialtypesetting is a systemmode as well as an if
-\newsystemmode{trialtypesetting} % the name of \@@trialtypesetting might change (also at the lua end)
+\newsystemmode{trialtypesetting}
-\expandafter\let\expandafter\@@trialtypesetting\csname\??mode\systemmodeprefix trialtypesetting\endcsname % private !
+\expandafter\let\expandafter\c_trial_typesetting\csname\??mode\systemmodeprefix trialtypesetting\endcsname % private !
\appendtoks
- \@@trialtypesetting\enabledmode
+ \c_trial_typesetting\enabledmode
+ \luacopyinputnodes\plusone
\to \everysettrialtypesetting
\appendtoks
- \@@trialtypesetting\disabledmode
+ \c_trial_typesetting\disabledmode
+ \luacopyinputnodes\zerocount
\to \everyresettrialtypesetting
+\ctxlua{context.registertrialtypesetting("c_trial_typesetting")}
+
% user ones
\let\syst_mode_prefix\relax
diff --git a/tex/context/base/mkiv/data-res.lua b/tex/context/base/mkiv/data-res.lua
index 9f5e3a8ac..e3c5c32b9 100644
--- a/tex/context/base/mkiv/data-res.lua
+++ b/tex/context/base/mkiv/data-res.lua
@@ -1903,7 +1903,7 @@ function resolvers.dowithfilesintree(pattern,handle,before,after) -- will move,
end
end
if after then
- after(blobtype,blobpath,pattern,total,checked,done)
+ after(blobtype,blobpath,pattern,checked,done)
end
end
end
diff --git a/tex/context/base/mkiv/file-job.lua b/tex/context/base/mkiv/file-job.lua
index dbf6da9b4..486aee63a 100644
--- a/tex/context/base/mkiv/file-job.lua
+++ b/tex/context/base/mkiv/file-job.lua
@@ -386,7 +386,6 @@ local function starttext()
if trace_jobfiles then
report_jobfiles("starting text")
end
- -- registerfileinfo[begin]jobfilename
context.dostarttext()
end
textlevel = textlevel + 1
@@ -406,8 +405,6 @@ local function stoptext()
report_jobfiles("stopping text")
end
context.dostoptext()
- -- registerfileinfo[end]jobfilename
- context.finalend()
stopped = true
end
end
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index 6279dda89..e875991e1 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -51,6 +51,9 @@ if not modules then modules = { } end modules ['font-dsp'] = {
-- All this packing in the otf format is somewhat obsessive as nowadays 4K resolution
-- multi-gig videos pass through our networks and storage and memory is abundant.
+-- Although we use a few table readers there i sno real gain in there (apart from having
+-- less code. After all there are often not that many demanding features.
+
local next, type = next, type
local band = bit32.band
local extract = bit32.extract
@@ -94,30 +97,38 @@ local readfixed = streamreader.readfixed4
local read2dot14 = streamreader.read2dot14
local skipshort = streamreader.skipshort
local skipbytes = streamreader.skip
-local readfword = readshort
local readbytetable = streamreader.readbytetable
local readbyte = streamreader.readbyte
+local readcardinaltable = streamreader.readcardinaltable
+local readintegertable = streamreader.readintegertable
+local readfword = readshort
+
+local short = 2
+local ushort = 2
+local ulong = 4
directives.register("fonts.streamreader",function()
- streamreader = utilities.streams
-
- setposition = streamreader.setposition
- getposition = streamreader.getposition
- readushort = streamreader.readcardinal2
- readulong = streamreader.readcardinal4
- readinteger = streamreader.readinteger1
- readshort = streamreader.readinteger2
- readstring = streamreader.readstring
- readtag = streamreader.readtag
- readbytes = streamreader.readbytes
- readfixed = streamreader.readfixed4
- read2dot14 = streamreader.read2dot14
- skipshort = streamreader.skipshort
- skipbytes = streamreader.skip
- readfword = readshort
- readbytetable = streamreader.readbytetable
- readbyte = streamreader.readbyte
+ streamreader = utilities.streams
+
+ setposition = streamreader.setposition
+ getposition = streamreader.getposition
+ readushort = streamreader.readcardinal2
+ readulong = streamreader.readcardinal4
+ readinteger = streamreader.readinteger1
+ readshort = streamreader.readinteger2
+ readstring = streamreader.readstring
+ readtag = streamreader.readtag
+ readbytes = streamreader.readbytes
+ readfixed = streamreader.readfixed4
+ read2dot14 = streamreader.read2dot14
+ skipshort = streamreader.skipshort
+ skipbytes = streamreader.skip
+ readbytetable = streamreader.readbytetable
+ readbyte = streamreader.readbyte
+ readcardinaltable = streamreader.readcardinaltable
+ readintegertable = streamreader.readintegertable
+ readfword = readshort
end)
@@ -220,39 +231,6 @@ local read_integer = {
streamreader.readinteger4,
}
--- using helpers doesn't make much sense, subtle differences
---
--- local function readushortarray(f,n)
--- local t = { }
--- for i=1,n do
--- t[i] = readushort(f)
--- end
--- return t
--- end
---
--- local function readulongarray(f,n)
--- local t = { }
--- for i=1,n do
--- t[i] = readulong(f)
--- end
--- return t
--- end
---
--- local function readushortarray(f,target,first,size)
--- if not size then
--- for i=1,size do
--- target[i] = readushort(f)
--- end
--- else
--- for i=1,size do
--- target[first+i] = readushort(f)
--- end
--- end
--- return target
--- end
---
--- so we get some half helper - half non helper mix then
-
-- Traditionally we use these unique names (so that we can flatten the lookup list
-- (we create subsets runtime) but I will adapt the old code to newer names.
@@ -504,10 +482,7 @@ local function readvariationdata(f,storeoffset,factors) -- store
local format = readushort(f)
local regionoffset = storeoffset + readulong(f)
local nofdeltadata = readushort(f)
- local deltadata = { }
- for i=1,nofdeltadata do
- deltadata[i] = readulong(f)
- end
+ local deltadata = readcardinaltable(f,nofdeltadata,ulong)
-- regions
setposition(f,regionoffset)
local nofaxis = readushort(f)
@@ -538,10 +513,7 @@ local function readvariationdata(f,storeoffset,factors) -- store
end
-- we could test before and save a for
for i=1,nofdeltasets do
- local t = { } -- newtable
- for i=1,nofshorts do
- t[i] = readshort(f)
- end
+ local t = readintegertable(f,nofshorts,short)
for i=nofshorts+1,nofregions do
t[i] = readinteger(f)
end
@@ -566,21 +538,32 @@ helpers.readvariationdata = readvariationdata
local function readcoverage(f,offset,simple)
setposition(f,offset)
local coverageformat = readushort(f)
- local coverage = { }
if coverageformat == 1 then
local nofcoverage = readushort(f)
if simple then
- for i=1,nofcoverage do
- coverage[i] = readushort(f)
+ -- often 1 or 2
+ if nofcoverage == 1 then
+ return { readushort(f) }
+ elseif nofcoverage == 2 then
+ return { readushort(f), readushort(f) }
+ else
+ return readcardinaltable(f,nofcoverage,ushort)
end
+ elseif nofcoverage == 1 then
+ return { [readushort(f)] = 0 }
+ elseif nofcoverage == 2 then
+ return { [readushort(f)] = 0, [readushort(f)] = 1 }
else
+ local coverage = { }
for i=0,nofcoverage-1 do
coverage[readushort(f)] = i -- index in record
end
+ return coverage
end
elseif coverageformat == 2 then
local nofranges = readushort(f)
- local n = simple and 1 or 0 -- needs checking
+ local coverage = { }
+ local n = simple and 1 or 0 -- needs checking
for i=1,nofranges do
local firstindex = readushort(f)
local lastindex = readushort(f)
@@ -597,10 +580,11 @@ local function readcoverage(f,offset,simple)
end
end
end
+ return coverage
else
report("unknown coverage format %a ",coverageformat)
+ return { }
end
- return coverage
end
local function readclassdef(f,offset,preset)
@@ -834,23 +818,17 @@ local function readfirst(f,offset)
return { readushort(f) }
end
-local function readarray(f,offset,first)
+-- quite often 0, 1, 2
+
+function readarray(f,offset)
if offset then
setposition(f,offset)
end
local n = readushort(f)
- if first then
- local t = { first }
- for i=2,n do
- t[i] = readushort(f)
- end
- return t, n
+ if n == 1 then
+ return { readushort(f) }, 1
elseif n > 0 then
- local t = { }
- for i=1,n do
- t[i] = readushort(f)
- end
- return t, n
+ return readcardinaltable(f,n,ushort), n
end
end
@@ -1251,10 +1229,7 @@ function gsubhandlers.single(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofg
elseif subtype == 2 then -- in streamreader a seek and fetch is faster than a temp table
local coverage = readushort(f)
local nofreplacements = readushort(f)
- local replacements = { }
- for i=1,nofreplacements do
- replacements[i] = readushort(f)
- end
+ local replacements = readcardinaltable(f,nofreplacements,ushort)
local coverage = readcoverage(f,tableoffset + coverage) -- not simple as we need to set key/value anyway
for index, newindex in next, coverage do
newindex = newindex + 1
@@ -1282,18 +1257,10 @@ local function sethandler(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyp
if subtype == 1 then
local coverage = readushort(f)
local nofsequence = readushort(f)
- local sequences = { }
- for i=1,nofsequence do
- sequences[i] = readushort(f)
- end
+ local sequences = readcardinaltable(f,nofsequence,ushort)
for i=1,nofsequence do
setposition(f,tableoffset + sequences[i])
- local n = readushort(f)
- local s = { }
- for i=1,n do
- s[i] = readushort(f)
- end
- sequences[i] = s
+ sequences[i] = readcardinaltable(f,readushort(f),ushort)
end
local coverage = readcoverage(f,tableoffset + coverage)
for index, newindex in next, coverage do
@@ -1328,19 +1295,20 @@ function gsubhandlers.ligature(f,fontdata,lookupid,lookupoffset,offset,glyphs,no
if subtype == 1 then
local coverage = readushort(f)
local nofsets = readushort(f)
- local ligatures = { }
- for i=1,nofsets do
- ligatures[i] = readushort(f)
- end
+ local ligatures = readcardinaltable(f,nofsets,ushort)
for i=1,nofsets do
local offset = lookupoffset + offset + ligatures[i]
setposition(f,offset)
local n = readushort(f)
- local l = { }
- for i=1,n do
- l[i] = offset + readushort(f)
+ if n == 1 then
+ ligatures[i] = { offset + readushort(f) }
+ else
+ local l = { }
+ for i=1,n do
+ l[i] = offset + readushort(f)
+ end
+ ligatures[i] = l
end
- ligatures[i] = l
end
local coverage = readcoverage(f,tableoffset + coverage)
for index, newindex in next, coverage do
@@ -1988,10 +1956,15 @@ do
local parameters = readushort(f) -- feature.parameters
local noflookups = readushort(f)
if noflookups > 0 then
- local lookups = { }
+-- local lookups = { }
+-- feature.lookups = lookups
+-- for j=1,noflookups do
+-- lookups[j] = readushort(f) + 1
+-- end
+ local lookups = readcardinaltable(f,noflookups,ushort)
feature.lookups = lookups
for j=1,noflookups do
- lookups[j] = readushort(f) + 1
+ lookups[j] = lookups[j] + 1
end
end
if parameters > 0 then
@@ -2007,11 +1980,8 @@ do
local function readlookups(f,lookupoffset,lookuptypes,featurehash,featureorder)
setposition(f,lookupoffset)
- local lookups = { }
local noflookups = readushort(f)
- for i=1,noflookups do
- lookups[i] = readushort(f)
- end
+ local lookups = readcardinaltable(f,noflookups,ushort)
for lookupid=1,noflookups do
local offset = lookups[lookupid]
setposition(f,lookupoffset+offset)
@@ -2302,9 +2272,7 @@ do
end
end
end
--- report("before : % t",rlookups[index])
rlookups[index] = noffound > 0 and found or false
--- report("after : % t",rlookups[index])
else
rlookups[index] = false
end
@@ -2344,11 +2312,12 @@ do
record.condition = nil
record.matchtype = "always"
else
- setposition(f,variationsoffset+offset)
+ local offset = variationsoffset+offset
+ setposition(f,offset)
local nofconditions = readushort(f)
local conditions = { }
for i=1,nofconditions do
- conditions[i] = variationsoffset+offset+readulong(f)
+ conditions[i] = offset + readulong(f)
end
record.conditions = conditions
record.matchtype = "condition"
@@ -2391,10 +2360,7 @@ do
setposition(f,tableoffset)
local parameters = readulong(f) -- feature parameters
local noflookups = readushort(f)
- local lookups = { }
- for i=1,noflookups do
- lookups[i] = readushort(f) -- not sure what to do with these
- end
+ local lookups = readcardinaltable(f,noflookups,ushort) -- not sure what to do with these
-- todo : resolve to proper lookups
record.substitutions = lookups
end
@@ -2617,10 +2583,7 @@ function readers.gdef(f,fontdata,specification)
local format = readushort(f)
if format == 1 then
local nofsets = readushort(f)
- local sets = { }
- for i=1,nofsets do
- sets[i] = readulong(f)
- end
+ local sets = readcardinal(f,nofsets,ulong)
for i=1,nofsets do
local offset = sets[i]
if offset ~= 0 then
@@ -2857,14 +2820,8 @@ local function readmathvariants(f,fontdata,offset)
local hcoverage = readushort(f)
local vnofglyphs = readushort(f)
local hnofglyphs = readushort(f)
- local vconstruction = { }
- local hconstruction = { }
- for i=1,vnofglyphs do
- vconstruction[i] = readushort(f)
- end
- for i=1,hnofglyphs do
- hconstruction[i] = readushort(f)
- end
+ local vconstruction = readcardinaltable(f,vnofglyphs,ushort)
+ local hconstruction = readcardinaltable(f,hnofglyphs,ushort)
fontdata.mathconstants.MinConnectorOverlap = minoverlap
@@ -3039,10 +2996,7 @@ function readers.cpal(f,fontdata,specification)
local nofcolorrecords = readushort(f)
local firstcoloroffset = readulong(f)
local colorrecords = { }
- local palettes = { }
- for i=1,nofpalettes do
- palettes[i] = readushort(f)
- end
+ local palettes = readcardinaltable(f,nofpalettes,ushort)
if version == 1 then
-- used for guis
local palettettypesoffset = readulong(f)
diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua
index 8b5c676c1..c7438dd43 100644
--- a/tex/context/base/mkiv/font-otr.lua
+++ b/tex/context/base/mkiv/font-otr.lua
@@ -121,32 +121,40 @@ local read2dot14 = streamreader.read2dot14 -- 16-bit signed fixed num
local readfword = readshort -- 16-bit signed integer that describes a quantity in FUnits
local readufword = readushort -- 16-bit unsigned integer that describes a quantity in FUnits
local readoffset = readushort
+local readcardinaltable = streamreader.readcardinaltable
+local readintegertable = streamreader.readintegertable
function streamreader.readtag(f)
return lower(stripstring(readstring(f,4)))
end
+local short = 2
+local ushort = 2
+local ulong = 4
+
directives.register("fonts.streamreader",function()
- streamreader = utilities.streams
-
- openfile = streamreader.open
- closefile = streamreader.close
- setposition = streamreader.setposition
- skipshort = streamreader.skipshort
- readbytes = streamreader.readbytes
- readstring = streamreader.readstring
- readbyte = streamreader.readcardinal1
- readushort = streamreader.readcardinal2
- readuint = streamreader.readcardinal3
- readulong = streamreader.readcardinal4
- readshort = streamreader.readinteger2
- readlong = streamreader.readinteger4
- readfixed = streamreader.readfixed4
- read2dot14 = streamreader.read2dot14
- readfword = readshort
- readufword = readushort
- readoffset = readushort
+ streamreader = utilities.streams
+
+ openfile = streamreader.open
+ closefile = streamreader.close
+ setposition = streamreader.setposition
+ skipshort = streamreader.skipshort
+ readbytes = streamreader.readbytes
+ readstring = streamreader.readstring
+ readbyte = streamreader.readcardinal1
+ readushort = streamreader.readcardinal2
+ readuint = streamreader.readcardinal3
+ readulong = streamreader.readcardinal4
+ readshort = streamreader.readinteger2
+ readlong = streamreader.readinteger4
+ readfixed = streamreader.readfixed4
+ read2dot14 = streamreader.read2dot14
+ readfword = readshort
+ readufword = readushort
+ readoffset = readushort
+ readcardinaltable = streamreader.readcardinaltable
+ readintegertable = streamreader.readintegertable
function streamreader.readtag(f)
return lower(stripstring(readstring(f,4)))
@@ -1349,34 +1357,18 @@ formatreaders[4] = function(f,fontdata,offset)
--
skipshort(f,3) -- searchrange entryselector rangeshift
--
- local endchars = { }
- local startchars = { }
- local deltas = { }
- local offsets = { }
- local indices = { }
local mapping = fontdata.mapping
local glyphs = fontdata.glyphs
local duplicates = fontdata.duplicates
local nofdone = 0
- --
- for i=1,nofsegments do
- endchars[i] = readushort(f)
- end
- local reserved = readushort(f) -- 0
- for i=1,nofsegments do
- startchars[i] = readushort(f)
- end
- for i=1,nofsegments do
- deltas[i] = readshort(f)
- end
- for i=1,nofsegments do
- offsets[i] = readushort(f)
- end
+ local endchars = readcardinaltable(f,nofsegments,ushort)
+ local reserved = readushort(f) -- 0
+ local startchars = readcardinaltable(f,nofsegments,ushort)
+ local deltas = readcardinaltable(f,nofsegments,ushort)
+ local offsets = readcardinaltable(f,nofsegments,ushort)
-- format length language nofsegments searchrange entryselector rangeshift 4-tables
- local size = (length - 2 * 2 - 5 * 2 - 4 * 2 * nofsegments) / 2
- for i=1,size-1 do
- indices[i] = readushort(f)
- end
+ local size = (length - 2 * 2 - 5 * 2 - 4 * 2 * nofsegments) / 2
+ local indices = readcardinaltable(f,size-1,ushort)
--
for segment=1,nofsegments do
local startchar = startchars[segment]
@@ -2237,12 +2229,9 @@ local function loadfontdata(specification)
fontdata = readdata(f,0,specification)
elseif version == "ttcf" then
local subfont = tonumber(specification.subfont)
- local offsets = { }
local ttcversion = readulong(f)
local nofsubfonts = readulong(f)
- for i=1,nofsubfonts do
- offsets[i] = readulong(f)
- end
+ local offsets = readcardinaltable(f,nofsubfonts,ulong)
if subfont then -- a number of not
if subfont >= 1 and subfont <= nofsubfonts then
fontdata = readdata(f,offsets[subfont],specification)
diff --git a/tex/context/base/mkiv/font-syn.lua b/tex/context/base/mkiv/font-syn.lua
index 52f425db3..3951e8742 100644
--- a/tex/context/base/mkiv/font-syn.lua
+++ b/tex/context/base/mkiv/font-syn.lua
@@ -1172,7 +1172,7 @@ local function analyzefiles(olddata)
report_names("scanning path %a for %s files",blobpath,suffix)
end, function(blobtype,blobpath,pattern,total,checked,done)
blobpath = resolveprefix(blobpath) -- no shortcut
- report_names("%s entries found, %s %s files checked, %s okay",total,checked,suffix,done)
+ report_names("%s %s files checked, %s okay",checked,suffix,done)
end)
end
diff --git a/tex/context/base/mkiv/font-ttf.lua b/tex/context/base/mkiv/font-ttf.lua
index 181bfbcc6..1365b250d 100644
--- a/tex/context/base/mkiv/font-ttf.lua
+++ b/tex/context/base/mkiv/font-ttf.lua
@@ -38,41 +38,49 @@ local sqrt, round = math.sqrt, math.round
local char = string.char
local concat = table.concat
-local report = logs.reporter("otf reader","ttf")
+local report = logs.reporter("otf reader","ttf")
-local trace_deltas = false
+local trace_deltas = false
-local readers = fonts.handlers.otf.readers
-local streamreader = readers.streamreader
+local readers = fonts.handlers.otf.readers
+local streamreader = readers.streamreader
-local setposition = streamreader.setposition
-local getposition = streamreader.getposition
-local skipbytes = streamreader.skip
-local readbyte = streamreader.readcardinal1 -- 8-bit unsigned integer
-local readushort = streamreader.readcardinal2 -- 16-bit unsigned integer
-local readulong = streamreader.readcardinal4 -- 24-bit unsigned integer
-local readchar = streamreader.readinteger1 -- 8-bit signed integer
-local readshort = streamreader.readinteger2 -- 16-bit signed integer
-local read2dot14 = streamreader.read2dot14 -- 16-bit signed fixed number with the low 14 bits of fraction (2.14) (F2DOT14)
-local readinteger = streamreader.readinteger1
+local setposition = streamreader.setposition
+local getposition = streamreader.getposition
+local skipbytes = streamreader.skip
+local readbyte = streamreader.readcardinal1 -- 8-bit unsigned integer
+local readushort = streamreader.readcardinal2 -- 16-bit unsigned integer
+local readulong = streamreader.readcardinal4 -- 24-bit unsigned integer
+local readchar = streamreader.readinteger1 -- 8-bit signed integer
+local readshort = streamreader.readinteger2 -- 16-bit signed integer
+local read2dot14 = streamreader.read2dot14 -- 16-bit signed fixed number with the low 14 bits of fraction (2.14) (F2DOT14)
+local readinteger = streamreader.readinteger1
+local readcardinaltable = streamreader.readcardinaltable
+local readintegertable = streamreader.readintegertable
directives.register("fonts.streamreader",function()
- streamreader = utilities.streams
+ streamreader = utilities.streams
- setposition = streamreader.setposition
- getposition = streamreader.getposition
- skipbytes = streamreader.skip
- readbyte = streamreader.readcardinal1
- readushort = streamreader.readcardinal2
- readulong = streamreader.readcardinal4
- readchar = streamreader.readinteger1
- readshort = streamreader.readinteger2
- read2dot14 = streamreader.read2dot14
- readinteger = streamreader.readinteger1
+ setposition = streamreader.setposition
+ getposition = streamreader.getposition
+ skipbytes = streamreader.skip
+ readbyte = streamreader.readcardinal1
+ readushort = streamreader.readcardinal2
+ readulong = streamreader.readcardinal4
+ readchar = streamreader.readinteger1
+ readshort = streamreader.readinteger2
+ read2dot14 = streamreader.read2dot14
+ readinteger = streamreader.readinteger1
+ readcardinaltable = streamreader.readcardinaltable
+ readintegertable = streamreader.readintegertable
end)
+local short = 2
+local ushort = 2
+local ulong = 4
+
local helpers = readers.helpers
local gotodatatable = helpers.gotodatatable
@@ -699,13 +707,10 @@ end
-- end of converter
local function readglyph(f,nofcontours) -- read deltas here, saves space
- local points = { }
- local contours = { }
- local instructions = { }
- local flags = { }
- for i=1,nofcontours do
- contours[i] = readshort(f) + 1
- end
+ local points = { }
+ local instructions = { }
+ local flags = { }
+ local contours = readintegertable(f,nofcontours,short)
local nofpoints = contours[nofcontours]
local nofinstructions = readushort(f)
skipbytes(f,nofinstructions)
diff --git a/tex/context/base/mkiv/l-dir.lua b/tex/context/base/mkiv/l-dir.lua
index bc691d536..d13550643 100644
--- a/tex/context/base/mkiv/l-dir.lua
+++ b/tex/context/base/mkiv/l-dir.lua
@@ -75,7 +75,8 @@ function dir.current()
return (gsub(currentdir(),"\\","/"))
end
--- somewhat optimized
+-- The next one is somewhat optimized but still slow but it's a pitty that the iterator
+-- doesn't return a mode too.
local function glob_pattern_function(path,patt,recurse,action)
if isdir(path) then
@@ -89,6 +90,8 @@ local function glob_pattern_function(path,patt,recurse,action)
usedpath = path
end
local dirs
+ local nofdirs = 0
+ local noffiles = #result
for name in walkdir(usedpath) do
if name ~= "." and name ~= ".." then
local full = path .. name
@@ -98,16 +101,18 @@ local function glob_pattern_function(path,patt,recurse,action)
action(full)
end
elseif recurse and mode == "directory" then
- if not dirs then
- dirs = { full }
+ if dirs then
+ nofdirs = nofdirs + 1
+ dirs[nofdirs] = full
else
- dirs[#dirs+1] = full
+ nofdirs = 1
+ dirs = { full }
end
end
end
end
if dirs then
- for i=1,#dirs do
+ for i=1,nofdirs do
glob_pattern_function(dirs[i],patt,recurse,action)
end
end
@@ -118,38 +123,41 @@ local function glob_pattern_table(path,patt,recurse,result)
if not result then
result = { }
end
- if isdir(path) then
- local usedpath
- if path == "/" then
- usedpath = "/."
- elseif not find(path,"/$") then
- usedpath = path .. "/."
- path = path .. "/"
- else
- usedpath = path
- end
- local dirs
- for name in walkdir(usedpath) do
- if name ~= "." and name ~= ".." then
- local full = path .. name
- local mode = attributes(full,'mode')
- if mode == 'file' then
- if not patt or find(full,patt) then
- result[#result+1] = full
- end
- elseif recurse and mode == "directory" then
- if not dirs then
- dirs = { full }
- else
- dirs[#dirs+1] = full
- end
+ local usedpath
+ if path == "/" then
+ usedpath = "/."
+ elseif not find(path,"/$") then
+ usedpath = path .. "/."
+ path = path .. "/"
+ else
+ usedpath = path
+ end
+ local dirs
+ local nofdirs = 0
+ local noffiles = #result
+ for name, a in walkdir(usedpath) do
+ if name ~= "." and name ~= ".." then
+ local full = path .. name
+ local mode = attributes(full,'mode')
+ if mode == 'file' then
+ if not patt or find(full,patt) then
+ noffiles = noffiles + 1
+ result[noffiles] = full
+ end
+ elseif recurse and mode == "directory" then
+ if dirs then
+ nofdirs = nofdirs + 1
+ dirs[nofdirs] = full
+ else
+ nofdirs = 1
+ dirs = { full }
end
end
end
- if dirs then
- for i=1,#dirs do
- glob_pattern_table(dirs[i],patt,recurse,result)
- end
+ end
+ if dirs then
+ for i=1,nofdirs do
+ glob_pattern_table(dirs[i],patt,recurse,result)
end
end
return result
@@ -160,12 +168,13 @@ local function globpattern(path,patt,recurse,method)
if patt and sub(patt,1,-3) == path then
patt = false
end
+ local okay = isdir(path)
if kind == "function" then
- return glob_pattern_function(path,patt,recurse,method)
+ return okay and glob_pattern_function(path,patt,recurse,method) or { }
elseif kind == "table" then
- return glob_pattern_table(path,patt,recurse,method)
+ return okay and glob_pattern_table(path,patt,recurse,method) or method
else
- return glob_pattern_table(path,patt,recurse,{ })
+ return okay and glob_pattern_table(path,patt,recurse,{ }) or { }
end
end
diff --git a/tex/context/base/mkiv/l-lpeg.lua b/tex/context/base/mkiv/l-lpeg.lua
index e3d0ff9c3..5101a2e8d 100644
--- a/tex/context/base/mkiv/l-lpeg.lua
+++ b/tex/context/base/mkiv/l-lpeg.lua
@@ -291,8 +291,12 @@ patterns.beginline = #(1-newline)
patterns.longtostring = Cs(whitespace^0/"" * ((patterns.quoted + nonwhitespace^1 + whitespace^1/"" * (P(-1) + Cc(" ")))^0))
-local function anywhere(pattern) --slightly adapted from website
- return P { P(pattern) + 1 * V(1) }
+-- local function anywhere(pattern) -- slightly adapted from website
+-- return P { P(pattern) + 1 * V(1) }
+-- end
+
+function anywhere(pattern) -- faster
+ return (1-P(pattern))^0 * P(pattern)
end
lpeg.anywhere = anywhere
diff --git a/tex/context/base/mkiv/l-os.lua b/tex/context/base/mkiv/l-os.lua
index b4b1a8645..b34c35edb 100644
--- a/tex/context/base/mkiv/l-os.lua
+++ b/tex/context/base/mkiv/l-os.lua
@@ -223,6 +223,13 @@ local name, platform = os.name or "linux", os.getenv("MTX_PLATFORM") or ""
-- os.bits = 32 | 64
+-- os.uname()
+-- sysname
+-- machine
+-- release
+-- version
+-- nodename
+
if platform ~= "" then
os.platform = platform
diff --git a/tex/context/base/mkiv/l-table.lua b/tex/context/base/mkiv/l-table.lua
index 04c318792..69f45d9b4 100644
--- a/tex/context/base/mkiv/l-table.lua
+++ b/tex/context/base/mkiv/l-table.lua
@@ -1228,8 +1228,9 @@ end
function table.reverse(t) -- check with 5.3 ?
if t then
local n = #t
+ local m = n + 1
for i=1,floor(n/2) do -- maybe just n//2
- local j = n - i + 1
+ local j = m - i
t[i], t[j] = t[j], t[i]
end
return t
diff --git a/tex/context/base/mkiv/luat-ini.mkiv b/tex/context/base/mkiv/luat-ini.mkiv
index 93f908a07..da5a3a310 100644
--- a/tex/context/base/mkiv/luat-ini.mkiv
+++ b/tex/context/base/mkiv/luat-ini.mkiv
@@ -265,55 +265,84 @@
% \def\syst_helpers_checked_stripped_csname#1%
% {\if\noexpand#1\letterbackslash\else#1\fi}
-\normalprotected\def\installctxfunction#1#2% expandable
- {\edef\m_syst_name{\csstring#1}%
- \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
- \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}}
-
-\normalprotected\def\installctxscanner#1#2% expandable
- {\edef\m_syst_name{\csstring#1}%
- \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
- \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}}
-
-\normalprotected\def\installprotectedctxfunction#1#2% protected
- {\edef\m_syst_name{\csstring#1}%
- \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
- \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}}
-
-\normalprotected\def\installprotectedctxscanner#1#2% protected
- {\edef\m_syst_name{\csstring#1}%
- \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
- \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}}
-
-% not yet used
-
-\ifdefined\luafunctioncall \else
- \protected\def\luafunctioncall{\luafunctioncall}
-\fi
+\ifdefined\normalluadef
+
+ \normalprotected\def\installctxfunction#1#2% expandable
+ {\edef\m_syst_name{\csstring#1}%
+ \global\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax}
+
+ \normalprotected\def\installctxscanner#1#2% expandable
+ {\edef\m_syst_name{\csstring#1}%
+ \global\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax}
+
+ \normalprotected\def\installprotectedctxfunction#1#2% protected
+ {\edef\m_syst_name{\csstring#1}%
+ \global\normalprotected\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax}
+
+ \normalprotected\def\installprotectedctxscanner#1#2% protected
+ {\edef\m_syst_name{\csstring#1}%
+ \global\normalprotected\expandafter\normalluadef\csname\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax}
+
+ \normalprotected\def\resetctxscanner#1%
+ {\edef\m_syst_name{\csstring#1}%
+ \expandafter\glet\csname\m_syst_name\endcsname\relax}
+
+ % \let\installctxfunctioncall \installctxfunction
+ % \let\installctxscannercall \installctxscanner
+ % \let\installprotectedctxfunctioncall\installprotectedctxfunction
+ % \let\installprotectedctxscannercall \installprotectedctxscanner
+
+\else
+
+ \ifdefined\luafunctioncall \else
+ \normalprotected\def\luafunctioncall{\luafunction}
+ \fi
+
+ \normalprotected\def\installctxfunction#1#2% expandable
+ {\edef\m_syst_name{\csstring#1}%
+ \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
+ \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}}
+
+ \normalprotected\def\installctxscanner#1#2% expandable
+ {\edef\m_syst_name{\csstring#1}%
+ \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
+ \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunction\csname\??luafunction\m_syst_name\endcsname}}
+
+ \normalprotected\def\installprotectedctxfunction#1#2% protected
+ {\edef\m_syst_name{\csstring#1}%
+ \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
+ \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
+
+ \normalprotected\def\installprotectedctxscanner#1#2% protected
+ {\edef\m_syst_name{\csstring#1}%
+ \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
+ \expandafter\xdef\csname\m_syst_name\endcsname{\noexpand\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
+
+ \normalprotected\def\resetctxscanner#1%
+ {\edef\m_syst_name{\csstring#1}%
+ \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\zerocount
+ \expandafter\glet\csname\m_syst_name\endcsname\relax}
+
+ % \normalprotected\def\installctxfunctioncall#1#2%
+ % {\edef\m_syst_name{\csstring#1}%
+ % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
+ % \expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
+ %
+ % \normalprotected\def\installctxscannercall#1#2%
+ % {\edef\m_syst_name{\csstring#1}%
+ % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
+ % \expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
+ %
+ % \normalprotected\def\installprotectedctxfunctioncall#1#2%
+ % {\edef\m_syst_name{\csstring#1}%
+ % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
+ % \normalprotected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
+ %
+ % \normalprotected\def\installprotectedctxscannercall#1#2%
+ % {\edef\m_syst_name{\csstring#1}%
+ % \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
+ % \normalprotected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
-\normalprotected\def\installctxfunctioncall#1#2%
- {\edef\m_syst_name{\csstring#1}%
- \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
- \expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
-
-\normalprotected\def\installctxscannercall#1#2%
- {\edef\m_syst_name{\csstring#1}%
- \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
- \expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
-
-\normalprotected\def\installprotectedctxfunctioncall#1#2%
- {\edef\m_syst_name{\csstring#1}%
- \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxfunction("#2",true)}\relax
- \normalprotected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
-
-\normalprotected\def\installprotectedctxscannercall#1#2%
- {\edef\m_syst_name{\csstring#1}%
- \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\ctxcommand{ctxscanner("\m_syst_name","#2",true)}\relax
- \normalprotected\expandafter\xdef\csname\m_syst_name\endcsname{\luafunctioncall\csname\??luafunction\m_syst_name\endcsname}}
-
-\normalprotected\def\resetctxscanner#1%
- {\edef\m_syst_name{\csstring#1}%
- \global\expandafter\chardef\csname\??luafunction\m_syst_name\endcsname\zerocount
- \expandafter\glet\csname\m_syst_name\endcsname\relax}
+\fi
\protect \endinput
diff --git a/tex/context/base/mkiv/lxml-ini.mkiv b/tex/context/base/mkiv/lxml-ini.mkiv
index 7c97ffb2c..c4d6176ec 100644
--- a/tex/context/base/mkiv/lxml-ini.mkiv
+++ b/tex/context/base/mkiv/lxml-ini.mkiv
@@ -231,6 +231,7 @@
\unexpanded\def\xmlremovedocumentsetup #1#2{\clf_xmlremovesetup {#1}{#2}}
\unexpanded\def\xmlresetdocumentsetups #1{\clf_xmlresetsetups {#1}}
+\unexpanded\def\xmlflushsetups #1{\clf_xmlflushsetups {#1}{*}{}} % #1 == id where to apply *
\unexpanded\def\xmlflushdocumentsetups #1#2{\clf_xmlflushsetups {#1}{*}{#2}} % #1 == id where to apply * and #2
\let\xmlregistersetup \xmlappendsetup
@@ -240,7 +241,7 @@
\unexpanded\def\xmlregisteredsetups
{\xmlstarttiming
- \xmlflushsetups
+ \xmlflushsetups\xmldocument
\xmldefaulttotext\xmldocument % after include
\xmlstoptiming}
diff --git a/tex/context/base/mkiv/lxml-lpt.lua b/tex/context/base/mkiv/lxml-lpt.lua
index 9cccac120..a80a33f42 100644
--- a/tex/context/base/mkiv/lxml-lpt.lua
+++ b/tex/context/base/mkiv/lxml-lpt.lua
@@ -157,11 +157,11 @@ apply_axis['root'] = function(list)
end
apply_axis['self'] = function(list)
---~ local collected = { }
---~ for l=1,#list do
---~ collected[l] = list[l]
---~ end
---~ return collected
+ -- local collected = { }
+ -- for l=1,#list do
+ -- collected[l] = list[l]
+ -- end
+ -- return collected
return list
end
@@ -171,18 +171,32 @@ apply_axis['child'] = function(list)
local ll = list[l]
local dt = ll.dt
if dt then -- weird that this is needed
- local en = 0
- for k=1,#dt do
- local dk = dt[k]
+ local n = #dt
+ if n == 0 then
+ ll.en = 0
+ elseif n == 1 then
+ local dk = dt[1]
if dk.tg then
c = c + 1
collected[c] = dk
- dk.ni = k -- refresh
- en = en + 1
- dk.ei = en
+ dk.ni = 1 -- refresh
+ dk.ei = 1
+ ll.en = 1
+ end
+ else
+ local en = 0
+ for k=1,#dt do
+ local dk = dt[k]
+ if dk.tg then
+ c = c + 1
+ en = en + 1
+ collected[c] = dk
+ dk.ni = k -- refresh
+ dk.ei = en
+ end
end
+ ll.en = en
end
- ll.en = en
end
end
return collected
@@ -191,19 +205,36 @@ end
local function collect(list,collected,c)
local dt = list.dt
if dt then
- local en = 0
- for k=1,#dt do
- local dk = dt[k]
+ local n = #dt
+ if n == 0 then
+ list.en = 0
+ elseif n == 1 then
+ local dk = dt[1]
if dk.tg then
c = c + 1
collected[c] = dk
- dk.ni = k -- refresh
- en = en + 1
- dk.ei = en
+ dk.ni = 1 -- refresh
+ dk.ei = 1
c = collect(dk,collected,c)
+ list.en = 1
+ else
+ list.en = 0
end
+ else
+ local en = 0
+ for k=1,n do
+ local dk = dt[k]
+ if dk.tg then
+ c = c + 1
+ en = en + 1
+ collected[c] = dk
+ dk.ni = k -- refresh
+ dk.ei = en
+ c = collect(dk,collected,c)
+ end
+ end
+ list.en = en
end
- list.en = en
end
return c
end
@@ -219,22 +250,38 @@ end
local function collect(list,collected,c)
local dt = list.dt
if dt then
- local en = 0
- for k=1,#dt do
- local dk = dt[k]
+ local n = #dt
+ if n == 0 then
+ list.en = 0
+ elseif n == 1 then
+ local dk = dt[1]
if dk.tg then
c = c + 1
collected[c] = dk
- dk.ni = k -- refresh
- en = en + 1
- dk.ei = en
+ dk.ni = 1 -- refresh
+ dk.ei = 1
c = collect(dk,collected,c)
+ list.en = 1
+ end
+ else
+ local en = 0
+ for k=1,#dt do
+ local dk = dt[k]
+ if dk.tg then
+ c = c + 1
+ en = en + 1
+ collected[c] = dk
+ dk.ni = k -- refresh
+ dk.ei = en
+ c = collect(dk,collected,c)
+ end
end
+ list.en = en
end
- list.en = en
end
return c
end
+
apply_axis['descendant-or-self'] = function(list)
local collected, c = { }, 0
for l=1,#list do
@@ -301,40 +348,40 @@ apply_axis['namespace'] = function(list)
end
apply_axis['following'] = function(list) -- incomplete
---~ local collected, c = { }, 0
---~ for l=1,#list do
---~ local ll = list[l]
---~ local p = ll.__p__
---~ local d = p.dt
---~ for i=ll.ni+1,#d do
---~ local di = d[i]
---~ if type(di) == "table" then
---~ c = c + 1
---~ collected[c] = di
---~ break
---~ end
---~ end
---~ end
---~ return collected
+ -- local collected, c = { }, 0
+ -- for l=1,#list do
+ -- local ll = list[l]
+ -- local p = ll.__p__
+ -- local d = p.dt
+ -- for i=ll.ni+1,#d do
+ -- local di = d[i]
+ -- if type(di) == "table" then
+ -- c = c + 1
+ -- collected[c] = di
+ -- break
+ -- end
+ -- end
+ -- end
+ -- return collected
return { }
end
apply_axis['preceding'] = function(list) -- incomplete
---~ local collected, c = { }, 0
---~ for l=1,#list do
---~ local ll = list[l]
---~ local p = ll.__p__
---~ local d = p.dt
---~ for i=ll.ni-1,1,-1 do
---~ local di = d[i]
---~ if type(di) == "table" then
---~ c = c + 1
---~ collected[c] = di
---~ break
---~ end
---~ end
---~ end
---~ return collected
+ -- local collected, c = { }, 0
+ -- for l=1,#list do
+ -- local ll = list[l]
+ -- local p = ll.__p__
+ -- local d = p.dt
+ -- for i=ll.ni-1,1,-1 do
+ -- local di = d[i]
+ -- if type(di) == "table" then
+ -- c = c + 1
+ -- collected[c] = di
+ -- break
+ -- end
+ -- end
+ -- end
+ -- return collected
return { }
end
diff --git a/tex/context/base/mkiv/lxml-tex.lua b/tex/context/base/mkiv/lxml-tex.lua
index eed3b123a..0e8f2541c 100644
--- a/tex/context/base/mkiv/lxml-tex.lua
+++ b/tex/context/base/mkiv/lxml-tex.lua
@@ -92,6 +92,8 @@ local forceraw = false
local p_texescape = patterns.texescape
+local tokenizedcs = context.tokenizedcs
+
directives.enable("xml.path.keeplastmatch")
-- tex entities
@@ -499,13 +501,30 @@ function lxml.checkindex(name)
return root and root.index or 0
end
-function lxml.withindex(name,n,command) -- will change as name is always there now
- local i, p = lpegmatch(splitter,n)
- if p then
- contextsprint(ctxcatcodes,"\\xmlw{",command,"}{",n,"}")
- else
- contextsprint(ctxcatcodes,"\\xmlw{",command,"}{",name,"::",n,"}")
+if tokenizedcs then
+
+ function lxml.withindex(name,n,command) -- will change as name is always there now
+ local i, p = lpegmatch(splitter,n)
+ local w = tokenizedcs.xmlw
+ if p then
+ contextsprint(ctxcatcodes,w,"{",command,"}{",n,"}")
+ else
+ contextsprint(ctxcatcodes,w,"{",command,"}{",name,"::",n,"}")
+ end
end
+
+else
+
+ function lxml.withindex(name,n,command) -- will change as name is always there now
+ local i, p = lpegmatch(splitter,n)
+
+ if p then
+ contextsprint(ctxcatcodes,"\\xmlw{",command,"}{",n,"}")
+ else
+ contextsprint(ctxcatcodes,"\\xmlw{",command,"}{",name,"::",n,"}")
+ end
+ end
+
end
function lxml.getindex(name,n) -- will change as name is always there now
@@ -728,21 +747,6 @@ end
local default_element_handler = xml.gethandlers("verbose").functions["@el@"]
--- local xmlw = setmetatableindex(function(t,k)
--- local v = setmetatableindex(function(t,kk)
--- local v
--- if kk == false then
--- v = "\\xmlw{" .. k .. "}{"
--- else
--- v = "\\xmlw{" .. k .. "}{" .. kk .. "::"
--- end
--- t[kk] = v
--- return v
--- end)
--- t[k]= v
--- return v
--- end)
-
local setfilename = false
local trace_name = false
local report_name = logs.reporter("lxml")
@@ -765,39 +769,80 @@ trackers.register("system.synctex.xml",function(v)
trace_name = v
end)
-local function tex_element(e,handlers)
- if setfilename then
- syncfilename(e,"element")
- end
- local command = e.command
- if command == nil then
- default_element_handler(e,handlers)
- elseif command == true then
- -- text (no <self></self>) / so, no mkii fallback then
- handlers.serialize(e.dt,handlers)
- elseif command == false then
- -- ignore
- else
- local tc = type(command)
- if tc == "string" then
- local rootname, ix = e.name, e.ix
- if rootname then
- if not ix then
- addindex(rootname,false,true)
- ix = e.ix
+local tex_element
+
+if tokenizedcs then
+
+ tex_element = function(e,handlers)
+ if setfilename then
+ syncfilename(e,"element")
+ end
+ local command = e.command
+ if command == nil then
+ default_element_handler(e,handlers)
+ elseif command == true then
+ -- text (no <self></self>) / so, no mkii fallback then
+ handlers.serialize(e.dt,handlers)
+ elseif command == false then
+ -- ignore
+ else
+ local tc = type(command)
+ if tc == "string" then
+ local rootname, ix = e.name, e.ix
+ local w = tokenizedcs.xmlw
+ if rootname then
+ if not ix then
+ addindex(rootname,false,true)
+ ix = e.ix
+ end
+ contextsprint(ctxcatcodes,w,"{",command,"}{",rootname,"::",ix,"}")
+ else
+ report_lxml("fatal error: no index for %a",command)
+ contextsprint(ctxcatcodes,w,"{",command,"}{",ix or 0,"}")
end
- -- faster than context.xmlw
- contextsprint(ctxcatcodes,"\\xmlw{",command,"}{",rootname,"::",ix,"}")
- -- contextsprint(ctxcatcodes,xmlw[command][rootname],ix,"}")
- else
- report_lxml("fatal error: no index for %a",command)
- contextsprint(ctxcatcodes,"\\xmlw{",command,"}{",ix or 0,"}")
- -- contextsprint(ctxcatcodes,xmlw[command][false],ix or 0,"}")
+ elseif tc == "function" then
+ command(e)
+ end
+ end
+ end
+
+else
+
+ tex_element = function(e,handlers)
+ if setfilename then
+ syncfilename(e,"element")
+ end
+ local command = e.command
+ if command == nil then
+ default_element_handler(e,handlers)
+ elseif command == true then
+ -- text (no <self></self>) / so, no mkii fallback then
+ handlers.serialize(e.dt,handlers)
+ elseif command == false then
+ -- ignore
+ else
+ local tc = type(command)
+ if tc == "string" then
+ local rootname, ix = e.name, e.ix
+ if rootname then
+ if not ix then
+ addindex(rootname,false,true)
+ ix = e.ix
+ end
+ -- faster than context.xmlw
+ contextsprint(ctxcatcodes,"\\xmlw{",command,"}{",rootname,"::",ix,"}")
+ -- contextsprint(ctxcatcodes,xmlw[command][rootname],ix,"}")
+ else
+ report_lxml("fatal error: no index for %a",command)
+ contextsprint(ctxcatcodes,"\\xmlw{",command,"}{",ix or 0,"}")
+ -- contextsprint(ctxcatcodes,xmlw[command][false],ix or 0,"}")
+ end
+ elseif tc == "function" then
+ command(e)
end
- elseif tc == "function" then
- command(e)
end
end
+
end
-- <?context-directive foo ... ?>
@@ -1180,7 +1225,7 @@ function lxml.flushsetups(id,...)
local sd = setups[document]
if sd then
for k=1,#sd do
- local v= sd[k]
+ local v = sd[k]
if not done[v] then
if trace_loading then
report_lxml("applying setup %02i : %a to %a",k,v,document)
@@ -1442,29 +1487,63 @@ end
-- the number of commands is often relative small but there can be many calls
-- to this finalizer
-local function command(collected,cmd,otherwise)
- local n = collected and #collected
- if n and n > 0 then
- local wildcard = find(cmd,"*",1,true)
- for c=1,n do -- maybe optimize for n=1
- local e = collected[c]
- local ix = e.ix
- local name = e.name
- if name and not ix then
- addindex(name,false,true)
- ix = e.ix
- end
- if not ix or not name then
- report_lxml("no valid node index for element %a using command %s",name or "?",cmd)
- elseif wildcard then
- contextsprint(ctxcatcodes,"\\xmlw{",(gsub(cmd,"%*",e.tg)),"}{",name,"::",ix,"}")
- else
- contextsprint(ctxcatcodes,"\\xmlw{",cmd,"}{",name,"::",ix,"}")
+local command
+
+if tokenizedcs then
+
+ command = function(collected,cmd,otherwise)
+ local n = collected and #collected
+ local w = tokenizedcs.xmlw
+ if n and n > 0 then
+ local wildcard = find(cmd,"*",1,true)
+ for c=1,n do -- maybe optimize for n=1
+ local e = collected[c]
+ local ix = e.ix
+ local name = e.name
+ if name and not ix then
+ addindex(name,false,true)
+ ix = e.ix
+ end
+ if not ix or not name then
+ report_lxml("no valid node index for element %a using command %s",name or "?",cmd)
+ elseif wildcard then
+ contextsprint(ctxcatcodes,w,"{",(gsub(cmd,"%*",e.tg)),"}{",name,"::",ix,"}")
+ else
+ contextsprint(ctxcatcodes,w,"{",cmd,"}{",name,"::",ix,"}")
+ end
+ end
+ elseif otherwise then
+ contextsprint(ctxcatcodes,w,"{",otherwise,"}{#1}")
+ end
+ end
+
+else
+
+ command = function(collected,cmd,otherwise)
+ local n = collected and #collected
+ if n and n > 0 then
+ local wildcard = find(cmd,"*",1,true)
+ for c=1,n do -- maybe optimize for n=1
+ local e = collected[c]
+ local ix = e.ix
+ local name = e.name
+ if name and not ix then
+ addindex(name,false,true)
+ ix = e.ix
+ end
+ if not ix or not name then
+ report_lxml("no valid node index for element %a using command %s",name or "?",cmd)
+ elseif wildcard then
+ contextsprint(ctxcatcodes,"\\xmlw{",(gsub(cmd,"%*",e.tg)),"}{",name,"::",ix,"}")
+ else
+ contextsprint(ctxcatcodes,"\\xmlw{",cmd,"}{",name,"::",ix,"}")
+ end
end
+ elseif otherwise then
+ contextsprint(ctxcatcodes,"\\xmlw{",otherwise,"}{#1}")
end
- elseif otherwise then
- contextsprint(ctxcatcodes,"\\xmlw{",otherwise,"}{#1}")
end
+
end
-- local wildcards = setmetatableindex(function(t,k)
@@ -1675,7 +1754,7 @@ local function concatrange(collected,start,stop,separator,lastseparator,textonly
end
end
-local function concat(collected,separator,lastseparator,textonly) -- test this on mml
+local function concatlist(collected,separator,lastseparator,textonly) -- test this on mml
concatrange(collected,false,false,separator,lastseparator,textonly)
end
@@ -1697,14 +1776,12 @@ texfinalizers.context = ctxtext
texfinalizers.position = position
texfinalizers.match = match
texfinalizers.index = index
-texfinalizers.concat = concat
+texfinalizers.concat = concatlist
texfinalizers.concatrange = concatrange
texfinalizers.chainattribute = chainattribute
texfinalizers.chainpath = chainpath
texfinalizers.default = all -- !!
-local concat = table.concat
-
function texfinalizers.tag(collected,n)
if collected then
local nc = #collected
@@ -2139,24 +2216,51 @@ function lxml.direct(id)
end
end
-function lxml.command(id,pattern,cmd)
- local i, p = getid(id,true)
- local collected = xmlapplylpath(getid(i),pattern)
- if collected then
- local nc = #collected
- if nc > 0 then
- local rootname = p or i.name
- for c=1,nc do
- local e = collected[c]
- local ix = e.ix
- if not ix then
- addindex(rootname,false,true)
- ix = e.ix
+if tokenizedcs then
+
+ function lxml.command(id,pattern,cmd)
+ local i, p = getid(id,true)
+ local collected = xmlapplylpath(getid(i),pattern)
+ if collected then
+ local nc = #collected
+ if nc > 0 then
+ local rootname = p or i.name
+ local w = tokenizedcs.xmlw
+ for c=1,nc do
+ local e = collected[c]
+ local ix = e.ix
+ if not ix then
+ addindex(rootname,false,true)
+ ix = e.ix
+ end
+ contextsprint(ctxcatcodes,w,"{",cmd,"}{",rootname,"::",ix,"}")
+ end
+ end
+ end
+ end
+
+else
+
+ function lxml.command(id,pattern,cmd)
+ local i, p = getid(id,true)
+ local collected = xmlapplylpath(getid(i),pattern)
+ if collected then
+ local nc = #collected
+ if nc > 0 then
+ local rootname = p or i.name
+ for c=1,nc do
+ local e = collected[c]
+ local ix = e.ix
+ if not ix then
+ addindex(rootname,false,true)
+ ix = e.ix
+ end
+ contextsprint(ctxcatcodes,"\\xmlw{",cmd,"}{",rootname,"::",ix,"}")
end
- contextsprint(ctxcatcodes,"\\xmlw{",cmd,"}{",rootname,"::",ix,"}")
end
end
end
+
end
-- loops
@@ -2292,13 +2396,13 @@ function texfinalizers.lettered(collected)
end
end
---~ function texfinalizers.apply(collected,what) -- to be tested
---~ if collected then
---~ for c=1,#collected do
---~ contextsprint(ctxcatcodes,what(collected[c].dt[1]))
---~ end
---~ end
---~ end
+-- function texfinalizers.apply(collected,what) -- to be tested
+-- if collected then
+-- for c=1,#collected do
+-- contextsprint(ctxcatcodes,what(collected[c].dt[1]))
+-- end
+-- end
+-- end
function lxml.toparameters(id)
local e = getid(id)
diff --git a/tex/context/base/mkiv/math-ini.mkiv b/tex/context/base/mkiv/math-ini.mkiv
index dc88f82aa..4115a13c4 100644
--- a/tex/context/base/mkiv/math-ini.mkiv
+++ b/tex/context/base/mkiv/math-ini.mkiv
@@ -739,20 +739,20 @@
% this one too: \letvalue{\??mathcodecommand op}\mathop ?
\unexpanded\def\normalmbox
- {\hbox\bgroup
+ {\normalhbox\bgroup
\usemathematicsstyleandcolor\c!textstyle\c!textcolor % new
- \dowithnextboxcs\math_mbox_finish\hbox}
+ \dowithnextboxcs\math_mbox_finish\normalhbox}
\def\math_mbox_finish
{\flushnextbox
\egroup}
\unexpanded\def\mbox % we cannot add \dontleavehmode ... else no \setbox0\mbox possible
- {\ifmmode\normalmbox\else\hbox\fi}
+ {\ifmmode\normalmbox\else\normalhbox\fi}
\unexpanded\def\enablembox
- {\appendtoks\math_enable_mbox\to \everymathematics}
- {\everymathematics\expandafter{\the\everymathematics\math_enable_mbox}}
+ %{\appendtoks\math_enable_mbox\to \everymathematics}
+ {\toksapp\everymathematics{\math_enable_mbox}}
\def\math_enable_mbox
{\let\hbox\mbox}
@@ -760,7 +760,7 @@
\unexpanded\def\snappedmath#1% sort of \struttedbox
{\dontleavehmode
\begingroup
- \setbox\scratchbox\hbox\bgroup
+ \setbox\scratchbox\normalhbox\bgroup
\startimath#1\stopimath
\egroup
\ht\scratchbox\strutht
@@ -2817,6 +2817,56 @@
\mathrulesfam\zerocount
\to \everymathematics
+%D Maybe:
+
+% \starttabulate[|||c|c|]
+% \BC positive \BC negative \BC text \BC math \NC \NR
+% \NC \tex {f1} \tex {hairspace} \tex{,} \NC \tex {b1} \tex {neghairspace} \NC {\darkred\vl}\f1{\darkblue\vl} \NC ${\darkred\vl}\f1{\darkblue\vl}$ \NC \NR
+% \NC \tex {f2} \tex {thinspace} \tex{:} \NC \tex {b2} \tex {negthinspace} \tex{!} \NC {\darkred\vl}\f2{\darkblue\vl} \NC ${\darkred\vl}\f2{\darkblue\vl}$ \NC \NR
+% \NC \tex {f3} \tex {medspace} \tex{;} \NC \tex {b3} \tex {negmedspace} \NC {\darkred\vl}\f3{\darkblue\vl} \NC ${\darkred\vl}\f3{\darkblue\vl}$ \NC \NR
+% \NC \tex {f4} \tex {thickspace} \NC \tex {b4} \tex {negthickspace} \NC {\darkred\vl}\f4{\darkblue\vl} \NC ${\darkred\vl}\f4{\darkblue\vl}$ \NC \NR
+% \NC \tex {f5} \tex {enspace} \NC \tex {b5} \NC {\darkred\vl}\f5{\darkblue\vl} \NC ${\darkred\vl}\f5{\darkblue\vl}$ \NC \NR
+% \NC \tex {f6} \tex {emspace} \NC \tex {b6} \NC {\darkred\vl}\f6{\darkblue\vl} \NC ${\darkred\vl}\f6{\darkblue\vl}$ \NC \NR
+% \stoptabulate
+
+% \unexpanded\def\negenspace{\kern-.5\emwidth}
+% \unexpanded\def\negemspace{\kern- \emwidth}
+%
+% \unexpanded\def\math_f#1%
+% {\ifcase#1\or
+% \hairspace
+% \or
+% \thinspace
+% \or
+% \medspace
+% \or
+% \thickspace
+% \or
+% \enspace
+% \or
+% \emspace
+% \fi}
+%
+% \unexpanded\def\math_b#1%
+% {\ifcase#1\or
+% \neghairspace
+% \or
+% \negthinspace
+% \or
+% \negmedspace
+% \or
+% \negthickspace
+% \or
+% \negenspace
+% \or
+% \negemspace
+% \fi}
+%
+% \appendtoks
+% \let\f\math_f
+% \let\b\math_b
+% \to \everymathematics
+
\protect \endinput
% % not used (yet)
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index 1b794ef73..3d733aa2e 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -414,11 +414,7 @@ return {
"startluacode", "stopluacode", "startlua", "stoplua",
"startctxfunction","stopctxfunction","ctxfunction",
"startctxfunctiondefinition","stopctxfunctiondefinition",
- "installctxfunction", "installctxfunctioncall",
- "installprotectedctxfunction", "installprotectedctxfunctioncall",
- "installctxscanner", "installctxscannercall",
- "resetctxscanner",
- "installprotectedctxscanner", "installprotectedctxscannercall",
+ "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner",
"cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand",
--
"carryoverpar",
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index edb66b991..3aa265b8d 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -237,6 +237,7 @@ return {
"crampedscriptscriptstyle",
"crampedscriptstyle",
"crampedtextstyle",
+ "csstring",
"draftmode",
"dviextension",
"dvifeedback",
@@ -244,8 +245,6 @@ return {
"efcode",
"etoksapp",
"etokspre",
- "xtoksapp",
- "xtokspre",
"exceptionpenalty",
"expanded",
"expandglyphsinfont",
@@ -254,18 +253,20 @@ return {
"fontid",
"formatname",
"gleaders",
- "glet",
+ "gtoksapp",
+ "gtokspre",
"hjcode",
"hyphenationbounds",
"hyphenationmin",
"hyphenpenaltymode",
"ifabsdim",
"ifabsnum",
+ "ifcondition",
"ifincsname",
"ifprimitive",
"ignoreligaturesinfont",
- "immediateassignment",
"immediateassigned",
+ "immediateassignment",
"initcatcodetable",
"insertht",
"lastnamedcs",
@@ -286,6 +287,10 @@ return {
"localleftbox",
"localrightbox",
"lpcode",
+ "luabytecode",
+ "luabytecodecall",
+ "luacopyinputnodes",
+ "luadef",
"luaescapestring",
"luafunction",
"luafunctioncall",
@@ -367,12 +372,12 @@ return {
"textdirection",
"toksapp",
"tokspre",
- "gtoksapp",
- "gtokspre",
"tracingfonts",
"uniformdeviate",
"useboxresource",
"useimageresource",
+ "xtoksapp",
+ "xtokspre",
},
["omega"]={
"Omegaminorversion",
@@ -533,7 +538,6 @@ return {
"cr",
"crcr",
"csname",
- "csstring",
"day",
"deadcycles",
"def",
@@ -591,6 +595,7 @@ return {
"fontname",
"futurelet",
"gdef",
+ "glet",
"global",
"globaldefs",
"halign",
@@ -834,4 +839,4 @@ return {
["xetex"]={
"XeTeXversion",
},
-}
+} \ No newline at end of file
diff --git a/tex/context/base/mkiv/spac-ver.mkiv b/tex/context/base/mkiv/spac-ver.mkiv
index 70f79bdad..4c78dfd69 100644
--- a/tex/context/base/mkiv/spac-ver.mkiv
+++ b/tex/context/base/mkiv/spac-ver.mkiv
@@ -2016,7 +2016,7 @@
\expandafter\nostartblankhandling
\fi}
-\def\nostartblankhandling#1\stopblankhandling
+\unexpanded\def\nostartblankhandling#1\stopblankhandling
{}
\def\dostartblankhandling
@@ -2044,7 +2044,7 @@
\setfalse\c_space_vspacing_done
\the\everybeforeblankhandling}
-\def\addpredefinedblankskip#1#2%
+\unexpanded\def\addpredefinedblankskip#1#2%
{\settrue\c_space_vspacing_done
\advance\s_spac_vspacing_temp#1\dimexpr\csname\??vspacingamount#2\endcsname\relax}
@@ -2091,7 +2091,7 @@
\def\spac_vspacing_nop_ignore
{\ifmmode\else\par\fi}
-\def\directvspacing#1%
+\unexpanded\def\directvspacing#1%
{\par\clf_vspacing{#1}}
\def\directcheckedvspacing
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index f177ab844..ce9997904 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 102f1ce2d..4df2c4555 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-mar.lua b/tex/context/base/mkiv/strc-mar.lua
index bb79ac7a9..51f896aa7 100644
--- a/tex/context/base/mkiv/strc-mar.lua
+++ b/tex/context/base/mkiv/strc-mar.lua
@@ -650,28 +650,49 @@ end
-- pushing to context:
-local separator = context.nested.markingseparator
-local command = context.nested.markingcommand
-local ctxconcat = context.concat
-
-local function fetchonemark(name,range,method)
- context(command(name,fetched(name,range,method)))
-end
+-- local separator = context.nested.markingseparator
+-- local command = context.nested.markingcommand
+-- local ctxconcat = context.concat
+
+-- local function fetchonemark(name,range,method)
+-- context(command(name,fetched(name,range,method)))
+-- end
+
+-- local function fetchtwomarks(name,range)
+-- ctxconcat( {
+-- command(name,fetched(name,range,v_first)),
+-- command(name,fetched(name,range,v_last)),
+-- }, separator(name))
+-- end
+
+-- local function fetchallmarks(name,range)
+-- ctxconcat( {
+-- command(name,fetched(name,range,v_previous)),
+-- command(name,fetched(name,range,v_first)),
+-- command(name,fetched(name,range,v_last)),
+-- }, separator(name))
+-- end
+
+ local ctx_separator = context.markingseparator
+ local ctx_command = context.markingcommand
+
+ local function fetchonemark(name,range,method)
+ ctx_command(name,fetched(name,range,method))
+ end
-local function fetchtwomarks(name,range)
- ctxconcat( {
- command(name,fetched(name,range,v_first)),
- command(name,fetched(name,range,v_last)),
- }, separator(name))
-end
+ local function fetchtwomarks(name,range)
+ ctx_command(name,fetched(name,range,v_first))
+ ctx_separator(name)
+ ctx_command(name,fetched(name,range,v_last))
+ end
-local function fetchallmarks(name,range)
- ctxconcat( {
- command(name,fetched(name,range,v_previous)),
- command(name,fetched(name,range,v_first)),
- command(name,fetched(name,range,v_last)),
- }, separator(name))
-end
+ local function fetchallmarks(name,range)
+ ctx_command(name,fetched(name,range,v_previous))
+ ctx_separator(name)
+ ctx_command(name,fetched(name,range,v_first))
+ ctx_separator(name)
+ ctx_command(name,fetched(name,range,v_last))
+ end
function marks.fetch(name,range,method) -- chapter page first | chapter column:1 first
if trace_marks_get then
diff --git a/tex/context/base/mkiv/syst-aux.lua b/tex/context/base/mkiv/syst-aux.lua
index f9d8505f1..27f194b0a 100644
--- a/tex/context/base/mkiv/syst-aux.lua
+++ b/tex/context/base/mkiv/syst-aux.lua
@@ -373,10 +373,17 @@ implement {
-- not faster but just less tracing:
-local firstoftwoarguments = context.firstoftwoarguments
-local secondoftwoarguments = context.secondoftwoarguments
-local firstofoneargument = context.firstofoneargument
-local gobbleoneargument = context.gobbleoneargument
+local ctx_protected_cs = context.protected.cs -- more efficient
+
+local ctx_firstoftwoarguments = ctx_protected_cs.firstoftwoarguments
+local ctx_secondoftwoarguments = ctx_protected_cs.secondoftwoarguments
+local ctx_firstofoneargument = ctx_protected_cs.firstofoneargument
+local ctx_gobbleoneargument = ctx_protected_cs.gobbleoneargument
+
+context.firstoftwoarguments = ctx_firstoftwoarguments
+context.secondoftwoarguments = ctx_secondoftwoarguments
+context.firstofoneargument = ctx_firstofoneargument
+context.gobbleoneargument = ctx_gobbleoneargument
local hash = utilities.parsers.hashes.settings_to_set
@@ -384,9 +391,9 @@ local function doifelsecommon(a,b)
if a == b then
setmacro("commalistelement",a)
if a == "" then
- secondoftwoarguments()
+ ctx_secondoftwoarguments()
else
- firstoftwoarguments()
+ ctx_firstoftwoarguments()
end
return
end
@@ -400,7 +407,7 @@ local function doifelsecommon(a,b)
for k in next, ha do
if hb[k] then
setmacro("commalistelement",k)
- firstoftwoarguments()
+ ctx_firstoftwoarguments()
return
end
end
@@ -408,28 +415,28 @@ local function doifelsecommon(a,b)
if hash[a][b] then
-- if settings_to_set(a)[b] then
setmacro("commalistelement",b)
- firstoftwoarguments()
+ ctx_firstoftwoarguments()
return
end
elseif bb then
if hash[b][a] then
-- if settings_to_set(b)[a] then
setmacro("commalistelement",a)
- firstoftwoarguments()
+ ctx_firstoftwoarguments()
return
end
end
setmacro("commalistelement","")
- secondoftwoarguments()
+ ctx_secondoftwoarguments()
end
local function doifcommon(a,b)
if a == b then
setmacro("commalistelement",a)
if a == "" then
- gobbleoneargument()
+ ctx_gobbleoneargument()
else
- firstofoneargument()
+ ctx_firstofoneargument()
end
return
end
@@ -443,7 +450,7 @@ local function doifcommon(a,b)
for k in next, ha do
if hb[k] then
setmacro("commalistelement",k)
- firstofoneargument()
+ ctx_firstofoneargument()
return
end
end
@@ -451,28 +458,28 @@ local function doifcommon(a,b)
if hash[a][b] then
-- if settings_to_set(a)[b] then
setmacro("commalistelement",b)
- firstofoneargument()
+ ctx_firstofoneargument()
return
end
elseif bb then
if hash[b][a] then
-- if settings_to_set(b)[a] then
setmacro("commalistelement",a)
- firstofoneargument()
+ ctx_firstofoneargument()
return
end
end
setmacro("commalistelement","")
- gobbleoneargument()
+ ctx_gobbleoneargument()
end
local function doifnotcommon(a,b)
if a == b then
setmacro("commalistelement",a)
if a == "" then
- firstofoneargument()
+ ctx_firstofoneargument()
else
- gobbleoneargument()
+ ctx_gobbleoneargument()
end
return
end
@@ -486,7 +493,7 @@ local function doifnotcommon(a,b)
for k in next, ha do
if hb[k] then
setmacro("commalistelement",k)
- gobbleoneargument()
+ ctx_gobbleoneargument()
return
end
end
@@ -494,28 +501,28 @@ local function doifnotcommon(a,b)
if hash[a][b] then
-- if settings_to_set(a)[b] then
setmacro("commalistelement",b)
- gobbleoneargument()
+ ctx_gobbleoneargument()
return
end
elseif bb then
if hash[b][a] then
-- if settings_to_set(b)[a] then
setmacro("commalistelement",a)
- gobbleoneargument()
+ ctx_gobbleoneargument()
return
end
end
setmacro("commalistelement","")
- firstofoneargument()
+ ctx_firstofoneargument()
end
local function doifelseinset(a,b)
if a == b then
setmacro("commalistelement",a)
if a == "" then
- secondoftwoarguments()
+ ctx_secondoftwoarguments()
else
- firstoftwoarguments()
+ ctx_firstoftwoarguments()
end
return
end
@@ -524,21 +531,21 @@ local function doifelseinset(a,b)
if hash[b][a] then
-- if settings_to_set(b)[a] then
setmacro("commalistelement",a)
- firstoftwoarguments()
+ ctx_firstoftwoarguments()
return
end
end
setmacro("commalistelement","")
- secondoftwoarguments()
+ ctx_secondoftwoarguments()
end
local function doifinset(a,b)
if a == b then
setmacro("commalistelement",a)
if a == "" then
- gobbleoneargument()
+ ctx_gobbleoneargument()
else
- firstofoneargument()
+ ctx_firstofoneargument()
end
return
end
@@ -547,21 +554,21 @@ local function doifinset(a,b)
if hash[b][a] then
-- if settings_to_set(b)[a] then
setmacro("commalistelement",a)
- firstofoneargument()
+ ctx_firstofoneargument()
return
end
end
setmacro("commalistelement","")
- gobbleoneargument()
+ ctx_gobbleoneargument()
end
local function doifnotinset(a,b)
if a == b then
setmacro("commalistelement",a)
if a == "" then
- firstofoneargument()
+ ctx_firstofoneargument()
else
- gobbleoneargument()
+ ctx_gobbleoneargument()
end
return
end
@@ -570,12 +577,12 @@ local function doifnotinset(a,b)
if hash[b][a] then
-- if settings_to_set(b)[a] then
setmacro("commalistelement",a)
- gobbleoneargument()
+ ctx_gobbleoneargument()
return
end
end
setmacro("commalistelement","")
- firstofoneargument()
+ ctx_firstofoneargument()
end
implement {
diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv
index dcf7810b7..485a87ecb 100644
--- a/tex/context/base/mkiv/syst-ini.mkiv
+++ b/tex/context/base/mkiv/syst-ini.mkiv
@@ -1265,7 +1265,7 @@
\ifdefined\prerelpenalty \else \newcount\prerelpenalty \fi
\ifdefined\breakafterdirmode \else \newcount\breakafterdirmode \fi
-
-\ifdefined\exceptionpenalty \else \newcount\exceptionpenalty \fi
+\ifdefined\exceptionpenalty \else \newcount\exceptionpenalty \fi
+\ifdefined\luacopyinputnodes \else \newcount\luacopyinputnodes \fi
\protect \endinput
diff --git a/tex/context/base/mkiv/syst-lua.lua b/tex/context/base/mkiv/syst-lua.lua
index 35cd22123..a8e9e1b01 100644
--- a/tex/context/base/mkiv/syst-lua.lua
+++ b/tex/context/base/mkiv/syst-lua.lua
@@ -15,10 +15,10 @@ local context = context
local implement = interfaces.implement
local ctx_protected_cs = context.protected.cs -- more efficient
-local ctx_firstoftwoarguments = ctx_protected_cs.firstoftwoarguments
-local ctx_secondoftwoarguments = ctx_protected_cs.secondoftwoarguments
-local ctx_firstofoneargument = ctx_protected_cs.firstofoneargument
-local ctx_gobbleoneargument = ctx_protected_cs.gobbleoneargument
+local ctx_firstoftwoarguments = context.firstoftwoarguments
+local ctx_secondoftwoarguments = context.secondoftwoarguments
+local ctx_firstofoneargument = context.firstofoneargument
+local ctx_gobbleoneargument = context.gobbleoneargument
local two_strings = interfaces.strings[2]
diff --git a/tex/context/base/mkiv/task-ini.lua b/tex/context/base/mkiv/task-ini.lua
index 29ae69eb1..49f85f01d 100644
--- a/tex/context/base/mkiv/task-ini.lua
+++ b/tex/context/base/mkiv/task-ini.lua
@@ -94,7 +94,6 @@ appendaction("shipouts", "finishers", "attributes.viewerlayers.handler",
appendaction("shipouts", "wrapup", "nodes.handlers.export", nil, "nut", "disabled" ) -- always last
appendaction("shipouts", "wrapup", "luatex.synctex.collect", nil, "nut", "disabled" )
-
appendaction("math", "normalizers", "noads.handlers.showtree", nil, "nonut", "disabled" )
appendaction("math", "normalizers", "noads.handlers.unscript", nil, "nonut", "enabled" )
appendaction("math", "normalizers", "noads.handlers.variants", nil, "nonut", "enabled" )
diff --git a/tex/context/base/mkiv/toks-ini.lua b/tex/context/base/mkiv/toks-ini.lua
index 481858971..dfdf854d0 100644
--- a/tex/context/base/mkiv/toks-ini.lua
+++ b/tex/context/base/mkiv/toks-ini.lua
@@ -18,41 +18,15 @@ local printtable = table.print
local concat = table.concat
local format = string.format
-if setinspector then
+if token.commands then
- local istoken = token.is_token
- local simple = { letter = "letter", other_char = "other" }
+ local commands = token.commands()
- local function astable(t)
- if t and istoken(t) then
- local cmdname = t.cmdname
- local simple = simple[cmdname]
- if simple then
- return {
- category = simple,
- character = utfchar(t.mode) or nil,
- }
- else
- return {
- command = t.command,
- id = t.id,
- tok = t.tok,
- csname = t.csname,
- active = t.active,
- expandable = t.expandable,
- protected = t.protected,
- mode = t.mode,
- index = t.index,
- cmdname = cmdname,
- }
- end
- end
- end
+ tokens.commands = utilities.storage.allocate(table.swapped(commands,commands))
- tokens.istoken = istoken
- tokens.astable = astable
+else
- setinspector("token",function(v) if istoken(v) then printtable(astable(v),tostring(v)) return true end end)
+ tokens.commands = { }
end
@@ -79,25 +53,26 @@ local get_macro = token.get_macro
local get_meaning = token.get_meaning
local get_cmdname = token.get_cmdname
local set_char = token.set_char
+local set_lua = token.set_lua
+
local create_token = token.create
+local new_token = token.new
+local is_defined = token.is_defined
+local is_token = token.is_token
-if not set_char then -- for a while
- local contextsprint = context.sprint
- local ctxcatcodes = catcodes.numbers.ctxcatcodes
- set_char = function(n,u) contextsprint(ctxcatcodes,format("\\chardef\\%s=%s",n,u)) end
-end
+if not is_defined then
+
+ is_defined = function(name)
+ return get_cmdname(create_token(name)) ~= "undefined_cs"
+ end
-function tokens.defined(name)
- return get_cmdname(create_token(name)) ~= "undefined_cs"
end
--- set_macro = function(k,v,g)
--- if g == "global" then
--- context.setgvalue(k,v or '')
--- else
--- context.setvalue(k,v or '')
--- end
--- end
+tokens.new = new_token
+tokens.create = create_token
+tokens.istoken = is_token
+tokens.isdefined = is_defined
+tokens.defined = is_defined
local bits = {
escape = 0x00000001, -- 2^00
@@ -272,6 +247,7 @@ tokens.getters = { -- these don't expand
tokens.setters = {
macro = set_macro,
char = set_char,
+ lua = set_lua,
count = tex.setcount,
dimen = tex.setdimen,
skip = tex.setglue,
@@ -301,3 +277,45 @@ tokens.setters = {
-- /* unsave_tex_scanner(texstate); */
-- return 1;
-- }
+
+if setinspector then
+
+ local simple = { letter = "letter", other_char = "other" }
+
+ local function astable(t)
+ if t and is_token(t) then
+ local cmdname = t.cmdname
+ local simple = simple[cmdname]
+ if simple then
+ return {
+ category = simple,
+ character = utfchar(t.mode) or nil,
+ }
+ else
+ return {
+ command = t.command,
+ id = t.id,
+ tok = t.tok,
+ csname = t.csname,
+ active = t.active,
+ expandable = t.expandable,
+ protected = t.protected,
+ mode = t.mode,
+ index = t.index,
+ cmdname = cmdname,
+ }
+ end
+ end
+ end
+
+ tokens.astable = astable
+
+ setinspector("token",function(v) local t = astable(v) if t then printtable(t,tostring(v)) return true end end)
+
+end
+
+tokens.cache = table.setmetatableindex(function(t,k)
+ local v = create_token(k)
+ t[k] = v
+ return v
+end)
diff --git a/tex/context/base/mkiv/toks-ini.mkiv b/tex/context/base/mkiv/toks-ini.mkiv
index 9d3375432..af22d5393 100644
--- a/tex/context/base/mkiv/toks-ini.mkiv
+++ b/tex/context/base/mkiv/toks-ini.mkiv
@@ -15,11 +15,6 @@
\unprotect
-\newtoks\t_get_macro % will go away
-
\registerctxluafile{toks-ini}{}
-\registerctxluafile{toks-scn}{}
-\registerctxluafile{cldf-scn}{}
-\registerctxluafile{cldf-stp}{}
\protect \endinput
diff --git a/tex/context/base/mkiv/toks-scn.mkiv b/tex/context/base/mkiv/toks-scn.mkiv
new file mode 100644
index 000000000..49edf0c24
--- /dev/null
+++ b/tex/context/base/mkiv/toks-scn.mkiv
@@ -0,0 +1,22 @@
+%D \module
+%D [ file=toks-ini,
+%D version=2007.03.03,
+%D title=\CONTEXT\ Token Support,
+%D subtitle=Initialization,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Token Support / Scanners}
+
+\unprotect
+
+\registerctxluafile{toks-scn}{}
+\registerctxluafile{cldf-scn}{}
+\registerctxluafile{cldf-stp}{}
+
+\protect \endinput
diff --git a/tex/context/base/mkiv/util-fil.lua b/tex/context/base/mkiv/util-fil.lua
index 0e8ed4e57..d568a2e1f 100644
--- a/tex/context/base/mkiv/util-fil.lua
+++ b/tex/context/base/mkiv/util-fil.lua
@@ -343,3 +343,40 @@ if fio and fio.readcardinal1 then
end
end
+
+if fio and fio.readcardinaltable then
+
+ files.readcardinaltable = fio.readcardinaltable
+ files.readintegertable = fio.readintegertable
+
+else
+
+ local readcardinal1 = files.readcardinal1
+ local readcardinal2 = files.readcardinal2
+ local readcardinal3 = files.readcardinal3
+ local readcardinal4 = files.readcardinal4
+
+ function files.readcardinaltable(f,n,b)
+ local t = { }
+ if b == 1 then for i=1,n do t[i] = readcardinal1(f) end
+ elseif b == 2 then for i=1,n do t[i] = readcardinal2(f) end
+ elseif b == 3 then for i=1,n do t[i] = readcardinal3(f) end
+ elseif b == 4 then for i=1,n do t[i] = readcardinal4(f) end end
+ return t
+ end
+
+ local readinteger1 = files.readinteger1
+ local readinteger2 = files.readinteger2
+ local readinteger3 = files.readinteger3
+ local readinteger4 = files.readinteger4
+
+ function files.readintegertable(f,n,b)
+ local t = { }
+ if b == 1 then for i=1,n do t[i] = readinteger1(f) end
+ elseif b == 2 then for i=1,n do t[i] = readinteger2(f) end
+ elseif b == 3 then for i=1,n do t[i] = readinteger3(f) end
+ elseif b == 4 then for i=1,n do t[i] = readinteger4(f) end end
+ return t
+ end
+
+end
diff --git a/tex/context/base/mkiv/util-sac.lua b/tex/context/base/mkiv/util-sac.lua
index b509d9a9b..09c3819c5 100644
--- a/tex/context/base/mkiv/util-sac.lua
+++ b/tex/context/base/mkiv/util-sac.lua
@@ -386,3 +386,40 @@ if sio and sio.readcardinal2 then
streams.readinteger = streams.readinteger1
end
+
+if sio and sio.readcardinaltable then
+
+ streams.readcardinaltable = sio.readcardinaltable
+ streams.readintegertable = sio.readintegertable
+
+else
+
+ local readcardinal1 = streams.readcardinal1
+ local readcardinal2 = streams.readcardinal2
+ local readcardinal3 = streams.readcardinal3
+ local readcardinal4 = streams.readcardinal4
+
+ function streams.readcardinaltable(f,n,b)
+ local t = { }
+ if b == 1 then for i=1,n do t[i] = readcardinal1(f) end
+ elseif b == 2 then for i=1,n do t[i] = readcardinal2(f) end
+ elseif b == 3 then for i=1,n do t[i] = readcardinal3(f) end
+ elseif b == 4 then for i=1,n do t[i] = readcardinal4(f) end end
+ return t
+ end
+
+ local readinteger1 = streams.readinteger1
+ local readinteger2 = streams.readinteger2
+ local readinteger3 = streams.readinteger3
+ local readinteger4 = streams.readinteger4
+
+ function streams.readintegertable(f,n,b)
+ local t = { }
+ if b == 1 then for i=1,n do t[i] = readinteger1(f) end
+ elseif b == 2 then for i=1,n do t[i] = readinteger2(f) end
+ elseif b == 3 then for i=1,n do t[i] = readinteger3(f) end
+ elseif b == 4 then for i=1,n do t[i] = readinteger4(f) end end
+ return t
+ end
+
+end
diff --git a/tex/context/interface/mkii/keys-cs.xml b/tex/context/interface/mkii/keys-cs.xml
index 521393c17..7c70baad8 100644
--- a/tex/context/interface/mkii/keys-cs.xml
+++ b/tex/context/interface/mkii/keys-cs.xml
@@ -859,7 +859,7 @@
<cd:constant name='headseparator' value='headseparator'/>
<cd:constant name='headstyle' value='stylhlavicky'/>
<cd:constant name='height' value='vyska'/>
- <cd:constant name='hfactor' value='vfaktor'/>
+ <cd:constant name='hfactor' value='hfaktor'/>
<cd:constant name='hfil' value='hfil'/>
<cd:constant name='hidenumber' value='hidenumber'/>
<cd:constant name='hoffset' value='hoffset'/>
@@ -1280,6 +1280,7 @@
<cd:constant name='vcompact' value='vcompact'/>
<cd:constant name='vector' value='vector'/>
<cd:constant name='veroffset' value='offsethlavicky'/>
+ <cd:constant name='vfactor' value='vfaktor'/>
<cd:constant name='vfil' value='vfil'/>
<cd:constant name='viewerprefix' value='viewerprefix'/>
<cd:constant name='voffset' value='voffset'/>
diff --git a/tex/context/interface/mkii/keys-it.xml b/tex/context/interface/mkii/keys-it.xml
index da7970619..809790fea 100644
--- a/tex/context/interface/mkii/keys-it.xml
+++ b/tex/context/interface/mkii/keys-it.xml
@@ -1280,6 +1280,7 @@
<cd:constant name='vcompact' value='vcompact'/>
<cd:constant name='vector' value='vector'/>
<cd:constant name='veroffset' value='veroffset'/>
+ <cd:constant name='vfactor' value='vfactor'/>
<cd:constant name='vfil' value='vfil'/>
<cd:constant name='viewerprefix' value='viewerprefix'/>
<cd:constant name='voffset' value='voffset'/>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 77855e8c0..43387f6a1 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 903c92bb2..1cb15e8b2 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/modules/mkiv/s-fonts-shapes.lua b/tex/context/modules/mkiv/s-fonts-shapes.lua
index 2c4cd445f..4fc810a92 100644
--- a/tex/context/modules/mkiv/s-fonts-shapes.lua
+++ b/tex/context/modules/mkiv/s-fonts-shapes.lua
@@ -58,39 +58,6 @@ function moduledata.fonts.shapes.showlist(specification) -- todo: ranges
for k, v in next, characters.data do
if chrs[k] then
NC() context("0x%05X",k)
- NC() char(id,k) -- getvalue(cs) context.char(k)
- NC() char(id,v.shcode)
- NC() char(id,v.lccode or k)
- NC() char(id,v.uccode or k)
- NC() special(id,v.specials)
- NC() context.tx(v.description)
- NC() NR()
- end
- end
- context.stoptabulate()
- context.endgroup()
-end
-
-function moduledata.fonts.shapes.showlist(specification) -- todo: ranges
- specification = interfaces.checkedspecification(specification)
- local id, cs = fonts.definers.internal(specification,"<module:fonts:shapes:font>")
- local chrs = fontdata[id].characters
- context.begingroup()
- context.tt()
- context.starttabulate { "|l|c|c|c|c|l|l|" }
- context.FL()
- NC() context.bold("unicode")
- NC() context.bold("glyph")
- NC() context.bold("shape")
- NC() context.bold("lower")
- NC() context.bold("upper")
- NC() context.bold("specials")
- NC() context.bold("description")
- NC() NR()
- context.TL()
- for k, v in next, characters.data do
- if chrs[k] then
- NC() context("0x%05X",k)
NC() char(id,k)
NC() char(id,v.shcode)
NC() char(id,v.lccode or k)
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 54e95b3af..f65ca966e 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 : 05/24/18 15:49:05
+-- merge date : 06/02/18 22:34:21
do -- begin closure to overcome local limits and interference
@@ -305,8 +305,8 @@ patterns.propername=(uppercase+lowercase+underscore)*(uppercase+lowercase+unders
patterns.somecontent=(anything-newline-space)^1
patterns.beginline=#(1-newline)
patterns.longtostring=Cs(whitespace^0/""*((patterns.quoted+nonwhitespace^1+whitespace^1/""*(P(-1)+Cc(" ")))^0))
-local function anywhere(pattern)
- return P { P(pattern)+1*V(1) }
+function anywhere(pattern)
+ return (1-P(pattern))^0*P(pattern)
end
lpeg.anywhere=anywhere
function lpeg.instringchecker(p)
@@ -2001,8 +2001,9 @@ end
function table.reverse(t)
if t then
local n=#t
+ local m=n+1
for i=1,floor(n/2) do
- local j=n-i+1
+ local j=m-i
t[i],t[j]=t[j],t[i]
end
return t
@@ -4868,6 +4869,35 @@ if fio and fio.readcardinal1 then
skipposition(f,4*(n or 1))
end
end
+if fio and fio.readcardinaltable then
+ files.readcardinaltable=fio.readcardinaltable
+ files.readintegertable=fio.readintegertable
+else
+ local readcardinal1=files.readcardinal1
+ local readcardinal2=files.readcardinal2
+ local readcardinal3=files.readcardinal3
+ local readcardinal4=files.readcardinal4
+ function files.readcardinaltable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readcardinal1(f) end
+ elseif b==2 then for i=1,n do t[i]=readcardinal2(f) end
+ elseif b==3 then for i=1,n do t[i]=readcardinal3(f) end
+ elseif b==4 then for i=1,n do t[i]=readcardinal4(f) end end
+ return t
+ end
+ local readinteger1=files.readinteger1
+ local readinteger2=files.readinteger2
+ local readinteger3=files.readinteger3
+ local readinteger4=files.readinteger4
+ function files.readintegertable(f,n,b)
+ local t={}
+ if b==1 then for i=1,n do t[i]=readinteger1(f) end
+ elseif b==2 then for i=1,n do t[i]=readinteger2(f) end
+ elseif b==3 then for i=1,n do t[i]=readinteger3(f) end
+ elseif b==4 then for i=1,n do t[i]=readinteger4(f) end end
+ return t
+ end
+end
end -- closure
@@ -11325,9 +11355,14 @@ local read2dot14=streamreader.read2dot14
local readfword=readshort
local readufword=readushort
local readoffset=readushort
+local readcardinaltable=streamreader.readcardinaltable
+local readintegertable=streamreader.readintegertable
function streamreader.readtag(f)
return lower(stripstring(readstring(f,4)))
end
+local short=2
+local ushort=2
+local ulong=4
directives.register("fonts.streamreader",function()
streamreader=utilities.streams
openfile=streamreader.open
@@ -11347,6 +11382,8 @@ directives.register("fonts.streamreader",function()
readfword=readshort
readufword=readushort
readoffset=readushort
+ readcardinaltable=streamreader.readcardinaltable
+ readintegertable=streamreader.readintegertable
function streamreader.readtag(f)
return lower(stripstring(readstring(f,4)))
end
@@ -12049,32 +12086,17 @@ formatreaders[4]=function(f,fontdata,offset)
local language=readushort(f)
local nofsegments=readushort(f)/2
skipshort(f,3)
- local endchars={}
- local startchars={}
- local deltas={}
- local offsets={}
- local indices={}
local mapping=fontdata.mapping
local glyphs=fontdata.glyphs
local duplicates=fontdata.duplicates
local nofdone=0
- for i=1,nofsegments do
- endchars[i]=readushort(f)
- end
+ local endchars=readcardinaltable(f,nofsegments,ushort)
local reserved=readushort(f)
- for i=1,nofsegments do
- startchars[i]=readushort(f)
- end
- for i=1,nofsegments do
- deltas[i]=readshort(f)
- end
- for i=1,nofsegments do
- offsets[i]=readushort(f)
- end
+ local startchars=readcardinaltable(f,nofsegments,ushort)
+ local deltas=readcardinaltable(f,nofsegments,ushort)
+ local offsets=readcardinaltable(f,nofsegments,ushort)
local size=(length-2*2-5*2-4*2*nofsegments)/2
- for i=1,size-1 do
- indices[i]=readushort(f)
- end
+ local indices=readcardinaltable(f,size-1,ushort)
for segment=1,nofsegments do
local startchar=startchars[segment]
local endchar=endchars[segment]
@@ -12816,12 +12838,9 @@ local function loadfontdata(specification)
fontdata=readdata(f,0,specification)
elseif version=="ttcf" then
local subfont=tonumber(specification.subfont)
- local offsets={}
local ttcversion=readulong(f)
local nofsubfonts=readulong(f)
- for i=1,nofsubfonts do
- offsets[i]=readulong(f)
- end
+ local offsets=readcardinaltable(f,nofsubfonts,ulong)
if subfont then
if subfont>=1 and subfont<=nofsubfonts then
fontdata=readdata(f,offsets[subfont],specification)
@@ -14957,6 +14976,8 @@ local readchar=streamreader.readinteger1
local readshort=streamreader.readinteger2
local read2dot14=streamreader.read2dot14
local readinteger=streamreader.readinteger1
+local readcardinaltable=streamreader.readcardinaltable
+local readintegertable=streamreader.readintegertable
directives.register("fonts.streamreader",function()
streamreader=utilities.streams
setposition=streamreader.setposition
@@ -14969,7 +14990,12 @@ directives.register("fonts.streamreader",function()
readshort=streamreader.readinteger2
read2dot14=streamreader.read2dot14
readinteger=streamreader.readinteger1
+ readcardinaltable=streamreader.readcardinaltable
+ readintegertable=streamreader.readintegertable
end)
+local short=2
+local ushort=2
+local ulong=4
local helpers=readers.helpers
local gotodatatable=helpers.gotodatatable
local function mergecomposites(glyphs,shapes)
@@ -15531,12 +15557,9 @@ local function repackpoints(glyphs,shapes)
end
local function readglyph(f,nofcontours)
local points={}
- local contours={}
local instructions={}
local flags={}
- for i=1,nofcontours do
- contours[i]=readshort(f)+1
- end
+ local contours=readintegertable(f,nofcontours,short)
local nofpoints=contours[nofcontours]
local nofinstructions=readushort(f)
skipbytes(f,nofinstructions)
@@ -16063,9 +16086,14 @@ local readfixed=streamreader.readfixed4
local read2dot14=streamreader.read2dot14
local skipshort=streamreader.skipshort
local skipbytes=streamreader.skip
-local readfword=readshort
local readbytetable=streamreader.readbytetable
local readbyte=streamreader.readbyte
+local readcardinaltable=streamreader.readcardinaltable
+local readintegertable=streamreader.readintegertable
+local readfword=readshort
+local short=2
+local ushort=2
+local ulong=4
directives.register("fonts.streamreader",function()
streamreader=utilities.streams
setposition=streamreader.setposition
@@ -16081,9 +16109,11 @@ directives.register("fonts.streamreader",function()
read2dot14=streamreader.read2dot14
skipshort=streamreader.skipshort
skipbytes=streamreader.skip
- readfword=readshort
readbytetable=streamreader.readbytetable
readbyte=streamreader.readbyte
+ readcardinaltable=streamreader.readcardinaltable
+ readintegertable=streamreader.readintegertable
+ readfword=readshort
end)
local gsubhandlers={}
local gposhandlers={}
@@ -16351,10 +16381,7 @@ local function readvariationdata(f,storeoffset,factors)
local format=readushort(f)
local regionoffset=storeoffset+readulong(f)
local nofdeltadata=readushort(f)
- local deltadata={}
- for i=1,nofdeltadata do
- deltadata[i]=readulong(f)
- end
+ local deltadata=readcardinaltable(f,nofdeltadata,ulong)
setposition(f,regionoffset)
local nofaxis=readushort(f)
local nofregions=readushort(f)
@@ -16382,10 +16409,7 @@ local function readvariationdata(f,storeoffset,factors)
usedregions[i]=regions[readushort(f)+1]
end
for i=1,nofdeltasets do
- local t={}
- for i=1,nofshorts do
- t[i]=readshort(f)
- end
+ local t=readintegertable(f,nofshorts,short)
for i=nofshorts+1,nofregions do
t[i]=readinteger(f)
end
@@ -16405,20 +16429,30 @@ helpers.readvariationdata=readvariationdata
local function readcoverage(f,offset,simple)
setposition(f,offset)
local coverageformat=readushort(f)
- local coverage={}
if coverageformat==1 then
local nofcoverage=readushort(f)
if simple then
- for i=1,nofcoverage do
- coverage[i]=readushort(f)
+ if nofcoverage==1 then
+ return { readushort(f) }
+ elseif nofcoverage==2 then
+ return { readushort(f),readushort(f) }
+ else
+ return readcardinaltable(f,nofcoverage,ushort)
end
+ elseif nofcoverage==1 then
+ return { [readushort(f)]=0 }
+ elseif nofcoverage==2 then
+ return { [readushort(f)]=0,[readushort(f)]=1 }
else
+ local coverage={}
for i=0,nofcoverage-1 do
coverage[readushort(f)]=i
end
+ return coverage
end
elseif coverageformat==2 then
local nofranges=readushort(f)
+ local coverage={}
local n=simple and 1 or 0
for i=1,nofranges do
local firstindex=readushort(f)
@@ -16436,10 +16470,11 @@ local function readcoverage(f,offset,simple)
end
end
end
+ return coverage
else
report("unknown coverage format %a ",coverageformat)
+ return {}
end
- return coverage
end
local function readclassdef(f,offset,preset)
setposition(f,offset)
@@ -16645,23 +16680,15 @@ local function readfirst(f,offset)
end
return { readushort(f) }
end
-local function readarray(f,offset,first)
+function readarray(f,offset)
if offset then
setposition(f,offset)
end
local n=readushort(f)
- if first then
- local t={ first }
- for i=2,n do
- t[i]=readushort(f)
- end
- return t,n
+ if n==1 then
+ return { readushort(f) },1
elseif n>0 then
- local t={}
- for i=1,n do
- t[i]=readushort(f)
- end
- return t,n
+ return readcardinaltable(f,n,ushort),n
end
end
local function readcoveragearray(f,offset,t,simple)
@@ -17014,10 +17041,7 @@ function gsubhandlers.single(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofg
elseif subtype==2 then
local coverage=readushort(f)
local nofreplacements=readushort(f)
- local replacements={}
- for i=1,nofreplacements do
- replacements[i]=readushort(f)
- end
+ local replacements=readcardinaltable(f,nofreplacements,ushort)
local coverage=readcoverage(f,tableoffset+coverage)
for index,newindex in next,coverage do
newindex=newindex+1
@@ -17042,18 +17066,10 @@ local function sethandler(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyp
if subtype==1 then
local coverage=readushort(f)
local nofsequence=readushort(f)
- local sequences={}
- for i=1,nofsequence do
- sequences[i]=readushort(f)
- end
+ local sequences=readcardinaltable(f,nofsequence,ushort)
for i=1,nofsequence do
setposition(f,tableoffset+sequences[i])
- local n=readushort(f)
- local s={}
- for i=1,n do
- s[i]=readushort(f)
- end
- sequences[i]=s
+ sequences[i]=readcardinaltable(f,readushort(f),ushort)
end
local coverage=readcoverage(f,tableoffset+coverage)
for index,newindex in next,coverage do
@@ -17085,19 +17101,20 @@ function gsubhandlers.ligature(f,fontdata,lookupid,lookupoffset,offset,glyphs,no
if subtype==1 then
local coverage=readushort(f)
local nofsets=readushort(f)
- local ligatures={}
- for i=1,nofsets do
- ligatures[i]=readushort(f)
- end
+ local ligatures=readcardinaltable(f,nofsets,ushort)
for i=1,nofsets do
local offset=lookupoffset+offset+ligatures[i]
setposition(f,offset)
local n=readushort(f)
- local l={}
- for i=1,n do
- l[i]=offset+readushort(f)
+ if n==1 then
+ ligatures[i]={ offset+readushort(f) }
+ else
+ local l={}
+ for i=1,n do
+ l[i]=offset+readushort(f)
+ end
+ ligatures[i]=l
end
- ligatures[i]=l
end
local coverage=readcoverage(f,tableoffset+coverage)
for index,newindex in next,coverage do
@@ -17674,10 +17691,10 @@ do
local parameters=readushort(f)
local noflookups=readushort(f)
if noflookups>0 then
- local lookups={}
+ local lookups=readcardinaltable(f,noflookups,ushort)
feature.lookups=lookups
for j=1,noflookups do
- lookups[j]=readushort(f)+1
+ lookups[j]=lookups[j]+1
end
end
if parameters>0 then
@@ -17692,11 +17709,8 @@ do
end
local function readlookups(f,lookupoffset,lookuptypes,featurehash,featureorder)
setposition(f,lookupoffset)
- local lookups={}
local noflookups=readushort(f)
- for i=1,noflookups do
- lookups[i]=readushort(f)
- end
+ local lookups=readcardinaltable(f,noflookups,ushort)
for lookupid=1,noflookups do
local offset=lookups[lookupid]
setposition(f,lookupoffset+offset)
@@ -17989,11 +18003,12 @@ do
record.condition=nil
record.matchtype="always"
else
- setposition(f,variationsoffset+offset)
+ local offset=variationsoffset+offset
+ setposition(f,offset)
local nofconditions=readushort(f)
local conditions={}
for i=1,nofconditions do
- conditions[i]=variationsoffset+offset+readulong(f)
+ conditions[i]=offset+readulong(f)
end
record.conditions=conditions
record.matchtype="condition"
@@ -18035,10 +18050,7 @@ do
setposition(f,tableoffset)
local parameters=readulong(f)
local noflookups=readushort(f)
- local lookups={}
- for i=1,noflookups do
- lookups[i]=readushort(f)
- end
+ local lookups=readcardinaltable(f,noflookups,ushort)
record.substitutions=lookups
end
end
@@ -18242,10 +18254,7 @@ function readers.gdef(f,fontdata,specification)
local format=readushort(f)
if format==1 then
local nofsets=readushort(f)
- local sets={}
- for i=1,nofsets do
- sets[i]=readulong(f)
- end
+ local sets=readcardinal(f,nofsets,ulong)
for i=1,nofsets do
local offset=sets[i]
if offset~=0 then
@@ -18467,14 +18476,8 @@ local function readmathvariants(f,fontdata,offset)
local hcoverage=readushort(f)
local vnofglyphs=readushort(f)
local hnofglyphs=readushort(f)
- local vconstruction={}
- local hconstruction={}
- for i=1,vnofglyphs do
- vconstruction[i]=readushort(f)
- end
- for i=1,hnofglyphs do
- hconstruction[i]=readushort(f)
- end
+ local vconstruction=readcardinaltable(f,vnofglyphs,ushort)
+ local hconstruction=readcardinaltable(f,hnofglyphs,ushort)
fontdata.mathconstants.MinConnectorOverlap=minoverlap
local function get(offset,coverage,nofglyphs,construction,kvariants,kparts,kitalic)
if coverage~=0 and nofglyphs>0 then
@@ -18625,10 +18628,7 @@ function readers.cpal(f,fontdata,specification)
local nofcolorrecords=readushort(f)
local firstcoloroffset=readulong(f)
local colorrecords={}
- local palettes={}
- for i=1,nofpalettes do
- palettes[i]=readushort(f)
- end
+ local palettes=readcardinaltable(f,nofpalettes,ushort)
if version==1 then
local palettettypesoffset=readulong(f)
local palettelabelsoffset=readulong(f)