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/scite-context-data-context.properties2
-rw-r--r--context/data/textadept/context/data/scite-context-data-context.lua2
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin894346 -> 858509 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin894021 -> 858798 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin902663 -> 865142 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin892066 -> 857162 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin897138 -> 862550 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-cs.pdfbin326120 -> 348757 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-de.pdfbin425031 -> 432742 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-en.pdfbin323747 -> 345900 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-fr.pdfbin325425 -> 349000 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-it.pdfbin325289 -> 347424 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-nl.pdfbin324391 -> 346492 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-ro.pdfbin535043 -> 510258 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin889419 -> 851956 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin890551 -> 856114 bytes
-rw-r--r--scripts/context/lua/mtx-context.lua6
-rw-r--r--scripts/context/lua/mtx-convert.lua2
-rw-r--r--scripts/context/lua/mtx-watch.lua4
-rw-r--r--scripts/context/lua/mtxrun.lua12
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua12
-rw-r--r--scripts/context/stubs/unix/mtxrun12
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua12
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/anch-pgr.mkiv6
-rw-r--r--tex/context/base/mkiv/attr-ini.mkiv11
-rw-r--r--tex/context/base/mkiv/back-ini.lua2
-rw-r--r--tex/context/base/mkiv/back-lpd.lua4
-rw-r--r--tex/context/base/mkiv/back-out.lua58
-rw-r--r--tex/context/base/mkiv/back-pdf.mkiv179
-rw-r--r--tex/context/base/mkiv/back-pdp.lua2
-rw-r--r--tex/context/base/mkiv/buff-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/cldf-bas.lua32
-rw-r--r--tex/context/base/mkiv/colo-ini.mkiv22
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/driv-ini.mkiv10
-rw-r--r--tex/context/base/mkiv/driv-shp.lua77
-rw-r--r--tex/context/base/mkiv/font-ctx.lua133
-rw-r--r--tex/context/base/mkiv/font-dsp.lua19
-rw-r--r--tex/context/base/mkiv/font-fea.mkvi25
-rw-r--r--tex/context/base/mkiv/font-ini.mkvi10
-rw-r--r--tex/context/base/mkiv/font-otr.lua2
-rw-r--r--tex/context/base/mkiv/font-ots.lua31
-rw-r--r--tex/context/base/mkiv/font-tfm.lua463
-rw-r--r--tex/context/base/mkiv/grph-chk.lua35
-rw-r--r--tex/context/base/mkiv/lang-lab.mkiv2
-rw-r--r--tex/context/base/mkiv/lpdf-emb.lua13
-rw-r--r--tex/context/base/mkiv/lpdf-img.lua8
-rw-r--r--tex/context/base/mkiv/lpdf-nod.lua2
-rw-r--r--tex/context/base/mkiv/luat-bwc.lua44
-rw-r--r--tex/context/base/mkiv/luat-cnf.lua4
-rw-r--r--tex/context/base/mkiv/luat-cod.lua12
-rw-r--r--tex/context/base/mkiv/luat-ini.lua2
-rw-r--r--tex/context/base/mkiv/luat-lib.mkiv2
-rw-r--r--tex/context/base/mkiv/luat-run.lua54
-rw-r--r--tex/context/base/mkiv/math-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/mult-low.lua2
-rw-r--r--tex/context/base/mkiv/node-fnt.lua11
-rw-r--r--tex/context/base/mkiv/node-ini.lua2
-rw-r--r--tex/context/base/mkiv/node-nut.lua32
-rw-r--r--tex/context/base/mkiv/node-par.lua2
-rw-r--r--tex/context/base/mkiv/node-res.lua21
-rw-r--r--tex/context/base/mkiv/node-rul.lua8
-rw-r--r--tex/context/base/mkiv/node-syn.lua5
-rw-r--r--tex/context/base/mkiv/pack-rul.mkiv4
-rw-r--r--tex/context/base/mkiv/page-imp.mkiv2
-rw-r--r--tex/context/base/mkiv/page-inj.mkvi2
-rw-r--r--tex/context/base/mkiv/page-lay.mkiv2
-rw-r--r--tex/context/base/mkiv/page-run.lua35
-rw-r--r--tex/context/base/mkiv/page-run.mkiv6
-rw-r--r--tex/context/base/mkiv/page-txt.mkvi10
-rw-r--r--tex/context/base/mkiv/scrp-ini.lua5
-rw-r--r--tex/context/base/mkiv/spac-hor.mkiv8
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26085 -> 26605 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin224613 -> 268743 bytes
-rw-r--r--tex/context/base/mkiv/strc-pag.lua13
-rw-r--r--tex/context/base/mkiv/syst-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/tabl-tbl.mkiv8
-rw-r--r--tex/context/base/mkiv/toks-ini.lua88
-rw-r--r--tex/context/base/mkiv/trac-ctx.lua14
-rw-r--r--tex/context/base/mkiv/trac-tex.mkiv4
-rw-r--r--tex/context/base/mkiv/typo-drp.lua3
-rw-r--r--tex/context/base/mkiv/typo-drp.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-fln.lua9
-rw-r--r--tex/context/base/mkiv/typo-fln.mkiv2
-rw-r--r--tex/context/base/mkiv/typo-inj.mkiv4
-rw-r--r--tex/context/base/mkiv/typo-krn.lua9
-rw-r--r--tex/context/base/mkiv/util-lua.lua4
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin902663 -> 865142 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin24423 -> 61161 bytes
-rw-r--r--tex/generic/context/luatex/luatex-basics-nod.lua3
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua364
-rw-r--r--tex/generic/context/luatex/luatex-fonts-tfm.lua654
-rw-r--r--tex/generic/context/luatex/luatex-fonts.lua2
97 files changed, 1551 insertions, 1133 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 afb6565eb..43b517d38 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", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextkind", "contextlmtxmode", "contextmark", "mksuffix", "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", "leftparentasciicode", "rightparentasciicode", "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", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "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", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "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", "firstinset", "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", "doifelseassignmentcs", "doifassignmentelsecs", "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", "onlynonbreakablespace", "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", "onlypdfobjectcompression", "nopdfobjectcompression", "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", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "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", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "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", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "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", "firstinset", "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", "doifelseassignmentcs", "doifassignmentelsecs", "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", "onlynonbreakablespace", "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", "onlypdfobjectcompression", "nopdfobjectcompression", "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", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs" },
} \ 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 c70aadab2..b5a57ced6 100644
--- a/context/data/scite/context/scite-context-data-context.properties
+++ b/context/data/scite/context/scite-context-data-context.properties
@@ -237,5 +237,5 @@ break nobreak allowbreak goodbreak nospace \
nospacing dospacing naturalhbox naturalvbox naturalvtop \
naturalhpack naturalvpack naturaltpack reversehbox reversevbox \
reversevtop reversehpack reversevpack reversetpack frule \
-compoundhyphenpenalty start stop
+compoundhyphenpenalty start stop unsupportedcs
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 afb6565eb..43b517d38 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", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextkind", "contextlmtxmode", "contextmark", "mksuffix", "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", "leftparentasciicode", "rightparentasciicode", "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", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "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", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "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", "firstinset", "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", "doifelseassignmentcs", "doifassignmentelsecs", "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", "onlynonbreakablespace", "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", "onlypdfobjectcompression", "nopdfobjectcompression", "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", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "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", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "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", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "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", "firstinset", "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", "doifelseassignmentcs", "doifassignmentelsecs", "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", "onlynonbreakablespace", "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", "onlypdfobjectcompression", "nopdfobjectcompression", "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", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs" },
} \ No newline at end of file
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index 906899401..c41cb49ef 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 b18b06d95..d44254e68 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 1c790c10b..4b47392f8 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 2ab138572..251a62e8f 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 fbe3ba085..fa1068b95 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 d5e0f679f..224eda405 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 8e717a7cb..e6b32a837 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 7a04a2da9..2381c3fc8 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 4ebd7bbef..392d5cc7c 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 edcf7ac25..f4d44dc8e 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 8ec8f8474..03b2eb89e 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 f3fc39f34..a09dc6902 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 71317e34a..bab841262 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 6adfd643d..8074e904d 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/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 4466992fd..17867234d 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -876,11 +876,9 @@ function scripts.context.run(ctxdata,filename)
--
report("run %s: %s",currentrun,command)
print("") -- cleaner, else continuation on same line
--- local returncode, errorstring = os.spawn(command)
local returncode = os.execute(command)
-- todo: remake format when no proper format is found
if not returncode then
--- report("fatal error: no return code, message: %s",errorstring or "?")
report("fatal error: no return code")
if resultname then
result_save_error(oldbase,newbase)
@@ -929,7 +927,7 @@ function scripts.context.run(ctxdata,filename)
local command = luatex_command(l_flags,c_flags,mainfile,a_engine)
--
report("arrange run: %s",command)
- local returncode, errorstring = os.spawn(command)
+ local returncode, errorstring = os.execute(command)
if not returncode then
report("fatal error: no return code, message: %s",errorstring or "?")
os.exit(1)
@@ -1052,7 +1050,7 @@ function scripts.context.pipe() -- still used?
report("entering scrollmode using '%s' with optionfile, end job with \\end",filename)
end
local command = luatex_command(l_flags,c_flags,filename)
- os.spawn(command)
+ os.execute(command)
if getargument("purge") then
scripts.context.purge_job(filename)
elseif getargument("purgeall") then
diff --git a/scripts/context/lua/mtx-convert.lua b/scripts/context/lua/mtx-convert.lua
index b3e20ea87..61ce15040 100644
--- a/scripts/context/lua/mtx-convert.lua
+++ b/scripts/context/lua/mtx-convert.lua
@@ -90,7 +90,7 @@ function converters.convertgraphic(kind,oldname,newname)
local command = converters[kind](oldname,tmpname)
report("command: %s",command)
io.flush()
- os.spawn(command)
+ os.execute(command)
os.remove(newname)
os.rename(tmpname,newname)
if lfs.attributes(newname,"size") == 0 then
diff --git a/scripts/context/lua/mtx-watch.lua b/scripts/context/lua/mtx-watch.lua
index 8629058e5..7815dafdd 100644
--- a/scripts/context/lua/mtx-watch.lua
+++ b/scripts/context/lua/mtx-watch.lua
@@ -208,11 +208,11 @@ report("checking file %s/%s: %s",dirname,basename,ok and "okay" or "skipped")
local oldpath = lfs.currentdir()
lfs.chdir(newpath)
scripts.watch.save_exa_modes(joblog,ctmname)
- if pipe then result = os.resultof(command) else result = os.spawn(command) end
+ if pipe then result = os.resultof(command) else result = os.execute(command) end
lfs.chdir(oldpath)
else
scripts.watch.save_exa_modes(joblog,ctmname)
- if pipe then result = os.resultof(command) else result = os.spawn(command) end
+ if pipe then result = os.resultof(command) else result = os.execute(command) end
end
report("return value: %s", result)
done = true
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index a79ffc029..a5f15a5f9 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -14040,7 +14040,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-lua"] = package.loaded["util-lua"] or true
--- original size: 6664, stripped down to: 4589
+-- original size: 6778, stripped down to: 4699
if not modules then modules={} end modules ['util-lua']={
version=1.001,
@@ -14067,9 +14067,9 @@ local strippedchunks={}
luautilities.strippedchunks=strippedchunks
luautilities.suffixes={
tma="tma",
- tmc=jit and "tmb" or "tmc",
+ tmc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tmd") or (jit and "tmb") or "tmc",
lua="lua",
- luc=jit and "lub" or "luc",
+ luc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "lud") or (jit and "lub") or "luc",
lui="lui",
luv="luv",
luj="luj",
@@ -25615,8 +25615,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1020503
--- stripped bytes : 404014
+-- original bytes : 1020617
+-- stripped bytes : 404018
-- end library merge
@@ -26163,7 +26163,7 @@ function runners.execute_program(fullname)
report()
report()
io.flush()
- local code = os.exec(command) -- (fullname,unpack(after)) does not work / maybe spawn
+ local code = os.execute(command) -- (fullname,unpack(after)) does not work / maybe spawn
return code == 0
end
end
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index a79ffc029..a5f15a5f9 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -14040,7 +14040,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-lua"] = package.loaded["util-lua"] or true
--- original size: 6664, stripped down to: 4589
+-- original size: 6778, stripped down to: 4699
if not modules then modules={} end modules ['util-lua']={
version=1.001,
@@ -14067,9 +14067,9 @@ local strippedchunks={}
luautilities.strippedchunks=strippedchunks
luautilities.suffixes={
tma="tma",
- tmc=jit and "tmb" or "tmc",
+ tmc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tmd") or (jit and "tmb") or "tmc",
lua="lua",
- luc=jit and "lub" or "luc",
+ luc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "lud") or (jit and "lub") or "luc",
lui="lui",
luv="luv",
luj="luj",
@@ -25615,8 +25615,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1020503
--- stripped bytes : 404014
+-- original bytes : 1020617
+-- stripped bytes : 404018
-- end library merge
@@ -26163,7 +26163,7 @@ function runners.execute_program(fullname)
report()
report()
io.flush()
- local code = os.exec(command) -- (fullname,unpack(after)) does not work / maybe spawn
+ local code = os.execute(command) -- (fullname,unpack(after)) does not work / maybe spawn
return code == 0
end
end
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index a79ffc029..a5f15a5f9 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -14040,7 +14040,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-lua"] = package.loaded["util-lua"] or true
--- original size: 6664, stripped down to: 4589
+-- original size: 6778, stripped down to: 4699
if not modules then modules={} end modules ['util-lua']={
version=1.001,
@@ -14067,9 +14067,9 @@ local strippedchunks={}
luautilities.strippedchunks=strippedchunks
luautilities.suffixes={
tma="tma",
- tmc=jit and "tmb" or "tmc",
+ tmc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tmd") or (jit and "tmb") or "tmc",
lua="lua",
- luc=jit and "lub" or "luc",
+ luc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "lud") or (jit and "lub") or "luc",
lui="lui",
luv="luv",
luj="luj",
@@ -25615,8 +25615,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1020503
--- stripped bytes : 404014
+-- original bytes : 1020617
+-- stripped bytes : 404018
-- end library merge
@@ -26163,7 +26163,7 @@ function runners.execute_program(fullname)
report()
report()
io.flush()
- local code = os.exec(command) -- (fullname,unpack(after)) does not work / maybe spawn
+ local code = os.execute(command) -- (fullname,unpack(after)) does not work / maybe spawn
return code == 0
end
end
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index a79ffc029..a5f15a5f9 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -14040,7 +14040,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["util-lua"] = package.loaded["util-lua"] or true
--- original size: 6664, stripped down to: 4589
+-- original size: 6778, stripped down to: 4699
if not modules then modules={} end modules ['util-lua']={
version=1.001,
@@ -14067,9 +14067,9 @@ local strippedchunks={}
luautilities.strippedchunks=strippedchunks
luautilities.suffixes={
tma="tma",
- tmc=jit and "tmb" or "tmc",
+ tmc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tmd") or (jit and "tmb") or "tmc",
lua="lua",
- luc=jit and "lub" or "luc",
+ luc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "lud") or (jit and "lub") or "luc",
lui="lui",
luv="luv",
luj="luj",
@@ -25615,8 +25615,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1020503
--- stripped bytes : 404014
+-- original bytes : 1020617
+-- stripped bytes : 404018
-- end library merge
@@ -26163,7 +26163,7 @@ function runners.execute_program(fullname)
report()
report()
io.flush()
- local code = os.exec(command) -- (fullname,unpack(after)) does not work / maybe spawn
+ local code = os.execute(command) -- (fullname,unpack(after)) does not work / maybe spawn
return code == 0
end
end
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 0dda26e80..02708252c 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{2019.04.04 13:31}
+\newcontextversion{2019.04.12 17:43}
%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 91d282601..a5c5b8be5 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{2019.04.04 13:31}
+\edef\contextversion{2019.04.12 17:43}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/anch-pgr.mkiv b/tex/context/base/mkiv/anch-pgr.mkiv
index 7fa378cd1..f2195818a 100644
--- a/tex/context/base/mkiv/anch-pgr.mkiv
+++ b/tex/context/base/mkiv/anch-pgr.mkiv
@@ -70,7 +70,7 @@
{\anch_positions_trace_action_yes
\the\everyinsertpositionaction
\the\everypositionaction
- \csname\??positionaction\currentpositionaction\endcsname
+ \begincsname\??positionaction\currentpositionaction\endcsname
\anch_positions_cleanup_action}%
\smashedbox\scratchbox % smashing is really needed else we get problems with too big overlays
\endgroup}
@@ -367,7 +367,7 @@
\obeyMPboxorigin % do we also set the size ? when needed this must be done in mp ... might change
\def\anch_positions_meta_graphic_direct{\anch_positions_meta_graphic_nested{#3}}% takes two extra arguments
\setbox\b_anch_positions_graphic\hbox % \hpack
- {\ignorespaces\csname#1#2\endcsname\removelastspace}%
+ {\ignorespaces\begincsname#1#2\endcsname\removelastspace}%
\smashbox\b_anch_positions_graphic
\box\b_anch_positions_graphic
\endgroup}
@@ -377,7 +377,7 @@
\setupMPvariables[#2][#1,#3]%
\edef\currentmpvariableclass{#2}%
\anch_positions_meta_graphic_prepare
- \csname\??positiongraphic#2\endcsname
+ \begincsname\??positiongraphic#2\endcsname
\endgroup}%
\def\startMPpositionmethod#1#2\stopMPpositionmethod
diff --git a/tex/context/base/mkiv/attr-ini.mkiv b/tex/context/base/mkiv/attr-ini.mkiv
index 3792b1c63..6a1ac86de 100644
--- a/tex/context/base/mkiv/attr-ini.mkiv
+++ b/tex/context/base/mkiv/attr-ini.mkiv
@@ -108,8 +108,13 @@
\let\dompattribute\gobbletwoarguments
-\unexpanded\def\resetglobalattributes{\the\t_attr_list_global\attribute\zerocount\zerocount}
-\unexpanded\def\resetlocalattributes {\the\t_attr_list_local \attribute\zerocount\zerocount}
+\ifcase\contextlmtxmode
+ \unexpanded\def\resetglobalattributes{\attribute\zerocount\zerocount\the\t_attr_list_global\relax}
+ \unexpanded\def\resetlocalattributes {\attribute\zerocount\zerocount\the\t_attr_list_local \relax}
+\else
+ \unexpanded\def\resetglobalattributes{\glyphdatafield \zerocount\the\t_attr_list_global\relax}
+ \unexpanded\def\resetlocalattributes {\glyphdatafield \zerocount\the\t_attr_list_local \relax}
+\fi
\let\resetallattributes\resetlocalattributes
@@ -152,7 +157,7 @@
% for the luatex list:
%
% \attributedef\zeroattribute=0
-% \attributedef\someatriubute=999
+% \attributedef\someattribute=999
%
% \directlua {
% local createtoken = newtoken.create
diff --git a/tex/context/base/mkiv/back-ini.lua b/tex/context/base/mkiv/back-ini.lua
index b7af1529b..b7ecce00b 100644
--- a/tex/context/base/mkiv/back-ini.lua
+++ b/tex/context/base/mkiv/back-ini.lua
@@ -76,7 +76,7 @@ local lmtx_mode = nil
local function lmtxmode()
if lmtx_mode == nil then
- lmtx_mode = ((tonumber(CONTEXTLMTXMODE) or 0) > 0) and drivers and drivers.lmtxversion
+ lmtx_mode = CONTEXTLMTXMODE > 0 and drivers and drivers.lmtxversion
end
return lmtx_mode
end
diff --git a/tex/context/base/mkiv/back-lpd.lua b/tex/context/base/mkiv/back-lpd.lua
index 44ffbc43a..48053e72b 100644
--- a/tex/context/base/mkiv/back-lpd.lua
+++ b/tex/context/base/mkiv/back-lpd.lua
@@ -2346,7 +2346,8 @@ do
local isfile = lfs.isfile
local removefile = os.remove
local renamefile = os.rename
--- local addsuffix = file.addsuffix
+ -- local copyfile = file.copy
+ -- local addsuffix = file.addsuffix
local pdfname = nil
local tmpname = nil
@@ -2408,6 +2409,7 @@ do
end
if isfile(pdfname) then
ok = false
+ file.copy(tmpname,pdfname)
else
renamefile(tmpname,pdfname)
if isfile(tmpname) then
diff --git a/tex/context/base/mkiv/back-out.lua b/tex/context/base/mkiv/back-out.lua
index a0e05afca..86a1669a0 100644
--- a/tex/context/base/mkiv/back-out.lua
+++ b/tex/context/base/mkiv/back-out.lua
@@ -7,35 +7,6 @@ if not modules then modules = { } end modules ['back-out'] = {
}
if CONTEXTLMTXMODE == 0 then
-
- return
-
-elseif CONTEXTLMTXMODE == 1 then
-
- local type = type
- local getdata = nodes.nuts.getdata
- local loadstring = loadstring
-
- function backends.latelua(current,pos_h,pos_v,cur_h,cur_v)
- data = getdata(current)
- local kind = type(data)
- if kind == "function" then
- data()
- elseif kind == "table" then
- data.action(data)
- else
- -- if kind ~= "string" then
- -- data = tokentostring(data)
- -- end
- if #data ~= "" then
- local code = loadstring(data)
- if code then
- code()
- end
- end
- end
- end
-
return
end
@@ -57,6 +28,7 @@ local tokentostring = token.to_string
local logwriter = logs.writer
local openfile = io.open
+local flushio = io.flush
local nuts = nodes.nuts
local tonode = nuts.tonode
@@ -93,15 +65,17 @@ local setmatrixnode = register(newnut(whatsit_code,whatsitcodes.setmatrix)
local tomatrix = drivers.helpers.tomatrix
+local immediately = false -- not watertight
+
local open_command, write_command, close_command
backends = backends or { }
-local function openout(immediate)
+local function openout()
local channel = scaninteger()
scankeyword("=") -- hack
local filename = scanstring()
- if not immediate then
+ if not immediately then
local n = copynode(opennode)
nodeproperties[n] = { channel = channel, filename = filename } -- action = "open"
return context(tonode(n))
@@ -113,6 +87,7 @@ local function openout(immediate)
-- error
end
end
+ immediately = false
end
function backends.openout(n)
@@ -127,9 +102,9 @@ function backends.openout(n)
end
end
-local function write(immediate)
+local function write()
local channel = scaninteger()
- if not immediate then
+ if not immediately then
local t = scantokenlist()
local n = copynode(writenode)
nodeproperties[n] = { channel = channel, data = t } -- action = "write"
@@ -143,6 +118,7 @@ local function write(immediate)
logwriter(content,"\n")
end
end
+ immediately = false
end
function backends.writeout(n)
@@ -158,9 +134,9 @@ function backends.writeout(n)
end
end
-local function closeout(immediate)
+local function closeout()
local channel = scaninteger()
- if not immediate then
+ if not immediately then
local n = copynode(closenode)
nodeproperties[n] = { channel = channel } -- action = "close"
return context(tonode(n))
@@ -169,10 +145,12 @@ local function closeout(immediate)
if handle then
handle:close()
channels[channel] = false
+ flushio()
else
-- error
end
end
+ immediately = false
end
function backends.closeout(n)
@@ -183,6 +161,7 @@ function backends.closeout(n)
if handle then
handle:close()
channels[channel] = false
+ flushio()
else
-- error
end
@@ -190,14 +169,7 @@ function backends.closeout(n)
end
local function immediate()
- local command = scancode()
- if command == write_command then
- write(true)
- elseif command == open_command then
- openout(true)
- elseif command == close_command then
- closeout(true)
- end
+ immediately = true
end
local noflatelua = 0
diff --git a/tex/context/base/mkiv/back-pdf.mkiv b/tex/context/base/mkiv/back-pdf.mkiv
index 9e88ab193..776581413 100644
--- a/tex/context/base/mkiv/back-pdf.mkiv
+++ b/tex/context/base/mkiv/back-pdf.mkiv
@@ -16,7 +16,11 @@
\writestatus{loading}{ConTeXt Backend Macros / PDF}
\registerctxluafile{lpdf-ini}{optimize}
-\registerctxluafile{lpdf-nod}{}
+
+\ifcase\contextlmtxmode\relax
+ \registerctxluafile{lpdf-nod}{}
+\fi
+
\registerctxluafile{lpdf-col}{}
\registerctxluafile{lpdf-xmp}{}
\registerctxluafile{lpdf-ano}{}
@@ -72,9 +76,10 @@
%D \type {\pdfextension} and \type {\pdffeedback} primitives but it will probably
%D have bad side effects.
-%D For the moment we put these here as they are pdf related but they might move to
-%D a better place. We overload the primitives with our own but use a bit of indirection
-%D for the purpose of tracing.
+%D For the moment we put these here as they are pdf related but they might move to a
+%D better place. We overload the primitives with our own but use a bit of
+%D indirection for the purpose of tracing. Some of these are needes for packages like
+%D tikz.
\unexpanded\def\saveboxresource {\clf_saveboxresource}
\unexpanded\def\lastsavedboxresourceindex {\numexpr\clf_lastsavedboxresourceindex\relax}
@@ -85,54 +90,53 @@
\unexpanded\def\lastsavedimageresourcepages{\numexpr\clf_lastsavedimageresourcepages\relax}
\unexpanded\def\useimageresource {\clf_useimageresource}
-\unexpanded\def\savepos {\clf_savepos}
- \def\lastxpos {\clf_lastxpos}
- \def\lastypos {\clf_lastypos}
-
-\unexpanded\def\pdfextension {\clf_pdfextension}
- \def\pdffeedback {\clf_pdffeedback}
-
-%D These are no-ops and don't even intercept what comes next. Maybe some day
-%D I'll write a parser that maps onto \CONTEXT.
-
-\unexpanded\def\unsupportedpdfprimitive#1%
- {\writestatus{fatal error}{the primitive \string#1\space is not supported}%
- \directlua{os.exit()}}
-
-\unexpanded\def\pdfcolorstack {\unsupportedpdfprimitive\pdfcolorstack}
-\unexpanded\def\pdfcolorstackinit{\unsupportedpdfprimitive\pdfcolorstackinit}
-% pdfannot
-\unexpanded\def\pdfstartlink {\unsupportedpdfprimitive\pdfstartlink}
-\unexpanded\def\pdfendlink {\unsupportedpdfprimitive\pdfendlink}
-\unexpanded\def\pdfoutline {\unsupportedpdfprimitive\pdfoutline}
-% pdfdest
-\unexpanded\def\pdfthread {\unsupportedpdfprimitive\pdfthread}
-\unexpanded\def\pdfstartthread {\unsupportedpdfprimitive\pdfstartthread}
-\unexpanded\def\pdfendthread {\unsupportedpdfprimitive\pdfendthread}
-\unexpanded\def\pdffontattr {\unsupportedpdfprimitive\pdffontattr}
-\unexpanded\def\pdfglyphtounicode{\unsupportedpdfprimitive\pdfglyphtounicode}
+%D Maybe these are used:
-\unexpanded\def\pdfannot {\clf_pdfannot}
-\unexpanded\def\pdfdest {\clf_pdfdest}
+\unexpanded\def\savepos {\clf_savepos}
+ \def\lastxpos{\clf_lastxpos}
+ \def\lastypos{\clf_lastypos}
-%D Here we do intercept (silently) what gets passed. One should use the \CONTEXT\
-%D interfaces instead.
+%D We do some interception:
-\let\pdfcatalog \relax \newtoks\pdfcatalog
-\let\pdfinfo \relax \newtoks\pdfinfo
-\let\pdfnames \relax \newtoks\pdfnames
-\let\pdftrailer \relax \newtoks\pdftrailer
-\let\pdfpageresources \relax \newtoks\pdfpageresources
-\let\pdfpageattr \relax \newtoks\pdfpageattr
-\let\pdfpagesattr \relax \newtoks\pdfpagesattr
-\let\pdfxformattr \relax \newtoks\pdfxformattr
-\let\pdfxformresources\relax \newtoks\pdfxformresources
+\unexpanded\def\pdfextension{\clf_pdfextension}
+ \def\pdffeedback {\clf_pdffeedback}
-%D We use the \LUA\ interface (which then permits more control over possible pdf/x
-%D extensions).
+%D These are no-ops and don't even intercept what comes next. We used to use
+%D token registers for some so that they kept working but now we just abort the
+%D run.
-\let\pdfcompresslevel \relax \newcount\pdfcompresslevel
-\let\pdfobjcompresslevel\relax \newcount\pdfobjcompresslevel
+\unexpanded\def\pdfannot {\clf_pdfannot}
+\unexpanded\def\pdfcolorstack {\unsupportedcs\pdfcolorstack}
+\unexpanded\def\pdfcolorstackinit{\unsupportedcs\pdfcolorstackinit}
+\unexpanded\def\pdfdest {\clf_pdfdest}
+\unexpanded\def\pdfendlink {\unsupportedcs\pdfendlink}
+\unexpanded\def\pdfendthread {\unsupportedcs\pdfendthread}
+\unexpanded\def\pdffontattr {\unsupportedcs\pdffontattr}
+\unexpanded\def\pdfglyphtounicode{\unsupportedcs\pdfglyphtounicode}
+\unexpanded\def\pdfoutline {\unsupportedcs\pdfoutline}
+\unexpanded\def\pdfstartlink {\unsupportedcs\pdfstartlink}
+\unexpanded\def\pdfstartthread {\unsupportedcs\pdfstartthread}
+\unexpanded\def\pdfthread {\unsupportedcs\pdfthread}
+
+\unexpanded\def\pdfcatalog {\unsupportedcs\pdfcatalog}
+\unexpanded\def\pdfinfo {\unsupportedcs\pdfinfo}
+\unexpanded\def\pdfnames {\unsupportedcs\pdfnames}
+\unexpanded\def\pdftrailer {\unsupportedcs\pdftrailer}
+\unexpanded\def\pdfpageresources {\unsupportedcs\pdfpageresources}
+\unexpanded\def\pdfpageattr {\unsupportedcs\pdfpageattr}
+\unexpanded\def\pdfpagesattr {\unsupportedcs\pdfpagesattr}
+\unexpanded\def\pdfxformattr {\unsupportedcs\pdfxformattr}
+\unexpanded\def\pdfxformresources{\unsupportedcs\pdfxformresources}
+
+%D There is no need for these:
+
+\unexpanded\def\pdfmapfile {\unsupportedcs\pdfmapfile}
+\unexpanded\def\pdfmapline {\unsupportedcs\pdfmapline}
+
+%D These have been no-ops for a long time so now we just abort on their usage.
+
+\unexpanded\def\pdfcompresslevel {\unsupportedcs\pdfcompresslevel}
+\unexpanded\def\pdfobjcompresslevel{\unsupportedcs\pdfobjcompresslevel}
%D But we still provide:
@@ -141,53 +145,48 @@
\unexpanded\def\maximumpdfcompression {\clf_setpdfcompression\plusnine \plusnine }
\unexpanded\def\normalpdfcompression {\clf_setpdfcompression\plusthree\plusthree}
-%D These might even become no-ops as we don't need them in \CONTEXT:
-
-\unexpanded\def\pdfmapfile#1{} % obsolete
-\unexpanded\def\pdfmapline#1{} % obsolete
-
%D We don't support these directives, at least not this way. If they are needed
%D by third party modules we can provide some interface.
-%pdfcreationdate
-\let\pdfdecimaldigits \relax \newcount\pdfdecimaldigits
-\let\pdfdestmargin \relax \newdimen\pdfdestmargin
+% pdfcreationdate
+\def\pdfdecimaldigits {\unsupportedcs\pdfdecimaldigits}
+\def\pdfdestmargin {\unsupportedcs\pdfdestmargin}
% pdffontname
% pdffontobjnum
-\let\pdffontsize \relax \newcount\pdffontsize
-\let\pdfgamma \relax \newcount\pdfgamma
-\let\pdfgentounicode \relax \newcount\pdfgentounicode
-\let\pdfhorigin \relax \newcount\pdfhorigin
-\let\pdfignoreunknownimages \relax \newcount\pdfignoreunknownimages
-\let\pdfimageaddfilename \relax \newcount\pdfimageaddfilename
-\let\pdfimageapplygamma \relax \newcount\pdfimageapplygamma
-\let\pdfimagegamma \relax \newcount\pdfimagegamma
-\let\pdfimagehicolor \relax \newcount\pdfimagehicolor
-\let\pdfimageresolution \relax \newcount\pdfimageresolution
-\let\pdfincludechars \relax \newtoks \pdfincludechars
-\let\pdfinclusioncopyfonts \relax \newcount\pdfinclusioncopyfonts
-\let\pdfinclusionerrorlevel \relax \newcount\pdfinclusionerrorlevel
-\let\pdfinfoomitdate \relax \newcount\pdfinfoomitdate
+\def\pdffontsize {\unsupportedcs\pdffontsize}
+\def\pdfgamma {\unsupportedcs\pdfgamma}
+\def\pdfgentounicode {\unsupportedcs\pdfgentounicode}
+\def\pdfhorigin {\unsupportedcs\pdfhorigin}
+\def\pdfignoreunknownimages {\unsupportedcs\pdfignoreunknownimages}
+\def\pdfimageaddfilename {\unsupportedcs\pdfimageaddfilename}
+\def\pdfimageapplygamma {\unsupportedcs\pdfimageapplygamma}
+\def\pdfimagegamma {\unsupportedcs\pdfimagegamma}
+\def\pdfimagehicolor {\unsupportedcs\pdfimagehicolor}
+\def\pdfimageresolution {\unsupportedcs\pdfimageresolution}
+\def\pdfincludechars {\unsupportedcs\pdfincludechars}
+\def\pdfinclusioncopyfonts {\unsupportedcs\pdfinclusioncopyfonts}
+\def\pdfinclusionerrorlevel {\unsupportedcs\pdfinclusionerrorlevel}
+\def\pdfinfoomitdate {\unsupportedcs\pdfinfoomitdate}
% pdflastannot
% pdflastlink
-\let\pdflinkmargin \relax \newdimen\pdflinkmargin
-\let\pdfmajorversion \relax \newcount\pdfmajorversion
-\let\pdfminorversion \relax \newcount\pdfminorversion
-\let\pdfpagebox \relax \newcount\pdfpagebox
+\def\pdflinkmargin {\unsupportedcs\pdflinkmargin}
+\def\pdfmajorversion {\unsupportedcs\pdfmajorversion}
+\def\pdfminorversion {\unsupportedcs\pdfminorversion}
+\def\pdfpagebox {\unsupportedcs\pdfpagebox}
% pdfpageref
-\let\pdfpkfixeddpi \relax \newcount\pdfpkfixeddpi
-\let\pdfpkmode \relax \newtoks \pdfpkmode
-\let\pdfpkresolution \relax \newcount\pdfpkresolution
+\def\pdfpkfixeddpi {\unsupportedcs\pdfpkfixeddpi}
+\def\pdfpkmode {\unsupportedcs\pdfpkmode}
+\def\pdfpkresolution {\unsupportedcs\pdfpkresolution}
% pdfretval
-\let\pdfsuppressoptionalinfo \relax \newcount\pdfsuppressoptionalinfo
-\let\pdfsuppressptexinfo \relax \newcount\pdfsuppressptexinfo
+\def\pdfsuppressoptionalinfo {\unsupportedcs\pdfsuppressoptionalinfo}
+\def\pdfsuppressptexinfo {\unsupportedcs\pdfsuppressptexinfo}
% pdftexrevision
% pdftexversion
-\let\pdfthreadmargin \relax \newdimen\pdfthreadmargin
-\let\pdftrailerid \relax \newtoks \pdftrailerid
-\let\pdfuniqueresname \relax \newcount\pdfuniqueresname
-\let\pdfvorigin \relax \newcount\pdfvorigin
-\let\pdfxformmargin \relax \newdimen\pdfxformmargin
+\def\pdfthreadmargin {\unsupportedcs\pdfthreadmargin}
+\def\pdftrailerid {\unsupportedcs\pdftrailerid}
+\def\pdfuniqueresname {\unsupportedcs\pdfuniqueresname}
+\def\pdfvorigin {\unsupportedcs\pdfvorigin}
+\def\pdfxformmargin {\unsupportedcs\pdfxformmargin}
% \pdfxformname
%D These are still accepted but are normally not needed.
@@ -210,15 +209,15 @@
%D For the moment we keep these as they are but they will become \LUA\ calls
%D eventually, after which we will nil the three \type {\pdf} interface primitives.
-\normalprotected\def\pdfliteral {\clf_pdfliteral}%
+\unexpanded\def\pdfliteral {\clf_pdfliteral}%
-\normalprotected\def\pdfobj {\clf_pdfobj}%
-\normalprotected\def\pdflastobj {\numexpr\clf_pdflastobj\relax}%
+\unexpanded\def\pdfobj {\clf_pdfobj}%
+\unexpanded\def\pdflastobj {\numexpr\clf_pdflastobj\relax}%
-\normalprotected\def\pdfrefobj {\pdfextension refobj }
-\normalprotected\def\pdfrestore {\clf_restore}
-\normalprotected\def\pdfsave {\clf_save}
-\normalprotected\def\pdfsetmatrix{\clf_setmatrix}
+\unexpanded\def\pdfrefobj {\pdfextension refobj }
+\unexpanded\def\pdfrestore {\clf_restore}
+\unexpanded\def\pdfsave {\clf_save}
+\unexpanded\def\pdfsetmatrix{\clf_setmatrix}
%D This one can be consulted by users although the suffix is also a system mode.
diff --git a/tex/context/base/mkiv/back-pdp.lua b/tex/context/base/mkiv/back-pdp.lua
index 7363cfcae..d7033608c 100644
--- a/tex/context/base/mkiv/back-pdp.lua
+++ b/tex/context/base/mkiv/back-pdp.lua
@@ -349,7 +349,6 @@ implement { name = "pdfdest", actions = pdfdest }
-- management
-
local function pdfsave()
context(newsave())
end
@@ -362,7 +361,6 @@ local function pdfsetmatrix()
context(newsetmatrix(scanstring()))
end
-
-- extras
local function pdfpageref()
diff --git a/tex/context/base/mkiv/buff-ini.mkiv b/tex/context/base/mkiv/buff-ini.mkiv
index 145f0f392..4e12271dd 100644
--- a/tex/context/base/mkiv/buff-ini.mkiv
+++ b/tex/context/base/mkiv/buff-ini.mkiv
@@ -132,7 +132,7 @@
\unexpanded\def\buff_stop#1%
{\endgroup % (3 & 4 & 5 & 6)
- \csname#1\endcsname}
+ \begincsname#1\endcsname}
% \installctxfunction\dopickupbuffer{commands.dopickupbuffer}
diff --git a/tex/context/base/mkiv/cldf-bas.lua b/tex/context/base/mkiv/cldf-bas.lua
index f55132a06..9e789a72f 100644
--- a/tex/context/base/mkiv/cldf-bas.lua
+++ b/tex/context/base/mkiv/cldf-bas.lua
@@ -193,34 +193,12 @@ context.registers = {
newchar = function(name,u) context([[\chardef\%s=%s\relax]],name,u) end,
}
-do
-
- if CONTEXTLMTXMODE > 1 then
-
- function context.latelua(f)
- -- table check moved elsewhere
- local latelua = new_latelua(f)
- setattrlist(latelua,true) -- will become an option
- ctx_flushnode(latelua,true)
- end
-
- else
-
- function context.latelua(f)
- if type(f) == "table" then
- local action = f.action
- local specification = f.specification or f
- f = function() action(specification) end
- end
- local latelua = new_latelua(f)
- setattrlist(latelua,true) -- will become an option
- ctx_flushnode(latelua,true)
- end
-
- end
-
+function context.latelua(f)
+ -- table check moved elsewhere
+ local latelua = new_latelua(f)
+ setattrlist(latelua,true) -- will become an option
+ ctx_flushnode(latelua,true)
end
--- yes or no
do
diff --git a/tex/context/base/mkiv/colo-ini.mkiv b/tex/context/base/mkiv/colo-ini.mkiv
index 7079322f7..8c2c0e792 100644
--- a/tex/context/base/mkiv/colo-ini.mkiv
+++ b/tex/context/base/mkiv/colo-ini.mkiv
@@ -485,7 +485,7 @@
\def\colo_palet_prepare#1%
{\edef\colo_palet_name{#1}%
\ifcsname\??paletlist\colo_palet_name\endcsname
- \csname\??paletsize#1\endcsname\zerocount
+ \csname\??paletsize\colo_palet_name\endcsname\zerocount
\else
\colo_palet_allocate\colo_palet_name
\fi
@@ -804,21 +804,21 @@
\def\colo_helpers_fast_activate_yes#1%
{\ifcsname\??colorsetter\currentcolorprefix#1\endcsname
\lastnamedcs
- \csname\??transparencysetter\currentcolorprefix#1\endcsname
+ \begincsname\??transparencysetter\currentcolorprefix#1\endcsname
\else\ifcsname\??colorsetter#1\endcsname
\lastnamedcs
- \csname\??transparencysetter#1\endcsname
+ \begincsname\??transparencysetter#1\endcsname
\fi\fi}
\def\colo_helpers_fast_activate_nop#1%
{\ifcsname\??colorsetter#1\endcsname
\lastnamedcs
- \csname\??transparencysetter#1\endcsname
+ \begincsname\??transparencysetter#1\endcsname
\fi}
\def\colo_helpers_activate_dummy
- {\csname\??colorsetter \v_colo_dummy_name\endcsname
- \csname\??transparencysetter\v_colo_dummy_name\endcsname}
+ {\begincsname\??colorsetter \v_colo_dummy_name\endcsname
+ \begincsname\??transparencysetter\v_colo_dummy_name\endcsname}
\let\dofastcoloractivation\colo_helpers_fast_activate
@@ -835,16 +835,16 @@
\def\colo_helpers_activate_yes
{\ifcsname\??colorsetter\currentcolorprefix\currentcolorname\endcsname
\lastnamedcs
- \csname\??transparencysetter\currentcolorprefix\currentcolorname\endcsname
+ \begincsname\??transparencysetter\currentcolorprefix\currentcolorname\endcsname
\else\ifcsname\??colorsetter\currentcolorname\endcsname
\lastnamedcs
- \csname\??transparencysetter\currentcolorname\endcsname
+ \begincsname\??transparencysetter\currentcolorname\endcsname
\fi\fi}
\def\colo_helpers_activate_nop
{\ifcsname\??colorsetter\currentcolorname\endcsname
\lastnamedcs
- \csname\??transparencysetter\currentcolorname\endcsname
+ \begincsname\??transparencysetter\currentcolorname\endcsname
\fi}
\def\colo_helpers_activate_yes_only
@@ -870,10 +870,10 @@
{\let\currentcolorname\currentcolorparameter % maybe only when success
\ifcsname\??colorsetter\currentcolorprefix\currentcolorparameter\endcsname
\lastnamedcs
- \csname\??transparencysetter\currentcolorprefix\currentcolorparameter\endcsname
+ \begincsname\??transparencysetter\currentcolorprefix\currentcolorparameter\endcsname
\else\ifcsname\??colorsetter\currentcolorparameter\endcsname
\lastnamedcs
- \csname\??transparencysetter\currentcolorparameter\endcsname
+ \begincsname\??transparencysetter\currentcolorparameter\endcsname
\fi\fi}
\let\dosetcolorattribute\dousecolorhashparameter % for a while
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index a94cb5d08..5565f1eaf 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{2019.04.04 13:31}
+\newcontextversion{2019.04.12 17:43}
%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 98d964b24..a3e237f20 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{2019.04.04 13:31}
+\edef\contextversion{2019.04.12 17:43}
\edef\contextkind {beta}
%D Kind of special:
diff --git a/tex/context/base/mkiv/driv-ini.mkiv b/tex/context/base/mkiv/driv-ini.mkiv
index 95b6c88a7..958afb6a9 100644
--- a/tex/context/base/mkiv/driv-ini.mkiv
+++ b/tex/context/base/mkiv/driv-ini.mkiv
@@ -17,9 +17,15 @@
\unprotect
-\def\page_shipout_box#1%
+\unexpanded\def\page_shipout_box#1%
{\clf_shipoutpage#1\relax
- \setbox#1\emptybox
+ \global\setbox#1\emptybox
\global\deadcycles\zerocount}
+\ifdefined\page_otr_shipout_yes \else
+
+ \let\page_otr_shipout_yes\page_shipout_box
+
+\fi
+
\protect \endinput
diff --git a/tex/context/base/mkiv/driv-shp.lua b/tex/context/base/mkiv/driv-shp.lua
index 7938e3e5c..5fcfc7955 100644
--- a/tex/context/base/mkiv/driv-shp.lua
+++ b/tex/context/base/mkiv/driv-shp.lua
@@ -115,8 +115,6 @@ local instances = drivers.instances
---------------------------------------------------------------------------------------
-local synctex = false
-
local lastfont = nil
local fontcharacters = nil
@@ -330,11 +328,10 @@ flush_character = function(current,font,char,factor,vfcommands,pos_h,pos_v,pos_r
return 0, 0, 0
end
- local width, height, depth
+ local width, height, depth, naturalwidth
if current then
--- width, height, depth = getwhd(current)
--- factor = getexpansion(current)
width, height, depth, factor = getwhd(current,true)
+ naturalwidth = width
if factor ~= 0 then
width = (1.0 + factor/1000000.0) * width
end
@@ -342,6 +339,7 @@ flush_character = function(current,font,char,factor,vfcommands,pos_h,pos_v,pos_r
width = data.width or 0
height = data.height or 0
depth = data.depth or 0
+ naturalwidth = width
if not factor then
factor = 0
end
@@ -366,10 +364,10 @@ flush_character = function(current,font,char,factor,vfcommands,pos_h,pos_v,pos_r
pos_v = pos_v + y
end
pushorientation(orientation,pos_h,pos_v)
- flushcharacter(current,pos_h,pos_v,pos_r,font,char,data,factor,width,f,e)
+ flushcharacter(current,pos_h,pos_v,pos_r,font,char,data,factor,naturalwidth,f,e)
poporientation(orientation,pos_h,pos_v)
else
- flushcharacter(current,pos_h,pos_v,pos_r,font,char,data,factor,width,f,e)
+ flushcharacter(current,pos_h,pos_v,pos_r,font,char,data,factor,naturalwidth,f,e)
end
end
return width, height, depth
@@ -551,10 +549,6 @@ local hlist_out, vlist_out do
current = getlist(this_box)
end
- -- if synctex then
- -- synctexhlist(this_box)
- -- end
-
while current do
local char, id = isglyph(current)
if char then
@@ -664,17 +658,9 @@ local hlist_out, vlist_out do
cur_h = edge - 10
else
cur_h = cur_h + gluewidth
- -- if synctex then
- -- synch_pos_with_cur(ref_h, ref_v, cur_h, cur_v)
- -- synctexhorizontalruleorglue(p, this_box)
- -- end
end
else
cur_h = cur_h + gluewidth
- -- if synctex then
- -- synch_pos_with_cur(ref_h, ref_v, cur_h, cur_v)
- -- synctexhorizontalruleorglue(p, this_box)
- -- end
end
end
elseif id == hlist_code or id == vlist_code then
@@ -685,9 +671,11 @@ local hlist_out, vlist_out do
if list then
local shift, orientation = getshift(current)
if not orientation then
--- local width, height, depth, list, boxdir, shift, orientation = getall(current)
--- if list then
--- if not orientation then
+ --
+ -- local width, height, depth, list, boxdir, shift, orientation = getall(current)
+ -- if list then
+ -- if not orientation then
+ --
local basepoint_h = boxdir ~= pos_r and width or 0
-- local basepoint_v = shift
-- synch_pos_with_cur(ref_h,ref_v,cur_h + basepoint_h,shift)
@@ -754,14 +742,6 @@ local hlist_out, vlist_out do
end
poporientation(orientation,pos_h,pos_v,pos_r)
end
- else
- -- if synctex then
- -- if id == vlist_code then
- -- synctexvoidvlist(p,this_box)
- -- else
- -- synctexvoidhlist(p,this_box)
- -- end
- -- end
end
cur_h = cur_h + width
elseif id == disc_code then
@@ -773,11 +753,6 @@ local hlist_out, vlist_out do
setfield(current,"replace")
end
elseif id == kern_code then
- -- if synctex then
- -- synctexkern(p, this_box)
- -- end
--- local kern = getkern(current)
--- local factor = getexpansion(current)
local kern, factor = getkern(current,true)
if kern ~= 0 then
if factor and factor ~= 0 then
@@ -817,9 +792,6 @@ local hlist_out, vlist_out do
cur_h = cur_h + width
end
elseif id == math_code then
- -- if synctex then
- -- synctexmath(p, this_box)
- -- end
local kern = getkern(current)
if kern ~= 0 then
cur_h = cur_h + kern
@@ -904,9 +876,6 @@ local hlist_out, vlist_out do
pos_v = ref_v - cur_v
-- synced
end
- -- if synctex then
- -- synctextsilh(this_box)
- -- end
pos_h = ref_h
pos_v = ref_v
pos_r = ref_r
@@ -945,10 +914,6 @@ local hlist_out, vlist_out do
current = getlist(this_box)
end
- -- if synctex then
- -- synctexvlist(this_box)
- -- end
-
-- while current do
-- local id = getid(current)
for current, id, subtype in nextnode, current do
@@ -1111,15 +1076,6 @@ local hlist_out, vlist_out do
end
poporientation(orientation,pos_h,pos_v,pos_r)
end
- else
- -- if synctex then
- -- synch_pos_with_cur(ref_h, ref_v, cur_h, cur_v)
- -- if id == vlist_code then
- -- synctexvoidvlist(current, this_box)
- -- else
- -- synctexvoidhlist(current, this_box)
- -- end
- -- end
end
cur_v = cur_v + height + depth
elseif id == kern_code then
@@ -1180,9 +1136,6 @@ local hlist_out, vlist_out do
pos_v = ref_v - cur_v
-- synced
end
- -- if synctex then
- -- synctextsilh(this_box)
- -- end
pos_h = ref_h
pos_v = ref_v
pos_r = ref_r
@@ -1231,12 +1184,6 @@ function lpdf.convert(box,smode,objnum,specification) -- temp name
shippingmode = smode
- -- synctex = texget("synctex")
-
- -- if synctex then
- -- synctexsheet(1000)
- -- end
-
local width, height, depth = getwhd(box)
local total = height + depth
@@ -1336,10 +1283,6 @@ function lpdf.convert(box,smode,objnum,specification) -- temp name
::DONE::
- -- if synctex then
- -- synctexteehs()
- -- end
-
finalize(objnum,specification)
shippingmode = "none"
end
diff --git a/tex/context/base/mkiv/font-ctx.lua b/tex/context/base/mkiv/font-ctx.lua
index 6847a2b8d..0fd6c61af 100644
--- a/tex/context/base/mkiv/font-ctx.lua
+++ b/tex/context/base/mkiv/font-ctx.lua
@@ -87,8 +87,6 @@ local getprop = nuts.getprop
local setprop = nuts.setprop
local setsubtype = nuts.setsubtype
-local texgetattribute = tex.getattribute
-local texsetattribute = tex.setattribute
local texgetdimen = tex.getdimen
local texsetcount = tex.setcount
local texget = tex.get
@@ -2429,6 +2427,26 @@ to scale virtual characters.</p>
do
+ -- can become luat-tex.lua
+
+ local texsetglyphdata = tex.setglyphdata
+ local texgetglyphdata = tex.getglyphdata
+
+ if not texsetglyphdata then
+
+ local texsetattribute = tex.setattribute
+ local texgetattribute = tex.getattribute
+
+ texsetglyphdata = function(n) return texsetattribute(0,n) end
+ texgetglyphdata = function() return texgetattribute(0) end
+
+ tex.setglyphdata = texsetglyphdata
+ tex.getglyphdata = texgetglyphdata
+
+ end
+
+ -- till here
+
local setmacro = tokens.setters.macro
function constructors.currentfonthasfeature(n)
@@ -2452,6 +2470,63 @@ do
local f_strip = formatters["%0.2fpt"] -- normally this value is changed only once
local stripper = lpeg.patterns.stripzeros
+ local cache = { }
+
+ local hows = {
+ ["+"] = "add",
+ ["-"] = "subtract",
+ ["="] = "replace",
+ }
+
+ local function setfeature(how,parent,name,font) -- 0/1 test temporary for testing
+ if not how or how == 0 then
+ if trace_features and texgetglyphdata() ~= 0 then
+ report_cummulative("font %!font:name!, reset",fontdata[font or true])
+ end
+ texsetglyphdata(0)
+ elseif how == true or how == 1 then
+ local hash = "feature > " .. parent
+ local done = cache[hash]
+ if trace_features and done then
+ report_cummulative("font %!font:name!, revive %a : %!font:features!",fontdata[font or true],parent,setups[numbers[done]])
+ end
+ texsetglyphdata(done or 0)
+ else
+ local full = parent .. how .. name
+ local hash = "feature > " .. full
+ local done = cache[hash]
+ if not done then
+ local n = setups[full]
+ if n then
+ -- already defined
+ else
+ n = mergecontextfeatures(parent,name,how,full)
+ end
+ done = registercontextfeature(hash,full,how)
+ cache[hash] = done
+ if trace_features then
+ report_cummulative("font %!font:name!, %s %a : %!font:features!",fontdata[font or true],hows[how],full,setups[numbers[done]])
+ end
+ end
+ texsetglyphdata(done)
+ end
+ end
+
+ local function resetfeature()
+ if trace_features and texgetglyphdata() ~= 0 then
+ report_cummulative("font %!font:name!, reset",fontdata[true])
+ end
+ texsetglyphdata(0)
+ end
+
+ local function setfontfeature(tag)
+ texsetglyphdata(contextnumber(tag))
+ end
+
+ local function resetfontfeature()
+ texsetglyphdata(0)
+ end
+
implement {
name = "nbfs",
arguments = "dimen",
@@ -2469,13 +2544,13 @@ do
implement {
name = "setfontfeature",
arguments = "string",
- actions = function(tag) texsetattribute(0,contextnumber(tag)) end
+ actions = setfontfeature,
}
implement {
name = "resetfontfeature",
arguments = { 0, 0 },
- actions = texsetattribute,
+ actions = resetfontfeature,
}
implement {
@@ -2504,62 +2579,12 @@ do
actions = function(name) ctx_doif(contextnumber(name) == 0) end,
}
-
implement {
name = "adaptfontfeature",
arguments = "2 strings",
actions = adaptcontext
}
- local cache = { }
-
- local hows = {
- ["+"] = "add",
- ["-"] = "subtract",
- ["="] = "replace",
- }
-
- local function setfeature(how,parent,name,font) -- 0/1 test temporary for testing
- if not how or how == 0 then
- if trace_features and texgetattribute(0) ~= 0 then
- report_cummulative("font %!font:name!, reset",fontdata[font or true])
- end
- texsetattribute(0,0)
- elseif how == true or how == 1 then
- local hash = "feature > " .. parent
- local done = cache[hash]
- if trace_features and done then
- report_cummulative("font %!font:name!, revive %a : %!font:features!",fontdata[font or true],parent,setups[numbers[done]])
- end
- texsetattribute(0,done or 0)
- else
- local full = parent .. how .. name
- local hash = "feature > " .. full
- local done = cache[hash]
- if not done then
- local n = setups[full]
- if n then
- -- already defined
- else
- n = mergecontextfeatures(parent,name,how,full)
- end
- done = registercontextfeature(hash,full,how)
- cache[hash] = done
- if trace_features then
- report_cummulative("font %!font:name!, %s %a : %!font:features!",fontdata[font or true],hows[how],full,setups[numbers[done]])
- end
- end
- texsetattribute(0,done)
- end
- end
-
- local function resetfeature()
- if trace_features and texgetattribute(0) ~= 0 then
- report_cummulative("font %!font:name!, reset",fontdata[true])
- end
- texsetattribute(0,0)
- end
-
local function registerlanguagefeatures()
local specifications = languages.data.specifications
for i=1,#specifications do
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index f8bf6f2c8..3285c689c 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -1473,6 +1473,11 @@ end
-- ValueFormat1 applies to the ValueRecord of the first glyph in each pair. ValueRecords for all first glyphs must use ValueFormat1. If ValueFormat1 is set to zero (0), the corresponding glyph has no ValueRecord and, therefore, should not be repositioned.
-- ValueFormat2 applies to the ValueRecord of the second glyph in each pair. ValueRecords for all second glyphs must use ValueFormat2. If ValueFormat2 is set to null, then the second glyph of the pair is the “next” glyph for which a lookup should be performed.
+-- local simple = {
+-- [true] = { [true] = { true, true }, [false] = { true } },
+-- [false] = { [true] = { false, true }, [false] = { false } },
+-- }
+
function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
local tableoffset = lookupoffset + offset
setposition(f,tableoffset)
@@ -1520,6 +1525,7 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
classdef1 = readclassdef(f,tableoffset+classdef1,coverage)
classdef2 = readclassdef(f,tableoffset+classdef2,nofglyphs)
local usedcoverage = { }
+local shared = { } -- partial sparse
for g1, c1 in next, classdef1 do
if coverage[g1] then
local l1 = classlist[c1]
@@ -1531,7 +1537,18 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
local first = offsets[1]
local second = offsets[2]
if first or second then
- hash[paired] = { first, second or nil }
+local s1 = shared[first]
+if not s1 then
+ s1 = { }
+ shared[first] = s1
+end
+local s2 = s1[second]
+if not s2 then
+ s2 = { first, second or nil }
+ s1[second] = s2
+end
+hash[paired] = s2
+-- hash[paired] = { first, second or nil }
else
-- upto the next lookup for this combination
end
diff --git a/tex/context/base/mkiv/font-fea.mkvi b/tex/context/base/mkiv/font-fea.mkvi
index 4a5356090..9c4b60d9f 100644
--- a/tex/context/base/mkiv/font-fea.mkvi
+++ b/tex/context/base/mkiv/font-fea.mkvi
@@ -137,11 +137,28 @@
\def\font_basics_features_list[#name][#separator]% todo: arg voor type
{\clf_featurelist{#name}{\detokenize{#separator}}}
-\attribute\zerocount\zerocount % first in list, so fast match
+\ifcase\contextlmtxmode
-\prependtoks
- \attribute\zerocount\attributeunsetvalue % new per 2017-08-30
-\to \t_attr_list_local
+ \attribute\zerocount\zerocount % first in list, so fast match
+
+ \prependtoks
+ \attribute\zerocount\attributeunsetvalue % new per 2017-08-30 / why not zero
+ \to \t_attr_list_local
+
+ \def\font_dynamic_value{\attribute\zerocount}
+
+\else
+
+ \glyphdatafield\zerocount
+ \attribute\zerocount\attributeunsetvalue
+
+ \prependtoks
+ \glyphdatafield\attributeunsetvalue % why not zero
+ \to \t_attr_list_local
+
+ \let\font_dynamic_value\glyphdatafield
+
+\fi
% beware: these are global features on top of existing font features
diff --git a/tex/context/base/mkiv/font-ini.mkvi b/tex/context/base/mkiv/font-ini.mkvi
index dd8a5f148..4ebbff88e 100644
--- a/tex/context/base/mkiv/font-ini.mkvi
+++ b/tex/context/base/mkiv/font-ini.mkvi
@@ -327,6 +327,16 @@
\fontemwidth \nullfont 786432\scaledpoint
\fontextraspace \nullfont 85459\scaledpoint
+\appendtoks
+ \fontslantperpoint \nullfont 0\scaledpoint
+ \fontinterwordspace \nullfont 256377\scaledpoint
+ \fontinterwordstretch\nullfont 128188\scaledpoint
+ \fontinterwordshrink \nullfont 85459\scaledpoint
+ \fontexheight \nullfont 338952\scaledpoint
+ \fontemwidth \nullfont 786432\scaledpoint
+ \fontextraspace \nullfont 85459\scaledpoint
+\to \everyjob
+
%D Tracing
\newtoks\t_font_tracers_definitions
diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua
index e851c3157..4ac737697 100644
--- a/tex/context/base/mkiv/font-otr.lua
+++ b/tex/context/base/mkiv/font-otr.lua
@@ -2073,9 +2073,7 @@ end
local function readtable(tag,f,fontdata,specification,...)
local reader = readers[tag]
if reader then
- -- local t = os.clock()
reader(f,fontdata,specification,...)
- -- report("reading table %a took %0.4f seconds",tag,os.clock()-t)
end
end
diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua
index b9f719a5f..09351b1f1 100644
--- a/tex/context/base/mkiv/font-ots.lua
+++ b/tex/context/base/mkiv/font-ots.lua
@@ -185,8 +185,6 @@ local setprev = nuts.setprev
local getboth = nuts.getboth
local setboth = nuts.setboth
local getid = nuts.getid
-local getattr = nuts.getattr
-local setattr = nuts.setattr
local getprop = nuts.getprop
local setprop = nuts.setprop
local getsubtype = nuts.getsubtype
@@ -199,6 +197,9 @@ local setlink = nuts.setlink
local getcomponents = nuts.getcomponents -- the original one, not yet node-aux
local setcomponents = nuts.setcomponents -- the original one, not yet node-aux
local getwidth = nuts.getwidth
+local getattr = nuts.getattr
+
+local getglyphdata = nuts.getglyphdata
local ischar = nuts.is_char
local isglyph = nuts.isglyph
@@ -3291,7 +3292,7 @@ end
-- discretionaries (maybe we need to tag those some day). So, at least for now, we don't
-- have the following test in the sub runs:
--
--- -- local a = getattr(start,0)
+-- -- local a = getglyhpdata(start)
-- -- if a then
-- -- a = (a == attr) and (not attribute or getprop(start,a_state) == attribute)
-- -- else
@@ -3301,7 +3302,7 @@ end
--
-- but use this instead:
--
--- -- local a = getattr(start,0)
+-- -- local a = getglyphdata(start)
-- -- if not a or (a == attr) then
--
-- and even that one is probably not needed. However, we can handle interesting
@@ -3327,7 +3328,7 @@ local function c_run_single(head,font,attr,lookupcache,step,dataset,sequence,rlm
if char then
local a -- happens often so no assignment is faster
if attr then
- a = getattr(start,0)
+ a = getglyphdata(start)
end
if not a or (a == attr) then
local lookupmatch = lookupcache[char]
@@ -3367,7 +3368,7 @@ local function t_run_single(start,stop,font,attr,lookupcache)
if char then
local a -- happens often so no assignment is faster
if attr then
- a = getattr(start,0)
+ a = getglyphdata(start)
end
local startnext = getnext(start)
if not a or (a == attr) then
@@ -3451,7 +3452,7 @@ end
local function k_run_single(sub,injection,last,font,attr,lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
local a -- happens often so no assignment is faster
if attr then
- a = getattr(sub,0)
+ a = getglyphdata(sub)
end
if not a or (a == attr) then
for n in nextnode, sub do -- only gpos
@@ -3487,7 +3488,7 @@ local function c_run_multiple(head,font,attr,steps,nofsteps,dataset,sequence,rlm
if char then
local a -- happens often so no assignment is faster
if attr then
- a = getattr(start,0)
+ a = getglyphdata(start)
end
if not a or (a == attr) then
for i=1,nofsteps do
@@ -3535,7 +3536,7 @@ local function t_run_multiple(start,stop,font,attr,steps,nofsteps)
if char then
local a -- happens often so no assignment is faster
if attr then
- a = getattr(start,0)
+ a = getglyphdata(start)
end
local startnext = getnext(start)
if not a or (a == attr) then
@@ -3616,7 +3617,7 @@ end
local function k_run_multiple(sub,injection,last,font,attr,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
local a -- happens often so no assignment is faster
if attr then
- a = getattr(sub,0)
+ a = getglyphdata(sub)
end
if not a or (a == attr) then
for n in nextnode, sub do -- only gpos
@@ -3709,7 +3710,7 @@ do
-- reference:
--
- -- local a = attr and getattr(start,0)
+ -- local a = attr and getglyphdata(start)
-- if a then
-- a = (a == attr) and (not attribute or getprop(start,a_state) == attribute)
-- else
@@ -3720,7 +3721,7 @@ do
--
-- local a -- happens often so no assignment is faster
-- if attr then
- -- if getattr(start,0) == attr and (not attribute or getprop(start,a_state) == attribute) then
+ -- if getglyphdata(start) == attr and (not attribute or getprop(start,a_state) == attribute) then
-- a = true
-- end
-- elseif not attribute or getprop(start,a_state) == attribute then
@@ -3860,7 +3861,7 @@ do
if m then
local a -- happens often so no assignment is faster
if attr then
- a = getattr(start,0)
+ a = getglyphdata(start)
end
if not a or (a == attr) then
for i=m[1],m[2] do
@@ -3907,7 +3908,7 @@ do
if lookupmatch then
local a -- happens often so no assignment is faster
if attr then
- if getattr(start,0) == attr and (not attribute or getprop(start,a_state) == attribute) then
+ if getglyphdata(start) == attr and (not attribute or getprop(start,a_state) == attribute) then
a = true
end
elseif not attribute or getprop(start,a_state) == attribute then
@@ -3974,7 +3975,7 @@ do
if m then
local a -- happens often so no assignment is faster
if attr then
- if getattr(start,0) == attr and (not attribute or getprop(start,a_state) == attribute) then
+ if getglyphdata(start) == attr and (not attribute or getprop(start,a_state) == attribute) then
a = true
end
elseif not attribute or getprop(start,a_state) == attribute then
diff --git a/tex/context/base/mkiv/font-tfm.lua b/tex/context/base/mkiv/font-tfm.lua
index 6e4f86980..5fdae5990 100644
--- a/tex/context/base/mkiv/font-tfm.lua
+++ b/tex/context/base/mkiv/font-tfm.lua
@@ -6,6 +6,8 @@ if not modules then modules = { } end modules ['font-tfm'] = {
license = "see context related readme files"
}
+if not context then return end -- use luatex-fonts-tfm.lua instead
+
local next, type = next, type
local match, format = string.match, string.format
local concat, sortedhash = table.concat, table.sortedhash
@@ -118,266 +120,201 @@ local depth = { } -- table.setmetatableindex("number")
--
-- So "czechdqcheat=yes" is then a valid feature. And yes, it's a cheat.
-local read_from_tfm, check_tfm do
-
- local tfmreaders = context and tfm.readers
- local loadtfmvf = tfmreaders and tfmreaders.loadtfmvf
- local loadtfm = font.read_tfm
- local loadvf = font.read_vf
+local loadtfmvf = tfm.readers.loadtfmvf
- directives.register("fonts.tfm.builtin",function(v)
- loadtfmvf = tfmreaders and tfmreaders.loadtfmvf
- if v and loadtfm then
- loadtfmvf = false
- end
- end)
+local function read_from_tfm(specification)
+ local filename = specification.filename
+ local size = specification.size
+ depth[filename] = (depth[filename] or 0) + 1
+ if trace_defining then
+ report_defining("loading tfm file %a at size %s",filename,size)
+ end
+ local tfmdata = loadtfmvf(filename,size)
+ if tfmdata then
- read_from_tfm = function(specification)
- local filename = specification.filename
- local size = specification.size
- depth[filename] = (depth[filename] or 0) + 1
- if trace_defining then
- report_defining("loading tfm file %a at size %s",filename,size)
- end
- local tfmdata -- not cached, fast enough
- if loadtfmvf then
- tfmdata = loadtfmvf(filename,size)
- else
- tfmdata = loadtfm(filename,size)
- end
- if tfmdata then
+ local features = specification.features and specification.features.normal or { }
+ local features = constructors.checkedfeatures("tfm",features)
+ specification.features.normal = features
- local features = specification.features and specification.features.normal or { }
- local features = constructors.checkedfeatures("tfm",features)
- specification.features.normal = features
+ -- If reencode returns a new table, we assume that we're doing something
+ -- special. An 'auto' reencode picks up its vector from the pfb file.
- -- If reencode returns a new table, we assume that we're doing something
- -- special. An 'auto' reencode picks up its vector from the pfb file.
+ local newtfmdata = (depth[filename] == 1) and tfm.reencode(tfmdata,specification)
+ if newtfmdata then
+ tfmdata = newtfmdata
+ end
- local newtfmdata = (depth[filename] == 1) and tfm.reencode(tfmdata,specification)
- if newtfmdata then
- tfmdata = newtfmdata
+ local resources = tfmdata.resources or { }
+ local properties = tfmdata.properties or { }
+ local parameters = tfmdata.parameters or { }
+ local shared = tfmdata.shared or { }
+ --
+ shared.features = features
+ shared.resources = resources
+ --
+ properties.name = tfmdata.name -- todo: fallback
+ properties.fontname = tfmdata.fontname -- todo: fallback
+ properties.psname = tfmdata.psname -- todo: fallback
+ properties.fullname = tfmdata.fullname -- todo: fallback
+ properties.filename = specification.filename -- todo: fallback
+ properties.format = tfmdata.format or fonts.formats.tfm -- better than nothing
+ properties.usedbitmap = tfmdata.usedbitmap
+ --
+ tfmdata.properties = properties
+ tfmdata.resources = resources
+ tfmdata.parameters = parameters
+ tfmdata.shared = shared
+ --
+ shared.rawdata = { resources = resources }
+ shared.features = features
+ --
+ -- The next branch is only entered when we have a proper encoded file i.e.
+ -- unicodes and such. It really nakes no sense to do feature juggling when
+ -- we have no names and unicodes.
+ --
+ if newtfmdata then
+ --
+ -- Some opentype processing assumes these to be present:
+ --
+ if not resources.marks then
+ resources.marks = { }
+ end
+ if not resources.sequences then
+ resources.sequences = { }
+ end
+ if not resources.features then
+ resources.features = {
+ gsub = { },
+ gpos = { },
+ }
+ end
+ if not tfmdata.changed then
+ tfmdata.changed = { }
+ end
+ if not tfmdata.descriptions then
+ tfmdata.descriptions = tfmdata.characters
end
-
- local resources = tfmdata.resources or { }
- local properties = tfmdata.properties or { }
- local parameters = tfmdata.parameters or { }
- local shared = tfmdata.shared or { }
--
- shared.features = features
- shared.resources = resources
+ -- It might be handy to have this:
--
- properties.name = tfmdata.name -- todo: fallback
- properties.fontname = tfmdata.fontname -- todo: fallback
- properties.psname = tfmdata.psname -- todo: fallback
- properties.fullname = tfmdata.fullname -- todo: fallback
- properties.filename = specification.filename -- todo: fallback
- properties.format = tfmdata.format or fonts.formats.tfm -- better than nothing
- properties.usedbitmap = tfmdata.usedbitmap
+ otf.readers.addunicodetable(tfmdata)
--
- tfmdata.properties = properties
- tfmdata.resources = resources
- tfmdata.parameters = parameters
- tfmdata.shared = shared
+ -- We make a pseudo opentype font, e.g. kerns and ligatures etc:
--
- shared.rawdata = { resources = resources }
- shared.features = features
+ tfmenhancers.apply(tfmdata,filename)
--
- -- The next branch is only entered when we have a proper encoded file i.e.
- -- unicodes and such. It really nakes no sense to do feature juggling when
- -- we have no names and unicodes.
+ -- Now user stuff can kick in.
--
- if newtfmdata then
- --
- -- Some opentype processing assumes these to be present:
- --
- if not resources.marks then
- resources.marks = { }
- end
- if not resources.sequences then
- resources.sequences = { }
- end
- if not resources.features then
- resources.features = {
- gsub = { },
- gpos = { },
- }
- end
- if not tfmdata.changed then
- tfmdata.changed = { }
- end
- if not tfmdata.descriptions then
- tfmdata.descriptions = tfmdata.characters
- end
- --
- -- It might be handy to have this:
- --
- otf.readers.addunicodetable(tfmdata)
- --
- -- We make a pseudo opentype font, e.g. kerns and ligatures etc:
- --
- tfmenhancers.apply(tfmdata,filename)
- --
- -- Now user stuff can kick in.
- --
- constructors.applymanipulators("tfm",tfmdata,features,trace_features,report_tfm)
- --
- -- As that can also mess with names and such, we are now ready for finalizing
- -- the unicode information. This is a different order that for instance type one
- -- (afm) files. First we try to deduce unicodes from already present information.
- --
- otf.readers.unifymissing(tfmdata)
- --
- -- Next we fill in the gaps, based on names from teh agl. Probably not much will
- -- happen here.
- --
- fonts.mappings.addtounicode(tfmdata,filename)
- --
- -- The tounicode data is passed to the backend that constructs the vectors for us.
- --
- tfmdata.tounicode = 1
- local tounicode = fonts.mappings.tounicode
- for unicode, v in next, tfmdata.characters do
- local u = v.unicode
- if u then
- v.tounicode = tounicode(u)
- end
- end
- --
- -- However, when we use a bitmap font those vectors can't be constructed because
- -- that information is not carried with those fonts (there is no name info, nor
- -- proper index info, nor unicodes at that end). So, we provide it ourselves.
- --
- if tfmdata.usedbitmap then
- tfm.addtounicode(tfmdata)
- end
- end
+ constructors.applymanipulators("tfm",tfmdata,features,trace_features,report_tfm)
--
- shared.processes = next(features) and tfm.setfeatures(tfmdata,features) or nil
+ -- As that can also mess with names and such, we are now ready for finalizing
+ -- the unicode information. This is a different order that for instance type one
+ -- (afm) files. First we try to deduce unicodes from already present information.
--
- if size < 0 then
- size = idiv(65536 * -size,100)
- end
- parameters.factor = 1 -- already scaled
- parameters.units = 1000 -- just in case
- parameters.size = size
- parameters.slant = parameters.slant or parameters[1] or 0
- parameters.space = parameters.space or parameters[2] or 0
- parameters.space_stretch = parameters.space_stretch or parameters[3] or 0
- parameters.space_shrink = parameters.space_shrink or parameters[4] or 0
- parameters.x_height = parameters.x_height or parameters[5] or 0
- parameters.quad = parameters.quad or parameters[6] or 0
- parameters.extra_space = parameters.extra_space or parameters[7] or 0
+ otf.readers.unifymissing(tfmdata)
--
- constructors.enhanceparameters(parameters) -- official copies for us
+ -- Next we fill in the gaps, based on names from teh agl. Probably not much will
+ -- happen here.
--
- properties.private = properties.private or tfmdata.private or privateoffset
+ fonts.mappings.addtounicode(tfmdata,filename)
--
- if newtfmdata then
- --
- -- We do nothing as we assume flat tfm files. It would become real messy
- -- otherwise and I don't have something for testing on my system anyway.
- --
- elseif loadtfmvf then
- -- already loaded
- local fonts = tfmdata.fonts
- if fonts then
- for i=1,#fonts do
- local font = fonts[i]
- local id = font.id
- if not id then
- local name = font.name
- local size = font.size
- if name and size then
- local data, id = constructors.readanddefine(name,size)
- if id then
- font.id = id
- font.name = nil
- font.size = nil
- end
- end
- end
- end
- end
- elseif constructors.resolvevirtualtoo then
- fonts.loggers.register(tfmdata,file.suffix(filename),specification) -- strange, why here
- local vfname = findbinfile(specification.name, 'ovf')
- if vfname and vfname ~= "" then
- local vfdata = loadvf(vfname,size)
- if vfdata then
- local chars = tfmdata.characters
- for k,v in next, vfdata.characters do
- chars[k].commands = v.commands
- end
- properties.virtualized = true
- tfmdata.fonts = vfdata.fonts
- tfmdata.type = "virtual" -- else nested calls with cummulative scaling
- local fontlist = vfdata.fonts
- local name = file.nameonly(filename)
- for i=1,#fontlist do
- local n = fontlist[i].name
- local s = fontlist[i].size
- local d = depth[filename]
- s = constructors.scaled(s,vfdata.designsize)
- if d > tfm.maxnestingdepth then
- report_defining("too deeply nested virtual font %a with size %a, max nesting depth %s",n,s,tfm.maxnestingdepth)
- fontlist[i] = { id = 0 }
- elseif (d > 1) and (s > tfm.maxnestingsize) then
- report_defining("virtual font %a exceeds size %s",n,s)
- fontlist[i] = { id = 0 }
- else
- local t, id = constructors.readanddefine(n,s)
- fontlist[i] = { id = id }
- end
- end
- end
+ -- The tounicode data is passed to the backend that constructs the vectors for us.
+ --
+ tfmdata.tounicode = 1
+ local tounicode = fonts.mappings.tounicode
+ for unicode, v in next, tfmdata.characters do
+ local u = v.unicode
+ if u then
+ v.tounicode = tounicode(u)
end
end
--
- -- This is for old times sake (and context specific) so we comment it. It has
- -- to do with encoding prefixes (a context naming that was later adopted by
- -- the lm/gyre project)
- --
- -- if not features.encoding then
- -- local encoding, filename = match(properties.filename,"^(.-)%-(.*)$")
- -- if filename and encoding and encodings.known and encodings.known[encoding] then
- -- features.encoding = encoding
- -- end
- -- end
- --
- -- Some afterthoughts:
+ -- However, when we use a bitmap font those vectors can't be constructed because
+ -- that information is not carried with those fonts (there is no name info, nor
+ -- proper index info, nor unicodes at that end). So, we provide it ourselves.
--
- properties.haskerns = true
- properties.hasligatures = true
- properties.hasitalics = true
- resources.unicodes = { }
- resources.lookuptags = { }
+ if tfmdata.usedbitmap then
+ tfm.addtounicode(tfmdata)
+ end
+ end
+ --
+ shared.processes = next(features) and tfm.setfeatures(tfmdata,features) or nil
+ --
+ if size < 0 then
+ size = idiv(65536 * -size,100)
+ end
+ parameters.factor = 1 -- already scaled
+ parameters.units = 1000 -- just in case
+ parameters.size = size
+ parameters.slant = parameters.slant or parameters[1] or 0
+ parameters.space = parameters.space or parameters[2] or 0
+ parameters.space_stretch = parameters.space_stretch or parameters[3] or 0
+ parameters.space_shrink = parameters.space_shrink or parameters[4] or 0
+ parameters.x_height = parameters.x_height or parameters[5] or 0
+ parameters.quad = parameters.quad or parameters[6] or 0
+ parameters.extra_space = parameters.extra_space or parameters[7] or 0
+ --
+ constructors.enhanceparameters(parameters) -- official copies for us
+ --
+ properties.private = properties.private or tfmdata.private or privateoffset
+ --
+ if newtfmdata then
--
- depth[filename] = depth[filename] - 1
+ -- We do nothing as we assume flat tfm files. It would become real messy
+ -- otherwise and I don't have something for testing on my system anyway.
--
- return tfmdata
else
- depth[filename] = depth[filename] - 1
+ -- already loaded
+ local fonts = tfmdata.fonts
+ if fonts then
+ for i=1,#fonts do
+ local font = fonts[i]
+ local id = font.id
+ if not id then
+ local name = font.name
+ local size = font.size
+ if name and size then
+ local data, id = constructors.readanddefine(name,size)
+ if id then
+ font.id = id
+ font.name = nil
+ font.size = nil
+ end
+ end
+ end
+ end
+ end
end
+ --
+ properties.haskerns = true
+ properties.hasligatures = true
+ properties.hasitalics = true
+ resources.unicodes = { }
+ resources.lookuptags = { }
+ --
+ depth[filename] = depth[filename] - 1
+ --
+ return tfmdata
+ else
+ depth[filename] = depth[filename] - 1
end
+end
- check_tfm = function(specification,fullname) -- we could split up like afm/otf
- local foundname = findbinfile(fullname, 'tfm') or ""
- if foundname == "" then
- foundname = findbinfile(fullname, 'ofm') or "" -- not needed in context
- end
- if foundname == "" then
- foundname = fonts.names.getfilename(fullname,"tfm") or ""
- end
- if foundname ~= "" then
- specification.filename = foundname
- specification.format = "ofm"
- return read_from_tfm(specification)
- elseif trace_defining then
- report_defining("loading tfm with name %a fails",specification.name)
- end
+local function check_tfm(specification,fullname) -- we could split up like afm/otf
+ local foundname = findbinfile(fullname, 'tfm') or ""
+ if foundname == "" then
+ foundname = findbinfile(fullname, 'ofm') or "" -- not needed in context
+ end
+ if foundname == "" then
+ foundname = fonts.names.getfilename(fullname,"tfm") or ""
+ end
+ if foundname ~= "" then
+ specification.filename = foundname
+ specification.format = "ofm"
+ return read_from_tfm(specification)
+ elseif trace_defining then
+ report_defining("loading tfm with name %a fails",specification.name)
end
-
end
readers.check_tfm = check_tfm
@@ -575,68 +512,6 @@ do
end
--- This code adds a ToUnicode vector for bitmap fonts. We don't bother about
--- ranges because we have small fonts. it works ok with acrobat but fails with
--- the other viewers (they get confused by the bitmaps I guess).
-
-do
-
- local template = [[
-/CIDInit /ProcSet findresource begin
- 12 dict begin
- begincmap
- /CIDSystemInfo << /Registry (TeX) /Ordering (bitmap-%s) /Supplement 0 >> def
- /CMapName /TeX-bitmap-%s def
- /CMapType 2 def
- 1 begincodespacerange
- <00> <FF>
- endcodespacerange
- %s beginbfchar
-%s
- endbfchar
- endcmap
-CMapName currentdict /CMap defineresource pop end
-end
-end
-]]
-
- local flushstreamobject = lpdf and lpdf.flushstreamobject -- context
- local setfontattributes = lpdf and lpdf.setfontattributes -- context
-
- if not flushstreamobject then
- flushstreamobject = function(data)
- return pdf.obj { immediate = true, type = "stream", string = data } -- generic
- end
- end
-
- if not setfontattributes then
- setfontattributes = function(id,data)
- return pdf.setfontattributes(id,data) -- generic
- end
- end
-
- function tfm.addtounicode(tfmdata)
- local id = tfmdata.usedbitmap
- local map = { }
- local char = { } -- no need for range, hardly used
- for k, v in next, tfmdata.characters do
- local index = v.oindex
- local tounicode = v.tounicode
- if index and tounicode then
- map[index] = tounicode
- end
- end
- for k, v in sortedhash(map) do
- char[#char+1] = format("<%02X> <%s>",k,v)
- end
- char = concat(char,"\n")
- local stream = format(template,id,id,#char,char)
- local reference = flushstreamobject(stream,nil,true)
- setfontattributes(id,format("/ToUnicode %i 0 R",reference))
- end
-
-end
-
-- Now we implement the regular features handlers. We need to convert the
-- tfm specific structures to opentype structures. In basemode they are
-- converted back so that is a bit of a waste but it's fast enough.
diff --git a/tex/context/base/mkiv/grph-chk.lua b/tex/context/base/mkiv/grph-chk.lua
index 6356755aa..fedd8d3ca 100644
--- a/tex/context/base/mkiv/grph-chk.lua
+++ b/tex/context/base/mkiv/grph-chk.lua
@@ -27,7 +27,7 @@ local placeholder = graphics.bitmaps.placeholder
-- but opens up some possibilities (like merging fonts) that I will look into some
-- day.
-local function pdf_checker(data)
+function checkers.pdf(data)
local request = data.request
local used = data.used
if request and used and not request.scanimage then
@@ -130,7 +130,7 @@ local function wrappedidentify(identify,filename)
end
end
-local function jpg_checker(data)
+function checkers.jpg(data)
local request = data.request
local used = data.used
if request and used and not request.scanimage then
@@ -166,7 +166,7 @@ local function jpg_checker(data)
return checkers.generic(data)
end
-local function jp2_checker(data) -- idem as jpg
+function checkers.jp2(data) -- idem as jpg
local request = data.request
local used = data.used
if request and used and not request.scanimage then
@@ -202,7 +202,7 @@ local function jp2_checker(data) -- idem as jpg
return checkers.generic(data)
end
-local function png_checker(data) -- same as jpg (for now)
+function checkers.png(data) -- same as jpg (for now)
local request = data.request
local used = data.used
if request and used and not request.scanimage then
@@ -247,30 +247,3 @@ local function png_checker(data) -- same as jpg (for now)
end
return checkers.generic(data)
end
-
-
-if CONTEXTLMTXMODE then
-
- checkers.pdf = pdf_checker
- checkers.jpg = jpg_checker
- checkers.jp2 = jp2_checker
- checkers.png = png_checker
-
-else
-
- -- yes or no ...
-
- directives.register("graphics.pdf.uselua",function(v)
- checkers.pdf = v and pdf_checker or nil
- report("%s Lua based PDF inclusion",v and "enabling" or "disabling")
- end)
-
- -- directives.register("graphics.uselua",function(v)
- -- checkers.pdf = v and pdf_checker or nil
- -- checkers.jpg = v and jpg_checker or nil
- -- checkers.jp2 = v and jp2_checker or nil
- -- checkers.png = v and png_checker or nil
- -- -- report("%s Lua based PDF, PNG, JPG and JP2 inclusion",v and "enabling" or "disabling")
- -- end)
-
-end
diff --git a/tex/context/base/mkiv/lang-lab.mkiv b/tex/context/base/mkiv/lang-lab.mkiv
index 9d73d96e5..f03d9af3a 100644
--- a/tex/context/base/mkiv/lang-lab.mkiv
+++ b/tex/context/base/mkiv/lang-lab.mkiv
@@ -350,7 +350,7 @@
\unexpanded\def\assigntranslation[#1]\to#2% bad, this \to
{\getparameters[\??translation][#1]%
- \edef#2{\csname\??translation\currentlanguage\endcsname}}
+ \edef#2{\begincsname\??translation\currentlanguage\endcsname}}
%D \macros
%D {commalistsentence}
diff --git a/tex/context/base/mkiv/lpdf-emb.lua b/tex/context/base/mkiv/lpdf-emb.lua
index 27fb2dc9a..0f5d14cf1 100644
--- a/tex/context/base/mkiv/lpdf-emb.lua
+++ b/tex/context/base/mkiv/lpdf-emb.lua
@@ -1146,13 +1146,6 @@ do
local stdhw = cffinfo.stdhw
local stdvw = cffinfo.stdvw
--
--- bluescale = 0.039625
--- blueshift = 7
--- bluefuzz = 1
--- defaultwidth = 500
--- nominalwidth = 696
--- stdhw = { 28, 36, 42, 48, 60 }
--- stdvw = { 40, 60, 66, 72, 76, 80, 88, 94 }
if defaultwidth == 0 then defaultwidth = nil end
if nomimalwidth == 0 then nominalwidth = nil end
if bluevalues then bluevalues = todictarray(bluevalues) end
@@ -1162,10 +1155,8 @@ do
if bluescale then bluescale = todictnumber(bluescale) end
if blueshift then blueshift = todictnumber(blueshift) end
if bluefuzz then bluefuzz = todictnumber(bluefuzz) end
--- if stdhw then stdhw = todictarray(stdhw) end
--- if stdvw then stdvw = todictarray(stdvw) end
-if stdhw then stdhw = todictdeltas(stdhw) end
-if stdvw then stdvw = todictdeltas(stdvw) end
+ if stdhw then stdhw = todictdeltas(stdhw) end
+ if stdvw then stdvw = todictdeltas(stdvw) end
--
local fontversion = todictstring(fontfile,fontheader.fontversion or "uknown version")
local familyname = todictstring(fontfile,cffinfo.familyname or names.family or basefontname)
diff --git a/tex/context/base/mkiv/lpdf-img.lua b/tex/context/base/mkiv/lpdf-img.lua
index aa91f9f22..ff89ad322 100644
--- a/tex/context/base/mkiv/lpdf-img.lua
+++ b/tex/context/base/mkiv/lpdf-img.lua
@@ -169,10 +169,10 @@ do
-- The amount of code is larger that I like and looks somewhat redundant but we sort of
-- optimize a few combinations that happen often.
- local pngapplyfilter = pnge and pnge.applyfilter
- local pngsplitmask = pnge and pnge.splitmask
- local pnginterlace = pnge and pnge.interlace
- local pngexpand = pnge and pnge.expand
+ local pngapplyfilter = pngdecode.applyfilter
+ local pngsplitmask = pngdecode.splitmask
+ local pnginterlace = pngdecode.interlace
+ local pngexpand = pngdecode.expand
local filtermask, decodemask, decodestrip, transpose, expand
diff --git a/tex/context/base/mkiv/lpdf-nod.lua b/tex/context/base/mkiv/lpdf-nod.lua
index 8bcf18c62..db99f0e5d 100644
--- a/tex/context/base/mkiv/lpdf-nod.lua
+++ b/tex/context/base/mkiv/lpdf-nod.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['lpdf-nod'] = {
license = "see context related readme files"
}
-if CONTEXTLMTXMODE > 1 then
+if CONTEXTLMTXMODE > 0 then
return
end
diff --git a/tex/context/base/mkiv/luat-bwc.lua b/tex/context/base/mkiv/luat-bwc.lua
index 993de7bf3..a86514fa8 100644
--- a/tex/context/base/mkiv/luat-bwc.lua
+++ b/tex/context/base/mkiv/luat-bwc.lua
@@ -8,25 +8,25 @@ if not modules then modules = { } end modules ['luat-bwc'] = {
-- backward compatibility
-if not tex.wd then
-
- local box = tex.box
-
- local wd = { } setmetatable(wd, {
- __index = function(t,k) local bk = box[k] return bk and bk.width or 0 end,
- __newindex = function(t,k,v) local bk = box[k] if bk then bk.width = v end end,
- } )
-
- local ht = { } setmetatable(ht, {
- __index = function(t,k) local bk = box[k] return bk and bk.height or 0 end,
- __newindex = function(t,k,v) local bk = box[k] if bk then bk.height = v end end,
- } )
-
- local dp = { } setmetatable(dp, {
- __index = function(t,k) local bk = box[k] return bk and bk.depth or 0 end,
- __newindex = function(t,k,v) local bk = box[k] if bk then bk.depth = v end end,
- } )
-
- -- tex.wd, tex.ht, tex.dp = wd, ht, dp
-
-end
+-- if not tex.wd then
+--
+-- local box = tex.box
+--
+-- local wd = { } setmetatable(wd, {
+-- __index = function(t,k) local bk = box[k] return bk and bk.width or 0 end,
+-- __newindex = function(t,k,v) local bk = box[k] if bk then bk.width = v end end,
+-- } )
+--
+-- local ht = { } setmetatable(ht, {
+-- __index = function(t,k) local bk = box[k] return bk and bk.height or 0 end,
+-- __newindex = function(t,k,v) local bk = box[k] if bk then bk.height = v end end,
+-- } )
+--
+-- local dp = { } setmetatable(dp, {
+-- __index = function(t,k) local bk = box[k] return bk and bk.depth or 0 end,
+-- __newindex = function(t,k,v) local bk = box[k] if bk then bk.depth = v end end,
+-- } )
+--
+-- tex.wd, tex.ht, tex.dp = wd, ht, dp
+--
+-- end
diff --git a/tex/context/base/mkiv/luat-cnf.lua b/tex/context/base/mkiv/luat-cnf.lua
index 5e3f026e9..c8aa0423b 100644
--- a/tex/context/base/mkiv/luat-cnf.lua
+++ b/tex/context/base/mkiv/luat-cnf.lua
@@ -218,7 +218,9 @@ local function makestub()
t[#t+1] = format("texconfig.%s=%s",v,tv)
end
end
- io.savedata(name,format("%s\n\n%s",concat(t,"\n"),format(stub,firsttable,tostring(CONTEXTLMTXMODE) or 0)))
+ t[#t+1] = ""
+ t[#t+1] = format(stub,firsttable,tostring(CONTEXTLMTXMODE or 0))
+ io.savedata(name,concat(t,"\n"))
logs.newline()
end
diff --git a/tex/context/base/mkiv/luat-cod.lua b/tex/context/base/mkiv/luat-cod.lua
index c667f3ecc..0658fca1e 100644
--- a/tex/context/base/mkiv/luat-cod.lua
+++ b/tex/context/base/mkiv/luat-cod.lua
@@ -136,7 +136,7 @@ if LUATEXENGINE == nil then
or (find(status.banner,"LuajitTeX",1,true) and "luajittex" or "luatex")
end
-if LUATEXVERION == nil then
+if LUATEXVERSION == nil then
LUATEXVERSION = status.luatex_revision
LUATEXVERSION = status.luatex_version/100
-- + tonumber(LUATEXVERSION)/1000
@@ -144,15 +144,7 @@ if LUATEXVERION == nil then
end
if CONTEXTLMTXMODE == nil then
- if status.obj_ptr == nil then
- CONTEXTLMTXMODE = 2
- else
- CONTEXTLMTXMODE = 0
- for i=1,#arg do if arg[i] == "--c:lmtx" then
- CONTEXTLMTXMODE, pdf, img = 1, nil, nil
- break
- end end
- end
+ CONTEXTLMTXMODE = LUATEXENGINE == "luametatex" and 1 or 0
end
if LUATEXFUNCTIONALITY == nil then
diff --git a/tex/context/base/mkiv/luat-ini.lua b/tex/context/base/mkiv/luat-ini.lua
index ffd402c77..3d6df530e 100644
--- a/tex/context/base/mkiv/luat-ini.lua
+++ b/tex/context/base/mkiv/luat-ini.lua
@@ -37,7 +37,7 @@ JITSUPPORTED = LUATEXENGINE == "luajittex" or jit
INITEXMODE = status.ini_version
-CONTEXTLMTXMODE = CONTEXTLMTXMODE or (status.obj_ptr == nil and 2 or 1)
+CONTEXTLMTXMODE = CONTEXTLMTXMODE or (LUATEXENGINE == "luametatex" and 1) or 0
function os.setlocale()
-- no need for a message
diff --git a/tex/context/base/mkiv/luat-lib.mkiv b/tex/context/base/mkiv/luat-lib.mkiv
index 666032369..381a60e42 100644
--- a/tex/context/base/mkiv/luat-lib.mkiv
+++ b/tex/context/base/mkiv/luat-lib.mkiv
@@ -95,7 +95,7 @@
\registerctxluafile{luat-env}{}
\registerctxluafile{luat-exe}{} % simplified
\registerctxluafile{luat-iop}{} % simplified
-\registerctxluafile{luat-bwc}{}
+%registerctxluafile{luat-bwc}{}
\registerctxluafile{trac-lmx}{} % might become l-lmx or luat-lmx
\registerctxluafile{luat-mac}{}
%registerctxluafile{luat-prp}{} % for the moment of not much use
diff --git a/tex/context/base/mkiv/luat-run.lua b/tex/context/base/mkiv/luat-run.lua
index ed4d5f5e7..3ec0e131f 100644
--- a/tex/context/base/mkiv/luat-run.lua
+++ b/tex/context/base/mkiv/luat-run.lua
@@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['luat-run'] = {
}
local next = next
-local format, find = string.format, string.find
+local find = string.find
local insert, remove = table.insert, table.remove
local osexit = os.exit
@@ -225,7 +225,8 @@ end
luatex.registerstopactions(luatex.cleanuptempfiles)
--- filenames
+-- Reporting filenames has been simplified since lmtx because we don't need the
+-- traditional () {} <> etc methods (read: that directive option was never chosen).
local report_open = logs.reporter("open source")
local report_close = logs.reporter("close source")
@@ -236,13 +237,15 @@ local register = callbacks.register
local level = 0
local total = 0
local stack = { }
-local all = false
function luatex.currentfile()
return stack[#stack] or tex.jobname
end
-local function report_start(name)
+local function report_start(name,rest)
+ if rest then
+ name = rest -- luatex
+ end
if find(name,"virtual://",1,true) then
insert(stack,false)
else
@@ -265,39 +268,6 @@ local function report_stop()
end
end
-if CONTEXTLMTXMODE < 2 then
-
- local types = {
- "data",
- "font map",
- "image",
- "font subset",
- "full font",
- }
-
- local do_report_start = report_start
- local do_report_stop = report_stop
-
- report_start = function(left,name)
- if not left then
- -- skip
- elseif left ~= 1 then
- if all then
- report_load("type %a, name %a",types[left],name or "?")
- end
- else
- do_report_start(name)
- end
- end
-
- report_stop = function(right)
- if level == 1 or not right or right == 1 then
- do_report_stop()
- end
- end
-
-end
-
local function report_none()
end
@@ -305,17 +275,9 @@ register("start_file",report_start)
register("stop_file", report_stop)
directives.register("system.reportfiles", function(v)
- if v == "noresources" then
- all = false
- register("start_file",report_start)
- register("stop_file", report_stop)
- elseif toboolean(v) or v == "all" then
- all = true
+ if v then
register("start_file",report_start)
register("stop_file", report_stop)
- elseif v == "traditional" then
- register("start_file",nil)
- register("stop_file", nil)
else
register("start_file",report_none)
register("stop_file", report_none)
diff --git a/tex/context/base/mkiv/math-ini.mkiv b/tex/context/base/mkiv/math-ini.mkiv
index 3c27bbf07..b6dcf9ba9 100644
--- a/tex/context/base/mkiv/math-ini.mkiv
+++ b/tex/context/base/mkiv/math-ini.mkiv
@@ -1474,7 +1474,7 @@
\to \everymathematics
\setupmathematics
- [\s!collapsing=3] % mathlist wins over specials
+ [\s!collapsing=\v!none] % was 3 : mathlist wins over specials
%D Math italics (experiment)
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index 75c048c92..6cc468514 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -458,5 +458,7 @@ return {
"compoundhyphenpenalty",
--
"start", "stop",
+ --
+ "unsupportedcs",
}
}
diff --git a/tex/context/base/mkiv/node-fnt.lua b/tex/context/base/mkiv/node-fnt.lua
index 01d7e42e5..25254009f 100644
--- a/tex/context/base/mkiv/node-fnt.lua
+++ b/tex/context/base/mkiv/node-fnt.lua
@@ -43,7 +43,6 @@ local handlers = nodes.handlers
local nuts = nodes.nuts
-local getattr = nuts.getattr
local getid = nuts.getid
local getsubtype = nuts.getsubtype
local getdisc = nuts.getdisc
@@ -51,7 +50,9 @@ local getnext = nuts.getnext
local getprev = nuts.getprev
local getboth = nuts.getboth
local getdata = nuts.getdata
+local getglyphdata = nuts.getglyphdata
----- getdisc = nuts.getdisc
+
local setchar = nuts.setchar
local setlink = nuts.setlink
local setnext = nuts.setnext
@@ -179,7 +180,7 @@ local function start_trace(head)
local char, id = isglyph(n)
if char then
local font = id
- local attr = getattr(n,0) or 0
+ local attr = getglyphdata(n) or 0
report_fonts("font %03i, dynamic %03i, glyph %C",font,attr,char)
elseif id == disc_code then
report_fonts("[disc] %s",nodes.listtoutf(n,true,false,n))
@@ -316,8 +317,8 @@ do
-- metafun manual (with some 2500 single char lists) the difference is just noise.
for n, char, font in nextchar, head do
- -- local attr = (none and prevattr) or getattr(n,0) or 0 -- zero attribute is reserved for fonts in context
- local attr = getattr(n) or 0 -- zero attribute is reserved for fonts in context
+ -- local attr = (none and prevattr) or getglyphdata(n) or 0 -- zero attribute is reserved for fonts in context
+ local attr = getglyphdata(n) or 0 -- zero attribute is reserved for fonts in context
if font ~= prevfont or attr ~= prevattr then
prevfont = font
prevattr = attr
@@ -440,7 +441,7 @@ do
firstnone = nil
basefont = nil
for n, char, font in nextchar, r do
- local attr = getattr(n) or 0 -- zero attribute is reserved for fonts in context
+ local attr = getglyphdata(n) or 0 -- zero attribute is reserved for fonts in context
if font ~= prevfont or attr ~= prevattr then
prevfont = font
prevattr = attr
diff --git a/tex/context/base/mkiv/node-ini.lua b/tex/context/base/mkiv/node-ini.lua
index f910c7e01..8579ce18b 100644
--- a/tex/context/base/mkiv/node-ini.lua
+++ b/tex/context/base/mkiv/node-ini.lua
@@ -364,7 +364,7 @@ dirvalues = allocate(swapped(dirvalues,dirvalues))
gluevalues = allocate(swapped(gluevalues,gluevalues))
literalvalues = allocate(swapped(literalvalues,literalvalues))
-if CONTEXTLMTXMODE > 1 then
+if CONTEXTLMTXMODE > 0 then
whatcodes.literal = 0x1 whatcodes[0x1] = "literal"
whatcodes.latelua = 0x2 whatcodes[0x2] = "latelua"
whatcodes.userdefined = 0x3 whatcodes[0x3] = "userdefined"
diff --git a/tex/context/base/mkiv/node-nut.lua b/tex/context/base/mkiv/node-nut.lua
index 50e87e988..124f64301 100644
--- a/tex/context/base/mkiv/node-nut.lua
+++ b/tex/context/base/mkiv/node-nut.lua
@@ -229,9 +229,13 @@ nuts.getid = direct.getid
nuts.getprev = direct.getprev
nuts.setprev = direct.setprev
-nuts.getattr = direct.get_attribute
-nuts.setattr = direct.set_attribute
-nuts.takeattr = direct.unset_attribute -- ?
+local get_attribute = direct.get_attribute
+local set_attribute = direct.set_attribute
+local unset_attribute = direct.unset_attribute
+
+nuts.getattr = get_attribute
+nuts.setattr = set_attribute
+nuts.takeattr = unset_attribute -- ?
nuts.is_zero_glue = direct.is_zero_glue
nuts.effective_glue = direct.effective_glue
@@ -246,10 +250,13 @@ nuts.setdisc = direct.setdisc
nuts.getdiscretionary = direct.getdisc
nuts.setdiscretionary = direct.setdisc
-nuts.getdata = direct.getdata
-nuts.setdata = direct.setdata
-nuts.getvalue = direct.getdata
-nuts.setvalue = direct.setdata
+local getdata = direct.getdata
+local setdata = direct.setdata
+
+nuts.getdata = getdata
+nuts.setdata = setdata
+nuts.getvalue = getdata
+nuts.setvalue = setdata
nuts.getexpansion = direct.getexpansion
nuts.setexpansion = direct.setexpansion
@@ -264,9 +271,20 @@ nuts.getdepth = direct.getdepth
nuts.setdepth = direct.setdepth
nuts.getshift = direct.getshift
nuts.setshift = direct.setshift
+
+-- lmtx compatibility
+
nuts.getorientation = direct.getorientation or function() end
nuts.setorientation = direct.setorientation or function() end
+nuts.getglyphdata = direct.getglyphdata or get_attribute
+nuts.setglyphdata = direct.setglyphdata or set_attribute
+
+nuts.getruledata = direct.getglyphdata and getdata or function(n) return getfield(n,"transform") end
+nuts.setruledata = direct.setglyphdata and setdata or function(n,d) return setfield(n,"transform",d) end
+
+-- so far
+
nuts.getnucleus = direct.getnucleus
nuts.setnucleus = direct.setnucleus
nuts.getsup = direct.getsup
diff --git a/tex/context/base/mkiv/node-par.lua b/tex/context/base/mkiv/node-par.lua
index 8564c8764..d89edf6f4 100644
--- a/tex/context/base/mkiv/node-par.lua
+++ b/tex/context/base/mkiv/node-par.lua
@@ -39,7 +39,7 @@ local function newgraf(mode,indented)
local runner = actions.runner
if runner then
starttiming(builders)
- indent = runner(mode,indented)
+ indented = runner(mode,indented)
stoptiming(builders)
end
return indented
diff --git a/tex/context/base/mkiv/node-res.lua b/tex/context/base/mkiv/node-res.lua
index 5b4961683..4b8187fa3 100644
--- a/tex/context/base/mkiv/node-res.lua
+++ b/tex/context/base/mkiv/node-res.lua
@@ -96,6 +96,7 @@ local setsubtype = nuts.setsubtype
local setleader = nuts.setleader
local setdata = nuts.setdata
+local setruledata = nuts.setruledata
local setvalue = nuts.setvalue
local copy_nut = nuts.copy
@@ -172,7 +173,7 @@ local savepos = register_nut(new_nut(whatsit_code,whatsitcodes.savepos
local user_node = new_nut(whatsit_code,whatsitcodes.userdefined)
-if CONTEXTLMTXMODE < 2 then
+if CONTEXTLMTXMODE == 0 then
setfield(user_node,"type",usercodes.number)
end
@@ -394,7 +395,7 @@ function nutpool.outlinerule(width,height,depth,line) -- w/h/d == nil will let t
setwhd(n,width,height,depth)
end
if line then
- if CONTEXTLMTXMODE > 1 then setdata(n,line) else setfield(n,"transform",line) end
+ setruledata(n,line)
end
return n
end
@@ -414,11 +415,16 @@ function nutpool.savepos()
return copy_nut(savepos)
end
-if CONTEXTLMTXMODE > 1 then
+if CONTEXTLMTXMODE == 0 then
function nutpool.latelua(code)
local n = copy_nut(latelua)
- nodeproperties[n] = { data = code }
+ if type(code) == "table" then
+ local action = code.action
+ local specification = code.specification or code
+ code = function() action(specification) end
+ end
+ setdata(n,code)
return n
end
@@ -426,12 +432,7 @@ else
function nutpool.latelua(code)
local n = copy_nut(latelua)
- if type(code) == "table" then
- local action = code.action
- local specification = code.specification or code
- code = function() action(specification) end
- end
- setdata(n,code)
+ nodeproperties[n] = { data = code }
return n
end
diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua
index 1df5bf32a..61d78668f 100644
--- a/tex/context/base/mkiv/node-rul.lua
+++ b/tex/context/base/mkiv/node-rul.lua
@@ -30,7 +30,6 @@ local nuts = nodes.nuts
local tonode = nuts.tonode
local tonut = nuts.tonut
-local getfield = nuts.getfield
local setnext = nuts.setnext
local setprev = nuts.setprev
local setlink = nuts.setlink
@@ -50,7 +49,10 @@ local getwidth = nuts.getwidth
local setwidth = nuts.setwidth
local setoffsets = nuts.setoffsets
local setfield = nuts.setfield
-local getdata = nuts.getdata
+
+----- getfield = nuts.getfield
+----- getdata = nuts.getdata
+local getruledata = nuts.getruledata
local isglyph = nuts.isglyph
@@ -166,7 +168,7 @@ rules .ruleactions = ruleactions
nutrules.ruleactions = ruleactions -- convenient
local function mathaction(n,h,v,what)
- local font = CONTEXTLMTXMODE > 1 and getdata(n) or getfield(n,"transform")
+ local font = getruledata(n)
local actions = fontresources[font].mathruleactions
if actions then
local action = actions[what]
diff --git a/tex/context/base/mkiv/node-syn.lua b/tex/context/base/mkiv/node-syn.lua
index a00dc65ec..35fb8fc7c 100644
--- a/tex/context/base/mkiv/node-syn.lua
+++ b/tex/context/base/mkiv/node-syn.lua
@@ -89,7 +89,6 @@ if not modules then modules = { } end modules ['node-syn'] = {
-- h2,5:4661756,12973165:22918783,655360,327680
-- h2,6:27884864,12973165:4746833,655360,327680
-- h2,6:4661756,13922231:18320732,655360,327680
--- )
-- ]
-- !533
-- }1
@@ -106,7 +105,6 @@ if not modules then modules = { } end modules ['node-syn'] = {
-- h3,4:8459505,11075033:19885281,655360,327680
-- h3,5:28571312,11075033:4060385,655360,327680
-- h3,5:4661756,12024099:15344870,655360,327680
--- )
-- ]
-- !441
-- }2
@@ -692,7 +690,8 @@ end
function synctex.stop()
if enabled then
- filehandle:write(s_vlist,s_hlist)
+-- filehandle:write(s_vlist,s_hlist)
+ filehandle:write(s_hlist)
writeanchor()
filehandle:write("}",nofsheets,eol)
nofobjects = nofobjects + 2
diff --git a/tex/context/base/mkiv/pack-rul.mkiv b/tex/context/base/mkiv/pack-rul.mkiv
index 3d03942aa..599547032 100644
--- a/tex/context/base/mkiv/pack-rul.mkiv
+++ b/tex/context/base/mkiv/pack-rul.mkiv
@@ -1723,8 +1723,8 @@
{\setvalue{\??framedlocatorbefore#1}{#2}%
\setvalue{\??framedlocatorafter #1}{#3}}
-\def\pack_framed_locator_before#1{\csname\??framedlocatorbefore#1\endcsname}
-\def\pack_framed_locator_after #1{\csname\??framedlocatorafter #1\endcsname}
+\def\pack_framed_locator_before#1{\begincsname\??framedlocatorbefore#1\endcsname}
+\def\pack_framed_locator_after #1{\begincsname\??framedlocatorafter #1\endcsname}
\newdimen\d_framed_locator_ht
\newdimen\d_framed_locator_dp
diff --git a/tex/context/base/mkiv/page-imp.mkiv b/tex/context/base/mkiv/page-imp.mkiv
index 838ad7421..2f4e9a2f9 100644
--- a/tex/context/base/mkiv/page-imp.mkiv
+++ b/tex/context/base/mkiv/page-imp.mkiv
@@ -136,7 +136,7 @@
{\begingroup
\writestatus\m!system
{\ifarrangingpages arranged \fi page
- \ifarrangingpages\the\arrangeno\else\the\realpageno\fi\normalspace
+ \ifarrangingpages\the\arrangeno\else\the\realpageno\fi\normalspace
not flushed}%
% \setbox\scratchbox\hpack
% {#1}% no finalize
diff --git a/tex/context/base/mkiv/page-inj.mkvi b/tex/context/base/mkiv/page-inj.mkvi
index 5f48ffd13..b1a2913cf 100644
--- a/tex/context/base/mkiv/page-inj.mkvi
+++ b/tex/context/base/mkiv/page-inj.mkvi
@@ -93,7 +93,7 @@
\def\page_injections_direct_indeed_yes#parameters%
{\clf_savepageinjections
- name {\currentpageinjection}%
+ name {\currentpageinjection}%
state {\p_page_injections_state}%
userdata {\normalunexpanded{#parameters}}%
\relax
diff --git a/tex/context/base/mkiv/page-lay.mkiv b/tex/context/base/mkiv/page-lay.mkiv
index 02cc5aa17..f94517144 100644
--- a/tex/context/base/mkiv/page-lay.mkiv
+++ b/tex/context/base/mkiv/page-lay.mkiv
@@ -1340,6 +1340,7 @@
%D \showsetup{showsetups}
%D %showsetup{showmargins}
%D %showsetup{showgrid}
+%D %showsetup{showusage}
\fetchruntimecommand \showprint \f!page_run
\fetchruntimecommand \showframe \f!page_run
@@ -1347,6 +1348,7 @@
\fetchruntimecommand \showsetups \f!page_run
\fetchruntimecommand \showmargins \f!page_run
\fetchruntimecommand \showgrid \f!page_run
+\fetchruntimecommand \showusage \f!page_run
\glet\page_grids_add_to_box\gobbleoneargument
\glet\page_grids_add_to_one\gobbleoneargument
diff --git a/tex/context/base/mkiv/page-run.lua b/tex/context/base/mkiv/page-run.lua
index c0a2022b2..88a7d6664 100644
--- a/tex/context/base/mkiv/page-run.lua
+++ b/tex/context/base/mkiv/page-run.lua
@@ -186,3 +186,38 @@ function commands.showlayout(options)
end
+local report = logs.reporter("usage")
+
+function commands.showusage()
+ report("")
+ report("status after shipping out page %s",tex.getcount("realpageno"))
+ report("")
+ report(" filename : %s", status.filename)
+ report(" inputid : %s", status.inputid)
+ report(" linenumber : %s", status.linenumber)
+ report(" input pointer : %s", status.input_ptr)
+ report("")
+ report(" string pointer : %s of %s", status.str_ptr, status.max_strings + status.init_str_ptr)
+ report(" pool size : %s", status.pool_size)
+ report("")
+ report(" node memory usage : %s of %s", status.node_mem_usage, status.var_mem_max)
+ report(" fixex memory end : %s of %s", status.fix_mem_end, status.fix_mem_max)
+ report("")
+ report(" cs count : %s of %s", status.cs_count, status.hash_size + status.hash_extra)
+ report("")
+ report(" stack size : %s of %s", status.max_in_stack, status.stack_size)
+ report(" nest size : %s of %s", status.max_nest_stack, status.nest_size)
+ report(" parameter size : %s of %s", status.max_param_stack, status.param_size)
+ report(" buffer size : %s of %s", status.max_buf_stack, status.buf_size)
+ report(" save size : %s of %s", status.max_save_stack, status.save_size)
+ report("")
+ report(" luabytecode bytes : %s in %s registers", status.luabytecode_bytes, status.luabytecodes)
+ report(" luastate bytes : %s", status.luastate_bytes)
+ report("")
+ report(" callbacks : %s", status.callbacks)
+ report(" indirect callbacks : %s", status.indirect_callbacks)
+ report(" saved callbacks : %s", status.saved_callbacks)
+ report(" direct callbacks : %s", status.direct_callbacks)
+ report(" function callbacks : %s", status.function_callbacks)
+ report("")
+end
diff --git a/tex/context/base/mkiv/page-run.mkiv b/tex/context/base/mkiv/page-run.mkiv
index 85da8d9e5..eedcfa416 100644
--- a/tex/context/base/mkiv/page-run.mkiv
+++ b/tex/context/base/mkiv/page-run.mkiv
@@ -215,4 +215,10 @@
\global\setbox#1\vpack{\backgroundline[layout:mix]{\box#1}}%
\endgroup}
+%D Ths next command shows some statistics (we might add more in due time):
+
+\unexpanded\gdef\showusage
+ {\gtoksapp\everyaftershipout{\ctxcommand{showusage()}}%
+ \glet\showusage\relax}
+
\protect \endinput
diff --git a/tex/context/base/mkiv/page-txt.mkvi b/tex/context/base/mkiv/page-txt.mkvi
index 97668c143..2f0ac72de 100644
--- a/tex/context/base/mkiv/page-txt.mkvi
+++ b/tex/context/base/mkiv/page-txt.mkvi
@@ -445,11 +445,11 @@
%D The following macro has to be called after a page is flushed.
\unexpanded\def\resetlayouttextlines % public
- {\csname\??layouttextsreset\v!top \endcsname
- \csname\??layouttextsreset\v!header\endcsname
- \csname\??layouttextsreset\v!text \endcsname
- \csname\??layouttextsreset\v!footer\endcsname
- \csname\??layouttextsreset\v!bottom\endcsname
+ {\begincsname\??layouttextsreset\v!top \endcsname
+ \begincsname\??layouttextsreset\v!header\endcsname
+ \begincsname\??layouttextsreset\v!text \endcsname
+ \begincsname\??layouttextsreset\v!footer\endcsname
+ \begincsname\??layouttextsreset\v!bottom\endcsname
\ifconditional\resyncaftertextline
\calculateglobalvsizes
\page_backgrounds_recalculate
diff --git a/tex/context/base/mkiv/scrp-ini.lua b/tex/context/base/mkiv/scrp-ini.lua
index e6aa5f072..d76b64133 100644
--- a/tex/context/base/mkiv/scrp-ini.lua
+++ b/tex/context/base/mkiv/scrp-ini.lua
@@ -57,8 +57,11 @@ local getnext = nuts.getnext
local getchar = nuts.getchar
local getfont = nuts.getfont
local getid = nuts.getid
+local getglyphdata = nuts.getglyphdata
+
local getattr = nuts.getattr
local setattr = nuts.setattr
+
local isglyph = nuts.isglyph
local insert_node_after = nuts.insert_after
@@ -894,7 +897,7 @@ function autofontfeature.handler(head)
-- else
local script = otfscripts[char]
if script then
- local dynamic = getattr(n,0) or 0
+ local dynamic = getglyphdata(n) or 0
if dynamic > 0 then
local slot = cache_yes[font]
local attr = slot[script]
diff --git a/tex/context/base/mkiv/spac-hor.mkiv b/tex/context/base/mkiv/spac-hor.mkiv
index 24c7c7893..c0c7d95d2 100644
--- a/tex/context/base/mkiv/spac-hor.mkiv
+++ b/tex/context/base/mkiv/spac-hor.mkiv
@@ -38,8 +38,14 @@
\unexpanded\def\setupindenting
{\doifelsenextoptionalcs\spac_indentation_setup_options\spac_indentation_setup_size}
+% \unexpanded\def\spac_indentation_setup_size
+% {\assigndimension\v_spac_indentation_current\d_spac_indentation_par{1\emwidth}{1.5\emwidth}{2\emwidth}}
+
\unexpanded\def\spac_indentation_setup_size
- {\assigndimension\v_spac_indentation_current\d_spac_indentation_par{1\emwidth}{1.5\emwidth}{2\emwidth}}
+ {\assigndimension\v_spac_indentation_current\d_spac_indentation_par{1\emwidth}{1.5\emwidth}{2\emwidth}%
+ \ifdim\parindent=\zeropoint\else
+ \parindent\d_spac_indentation_par\relax % new per 2019-04-12 : just in case it has been set beforehand
+ \fi}
\let\synchronizeindenting\spac_indentation_setup_size
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index faae4787a..bf34fe167 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 622b5fbe7..bab191ca1 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-pag.lua b/tex/context/base/mkiv/strc-pag.lua
index ee1b245b9..a9933a21f 100644
--- a/tex/context/base/mkiv/strc-pag.lua
+++ b/tex/context/base/mkiv/strc-pag.lua
@@ -45,10 +45,21 @@ pages.collected = collected
pages.tobesaved = tobesaved
pages.nofpages = 0
+-- utilitydata.structures.counters.collected.realpage[1]
+
local function initializer()
collected = pages.collected
tobesaved = pages.tobesaved
- pages.nofpages = #collected
+ -- tricky, with pageinjection we can have holes
+ -- pages.nofpages = #collected
+ -- pages.nofpages = table.count(collected) -- could be a helper
+ local n = 0
+ for k in next, collected do
+ if k > n then
+ n = k
+ end
+ end
+ pages.nofpages = n
end
job.register('structures.pages.collected', tobesaved, initializer)
diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv
index 7ce48c79f..7c77ec97e 100644
--- a/tex/context/base/mkiv/syst-ini.mkiv
+++ b/tex/context/base/mkiv/syst-ini.mkiv
@@ -1002,7 +1002,7 @@
\spanomit \advance\mscount\minusone
\repeat}
-%D Backend:
+%D For the \LUATEX\ backend (overloaded anyway):
\ifdefined\pdfvariable
diff --git a/tex/context/base/mkiv/tabl-tbl.mkiv b/tex/context/base/mkiv/tabl-tbl.mkiv
index f3c2e2e10..fb7e283cd 100644
--- a/tex/context/base/mkiv/tabl-tbl.mkiv
+++ b/tex/context/base/mkiv/tabl-tbl.mkiv
@@ -909,7 +909,7 @@
\let\tabl_tabulate_hook\tabl_tabulate_hook_nop
-\def\tabl_tabulate_hook_yes{\csname\??tabulatehook\the\c_tabl_tabulate_column\endcsname}
+\def\tabl_tabulate_hook_yes{\begincsname\??tabulatehook\the\c_tabl_tabulate_column\endcsname}
\def\tabl_tabulate_pheight_reset
{\global\c_tabl_tabulate_plines_min\plusone
@@ -1090,12 +1090,12 @@
\def\tabl_tabulate_insert_head_content
{\tabulatenoalign{\global\settrue\c_tabl_tabulate_someamble}%
- \csname\??tabulatehead\currenttabulation\endcsname
+ \begincsname\??tabulatehead\currenttabulation\endcsname
\tabulatenoalign{\global\setfalse\c_tabl_tabulate_someamble}}%
\def\tabl_tabulate_insert_foot_content
{\tabulatenoalign{\global\settrue\c_tabl_tabulate_someamble}%
- \csname\??tabulatefoot\currenttabulation\endcsname
+ \begincsname\??tabulatefoot\currenttabulation\endcsname
\tabulatenoalign{\global\setfalse\c_tabl_tabulate_someamble}}%
\def\tabl_tabulate_check_full_content % - needed, else confusion with \c!header
@@ -1364,7 +1364,7 @@
\fi
%
\settrue\c_tabl_tabulate_split
- \csname\??tabulatesplit\tabulationparameter\c!split\endcsname
+ \begincsname\??tabulatesplit\tabulationparameter\c!split\endcsname
%
\let\m_tabl_tabulate_blank_default\p_blank
%
diff --git a/tex/context/base/mkiv/toks-ini.lua b/tex/context/base/mkiv/toks-ini.lua
index 2c85a5754..2a288caf6 100644
--- a/tex/context/base/mkiv/toks-ini.lua
+++ b/tex/context/base/mkiv/toks-ini.lua
@@ -61,14 +61,6 @@ local new_token = token.new
local is_defined = token.is_defined
local is_token = token.is_token
-if not is_defined then
-
- is_defined = function(name)
- return get_cmdname(create_token(name)) ~= "undefined_cs"
- end
-
-end
-
tokens.new = new_token
tokens.create = create_token
tokens.istoken = is_token
@@ -104,14 +96,10 @@ local bits = {
tokens.bits = bits
-local space_bits = bits.space
-
-- words are space or \relax terminated and the trailing space is gobbled; a word
--- can contain any non-space letter/other
+-- can contain any non-space letter/other (see archive for implementation in lua)
-local t = { } -- small optimization, a shared variable that is not reset
-
-if scan_word then
+if not scan_number then
scan_number = function(base)
local s = scan_word()
@@ -124,70 +112,8 @@ if scan_word then
end
end
-else
-
- scan_word = function()
- local n = 0
- while true do
- local c = scan_code()
- if c then
- n = n + 1
- t[n] = utfchar(c)
- elseif scan_code(space_bits) then
- if n > 0 then
- break
- end
- elseif n > 0 then
- break
- else
- return
- end
- end
- return concat(t,"",1,n)
- end
-
- -- so we gobble the space (like scan_int) (number has to be space or non-char terminated
- -- as we accept 0xabcd and such so there is no clear separator for a keyword
-
- scan_number = function(base)
- local n = 0
- while true do
- local c = scan_code()
- if c then
- n = n + 1
- t[n] = char(c)
- elseif scan_code(space_bits) then
- if n > 0 then
- break
- end
- elseif n > 0 then
- break
- else
- return
- end
- end
- local s = concat(t,"",1,n)
- if base then
- return tonumber(s,base)
- else
- return tonumber(s)
- end
- end
-
end
--- -- the next one cannot handle \iftrue true\else false\fi
---
--- local function scan_boolean()
--- if scan_keyword("true") then
--- return true
--- elseif scan_keyword("false") then
--- return false
--- else
--- return nil
--- end
--- end
-
local function scan_boolean()
local kw = scan_word()
if kw == "true" then
@@ -199,16 +125,6 @@ local function scan_boolean()
end
end
-if not scan_csname then
-
- scan_csname = function()
- local t = get_next()
- local n = t.csname
- return n ~= "" and n or nil
- end
-
-end
-
local function scan_verbatim()
return scan_argument(false)
end
diff --git a/tex/context/base/mkiv/trac-ctx.lua b/tex/context/base/mkiv/trac-ctx.lua
index 33637fd66..6681be51c 100644
--- a/tex/context/base/mkiv/trac-ctx.lua
+++ b/tex/context/base/mkiv/trac-ctx.lua
@@ -70,3 +70,17 @@ implement {
install(texdirectives,directives.register,tag,enable,disable)
end,
}
+
+-- this one might move
+
+interfaces.implement {
+ name = "unsupportedcs",
+ public = true,
+ actions = function()
+ logs.newline()
+ logs.report("fatal error","unsupported cs \\%s",tokens.scanners.csname())
+ logs.newline()
+ luatex.abort()
+ end
+}
+
diff --git a/tex/context/base/mkiv/trac-tex.mkiv b/tex/context/base/mkiv/trac-tex.mkiv
index 4c2db68f3..d659f4bab 100644
--- a/tex/context/base/mkiv/trac-tex.mkiv
+++ b/tex/context/base/mkiv/trac-tex.mkiv
@@ -32,8 +32,8 @@
\unexpanded\def\enabletextracers [#1]{\processcommalist[#1]\syst_textracers_enable }
\unexpanded\def\disabletextracers[#1]{\processcommalist[#1]\syst_textracers_disable}
-\def\syst_textracers_enable #1{\csname enabletracer#1\endcsname}
-\def\syst_textracers_disable#1{\csname disabletracer#1\endcsname}
+\def\syst_textracers_enable #1{\begincsname enabletracer#1\endcsname}
+\def\syst_textracers_disable#1{\begincsname disabletracer#1\endcsname}
% The next one is for Taco, although we can use directives as well:
diff --git a/tex/context/base/mkiv/typo-drp.lua b/tex/context/base/mkiv/typo-drp.lua
index 9a59891e1..6ac59d00c 100644
--- a/tex/context/base/mkiv/typo-drp.lua
+++ b/tex/context/base/mkiv/typo-drp.lua
@@ -45,6 +45,7 @@ local setchar = nuts.setchar
local setwhd = nuts.setwhd
local setkern = nuts.setkern
local setoffsets = nuts.setoffsets
+local setglyphdata = nuts.setglyphdata
local hpack_nodes = nuts.hpack
@@ -257,7 +258,7 @@ actions[v_default] = function(head,setting)
setfont(current,font)
end
if dynamic > 0 then
- setattr(current,0,dynamic)
+ setglyphdata(current,dynamic)
end
-- apply font
diff --git a/tex/context/base/mkiv/typo-drp.mkiv b/tex/context/base/mkiv/typo-drp.mkiv
index 183925108..917b4255b 100644
--- a/tex/context/base/mkiv/typo-drp.mkiv
+++ b/tex/context/base/mkiv/typo-drp.mkiv
@@ -112,7 +112,7 @@
ca \attribute\colorattribute
ta \attribute\transparencyattribute
font \fontid\font
- dynamic \attribute\zerocount % it's a bit over the top to support this here
+ dynamic \font_dynamic_value % it's a bit over the top to support this here
\relax
\stopluacode
\kern\zeropoint % we need a node
diff --git a/tex/context/base/mkiv/typo-fln.lua b/tex/context/base/mkiv/typo-fln.lua
index 048980732..13a990e26 100644
--- a/tex/context/base/mkiv/typo-fln.lua
+++ b/tex/context/base/mkiv/typo-fln.lua
@@ -47,6 +47,7 @@ local getdisc = nuts.getdisc
local setdisc = nuts.setdisc
local setlink = nuts.setlink
local setfont = nuts.setfont
+local setglyphdata = nuts.setglyphdata
local nodecodes = nodes.nodecodes
local glyph_code = nodecodes.glyph
@@ -135,10 +136,10 @@ actions[v_line] = function(head,setting)
local temp = copy_node_list(head)
local linebreaks = { }
- local function set(head)
+ set = function(head)
for g in nextglyph, head do
if dynamic > 0 then
- setattr(g,0,dynamic)
+ setglyphdata(g,dynamic)
end
setfont(g,font)
end
@@ -234,7 +235,7 @@ actions[v_line] = function(head,setting)
local function update(start)
if dynamic > 0 then
- setattr(start,0,dynamic)
+ setglyphdata(start,dynamic)
end
setfont(start,font)
if ca and ca > 0 then
@@ -348,7 +349,7 @@ actions[v_word] = function(head,setting)
setattr(start,a_transparency,ta)
end
if dynamic > 0 then
- setattr(start,0,dynamic)
+ setglyphdata(start,dynamic)
end
setfont(start,font)
elseif id == disc_code then
diff --git a/tex/context/base/mkiv/typo-fln.mkiv b/tex/context/base/mkiv/typo-fln.mkiv
index 533c197cd..bcf67af9b 100644
--- a/tex/context/base/mkiv/typo-fln.mkiv
+++ b/tex/context/base/mkiv/typo-fln.mkiv
@@ -86,7 +86,7 @@
ta \attribute\transparencyattribute
n \numexpr\firstlineparameter\c!n\relax
font \fontid\font
- dynamic \attribute\zerocount
+ dynamic \font_dynamic_value
\relax
\kern\zeropoint % we need a node
% \hskip\zeropoint\s!plus\emwidth\relax % can be an option
diff --git a/tex/context/base/mkiv/typo-inj.mkiv b/tex/context/base/mkiv/typo-inj.mkiv
index 3b77379b3..633d430e4 100644
--- a/tex/context/base/mkiv/typo-inj.mkiv
+++ b/tex/context/base/mkiv/typo-inj.mkiv
@@ -73,8 +73,8 @@
\setuxvalue{typo_injectors_check_#1}{\noexpand\clf_checkinjector{#1}}}
\unexpanded\def\dotestinjector#1% only for testing outside unprotect
- {\csname typo_injectors_check_#1\endcsname
- \csname typo_injectors_mark_#1\endcsname}
+ {\begincsname typo_injectors_check_#1\endcsname
+ \begincsname typo_injectors_mark_#1\endcsname}
\protect \endinput
diff --git a/tex/context/base/mkiv/typo-krn.lua b/tex/context/base/mkiv/typo-krn.lua
index c26004a49..c7edf4055 100644
--- a/tex/context/base/mkiv/typo-krn.lua
+++ b/tex/context/base/mkiv/typo-krn.lua
@@ -40,8 +40,9 @@ local getchar = nuts.getchar
local getdisc = nuts.getdisc
local getglue = nuts.getglue
local getkern = nuts.getkern
+local getglyphdata = nuts.getglyphdata
+
local isglyph = nuts.isglyph
-local setchar = nuts.setchar
local setfield = nuts.setfield
local getattr = nuts.getattr
@@ -51,12 +52,12 @@ local setlink = nuts.setlink
local setdisc = nuts.setdisc
local setglue = nuts.setglue
local setkern = nuts.setkern
+local setchar = nuts.setchar
+local setglue = nuts.setglue -- todo
local texsetattribute = tex.setattribute
local unsetvalue = attributes.unsetvalue
-local setglue = nuts.setglue -- todo
-
local new_kern = nodepool.kern
local new_glue = nodepool.glue
@@ -139,7 +140,7 @@ local gluefactor = 4 -- assumes quad = .5 enspace
function kerns.keepligature(n) -- might become default
local f = getfont(n)
- local a = getattr(n,0) or 0
+ local a = getglyphdata(n) or 0
if trace_ligatures then
local c = getchar(n)
local d = fontdescriptions[f][c].name
diff --git a/tex/context/base/mkiv/util-lua.lua b/tex/context/base/mkiv/util-lua.lua
index 1199301f4..f7e6e4f31 100644
--- a/tex/context/base/mkiv/util-lua.lua
+++ b/tex/context/base/mkiv/util-lua.lua
@@ -30,9 +30,9 @@ luautilities.strippedchunks = strippedchunks
luautilities.suffixes = {
tma = "tma",
- tmc = jit and "tmb" or "tmc",
+ tmc = (CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 and "tmd") or (jit and "tmb") or "tmc",
lua = "lua",
- luc = jit and "lub" or "luc",
+ luc = (CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 and "lud") or (jit and "lub") or "luc",
lui = "lui",
luv = "luv",
luj = "luj",
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 1c790c10b..4b47392f8 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 d713701b0..d21f00223 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-basics-nod.lua b/tex/generic/context/luatex/luatex-basics-nod.lua
index 879da4bc7..9e035efa6 100644
--- a/tex/generic/context/luatex/luatex-basics-nod.lua
+++ b/tex/generic/context/luatex/luatex-basics-nod.lua
@@ -203,6 +203,9 @@ nuts.setsplit = direct.setsplit
nuts.setsubtype = direct.setsubtype
nuts.setwidth = direct.setwidth
+nuts.getglyphdata = direct.getattr
+nuts.setglyphdata = direct.setattr
+
nuts.is_char = direct.is_char
nuts.is_glyph = direct.is_glyph
nuts.ischar = direct.is_char
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 6a8a418bd..462cd6a2e 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 : 04/04/19 13:31:02
+-- merge date : 04/12/19 17:43:58
do -- begin closure to overcome local limits and interference
@@ -4873,6 +4873,8 @@ nuts.setprev=direct.setprev
nuts.setsplit=direct.setsplit
nuts.setsubtype=direct.setsubtype
nuts.setwidth=direct.setwidth
+nuts.getglyphdata=direct.getattr
+nuts.setglyphdata=direct.setattr
nuts.is_char=direct.is_char
nuts.is_glyph=direct.is_glyph
nuts.ischar=direct.is_char
@@ -17931,6 +17933,7 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
classdef1=readclassdef(f,tableoffset+classdef1,coverage)
classdef2=readclassdef(f,tableoffset+classdef2,nofglyphs)
local usedcoverage={}
+local shared={}
for g1,c1 in next,classdef1 do
if coverage[g1] then
local l1=classlist[c1]
@@ -17942,7 +17945,17 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
local first=offsets[1]
local second=offsets[2]
if first or second then
- hash[paired]={ first,second or nil }
+local s1=shared[first]
+if not s1 then
+ s1={}
+ shared[first]=s1
+end
+local s2=s1[second]
+if not s2 then
+ s2={ first,second or nil }
+ s1[second]=s2
+end
+hash[paired]=s2
else
end
end
@@ -25572,8 +25585,6 @@ local setprev=nuts.setprev
local getboth=nuts.getboth
local setboth=nuts.setboth
local getid=nuts.getid
-local getattr=nuts.getattr
-local setattr=nuts.setattr
local getprop=nuts.getprop
local setprop=nuts.setprop
local getsubtype=nuts.getsubtype
@@ -25586,6 +25597,8 @@ local setlink=nuts.setlink
local getcomponents=nuts.getcomponents
local setcomponents=nuts.setcomponents
local getwidth=nuts.getwidth
+local getattr=nuts.getattr
+local getglyphdata=nuts.getglyphdata
local ischar=nuts.is_char
local isglyph=nuts.isglyph
local usesfont=nuts.uses_font
@@ -28189,7 +28202,7 @@ local function c_run_single(head,font,attr,lookupcache,step,dataset,sequence,rlm
if char then
local a
if attr then
- a=getattr(start,0)
+ a=getglyphdata(start)
end
if not a or (a==attr) then
local lookupmatch=lookupcache[char]
@@ -28223,7 +28236,7 @@ local function t_run_single(start,stop,font,attr,lookupcache)
if char then
local a
if attr then
- a=getattr(start,0)
+ a=getglyphdata(start)
end
local startnext=getnext(start)
if not a or (a==attr) then
@@ -28298,7 +28311,7 @@ end
local function k_run_single(sub,injection,last,font,attr,lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
local a
if attr then
- a=getattr(sub,0)
+ a=getglyphdata(sub)
end
if not a or (a==attr) then
for n in nextnode,sub do
@@ -28332,7 +28345,7 @@ local function c_run_multiple(head,font,attr,steps,nofsteps,dataset,sequence,rlm
if char then
local a
if attr then
- a=getattr(start,0)
+ a=getglyphdata(start)
end
if not a or (a==attr) then
for i=1,nofsteps do
@@ -28373,7 +28386,7 @@ local function t_run_multiple(start,stop,font,attr,steps,nofsteps)
if char then
local a
if attr then
- a=getattr(start,0)
+ a=getglyphdata(start)
end
local startnext=getnext(start)
if not a or (a==attr) then
@@ -28451,7 +28464,7 @@ end
local function k_run_multiple(sub,injection,last,font,attr,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
local a
if attr then
- a=getattr(sub,0)
+ a=getglyphdata(sub)
end
if not a or (a==attr) then
for n in nextnode,sub do
@@ -28602,7 +28615,7 @@ do
if m then
local a
if attr then
- a=getattr(start,0)
+ a=getglyphdata(start)
end
if not a or (a==attr) then
for i=m[1],m[2] do
@@ -28646,7 +28659,7 @@ do
if lookupmatch then
local a
if attr then
- if getattr(start,0)==attr and (not attribute or getprop(start,a_state)==attribute) then
+ if getglyphdata(start)==attr and (not attribute or getprop(start,a_state)==attribute) then
a=true
end
elseif not attribute or getprop(start,a_state)==attribute then
@@ -28702,7 +28715,7 @@ do
if m then
local a
if attr then
- if getattr(start,0)==attr and (not attribute or getprop(start,a_state)==attribute) then
+ if getglyphdata(start)==attr and (not attribute or getprop(start,a_state)==attribute) then
a=true
end
elseif not attribute or getprop(start,a_state)==attribute then
@@ -33517,7 +33530,7 @@ end -- closure
do -- begin closure to overcome local limits and interference
-if not modules then modules={} end modules ['font-tfm']={
+if not modules then modules={} end modules ['luatex-fonts-tfm']={
version=1.001,
comment="companion to font-ini.mkiv",
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
@@ -33553,7 +33566,7 @@ local registertfmenhancer=tfmenhancers.register
local charcommand=helpers.commands.char
constructors.resolvevirtualtoo=false
fonts.formats.tfm="type1"
-fonts.formats.ofm="type1"
+fonts.formats.ofm="type1"
function tfm.setfeatures(tfmdata,features)
local okay=constructors.initializefeatures("tfm",tfmdata,features,trace_features,report_tfm)
if okay then
@@ -33562,191 +33575,156 @@ function tfm.setfeatures(tfmdata,features)
return {}
end
end
-local depth={}
-local read_from_tfm,check_tfm do
- local tfmreaders=context and tfm.readers
- local loadtfmvf=tfmreaders and tfmreaders.loadtfmvf
- local loadtfm=font.read_tfm
- local loadvf=font.read_vf
- directives.register("fonts.tfm.builtin",function(v)
- loadtfmvf=tfmreaders and tfmreaders.loadtfmvf
- if v and loadtfm then
- loadtfmvf=false
- end
- end)
- read_from_tfm=function(specification)
- local filename=specification.filename
- local size=specification.size
- depth[filename]=(depth[filename] or 0)+1
- if trace_defining then
- report_defining("loading tfm file %a at size %s",filename,size)
- end
- local tfmdata
- if loadtfmvf then
- tfmdata=loadtfmvf(filename,size)
- else
- tfmdata=loadtfm(filename,size)
+local depth={}
+local loadtfm=font.read_tfm
+local loadvf=font.read_vf
+local function read_from_tfm(specification)
+ local filename=specification.filename
+ local size=specification.size
+ depth[filename]=(depth[filename] or 0)+1
+ if trace_defining then
+ report_defining("loading tfm file %a at size %s",filename,size)
+ end
+ local tfmdata=loadtfm(filename,size)
+ if tfmdata then
+ local features=specification.features and specification.features.normal or {}
+ local features=constructors.checkedfeatures("tfm",features)
+ specification.features.normal=features
+ local newtfmdata=(depth[filename]==1) and tfm.reencode(tfmdata,specification)
+ if newtfmdata then
+ tfmdata=newtfmdata
end
- if tfmdata then
- local features=specification.features and specification.features.normal or {}
- local features=constructors.checkedfeatures("tfm",features)
- specification.features.normal=features
- local newtfmdata=(depth[filename]==1) and tfm.reencode(tfmdata,specification)
- if newtfmdata then
- tfmdata=newtfmdata
- end
- local resources=tfmdata.resources or {}
- local properties=tfmdata.properties or {}
- local parameters=tfmdata.parameters or {}
- local shared=tfmdata.shared or {}
- shared.features=features
- shared.resources=resources
- properties.name=tfmdata.name
- properties.fontname=tfmdata.fontname
- properties.psname=tfmdata.psname
- properties.fullname=tfmdata.fullname
- properties.filename=specification.filename
- properties.format=tfmdata.format or fonts.formats.tfm
- properties.usedbitmap=tfmdata.usedbitmap
- tfmdata.properties=properties
- tfmdata.resources=resources
- tfmdata.parameters=parameters
- tfmdata.shared=shared
- shared.rawdata={ resources=resources }
- shared.features=features
- if newtfmdata then
- if not resources.marks then
- resources.marks={}
- end
- if not resources.sequences then
- resources.sequences={}
- end
- if not resources.features then
- resources.features={
- gsub={},
- gpos={},
- }
- end
- if not tfmdata.changed then
- tfmdata.changed={}
- end
- if not tfmdata.descriptions then
- tfmdata.descriptions=tfmdata.characters
- end
- otf.readers.addunicodetable(tfmdata)
- tfmenhancers.apply(tfmdata,filename)
- constructors.applymanipulators("tfm",tfmdata,features,trace_features,report_tfm)
- otf.readers.unifymissing(tfmdata)
- fonts.mappings.addtounicode(tfmdata,filename)
- tfmdata.tounicode=1
- local tounicode=fonts.mappings.tounicode
- for unicode,v in next,tfmdata.characters do
- local u=v.unicode
- if u then
- v.tounicode=tounicode(u)
- end
- end
- if tfmdata.usedbitmap then
- tfm.addtounicode(tfmdata)
- end
- end
- shared.processes=next(features) and tfm.setfeatures(tfmdata,features) or nil
- if size<0 then
- size=idiv(65536*-size,100)
- end
- parameters.factor=1
- parameters.units=1000
- parameters.size=size
- parameters.slant=parameters.slant or parameters[1] or 0
- parameters.space=parameters.space or parameters[2] or 0
- parameters.space_stretch=parameters.space_stretch or parameters[3] or 0
- parameters.space_shrink=parameters.space_shrink or parameters[4] or 0
- parameters.x_height=parameters.x_height or parameters[5] or 0
- parameters.quad=parameters.quad or parameters[6] or 0
- parameters.extra_space=parameters.extra_space or parameters[7] or 0
- constructors.enhanceparameters(parameters)
- properties.private=properties.private or tfmdata.private or privateoffset
- if newtfmdata then
- elseif loadtfmvf then
- local fonts=tfmdata.fonts
- if fonts then
- for i=1,#fonts do
- local font=fonts[i]
- local id=font.id
- if not id then
- local name=font.name
- local size=font.size
- if name and size then
- local data,id=constructors.readanddefine(name,size)
- if id then
- font.id=id
- font.name=nil
- font.size=nil
- end
- end
- end
- end
- end
- elseif constructors.resolvevirtualtoo then
- fonts.loggers.register(tfmdata,file.suffix(filename),specification)
- local vfname=findbinfile(specification.name,'ovf')
- if vfname and vfname~="" then
- local vfdata=loadvf(vfname,size)
- if vfdata then
- local chars=tfmdata.characters
- for k,v in next,vfdata.characters do
- chars[k].commands=v.commands
- end
- properties.virtualized=true
- tfmdata.fonts=vfdata.fonts
- tfmdata.type="virtual"
- local fontlist=vfdata.fonts
- local name=file.nameonly(filename)
- for i=1,#fontlist do
- local n=fontlist[i].name
- local s=fontlist[i].size
- local d=depth[filename]
- s=constructors.scaled(s,vfdata.designsize)
- if d>tfm.maxnestingdepth then
- report_defining("too deeply nested virtual font %a with size %a, max nesting depth %s",n,s,tfm.maxnestingdepth)
- fontlist[i]={ id=0 }
- elseif (d>1) and (s>tfm.maxnestingsize) then
- report_defining("virtual font %a exceeds size %s",n,s)
- fontlist[i]={ id=0 }
- else
- local t,id=constructors.readanddefine(n,s)
- fontlist[i]={ id=id }
- end
+ local resources=tfmdata.resources or {}
+ local properties=tfmdata.properties or {}
+ local parameters=tfmdata.parameters or {}
+ local shared=tfmdata.shared or {}
+ shared.features=features
+ shared.resources=resources
+ properties.name=tfmdata.name
+ properties.fontname=tfmdata.fontname
+ properties.psname=tfmdata.psname
+ properties.fullname=tfmdata.fullname
+ properties.filename=specification.filename
+ properties.format=tfmdata.format or fonts.formats.tfm
+ properties.usedbitmap=tfmdata.usedbitmap
+ tfmdata.properties=properties
+ tfmdata.resources=resources
+ tfmdata.parameters=parameters
+ tfmdata.shared=shared
+ shared.rawdata={ resources=resources }
+ shared.features=features
+ if newtfmdata then
+ if not resources.marks then
+ resources.marks={}
+ end
+ if not resources.sequences then
+ resources.sequences={}
+ end
+ if not resources.features then
+ resources.features={
+ gsub={},
+ gpos={},
+ }
+ end
+ if not tfmdata.changed then
+ tfmdata.changed={}
+ end
+ if not tfmdata.descriptions then
+ tfmdata.descriptions=tfmdata.characters
+ end
+ otf.readers.addunicodetable(tfmdata)
+ tfmenhancers.apply(tfmdata,filename)
+ constructors.applymanipulators("tfm",tfmdata,features,trace_features,report_tfm)
+ otf.readers.unifymissing(tfmdata)
+ fonts.mappings.addtounicode(tfmdata,filename)
+ tfmdata.tounicode=1
+ local tounicode=fonts.mappings.tounicode
+ for unicode,v in next,tfmdata.characters do
+ local u=v.unicode
+ if u then
+ v.tounicode=tounicode(u)
+ end
+ end
+ if tfmdata.usedbitmap then
+ tfm.addtounicode(tfmdata)
+ end
+ end
+ shared.processes=next(features) and tfm.setfeatures(tfmdata,features) or nil
+ if size<0 then
+ size=idiv(65536*-size,100)
+ end
+ parameters.factor=1
+ parameters.units=1000
+ parameters.size=size
+ parameters.slant=parameters.slant or parameters[1] or 0
+ parameters.space=parameters.space or parameters[2] or 0
+ parameters.space_stretch=parameters.space_stretch or parameters[3] or 0
+ parameters.space_shrink=parameters.space_shrink or parameters[4] or 0
+ parameters.x_height=parameters.x_height or parameters[5] or 0
+ parameters.quad=parameters.quad or parameters[6] or 0
+ parameters.extra_space=parameters.extra_space or parameters[7] or 0
+ constructors.enhanceparameters(parameters)
+ properties.private=properties.private or tfmdata.private or privateoffset
+ if newtfmdata then
+ elseif constructors.resolvevirtualtoo then
+ fonts.loggers.register(tfmdata,file.suffix(filename),specification)
+ local vfname=findbinfile(specification.name,'ovf')
+ if vfname and vfname~="" then
+ local vfdata=loadvf(vfname,size)
+ if vfdata then
+ local chars=tfmdata.characters
+ for k,v in next,vfdata.characters do
+ chars[k].commands=v.commands
+ end
+ properties.virtualized=true
+ tfmdata.fonts=vfdata.fonts
+ tfmdata.type="virtual"
+ local fontlist=vfdata.fonts
+ local name=file.nameonly(filename)
+ for i=1,#fontlist do
+ local n=fontlist[i].name
+ local s=fontlist[i].size
+ local d=depth[filename]
+ s=constructors.scaled(s,vfdata.designsize)
+ if d>tfm.maxnestingdepth then
+ report_defining("too deeply nested virtual font %a with size %a, max nesting depth %s",n,s,tfm.maxnestingdepth)
+ fontlist[i]={ id=0 }
+ elseif (d>1) and (s>tfm.maxnestingsize) then
+ report_defining("virtual font %a exceeds size %s",n,s)
+ fontlist[i]={ id=0 }
+ else
+ local t,id=constructors.readanddefine(n,s)
+ fontlist[i]={ id=id }
end
end
end
end
- properties.haskerns=true
- properties.hasligatures=true
- properties.hasitalics=true
- resources.unicodes={}
- resources.lookuptags={}
- depth[filename]=depth[filename]-1
- return tfmdata
- else
- depth[filename]=depth[filename]-1
end
+ properties.haskerns=true
+ properties.hasligatures=true
+ properties.hasitalics=true
+ resources.unicodes={}
+ resources.lookuptags={}
+ depth[filename]=depth[filename]-1
+ return tfmdata
+ else
+ depth[filename]=depth[filename]-1
end
- check_tfm=function(specification,fullname)
- local foundname=findbinfile(fullname,'tfm') or ""
- if foundname=="" then
- foundname=findbinfile(fullname,'ofm') or ""
- end
- if foundname=="" then
- foundname=fonts.names.getfilename(fullname,"tfm") or ""
- end
- if foundname~="" then
- specification.filename=foundname
- specification.format="ofm"
- return read_from_tfm(specification)
- elseif trace_defining then
- report_defining("loading tfm with name %a fails",specification.name)
- end
+end
+local function check_tfm(specification,fullname)
+ local foundname=findbinfile(fullname,'tfm') or ""
+ if foundname=="" then
+ foundname=findbinfile(fullname,'ofm') or ""
+ end
+ if foundname=="" then
+ foundname=fonts.names.getfilename(fullname,"tfm") or ""
+ end
+ if foundname~="" then
+ specification.filename=foundname
+ specification.format="ofm"
+ return read_from_tfm(specification)
+ elseif trace_defining then
+ report_defining("loading tfm with name %a fails",specification.name)
end
end
readers.check_tfm=check_tfm
diff --git a/tex/generic/context/luatex/luatex-fonts-tfm.lua b/tex/generic/context/luatex/luatex-fonts-tfm.lua
new file mode 100644
index 000000000..0b6e09a8f
--- /dev/null
+++ b/tex/generic/context/luatex/luatex-fonts-tfm.lua
@@ -0,0 +1,654 @@
+if not modules then modules = { } end modules ['luatex-fonts-tfm'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This is the generic tfm/vf loader. There are no fundamental differences with
+-- the one used in ConTeXt but we save some byte(codes) this way.
+
+local next, type = next, type
+local match, format = string.match, string.format
+local concat, sortedhash = table.concat, table.sortedhash
+local idiv = number.idiv
+
+local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
+local trace_features = false trackers.register("tfm.features", function(v) trace_features = v end)
+
+local report_defining = logs.reporter("fonts","defining")
+local report_tfm = logs.reporter("fonts","tfm loading")
+
+local findbinfile = resolvers.findbinfile
+local setmetatableindex = table.setmetatableindex
+
+local fonts = fonts
+local handlers = fonts.handlers
+local helpers = fonts.helpers
+local readers = fonts.readers
+local constructors = fonts.constructors
+local encodings = fonts.encodings
+
+local tfm = constructors.handlers.tfm
+tfm.version = 1.000
+tfm.maxnestingdepth = 5
+tfm.maxnestingsize = 65536*1024
+
+local otf = fonts.handlers.otf
+local otfenhancers = otf.enhancers
+
+local tfmfeatures = constructors.features.tfm
+local registertfmfeature = tfmfeatures.register
+
+local tfmenhancers = constructors.enhancers.tfm
+local registertfmenhancer = tfmenhancers.register
+
+local charcommand = helpers.commands.char
+
+constructors.resolvevirtualtoo = false -- wil be set in font-ctx.lua
+
+fonts.formats.tfm = "type1" -- we need to have at least a value here
+fonts.formats.ofm = "type1" -- we need to have at least a value here
+
+function tfm.setfeatures(tfmdata,features)
+ local okay = constructors.initializefeatures("tfm",tfmdata,features,trace_features,report_tfm)
+ if okay then
+ return constructors.collectprocessors("tfm",tfmdata,features,trace_features,report_tfm)
+ else
+ return { } -- will become false
+ end
+end
+
+local depth = { } -- table.setmetatableindex("number")
+
+local loadtfm = font.read_tfm
+local loadvf = font.read_vf
+
+local function read_from_tfm(specification)
+ local filename = specification.filename
+ local size = specification.size
+ depth[filename] = (depth[filename] or 0) + 1
+ if trace_defining then
+ report_defining("loading tfm file %a at size %s",filename,size)
+ end
+ local tfmdata = loadtfm(filename,size)
+ if tfmdata then
+
+ local features = specification.features and specification.features.normal or { }
+ local features = constructors.checkedfeatures("tfm",features)
+ specification.features.normal = features
+
+ -- If reencode returns a new table, we assume that we're doing something
+ -- special. An 'auto' reencode picks up its vector from the pfb file.
+
+ local newtfmdata = (depth[filename] == 1) and tfm.reencode(tfmdata,specification)
+ if newtfmdata then
+ tfmdata = newtfmdata
+ end
+
+ local resources = tfmdata.resources or { }
+ local properties = tfmdata.properties or { }
+ local parameters = tfmdata.parameters or { }
+ local shared = tfmdata.shared or { }
+ --
+ shared.features = features
+ shared.resources = resources
+ --
+ properties.name = tfmdata.name -- todo: fallback
+ properties.fontname = tfmdata.fontname -- todo: fallback
+ properties.psname = tfmdata.psname -- todo: fallback
+ properties.fullname = tfmdata.fullname -- todo: fallback
+ properties.filename = specification.filename -- todo: fallback
+ properties.format = tfmdata.format or fonts.formats.tfm -- better than nothing
+ properties.usedbitmap = tfmdata.usedbitmap
+ --
+ tfmdata.properties = properties
+ tfmdata.resources = resources
+ tfmdata.parameters = parameters
+ tfmdata.shared = shared
+ --
+ shared.rawdata = { resources = resources }
+ shared.features = features
+ --
+ -- The next branch is only entered when we have a proper encoded file i.e.
+ -- unicodes and such. It really nakes no sense to do feature juggling when
+ -- we have no names and unicodes.
+ --
+ if newtfmdata then
+ --
+ -- Some opentype processing assumes these to be present:
+ --
+ if not resources.marks then
+ resources.marks = { }
+ end
+ if not resources.sequences then
+ resources.sequences = { }
+ end
+ if not resources.features then
+ resources.features = {
+ gsub = { },
+ gpos = { },
+ }
+ end
+ if not tfmdata.changed then
+ tfmdata.changed = { }
+ end
+ if not tfmdata.descriptions then
+ tfmdata.descriptions = tfmdata.characters
+ end
+ --
+ -- It might be handy to have this:
+ --
+ otf.readers.addunicodetable(tfmdata)
+ --
+ -- We make a pseudo opentype font, e.g. kerns and ligatures etc:
+ --
+ tfmenhancers.apply(tfmdata,filename)
+ --
+ -- Now user stuff can kick in.
+ --
+ constructors.applymanipulators("tfm",tfmdata,features,trace_features,report_tfm)
+ --
+ -- As that can also mess with names and such, we are now ready for finalizing
+ -- the unicode information. This is a different order that for instance type one
+ -- (afm) files. First we try to deduce unicodes from already present information.
+ --
+ otf.readers.unifymissing(tfmdata)
+ --
+ -- Next we fill in the gaps, based on names from teh agl. Probably not much will
+ -- happen here.
+ --
+ fonts.mappings.addtounicode(tfmdata,filename)
+ --
+ -- The tounicode data is passed to the backend that constructs the vectors for us.
+ --
+ tfmdata.tounicode = 1
+ local tounicode = fonts.mappings.tounicode
+ for unicode, v in next, tfmdata.characters do
+ local u = v.unicode
+ if u then
+ v.tounicode = tounicode(u)
+ end
+ end
+ --
+ -- However, when we use a bitmap font those vectors can't be constructed because
+ -- that information is not carried with those fonts (there is no name info, nor
+ -- proper index info, nor unicodes at that end). So, we provide it ourselves.
+ --
+ if tfmdata.usedbitmap then
+ tfm.addtounicode(tfmdata)
+ end
+ end
+ --
+ shared.processes = next(features) and tfm.setfeatures(tfmdata,features) or nil
+ --
+ if size < 0 then
+ size = idiv(65536 * -size,100)
+ end
+ parameters.factor = 1 -- already scaled
+ parameters.units = 1000 -- just in case
+ parameters.size = size
+ parameters.slant = parameters.slant or parameters[1] or 0
+ parameters.space = parameters.space or parameters[2] or 0
+ parameters.space_stretch = parameters.space_stretch or parameters[3] or 0
+ parameters.space_shrink = parameters.space_shrink or parameters[4] or 0
+ parameters.x_height = parameters.x_height or parameters[5] or 0
+ parameters.quad = parameters.quad or parameters[6] or 0
+ parameters.extra_space = parameters.extra_space or parameters[7] or 0
+ --
+ constructors.enhanceparameters(parameters) -- official copies for us
+ --
+ properties.private = properties.private or tfmdata.private or privateoffset
+ --
+ if newtfmdata then
+ --
+ -- We do nothing as we assume flat tfm files. It would become real messy
+ -- otherwise and I don't have something for testing on my system anyway.
+ --
+ elseif constructors.resolvevirtualtoo then
+ fonts.loggers.register(tfmdata,file.suffix(filename),specification) -- strange, why here
+ local vfname = findbinfile(specification.name, 'ovf')
+ if vfname and vfname ~= "" then
+ local vfdata = loadvf(vfname,size)
+ if vfdata then
+ local chars = tfmdata.characters
+ for k,v in next, vfdata.characters do
+ chars[k].commands = v.commands
+ end
+ properties.virtualized = true
+ tfmdata.fonts = vfdata.fonts
+ tfmdata.type = "virtual" -- else nested calls with cummulative scaling
+ local fontlist = vfdata.fonts
+ local name = file.nameonly(filename)
+ for i=1,#fontlist do
+ local n = fontlist[i].name
+ local s = fontlist[i].size
+ local d = depth[filename]
+ s = constructors.scaled(s,vfdata.designsize)
+ if d > tfm.maxnestingdepth then
+ report_defining("too deeply nested virtual font %a with size %a, max nesting depth %s",n,s,tfm.maxnestingdepth)
+ fontlist[i] = { id = 0 }
+ elseif (d > 1) and (s > tfm.maxnestingsize) then
+ report_defining("virtual font %a exceeds size %s",n,s)
+ fontlist[i] = { id = 0 }
+ else
+ local t, id = constructors.readanddefine(n,s)
+ fontlist[i] = { id = id }
+ end
+ end
+ end
+ end
+ end
+ --
+ properties.haskerns = true
+ properties.hasligatures = true
+ properties.hasitalics = true
+ resources.unicodes = { }
+ resources.lookuptags = { }
+ --
+ depth[filename] = depth[filename] - 1
+ --
+ return tfmdata
+ else
+ depth[filename] = depth[filename] - 1
+ end
+end
+
+local function check_tfm(specification,fullname) -- we could split up like afm/otf
+ local foundname = findbinfile(fullname, 'tfm') or ""
+ if foundname == "" then
+ foundname = findbinfile(fullname, 'ofm') or "" -- not needed in context
+ end
+ if foundname == "" then
+ foundname = fonts.names.getfilename(fullname,"tfm") or ""
+ end
+ if foundname ~= "" then
+ specification.filename = foundname
+ specification.format = "ofm"
+ return read_from_tfm(specification)
+ elseif trace_defining then
+ report_defining("loading tfm with name %a fails",specification.name)
+ end
+end
+
+readers.check_tfm = check_tfm
+
+function readers.tfm(specification)
+ local fullname = specification.filename or ""
+ if fullname == "" then
+ local forced = specification.forced or ""
+ if forced ~= "" then
+ fullname = specification.name .. "." .. forced
+ else
+ fullname = specification.name
+ end
+ end
+ return check_tfm(specification,fullname)
+end
+
+readers.ofm = readers.tfm
+
+-- The reencoding acts upon the 'reencode' feature which can have values 'auto' or
+-- an enc file. You can also specify a 'pfbfile' feature (but it defaults to the
+-- tfm filename) and a 'bitmap' feature. When no enc file is givven (auto) we will
+-- get the vectors from the pfb file.
+
+do
+
+ local outfiles = { }
+
+ local tfmcache = table.setmetatableindex(function(t,tfmdata)
+ local id = font.define(tfmdata)
+ t[tfmdata] = id
+ return id
+ end)
+
+ local encdone = table.setmetatableindex("table")
+
+ function tfm.reencode(tfmdata,specification)
+
+ local features = specification.features
+
+ if not features then
+ return
+ end
+
+ local features = features.normal
+
+ if not features then
+ return
+ end
+
+ local tfmfile = file.basename(tfmdata.name)
+ local encfile = features.reencode -- or features.enc
+ local pfbfile = features.pfbfile -- or features.pfb
+ local bitmap = features.bitmap -- or features.pk
+
+ if not encfile then
+ return
+ end
+
+ local pfbfile = outfiles[tfmfile]
+
+ if pfbfile == nil then
+ if bitmap then
+ pfbfile = false
+ elseif type(pfbfile) ~= "string" then
+ pfbfile = tfmfile
+ end
+ if type(pfbfile) == "string" then
+ pfbfile = file.addsuffix(pfbfile,"pfb")
+ -- pdf.mapline(tfmfile .. "<" .. pfbfile)
+ report_tfm("using type1 shapes from %a for %a",pfbfile,tfmfile)
+ else
+ report_tfm("using bitmap shapes for %a",tfmfile)
+ pfbfile = false -- use bitmap
+ end
+ outfiles[tfmfile] = pfbfile
+ end
+
+ local encoding = false
+ local vector = false
+
+ if type(pfbfile) == "string" then
+ local pfb = constructors.handlers.pfb
+ if pfb and pfb.loadvector then
+ local v, e = pfb.loadvector(pfbfile)
+ if v then
+ vector = v
+ end
+ if e then
+ encoding = e
+ end
+ end
+ end
+ if type(encfile) == "string" and encfile ~= "auto" then
+ encoding = fonts.encodings.load(file.addsuffix(encfile,"enc"))
+ if encoding then
+ encoding = encoding.vector
+ end
+ end
+ if not encoding then
+ report_tfm("bad encoding for %a, quitting",tfmfile)
+ return
+ end
+
+ local unicoding = fonts.encodings.agl and fonts.encodings.agl.unicodes
+ local virtualid = tfmcache[tfmdata]
+ local tfmdata = table.copy(tfmdata) -- good enough for small fonts
+ local characters = { }
+ local originals = tfmdata.characters
+ local indices = { }
+ local parentfont = { "font", 1 }
+ local private = tfmdata.privateoffset or constructors.privateoffset
+ local reported = encdone[tfmfile][encfile]
+
+ -- create characters table
+
+ local backmap = vector and table.swapped(vector)
+ local done = { } -- prevent duplicate
+
+ for index, name in sortedhash(encoding) do -- predictable order
+ local unicode = unicoding[name]
+ local original = originals[index]
+ if original then
+ if unicode then
+ original.unicode = unicode
+ else
+ unicode = private
+ private = private + 1
+ if not reported then
+ report_tfm("glyph %a in font %a with encoding %a gets unicode %U",name,tfmfile,encfile,unicode)
+ end
+ end
+ characters[unicode] = original
+ indices[index] = unicode
+ original.name = name -- so one can lookup weird names
+ if backmap then
+ original.index = backmap[name]
+ else -- probably bitmap
+ original.commands = { parentfont, charcommand[index] } -- or "slot"
+ original.oindex = index
+ end
+ done[name] = true
+ elseif not done[name] then
+ report_tfm("bad index %a in font %a with name %a",index,tfmfile,name)
+ end
+ end
+
+ encdone[tfmfile][encfile] = true
+
+ -- redo kerns and ligatures
+
+ for k, v in next, characters do
+ local kerns = v.kerns
+ if kerns then
+ local t = { }
+ for k, v in next, kerns do
+ local i = indices[k]
+ if i then
+ t[i] = v
+ end
+ end
+ v.kerns = next(t) and t or nil
+ end
+ local ligatures = v.ligatures
+ if ligatures then
+ local t = { }
+ for k, v in next, ligatures do
+ local i = indices[k]
+ if i then
+ t[i] = v
+ v.char = indices[v.char]
+ end
+ end
+ v.ligatures = next(t) and t or nil
+ end
+ end
+
+ -- wrap up
+
+ tfmdata.fonts = { { id = virtualid } }
+ tfmdata.characters = characters
+ tfmdata.fullname = tfmdata.fullname or tfmdata.name
+ tfmdata.psname = file.nameonly(pfbfile or tfmdata.name)
+ tfmdata.filename = pfbfile
+ tfmdata.encodingbytes = 2
+ -- tfmdata.format = bitmap and "type3" or "type1"
+ tfmdata.format = "type1"
+ tfmdata.tounicode = 1
+ tfmdata.embedding = "subset"
+ tfmdata.usedbitmap = bitmap and virtualid
+ tfmdata.private = private
+
+ return tfmdata
+ end
+
+end
+
+-- This code adds a ToUnicode vector for bitmap fonts. We don't bother about
+-- ranges because we have small fonts. it works ok with acrobat but fails with
+-- the other viewers (they get confused by the bitmaps I guess).
+
+do
+
+ local template = [[
+/CIDInit /ProcSet findresource begin
+ 12 dict begin
+ begincmap
+ /CIDSystemInfo << /Registry (TeX) /Ordering (bitmap-%s) /Supplement 0 >> def
+ /CMapName /TeX-bitmap-%s def
+ /CMapType 2 def
+ 1 begincodespacerange
+ <00> <FF>
+ endcodespacerange
+ %s beginbfchar
+%s
+ endbfchar
+ endcmap
+CMapName currentdict /CMap defineresource pop end
+end
+end
+]]
+
+ local flushstreamobject = lpdf and lpdf.flushstreamobject -- context
+ local setfontattributes = lpdf and lpdf.setfontattributes -- context
+
+ if not flushstreamobject then
+ flushstreamobject = function(data)
+ return pdf.obj { immediate = true, type = "stream", string = data } -- generic
+ end
+ end
+
+ if not setfontattributes then
+ setfontattributes = function(id,data)
+ return pdf.setfontattributes(id,data) -- generic
+ end
+ end
+
+ function tfm.addtounicode(tfmdata)
+ local id = tfmdata.usedbitmap
+ local map = { }
+ local char = { } -- no need for range, hardly used
+ for k, v in next, tfmdata.characters do
+ local index = v.oindex
+ local tounicode = v.tounicode
+ if index and tounicode then
+ map[index] = tounicode
+ end
+ end
+ for k, v in sortedhash(map) do
+ char[#char+1] = format("<%02X> <%s>",k,v)
+ end
+ char = concat(char,"\n")
+ local stream = format(template,id,id,#char,char)
+ local reference = flushstreamobject(stream,nil,true)
+ setfontattributes(id,format("/ToUnicode %i 0 R",reference))
+ end
+
+end
+
+-- Now we implement the regular features handlers. We need to convert the
+-- tfm specific structures to opentype structures. In basemode they are
+-- converted back so that is a bit of a waste but it's fast enough.
+
+do
+
+ local everywhere = { ["*"] = { ["*"] = true } } -- or: { ["*"] = { "*" } }
+ local noflags = { false, false, false, false }
+
+ local function enhance_normalize_features(data)
+ local ligatures = setmetatableindex("table")
+ local kerns = setmetatableindex("table")
+ local characters = data.characters
+ for u, c in next, characters do
+ local l = c.ligatures
+ local k = c.kerns
+ if l then
+ ligatures[u] = l
+ for u, v in next, l do
+ l[u] = { ligature = v.char }
+ end
+ c.ligatures = nil
+ end
+ if k then
+ kerns[u] = k
+ for u, v in next, k do
+ k[u] = v -- { v, 0 }
+ end
+ c.kerns = nil
+ end
+ end
+
+ for u, l in next, ligatures do
+ for k, v in next, l do
+ local vl = v.ligature
+ local dl = ligatures[vl]
+ if dl then
+ for kk, vv in next, dl do
+ v[kk] = vv -- table.copy(vv)
+ end
+ end
+ end
+ end
+
+ local features = {
+ gpos = { },
+ gsub = { },
+ }
+ local sequences = {
+ -- only filled ones
+ }
+ if next(ligatures) then
+ features.gsub.liga = everywhere
+ data.properties.hasligatures = true
+ sequences[#sequences+1] = {
+ features = {
+ liga = everywhere,
+ },
+ flags = noflags,
+ name = "s_s_0",
+ nofsteps = 1,
+ order = { "liga" },
+ type = "gsub_ligature",
+ steps = {
+ {
+ coverage = ligatures,
+ },
+ },
+ }
+ end
+ if next(kerns) then
+ features.gpos.kern = everywhere
+ data.properties.haskerns = true
+ sequences[#sequences+1] = {
+ features = {
+ kern = everywhere,
+ },
+ flags = noflags,
+ name = "p_s_0",
+ nofsteps = 1,
+ order = { "kern" },
+ type = "gpos_pair",
+ steps = {
+ {
+ format = "kern",
+ coverage = kerns,
+ },
+ },
+ }
+ end
+ data.resources.features = features
+ data.resources.sequences = sequences
+ data.shared.resources = data.shared.resources or resources
+ end
+
+ registertfmenhancer("normalize features", enhance_normalize_features)
+ registertfmenhancer("check extra features", otfenhancers.enhance)
+
+end
+
+-- As with type one (afm) loading, we just use the opentype ones:
+
+registertfmfeature {
+ name = "mode",
+ description = "mode",
+ initializers = {
+ base = otf.modeinitializer,
+ node = otf.modeinitializer,
+ }
+}
+
+registertfmfeature {
+ name = "features",
+ description = "features",
+ default = true,
+ initializers = {
+ base = otf.basemodeinitializer,
+ node = otf.nodemodeinitializer,
+ },
+ processors = {
+ node = otf.featuresprocessor,
+ }
+}
diff --git a/tex/generic/context/luatex/luatex-fonts.lua b/tex/generic/context/luatex/luatex-fonts.lua
index 06fb682f3..85fe1ae97 100644
--- a/tex/generic/context/luatex/luatex-fonts.lua
+++ b/tex/generic/context/luatex/luatex-fonts.lua
@@ -283,7 +283,7 @@ if non_generic_context.luatex_fonts.skip_loading ~= true then
-- And for traditional TeX fonts.
- loadmodule('font-tfm.lua')
+ loadmodule('luatex-fonts-tfm.lua')
-- Some common code.