summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-04-19 17:37:21 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-04-19 17:37:21 +0200
commitd817aef76ab8b606c02bd0636661b634b43a68a6 (patch)
treeb222d7a356ebe7f1f2267f6aa4f4e424a4d6d88c
parentd57683f5f67d6651f7b3353ff347ae57a409e0d4 (diff)
downloadcontext-d817aef76ab8b606c02bd0636661b634b43a68a6.tar.gz
2018-04-19 16:02:00
-rw-r--r--context/data/scite/context/lexers/data/scite-context-data-context.lua2
-rw-r--r--context/data/scite/context/lexers/data/scite-context-data-tex.lua4
-rw-r--r--context/data/scite/context/scite-context-data-context.properties289
-rw-r--r--context/data/scite/context/scite-context-data-tex.properties8
-rw-r--r--context/data/textadept/context/data/scite-context-data-context.lua2
-rw-r--r--context/data/textadept/context/data/scite-context-data-tex.lua4
-rw-r--r--doc/context/documents/general/manuals/luatex.pdfbin1226836 -> 1381658 bytes
-rw-r--r--doc/context/documents/general/manuals/rules-mkiv.pdfbin155750 -> 187549 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin845488 -> 846226 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin843202 -> 843986 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin847126 -> 847750 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin842878 -> 843564 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin844881 -> 845640 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-cs.pdfbin359342 -> 359451 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-de.pdfbin442345 -> 442459 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-en.pdfbin356138 -> 356265 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-fr.pdfbin359451 -> 359575 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-it.pdfbin358307 -> 358428 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-nl.pdfbin356967 -> 357080 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-mapping-ro.pdfbin610901 -> 611024 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin837211 -> 837704 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin841755 -> 842490 bytes
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-enhancements.tex495
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-fonts.tex188
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-languages.tex260
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-lua.tex70
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-math.tex690
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-modifications.tex228
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-nodes.tex520
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-preamble.tex27
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-registers.tex38
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-statistics.tex2
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-style.tex46
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex.tex3
-rw-r--r--doc/context/sources/general/manuals/rules/rules-mkiv.tex196
-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/buff-ini.mkiv8
-rw-r--r--tex/context/base/mkiv/cldf-scn.lua5
-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/font-cff.lua15
-rw-r--r--tex/context/base/mkiv/font-dsp.lua23
-rw-r--r--tex/context/base/mkiv/font-osd.lua62
-rw-r--r--tex/context/base/mkiv/font-otr.lua28
-rw-r--r--tex/context/base/mkiv/font-ttf.lua17
-rw-r--r--tex/context/base/mkiv/font-web.lua20
-rw-r--r--tex/context/base/mkiv/luat-lib.mkiv3
-rw-r--r--tex/context/base/mkiv/mult-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/mult-low.lua2
-rw-r--r--tex/context/base/mkiv/mult-prm.lua12
-rw-r--r--tex/context/base/mkiv/node-bck.lua187
-rw-r--r--tex/context/base/mkiv/node-bck.mkiv19
-rw-r--r--tex/context/base/mkiv/node-nut.lua18
-rw-r--r--tex/context/base/mkiv/node-rul.lua45
-rw-r--r--tex/context/base/mkiv/node-rul.mkiv8
-rw-r--r--tex/context/base/mkiv/node-tsk.lua54
-rw-r--r--tex/context/base/mkiv/pack-bck.mkvi48
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26106 -> 26106 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin256772 -> 256921 bytes
-rw-r--r--tex/context/base/mkiv/strc-sbe.mkiv4
-rw-r--r--tex/context/base/mkiv/tabl-tbl.mkiv114
-rw-r--r--tex/context/base/mkiv/task-ini.lua20
-rw-r--r--tex/context/base/mkiv/toks-scn.lua70
-rw-r--r--tex/context/base/mkiv/typo-bld.lua57
-rw-r--r--tex/context/base/mkiv/util-seq.lua75
-rw-r--r--tex/context/interface/mkiv/context-en.xml67
-rw-r--r--tex/context/interface/mkiv/i-buffer.xml8
-rw-r--r--tex/context/interface/mkiv/i-common-value.xml51
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin847126 -> 847750 bytes
-rw-r--r--tex/context/interface/mkiv/i-framed.xml2
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin61031 -> 61032 bytes
-rw-r--r--tex/context/interface/mkiv/i-tabulation.xml17
-rw-r--r--tex/context/interface/mkiv/i-vspace.xml93
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua118
75 files changed, 2800 insertions, 1552 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 3e5a8767a..fff21d78c 100644
--- a/context/data/scite/context/lexers/data/scite-context-data-context.lua
+++ b/context/data/scite/context/lexers/data/scite-context-data-context.lua
@@ -1,4 +1,4 @@
return {
["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred", "plustwohundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip" },
- ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthsargumenttrue", "sixthargumentfalse", "sixtsargumenttrue", "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", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installctxfunctioncall", "installprotectedctxfunction", "installprotectedctxfunctioncall", "installctxscanner", "installctxscannercall", "resetctxscanner", "installprotectedctxscanner", "installprotectedctxscannercall", "cldprocessfile", "cldloadfile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "frule", "compoundhyphenpenalty", "start", "stop" },
+ ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthsargumenttrue", "sixthargumentfalse", "sixtsargumenttrue", "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", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installctxfunctioncall", "installprotectedctxfunction", "installprotectedctxfunctioncall", "installctxscanner", "installctxscannercall", "resetctxscanner", "installprotectedctxscanner", "installprotectedctxscannercall", "cldprocessfile", "cldloadfile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "frule", "compoundhyphenpenalty", "start", "stop" },
} \ No newline at end of file
diff --git a/context/data/scite/context/lexers/data/scite-context-data-tex.lua b/context/data/scite/context/lexers/data/scite-context-data-tex.lua
index 3c9d39e40..b5f2ec97d 100644
--- a/context/data/scite/context/lexers/data/scite-context-data-tex.lua
+++ b/context/data/scite/context/lexers/data/scite-context-data-tex.lua
@@ -1,9 +1,9 @@
return {
["aleph"]={ "Alephminorversion", "Alephrevision", "Alephversion" },
["etex"]={ "botmarks", "clubpenalties", "currentgrouplevel", "currentgrouptype", "currentifbranch", "currentiflevel", "currentiftype", "detokenize", "dimexpr", "displaywidowpenalties", "eTeXVersion", "eTeXminorversion", "eTeXrevision", "eTeXversion", "everyeof", "firstmarks", "fontchardp", "fontcharht", "fontcharic", "fontcharwd", "glueexpr", "glueshrink", "glueshrinkorder", "gluestretch", "gluestretchorder", "gluetomu", "ifcsname", "ifdefined", "iffontchar", "interactionmode", "interlinepenalties", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "readline", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "tracingscantokens", "unexpanded", "unless", "widowpenalties" },
- ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "copyfont", "compoundhyphenmode", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathscriptsmode", "mathscriptcharmode", "mathscriptboxmode", "mathrulethicknessmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource" },
+ ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource" },
["omega"]={ "Omegaminorversion", "Omegarevision", "Omegaversion" },
- ["pdftex"]={ "ifpdfabsdim", "ifpdfabsnum", "ifpdfprimitive", "pdfadjustspacing", "pdfannot", "pdfcatalog", "pdfcolorstack", "pdfcolorstackinit", "pdfcompresslevel", "pdfcopyfont", "pdfcreationdate", "pdfdecimaldigits", "pdfdest", "pdfdestmargin", "pdfdraftmode", "pdfeachlinedepth", "pdfeachlineheight", "pdfendlink", "pdfendthread", "pdffirstlineheight", "pdffontattr", "pdffontexpand", "pdffontname", "pdffontobjnum", "pdffontsize", "pdfgamma", "pdfgentounicode", "pdfglyphtounicode", "pdfhorigin", "pdfignoreddimen", "pdfignoreunknownimages", "pdfimageaddfilename", "pdfimageapplygamma", "pdfimagegamma", "pdfimagehicolor", "pdfimageresolution", "pdfincludechars", "pdfinclusioncopyfonts", "pdfinclusionerrorlevel", "pdfinfo", "pdfinfoomitdate", "pdfinsertht", "pdflastannot", "pdflastlinedepth", "pdflastlink", "pdflastobj", "pdflastxform", "pdflastximage", "pdflastximagepages", "pdflastxpos", "pdflastypos", "pdflinkmargin", "pdfliteral", "pdfmapfile", "pdfmapline", "pdfmajorversion", "pdfminorversion", "pdfnames", "pdfnoligatures", "pdfnormaldeviate", "pdfobj", "pdfobjcompresslevel", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" },
+ ["pdftex"]={ "ifpdfabsdim", "ifpdfabsnum", "ifpdfprimitive", "pdfadjustspacing", "pdfannot", "pdfcatalog", "pdfcolorstack", "pdfcolorstackinit", "pdfcompresslevel", "pdfcopyfont", "pdfcreationdate", "pdfdecimaldigits", "pdfdest", "pdfdestmargin", "pdfdraftmode", "pdfeachlinedepth", "pdfeachlineheight", "pdfendlink", "pdfendthread", "pdffirstlineheight", "pdffontattr", "pdffontexpand", "pdffontname", "pdffontobjnum", "pdffontsize", "pdfgamma", "pdfgentounicode", "pdfglyphtounicode", "pdfhorigin", "pdfignoreddimen", "pdfignoreunknownimages", "pdfimageaddfilename", "pdfimageapplygamma", "pdfimagegamma", "pdfimagehicolor", "pdfimageresolution", "pdfincludechars", "pdfinclusioncopyfonts", "pdfinclusionerrorlevel", "pdfinfo", "pdfinfoomitdate", "pdfinsertht", "pdflastannot", "pdflastlinedepth", "pdflastlink", "pdflastobj", "pdflastxform", "pdflastximage", "pdflastximagepages", "pdflastxpos", "pdflastypos", "pdflinkmargin", "pdfliteral", "pdfmajorversion", "pdfmapfile", "pdfmapline", "pdfminorversion", "pdfnames", "pdfnoligatures", "pdfnormaldeviate", "pdfobj", "pdfobjcompresslevel", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" },
["tex"]={ " ", "-", "/", "Uleft", "Umiddle", "Uright", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "boundary", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "closeout", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "csstring", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "firstvalidlanguage", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hoffset", "holdinginserts", "hpack", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "immediate", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noboundary", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "openout", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "protrusionboundary", "radical", "raise", "read", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "special", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tpack", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vpack", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "wordboundary", "write", "xdef", "xleaders", "xspaceskip", "year" },
["xetex"]={ "XeTeXversion" },
} \ No newline at end of file
diff --git a/context/data/scite/context/scite-context-data-context.properties b/context/data/scite/context/scite-context-data-context.properties
index d209d17db..4017f82df 100644
--- a/context/data/scite/context/scite-context-data-context.properties
+++ b/context/data/scite/context/scite-context-data-context.properties
@@ -83,148 +83,149 @@ newsystemmode setsystemmode resetsystemmode pushsystemmode popsystemmode \
booleanmodevalue newcount newdimen newskip newmuskip \
newbox newtoks newread newwrite newmarks \
newinsert newattribute newif newlanguage newfamily \
-newfam newhelp then begcsname strippedcsname \
-checkedstrippedcsname firstargumentfalse firstargumenttrue secondargumentfalse secondargumenttrue \
-thirdargumentfalse thirdargumenttrue fourthargumentfalse fourthargumenttrue fifthargumentfalse \
-fifthsargumenttrue sixthargumentfalse sixtsargumenttrue 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 normalbaselineskip normallineskip normallineskiplimit \
-availablehsize localhsize setlocalhsize distributedhsize hsizefraction \
-nextbox dowithnextbox dowithnextboxcs dowithnextboxcontent dowithnextboxcontentcs \
-flushnextbox scratchwidth scratchheight scratchdepth scratchoffset \
-scratchdistance scratchhsize scratchvsize scratchxoffset scratchyoffset \
-scratchhoffset scratchvoffset scratchxposition scratchyposition scratchtopoffset \
-scratchbottomoffset scratchleftoffset scratchrightoffset scratchcounterone scratchcountertwo \
-scratchcounterthree scratchcounterfour scratchcounterfive scratchcountersix scratchdimenone \
-scratchdimentwo scratchdimenthree scratchdimenfour scratchdimenfive scratchdimensix \
-scratchskipone scratchskiptwo scratchskipthree scratchskipfour scratchskipfive \
-scratchskipsix scratchmuskipone scratchmuskiptwo scratchmuskipthree scratchmuskipfour \
-scratchmuskipfive scratchmuskipsix scratchtoksone scratchtokstwo scratchtoksthree \
-scratchtoksfour scratchtoksfive scratchtokssix scratchboxone scratchboxtwo \
-scratchboxthree scratchboxfour scratchboxfive scratchboxsix scratchnx \
-scratchny scratchmx scratchmy scratchunicode scratchmin \
-scratchmax scratchleftskip scratchrightskip scratchtopskip scratchbottomskip \
-doif doifnot doifelse doifinset doifnotinset \
-doifelseinset doifinsetelse doifelsenextchar doifnextcharelse doifelsenextoptional \
-doifnextoptionalelse doifelsenextoptionalcs doifnextoptionalcselse doifelsefastoptionalcheck doiffastoptionalcheckelse \
-doifelsefastoptionalcheckcs doiffastoptionalcheckcselse doifelsenextbgroup doifnextbgroupelse doifelsenextbgroupcs \
-doifnextbgroupcselse doifelsenextparenthesis doifnextparenthesiselse doifelseundefined doifundefinedelse \
-doifelsedefined doifdefinedelse doifundefined doifdefined doifelsevalue \
-doifvalue doifnotvalue doifnothing doifsomething doifelsenothing \
-doifnothingelse doifelsesomething doifsomethingelse doifvaluenothing doifvaluesomething \
-doifelsevaluenothing doifvaluenothingelse doifelsedimension doifdimensionelse doifelsenumber \
-doifnumberelse doifnumber doifnotnumber doifelsecommon doifcommonelse \
-doifcommon doifnotcommon doifinstring doifnotinstring doifelseinstring \
-doifinstringelse doifelseassignment doifassignmentelse docheckassignment doiftext \
-doifelsetext doiftextelse doifnottext tracingall tracingnone \
-loggingall removetoks appendtoks prependtoks appendtotoks \
-prependtotoks to endgraf endpar everyendpar \
-reseteverypar finishpar empty null space \
-quad enspace emspace charspace nbsp \
-crlf obeyspaces obeylines obeyedspace obeyedline \
-obeyedtab obeyedpage normalspace executeifdefined singleexpandafter \
-doubleexpandafter tripleexpandafter dontleavehmode removelastspace removeunwantedspaces \
-keepunwantedspaces removepunctuation ignoreparskip forcestrutdepth wait \
-writestatus define defineexpandable redefine setmeasure \
-setemeasure setgmeasure setxmeasure definemeasure freezemeasure \
-measure measured installcorenamespace getvalue getuvalue \
-setvalue setevalue setgvalue setxvalue letvalue \
-letgvalue resetvalue undefinevalue ignorevalue setuvalue \
-setuevalue setugvalue setuxvalue globallet glet \
-udef ugdef uedef uxdef checked \
-unique getparameters geteparameters getgparameters getxparameters \
-forgetparameters copyparameters getdummyparameters dummyparameter directdummyparameter \
-setdummyparameter letdummyparameter setexpandeddummyparameter usedummystyleandcolor usedummystyleparameter \
-usedummycolorparameter processcommalist processcommacommand quitcommalist quitprevcommalist \
-processaction processallactions processfirstactioninset processallactionsinset unexpanded \
-expanded startexpanded stopexpanded protected protect \
-unprotect firstofoneargument firstoftwoarguments secondoftwoarguments firstofthreearguments \
-secondofthreearguments thirdofthreearguments firstoffourarguments secondoffourarguments thirdoffourarguments \
-fourthoffourarguments firstoffivearguments secondoffivearguments thirdoffivearguments fourthoffivearguments \
-fifthoffivearguments firstofsixarguments secondofsixarguments thirdofsixarguments fourthofsixarguments \
-fifthofsixarguments sixthofsixarguments firstofoneunexpanded firstoftwounexpanded secondoftwounexpanded \
-firstofthreeunexpanded secondofthreeunexpanded thirdofthreeunexpanded gobbleoneargument gobbletwoarguments \
-gobblethreearguments gobblefourarguments gobblefivearguments gobblesixarguments gobblesevenarguments \
-gobbleeightarguments gobbleninearguments gobbletenarguments gobbleoneoptional gobbletwooptionals \
-gobblethreeoptionals gobblefouroptionals gobblefiveoptionals dorecurse doloop \
-exitloop dostepwiserecurse recurselevel recursedepth dofastloopcs \
-fastloopindex fastloopfinal dowith newconstant setnewconstant \
-setconstant setconstantvalue newconditional settrue setfalse \
-settruevalue setfalsevalue newmacro setnewmacro newfraction \
-newsignal dosingleempty dodoubleempty dotripleempty doquadrupleempty \
-doquintupleempty dosixtupleempty doseventupleempty dosingleargument dodoubleargument \
-dotripleargument doquadrupleargument doquintupleargument dosixtupleargument doseventupleargument \
-dosinglegroupempty dodoublegroupempty dotriplegroupempty doquadruplegroupempty doquintuplegroupempty \
-permitspacesbetweengroups dontpermitspacesbetweengroups nopdfcompression maximumpdfcompression normalpdfcompression \
-modulonumber dividenumber getfirstcharacter doifelsefirstchar doiffirstcharelse \
-startnointerference stopnointerference twodigits threedigits leftorright \
-offinterlineskip oninterlineskip nointerlineskip strut halfstrut \
-quarterstrut depthstrut halflinestrut noheightstrut setstrut \
-strutbox strutht strutdp strutwd struthtdp \
-strutgap begstrut endstrut lineheight leftboundary \
-rightboundary signalcharacter ordordspacing ordopspacing ordbinspacing \
-ordrelspacing ordopenspacing ordclosespacing ordpunctspacing ordinnerspacing \
-opordspacing opopspacing opbinspacing oprelspacing opopenspacing \
-opclosespacing oppunctspacing opinnerspacing binordspacing binopspacing \
-binbinspacing binrelspacing binopenspacing binclosespacing binpunctspacing \
-bininnerspacing relordspacing relopspacing relbinspacing relrelspacing \
-relopenspacing relclosespacing relpunctspacing relinnerspacing openordspacing \
-openopspacing openbinspacing openrelspacing openopenspacing openclosespacing \
-openpunctspacing openinnerspacing closeordspacing closeopspacing closebinspacing \
-closerelspacing closeopenspacing closeclosespacing closepunctspacing closeinnerspacing \
-punctordspacing punctopspacing punctbinspacing punctrelspacing punctopenspacing \
-punctclosespacing punctpunctspacing punctinnerspacing innerordspacing inneropspacing \
-innerbinspacing innerrelspacing inneropenspacing innerclosespacing innerpunctspacing \
-innerinnerspacing normalreqno startimath stopimath normalstartimath \
-normalstopimath startdmath stopdmath normalstartdmath normalstopdmath \
-normalsuperscript normalsubscript normalnosuperscript normalnosubscript superscript \
-subscript nosuperscript nosubscript uncramped cramped \
-triggermathstyle mathstylefont mathsmallstylefont mathstyleface mathsmallstyleface \
-mathstylecommand mathpalette mathstylehbox mathstylevbox mathstylevcenter \
-mathstylevcenteredhbox mathstylevcenteredvbox mathtext setmathsmalltextbox setmathtextbox \
-pushmathstyle popmathstyle triggerdisplaystyle triggertextstyle triggerscriptstyle \
-triggerscriptscriptstyle triggeruncrampedstyle triggercrampedstyle triggersmallstyle triggeruncrampedsmallstyle \
-triggercrampedsmallstyle triggerbigstyle triggeruncrampedbigstyle triggercrampedbigstyle luaexpr \
-expelsedoif expdoif expdoifnot expdoifelsecommon expdoifcommonelse \
-expdoifelseinset expdoifinsetelse ctxdirectlua ctxlatelua ctxsprint \
-ctxwrite ctxcommand ctxdirectcommand ctxlatecommand ctxreport \
-ctxlua luacode lateluacode directluacode registerctxluafile \
-ctxloadluafile luaversion luamajorversion luaminorversion ctxluacode \
-luaconditional luaexpanded startluaparameterset stopluaparameterset luaparameterset \
-definenamedlua obeylualines obeyluatokens startluacode stopluacode \
-startlua stoplua startctxfunction stopctxfunction ctxfunction \
-startctxfunctiondefinition stopctxfunctiondefinition installctxfunction installctxfunctioncall installprotectedctxfunction \
-installprotectedctxfunctioncall installctxscanner installctxscannercall resetctxscanner installprotectedctxscanner \
-installprotectedctxscannercall cldprocessfile cldloadfile cldcontext cldcommand \
-carryoverpar lastlinewidth assumelongusagecs Umathbotaccent righttolefthbox \
-lefttorighthbox righttoleftvbox lefttorightvbox righttoleftvtop lefttorightvtop \
-rtlhbox ltrhbox rtlvbox ltrvbox rtlvtop \
-ltrvtop autodirhbox autodirvbox autodirvtop leftorrighthbox \
-leftorrightvbox leftorrightvtop lefttoright righttoleft checkedlefttoright \
-checkedrighttoleft synchronizelayoutdirection synchronizedisplaydirection synchronizeinlinedirection dirlre \
-dirrle dirlro dirrlo lesshyphens morehyphens \
-nohyphens dohyphens Ucheckedstartdisplaymath Ucheckedstopdisplaymath break \
-nobreak allowbreak goodbreak nospace nospacing \
-dospacing naturalhbox naturalvbox naturalvtop naturalhpack \
-naturalvpack frule compoundhyphenpenalty start stop
+newfam newhelp then begcsname autorule \
+strippedcsname checkedstrippedcsname firstargumentfalse firstargumenttrue secondargumentfalse \
+secondargumenttrue thirdargumentfalse thirdargumenttrue fourthargumentfalse fourthargumenttrue \
+fifthargumentfalse fifthsargumenttrue sixthargumentfalse sixtsargumenttrue 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 normalbaselineskip normallineskip \
+normallineskiplimit availablehsize localhsize setlocalhsize distributedhsize \
+hsizefraction nextbox dowithnextbox dowithnextboxcs dowithnextboxcontent \
+dowithnextboxcontentcs flushnextbox scratchwidth scratchheight scratchdepth \
+scratchoffset scratchdistance scratchhsize scratchvsize scratchxoffset \
+scratchyoffset scratchhoffset scratchvoffset scratchxposition scratchyposition \
+scratchtopoffset scratchbottomoffset scratchleftoffset scratchrightoffset scratchcounterone \
+scratchcountertwo scratchcounterthree scratchcounterfour scratchcounterfive scratchcountersix \
+scratchdimenone scratchdimentwo scratchdimenthree scratchdimenfour scratchdimenfive \
+scratchdimensix scratchskipone scratchskiptwo scratchskipthree scratchskipfour \
+scratchskipfive scratchskipsix scratchmuskipone scratchmuskiptwo scratchmuskipthree \
+scratchmuskipfour scratchmuskipfive scratchmuskipsix scratchtoksone scratchtokstwo \
+scratchtoksthree scratchtoksfour scratchtoksfive scratchtokssix scratchboxone \
+scratchboxtwo scratchboxthree scratchboxfour scratchboxfive scratchboxsix \
+scratchnx scratchny scratchmx scratchmy scratchunicode \
+scratchmin scratchmax scratchleftskip scratchrightskip scratchtopskip \
+scratchbottomskip doif doifnot doifelse doifinset \
+doifnotinset doifelseinset doifinsetelse doifelsenextchar doifnextcharelse \
+doifelsenextoptional doifnextoptionalelse doifelsenextoptionalcs doifnextoptionalcselse doifelsefastoptionalcheck \
+doiffastoptionalcheckelse doifelsefastoptionalcheckcs doiffastoptionalcheckcselse doifelsenextbgroup doifnextbgroupelse \
+doifelsenextbgroupcs doifnextbgroupcselse doifelsenextparenthesis doifnextparenthesiselse doifelseundefined \
+doifundefinedelse doifelsedefined doifdefinedelse doifundefined doifdefined \
+doifelsevalue doifvalue doifnotvalue doifnothing doifsomething \
+doifelsenothing doifnothingelse doifelsesomething doifsomethingelse doifvaluenothing \
+doifvaluesomething doifelsevaluenothing doifvaluenothingelse doifelsedimension doifdimensionelse \
+doifelsenumber doifnumberelse doifnumber doifnotnumber doifelsecommon \
+doifcommonelse doifcommon doifnotcommon doifinstring doifnotinstring \
+doifelseinstring doifinstringelse doifelseassignment doifassignmentelse docheckassignment \
+doiftext doifelsetext doiftextelse doifnottext tracingall \
+tracingnone loggingall removetoks appendtoks prependtoks \
+appendtotoks prependtotoks to endgraf endpar \
+everyendpar reseteverypar finishpar empty null \
+space quad enspace emspace charspace \
+nbsp crlf obeyspaces obeylines obeyedspace \
+obeyedline obeyedtab obeyedpage normalspace executeifdefined \
+singleexpandafter doubleexpandafter tripleexpandafter dontleavehmode removelastspace \
+removeunwantedspaces keepunwantedspaces removepunctuation ignoreparskip forcestrutdepth \
+wait writestatus define defineexpandable redefine \
+setmeasure setemeasure setgmeasure setxmeasure definemeasure \
+freezemeasure measure measured installcorenamespace getvalue \
+getuvalue setvalue setevalue setgvalue setxvalue \
+letvalue letgvalue resetvalue undefinevalue ignorevalue \
+setuvalue setuevalue setugvalue setuxvalue globallet \
+glet udef ugdef uedef uxdef \
+checked unique getparameters geteparameters getgparameters \
+getxparameters forgetparameters copyparameters getdummyparameters dummyparameter \
+directdummyparameter setdummyparameter letdummyparameter setexpandeddummyparameter usedummystyleandcolor \
+usedummystyleparameter usedummycolorparameter processcommalist processcommacommand quitcommalist \
+quitprevcommalist processaction processallactions processfirstactioninset processallactionsinset \
+unexpanded expanded startexpanded stopexpanded protected \
+protect unprotect firstofoneargument firstoftwoarguments secondoftwoarguments \
+firstofthreearguments secondofthreearguments thirdofthreearguments firstoffourarguments secondoffourarguments \
+thirdoffourarguments fourthoffourarguments firstoffivearguments secondoffivearguments thirdoffivearguments \
+fourthoffivearguments fifthoffivearguments firstofsixarguments secondofsixarguments thirdofsixarguments \
+fourthofsixarguments fifthofsixarguments sixthofsixarguments firstofoneunexpanded firstoftwounexpanded \
+secondoftwounexpanded firstofthreeunexpanded secondofthreeunexpanded thirdofthreeunexpanded gobbleoneargument \
+gobbletwoarguments gobblethreearguments gobblefourarguments gobblefivearguments gobblesixarguments \
+gobblesevenarguments gobbleeightarguments gobbleninearguments gobbletenarguments gobbleoneoptional \
+gobbletwooptionals gobblethreeoptionals gobblefouroptionals gobblefiveoptionals dorecurse \
+doloop exitloop dostepwiserecurse recurselevel recursedepth \
+dofastloopcs fastloopindex fastloopfinal dowith newconstant \
+setnewconstant setconstant setconstantvalue newconditional settrue \
+setfalse settruevalue setfalsevalue newmacro setnewmacro \
+newfraction newsignal dosingleempty dodoubleempty dotripleempty \
+doquadrupleempty doquintupleempty dosixtupleempty doseventupleempty dosingleargument \
+dodoubleargument dotripleargument doquadrupleargument doquintupleargument dosixtupleargument \
+doseventupleargument dosinglegroupempty dodoublegroupempty dotriplegroupempty doquadruplegroupempty \
+doquintuplegroupempty permitspacesbetweengroups dontpermitspacesbetweengroups nopdfcompression maximumpdfcompression \
+normalpdfcompression modulonumber dividenumber getfirstcharacter doifelsefirstchar \
+doiffirstcharelse startnointerference stopnointerference twodigits threedigits \
+leftorright offinterlineskip oninterlineskip nointerlineskip strut \
+halfstrut quarterstrut depthstrut halflinestrut noheightstrut \
+setstrut strutbox strutht strutdp strutwd \
+struthtdp strutgap begstrut endstrut lineheight \
+leftboundary rightboundary signalcharacter ordordspacing ordopspacing \
+ordbinspacing ordrelspacing ordopenspacing ordclosespacing ordpunctspacing \
+ordinnerspacing opordspacing opopspacing opbinspacing oprelspacing \
+opopenspacing opclosespacing oppunctspacing opinnerspacing binordspacing \
+binopspacing binbinspacing binrelspacing binopenspacing binclosespacing \
+binpunctspacing bininnerspacing relordspacing relopspacing relbinspacing \
+relrelspacing relopenspacing relclosespacing relpunctspacing relinnerspacing \
+openordspacing openopspacing openbinspacing openrelspacing openopenspacing \
+openclosespacing openpunctspacing openinnerspacing closeordspacing closeopspacing \
+closebinspacing closerelspacing closeopenspacing closeclosespacing closepunctspacing \
+closeinnerspacing punctordspacing punctopspacing punctbinspacing punctrelspacing \
+punctopenspacing punctclosespacing punctpunctspacing punctinnerspacing innerordspacing \
+inneropspacing innerbinspacing innerrelspacing inneropenspacing innerclosespacing \
+innerpunctspacing innerinnerspacing normalreqno startimath stopimath \
+normalstartimath normalstopimath startdmath stopdmath normalstartdmath \
+normalstopdmath normalsuperscript normalsubscript normalnosuperscript normalnosubscript \
+superscript subscript nosuperscript nosubscript uncramped \
+cramped triggermathstyle mathstylefont mathsmallstylefont mathstyleface \
+mathsmallstyleface mathstylecommand mathpalette mathstylehbox mathstylevbox \
+mathstylevcenter mathstylevcenteredhbox mathstylevcenteredvbox mathtext setmathsmalltextbox \
+setmathtextbox pushmathstyle popmathstyle triggerdisplaystyle triggertextstyle \
+triggerscriptstyle triggerscriptscriptstyle triggeruncrampedstyle triggercrampedstyle triggersmallstyle \
+triggeruncrampedsmallstyle triggercrampedsmallstyle triggerbigstyle triggeruncrampedbigstyle triggercrampedbigstyle \
+luaexpr expelsedoif expdoif expdoifnot expdoifelsecommon \
+expdoifcommonelse expdoifelseinset expdoifinsetelse ctxdirectlua ctxlatelua \
+ctxsprint ctxwrite ctxcommand ctxdirectcommand ctxlatecommand \
+ctxreport ctxlua luacode lateluacode directluacode \
+registerctxluafile ctxloadluafile luaversion luamajorversion luaminorversion \
+ctxluacode luaconditional luaexpanded startluaparameterset stopluaparameterset \
+luaparameterset definenamedlua obeylualines obeyluatokens startluacode \
+stopluacode startlua stoplua startctxfunction stopctxfunction \
+ctxfunction startctxfunctiondefinition stopctxfunctiondefinition installctxfunction installctxfunctioncall \
+installprotectedctxfunction installprotectedctxfunctioncall installctxscanner installctxscannercall resetctxscanner \
+installprotectedctxscanner installprotectedctxscannercall cldprocessfile cldloadfile cldcontext \
+cldcommand carryoverpar lastlinewidth assumelongusagecs Umathbotaccent \
+righttolefthbox lefttorighthbox righttoleftvbox lefttorightvbox righttoleftvtop \
+lefttorightvtop rtlhbox ltrhbox rtlvbox ltrvbox \
+rtlvtop ltrvtop autodirhbox autodirvbox autodirvtop \
+leftorrighthbox leftorrightvbox leftorrightvtop lefttoright righttoleft \
+checkedlefttoright checkedrighttoleft synchronizelayoutdirection synchronizedisplaydirection synchronizeinlinedirection \
+dirlre dirrle dirlro dirrlo lesshyphens \
+morehyphens nohyphens dohyphens Ucheckedstartdisplaymath Ucheckedstopdisplaymath \
+break nobreak allowbreak goodbreak nospace \
+nospacing dospacing naturalhbox naturalvbox naturalvtop \
+naturalhpack naturalvpack frule compoundhyphenpenalty start \
+stop
diff --git a/context/data/scite/context/scite-context-data-tex.properties b/context/data/scite/context/scite-context-data-tex.properties
index 91335b292..c58ab5384 100644
--- a/context/data/scite/context/scite-context-data-tex.properties
+++ b/context/data/scite/context/scite-context-data-tex.properties
@@ -49,7 +49,7 @@ Ustartmath Ustopdisplaymath Ustopmath Usubscript Usuperscript \
Uunderdelimiter Uvextensible adjustspacing alignmark aligntab \
attribute attributedef automaticdiscretionary automatichyphenmode automatichyphenpenalty \
begincsname bodydir bodydirection boxdir boxdirection \
-breakafterdirmode catcodetable clearmarks copyfont compoundhyphenmode \
+breakafterdirmode catcodetable clearmarks compoundhyphenmode copyfont \
crampeddisplaystyle crampedscriptscriptstyle crampedscriptstyle crampedtextstyle draftmode \
dviextension dvifeedback dvivariable efcode etoksapp \
etokspre exceptionpenalty expanded expandglyphsinfont explicitdiscretionary \
@@ -63,7 +63,7 @@ localleftbox localrightbox lpcode luaescapestring luafunction \
luafunctioncall luatexbanner luatexrevision luatexversion mathdelimitersmode \
mathdir mathdirection mathdisplayskipmode matheqnogapstep mathitalicsmode \
mathnolimitsmode mathoption mathpenaltiesmode mathrulesfam mathrulesmode \
-mathscriptsmode mathscriptcharmode mathscriptboxmode mathrulethicknessmode mathstyle \
+mathrulethicknessmode mathscriptboxmode mathscriptcharmode mathscriptsmode mathstyle \
mathsurroundmode mathsurroundskip nohrule nokerns noligs \
normaldeviate nospaces novrule outputbox outputmode \
pagebottomoffset pagedir pagedirection pageheight pageleftoffset \
@@ -92,8 +92,8 @@ pdfignoreddimen pdfignoreunknownimages pdfimageaddfilename pdfimageapplygamma pd
pdfimagehicolor pdfimageresolution pdfincludechars pdfinclusioncopyfonts pdfinclusionerrorlevel \
pdfinfo pdfinfoomitdate pdfinsertht pdflastannot pdflastlinedepth \
pdflastlink pdflastobj pdflastxform pdflastximage pdflastximagepages \
-pdflastxpos pdflastypos pdflinkmargin pdfliteral pdfmapfile \
-pdfmapline pdfmajorversion pdfminorversion pdfnames pdfnoligatures \
+pdflastxpos pdflastypos pdflinkmargin pdfliteral pdfmajorversion \
+pdfmapfile pdfmapline pdfminorversion pdfnames pdfnoligatures \
pdfnormaldeviate pdfobj pdfobjcompresslevel pdfoutline pdfoutput \
pdfpageattr pdfpagebox pdfpageheight pdfpageref pdfpageresources \
pdfpagesattr pdfpagewidth pdfpkfixeddpi pdfpkmode pdfpkresolution \
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 3e5a8767a..fff21d78c 100644
--- a/context/data/textadept/context/data/scite-context-data-context.lua
+++ b/context/data/textadept/context/data/scite-context-data-context.lua
@@ -1,4 +1,4 @@
return {
["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred", "plustwohundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip" },
- ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthsargumenttrue", "sixthargumentfalse", "sixtsargumenttrue", "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", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installctxfunctioncall", "installprotectedctxfunction", "installprotectedctxfunctioncall", "installctxscanner", "installctxscannercall", "resetctxscanner", "installprotectedctxscanner", "installprotectedctxscannercall", "cldprocessfile", "cldloadfile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "frule", "compoundhyphenpenalty", "start", "stop" },
+ ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthsargumenttrue", "sixthargumentfalse", "sixtsargumenttrue", "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", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installctxfunctioncall", "installprotectedctxfunction", "installprotectedctxfunctioncall", "installctxscanner", "installctxscannercall", "resetctxscanner", "installprotectedctxscanner", "installprotectedctxscannercall", "cldprocessfile", "cldloadfile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "frule", "compoundhyphenpenalty", "start", "stop" },
} \ No newline at end of file
diff --git a/context/data/textadept/context/data/scite-context-data-tex.lua b/context/data/textadept/context/data/scite-context-data-tex.lua
index 3c9d39e40..b5f2ec97d 100644
--- a/context/data/textadept/context/data/scite-context-data-tex.lua
+++ b/context/data/textadept/context/data/scite-context-data-tex.lua
@@ -1,9 +1,9 @@
return {
["aleph"]={ "Alephminorversion", "Alephrevision", "Alephversion" },
["etex"]={ "botmarks", "clubpenalties", "currentgrouplevel", "currentgrouptype", "currentifbranch", "currentiflevel", "currentiftype", "detokenize", "dimexpr", "displaywidowpenalties", "eTeXVersion", "eTeXminorversion", "eTeXrevision", "eTeXversion", "everyeof", "firstmarks", "fontchardp", "fontcharht", "fontcharic", "fontcharwd", "glueexpr", "glueshrink", "glueshrinkorder", "gluestretch", "gluestretchorder", "gluetomu", "ifcsname", "ifdefined", "iffontchar", "interactionmode", "interlinepenalties", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "readline", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "tracingscantokens", "unexpanded", "unless", "widowpenalties" },
- ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "copyfont", "compoundhyphenmode", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathscriptsmode", "mathscriptcharmode", "mathscriptboxmode", "mathrulethicknessmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource" },
+ ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fontid", "formatname", "gleaders", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource" },
["omega"]={ "Omegaminorversion", "Omegarevision", "Omegaversion" },
- ["pdftex"]={ "ifpdfabsdim", "ifpdfabsnum", "ifpdfprimitive", "pdfadjustspacing", "pdfannot", "pdfcatalog", "pdfcolorstack", "pdfcolorstackinit", "pdfcompresslevel", "pdfcopyfont", "pdfcreationdate", "pdfdecimaldigits", "pdfdest", "pdfdestmargin", "pdfdraftmode", "pdfeachlinedepth", "pdfeachlineheight", "pdfendlink", "pdfendthread", "pdffirstlineheight", "pdffontattr", "pdffontexpand", "pdffontname", "pdffontobjnum", "pdffontsize", "pdfgamma", "pdfgentounicode", "pdfglyphtounicode", "pdfhorigin", "pdfignoreddimen", "pdfignoreunknownimages", "pdfimageaddfilename", "pdfimageapplygamma", "pdfimagegamma", "pdfimagehicolor", "pdfimageresolution", "pdfincludechars", "pdfinclusioncopyfonts", "pdfinclusionerrorlevel", "pdfinfo", "pdfinfoomitdate", "pdfinsertht", "pdflastannot", "pdflastlinedepth", "pdflastlink", "pdflastobj", "pdflastxform", "pdflastximage", "pdflastximagepages", "pdflastxpos", "pdflastypos", "pdflinkmargin", "pdfliteral", "pdfmapfile", "pdfmapline", "pdfmajorversion", "pdfminorversion", "pdfnames", "pdfnoligatures", "pdfnormaldeviate", "pdfobj", "pdfobjcompresslevel", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" },
+ ["pdftex"]={ "ifpdfabsdim", "ifpdfabsnum", "ifpdfprimitive", "pdfadjustspacing", "pdfannot", "pdfcatalog", "pdfcolorstack", "pdfcolorstackinit", "pdfcompresslevel", "pdfcopyfont", "pdfcreationdate", "pdfdecimaldigits", "pdfdest", "pdfdestmargin", "pdfdraftmode", "pdfeachlinedepth", "pdfeachlineheight", "pdfendlink", "pdfendthread", "pdffirstlineheight", "pdffontattr", "pdffontexpand", "pdffontname", "pdffontobjnum", "pdffontsize", "pdfgamma", "pdfgentounicode", "pdfglyphtounicode", "pdfhorigin", "pdfignoreddimen", "pdfignoreunknownimages", "pdfimageaddfilename", "pdfimageapplygamma", "pdfimagegamma", "pdfimagehicolor", "pdfimageresolution", "pdfincludechars", "pdfinclusioncopyfonts", "pdfinclusionerrorlevel", "pdfinfo", "pdfinfoomitdate", "pdfinsertht", "pdflastannot", "pdflastlinedepth", "pdflastlink", "pdflastobj", "pdflastxform", "pdflastximage", "pdflastximagepages", "pdflastxpos", "pdflastypos", "pdflinkmargin", "pdfliteral", "pdfmajorversion", "pdfmapfile", "pdfmapline", "pdfminorversion", "pdfnames", "pdfnoligatures", "pdfnormaldeviate", "pdfobj", "pdfobjcompresslevel", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" },
["tex"]={ " ", "-", "/", "Uleft", "Umiddle", "Uright", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "boundary", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "closeout", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "csstring", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "firstvalidlanguage", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hoffset", "holdinginserts", "hpack", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "immediate", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noboundary", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "openout", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "protrusionboundary", "radical", "raise", "read", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "special", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tpack", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vpack", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "wordboundary", "write", "xdef", "xleaders", "xspaceskip", "year" },
["xetex"]={ "XeTeXversion" },
} \ No newline at end of file
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf
index a67ee0589..6f627bf47 100644
--- a/doc/context/documents/general/manuals/luatex.pdf
+++ b/doc/context/documents/general/manuals/luatex.pdf
Binary files differ
diff --git a/doc/context/documents/general/manuals/rules-mkiv.pdf b/doc/context/documents/general/manuals/rules-mkiv.pdf
index 9861f76ef..dee2a4607 100644
--- a/doc/context/documents/general/manuals/rules-mkiv.pdf
+++ b/doc/context/documents/general/manuals/rules-mkiv.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index e4704014d..0038f1fbc 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 b175ed75d..639ed3627 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 3e39f95c8..30f792944 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 8e6404ba3..020b41c53 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 0059b48b6..4903bd406 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 009cd73e5..3a7d17715 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 564fe5b12..8996d2f5a 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 2516c75ab..e16ec4684 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 a589d7488..9086d521b 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 33c96190f..33e08abff 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 e5e14316f..44710fbd1 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 6bb619ae9..36fbb9e38 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 887f2cc0a..70a49b01d 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 0ddab643a..ed1ce452c 100644
--- a/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex b/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
index 3ac82afb5..e9fd951fc 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
@@ -10,12 +10,12 @@
From day one, \LUATEX\ has offered extra features compared to the superset of
\PDFTEX\ and \ALEPH. This has not been limited to the possibility to execute
-\LUA\ code via \type {\directlua}, but \LUATEX\ also adds functionality via new
+\LUA\ code via \prm {directlua}, but \LUATEX\ also adds functionality via new
\TEX|-|side primitives or extensions to existing ones.
When \LUATEX\ starts up in \quote {iniluatex} mode (\type {luatex -ini}), it
defines only the primitive commands known by \TEX82 and the one extra command
-\type {\directlua}. As is fitting, a \LUA\ function has to be called to add the
+\prm {directlua}. As is fitting, a \LUA\ function has to be called to add the
extra primitives to the user environment. The simplest method to get access to
all of the new primitive commands is by adding this line to the format generation
file:
@@ -24,7 +24,7 @@ file:
\directlua { tex.enableprimitives('',tex.extraprimitives()) }
\stoptyping
-But be aware that the curly braces may not have the proper \type {\catcode}
+But be aware that the curly braces may not have the proper \prm {catcode}
assigned to them at this early time (giving a \quote {Missing number} error), so
it may be needed to put these assignments before the above line:
@@ -35,7 +35,7 @@ it may be needed to put these assignments before the above line:
More fine|-|grained primitives control is possible and you can look up the
details in \in {section} [luaprimitives]. For simplicity's sake, this manual
-assumes that you have executed the \type {\directlua} command as given above.
+assumes that you have executed the \prm {directlua} command as given above.
The startup behaviour documented above is considered stable in the sense that
there will not be backward|-|incompatible changes any more. We have promoted some
@@ -49,31 +49,39 @@ chapters on fonts and math we discuss a few more new ones.
\section{Version information}
-\subsection {\type {\luatexbanner}, \type {\luatexversion} and \type {\luatexrevision}}
+\subsection {\lpr {luatexbanner}, \lpr {luatexversion} and \lpr {luatexrevision}}
+
+\topicindex{version}
+\topicindex{banner}
There are three new primitives to test the version of \LUATEX:
-\starttabulate[|l|pl|pl|]
-\DB primitive \BC explanation \BC value \NC \NR
-\TB[small,samepage]
-\NC \type {\luatexbanner} \NC the banner reported on the command line \NC \luatexbanner \NC \NR
-\NC \type {\luatexversion} \NC a combination of major and minor number \NC \the\luatexversion \NC \NR
-\NC \type {\luatexrevision} \NC the revision number, the current value is \NC \luatexrevision \NC \NR
+\starttabulate[|l|l|pl|]
+\DB primitive \BC value
+ \BC explanation \NC \NR
+\TB
+\NC \lpr {luatexbanner} \NC \cldcontext{string.match("\luatexbanner","(.+)\letterpercent(")}
+ \NC the banner reported on the command line \NC \NR
+\NC \lpr {luatexversion} \NC \the\luatexversion
+ \NC a combination of major and minor number \NC \NR
+\NC \lpr {luatexrevision} \NC \luatexrevision
+ \NC the revision number, the current value is \NC \NR
+\LL
\stoptabulate
The official \LUATEX\ version is defined as follows:
\startitemize
\startitem
- The major version is the integer result of \type {\luatexversion} divided by
+ The major version is the integer result of \lpr {luatexversion} divided by
100. The primitive is an \quote {internal variable}, so you may need to prefix
- its use with \type {\the} depending on the context.
+ its use with \prm {the} depending on the context.
\stopitem
\startitem
- The minor version is the two-digit result of \type {\luatexversion} modulo 100.
+ The minor version is the two-digit result of \lpr {luatexversion} modulo 100.
\stopitem
\startitem
- The revision is the given by \type {\luatexrevision}. This primitive expands to
+ The revision is the given by \lpr {luatexrevision}. This primitive expands to
a positive integer.
\stopitem
\startitem
@@ -82,10 +90,12 @@ The official \LUATEX\ version is defined as follows:
\stopitem
\stopitemize
-\subsection{\type {\formatname}}
+\subsection{\lpr {formatname}}
+
+\topicindex{format}
-The \type {\formatname} syntax is identical to \type {\jobname}. In \INITEX, the
-expansion is empty. Otherwise, the expansion is the value that \type {\jobname} had
+The \lpr {formatname} syntax is identical to \prm {jobname}. In \INITEX, the
+expansion is empty. Otherwise, the expansion is the value that \prm {jobname} had
during the \INITEX\ run that dumped the currently loaded format. You can use this
token list to provide your own version info.
@@ -93,6 +103,8 @@ token list to provide your own version info.
\subsection {Extended ranges}
+\topicindex{\UNICODE}
+
Text input and output is now considered to be \UNICODE\ text, so input characters
can use the full range of \UNICODE\ ($2^{20}+2^{16}-1 = \hbox{0x10FFFF}$). Later
chapters will talk of characters and glyphs. Although these are not
@@ -105,14 +117,14 @@ changed in \LUA\ it is up to the user: subtypes larger than 255 indicate that
font processing has happened.
A few primitives are affected by this, all in a similar fashion: each of them has
-to accommodate for a larger range of acceptable numbers. For instance, \type
-{\char} now accepts values between~0 and $1{,}114{,}111$. This should not be a
+to accommodate for a larger range of acceptable numbers. For instance, \prm
+{char} now accepts values between~0 and $1{,}114{,}111$. This should not be a
problem for well|-|behaved input files, but it could create incompatibilities for
input that would have generated an error when processed by older \TEX|-|based
engines. The affected commands with an altered initial (left of the equals sign)
-or secondary (right of the equals sign) value are: \type {\char}, \type
-{\lccode}, \type {\uccode}, \type {\hjcode}, \type {\catcode}, \type {\sfcode},
-\type {\efcode}, \type {\lpcode}, \type {\rpcode}, \type {\chardef}.
+or secondary (right of the equals sign) value are: \prm {char}, \prm {lccode},
+\prm {uccode}, \lpr {hjcode}, \prm {catcode}, \prm {sfcode}, \lpr {efcode}, \lpr
+{lpcode}, \lpr {rpcode}, \prm {chardef}.
As far as the core engine is concerned, all input and output to text files is
\UTF-8 encoded. Input files can be pre|-|processed using the \type {reader}
@@ -131,10 +143,11 @@ are considered \quote {safe} and therefore printed as|-|is. You can disable
escaping with \type {texio.setescape(false)} in which case you get the normal
characters on the console.
+\subsection{\lpr {Uchar}}
-\subsection{\type {\Uchar}}
+\topicindex{\UNICODE}
-The expandable command \type {\Uchar} reads a number between~0 and $1{,}114{,}111$
+The expandable command \lpr {Uchar} reads a number between~0 and $1{,}114{,}111$
and expands to the associated \UNICODE\ character.
\section{Extended tables}
@@ -143,31 +156,31 @@ All traditional \TEX\ and \ETEX\ registers can be 16-bit numbers. The affected
commands are:
\startfourcolumns
-\starttyping
-\count
-\dimen
-\skip
-\muskip
-\marks
-\toks
-\countdef
-\dimendef
-\skipdef
-\muskipdef
-\toksdef
-\insert
-\box
-\unhbox
-\unvbox
-\copy
-\unhcopy
-\unvcopy
-\wd
-\ht
-\dp
-\setbox
-\vsplit
-\stoptyping
+\startlines
+\prm {count}
+\prm {dimen}
+\prm {skip}
+\prm {muskip}
+\prm {marks}
+\prm {toks}
+\prm {countdef}
+\prm {dimendef}
+\prm {skipdef}
+\prm {muskipdef}
+\prm {toksdef}
+\prm {insert}
+\prm {box}
+\prm {unhbox}
+\prm {unvbox}
+\prm {copy}
+\prm {unhcopy}
+\prm {unvcopy}
+\prm {wd}
+\prm {ht}
+\prm {dp}
+\prm {setbox}
+\prm {vsplit}
+\stoplines
\stopfourcolumns
Because font memory management has been rewritten, character properties in fonts
@@ -178,9 +191,11 @@ file.
\subsection{Attribute registers}
+\topicindex {attributes}
+
Attributes are a completely new concept in \LUATEX. Syntactically, they behave a
lot like counters: attributes obey \TEX's nesting stack and can be used after
-\type {\the} etc.\ just like the normal \type {\count} registers.
+\prm {the} etc.\ just like the normal \prm {count} registers.
\startsyntax
\attribute <16-bit number> <optional equals> <32-bit number>!crlf
@@ -206,27 +221,29 @@ possible. This permits efficient testing and updating.
\subsection{Nodes}
+\topicindex {nodes}
+
When \TEX\ reads input it will interpret the stream according to the properties
of the characters. Some signal a macro name and trigger expansion, others open
and close groups, trigger math mode, etc. What's left over becomes the typeset
-text. Internally we get linked list of nodes. Characters become \type {glyph}
+text. Internally we get linked list of nodes. Characters become \nod {glyph}
nodes that have for instance a \type {font} and \type {char} property and \typ
-{\kern 10pt} becomes a \type {kern} node with a \type {width} property. Spaces
-are alien to \TEX\ as they are turned into \type {glue} nodes. So, a simple
-paragraph is mostly a mix of sequences of \type {glyph} nodes (words) and \type
-{glue} nodes (spaces).
+{\kern 10pt} becomes a \nod {kern} node with a \type {width} property. Spaces are
+alien to \TEX\ as they are turned into \nod {glue} nodes. So, a simple paragraph
+is mostly a mix of sequences of \nod {glyph} nodes (words) and \nod {glue} nodes
+(spaces).
-The sequences of characters at some point are extended with \type {disc} nodes
+The sequences of characters at some point are extended with \nod {disc} nodes
that relate to hyphenation. After that font logic can be applied and we get a
list where some characters can be replaced, for instance multiple characters can
become one ligature, and font kerns can be injected. This is driven by the
font properties.
-Boxes (like \type {\hbox} and \type {\vbox}) become \type {hlist} or \type
-{vlist} nodes with \type {width}, \type {height}, \type {depth} and \type {shift}
+Boxes (like \prm {hbox} and \prm {vbox}) become \nod {hlist} or \nod {vlist}
+nodes with \type {width}, \type {height}, \type {depth} and \type {shift}
properties and a pointer \type {list} to its actual content. Boxes can be
constructed explicitly or can be the result of subprocesses. For instance, when
-lines are broken into paragraphs, the lines are a linked list of \type {hlist}
+lines are broken into paragraphs, the lines are a linked list of \nod {hlist}
nodes.
We will see more of these nodes later on but for now that should be enough to be
@@ -234,9 +251,12 @@ able to follow the rest oof this chapter.
\subsection{Box attributes}
+\topicindex {attributes}
+\topicindex {boxes}
+
Nodes typically receive the list of attributes that is in effect when they are
created. This moment can be quite asynchronous. For example: in paragraph
-building, the individual line boxes are created after the \type {\par} command has
+building, the individual line boxes are created after the \prm {par} command has
been processed, so they will receive the list of attributes that is in effect
then, not the attributes that were in effect in, say, the first or third line of
the paragraph.
@@ -291,7 +311,7 @@ code:
\typebuffer[lua]
Later we will see that you can access properties of a node. The boxes here are so
-called \type {hlist} nodes that have a field \type {list} that points to the
+called \nod {hlist} nodes that have a field \type {list} that points to the
content. Because the attributes are a list themselves you can access them by
indexing the node (here we do that with \type {[a]}. Running this snippet gives:
@@ -307,10 +327,10 @@ here so that we get the word \type {nil}.
\section{\LUA\ related primitives}
-\subsection{\type {\directlua}}
+\subsection{\prm {directlua}}
In order to merge \LUA\ code with \TEX\ input, a few new primitives are needed.
-The primitive \type {\directlua} is used to execute \LUA\ code immediately. The
+The primitive \prm {directlua} is used to execute \LUA\ code immediately. The
syntax is
\startsyntax
@@ -321,10 +341,10 @@ syntax is
The \syntax {<general text>} is expanded fully, and then fed into the \LUA\
interpreter. After reading and expansion has been applied to the \syntax
{<general text>}, the resulting token list is converted to a string as if it was
-displayed using \type {\the\toks}. On the \LUA\ side, each \type {\directlua}
-block is treated as a separate chunk. In such a chunk you can use the \type
-{local} directive to keep your variables from interfering with those used by the
-macro package.
+displayed using \type {\the\toks}. On the \LUA\ side, each \prm {directlua} block
+is treated as a separate chunk. In such a chunk you can use the \type {local}
+directive to keep your variables from interfering with those used by the macro
+package.
The conversion to and from a token list means that you normally can not use \LUA\
line comments (starting with \type {--}) within the argument. As there typically
@@ -350,7 +370,7 @@ table further in this manual). When a chunk name starts with a \type {@} it will
be displayed as a file name. This is a side effect of the way \LUA\ implements
error handling.
-The \type {\directlua} command is expandable. Since it passes \LUA\ code to the
+The \prm {directlua} command is expandable. Since it passes \LUA\ code to the
\LUA\ interpreter its expansion from the \TEX\ viewpoint is usually empty.
However, there are some \LUA\ functions that produce material to be read by \TEX,
the so called print functions. The most simple use of these is \type
@@ -381,10 +401,10 @@ will result in
\getbuffer
-Note that the expansion of \type {\directlua} is a sequence of characters, not of
+Note that the expansion of \prm {directlua} is a sequence of characters, not of
tokens, contrary to all \TEX\ commands. So formally speaking its expansion is
null, but it places material on a pseudo-file to be immediately read by \TEX, as
-\ETEX's \type {\scantokens}. For a description of print functions look at \in
+\ETEX's \prm {scantokens}. For a description of print functions look at \in
{section} [sec:luaprint].
Because the \syntax {<general text>} is a chunk, the normal \LUA\ error handling
@@ -398,12 +418,12 @@ can break up \LUATEX\ pretty bad. If you are not careful while working with the
node list interface, you may even end up with assertion errors from within the
\TEX\ portion of the executable.
-\subsection{\type {\latelua}}
+\subsection{\lpr {latelua}}
-Contrary to \type {\directlua}, \type {\latelua} stores \LUA\ code in a whatsit
+Contrary to \prm {directlua}, \lpr {latelua} stores \LUA\ code in a whatsit
that will be processed at the time of shipping out. Its intended use is a cross
-between \PDF\ literals (often available as \type {\pdfliteral}) and the
-traditional \TEX\ extension \type {\write}. Within the \LUA\ code you can print
+between \PDF\ literals (often available as \orm {pdfliteral}) and the
+traditional \TEX\ extension \prm {write}. Within the \LUA\ code you can print
\PDF\ statements directly to the \PDF\ file via \type {pdf.print}, or you can
write to other output streams via \type {texio.write} or simply using \LUA\ \IO\
routines.
@@ -414,12 +434,14 @@ routines.
\stopsyntax
Expansion of macros in the final \type {<general text>} is delayed until just
-before the whatsit is executed (like in \type {\write}). With regard to \PDF\
-output stream \type {\latelua} behaves as \PDF\ page literals. The \syntax
+before the whatsit is executed (like in \prm {write}). With regard to \PDF\
+output stream \lpr {latelua} behaves as \PDF\ page literals. The \syntax
{name <general text>} and \syntax {<16-bit number>} behave in the same way as
-they do for \type {\directlua}
+they do for \prm {directlua}
+
+\subsection{\lpr {luaescapestring}}
-\subsection{\type {\luaescapestring}}
+\topicindex {escaping}
This primitive converts a \TEX\ token sequence so that it can be safely used as
the contents of a \LUA\ string: embedded backslashes, double and single quotes,
@@ -442,14 +464,14 @@ is easier to keep the code in a separate file and load it using \LUA's
\directlua { dofile('mysetups.lua') }
\stoptyping
-\subsection{\type {\luafunction} and \type {\luafunctioncall}}
+\subsection{\lpr {luafunction} and \lpr {luafunctioncall}}
-The \type {\directlua} commands involves tokenization of its argument (after
+The \prm {directlua} commands involves tokenization of its argument (after
picking up an optional name or number specification). The tokenlist is then
converted into a string and given to \LUA\ to turn into a function that is
called. The overhead is rather small but when you have millions of calls it can
-have some impact. For this reason there is a variant call available: \type
-{\luafunction}. This command is used as follows:
+have some impact. For this reason there is a variant call available: \lpr
+{luafunction}. This command is used as follows:
\starttyping
\directlua {
@@ -475,23 +497,21 @@ in the following example the number \type {8} gets typeset.
}
\stoptyping
-The \type {\luafunctioncall} primitive does the same but is unexpandable, for instance
-in an \type {\edef}.
+The \lpr {luafunctioncall} primitive does the same but is unexpandable, for
+instance in an \prm {edef}.
\section {Alignments}
-\subsection{\tex {alignmark}}
+\subsection{\lpr {alignmark} and \lpr {aligntab}}
-This primitive duplicates the functionality of \type {#} inside alignment
-preambles.
-
-\subsection{\tex {aligntab}}
-
-This primitive duplicates the functionality of \type {&} inside alignments and
-preambles.
+The primitive \lpr {alignmark} duplicates the functionality of \type {#} inside
+alignment preambles, while \lpr {aligntab} duplicates the functionality of \type
+{&}.
\section{Catcode tables}
+\topicindex {catcodes}
+
Catcode tables are a new feature that allows you to switch to a predefined
catcode regime in a single statement. You can have a practically unlimited number
of different tables. This subsystem is backward compatible: if you never use the
@@ -500,48 +520,50 @@ compared to traditional \TEX. The contents of each catcode table is independent
from any other catcode tables, and their contents is stored and retrieved from
the format file.
-\subsection{\type {\catcodetable}}
+\subsection{\lpr {catcodetable}}
\startsyntax
\catcodetable <15-bit number>
\stopsyntax
-The primitive \type {\catcodetable} switches to a different catcode table. Such a
+The primitive \lpr {catcodetable} switches to a different catcode table. Such a
table has to be previously created using one of the two primitives below, or it
has to be zero. Table zero is initialized by \INITEX.
-\subsection{\type {\initcatcodetable}}
+\subsection{\lpr {initcatcodetable}}
\startsyntax
\initcatcodetable <15-bit number>
\stopsyntax
-The primitive \type {\initcatcodetable} creates a new table with catcodes identical
-to those defined by \INITEX:
-
-\starttabulate[|r|l|l|l|]
-\NC 0 \NC \tttf \letterbackslash \NC \NC \type {escape} \NC\NR
-\NC 5 \NC \tttf \letterhat\letterhat M \NC return \NC \type {car_ret} \NC\NR
-\NC 9 \NC \tttf \letterhat\letterhat @ \NC null \NC \type {ignore} \NC\NR
-\NC 10 \NC \tttf <space> \NC space \NC \type {spacer} \NC\NR
-\NC 11 \NC {\tttf a} \endash\ {\tttf z} \NC \NC \type {letter} \NC\NR
-\NC 11 \NC {\tttf A} \endash\ {\tttf Z} \NC \NC \type {letter} \NC\NR
-\NC 12 \NC everything else \NC \NC \type {other} \NC\NR
-\NC 14 \NC \tttf \letterpercent \NC \NC \type {comment} \NC\NR
-\NC 15 \NC \tttf \letterhat\letterhat ? \NC delete \NC \type {invalid_char} \NC\NR
+The primitive \lpr {initcatcodetable} creates a new table with catcodes
+identical to those defined by \INITEX. The new catcode table is allocated
+globally: it will not go away after the current group has ended. If the supplied
+number is identical to the currently active table, an error is raised. The
+initial values are:
+
+\starttabulate[|c|c|l|l|]
+\DB catcode \BC character \BC equivalent \BC category \NC \NR
+\TB
+\NC 0 \NC \tttf \letterbackslash \NC \NC \type {escape} \NC \NR
+\NC 5 \NC \tttf \letterhat\letterhat M \NC return \NC \type {car_ret} \NC \NR
+\NC 9 \NC \tttf \letterhat\letterhat @ \NC null \NC \type {ignore} \NC \NR
+\NC 10 \NC \tttf <space> \NC space \NC \type {spacer} \NC \NR
+\NC 11 \NC {\tttf a} \endash\ {\tttf z} \NC \NC \type {letter} \NC \NR
+\NC 11 \NC {\tttf A} \endash\ {\tttf Z} \NC \NC \type {letter} \NC \NR
+\NC 12 \NC everything else \NC \NC \type {other} \NC \NR
+\NC 14 \NC \tttf \letterpercent \NC \NC \type {comment} \NC \NR
+\NC 15 \NC \tttf \letterhat\letterhat ? \NC delete \NC \type {invalid_char} \NC \NR
+\LL
\stoptabulate
-The new catcode table is allocated globally: it will not go away after the
-current group has ended. If the supplied number is identical to the currently
-active table, an error is raised.
-
-\subsection{\type {\savecatcodetable}}
+\subsection{\lpr {savecatcodetable}}
\startsyntax
\savecatcodetable <15-bit number>
\stopsyntax
-\type {\savecatcodetable} copies the current set of catcodes to a new table with
+\lpr {savecatcodetable} copies the current set of catcodes to a new table with
the requested number. The definitions in this new table are all treated as if
they were made in the outermost level.
@@ -551,53 +573,64 @@ raised.
\section{Suppressing errors}
-\subsection{\type {\suppressfontnotfounderror}}
+\subsection{\lpr {suppressfontnotfounderror}}
+
+\topicindex {errors}
If this integer parameter is non|-|zero, then \LUATEX\ will not complain about
font metrics that are not found. Instead it will silently skip the font
-assignment, making the requested csname for the font \type {\ifx} equal to \type
-{\nullfont}, so that it can be tested against that without bothering the user.
+assignment, making the requested csname for the font \prm {ifx} equal to \prm
+{nullfont}, so that it can be tested against that without bothering the user.
\startsyntax
\suppressfontnotfounderror = 1
\stopsyntax
-\subsection{\type {\suppresslongerror}}
+\subsection{\lpr {suppresslongerror}}
+
+\topicindex {errors}
If this integer parameter is non|-|zero, then \LUATEX\ will not complain about
-\type {\par} commands encountered in contexts where that is normally prohibited
-(most prominently in the arguments of non-long macros).
+\prm {par} commands encountered in contexts where that is normally prohibited
+(most prominently in the arguments of macros not defined as \prm {long}).
\startsyntax
\suppresslongerror = 1
\stopsyntax
-\subsection{\type {\suppressifcsnameerror}}
+\subsection{\lpr {suppressifcsnameerror}}
+
+\topicindex {errors}
If this integer parameter is non|-|zero, then \LUATEX\ will not complain about
-non-expandable commands appearing in the middle of a \type {\ifcsname} expansion.
+non-expandable commands appearing in the middle of a \prm {ifcsname} expansion.
Instead, it will keep getting expanded tokens from the input until it encounters
-an \type {\endcsname} command. If the input expansion is unbalanced with respect
-to \type {\csname} \ldots \type {\endcsname} pairs, the \LUATEX\ process may hang
+an \prm {endcsname} command. If the input expansion is unbalanced with respect
+to \prm {csname} \ldots \prm {endcsname} pairs, the \LUATEX\ process may hang
indefinitely.
\startsyntax
\suppressifcsnameerror = 1
\stopsyntax
-\subsection{\type {\suppressoutererror}}
+\subsection{\lpr {suppressoutererror}}
+
+\topicindex {errors}
If this new integer parameter is non|-|zero, then \LUATEX\ will not complain
-about \type {\outer} commands encountered in contexts where that is normally
+about \prm {outer} commands encountered in contexts where that is normally
prohibited.
\startsyntax
\suppressoutererror = 1
\stopsyntax
-\subsection{\type {\suppressmathparerror}}
+\subsection{\lpr {suppressmathparerror}}
+
+\topicindex {errors}
+\topicindex {math}
-The following setting will permit \type {\par} tokens in a math formula:
+The following setting will permit \prm {par} tokens in a math formula:
\startsyntax
\suppressmathparerror = 1
@@ -611,7 +644,10 @@ $ x + 1 =
a $
\stoptyping
-\subsection{\type {\suppressprimitiveerror}}
+\subsection{\lpr {suppressprimitiveerror}}
+
+\topicindex {errors}
+\topicindex {primitives}
When set to a non|-|zero value the following command will not issue an error:
@@ -623,6 +659,8 @@ When set to a non|-|zero value the following command will not issue an error:
\section {Math}
+\topicindex {math}
+
We will cover math extensions in its own chapter because not only the font
subsystem and spacing model have been enhanced (thereby introducing many new
primitives) but also because some more control has been added to existing
@@ -633,6 +671,8 @@ functionality. Much of this relates to the differences approaches of traditional
\subsection{Font syntax}
+\topicindex {fonts}
+
\LUATEX\ will accept a braced argument as a font name:
\starttyping
@@ -642,20 +682,24 @@ functionality. Much of this relates to the differences approaches of traditional
This allows for embedded spaces, without the need for double quotes. Macro
expansion takes place inside the argument.
-\subsection{\type {\fontid}}
+\subsection{\lpr {fontid} and \lpr {setfontid}}
\startsyntax
\fontid\font
\stopsyntax
This primitive expands into a number. It is not a register so there is no need to
-prefix with \type {\number} (and using \type {\the} gives an error). The currently
+prefix with \prm {number} (and using \prm {the} gives an error). The currently
used font id is \fontid\font. Here are some more:
-\starttabulate[|l|c|]
-\NC \type {\bf} \NC \bf \fontid\font \NC \NR
-\NC \type {\it} \NC \it \fontid\font \NC \NR
-\NC \type {\bi} \NC \bi \fontid\font \NC \NR
+\starttabulate[|l|c|c|]
+\DB style \BC command \BC font id \NC \NR
+\TB
+\NC normal \NC \type {\tf} \NC \bf \fontid\font \NC \NR
+\NC bold \NC \type {\bf} \NC \bf \fontid\font \NC \NR
+\NC italic \NC \type {\it} \NC \it \fontid\font \NC \NR
+\NC bold italic \NC \type {\bi} \NC \bi \fontid\font \NC \NR
+\LL
\stoptabulate
These numbers depend on the macro package used because each one has its own way
@@ -664,12 +708,13 @@ order of loading fonts. For instance, when in \CONTEXT\ virtual math \UNICODE\
fonts are used, we can easily get over a hundred ids in use. Not all ids have to
be bound to a real font, after all it's just a number.
-\subsection{\type {\setfontid}}
+The primitive \lpr {setfontid} can be used to enable a font with the given id,
+which of course needs to be a valid one.
-The primitive \type {\setfontid} can be used to enable a font with the given id
-(which of course needs to be a valid one).
+\subsection{\lpr {noligs} and \lpr {nokerns}}
-\subsection{\type {\noligs} and \type {\nokerns}}
+\topicindex {ligatures+suppress}
+\topicindex {kerns+suppress}
These primitives prohibit ligature and kerning insertion at the time when the
initial node list is built by \LUATEX's main control loop. You can enable these
@@ -688,13 +733,15 @@ omit the kern and ligature tables, which has the same effect as the above.
\subsection{\type{\nospaces}}
-This new primitive can be used to overrule the usual \type {\spaceskip}
-related heuristics when a space character is seen in a text flow. The
-value~\type{1} triggers no injection while \type{2} results in injection of
-a zero skip. Below we see the results for four characters separated by a
+\topicindex {spaces+suppress}
+
+This new primitive can be used to overrule the usual \prm {spaceskip} related
+heuristics when a space character is seen in a text flow. The value~\type{1}
+triggers no injection while \type{2} results in injection of a zero skip. In \in
+{figure} [fig:nospaces] we see the results for four characters separated by a
space.
-\startlinecorrection
+\startplacefigure[reference=fig:nospaces,title={The \lpr {nospaces} options.}]
\startcombination[3*2]
{\ruledhbox to 5cm{\vtop{\hsize 10mm\nospaces=0\relax x x x x \par}\hss}} {\type {0 / hsize 10mm}}
{\ruledhbox to 5cm{\vtop{\hsize 10mm\nospaces=1\relax x x x x \par}\hss}} {\type {1 / hsize 10mm}}
@@ -703,24 +750,26 @@ space.
{\ruledhbox to 5cm{\vtop{\hsize 1mm\nospaces=1\relax x x x x \par}\hss}} {\type {1 / hsize 1mm}}
{\ruledhbox to 5cm{\vtop{\hsize 1mm\nospaces=2\relax x x x x \par}\hss}} {\type {2 / hsize 1mm}}
\stopcombination
-\stoplinecorrection
+\stopplacefigure
\section{Tokens, commands and strings}
-\subsection{\type {\scantextokens}}
+\subsection{\lpr {scantextokens}}
+
+\topicindex {tokens+scanning}
-The syntax of \type {\scantextokens} is identical to \type {\scantokens}. This
-primitive is a slightly adapted version of \ETEX's \type {\scantokens}. The
+The syntax of \lpr {scantextokens} is identical to \prm {scantokens}. This
+primitive is a slightly adapted version of \ETEX's \prm {scantokens}. The
differences are:
\startitemize
\startitem
- The last (and usually only) line does not have a \type {\endlinechar}
+ The last (and usually only) line does not have a \prm {endlinechar}
appended.
\stopitem
\startitem
- \type {\scantextokens} never raises an EOF error, and it does not execute
- \type {\everyeof} tokens.
+ \lpr {scantextokens} never raises an EOF error, and it does not execute
+ \prm {everyeof} tokens.
\stopitem
\startitem
There are no \quote {\unknown\ while end of file \unknown} error tests
@@ -729,7 +778,7 @@ differences are:
\stopitem
\stopitemize
-\subsection{\type {\toksapp}, \type {\tokspre}, \type {\etoksapp} and \type {\etokspre}}
+\subsection{\lpr {toksapp}, \lpr {tokspre}, \lpr {etoksapp} and \lpr {etokspre}}
Instead of:
@@ -746,13 +795,13 @@ you can use:
The \type {pre} variants prepend instead of append, and the \type {e} variants
expand the passed general text.
-\subsection{\type {\csstring}, \type {\begincsname} and \type {\lastnamedcs}}
+\subsection{\prm {csstring}, \lpr {begincsname} and \lpr {lastnamedcs}}
-These are somewhat special. The \type {\csstring} primitive is like
-\type {\string} but it omits the leading escape character. This can be
+These are somewhat special. The \prm {csstring} primitive is like
+\prm {string} but it omits the leading escape character. This can be
somewhat more efficient that stripping it of afterwards.
-The \type {\begincsname} primitive is like \type {\csname} but doesn't create
+The \lpr {begincsname} primitive is like \prm {csname} but doesn't create
a relaxed equivalent when there is no such name. It is equivalent to
\starttyping
@@ -762,7 +811,7 @@ a relaxed equivalent when there is no such name. It is equivalent to
\stoptyping
The advantage is that it saves a lookup (don't expect much speedup) but more
-important is that it avoids using the \type {\if} test. The \type {\lastnamedcs}
+important is that it avoids using the \prm {if} test. The \lpr {lastnamedcs}
is one that should be used with care. The above example could be written as:
\starttyping
@@ -775,7 +824,9 @@ This is slightly more efficient than constructing the string twice (deep down in
\LUATEX\ this also involves some \UTF8 juggling), but probably more relevant is
that it saves a few tokens and can make code a bit more more readable.
-\subsection{\type {\clearmarks}}
+\subsection{\lpr {clearmarks}}
+
+\topicindex {marks}
This primitive complements the \ETEX\ mark primitives and clears a mark class
completely, resetting all three connected mark texts to empty. It is an
@@ -794,11 +845,13 @@ This primitive can be used to assign a meaning to an active character, as in:
\stoptyping
This can be a bit nicer that using the uppercase tricks (using the property of
-\type {\uppercase} that it treats active characters special).
+\prm {uppercase} that it treats active characters special).
\section{Boxes, rules and leaders}
-\subsection{\type {\outputbox}}
+\subsection{\lpr {outputbox}}
+
+\topicindex {output}
This integer parameter allows you to alter the number of the box that will be
used to store the page sent to the output routine. Its default value is 255, and
@@ -808,47 +861,50 @@ the acceptable range is from 0 to 65535.
\outputbox = 12345
\stopsyntax
-\subsection{\type {\vpack}, \type {\hpack} and \type {\tpack}}
+\subsection{\prm {vpack}, \prm {hpack} and \prm {tpack}}
-These three primitives are like \type {\vbox}, \type {\hbox} and \type {\vtop}
+These three primitives are like \prm {vbox}, \prm {hbox} and \prm {vtop}
but don't apply the related callbacks.
-\subsection{\type {\vsplit}}
+\subsection{\prm {vsplit}}
-The \type {\vsplit} primitive has to be followed by a specification of the
-required height. As alternative for the \type {to} keyword you can use \type
-{upto} to get a split of the given size but result has the natural dimensions
-then.
+\topicindex {splitting}
-\subsection{Images and Forms}
+The \prm {vsplit} primitive has to be followed by a specification of the required
+height. As alternative for the \type {to} keyword you can use \type {upto} to get
+a split of the given size but result has the natural dimensions then.
+
+\subsection[sec:imagedandforms]{Images and Forms}
These two concepts are now core concepts and no longer whatsits. They are in fact
now implemented as rules with special properties. Normal rules have subtype~0,
saved boxes have subtype~1 and images have subtype~2. This has the positive side
-effect that whenever we need to take content with dimensions into account, when we
-look at rule nodes, we automatically also deal with these two types.
+effect that whenever we need to take content with dimensions into account, when
+we look at rule nodes, we automatically also deal with these two types.
The syntax of the \type {\save...resource} is the same as in \PDFTEX\ but you
should consider them to be backend specific. This means that a macro package
should treat them as such and check for the current output mode if applicable.
-Here are the equivalents:
-\starttabulate[|l|l|]
-\NC \type {\saveboxresource} \EQ \type {\pdfxform} \NC \NR
-\NC \type {\saveimageresource} \EQ \type {\pdfximage} \NC \NR
-\NC \type {\useboxresource} \EQ \type {\pdfrefxform} \NC \NR
-\NC \type {\useimageresource} \EQ \type {\pdfrefximage} \NC \NR
-\NC \type {\lastsavedboxresourceindex} \EQ \type {\pdflastxform} \NC \NR
-\NC \type {\lastsavedimageresourceindex} \EQ \type {\pdflastximage} \NC \NR
-\NC \type {\lastsavedimageresourcepages} \EQ \type {\pdflastximagepages} \NC \NR
+\starttabulate[|l|p|]
+\DB command \BC explanation \NC \NR
+\TB
+\NC \lpr {saveboxresource} \NC save the box as an object to be included later \NC \NR
+\NC \lpr {saveimageresource} \NC save the image as an object to be includes later \NC \NR
+\NC \lpr {useboxresource} \NC include the saved box object here (by index) \NC \NR
+\NC \lpr {useimageresource} \NC include the saved image object here (by index) \NC \NR
+\NC \lpr {lastsavedboxresourceindex} \NC the index of the last saved box object \NC \NR
+\NC \lpr {lastsavedimageresourceindex} \NC the index of the last saved image object \NC \NR
+\NC \lpr {lastsavedimageresourcepages} \NC the number of pages in the last saved image object \NC \NR
+\LL
\stoptabulate
\LUATEX\ accepts optional dimension parameters for \type {\use...resource} in the
same format as for rules. With images, these dimensions are then used instead of
-the ones given to \type {\useimageresource} but the original dimensions are not
-overwritten, so that a \type {\useimageresource} without dimensions still
-provides the image with dimensions defined by \type {\saveimageresource}. These
-optional parameters are not implemented for \type {\saveboxresource}.
+the ones given to \lpr {useimageresource} but the original dimensions are not
+overwritten, so that a \lpr {useimageresource} without dimensions still
+provides the image with dimensions defined by \lpr {saveimageresource}. These
+optional parameters are not implemented for \lpr {saveboxresource}.
\starttyping
\useimageresource width 20mm height 10mm depth 5mm \lastsavedimageresourceindex
@@ -861,35 +917,41 @@ is the \type {type} key. When set to non|-|zero the \type {/Type} entry is
omitted. A value of 1 or 3 still writes a \type {/BBox}, while 2 or 3 will write
a \type {/Matrix}.
-\subsection{\type {\nohrule} and \type {\novrule}}
+\subsection{\lpr {nohrule} and \lpr {novrule}}
+
+\topicindex {rules}
Because introducing a new keyword can cause incompatibilities, two new primitives
-were introduced: \type {\nohrule} and \type {\novrule}. These can be used to
+were introduced: \lpr {nohrule} and \lpr {novrule}. These can be used to
reserve space. This is often more efficient than creating an empty box with fake
dimensions).
-\subsection{\type {\gleaders}}
+\subsection{\lpr {gleaders}}
+
+\topicindex {leaders}
This type of leaders is anchored to the origin of the box to be shipped out. So
-they are like normal \type {\leaders} in that they align nicely, except that the
+they are like normal \prm {leaders} in that they align nicely, except that the
alignment is based on the {\it largest\/} enclosing box instead of the {\it
smallest\/}. The \type {g} stresses this global nature.
\section {Languages}
-\subsection{\type {\hyphenationmin}}
+\subsection{\lpr {hyphenationmin}}
+
+\topicindex {languages}
+\topicindex {hyphenation}
This primitive can be used to set the minimal word length, so setting it to a value
of~$5$ means that only words of 6 characters and more will be hyphenated, of course
-within the constraints of the \type {\lefthyphenmin} and \type {\righthyphenmin}
+within the constraints of the \prm {lefthyphenmin} and \prm {righthyphenmin}
values (as stored in the glyph node). This primitive accepts a number and stores
the value with the language.
-\subsection{\type {\boundary}, \type {\noboundary}, \type {\protrusionboundary} and \type
-{\wordboundary}}
+\subsection{\prm {boundary}, \prm {noboundary}, \prm {protrusionboundary} and \prm {wordboundary}}
-The \type {\noboundary} commands used to inject a whatsit node but now injects a normal
-node with type \type {boundary} and subtype~0. In addition you can say:
+The \prm {noboundary} commands used to inject a whatsit node but now injects a normal
+node with type \nod {boundary} and subtype~0. In addition you can say:
\starttyping
x\boundary 123\relax y
@@ -906,21 +968,29 @@ related primitives.
\subsection {Tracing}
-If \type {\tracingonline} is larger than~2, the node list display will also print
+\topicindex {tracing}
+
+If \prm {tracingonline} is larger than~2, the node list display will also print
the node number of the nodes.
-\subsection{\type {\outputmode}}
+\subsection{\lpr {outputmode}}
-The \type {\outputmode} variable tells \LUATEX\ what it has to produce:
+\topicindex {output}
+\topicindex {backend}
+
+The \lpr {outputmode} variable tells \LUATEX\ what it has to produce:
\starttabulate[|l|l|]
+\DB value \BC output \NC \NR
+\TB
\NC \type {0} \NC \DVI\ code \NC \NR
\NC \type {1} \NC \PDF\ code \NC \NR
+\LL
\stoptabulate
-\subsection{\type {\draftmode}}
+\subsection{\lpr {draftmode}}
-The value of the \type {\draftmode} counter signals the backend if it should
+The value of the \lpr {draftmode} counter signals the backend if it should
output less. The \PDF\ backend accepts a value of~1, while the \DVI\ backend
ignores the value.
@@ -928,6 +998,8 @@ ignores the value.
\subsection{File syntax}
+\topicindex {files+names}
+
\LUATEX\ will accept a braced argument as a file name:
\starttyping
@@ -938,23 +1010,28 @@ ignores the value.
This allows for embedded spaces, without the need for double quotes. Macro
expansion takes place inside the argument.
-The \type {\tracingfonts} primitive that has been inherited from \PDFTEX\ has
+The \lpr {tracingfonts} primitive that has been inherited from \PDFTEX\ has
been adapted to support variants in reporting the font. The reason for this
extension is that a csname not always makes sense. The zero case is the default.
-\starttabulate[|T||]
-\NC 0 \EQ \type{\foo xyz} \NC \NR
-\NC 1 \EQ \type{\foo (bar)} \NC \NR
-\NC 2 \EQ \type{<bar> xyz} \NC \NR
-\NC 3 \EQ \type{<bar @ ..pt> xyz} \NC \NR
-\NC 4 \EQ \type{<id>} \NC \NR
-\NC 5 \EQ \type{<id: bar>} \NC \NR
-\NC 6 \EQ \type{<id: bar @ ..pt> xyz} \NC \NR
+\starttabulate[|l|l|]
+\DB value \BC reported \NC \NR
+\TB
+\NC \type{0} \NC \type{\foo xyz} \NC \NR
+\NC \type{1} \NC \type{\foo (bar)} \NC \NR
+\NC \type{2} \NC \type{<bar> xyz} \NC \NR
+\NC \type{3} \NC \type{<bar @ ..pt> xyz} \NC \NR
+\NC \type{4} \NC \type{<id>} \NC \NR
+\NC \type{5} \NC \type{<id: bar>} \NC \NR
+\NC \type{6} \NC \type{<id: bar @ ..pt> xyz} \NC \NR
+\LL
\stoptabulate
\subsection{Writing to file}
-You can now open upto 127 files with \type {\openout}. When no file is open
+\topicindex {files+writing}
+
+You can now open upto 127 files with \prm {openout}. When no file is open
writes will go to the console and log. As a consequence a system command is
no longer possible but one can use \type {os.execute} to do the same.
diff --git a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
index d3932a30b..8480d7f2f 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
@@ -8,22 +8,24 @@
\section {The font tables}
+\topicindex {fonts}
+\topicindex {fonts+tables}
+
All \TEX\ fonts are represented to \LUA\ code as tables, and internally as
\CCODE~structures. All keys in the table below are saved in the internal font
-structure if they are present in the table returned by the \type {define_font}
+structure if they are present in the table returned by the \cbk {define_font}
callback, or if they result from the normal \TFM|/|\VF\ reading routines if there
-is no \type {define_font} callback defined.
+is no \cbk {define_font} callback defined.
The column \quote {\VF} means that this key will be created by the \type
{font.read_vf()} routine, \quote {\TFM} means that the key will be created by the
-\type {font.read_tfm()} routine, and \quote{used} means whether or not the
-\LUATEX\ engine itself will do something with the key.
-
-The top|-|level keys in the table are as follows:
+\type {font.read_tfm()} routine, and \quote {used} means whether or not the
+\LUATEX\ engine itself will do something with the key. The top|-|level keys in
+the table are as follows:
\starttabulate[|l|c|c|c|l|pl|]
\DB key \BC vf \BC tfm \BC used \BC value type \BC description \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{name} \NC yes \NC yes \NC yes \NC string \NC metric (file) name \NC \NR
\NC \type{area} \NC no \NC yes \NC yes \NC string \NC (directory) location, typically empty \NC \NR
\NC \type{used} \NC no \NC yes \NC yes \NC boolean \NC indicates usage (initial: false) \NC \NR
@@ -42,24 +44,21 @@ The top|-|level keys in the table are as follows:
\NC \type{fullname} \NC no \NC no \NC yes \NC string \NC output font name, used as a fallback in the \PDF\ output
if the \type {psname} is not set \NC \NR
\NC \type{header} \NC yes \NC no \NC no \NC string \NC header comments, if any \NC \NR
-\NC \type{hyphenchar} \NC no \NC no \NC yes \NC number \NC default: \TEX's \type {\hyphenchar} \NC \NR
+\NC \type{hyphenchar} \NC no \NC no \NC yes \NC number \NC default: \TEX's \prm {hyphenchar} \NC \NR
\NC \type{parameters} \NC no \NC yes \NC yes \NC hash \NC default: 7 parameters, all zero \NC \NR
\NC \type{size} \NC no \NC yes \NC yes \NC number \NC loaded (at) size. (default: same as designsize) \NC \NR
-\NC \type{skewchar} \NC no \NC no \NC yes \NC number \NC default: \TEX's \type {\skewchar} \NC \NR
+\NC \type{skewchar} \NC no \NC no \NC yes \NC number \NC default: \TEX's \prm {skewchar} \NC \NR
\NC \type{type} \NC yes \NC no \NC yes \NC string \NC basic type of this font \NC \NR
\NC \type{format} \NC no \NC no \NC yes \NC string \NC disk format type \NC \NR
\NC \type{embedding} \NC no \NC no \NC yes \NC string \NC \PDF\ inclusion \NC \NR
\NC \type{filename} \NC no \NC no \NC yes \NC string \NC the name of the font on disk \NC \NR
\NC \type{tounicode} \NC no \NC yes \NC yes \NC number \NC When this is set to~1 \LUATEX\ assumes per|-|glyph
tounicode entries are present in the font. \NC \NR
-\NC \type{stretch} \NC no \NC no \NC yes \NC number \NC the \quote {stretch} value from \type
- {\expandglyphsinfont} \NC \NR
-\NC \type{shrink} \NC no \NC no \NC yes \NC number \NC the \quote {shrink} value from \type
- {\expandglyphsinfont} \NC \NR
-\NC \type{step} \NC no \NC no \NC yes \NC number \NC the \quote {step} value from \type
- {\expandglyphsinfont} \NC \NR
+\NC \type{stretch} \NC no \NC no \NC yes \NC number \NC the \quote {stretch} value from \lpr {expandglyphsinfont} \NC \NR
+\NC \type{shrink} \NC no \NC no \NC yes \NC number \NC the \quote {shrink} value from \lpr {expandglyphsinfont} \NC \NR
+\NC \type{step} \NC no \NC no \NC yes \NC number \NC the \quote {step} value from \lpr {expandglyphsinfont} \NC \NR
\NC \type{expansion_factor} \NC no \NC no \NC no \NC number \NC the actual expansion factor of an expanded font \NC \NR
-\NC \type{attributes} \NC no \NC no \NC yes \NC string \NC the \type {\pdffontattr} \NC \NR
+\NC \type{attributes} \NC no \NC no \NC yes \NC string \NC the \orm {pdffontattr} \NC \NR
\NC \type{cache} \NC no \NC no \NC yes \NC string \NC This key controls caching of the \LUA\ table on the
\TEX\ end where \type {yes} means: use a reference to
the table that is passed to \LUATEX\ (this is the
@@ -88,18 +87,18 @@ The top|-|level keys in the table are as follows:
\NC \type{mode} \NC no \NC no \NC yes \NC number \NC The backend will inject \PDF\ operators that relate to the
drawing mode with 0~being a fill, 1~being an outline,
2~both draw and fill and 3~no painting at all. \NC \NR
+\LL
\stoptabulate
The saved reference in the \type {cache} option is thread|-|local, so be careful
when you are using coroutines: an error will be thrown if the table has been
cached in one thread, but you reference it from another thread.
-
The key \type {name} is always required. The keys \type {stretch}, \type
{shrink}, \type {step} only have meaning when used together: they can be used to
-replace a post|-|loading \type {\expandglyphsinfont} command. The \type
-{auto_expand} option is not supported in \LUATEX. In fact, the primitives
-that create expanded or protruding copies are probably only useful when used with
+replace a post|-|loading \lpr {expandglyphsinfont} command. The \type
+{auto_expand} option is not supported in \LUATEX. In fact, the primitives that
+create expanded or protruding copies are probably only useful when used with
traditional fonts because all these extra \OPENTYPE\ properties are kept out of
the picture. The \type {expansion_factor} is value that can be present inside a
font in \type {font.fonts}. It is the actual expansion factor (a value between
@@ -126,11 +125,12 @@ possibilities:
\starttabulate[|Tc|c|Tc|c|Tc|c|Tc|c|]
\DB \# \BC dir \BC \# \BC dir \BC \# \BC dir \BC \# \BC dir \NC \NR
-\TB[small,samepage]
+\TB
\NC 0 \NC LT \NC 4 \NC RT \NC 8 \NC TT \NC 12 \NC BT \NC \NR
\NC 1 \NC LL \NC 5 \NC RL \NC 9 \NC TL \NC 13 \NC BL \NC \NR
\NC 2 \NC LB \NC 6 \NC RB \NC 10 \NC TB \NC 14 \NC BB \NC \NR
\NC 3 \NC LR \NC 7 \NC RR \NC 11 \NC TR \NC 15 \NC BR \NC \NR
+\LL
\stoptabulate
These are \OMEGA|-|style direction abbreviations: the first character indicates
@@ -148,7 +148,7 @@ The names and their internal remapping are:
\starttabulate[|l|c|]
\DB name \BC remapping \NC \NR
-\TB[small,samepage]
+\TB
\NC \type {slant} \NC 1 \NC \NR
\NC \type {space} \NC 2 \NC \NR
\NC \type {space_stretch} \NC 3 \NC \NR
@@ -156,6 +156,7 @@ The names and their internal remapping are:
\NC \type {x_height} \NC 5 \NC \NR
\NC \type {quad} \NC 6 \NC \NR
\NC \type {extra_space} \NC 7 \NC \NR
+\LL
\stoptabulate
The keys \type {type}, \type {format}, \type {embedding}, \type {fullname} and
@@ -198,16 +199,16 @@ The following top|-|level keys can be present inside a character hash:
\starttabulate[|l|c|c|c|l|p|]
\DB key \BC vf \BC tfm \BC used \BC type \BC description \NC\NR
-\TB[small,samepage]
+\TB
\NC \type{width} \NC yes \NC yes \NC yes \NC number \NC character's width, in sp (default 0) \NC\NR
\NC \type{height} \NC no \NC yes \NC yes \NC number \NC character's height, in sp (default 0) \NC\NR
\NC \type{depth} \NC no \NC yes \NC yes \NC number \NC character's depth, in sp (default 0) \NC\NR
\NC \type{italic} \NC no \NC yes \NC yes \NC number \NC character's italic correction, in sp (default zero) \NC\NR
\NC \type{top_accent} \NC no \NC no \NC maybe \NC number \NC character's top accent alignment place, in sp (default zero) \NC\NR
\NC \type{bot_accent} \NC no \NC no \NC maybe \NC number \NC character's bottom accent alignment place, in sp (default zero) \NC\NR
-\NC \type{left_protruding} \NC no \NC no \NC maybe \NC number \NC character's \type {\lpcode} \NC\NR
-\NC \type{right_protruding} \NC no \NC no \NC maybe \NC number \NC character's \type {\rpcode} \NC\NR
-\NC \type{expansion_factor} \NC no \NC no \NC maybe \NC number \NC character's \type {\efcode} \NC\NR
+\NC \type{left_protruding} \NC no \NC no \NC maybe \NC number \NC character's \lpr {lpcode} \NC\NR
+\NC \type{right_protruding} \NC no \NC no \NC maybe \NC number \NC character's \lpr {rpcode} \NC\NR
+\NC \type{expansion_factor} \NC no \NC no \NC maybe \NC number \NC character's \lpr {efcode} \NC\NR
\NC \type{tounicode} \NC no \NC no \NC maybe \NC string \NC character's \UNICODE\ equivalent(s), in \UTF|-|16BE hexadecimal format \NC\NR
\NC \type{next} \NC no \NC yes \NC yes \NC number \NC the \quote {next larger} character index \NC\NR
\NC \type{extensible} \NC no \NC yes \NC yes \NC table \NC the constituent parts of an extensible recipe \NC\NR
@@ -220,23 +221,21 @@ The following top|-|level keys can be present inside a character hash:
\NC \type{index} \NC no \NC no \NC yes \NC number \NC the (\OPENTYPE\ or \TRUETYPE) font glyph index \NC\NR
\NC \type{used} \NC no \NC yes \NC yes \NC boolean \NC typeset already (default: false) \NC\NR
\NC \type{mathkern} \NC no \NC no \NC yes \NC table \NC math cut-in specifications \NC\NR
+\LL
\stoptabulate
The values of \type {top_accent}, \type {bot_accent} and \type {mathkern} are
used only for math accent and superscript placement, see the \at {math chapter}
[math] in this manual for details. The values of \type {left_protruding} and
-\type {right_protruding} are used only when \type {\protrudechars} is non-zero.
+\type {right_protruding} are used only when \lpr {protrudechars} is non-zero.
Whether or not \type {expansion_factor} is used depends on the font's global
-expansion settings, as well as on the value of \type {\adjustspacing}.
+expansion settings, as well as on the value of \lpr {adjustspacing}.
-The usage of \type {tounicode} is this: if this font specifies a \type
-{tounicode=1} at the top level, then \LUATEX\ will construct a \type {/ToUnicode}
-entry for the \PDF\ font (or font subset) based on the character|-|level \type
-{tounicode} strings, where they are available. If a character does not have a
+The usage of \type {tounicode} is this: if this font specifies a \type {tounicode=1} at the top level, then \LUATEX\ will construct a \type {/ToUnicode}
+entry for the \PDF\ font (or font subset) based on the character|-|level \type {tounicode} strings, where they are available. If a character does not have a
sensible \UNICODE\ equivalent, do not provide a string either (no empty strings).
-If the font level \type {tounicode} is not set, then \LUATEX\ will build up \type
-{/ToUnicode} based on the \TEX\ code points you used, and any character-level
+If the font level \type {tounicode} is not set, then \LUATEX\ will build up \type {/ToUnicode} based on the \TEX\ code points you used, and any character-level
\type {tounicodes} will be ignored. The string format is exactly the format that
is expected by Adobe \CMAP\ files (\UTF-16BE in hexadecimal encoding), minus the
enclosing angle brackets. For instance the \type {tounicode} for a \type {fi}
@@ -251,11 +250,12 @@ very simple:
\starttabulate[|l|l|p|]
\DB key \BC type \BC description \NC\NR
-\TB[small,samepage]
+\TB
\NC \type{top} \NC number \NC top character index \NC\NR
\NC \type{mid} \NC number \NC middle character index \NC\NR
\NC \type{bot} \NC number \NC bottom character index \NC\NR
\NC \type{rep} \NC number \NC repeatable character index \NC\NR
+\LL
\stoptabulate
The \type {horiz_variants} and \type {vert_variants} are arrays of components.
@@ -263,7 +263,7 @@ Each of those components is itself a hash of up to five keys:
\starttabulate[|l|l|p|]
\DB key \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{glyph} \NC number \NC The character index. Note that this is an encoding number, not a name. \NC \NR
\NC \type{extender} \NC number \NC One (1) if this part is repeatable, zero (0) otherwise. \NC \NR
\NC \type{start} \NC number \NC The maximum overlap at the starting side (in scaled points). \NC \NR
@@ -271,6 +271,7 @@ Each of those components is itself a hash of up to five keys:
\NC \type{advance} \NC number \NC The total advance width of this item. It can be zero or missing,
then the natural size of the glyph for character \type {component}
is used. \NC \NR
+\LL
\stoptabulate
The \type {kerns} table is a hash indexed by character index (and \quote
@@ -285,24 +286,24 @@ two fields:
\starttabulate[|l|l|p|]
\DB key \BC type \BC description \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{type} \NC number \NC the type of this ligature command, default 0 \NC \NR
\NC \type{char} \NC number \NC the character index of the resultant ligature \NC \NR
+\LL
\stoptabulate
-The \type {char} field in a ligature is required.
-
-The \type {type} field inside a ligature is the numerical or string value of one
-of the eight possible ligature types supported by \TEX. When \TEX\ inserts a new
-ligature, it puts the new glyph in the middle of the left and right glyphs. The
-original left and right glyphs can optionally be retained, and when at least one
-of them is kept, it is also possible to move the new \quote {insertion point}
-forward one or two places. The glyph that ends up to the right of the insertion
-point will become the next \quote {left}.
+The \type {char} field in a ligature is required. The \type {type} field inside a
+ligature is the numerical or string value of one of the eight possible ligature
+types supported by \TEX. When \TEX\ inserts a new ligature, it puts the new glyph
+in the middle of the left and right glyphs. The original left and right glyphs
+can optionally be retained, and when at least one of them is kept, it is also
+possible to move the new \quote {insertion point} forward one or two places. The
+glyph that ends up to the right of the insertion point will become the next
+\quote {left}.
\starttabulate[|l|c|l|l|]
\DB textual (Knuth) \BC number \BC string \BC result \NC\NR
-\TB[small,samepage]
+\TB
\NC \type{l + r =: n} \NC 0 \NC \type{=:} \NC \type{|n} \NC\NR
\NC \type{l + r =:| n} \NC 1 \NC \type{=:|} \NC \type{|nr} \NC\NR
\NC \type{l + r |=: n} \NC 2 \NC \type{|=:} \NC \type{|ln} \NC\NR
@@ -311,6 +312,7 @@ point will become the next \quote {left}.
\NC \type{l + r |=:> n} \NC 6 \NC \type{|=:>} \NC \type{l|n} \NC\NR
\NC \type{l + r |=:|> n} \NC 7 \NC \type{|=:|>} \NC \type{l|nr} \NC\NR
\NC \type{l + r |=:|>> n} \NC 11 \NC \type{|=:|>>} \NC \type{ln|r} \NC\NR
+\LL
\stoptabulate
The default value is~0, and can be left out. That signifies a \quote {normal}
@@ -321,6 +323,9 @@ The \type {commands} array is explained below.
\section {Real fonts}
+\topicindex {fonts+real}
+\topicindex {fonts+virtual}
+
Whether or not a \TEX\ font is a \quote {real} font that should be written to the
\PDF\ document is decided by the \type {type} value in the top|-|level font
structure. If the value is \type {real}, then this is a proper font, and the
@@ -329,9 +334,10 @@ inclusion mechanism will attempt to add the needed font object definitions to th
\starttabulate[|l|p|]
\DB value \BC description \NC\NR
-\TB[small,samepage]
+\TB
\NC \type{real} \NC this is a base font \NC\NR
\NC \type{virtual} \NC this is a virtual font \NC\NR
+\LL
\stoptabulate
The actions to be taken depend on a number of different variables:
@@ -363,9 +369,7 @@ If no special care is needed, \LUATEX\ falls back to the mapfile|-|based solutio
used by \PDFTEX\ and \DVIPS, so that legacy fonts are supported transparently. If
a \quote {wide} font is used, the new subsystem kicks in, and some extra fields
have to be present in the font structure. In this case, \LUATEX\ does not use a
-map file at all. These extra fields are: \type {format}, \type {embedding}, \type
-{fullname}, \type {cidinfo} (as explained above), \type {filename}, and the \type
-{index} key in the separate characters.
+map file at all. These extra fields are: \type {format}, \type {embedding}, \type {fullname}, \type {cidinfo} (as explained above), \type {filename}, and the \type {index} key in the separate characters.
The \type {format} variable can have the following values. \type {type3} fonts
are provided for backward compatibility only, and do not support the new wide
@@ -373,28 +377,29 @@ encoding options.
\starttabulate[|l|p|]
\DB value \BC description \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{type1} \NC this is a \POSTSCRIPT\ \TYPEONE\ font \NC \NR
\NC \type{type3} \NC this is a bitmapped (\PK) font \NC \NR
\NC \type{truetype} \NC this is a \TRUETYPE\ or \TRUETYPE|-|based \OPENTYPE\ font \NC \NR
\NC \type{opentype} \NC this is a \POSTSCRIPT|-|based \OPENTYPE\ font \NC \NR
+\LL
\stoptabulate
Valid values for the \type {embedding} variable are:
\starttabulate[|l|p|]
\DB value \BC description \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{no} \NC don't embed the font at all \NC \NR
\NC \type{subset} \NC include and atttempt to subset the font \NC \NR
\NC \type{full} \NC include this font in its entirety \NC \NR
+\LL
\stoptabulate
The other fields are used as follows. The \type {fullname} will be the
\POSTSCRIPT|/|\PDF\ font name. The \type {cidinfo} will be used as the character
set: the CID \type {/Ordering} and \type {/Registry} keys. The \type {filename}
-points to the actual font file. If you include the full path in the \type
-{filename} or if the file is in the local directory, \LUATEX\ will run a little
+points to the actual font file. If you include the full path in the \type {filename} or if the file is in the local directory, \LUATEX\ will run a little
bit more efficient because it will not have to re|-|run the \type {find_*_file}
callback in that case.
@@ -418,8 +423,10 @@ viewers handle this right so take \ACROBAT\ as reference.
\subsection{The structure}
+\topicindex {fonts+virtual}
+
You have to take the following steps if you want \LUATEX\ to treat the returned
-table from \type {define_font} as a virtual font:
+table from \cbk {define_font} as a virtual font:
\startitemize[packed]
\startitem
@@ -474,7 +481,7 @@ parameters to that command. The allowed commands and their arguments are:
\starttabulate[|l|l|l|p|]
\DB command \BC arguments \BC type \BC description \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{font} \NC 1 \NC number \NC select a new font from the local \type {fonts} table \NC \NR
\NC \type{char} \NC 1 \NC number \NC typeset this character number from the current font,
and move right by the character's width \NC \NR
@@ -487,16 +494,16 @@ parameters to that command. The allowed commands and their arguments are:
\NC \type{rule} \NC 2 \NC 2 numbers \NC output a rule $ht*wd$, and move right. \NC \NR
\NC \type{down} \NC 1 \NC number \NC move down on the page \NC \NR
\NC \type{right} \NC 1 \NC number \NC move right on the page \NC \NR
-\NC \type{special} \NC 1 \NC string \NC output a \type {\special} command \NC \NR
+\NC \type{special} \NC 1 \NC string \NC output a \prm {special} command \NC \NR
\NC \type{pdf} \NC 2 \NC 2 strings \NC output a \PDF\ literal, the first string is one of \type {origin},
\type {page}, \type {text}, \type {font}, \type {direct} or \type {raw}; if you
have one string only \type {origin} is assumed \NC \NR
\NC \type{lua} \NC 1 \NC string,
function \NC execute a \LUA\ script when the glyph is embedded; in case of a
function it gets the font id and character code passed \NC \NR
-\NC \type{image} \NC 1 \NC image \NC output an image (the argument can be either an \type
- {<image>} variable or an \type {image_spec} table) \NC \NR
+\NC \type{image} \NC 1 \NC image \NC output an image (the argument can be either an \type {<image>} variable or an \type {image_spec} table) \NC \NR
\NC \type{comment} \NC any \NC any \NC the arguments of this command are ignored \NC \NR
+\LL
\stoptabulate
When a font id is set to~0 then it will be replaced by the currently assigned
@@ -513,13 +520,14 @@ from \PDFTEX.
\starttabulate[|l|p|]
\DB mode \BC description \NC \NR
-\TB[small,samepage]
+\TB
\NC \type {origin} \NC enter page mode and set the position \NC \NR
\NC \type {page} \NC enter page mode \NC \NR
\NC \type {text} \NC enter text mode \NC \NR
\NC \type {font} \NC enter font mode (kind of text mode, only in virtual fonts) \NC \NR
\NC \type {always} \NC finish the current string and force a transform if needed \NC \NR
\NC \type {raw} \NC finish the current string \NC \NR
+\LL
\stoptabulate
You always need to check what \PDF\ code is generated because there can be all
@@ -580,6 +588,8 @@ characters that are already present cannot be altered).
\subsection{Example virtual font}
+\topicindex {fonts+virtual}
+
Finally, here is a plain \TEX\ input file with a virtual font demonstration:
\startbuffer
@@ -621,15 +631,16 @@ Finally, here is a plain \TEX\ input file with a virtual font demonstration:
The \type {vf} library can be used when \LUA\ code, as defined in the \type
{commands} of the font, is executed. The functions provided are similar as the
commands: \type {char}, \type {down}, \type {fontid}, \type {image}, \type
-{node}, \type {nop}, \type {pop}, \type {push}, \type {right}, \type {rule},
-\type {special} and \type {pdf}. This library has been present for a while but
-not been advertised and tested much, if only because it's easy to define an
-invalid font (or mess up the \PDF\ stream). Keep in mind that the \LUA\ snippets
-are executed each time when a character is output.
-
+{node}, \type {nop}, \type {pop}, \type {push}, \type {right}, \nod {rule}, \type
+{special} and \type {pdf}. This library has been present for a while but not been
+advertised and tested much, if only because it's easy to define an invalid font
+(or mess up the \PDF\ stream). Keep in mind that the \LUA\ snippets are executed
+each time when a character is output.
\section{The \type {font} library}
+\topicindex {fonts+library}
+
The font library provides the interface into the internals of the font system,
and also it contains helper functions to load traditional \TEX\ font metrics
formats. Other font loading functionality is provided by the \type {fontloader}
@@ -637,6 +648,8 @@ library that will be discussed in the next section.
\subsection{Loading a \TFM\ file}
+\topicindex {fonts+tfm}
+
The behaviour documented in this subsection is considered stable in the sense that
there will not be backward|-|incompatible changes any more.
@@ -662,6 +675,8 @@ The internal structure of the metrics font table that is returned is explained i
\subsection{Loading a \VF\ file}
+\topicindex {fonts+vf}
+
The behavior documented in this subsection is considered stable in the sense that
there will not be backward-incompatible changes any more.
@@ -675,6 +690,8 @@ similar to the ones in the \type {read_tfm} function.
\subsection{The fonts array}
+\topicindex {fonts+virtual}
+
The whole table of \TEX\ fonts is accessible from \LUA\ using a virtual array.
\starttyping
@@ -683,8 +700,7 @@ font.fonts[n] = { ... }
\stoptyping
See \in {chapter} [fonts] for the structure of the tables. Because this is a
-virtual array, you cannot call \type {pairs} on it, but see below for the \type
-{font.each} iterator.
+virtual array, you cannot call \type {pairs} on it, but see below for the \type {font.each} iterator.
The two metatable functions implementing the virtual array are:
@@ -693,8 +709,7 @@ The two metatable functions implementing the virtual array are:
font.setfont(<number> n, <table> f)
\stopfunctioncall
-Note that at the moment, each access to the \type {font.fonts} or call to \type
-{font.getfont} creates a \LUA\ table for the whole font. This process can be quite
+Note that at the moment, each access to the \type {font.fonts} or call to \type {font.getfont} creates a \LUA\ table for the whole font. This process can be quite
slow. In a later version of \LUATEX, this interface will change (it will start
using userdata objects instead of actual tables).
@@ -717,6 +732,8 @@ changed) or \type {nil} (not a valid font at all).
\subsection{Defining a font directly}
+\topicindex {fonts+define}
+
You can define your own font into \type {font.fonts} by calling this function:
\startfunctioncall
@@ -738,6 +755,8 @@ Where the first argument is a reserved font id (see below).
\subsection{Extending a font}
+\topicindex {fonts+extend}
+
Within reasonable bounds you can extend a font after it has been defined. Because
some properties are best left unchanged this is limited to adding characters.
@@ -755,6 +774,8 @@ a more drastic replacer.)
\subsection{Projected next font id}
+\topicindex {fonts+id}
+
\startfunctioncall
<number> i =
font.nextid()
@@ -771,36 +792,37 @@ This can be handy when you create complex virtual fonts.
font.nextid(true)
\stopfunctioncall
-\subsection{Font id}
+\subsection{Font ids}
+
+\topicindex {fonts+id}
+\topicindex {fonts+current}
\startfunctioncall
<number> i =
font.id(<string> csname)
\stopfunctioncall
-This returns the font id associated with \type {csname} string, or $-1$ if \type
+This returns the font id associated with \type {csname}, or $-1$ if \type
{csname} is not defined.
-\subsection{Currently active font}
-
\startfunctioncall
-<number> i = font.current()
-font.current(<number> i)
+<number> i =
+ font.max()
\stopfunctioncall
-This gets or sets the currently used font number.
-
-\subsection{Maximum font id}
+This is the largest used index in \type {font.fonts}.
\startfunctioncall
-<number> i =
- font.max()
+<number> i = font.current()
+font.current(<number> i)
\stopfunctioncall
-This is the largest used index in \type {font.fonts}.
+This gets or sets the currently used font number.
\subsection{Iterating over all fonts}
+\topicindex {fonts+iterate}
+
\startfunctioncall
for i,v in font.each() do
...
diff --git a/doc/context/sources/general/manuals/luatex/luatex-languages.tex b/doc/context/sources/general/manuals/luatex/luatex-languages.tex
index 3254fbfdb..f7413a409 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-languages.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-languages.tex
@@ -6,6 +6,8 @@
\startchapter[reference=languages,title={Languages, characters, fonts and glyphs}]
+\topicindex {languages}
+
\LUATEX's internal handling of the characters and glyphs that eventually become
typeset is quite different from the way \TEX82 handles those same objects. The
easiest way to explain the difference is to focus on unrestricted horizontal mode
@@ -35,7 +37,7 @@ records at all. Instead, language information is passed along using \type
{language whatsit} nodes inside the horizontal list.
In \LUATEX, the situation is quite different. The characters you type are always
-converted into \type {glyph} node records with a special subtype to identify them
+converted into \nod {glyph} node records with a special subtype to identify them
as being intended as linguistic characters. \LUATEX\ stores the needed language
information in those records, but does not do any font|-|related processing at
the time of node creation. It only stores the index of the current font and a
@@ -49,6 +51,10 @@ and finally it adjusts all the subtype identifiers so that the records are \quot
\section[charsandglyphs]{Characters and glyphs}
+\topicindex {characters}
+\topicindex {glyphs}
+\topicindex {hyphenation}
+
\TEX82 (including \PDFTEX) differentiates between \type {char} nodes and \type
{lig} nodes. The former are simple items that contained nothing but a \quote
{character} and a \quote {font} field, and they lived in the same memory as
@@ -57,7 +63,7 @@ indicating whether this ligature was the result of a word boundary, and it was
stored in the same place as other nodes like boxes and kerns and glues.
In \LUATEX, these two types are merged into one, somewhat larger structure called
-a \type {glyph} nodes. Besides having the old character, font, and component
+a \nod {glyph} nodes. Besides having the old character, font, and component
fields there are a few more, like \quote {attr} that we will see in \in {section}
[glyphnodes], these nodes also contain a subtype, that codes four main types and
two additional ghost types. For ligatures, multiple bits can be set at the same
@@ -69,7 +75,7 @@ time (in case of a single|-|glyph word).
(bit 0) is set to 1.
\stopitem
\startitem
- \type {glyph}, for specific font glyphs: the lowest bit (bit 0) is
+ \nod {glyph}, for specific font glyphs: the lowest bit (bit 0) is
not set.
\stopitem
\startitem
@@ -80,36 +86,36 @@ time (in case of a single|-|glyph word).
\stopitem
\startitem
\type {left}, for ligatures created from a left word boundary and for
- ghosts created from \type {\leftghost} bit 3 gets set
+ ghosts created from \lpr {leftghost} bit 3 gets set
\stopitem
\startitem
\type {right}, for ligatures created from a right word boundary and
- for ghosts created from \type {\rightghost} bit 4 is set
+ for ghosts created from \lpr {rightghost} bit 4 is set
\stopitem
\stopitemize
-The \type {glyph} nodes also contain language data, split into four items that
-were current when the node was created: the \type {\setlanguage} (15 bits), \type
-{\lefthyphenmin} (8 bits), \type {\righthyphenmin} (8 bits), and \type {\uchyph}
-(1 bit).
+The \nod {glyph} nodes also contain language data, split into four items that
+were current when the node was created: the \prm {setlanguage} (15 bits), \prm
+{lefthyphenmin} (8 bits), \prm {righthyphenmin} (8 bits), and \prm {uchyph} (1
+bit).
Incidentally, \LUATEX\ allows 16383 separate languages, and words can be 256
characters long. The language is stored with each character. You can set
-\type {\firstvalidlanguage} to for instance~1 and make thereby language~0
+\prm {firstvalidlanguage} to for instance~1 and make thereby language~0
an ignored hyphenation language.
-The new primitive \type {\hyphenationmin} can be used to signal the minimal length
+The new primitive \lpr {hyphenationmin} can be used to signal the minimal length
of a word. This value stored with the (current) language.
-Because the \type {\uchyph} value is saved in the actual nodes, its handling is
-subtly different from \TEX82: changes to \type {\uchyph} become effective
+Because the \prm {uchyph} value is saved in the actual nodes, its handling is
+subtly different from \TEX82: changes to \prm {uchyph} become effective
immediately, not at the end of the current partial paragraph.
Typeset boxes now always have their language information embedded in the nodes
themselves, so there is no longer a possible dependency on the surrounding
language settings. In \TEX82, a mid|-|paragraph statement like \type {\unhbox0}
would process the box using the current paragraph language unless there was a
-\type {\setlanguage} issued inside the box. In \LUATEX, all language variables
+\prm {setlanguage} issued inside the box. In \LUATEX, all language variables
are already frozen.
In traditional \TEX\ the process of hyphenation is driven by \type {lccode}s. In
@@ -117,7 +123,7 @@ In traditional \TEX\ the process of hyphenation is driven by \type {lccode}s. In
possible. When you do nothing, the currently used \type {lccode}s are used, when
loading patterns, setting exceptions or hyphenating a list.
-When you set \type {\savinghyphcodes} to a value greater than zero the current set
+When you set \prm {savinghyphcodes} to a value greater than zero the current set
of \type {lccode}s will be saved with the language. In that case changing a \type
{lccode} afterwards has no effect. However, you can adapt the set with:
@@ -127,10 +133,10 @@ of \type {lccode}s will be saved with the language. In that case changing a \typ
This change is global which makes sense if you keep in mind that the moment that
hyphenation happens is (normally) when the paragraph or a horizontal box is
-constructed. When \type {\savinghyphcodes} was zero when the language got
+constructed. When \prm {savinghyphcodes} was zero when the language got
initialized you start out with nothing, otherwise you already have a set.
-When a \type {\hjcode} is greater than 0 but less than 32 is indicates the
+When a \lpr {hjcode} is greater than 0 but less than 32 is indicates the
to be used length. In the following example we map a character (\type {x}) onto
another one in the patterns and tell the engine that \type {Å“} counts as one
character. Because traditionally zero itself is reserved for inhibiting
@@ -154,10 +160,10 @@ also make the process of setting up thee codes more complex. A solution with
approach is sufficient and it would not be compatible anyway.
Beware: the values are always saved in the format, independent of the setting
-of \type {\savinghyphcodes} at the moment the format is dumped.
+of \prm {savinghyphcodes} at the moment the format is dumped.
A boundary node normally would mark the end of a word which interferes with for
-instance discretionary injection. For this you can use the \type {\wordboundary}
+instance discretionary injection. For this you can use the \prm {wordboundary}
as trigger. Here are a few examples of usage:
\startbuffer
@@ -188,25 +194,27 @@ later on due to messed up ligature building as these dashes are ligatures in bas
fonts. This is a side effect of the separating the hyphenation, ligaturing and
kerning steps.
-The start and end of a characters is signalled by a glue, penalty, kern or boundary
-node. But by default also a hlist, vlist, rule, dir, whatsit, ins, and adjust node
-indicate a start or end. You can omit the last set from the test by setting
-\type {\hyphenationbounds} to a non|-|zero value:
+The start and end of a characters is signalled by a \nod {glue}, \nod {penalty},
+\nod {kern} or \nod {boundary} node. But by default also a \nod {hlist}, \nod
+{vlist}, \nod {rule}, \nod {dir}, \nod {whatsit}, \nod {ins}, and \nod {adjust}
+node indicate a start or end. You can omit the last set from the test by setting
+\lpr {hyphenationbounds} to a non|-|zero value:
-\starttabulate[|l|l|]
+\starttabulate[|c|l|]
\DB value \BC behaviour \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{0} \NC not strict \NC \NR
\NC \type{1} \NC strict start \NC \NR
\NC \type{2} \NC strict end \NC \NR
\NC \type{3} \NC strict start and strict end \NC \NR
+\LL
\stoptabulate
The word start is determined as follows:
\starttabulate[|l|l|]
\DB node \BC behaviour \NC \NR
-\TB[small,samepage]
+\TB
\BC boundary \NC yes when wordboundary \NC \NR
\BC hlist \NC when hyphenationbounds 1 or 3 \NC \NR
\BC vlist \NC when hyphenationbounds 1 or 3 \NC \NR
@@ -217,13 +225,14 @@ The word start is determined as follows:
\BC math \NC skipped \NC \NR
\BC glyph \NC exhyphenchar (one only) : yes (so no -- ---) \NC \NR
\BC otherwise \NC yes \NC \NR
+\LL
\stoptabulate
The word end is determined as follows:
\starttabulate[|l|l|]
\DB node \BC behaviour \NC \NR
-\TB[small,samepage]
+\TB
\BC boundary \NC yes \NC \NR
\BC glyph \NC yes when different language \NC \NR
\BC glue \NC yes \NC \NR
@@ -236,10 +245,11 @@ The word end is determined as follows:
\BC whatsit \NC when hyphenationbounds 2 or 3 \NC \NR
\BC ins \NC when hyphenationbounds 2 or 3 \NC \NR
\BC adjust \NC when hyphenationbounds 2 or 3 \NC \NR
+\LL
\stoptabulate
-\in{Figures}[hb:1] upto \in[hb:5] show some examples. In all cases we set the min
-values to 1 and make sure that the words hyphenate at each character.
+\in {Figures} [hb:1] upto \in [hb:5] show some examples. In all cases we set the
+min values to 1 and make sure that the words hyphenate at each character.
\hyphenation{o-n-e t-w-o}
@@ -258,10 +268,10 @@ values to 1 and make sure that the words hyphenate at each character.
\startplacefigure[reference=hb:1,title={\type{one}}]
\startcombination[4*1]
- {\SomeTest{0}{one}} {\type{0}}
- {\SomeTest{1}{one}} {\type{1}}
- {\SomeTest{2}{one}} {\type{2}}
- {\SomeTest{3}{one}} {\type{3}}
+ {\SomeTest{0}{one}} {\type{0}}
+ {\SomeTest{1}{one}} {\type{1}}
+ {\SomeTest{2}{one}} {\type{2}}
+ {\SomeTest{3}{one}} {\type{3}}
\stopcombination
\stopplacefigure
\startplacefigure[reference=hb:2,title={\type{one\null two}}]
@@ -305,7 +315,7 @@ deal differently with (a sequence of) explicit hyphens. We already have added
some control over aspects of the hyphenation and yet another one concerns
automatic hyphens (e.g.\ \type {-} characters in the input).
-When \type {\automatichyphenmode} has a value of 0, a hyphen will be turned into
+When \lpr {automatichyphenmode} has a value of 0, a hyphen will be turned into
an automatic discretionary. The snippets before and after it will not be
hyphenated. A side effect is that a leading hyphen can lead to a split but one
will seldom run into that situation. Setting a pre and post character makes this
@@ -341,10 +351,10 @@ Input A: \typebuffer[a]
Input B: \typebuffer[b]
Input C: \typebuffer[c]
-As with primitive companions of other single character commands, the \type {\-}
-command has a more verbose primitive version in \type {\explicitdiscretionary}
+As with primitive companions of other single character commands, the \prm {-}
+command has a more verbose primitive version in \lpr {explicitdiscretionary}
and the normally intercepted in the hyphenator character \type {-} (or whatever
-is configured) is available as \type {\automaticdiscretionary}.
+is configured) is available as \lpr {automaticdiscretionary}.
\startbuffer[demo]
\startcombination[nx=4,ny=3,location=top]
@@ -363,13 +373,12 @@ is configured) is available as \type {\automaticdiscretionary}.
\stopcombination
\stopbuffer
-\startplacefigure[reference=automatichyphenmode:1,title={The automatic modes \type {0} (default), \type {1} and \type {2}, with a \type {\hsize}
+\startplacefigure[reference=automatichyphenmode:1,title={The automatic modes \type {0} (default), \type {1} and \type {2}, with a \prm {hsize}
of 6em and 2pt (which triggers a linebreak).}]
\dontcomplain \tt \getbuffer[demo]
\stopplacefigure
-\startplacefigure[reference=automatichyphenmode:2,title={The automatic modes \type {0} (default), \type {1} and \type {2}, with \type
-{\preexhyphenchar} and \type {\postexhyphenchar} set to characters \type {A} and \type {B}.}]
+\startplacefigure[reference=automatichyphenmode:2,title={The automatic modes \type {0} (default), \type {1} and \type {2}, with \lpr {preexhyphenchar} and \lpr {postexhyphenchar} set to characters \type {A} and \type {B}.}]
\postexhyphenchar`A\relax
\preexhyphenchar `B\relax
\dontcomplain \tt \getbuffer[demo]
@@ -377,26 +386,29 @@ of 6em and 2pt (which triggers a linebreak).}]
\section{The main control loop}
+\topicindex {main loop}
+\topicindex {hyphenation}
+
In \LUATEX's main loop, almost all input characters that are to be typeset are
-converted into \type {glyph} node records with subtype \quote {character}, but
+converted into \nod {glyph} node records with subtype \quote {character}, but
there are a few exceptions.
\startitemize[n]
\startitem
- The \type {\accent} primitives creates nodes with subtype \quote {glyph}
+ The \prm {accent} primitives creates nodes with subtype \quote {glyph}
instead of \quote {character}: one for the actual accent and one for the
- accentee. The primary reason for this is that \type {\accent} in \TEX82 is
+ accentee. The primary reason for this is that \prm {accent} in \TEX82 is
explicitly dependent on the current font encoding, so it would not make much
sense to attach a new meaning to the primitive's name, as that would
invalidate many old documents and macro packages. A secondary reason is that
- in \TEX82, \type {\accent} prohibits hyphenation of the current word. Since
+ in \TEX82, \prm {accent} prohibits hyphenation of the current word. Since
in \LUATEX\ hyphenation only takes place on \quote {character} nodes, it is
possible to achieve the same effect. Of course, modern \UNICODE\ aware macro
- packages will not use the \type {\accent} primitive at all but try to map
+ packages will not use the \prm {accent} primitive at all but try to map
directly on composed characters.
- This change of meaning did happen with \type {\char}, that now generates
+ This change of meaning did happen with \prm {char}, that now generates
\quote {glyph} nodes with a character subtype. In traditional \TEX\ there was
a strong relationship between the 8|-|bit input encoding, hyphenation and
glyphs taken from a font. In \LUATEX\ we have \UTF\ input, and in most cases
@@ -413,7 +425,7 @@ there are a few exceptions.
\stopitem
\startitem
- The \ALEPH|-|derived commands \type {\leftghost} and \type {\rightghost}
+ The \ALEPH|-|derived commands \lpr {leftghost} and \lpr {rightghost}
create nodes of a third subtype: \quote {ghost}. These nodes are ignored
completely by all further processing until the stage where inter|-|glyph
kerning is added.
@@ -421,27 +433,27 @@ there are a few exceptions.
\startitem
Automatic discretionaries are handled differently. \TEX82 inserts an empty
- discretionary after sensing an input character that matches the \type
- {\hyphenchar} in the current font. This test is wrong in our opinion: whether
+ discretionary after sensing an input character that matches the \prm
+ {hyphenchar} in the current font. This test is wrong in our opinion: whether
or not hyphenation takes place should not depend on the current font, it is a
language property. \footnote {When \TEX\ showed up we didn't have \UNICODE\
yet and being limited to eight bits meant that one sometimes had to
compromise between supporting character input, glyph rendering, hyphenation.}
In \LUATEX, it works like this: if \LUATEX\ senses a string of input
- characters that matches the value of the new integer parameter \type
- {\exhyphenchar}, it will insert an explicit discretionary after that series
- of nodes. Initex sets the \type {\exhyphenchar=`\-}. Incidentally, this is a
- global parameter instead of a language-specific one because it may be useful
- to change the value depending on the document structure instead of the text
- language.
+ characters that matches the value of the new integer parameter \prm
+ {exhyphenchar}, it will insert an explicit discretionary after that series of
+ nodes. Initially \TEX\ sets the \type {\exhyphenchar=`\-}. Incidentally, this
+ is a global parameter instead of a language-specific one because it may be
+ useful to change the value depending on the document structure instead of the
+ text language.
The insertion of discretionaries after a sequence of explicit hyphens happens
at the same time as the other hyphenation processing, {\it not\/} inside the
main control loop.
- The only use \LUATEX\ has for \type {\hyphenchar} is at the check whether a
- word should be considered for hyphenation at all. If the \type {\hyphenchar}
+ The only use \LUATEX\ has for \prm {hyphenchar} is at the check whether a
+ word should be considered for hyphenation at all. If the \prm {hyphenchar}
of the font attached to the first character node in a word is negative, then
hyphenation of that word is abandoned immediately. This behaviour is added
for backward compatibility only, and the use of \type {\hyphenchar=-1} as a
@@ -449,18 +461,18 @@ there are a few exceptions.
\stopitem
\startitem
- The \type {\setlanguage} command no longer creates whatsits. The meaning of
- \type {\setlanguage} is changed so that it is now an integer parameter like
- all others. That integer parameter is used in \type {\glyph_node} creation to
- add language information to the glyph nodes. In conjunction, the \type
- {\language} primitive is extended so that it always also updates the value of
- \type {\setlanguage}.
+ The \prm {setlanguage} command no longer creates whatsits. The meaning of
+ \prm {setlanguage} is changed so that it is now an integer parameter like all
+ others. That integer parameter is used in \type {\glyph_node} creation to add
+ language information to the glyph nodes. In conjunction, the \prm {language}
+ primitive is extended so that it always also updates the value of \prm
+ {setlanguage}.
\stopitem
\startitem
- The \type {\noboundary} command (that prohibits word boundary processing
+ The \prm {noboundary} command (that prohibits word boundary processing
where that would normally take place) now does create nodes. These nodes are
- needed because the exact place of the \type {\noboundary} command in the
+ needed because the exact place of the \prm {noboundary} command in the
input stream has to be retained until after the ligature and font processing
stages.
\stopitem
@@ -473,7 +485,7 @@ there are a few exceptions.
{word} was handled by that \quote {main control} loop. In \LUATEX, there is
no longer a need for that (all hard work is done later), and the (now very
small) bits of character|-|handling code have been moved back inline. When
- \type {\tracingcommands} is on, this is visible because the full word is
+ \prm {tracingcommands} is on, this is visible because the full word is
reported, instead of just the initial character.
\stopitem
@@ -489,50 +501,55 @@ have been added:
\stoptyping
The first parameter has the following consequences for automatic discs (the ones
-resulting from an \type {\exhyphenchar}:
+resulting from an \prm {exhyphenchar}:
\starttabulate[|c|l|l|]
-\DB mode \BC automatic disc \type{-} \BC explicit disc \type{\-} \NC \NR
-\TB[small,samepage]
-\NC \type{0} \NC \type {\exhyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR
-\NC \type{1} \NC \type {\hyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR
-\NC \type{2} \NC \type {\exhyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR
-\NC \type{3} \NC \type {\hyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR
-\NC \type{4} \NC \type {\automatichyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR
-\NC \type{5} \NC \type {\exhyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR
-\NC \type{6} \NC \type {\hyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR
-\NC \type{7} \NC \type {\automatichyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR
-\NC \type{8} \NC \type {\automatichyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR
+\DB mode \BC automatic disc \type {-} \BC explicit disc \prm{-} \NC \NR
+\TB
+\NC \type{0} \NC \prm {exhyphenpenalty} \NC \prm {exhyphenpenalty} \NC \NR
+\NC \type{1} \NC \prm {hyphenpenalty} \NC \prm {hyphenpenalty} \NC \NR
+\NC \type{2} \NC \prm {exhyphenpenalty} \NC \prm {hyphenpenalty} \NC \NR
+\NC \type{3} \NC \prm {hyphenpenalty} \NC \prm {exhyphenpenalty} \NC \NR
+\NC \type{4} \NC \lpr {automatichyphenpenalty} \NC \lpr {explicithyphenpenalty} \NC \NR
+\NC \type{5} \NC \prm {exhyphenpenalty} \NC \lpr {explicithyphenpenalty} \NC \NR
+\NC \type{6} \NC \prm {hyphenpenalty} \NC \lpr {explicithyphenpenalty} \NC \NR
+\NC \type{7} \NC \lpr {automatichyphenpenalty} \NC \prm {exhyphenpenalty} \NC \NR
+\NC \type{8} \NC \lpr {automatichyphenpenalty} \NC \prm {hyphenpenalty} \NC \NR
+\LL
\stoptabulate
-other values do what we always did in \LUATEX: insert \type {\exhyphenpenalty}.
+other values do what we always did in \LUATEX: insert \prm {exhyphenpenalty}.
\section[patternsexceptions]{Loading patterns and exceptions}
+\topicindex {hyphenation}
+\topicindex {hyphenation+patterns}
+\topicindex {hyphenation+exceptions}
+\topicindex {patterns}
+\topicindex {exceptions}
+
Although we keep the traditional approach towards hyphenation (which is still
superior) the implementation of the hyphenation algorithm in \LUATEX\ is quite
different from the one in \TEX82.
-After expansion, the argument for \type {\patterns} has to be proper \UTF8 with
-individual patterns separated by spaces, no \type {\char} or \type {\chardef}d
+After expansion, the argument for \prm {patterns} has to be proper \UTF8 with
+individual patterns separated by spaces, no \prm {char} or \prm {chardef}d
commands are allowed. The current implementation quite strict and will reject all
-non|-|\UNICODE\ characters. Likewise, the expanded argument for \type
-{\hyphenation} also has to be proper \UTF8, but here a bit of extra syntax is
+non|-|\UNICODE\ characters. Likewise, the expanded argument for \prm
+{hyphenation} also has to be proper \UTF8, but here a bit of extra syntax is
provided:
\startitemize[n]
\startitem
Three sets of arguments in curly braces (\type {{}{}{}}) indicates a desired
- complex discretionary, with arguments as in \type {\discretionary}'s command in
+ complex discretionary, with arguments as in \prm {discretionary}'s command in
normal document input.
\stopitem
\startitem
- A \type {-} indicates a desired simple discretionary, cf.\ \type {\-} and \type
- {\discretionary{-}{}{}} in normal document input.
+ A \type {-} indicates a desired simple discretionary, cf.\ \type {\-} and \type {\discretionary{-}{}{}} in normal document input.
\stopitem
\startitem
- Internal command names are ignored. This rule is provided especially for \type
- {\discretionary}, but it also helps to deal with \type {\relax} commands that
+ Internal command names are ignored. This rule is provided especially for \prm {discretionary}, but it also helps to deal with \prm {relax} commands that
may sneak in.
\stopitem
\startitem
@@ -548,15 +565,16 @@ can always be generated from the values. Here are a few examples:
\starttabulate[|l|l|l|]
\DB value \BC implied key (input) \BC effect \NC\NR
-\TB[small,samepage]
+\TB
\NC \type {ta-ble} \NC table \NC \type {ta\-ble} ($=$ \type {ta\discretionary{-}{}{}ble}) \NC\NR
\NC \type {ba{k-}{}{c}ken} \NC backen \NC \type {ba\discretionary{k-}{}{c}ken} \NC\NR
+\LL
\stoptabulate
The resultant patterns and exception dictionary will be stored under the language
-code that is the present value of \type {\language}.
+code that is the present value of \prm {language}.
-In the last line of the table, you see there is no \type {\discretionary} command
+In the last line of the table, you see there is no \prm {discretionary} command
in the value: the command is optional in the \TEX-based input syntax. The
underlying reason for that is that it is conceivable that a whole dictionary of
words is stored as a plain text file and loaded into \LUATEX\ using one of the
@@ -574,11 +592,11 @@ actual explicit hyphen character if needed). For example, this matches the word
\hyphenation{multi{-}{}{-}word{-}{}{-}boun-daries}
\stoptyping
-The motivation behind the \ETEX\ extension \type {\savinghyphcodes} was that
+The motivation behind the \ETEX\ extension \prm {savinghyphcodes} was that
hyphenation heavily depended on font encodings. This is no longer true in
\LUATEX, and the corresponding primitive is basically ignored. Because we now
-have \type {hjcode}, the case relate codes can be used exclusively for \type
-{\uppercase} and \type {\lowercase}.
+have \lpr {hjcode}, the case relate codes can be used exclusively for \prm
+{uppercase} and \prm {lowercase}.
The three curly brace pair pattern in an exception can be somewhat unexpected so
we will try to explain it by example. The pattern \type {foo{}{}{x}bar} pattern
@@ -586,7 +604,7 @@ creates a lookup \type {fooxbar} and the pattern \type {foo{}{}{}bar} creates
\type {foobar}. Then, when a hit happens there is a replacement text (\type {x})
or none. Because we introduced penalties in discretionary nodes, the exception
syntax now also can take a penalty specification. The value between square brackets
-is a multiplier for \type {\exceptionpenalty}. Here we have set it to 10000 so
+is a multiplier for \lpr {exceptionpenalty}. Here we have set it to 10000 so
effectively we get 30000 in the example.
\def\ShowSample#1#2%
@@ -618,9 +636,12 @@ effectively we get 30000 in the example.
\ShowSample{z{a-}{-b}{z}{a-}{-b}{z}{a-}{-b}{z}{a-}{-b}{z}z}{zzzzzz}
\ShowSample{z{a-}{-b}{z}{a-}{-b}{z}[3]{a-}{-b}{z}[1]{a-}{-b}{z}z}{zzzzzz}
-
\section{Applying hyphenation}
+\topicindex {hyphenation+how it works}
+\topicindex {hyphenation+discretionaries}
+\topicindex {discretionaries}
+
The internal structures \LUATEX\ uses for the insertion of discretionaries in
words is very different from the ones in \TEX82, and that means there are some
noticeable differences in handling as well.
@@ -645,12 +666,12 @@ of the implementation:
\stopitem
\startitem
Because there is no \quote {trie preparation} stage, language patterns never
- become frozen. This means that the primitive \type {\patterns} (and its \LUA\
+ become frozen. This means that the primitive \prm {patterns} (and its \LUA\
counterpart \type {lang.patterns}) can be used at any time, not only in
ini\TEX.
\stopitem
\startitem
- Only the string representation of \type {\patterns} and \type {\hyphenation} is
+ Only the string representation of \prm {patterns} and \prm {hyphenation} is
stored in the format file. At format load time, they are simply
re|-|evaluated. It follows that there is no real reason to preload languages
in the format file. In fact, it is usually not a good idea to do so. It is
@@ -658,16 +679,16 @@ of the implementation:
needed.
\stopitem
\startitem
- \LUATEX\ uses the language-specific variables \type {\prehyphenchar} and \type
- {\posthyphenchar} in the creation of implicit discretionaries, instead of
- \TEX82's \type {\hyphenchar}, and the values of the language|-|specific variables
- \type {\preexhyphenchar} and \type {\postexhyphenchar} for explicit
+ \LUATEX\ uses the language-specific variables \lpr {prehyphenchar} and \lpr
+ {posthyphenchar} in the creation of implicit discretionaries, instead of
+ \TEX82's \prm {hyphenchar}, and the values of the language|-|specific
+ variables \lpr {preexhyphenchar} and \lpr {postexhyphenchar} for explicit
discretionaries (instead of \TEX82's empty discretionary).
\stopitem
\startitem
- The value of the two counters related to hyphenation, \type {\hyphenpenalty}
- and \type {\exhyphenpenalty}, are now stored in the discretionary nodes. This
- permits a local overload for explicit \type {\discretionary} commands. The
+ The value of the two counters related to hyphenation, \prm {hyphenpenalty}
+ and \prm {exhyphenpenalty}, are now stored in the discretionary nodes. This
+ permits a local overload for explicit \prm {discretionary} commands. The
value current when the hyphenation pass is applied is used. When no callbacks
are used this is compatible with traditional \TEX. When you apply the \LUA\
\type {lang.hyphenate} function the current values are used.
@@ -678,7 +699,7 @@ of the implementation:
\stopitem
\stopitemize
-Because we store penalties in the disc node the \type {\discretionary} command has
+Because we store penalties in the disc node the \prm {discretionary} command has
been extended to accept an optional penalty specification, so you can do the
following:
@@ -701,14 +722,14 @@ inserted at the left-hand side of a word).
Word boundaries are no longer implied by font switches, but by language switches.
One word can have two separate fonts and still be hyphenated correctly (but it
-can not have two different languages, the \type {\setlanguage} command forces a
+can not have two different languages, the \prm {setlanguage} command forces a
word boundary).
All languages start out with \type {\prehyphenchar=`\-}, \type {\posthyphenchar=0},
\type {\preexhyphenchar=0} and \type {\postexhyphenchar=0}. When you assign the
values of one of these four parameters, you are actually changing the settings
-for the current \type {\language}, this behaviour is compatible with \type {\patterns}
-and \type {\hyphenation}.
+for the current \prm {language}, this behaviour is compatible with \prm {patterns}
+and \prm {hyphenation}.
\LUATEX\ also hyphenates the first word in a paragraph. Words can be up to 256
characters long (up from 64 in \TEX82). Longer words are ignored right now, but
@@ -723,6 +744,9 @@ not operate properly in the presence of \quote {glyph}, \quote {ligature}, or
\section{Applying ligatures and kerning}
+\topicindex {ligatures}
+\topicindex {kerning}
+
After all possible hyphenation points have been inserted in the list, \LUATEX\
will process the list to convert the \quote {character} nodes into \quote {glyph}
and \quote {ligature} nodes. This is actually done in two stages: first all
@@ -730,7 +754,7 @@ ligatures are processed, then all kerning information is applied to the result
list. But those two stages are somewhat dependent on each other: If the used font
makes it possible to do so, the ligaturing stage adds virtual \quote {character}
nodes to the word boundaries in the list. While doing so, it removes and
-interprets \type {\noboundary} nodes. The kerning stage deletes those word
+interprets \prm {noboundary} nodes. The kerning stage deletes those word
boundary items after it is done with them, and it does the same for \quote
{ghost} nodes. Finally, at the end of the kerning stage, all remaining \quote
{character} nodes are converted to \quote {glyph} nodes.
@@ -781,10 +805,11 @@ Here is that nested solution again, in a different representation:
\starttabulate[|l|c|c|c|c|c|c|]
\DB \BC pre \BC \BC post \BC \BC replace \BC \NC \NR
-\TB[small,samepage]
+\TB
\NC topdisc \NC \type {f-} \NC (1) \NC \NC sub 1 \NC \NC sub 2 \NC \NR
\NC sub 1 \NC \type {f-} \NC (2) \NC \type {i} \NC (3) \NC \type {<fi>} \NC (4) \NC \NR
\NC sub 2 \NC \type {<ff>-} \NC (5) \NC \type {i} \NC (6) \NC \type {<ffi>} \NC (7) \NC \NR
+\LL
\stoptabulate
When line breaking is choosing its breakpoints, the following fields will
@@ -818,13 +843,14 @@ pair is as follows:
\starttabulate[|l|c|c|]
\DB field \BC description \NC \NC \NR
-\TB[small,samepage]
+\TB
\NC \type {disc1.pre} \NC \type {f-} \NC (1) \NC \NR
\NC \type {disc1.post} \NC \type {<fi>} \NC (4) \NC \NR
\NC \type {disc1.replace} \NC \type {<ffi>} \NC (7) \NC \NR
\NC \type {disc2.pre} \NC \type {f-} \NC (2) \NC \NR
\NC \type {disc2.post} \NC \type {i} \NC (3,6) \NC \NR
\NC \type {disc2.replace} \NC \type {<ff>-} \NC (5) \NC \NR
+\LL
\stoptabulate
What is actually generated after ligaturing has been applied is therefore:
@@ -855,6 +881,10 @@ approach.
\section{Breaking paragraphs into lines}
+\topicindex {line breaks}
+\topicindex {paragraphs}
+\topicindex {discretionaries}
+
This code is almost unchanged, but because of the above|-|mentioned changes
with respect to discretionaries and ligatures, line breaking will potentially be
different from traditional \TEX. The actual line breaking code is still based on
@@ -877,6 +907,8 @@ ligatures are used. Of course kerning also complicates matters here.
\section{The \type {lang} library}
+\topicindex {languages+library}
+
This library provides the interface to \LUATEX's structure
representing a language, and the associated functions.
@@ -896,7 +928,7 @@ the internal language with that id number.
<number> n = lang.id(<language> l)
\stopfunctioncall
-The number returned is the internal \type {\language} id number this object refers to.
+The number returned is the internal \prm {language} id number this object refers to.
\startfunctioncall
<string> n = lang.hyphenation(<language> l)
@@ -985,7 +1017,7 @@ lang.sethjcode(<language> l, <number> char, <number> usedchar)
\stopfunctioncall
When you set a hjcode the current sets get initialized unless the set was already
-initialized due to \type {\savinghyphcodes} being larger than zero.
+initialized due to \prm {savinghyphcodes} being larger than zero.
\stopchapter
diff --git a/doc/context/sources/general/manuals/luatex/luatex-lua.tex b/doc/context/sources/general/manuals/luatex/luatex-lua.tex
index 64dcb42a4..226ece56d 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-lua.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-lua.tex
@@ -10,6 +10,9 @@
\subsection{\LUATEX\ as a \LUA\ interpreter}
+\topicindex {initialization}
+\topicindex {\LUA+interpreter}
+
There are some situations that make \LUATEX\ behave like a standalone \LUA\
interpreter:
@@ -36,6 +39,8 @@ preloaded libraries.
\subsection{\LUATEX\ as a \LUA\ byte compiler}
+\topicindex {\LUA+byte code}
+
There are two situations that make \LUATEX\ behave like the \LUA\ byte compiler:
\startitemize[packed]
@@ -51,12 +56,16 @@ version if \LUATEX.
\subsection{Other commandline processing}
+\topicindex {command line}
+
When the \LUATEX\ executable starts, it looks for the \type {--lua} command line
option. If there is no \type {--lua} option, the command line is interpreted in a
similar fashion as the other \TEX\ engines. Some options are accepted but have no
consequence. The following command|-|line options are understood:
\starttabulate[|l|p|]
+\DB commandline argument \BC explanation \NC \NR
+\TB
\NC \type{--credits} \NC display credits and exit \NC \NR
\NC \type{--debug-format} \NC enable format debugging \NC \NR
\NC \type{--draftmode} \NC switch on draft mode i.e.\ generate no output in \PDF\ mode \NC \NR
@@ -66,53 +75,60 @@ consequence. The following command|-|line options are understood:
\NC \type{--halt-on-error} \NC stop processing at the first error\NC \NR
\NC \type{--help} \NC display help and exit \NC\NR
\NC \type{--ini} \NC be \type {iniluatex}, for dumping formats \NC\NR
-\NC \type{--interaction=STRING} \NC set interaction mode: \type {batchmode}, \type {nonstopmode}, \type {scrollmode} or \type {errorstopmode} \NC \NR
+\NC \type{--interaction=STRING} \NC set interaction mode: \type {batchmode}, \type {nonstopmode},
+ \type {scrollmode} or \type {errorstopmode} \NC \NR
\NC \type{--jobname=STRING} \NC set the job name to \type {STRING} \NC \NR
-\NC \type{--kpathsea-debug=NUMBER} \NC set path searching debugging flags according to the bits of \type {NUMBER} \NC \NR
+\NC \type{--kpathsea-debug=NUMBER} \NC set path searching debugging flags according to the bits of
+ \type {NUMBER} \NC \NR
\NC \type{--lua=FILE} \NC load and execute a \LUA\ initialization script \NC\NR
-\NC \type{--[no-]mktex=FMT} \NC disable/enable \type {mktexFMT} generation with \type {FMT} is \type {tex} or \type {tfm} \NC \NR
+\NC \type{--[no-]mktex=FMT} \NC disable/enable \type {mktexFMT} generation with \type {FMT} is
+ \type {tex} or \type {tfm} \NC \NR
\NC \type{--nosocket} \NC disable the \LUA\ socket library \NC\NR
-\NC \type{--output-comment=STRING} \NC use \type {STRING} for \DVI\ file comment instead of date (no effect for \PDF) \NC \NR
+\NC \type{--output-comment=STRING} \NC use \type {STRING} for \DVI\ file comment instead of date (no
+ effect for \PDF) \NC \NR
\NC \type{--output-directory=DIR} \NC use \type {DIR} as the directory to write files to \NC \NR
-\NC \type{--output-format=FORMAT} \NC use \type {FORMAT} for job output; \type {FORMAT} is \type {dvi} or \type {pdf} \NC \NR
+\NC \type{--output-format=FORMAT} \NC use \type {FORMAT} for job output; \type {FORMAT} is \type {dvi}
+ or \type {pdf} \NC \NR
\NC \type{--progname=STRING} \NC set the program name to \type {STRING} \NC \NR
\NC \type{--recorder} \NC enable filename recorder \NC \NR
\NC \type{--safer} \NC disable easily exploitable \LUA\ commands \NC\NR
\NC \type{--[no-]shell-escape} \NC disable/enable system calls \NC \NR
-\NC \type{--shell-restricted} \NC restrict system calls to a list of commands given in \type {texmf.cnf} \NC \NR
+\NC \type{--shell-restricted} \NC restrict system calls to a list of commands given in \type
+ {texmf.cnf} \NC \NR
\NC \type{--synctex=NUMBER} \NC enable \type {synctex} \NC \NR
\NC \type{--utc} \NC use utc times when applicable \NC \NR
\NC \type{--version} \NC display version and exit \NC \NR
+\LL
\stoptabulate
-We don't support \type {\write18} because \type {os.execute} can do the same. It
+We don't support \prm {write} 18 because \type {os.execute} can do the same. It
simplifies the code and makes more write targets possible.
-The value to use for \type {\jobname} is decided as follows:
+The value to use for \prm {jobname} is decided as follows:
\startitemize
\startitem
If \type {--jobname} is given on the command line, its argument will be the
- value for \type {\jobname}, without any changes. The argument will not be
+ value for \prm {jobname}, without any changes. The argument will not be
used for actual input so it need not exist. The \type {--jobname} switch only
- controls the \type {\jobname} setting.
+ controls the \prm {jobname} setting.
\stopitem
\startitem
- Otherwise, \type {\jobname} will be the name of the first file that is read
+ Otherwise, \prm {jobname} will be the name of the first file that is read
from the file system, with any path components and the last extension (the
part following the last \type {.}) stripped off.
\stopitem
\startitem
There is an exception to the previous point: if the command line goes into
interactive mode (by starting with a command) and there are no files input
- via \type {\everyjob} either, then the \type {\jobname} is set to \type
+ via \prm {everyjob} either, then the \prm {jobname} is set to \type
{texput} as a last resort.
\stopitem
\stopitemize
The file names for output files that are generated automatically are created by
attaching the proper extension (\type {log}, \type {pdf}, etc.) to the found
-\type {\jobname}. These files are created in the directory pointed to by \type
+\prm {jobname}. These files are created in the directory pointed to by \type
{--output-directory}, or in the current directory, if that switch is not present.
Without the \type {--lua} option, command line processing works like it does in
@@ -144,12 +160,15 @@ in order.
\LUA\ commands that can easily be abused by a malicious document. At the
moment, \type {--safer} \type {nil}s the following functions:
- \starttabulate[|l|l|]
- \DB library \BC functions \NC \NR
- \TB[small,samepage]
- \NC \type {os} \NC \type {execute} \type {exec} \type {spawn} \type {setenv} \type {rename} \type {remove} \type {tmpdir} \NC \NR
- \NC \type {io} \NC \type {popen} \type {output} \type {tmpfile} \NC \NR
- \NC \type {lfs} \NC \type {rmdir} \type {mkdir} \type {chdir} \type {lock} \type {touch} \NC \NR
+ \starttabulate[|c|l|]
+ \DB library \BC functions \NC \NR
+ \TB
+ \NC \type {os} \NC \type {execute} \type {exec} \type {spawn} \type {setenv}
+ \type {rename} \type {remove} \type {tmpdir} \NC \NR
+ \NC \type {io} \NC \type {popen} \type {output} \type {tmpfile} \NC \NR
+ \NC \type {lfs} \NC \type {rmdir} \type {mkdir} \type {chdir} \type {lock}
+ \type {touch} \NC \NR
+ \LL
\stoptabulate
Furthermore, it disables loading of compiled \LUA\ libraries and it makes
@@ -191,7 +210,7 @@ deal with typesetting, like \type {tex}, \type {token}, \type {node} and
are \type {nil}'d). Special care is taken that \type {texio.write} and \type
{texio.write_nl} function properly, so that you can at least report your actions
to the log file when (and if) it eventually becomes opened (note that \TEX\ does
-not even know its \type {\jobname} yet at this point).
+not even know its \prm {jobname} yet at this point).
Everything you do in the \LUA\ initialization script will remain visible during
the rest of the run, with the exception of the \TEX\ specific libraries like
@@ -219,9 +238,12 @@ check \type {--progname}, or \type {--ini} and \type {--fmt}, if \type
\section{\LUA\ behaviour}
+\topicindex {\LUA+libraries}
+\topicindex {\LUA+extensions}
+
\LUA s \type {tostring} function (and \type {string.format} may return values in
scientific notation, thereby confusing the \TEX\ end of things when it is used as
-the right|-|hand side of an assignment to a \type {\dimen} or \type {\count}. The
+the right|-|hand side of an assignment to a \prm {dimen} or \prm {count}. The
output of these serializers also depend on the \LUA\ version, so in \LUA\ 5.3 you
can get different output than from 5.2.
@@ -510,6 +532,9 @@ LC_NUMERIC=C
\section {\LUA\ modules}
+\topicindex {\LUA+libraries}
+\topicindex {\LUA+modules}
+
Some modules that are normally external to \LUA\ are statically linked in with
\LUATEX, because they offer useful functionality:
@@ -570,6 +595,9 @@ Some modules that are normally external to \LUA\ are statically linked in with
\section{Testing}
+\topicindex {testing}
+\topicindex {\PDF+date}
+
For development reasons you can influence the used startup date and time. This can
be done in two ways.
diff --git a/doc/context/sources/general/manuals/luatex/luatex-math.tex b/doc/context/sources/general/manuals/luatex/luatex-math.tex
index 6b037f735..5f82eb142 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-math.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-math.tex
@@ -6,6 +6,8 @@
\startchapter[reference=math,title={Math}]
+\topicindex {math}
+
The handling of mathematics in \LUATEX\ differs quite a bit from how \TEX82 (and
therefore \PDFTEX) handles math. First, \LUATEX\ adds primitives and extends some
others so that \UNICODE\ input can be used easily. Second, all of \TEX82's
@@ -17,12 +19,14 @@ to the engine.
\section{Math styles}
-\subsection{\type {\mathstyle}}
+\subsection{\lpr {mathstyle}}
+
+\topicindex {math+styles}
It is possible to discover the math style that will be used for a formula in an
expandable fashion (while the math list is still being read). To make this
-possible, \LUATEX\ adds the new primitive: \type {\mathstyle}. This is a \quote
-{convert command} like e.g. \type {\romannumeral}: its value can only be read,
+possible, \LUATEX\ adds the new primitive: \lpr {mathstyle}. This is a \quote
+{convert command} like e.g. \prm {romannumeral}: its value can only be read,
not set.
The returned value is between 0 and 7 (in math mode), or $-1$ (all other modes).
@@ -47,16 +51,15 @@ thereby reusing numbers) because the number that got used is stored and used in
the second pass (so changing \type {\fam 12} mid|-|formula spoils over to
preceding use of that family).
-The style switching primitives like \type {\textstyle} are turned into nodes so
-the styles set there are frozen. The \type {\mathchoice} primitive results in
-four lists being constructed of which one is used in the second pass. The fact
-that some automatic styles are not yet known also means that the \type
-{\mathstyle} primitive expands to the current style which can of course be
-different from the one really used. It's a snapshot of the first pass state. As a
-consequence in the following example you get a style number (first pass) typeset
-that can actually differ from the used style (second pass). In the case of a math
-choice used ungrouped, the chosen style is used after the choice too, unless you
-group.
+The style switching primitives like \prm {textstyle} are turned into nodes so the
+styles set there are frozen. The \prm {mathchoice} primitive results in four
+lists being constructed of which one is used in the second pass. The fact that
+some automatic styles are not yet known also means that the \lpr {mathstyle}
+primitive expands to the current style which can of course be different from the
+one really used. It's a snapshot of the first pass state. As a consequence in the
+following example you get a style number (first pass) typeset that can actually
+differ from the used style (second pass). In the case of a math choice used
+ungrouped, the chosen style is used after the choice too, unless you group.
\startbuffer[1]
[a:\mathstyle]\quad
@@ -119,34 +122,39 @@ This gives:
\blank $\displaystyle \getbuffer[1]$ \blank
\blank $\textstyle \getbuffer[1]$ \blank
-Using \type {\begingroup} \unknown\ \type {\endgroup} instead gives:
+Using \prm {begingroup} \unknown\ \prm {endgroup} instead gives:
\blank $\displaystyle \getbuffer[2]$ \blank
\blank $\textstyle \getbuffer[2]$ \blank
-This might look wrong but it's just a side effect of \type {\mathstyle} expanding
+This might look wrong but it's just a side effect of \lpr {mathstyle} expanding
to the current (first pass) style and the number being injected in the list that
gets converted in the second pass. It all makes sense and it illustrates the
importance of grouping. In fact, the math choice style being effective afterwards
has advantages. It would be hard to get it otherwise.
-\subsection{\type {\Ustack}}
+\subsection{\lpr {Ustack}}
+
+\topicindex {math+stacks}
There are a few math commands in \TEX\ where the style that will be used is not
-known straight from the start. These commands (\type {\over}, \type {\atop},
-\type {\overwithdelims}, \type {\atopwithdelims}) would therefore normally return
-wrong values for \type {\mathstyle}. To fix this, \LUATEX\ introduces a special
-prefix command: \type {\Ustack}:
+known straight from the start. These commands (\prm {over}, \prm {atop},
+\prm {overwithdelims}, \prm {atopwithdelims}) would therefore normally return
+wrong values for \lpr {mathstyle}. To fix this, \LUATEX\ introduces a special
+prefix command: \lpr {Ustack}:
\starttyping
$\Ustack {a \over b}$
\stoptyping
-The \type {\Ustack} command will scan the next brace and start a new math group
+The \lpr {Ustack} command will scan the next brace and start a new math group
with the correct (numerator) math style.
\section{Unicode math characters}
+\topicindex {math+\UNICODE}
+\topicindex {\UNICODE+math}
+
Character handling is now extended up to the full \UNICODE\ range (the \type {\U}
prefix), which is compatible with \XETEX.
@@ -167,26 +175,28 @@ The input for such primitives would look like this:
The altered \TEX82 primitives are:
\starttabulate[|l|l|r|c|l|r|]
-\DB primitive \BC min \BC max \BC \kern 2em \BC min \BC max \NC \NR
-\TB[small,samepage]
-\NC \type {\mathcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC 8000 \NC \NR
-\NC \type {\delcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC FFFFFF \NC \NR
+\DB primitive \BC min \BC max \BC \kern 2em \BC min \BC max \NC \NR
+\TB
+\NC \prm {mathcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC 8000 \NC \NR
+\NC \prm {delcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC FFFFFF \NC \NR
+\LL
\stoptabulate
The unaltered ones are:
\starttabulate[|l|l|r|]
-\DB primitive \BC min \BC max \NC \NR
-\TB[small,samepage]
-\NC \type {\mathchardef} \NC 0 \NC 8000 \NC \NR
-\NC \type {\mathchar} \NC 0 \NC 7FFF \NC \NR
-\NC \type {\mathaccent} \NC 0 \NC 7FFF \NC \NR
-\NC \type {\delimiter} \NC 0 \NC 7FFFFFF \NC \NR
-\NC \type {\radical} \NC 0 \NC 7FFFFFF \NC \NR
+\DB primitive \BC min \BC max \NC \NR
+\TB
+\NC \prm {mathchardef} \NC 0 \NC 8000 \NC \NR
+\NC \prm {mathchar} \NC 0 \NC 7FFF \NC \NR
+\NC \prm {mathaccent} \NC 0 \NC 7FFF \NC \NR
+\NC \prm {delimiter} \NC 0 \NC 7FFFFFF \NC \NR
+\NC \prm {radical} \NC 0 \NC 7FFFFFF \NC \NR
+\LL
\stoptabulate
-For practical reasons \type {\mathchardef} will silently accept values larger
-that \type {0x8000} and interpret it as \type {\Umathcharnumdef}. This is needed
+For practical reasons \prm {mathchardef} will silently accept values larger
+that \type {0x8000} and interpret it as \lpr {Umathcharnumdef}. This is needed
to satisfy older macro packages.
The following new primitives are compatible with \XETEX:
@@ -194,19 +204,20 @@ The following new primitives are compatible with \XETEX:
% somewhat fuzzy:
\starttabulate[|l|l|r|c|l|r|]
-\DB primitive \BC min \BC max \BC \kern 2em \BC min \BC max \NC \NR
-\TB[small,samepage]
-\NC \type {\Umathchardef} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR
-\NC \type {\Umathcharnumdef}\rlap{\high{5}} \NC -80000000 \NC 7FFFFFFF \NC \NC \NC \NC \NR
-\NC \type {\Umathcode} \NC 0 \NC 10FFFF \NC = \NC 0+0+0 \NC 7+FF+10FFFF \NC \NR
-\NC \type {\Udelcode} \NC 0 \NC 10FFFF \NC = \NC 0+0 \NC FF+10FFFF \NC \NR
-\NC \type {\Umathchar} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR
-\NC \type {\Umathaccent} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR
-\NC \type {\Udelimiter} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR
-\NC \type {\Uradical} \NC 0+0 \NC FF+10FFFF \NC \NC \NC \NC \NR
-\NC \type {\Umathcharnum} \NC -80000000 \NC 7FFFFFFF \NC \NC \NC \NC \NR
-\NC \type {\Umathcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF \NC \NR
-\NC \type {\Udelcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF \NC \NR
+\DB primitive \BC min \BC max \BC \kern 2em \BC min \BC max \NC \NR
+\TB
+\NC \lpr {Umathchardef} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR
+\NC \lpr {Umathcharnumdef}\rlap{\high{5}} \NC -80000000 \NC 7FFFFFFF \NC \NC \NC \NC \NR
+\NC \lpr {Umathcode} \NC 0 \NC 10FFFF \NC = \NC 0+0+0 \NC 7+FF+10FFFF \NC \NR
+\NC \lpr {Udelcode} \NC 0 \NC 10FFFF \NC = \NC 0+0 \NC FF+10FFFF \NC \NR
+\NC \lpr {Umathchar} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR
+\NC \lpr {Umathaccent} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR
+\NC \lpr {Udelimiter} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR
+\NC \lpr {Uradical} \NC 0+0 \NC FF+10FFFF \NC \NC \NC \NC \NR
+\NC \lpr {Umathcharnum} \NC -80000000 \NC 7FFFFFFF \NC \NC \NC \NC \NR
+\NC \lpr {Umathcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF \NC \NR
+\NC \lpr {Udelcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF \NC \NR
+\LL
\stoptabulate
Specifications typically look like:
@@ -218,21 +229,21 @@ Specifications typically look like:
The new primitives that deal with delimiter|-|style objects do not set up a
\quote {large family}. Selecting a suitable size for display purposes is expected
-to be dealt with by the font via the \type {\Umathoperatorsize} parameter (more
+to be dealt with by the font via the \lpr {Umathoperatorsize} parameter (more
information can be found in a following section).
For some of these primitives, all information is packed into a single signed
-integer. For the first two (\type {\Umathcharnum} and \type {\Umathcodenum}), the
+integer. For the first two (\lpr {Umathcharnum} and \lpr {Umathcodenum}), the
lowest 21 bits are the character code, the 3 bits above that represent the math
class, and the family data is kept in the topmost bits This means that the values
-for math families 128--255 are actually negative. For \type {\Udelcodenum} there
+for math families 128--255 are actually negative. For \lpr {Udelcodenum} there
is no math class. The math family information is stored in the bits directly on
top of the character code. Using these three commands is not as natural as using
the two- and three|-|value commands, so unless you know exactly what you are
doing and absolutely require the speedup resulting from the faster input
scanning, it is better to use the verbose commands instead.
-The \type {\Umathaccent} command accepts optional keywords to control various
+The \lpr {Umathaccent} command accepts optional keywords to control various
details regarding math accents. See \in {section} [mathacc] below for details.
There are more new primitives and all of these will be explained in following
@@ -240,16 +251,21 @@ sections:
\starttabulate[|l|l|]
\DB primitive \BC value range (in hex) \NC \NR
-\TB[small,samepage]
-\NC \type {\Uroot} \NC 0 + 0--FF + 10FFFF \NC \NR
-\NC \type {\Uoverdelimiter} \NC 0 + 0--FF + 10FFFF \NC \NR
-\NC \type {\Uunderdelimiter} \NC 0 + 0--FF + 10FFFF \NC \NR
-\NC \type {\Udelimiterover} \NC 0 + 0--FF + 10FFFF \NC \NR
-\NC \type {\Udelimiterunder} \NC 0 + 0--FF + 10FFFF \NC \NR
+\TB
+\NC \lpr {Uroot} \NC 0 + 0--FF + 10FFFF \NC \NR
+\NC \lpr {Uoverdelimiter} \NC 0 + 0--FF + 10FFFF \NC \NR
+\NC \lpr {Uunderdelimiter} \NC 0 + 0--FF + 10FFFF \NC \NR
+\NC \lpr {Udelimiterover} \NC 0 + 0--FF + 10FFFF \NC \NR
+\NC \lpr {Udelimiterunder} \NC 0 + 0--FF + 10FFFF \NC \NR
+\LL
\stoptabulate
\section{Cramped math styles}
+\topicindex {math+styles}
+\topicindex {math+spacing}
+\topicindex {math+cramped}
+
\LUATEX\ has four new primitives to set the cramped math styles directly:
\starttyping
@@ -283,22 +299,23 @@ are described as follows:
style if the original style was cramped.
\stopitem
\startitem
- Formulas under a \type {\sqrt} or \type {\overline} are in cramped style.
+ Formulas under a \type {\sqrt} or \prm {overline} are in cramped style.
\stopitem
\stopitemize
In \LUATEX\ one can set the styles in more detail which means that you sometimes
have to set both normal and cramped styles to get the effect you want. If we
-force styles in the script using \type {\scriptstyle} and \type {\crampedscriptstyle}
+force styles in the script using \prm {scriptstyle} and \lpr {crampedscriptstyle}
we get this:
\startbuffer[demo]
\starttabulate
\DB style \BC example \NC \NR
-\TB[small,samepage]
+\TB
\NC default \NC $b_{x=xx}^{x=xx}$ \NC \NR
\NC script \NC $b_{\scriptstyle x=xx}^{\scriptstyle x=xx}$ \NC \NR
\NC crampedscript \NC $b_{\crampedscriptstyle x=xx}^{\crampedscriptstyle x=xx}$ \NC \NR
+\LL
\stoptabulate
\stopbuffer
@@ -334,68 +351,71 @@ Now we get:
\section{Math parameter settings}
+\topicindex {math+parameters}
+
In \LUATEX, the font dimension parameters that \TEX\ used in math typesetting are
now accessible via primitive commands. In fact, refactoring of the math engine
has resulted in many more parameters than were accessible before.
\starttabulate
\DB primitive name \BC description \NC \NR
-\TB[small,samepage]
-\NC \type {\Umathquad} \NC the width of 18 mu's \NC \NR
-\NC \type {\Umathaxis} \NC height of the vertical center axis of
+\TB
+\NC \lpr {Umathquad} \NC the width of 18 mu's \NC \NR
+\NC \lpr {Umathaxis} \NC height of the vertical center axis of
the math formula above the baseline \NC \NR
-\NC \type {\Umathoperatorsize} \NC minimum size of large operators in display mode \NC \NR
-\NC \type {\Umathoverbarkern} \NC vertical clearance above the rule \NC \NR
-\NC \type {\Umathoverbarrule} \NC the width of the rule \NC \NR
-\NC \type {\Umathoverbarvgap} \NC vertical clearance below the rule \NC \NR
-\NC \type {\Umathunderbarkern} \NC vertical clearance below the rule \NC \NR
-\NC \type {\Umathunderbarrule} \NC the width of the rule \NC \NR
-\NC \type {\Umathunderbarvgap} \NC vertical clearance above the rule \NC \NR
-\NC \type {\Umathradicalkern} \NC vertical clearance above the rule \NC \NR
-\NC \type {\Umathradicalrule} \NC the width of the rule \NC \NR
-\NC \type {\Umathradicalvgap} \NC vertical clearance below the rule \NC \NR
-\NC \type {\Umathradicaldegreebefore}\NC the forward kern that takes place before placement of
- the radical degree \NC \NR
-\NC \type {\Umathradicaldegreeafter} \NC the backward kern that takes place after placement of
- the radical degree \NC \NR
-\NC \type {\Umathradicaldegreeraise} \NC this is the percentage of the total height and depth of
- the radical sign that the degree is raised by; it is
- expressed in \type {percents}, so 60\% is expressed as the
- integer $60$ \NC \NR
-\NC \type {\Umathstackvgap} \NC vertical clearance between the two
- elements in a \type {\atop} stack \NC \NR
-\NC \type {\Umathstacknumup} \NC numerator shift upward in \type {\atop} stack \NC \NR
-\NC \type {\Umathstackdenomdown} \NC denominator shift downward in \type {\atop} stack \NC \NR
-\NC \type {\Umathfractionrule} \NC the width of the rule in a \type {\over} \NC \NR
-\NC \type {\Umathfractionnumvgap} \NC vertical clearance between the numerator and the rule \NC \NR
-\NC \type {\Umathfractionnumup} \NC numerator shift upward in \type {\over} \NC \NR
-\NC \type {\Umathfractiondenomvgap} \NC vertical clearance between the denominator and the rule \NC \NR
-\NC \type {\Umathfractiondenomdown} \NC denominator shift downward in \type {\over} \NC \NR
-\NC \type {\Umathfractiondelsize} \NC minimum delimiter size for \type {\...withdelims} \NC \NR
-\NC \type {\Umathlimitabovevgap} \NC vertical clearance for limits above operators \NC \NR
-\NC \type {\Umathlimitabovebgap} \NC vertical baseline clearance for limits above operators \NC \NR
-\NC \type {\Umathlimitabovekern} \NC space reserved at the top of the limit \NC \NR
-\NC \type {\Umathlimitbelowvgap} \NC vertical clearance for limits below operators \NC \NR
-\NC \type {\Umathlimitbelowbgap} \NC vertical baseline clearance for limits below operators \NC \NR
-\NC \type {\Umathlimitbelowkern} \NC space reserved at the bottom of the limit \NC \NR
-\NC \type {\Umathoverdelimitervgap} \NC vertical clearance for limits above delimiters \NC \NR
-\NC \type {\Umathoverdelimiterbgap} \NC vertical baseline clearance for limits above delimiters \NC \NR
-\NC \type {\Umathunderdelimitervgap} \NC vertical clearance for limits below delimiters \NC \NR
-\NC \type {\Umathunderdelimiterbgap} \NC vertical baseline clearance for limits below delimiters \NC \NR
-\NC \type {\Umathsubshiftdrop} \NC subscript drop for boxes and subformulas \NC \NR
-\NC \type {\Umathsubshiftdown} \NC subscript drop for characters \NC \NR
-\NC \type {\Umathsupshiftdrop} \NC superscript drop (raise, actually) for boxes and subformulas \NC \NR
-\NC \type {\Umathsupshiftup} \NC superscript raise for characters \NC \NR
-\NC \type {\Umathsubsupshiftdown} \NC subscript drop in the presence of a superscript \NC \NR
-\NC \type {\Umathsubtopmax} \NC the top of standalone subscripts cannot be higher than this
- above the baseline \NC \NR
-\NC \type {\Umathsupbottommin} \NC the bottom of standalone superscripts cannot be less than
- this above the baseline \NC \NR
-\NC \type {\Umathsupsubbottommax} \NC the bottom of the superscript of a combined super- and subscript
- be at least as high as this above the baseline \NC \NR
-\NC \type {\Umathsubsupvgap} \NC vertical clearance between super- and subscript \NC \NR
-\NC \type {\Umathspaceafterscript} \NC additional space added after a super- or subscript \NC \NR
-\NC \type {\Umathconnectoroverlapmin}\NC minimum overlap between parts in an extensible recipe \NC \NR
+\NC \lpr {Umathoperatorsize} \NC minimum size of large operators in display mode \NC \NR
+\NC \lpr {Umathoverbarkern} \NC vertical clearance above the rule \NC \NR
+\NC \lpr {Umathoverbarrule} \NC the width of the rule \NC \NR
+\NC \lpr {Umathoverbarvgap} \NC vertical clearance below the rule \NC \NR
+\NC \lpr {Umathunderbarkern} \NC vertical clearance below the rule \NC \NR
+\NC \lpr {Umathunderbarrule} \NC the width of the rule \NC \NR
+\NC \lpr {Umathunderbarvgap} \NC vertical clearance above the rule \NC \NR
+\NC \lpr {Umathradicalkern} \NC vertical clearance above the rule \NC \NR
+\NC \lpr {Umathradicalrule} \NC the width of the rule \NC \NR
+\NC \lpr {Umathradicalvgap} \NC vertical clearance below the rule \NC \NR
+\NC \lpr {Umathradicaldegreebefore}\NC the forward kern that takes place before placement of
+ the radical degree \NC \NR
+\NC \lpr {Umathradicaldegreeafter} \NC the backward kern that takes place after placement of
+ the radical degree \NC \NR
+\NC \lpr {Umathradicaldegreeraise} \NC this is the percentage of the total height and depth of
+ the radical sign that the degree is raised by; it is
+ expressed in \type {percents}, so 60\% is expressed as the
+ integer $60$ \NC \NR
+\NC \lpr {Umathstackvgap} \NC vertical clearance between the two
+ elements in a \prm {atop} stack \NC \NR
+\NC \lpr {Umathstacknumup} \NC numerator shift upward in \prm {atop} stack \NC \NR
+\NC \lpr {Umathstackdenomdown} \NC denominator shift downward in \prm {atop} stack \NC \NR
+\NC \lpr {Umathfractionrule} \NC the width of the rule in a \prm {over} \NC \NR
+\NC \lpr {Umathfractionnumvgap} \NC vertical clearance between the numerator and the rule \NC \NR
+\NC \lpr {Umathfractionnumup} \NC numerator shift upward in \prm {over} \NC \NR
+\NC \lpr {Umathfractiondenomvgap} \NC vertical clearance between the denominator and the rule \NC \NR
+\NC \lpr {Umathfractiondenomdown} \NC denominator shift downward in \prm {over} \NC \NR
+\NC \lpr {Umathfractiondelsize} \NC minimum delimiter size for \type {\...withdelims} \NC \NR
+\NC \lpr {Umathlimitabovevgap} \NC vertical clearance for limits above operators \NC \NR
+\NC \lpr {Umathlimitabovebgap} \NC vertical baseline clearance for limits above operators \NC \NR
+\NC \lpr {Umathlimitabovekern} \NC space reserved at the top of the limit \NC \NR
+\NC \lpr {Umathlimitbelowvgap} \NC vertical clearance for limits below operators \NC \NR
+\NC \lpr {Umathlimitbelowbgap} \NC vertical baseline clearance for limits below operators \NC \NR
+\NC \lpr {Umathlimitbelowkern} \NC space reserved at the bottom of the limit \NC \NR
+\NC \lpr {Umathoverdelimitervgap} \NC vertical clearance for limits above delimiters \NC \NR
+\NC \lpr {Umathoverdelimiterbgap} \NC vertical baseline clearance for limits above delimiters \NC \NR
+\NC \lpr {Umathunderdelimitervgap} \NC vertical clearance for limits below delimiters \NC \NR
+\NC \lpr {Umathunderdelimiterbgap} \NC vertical baseline clearance for limits below delimiters \NC \NR
+\NC \lpr {Umathsubshiftdrop} \NC subscript drop for boxes and subformulas \NC \NR
+\NC \lpr {Umathsubshiftdown} \NC subscript drop for characters \NC \NR
+\NC \lpr {Umathsupshiftdrop} \NC superscript drop (raise, actually) for boxes and subformulas \NC \NR
+\NC \lpr {Umathsupshiftup} \NC superscript raise for characters \NC \NR
+\NC \lpr {Umathsubsupshiftdown} \NC subscript drop in the presence of a superscript \NC \NR
+\NC \lpr {Umathsubtopmax} \NC the top of standalone subscripts cannot be higher than this
+ above the baseline \NC \NR
+\NC \lpr {Umathsupbottommin} \NC the bottom of standalone superscripts cannot be less than
+ this above the baseline \NC \NR
+\NC \lpr {Umathsupsubbottommax} \NC the bottom of the superscript of a combined super- and subscript
+ be at least as high as this above the baseline \NC \NR
+\NC \lpr {Umathsubsupvgap} \NC vertical clearance between super- and subscript \NC \NR
+\NC \lpr {Umathspaceafterscript} \NC additional space added after a super- or subscript \NC \NR
+\NC \lpr {Umathconnectoroverlapmin}\NC minimum overlap between parts in an extensible recipe \NC \NR
+\LL
\stoptabulate
Each of the parameters in this section can be set by a command like this:
@@ -409,20 +429,27 @@ needed.
\section{Skips around display math}
-The injection of \type {\abovedisplayskip} and \type {\belowdisplayskip} is not
+\topicindex {math+spacing}
+
+The injection of \prm {abovedisplayskip} and \prm {belowdisplayskip} is not
symmetrical. An above one is always inserted, also when zero, but the below is
only inserted when larger than zero. Especially the later makes it sometimes hard
-to fully control spacing. Therefore \LUATEX\ comes with a new directive: \type
-{\mathdisplayskipmode}. The following values apply:
+to fully control spacing. Therefore \LUATEX\ comes with a new directive: \lpr
+{mathdisplayskipmode}. The following values apply:
-\starttabulate
+\starttabulate[|c|l|]
+\DB value \BC meaning \NC \NR
+\TB
\NC 0 \NC normal \TEX\ behaviour \NC \NR
\NC 1 \NC always (same as 0) \NC \NR
\NC 2 \NC only when not zero \NC \NR
\NC 3 \NC never, not even when not zero \NC \NR
+\LL
\stoptabulate
-\section{Font-based Math Parameters}
+\section{Font|-|based Math Parameters}
+
+\topicindex {math+parameters}
While it is nice to have these math parameters available for tweaking, it would
be tedious to have to set each of them by hand. For this reason, \LUATEX\
@@ -436,10 +463,10 @@ case no attention is paid to which family is being assigned to: the \type
{MathConstants} tables in the last assigned family sets all parameters.
In the table below, the one|-|letter style abbreviations and symbolic tfm font
-dimension names match those using in the \TeX book. Assignments to \type
-{\textfont} set the values for the cramped and uncramped display and text styles,
-\type {\scriptfont} sets the script styles, and \type {\scriptscriptfont} sets
-the scriptscript styles, so we have eight parameters for three font sizes. In the
+dimension names match those using in the \TeX book. Assignments to \prm
+{textfont} set the values for the cramped and uncramped display and text styles,
+\prm {scriptfont} sets the script styles, and \prm {scriptscriptfont} sets the
+scriptscript styles, so we have eight parameters for three font sizes. In the
\TFM\ case, assignments only happen in family~2 and family~3 (and of course only
for the parameters for which there are font dimensions).
@@ -447,7 +474,7 @@ Besides the parameters below, \LUATEX\ also looks at the \quote {space} font
dimension parameter. For math fonts, this should be set to zero.
\def\MathLine#1#2#3#4#5%
- {\TB[small,samepage]
+ {\TB
\NC \llap{\high{\tx #2\enspace}}\ttbf \string #1 \NC \tt #5 \NC \NR
\NC \tx #3 \NC \tt #4 \NC \NR}
@@ -511,41 +538,42 @@ dimension parameter. For math fonts, this should be set to zero.
\MathLine{\Umathunderbarrule} {} {} {UnderbarRuleThickness} {default_rule_thickness}
\MathLine{\Umathunderbarvgap} {} {} {UnderbarVerticalGap} {3*default_rule_thickness}
\MathLine{\Umathconnectoroverlapmin}{5} {} {MinConnectorOverlap} {0}
+\LL
\stoptabulate
-Note 1: \OPENTYPE\ fonts set \type {\Umathlimitabovekern} and \type
-{\Umathlimitbelowkern} to zero and set \type {\Umathquad} to the font size of the
+Note 1: \OPENTYPE\ fonts set \lpr {Umathlimitabovekern} and \lpr
+{Umathlimitbelowkern} to zero and set \lpr {Umathquad} to the font size of the
used font, because these are not supported in the \type {MATH} table,
-Note 2: Traditional \TFM\ fonts do not set \type {\Umathradicalrule} because
+Note 2: Traditional \TFM\ fonts do not set \lpr {Umathradicalrule} because
\TEX82\ uses the height of the radical instead. When this parameter is indeed not
set when \LUATEX\ has to typeset a radical, a backward compatibility mode will
kick in that assumes that an oldstyle \TEX\ font is used. Also, they do not set
-\type {\Umathradicaldegreebefore}, \type {\Umathradicaldegreeafter}, and \type
-{\Umathradicaldegreeraise}. These are then automatically initialized to
+\lpr {Umathradicaldegreebefore}, \lpr {Umathradicaldegreeafter}, and \lpr
+{Umathradicaldegreeraise}. These are then automatically initialized to
$5/18$quad, $-10/18$quad, and 60.
-Note 3: If \TFM\ fonts are used, then the \type {\Umathradicalvgap} is not set
+Note 3: If \TFM\ fonts are used, then the \lpr {Umathradicalvgap} is not set
until the first time \LUATEX\ has to typeset a formula because this needs
parameters from both family~2 and family~3. This provides a partial backward
-compatibility with \TEX82, but that compatibility is only partial: once the \type
-{\Umathradicalvgap} is set, it will not be recalculated any more.
+compatibility with \TEX82, but that compatibility is only partial: once the \lpr
+{Umathradicalvgap} is set, it will not be recalculated any more.
-Note 4: When \TFM\ fonts are used a similar situation arises with respect to
-\type {\Umathspaceafterscript}: it is not set until the first time \LUATEX\ has
-to typeset a formula. This provides some backward compatibility with \TEX82. But
-once the \type {\Umathspaceafterscript} is set, \type {\scriptspace} will never
-be looked at again.
+Note 4: When \TFM\ fonts are used a similar situation arises with respect to \lpr
+{Umathspaceafterscript}: it is not set until the first time \LUATEX\ has to
+typeset a formula. This provides some backward compatibility with \TEX82. But
+once the \lpr {Umathspaceafterscript} is set, \prm {scriptspace} will never be
+looked at again.
-Note 5: Traditional \TFM\ fonts set \type {\Umathconnectoroverlapmin} to zero
+Note 5: Traditional \TFM\ fonts set \lpr {Umathconnectoroverlapmin} to zero
because \TEX82\ always stacks extensibles without any overlap.
-Note 6: The \type {\Umathoperatorsize} is only used in \type {\displaystyle}, and
-is only set in \OPENTYPE\ fonts. In \TFM\ font mode, it is artificially set to
-one scaled point more than the initial attempt's size, so that always the \quote
+Note 6: The \lpr {Umathoperatorsize} is only used in \prm {displaystyle}, and is
+only set in \OPENTYPE\ fonts. In \TFM\ font mode, it is artificially set to one
+scaled point more than the initial attempt's size, so that always the \quote
{first next} will be tried, just like in \TEX82.
-Note 7: The \type {\Umathradicaldegreeraise} is a special case because it is the
+Note 7: The \lpr {Umathradicaldegreeraise} is a special case because it is the
only parameter that is expressed in a percentage instead of as a number of scaled
points.
@@ -557,12 +585,14 @@ Note 9: \type {FractionDelimiterDisplayStyleSize} and \type
{FractionDelimiterSize} do not actually exist in the \quote {standard} \OPENTYPE\
math font Cambria, but were useful enough to be added.
-\section{Nolimit correction}
+\section {Nolimit correction}
+
+\topicindex {math+limits}
-There are two extra math parameters \type {\Umathnolimitsupfactor} and \type
-{\Umathnolimitsubfactor} that were added to provide some control over how limits
+There are two extra math parameters \lpr {Umathnolimitsupfactor} and \lpr
+{Umathnolimitsubfactor} that were added to provide some control over how limits
are spaced (for example the position of super and subscripts after integral
-operators). They relate to an extra parameter \type {\mathnolimitsmode}. The half
+operators). They relate to an extra parameter \lpr {mathnolimitsmode}. The half
corrections are what happens when scripts are placed on above and below. The
problem with italic corrections is that officially that correction italic is used
for above|/|below placement while advanced kerns are used for placement at the
@@ -609,13 +639,15 @@ When the mode is set to one, the math parameters are used. This way a macro
package writer can decide what looks best. Given the current state of fonts in
\CONTEXT\ we currently use mode 1 with factor 0 for the superscript and 750 for
the subscripts. Positive values are used for both parameters but the subscript
-shifts to the left. A \type {\mathnolimitsmode} larger that 15 is considered to
+shifts to the left. A \lpr {mathnolimitsmode} larger that 15 is considered to
be a factor for the subscript correction. This feature can be handy when
experimenting.
-\section{Math italic mess}
+\section {Math italic mess}
-The \type {\mathitalicsmode} parameter can be set to~1 to force italic correction
+\topicindex {math+italics}
+
+The \lpr {mathitalicsmode} parameter can be set to~1 to force italic correction
before noads that represent some more complex structure (read: everything
that is not an ord, bin, rel, open, close, punct or inner). We show a Cambria
example.
@@ -641,20 +673,26 @@ example.
This kind of parameters relate to the fact that italic correction in \OPENTYPE\
math is bound to fuzzy rules. So, control is the solution.
-\section{Script and kerning}
+\section {Script and kerning}
+
+\topicindex {math+kerning}
+\topicindex {math+scripts}
If you want typeset text in math macro packages often provide something \type
{\text} which obeys the script sizes. As the definition can be anything there is
a good change that the kerning doesn't come out well when used in a script. Given
-that the first glyph ends up in an \type {\hbox} we have some control over this.
-And, as a bonus we also added control over the normal sublist kerning. The \type
-{\mathscriptboxmode} parameter defaults to~1.
+that the first glyph ends up in an \prm {hbox} we have some control over this.
+And, as a bonus we also added control over the normal sublist kerning. The \lpr
+{mathscriptboxmode} parameter defaults to~1.
-\starttabulate[|l|l|]
+\starttabulate[|c|l|]
+\DB value \BC meaning \NC \NR
+\TB
\NC \type {0} \NC forget about kerning \NC \NR
\NC \type {1} \NC kern math sub lists with a valid glyph \NC \NR
\NC \type {2} \NC also kern math sub boxes that have a valid glyph \NC \NR
\NC \type {2} \NC only kern math sub boxes with a boundary node present\NC \NR
+\LL
\stoptabulate
Here we show some examples. Of course this doesn't solve all our problems, if
@@ -690,7 +728,7 @@ italics, while other fonts can lack kerns.
\NC dejavu \NC \Show{1}{0}{dejavu} \NC\Show{1}{1}{dejavu} \NC \Show{2}{1}{dejavu} \NC \Show{2}{2}{dejavu} \NC \Show{3}{3}{dejavu} \NC \NR
\stoptabulate
-Kerning between a character subscript is controlled by \type {\mathscriptcharmode}
+Kerning between a character subscript is controlled by \lpr {mathscriptcharmode}
which also defaults to~1.
Here is another example. Internally we tag kerns as italic kerns or font kerns
@@ -723,15 +761,17 @@ control over what one can turn on and off.
\LL
\stoptabulate
-\section{Unscaled fences}
+\section {Unscaled fences}
+
+\topicindex {math+fences}
-The \type {\mathdelimitersmode} primitive is experimental and deals with the
-following (potential) problems. Three bits can be set. The first bit prevents
-an unwanted shift when the fence symbol is not scaled (a cambria side effect). The
-second bit forces italic correction between a preceding character ordinal and
-the fenced subformula, while the third bit turns that subformula into a ordinary
-so that the same spacing applies as with unfenced variants. Here we show Cambria
-(with \type {\mathitalicsmode} enabled).
+The \lpr {mathdelimitersmode} primitive is experimental and deals with the
+following (potential) problems. Three bits can be set. The first bit prevents an
+unwanted shift when the fence symbol is not scaled (a cambria side effect). The
+second bit forces italic correction between a preceding character ordinal and the
+fenced subformula, while the third bit turns that subformula into a ordinary so
+that the same spacing applies as with unfenced variants. Here we show Cambria
+(with \lpr {mathitalicsmode} enabled).
\starttexdefinition Whatever #1
\NC \type{\mathdelimitersmode = #1}
@@ -749,23 +789,27 @@ so that the same spacing applies as with unfenced variants. Here we show Cambria
\stop
So, when set to 7 fenced subformulas with unscaled delimiters come out the same
-as unfenced ones. This can be handy for cases where one is forced to use \type
-{\left} and \type {\right} always because of unpredictable content. As said, it's
-an experimental features (which somehow fits in the exceptional way fences are
-dealt with in the engine). The full list of flags is given in the next table:
-
-\starttabulate[|T|l|]
-\NC "01 \NC don't apply the usual shift \NC \NR
-\NC "02 \NC apply italic correction when possible \NC \NR
-\NC "04 \NC force a ordinary subformula \NC \NR
-\NC "08 \NC no shift when a base character \NC \NR
-\NC "10 \NC only shift when an extensible \NC \NR
+as unfenced ones. This can be handy for cases where one is forced to use \prm
+{left} and \prm {right} always because of unpredictable content. As said, it's an
+experimental features (which somehow fits in the exceptional way fences are dealt
+with in the engine). The full list of flags is given in the next table:
+
+\starttabulate[|c|l|]
+\DB value \BC meaning \NC \NR
+\TB
+\NC \type{"01} \NC don't apply the usual shift \NC \NR
+\NC \type{"02} \NC apply italic correction when possible \NC \NR
+\NC \type{"04} \NC force a ordinary subformula \NC \NR
+\NC \type{"08} \NC no shift when a base character \NC \NR
+\NC \type{"10} \NC only shift when an extensible \NC \NR
+\LL
\stoptabulate
-The effect can depend on the font (and for Cambria one can use for instance \type
-{"16}).
+The effect can depend on the font (and for Cambria one can use for instance \type {"16}).
+
+\section {Math spacing setting}
-\section{Math spacing setting}
+\topicindex {math+spacing}
Besides the parameters mentioned in the previous sections, there are also 64 new
primitives to control the math spacing table (as explained in Chapter~18 of the
@@ -773,75 +817,75 @@ primitives to control the math spacing table (as explained in Chapter~18 of the
types, but for completeness' sake, here is the whole list:
\starttwocolumns
-\starttyping
-\Umathordordspacing
-\Umathordopspacing
-\Umathordbinspacing
-\Umathordrelspacing
-\Umathordopenspacing
-\Umathordclosespacing
-\Umathordpunctspacing
-\Umathordinnerspacing
-\Umathopordspacing
-\Umathopopspacing
-\Umathopbinspacing
-\Umathoprelspacing
-\Umathopopenspacing
-\Umathopclosespacing
-\Umathoppunctspacing
-\Umathopinnerspacing
-\Umathbinordspacing
-\Umathbinopspacing
-\Umathbinbinspacing
-\Umathbinrelspacing
-\Umathbinopenspacing
-\Umathbinclosespacing
-\Umathbinpunctspacing
-\Umathbininnerspacing
-\Umathrelordspacing
-\Umathrelopspacing
-\Umathrelbinspacing
-\Umathrelrelspacing
-\Umathrelopenspacing
-\Umathrelclosespacing
-\Umathrelpunctspacing
-\Umathrelinnerspacing
-\Umathopenordspacing
-\Umathopenopspacing
-\Umathopenbinspacing
-\Umathopenrelspacing
-\Umathopenopenspacing
-\Umathopenclosespacing
-\Umathopenpunctspacing
-\Umathopeninnerspacing
-\Umathcloseordspacing
-\Umathcloseopspacing
-\Umathclosebinspacing
-\Umathcloserelspacing
-\Umathcloseopenspacing
-\Umathcloseclosespacing
-\Umathclosepunctspacing
-\Umathcloseinnerspacing
-\Umathpunctordspacing
-\Umathpunctopspacing
-\Umathpunctbinspacing
-\Umathpunctrelspacing
-\Umathpunctopenspacing
-\Umathpunctclosespacing
-\Umathpunctpunctspacing
-\Umathpunctinnerspacing
-\Umathinnerordspacing
-\Umathinneropspacing
-\Umathinnerbinspacing
-\Umathinnerrelspacing
-\Umathinneropenspacing
-\Umathinnerclosespacing
-\Umathinnerpunctspacing
-\Umathinnerinnerspacing
-\stoptyping
+\startlines
+\lpr {Umathordordspacing}
+\lpr {Umathordopspacing}
+\lpr {Umathordbinspacing}
+\lpr {Umathordrelspacing}
+\lpr {Umathordopenspacing}
+\lpr {Umathordclosespacing}
+\lpr {Umathordpunctspacing}
+\lpr {Umathordinnerspacing}
+\lpr {Umathopordspacing}
+\lpr {Umathopopspacing}
+\lpr {Umathopbinspacing}
+\lpr {Umathoprelspacing}
+\lpr {Umathopopenspacing}
+\lpr {Umathopclosespacing}
+\lpr {Umathoppunctspacing}
+\lpr {Umathopinnerspacing}
+\lpr {Umathbinordspacing}
+\lpr {Umathbinopspacing}
+\lpr {Umathbinbinspacing}
+\lpr {Umathbinrelspacing}
+\lpr {Umathbinopenspacing}
+\lpr {Umathbinclosespacing}
+\lpr {Umathbinpunctspacing}
+\lpr {Umathbininnerspacing}
+\lpr {Umathrelordspacing}
+\lpr {Umathrelopspacing}
+\lpr {Umathrelbinspacing}
+\lpr {Umathrelrelspacing}
+\lpr {Umathrelopenspacing}
+\lpr {Umathrelclosespacing}
+\lpr {Umathrelpunctspacing}
+\lpr {Umathrelinnerspacing}
+\lpr {Umathopenordspacing}
+\lpr {Umathopenopspacing}
+\lpr {Umathopenbinspacing}
+\lpr {Umathopenrelspacing}
+\lpr {Umathopenopenspacing}
+\lpr {Umathopenclosespacing}
+\lpr {Umathopenpunctspacing}
+\lpr {Umathopeninnerspacing}
+\lpr {Umathcloseordspacing}
+\lpr {Umathcloseopspacing}
+\lpr {Umathclosebinspacing}
+\lpr {Umathcloserelspacing}
+\lpr {Umathcloseopenspacing}
+\lpr {Umathcloseclosespacing}
+\lpr {Umathclosepunctspacing}
+\lpr {Umathcloseinnerspacing}
+\lpr {Umathpunctordspacing}
+\lpr {Umathpunctopspacing}
+\lpr {Umathpunctbinspacing}
+\lpr {Umathpunctrelspacing}
+\lpr {Umathpunctopenspacing}
+\lpr {Umathpunctclosespacing}
+\lpr {Umathpunctpunctspacing}
+\lpr {Umathpunctinnerspacing}
+\lpr {Umathinnerordspacing}
+\lpr {Umathinneropspacing}
+\lpr {Umathinnerbinspacing}
+\lpr {Umathinnerrelspacing}
+\lpr {Umathinneropenspacing}
+\lpr {Umathinnerclosespacing}
+\lpr {Umathinnerpunctspacing}
+\lpr {Umathinnerinnerspacing}
+\stoplines
\stoptwocolumns
-These parameters are of type \type {\muskip}, so setting a parameter can be done
+These parameters are of type \prm {muskip}, so setting a parameter can be done
like this:
\starttyping
@@ -851,11 +895,11 @@ like this:
They are all initialized by \type {initex} to the values mentioned in the table
in Chapter~18 of the \TEX book.
-Note 1: for ease of use as well as for backward compatibility, \type
-{\thinmuskip}, \type {\medmuskip} and \type {\thickmuskip} are treated
-especially. In their case a pointer to the corresponding internal parameter is
-saved, not the actual \type {\muskip} value. This means that any later changes to
-one of these three parameters will be taken into account.
+Note 1: for ease of use as well as for backward compatibility, \prm {thinmuskip},
+\prm {medmuskip} and \prm {thickmuskip} are treated especially. In their case a
+pointer to the corresponding internal parameter is saved, not the actual \prm
+{muskip} value. This means that any later changes to one of these three
+parameters will be taken into account.
Note 2: Careful readers will realise that there are also primitives for the items
marked \type {*} in the \TEX book. These will not actually be used as those
@@ -864,12 +908,14 @@ orthogonality. They are initialized to zero.
\section[mathacc]{Math accent handling}
+\topicindex {math+accents}
+
\LUATEX\ supports both top accents and bottom accents in math mode, and math
accents stretch automatically (if this is supported by the font the accent comes
from, of course). Bottom and combined accents as well as fixed-width math accents
-are controlled by optional keywords following \type {\Umathaccent}.
+are controlled by optional keywords following \lpr {Umathaccent}.
-The keyword \type {bottom} after \type {\Umathaccent} signals that a bottom accent
+The keyword \type {bottom} after \lpr {Umathaccent} signals that a bottom accent
is needed, and the keyword \type {both} signals that both a top and a bottom
accent are needed (in this case two accents need to be specified, of course).
@@ -885,7 +931,7 @@ A simple example:
If a math top accent has to be placed and the accentee is a character and has a
non-zero \type {top_accent} value, then this value will be used to place the
-accent instead of the \type {\skewchar} kern used by \TEX82.
+accent instead of the \prm {skewchar} kern used by \TEX82.
The \type {top_accent} value represents a vertical line somewhere in the
accentee. The accent will be shifted horizontally such that its own \type
@@ -903,7 +949,7 @@ correction takes place.
Possible locations are \type {top}, \type {bottom}, \type {both} and \type
{center}. When no location is given \type {top} is assumed. An additional
-parameter \type {fraction} can be specified followed by a number; a value of for
+parameter \nod {fraction} can be specified followed by a number; a value of for
instance 1200 means that the criterium is 1.2 times the width of the nucleus. The
fraction only applies to the stepwise selected shapes and is mostly meant for the
\type {overlay} location. It also works for the other locations but then it
@@ -911,18 +957,20 @@ concerns the width.
\section{Math root extension}
-The new primitive \type {\Uroot} allows the construction of a radical noad
-including a degree field. Its syntax is an extension of \type {\Uradical}:
+\topicindex {math+radicals}
+
+The new primitive \lpr {Uroot} allows the construction of a radical noad
+including a degree field. Its syntax is an extension of \lpr {Uradical}:
\starttyping
\Uradical <fam integer> <char integer> <radicand>
\Uroot <fam integer> <char integer> <degree> <radicand>
\stoptyping
-The placement of the degree is controlled by the math parameters \type
-{\Umathradicaldegreebefore}, \type {\Umathradicaldegreeafter}, and \type
-{\Umathradicaldegreeraise}. The degree will be typeset in \type
-{\scriptscriptstyle}.
+The placement of the degree is controlled by the math parameters \lpr
+{Umathradicaldegreebefore}, \lpr {Umathradicaldegreeafter}, and \lpr
+{Umathradicaldegreeraise}. The degree will be typeset in \prm
+{scriptscriptstyle}.
\section{Math kerning in super- and subscripts}
@@ -985,9 +1033,13 @@ pairs at all).
\section{Scripts on horizontally extensible items like arrows}
-The primitives \type {\Uunderdelimiter} and \type {\Uoverdelimiter} allow the
+\topicindex {math+scripts}
+\topicindex {math+delimiters}
+\topicindex {math+extensibles}
+
+The primitives \lpr {Uunderdelimiter} and \lpr {Uoverdelimiter} allow the
placement of a subscript or superscript on an automatically extensible item and
-\type {\Udelimiterunder} and \type {\Udelimiterover} allow the placement of an
+\lpr {Udelimiterunder} and \lpr {Udelimiterover} allow the placement of an
automatically extensible item as a subscript or superscript on a nucleus. The
input:
@@ -1005,18 +1057,18 @@ $\Udelimiterunder 0 "2194 {\hbox{\strut delimiterunder}}$
\blank \startnarrower \getbuffer \stopnarrower \blank
-The vertical placements are controlled by \type {\Umathunderdelimiterbgap}, \type
-{\Umathunderdelimitervgap}, \type {\Umathoverdelimiterbgap}, and \type
-{\Umathoverdelimitervgap} in a similar way as limit placements on large operators.
-The superscript in \type {\Uoverdelimiter} is typeset in a suitable scripted style,
-the subscript in \type {\Uunderdelimiter} is cramped as well.
+The vertical placements are controlled by \lpr {Umathunderdelimiterbgap}, \lpr
+{Umathunderdelimitervgap}, \lpr {Umathoverdelimiterbgap}, and \lpr
+{Umathoverdelimitervgap} in a similar way as limit placements on large operators.
+The superscript in \lpr {Uoverdelimiter} is typeset in a suitable scripted style,
+the subscript in \lpr {Uunderdelimiter} is cramped as well.
These primitives accepts an option \type {width} specification. When used the
also optional keywords \type {left}, \type {middle} and \type {right} will
determine what happens when a requested size can't be met (which can happen when
we step to successive larger variants).
-An extra primitive \type {\Uhextensible} is available that can be used like this:
+An extra primitive \lpr {Uhextensible} is available that can be used like this:
\startbuffer
$\Uhextensible width 10cm 0 "2194$
@@ -1043,6 +1095,8 @@ font metrics are involved we have a different code path for traditional fonts en
\section {Extracting values}
+\topicindex {math+codes}
+
You can extract the components of a math character. Say that we have defined:
\starttyping
@@ -1072,7 +1126,9 @@ do the following:
\section{fractions}
-The \type {\abovewithdelims} command accepts a keyword \type {exact}. When issued
+\topicindex {math+fractions}
+
+The \prm {abovewithdelims} command accepts a keyword \type {exact}. When issued
the extra space relative to the rule thickness is not added. One can of course
use the \type {\Umathfraction..gap} commands to influence the spacing. Also the
rule is still positioned around the math axis.
@@ -1086,7 +1142,7 @@ vertical gap for skewed fractions. Of course some guessing is needed in order to
implement something that uses them. And so we now provide a primitive similar to the
other fraction related ones but with a few options so that one can influence the
rendering. Of course a user can also mess around a bit with the parameters
-\type {\Umathskewedfractionhgap} and \type {\Umathskewedfractionvgap}.
+\lpr {Umathskewedfractionhgap} and \lpr {Umathskewedfractionvgap}.
The syntax used here is:
@@ -1134,6 +1190,8 @@ For Latin Modern The result looks as follows:
\section {Last lines}
+\topicindex {math+last line}
+
There is a new primitive to control the overshoot in the calculation of the
previous line in mid|-|paragraph display math. The default value is 2 times
the em width of the current font:
@@ -1156,31 +1214,37 @@ get the length of the last line, the following will often work too:
\section {Other Math changes}
-\subsection {Verbose versions of single-character math commands}
+\subsection {Verbose versions of single|-|character math commands}
+
+\topicindex {math+styles}
\LUATEX\ defines six new primitives that have the same function as
\type {^}, \type {_}, \type {$}, and \type {$$}:
\starttabulate[|l|l|]
\DB primitive \BC explanation \NC \NR
-\TB[small,samepage]
-\NC \type {\Usuperscript} \NC duplicates the functionality of \type {^} \NC \NR
-\NC \type {\Usubscript} \NC duplicates the functionality of \type {_} \NC \NR
-\NC \type {\Ustartmath} \NC duplicates the functionality of \type {$}, % $
+\TB
+\NC \lpr {Usuperscript} \NC duplicates the functionality of \type {^} \NC \NR
+\NC \lpr {Usubscript} \NC duplicates the functionality of \type {_} \NC \NR
+\NC \lpr {Ustartmath} \NC duplicates the functionality of \type {$}, % $
when used in non-math mode. \NC \NR
-\NC \type {\Ustopmath} \NC duplicates the functionality of \type {$}, % $
+\NC \lpr {Ustopmath} \NC duplicates the functionality of \type {$}, % $
when used in inline math mode. \NC \NR
-\NC \type {\Ustartdisplaymath} \NC duplicates the functionality of \type {$$}, % $$
+\NC \lpr {Ustartdisplaymath} \NC duplicates the functionality of \type {$$}, % $$
when used in non-math mode. \NC \NR
-\NC \type {\Ustopdisplaymath} \NC duplicates the functionality of \type {$$}, % $$
+\NC \lpr {Ustopdisplaymath} \NC duplicates the functionality of \type {$$}, % $$
when used in display math mode. \NC \NR
+\LL
\stoptabulate
-The \type {\Ustopmath} and \type {\Ustopdisplaymath} primitives check if the current
+The \lpr {Ustopmath} and \lpr {Ustopdisplaymath} primitives check if the current
math mode is the correct one (inline vs.\ displayed), but you can freely intermix
the four mathon|/|mathoff commands with explicit dollar sign(s).
-\subsection{Script commands \type {\Unosuperscript} and \type {\Unosubscript}}
+\subsection{Script commands \lpr {Unosuperscript} and \lpr {Unosubscript}}
+
+\topicindex {math+styles}
+\topicindex {math+scripts}
These two commands result in super- and subscripts but with the current style (at the
time of rendering). So,
@@ -1198,22 +1262,26 @@ $
results in \inlinebuffer[script].
+\subsection{Allowed math commands in non|-|math modes}
-\subsection{Allowed math commands in non-math modes}
+\topicindex {math+text}
+\topicindex {text+math}
-The commands \type {\mathchar}, and \type {\Umathchar} and control sequences that
-are the result of \type {\mathchardef} or \type {\Umathchardef} are also
-acceptable in the horizontal and vertical modes. In those cases, the \type
-{\textfont} from the requested math family is used.
+The commands \prm {mathchar}, and \lpr {Umathchar} and control sequences that are
+the result of \prm {mathchardef} or \lpr {Umathchardef} are also acceptable in
+the horizontal and vertical modes. In those cases, the \prm {textfont} from the
+requested math family is used.
\section{Math surrounding skips}
-Inline math is surrounded by (optional) \type {\mathsurround} spacing but that is fixed
-dimension. There is now an additional parameter \type {\mathsurroundskip}. When set to a
+\topicindex {math+spacing}
+
+Inline math is surrounded by (optional) \prm {mathsurround} spacing but that is fixed
+dimension. There is now an additional parameter \lpr {mathsurroundskip}. When set to a
non|-|zero value (or zero with some stretch or shrink) this parameter will replace
-\type {\mathsurround}. By using an additional parameter instead of changing the nature
-of \type {\mathsurround}, we can remain compatible. In the meantime a bit more
-control has been added via \type {\mathsurroundmode}. This directive can take 6 values
+\prm {mathsurround}. By using an additional parameter instead of changing the nature
+of \prm {mathsurround}, we can remain compatible. In the meantime a bit more
+control has been added via \lpr {mathsurroundmode}. This directive can take 6 values
with zero being the default behaviour.
\start
@@ -1234,15 +1302,16 @@ with zero being the default behaviour.
\starttabulate[|c|c|c|pl|]
\DB mode \BC x\$x\$x \BC x \$x\$ x \BC effect \NC \NR
-\TB[small,samepage]
-\OneLiner{0}{obey \type {\mathsurround} when \type {\mathsurroundskip} is 0pt}
+\TB
+\OneLiner{0}{obey \prm {mathsurround} when \lpr {mathsurroundskip} is 0pt}
\OneLiner{1}{only add skip to the left}
\OneLiner{2}{only add skip to the right}
\OneLiner{3}{add skip to the left and right}
-\OneLiner{4}{ignore the skip setting, obey \type {\mathsurround}}
+\OneLiner{4}{ignore the skip setting, obey \prm {mathsurround}}
\OneLiner{5}{disable all spacing around math}
-\OneLiner{6}{only apply \type {\mathsurroundskip} when also spacing}
-\OneLiner{7}{only apply \type {\mathsurroundskip} when no spacing}
+\OneLiner{6}{only apply \lpr {mathsurroundskip} when also spacing}
+\OneLiner{7}{only apply \lpr {mathsurroundskip} when no spacing}
+\LL
\stoptabulate
\stop
@@ -1282,7 +1351,9 @@ fields in a node when applicable in the first occasion that checks them
% \stopitem
% \stopitemize
-\subsection {Delimiters: \type{\Uleft}, \type {\Umiddle} and \type {\Uright}}
+\subsection {Delimiters: \type{\Uleft}, \prm {Umiddle} and \prm {Uright}}
+
+\topicindex {math+delimiters}
Normally you will force delimiters to certain sizes by putting an empty box or
rule next to it. The resulting delimiter will either be a character from the
@@ -1325,13 +1396,15 @@ influence the spacing. The numbers are the same as for character classes.
We have three parameters that are used for this fixed anchoring:
-\starttabulate[|l|l|]
-\NC $d$ \NC \type {\Umathsubshiftdown} \NC \NR
-\NC $u$ \NC \type {\Umathsupshiftup} \NC \NR
-\NC $s$ \NC \type {\Umathsubsupshiftdown} \NC \NR
+\starttabulate[|c|l|]
+\DB parameter \BC register \NC \NR
+\NC $d$ \NC \lpr {Umathsubshiftdown} \NC \NR
+\NC $u$ \NC \lpr {Umathsupshiftup} \NC \NR
+\NC $s$ \NC \lpr {Umathsubsupshiftdown} \NC \NR
+\LL
\stoptabulate
-When we set \type {\mathscriptsmode} to a value other than zero these are used
+When we set \lpr {mathscriptsmode} to a value other than zero these are used
for calculating fixed positions. This is something that is needed for instance
for chemistry. You can manipulate the mentioned variables to achive different
effects.
@@ -1341,13 +1414,14 @@ effects.
\starttabulate[|c|c|c|p|]
\DB mode \BC down \BC up \BC example \NC \NR
-\TB[small,samepage]
+\TB
\NC 0 \NC dynamic \NC dynamic \NC \SampleMath{0} \NC \NR
\NC 1 \NC $d$ \NC $u$ \NC \SampleMath{1} \NC \NR
\NC 2 \NC $s$ \NC $u$ \NC \SampleMath{2} \NC \NR
\NC 3 \NC $s$ \NC $u + s - d$ \NC \SampleMath{3} \NC \NR
\NC 4 \NC $d + (s-d)/2$ \NC $u + (s-d)/2$ \NC \SampleMath{4} \NC \NR
\NC 5 \NC $d$ \NC $u + s - d$ \NC \SampleMath{5} \NC \NR
+\LL
\stoptabulate
The value of this parameter obeys grouping but applies to the whole current
@@ -1355,7 +1429,9 @@ formula.
% if needed we can put the value in stylenodes but maybe more should go there
-\subsection{Penalties: \type {\mathpenaltiesmode}}
+\subsection{Penalties: \lpr {mathpenaltiesmode}}
+
+\topicindex {math+penalties}
Only in inline math penalties will be added in a math list. You can force
penalties (also in display math) by setting:
@@ -1365,7 +1441,7 @@ penalties (also in display math) by setting:
\stoptyping
This primnitive is not really needed in \LUATEX\ because you can use the callback
-\type {mlist_to_hlist} to force penalties by just calling the regular routine
+\cbk {mlist_to_hlist} to force penalties by just calling the regular routine
with forced penalties. However, as part of opening up and control this primitive
makes sense. As a bonus we also provide two extra penalties:
@@ -1377,7 +1453,7 @@ makes sense. As a bonus we also provide two extra penalties:
They default to inifinite which signals that they don't need to be inserted. When
set they are injected before a binop or rel noad. This is an experimental feature.
-\subsection{Equation spacing: \type {\matheqnogapstep}}
+\subsection{Equation spacing: \lpr {matheqnogapstep}}
By default \TEX\ will add one quad between the equation and the number. This is
hard coded. A new primitive can control this:
@@ -1393,6 +1469,8 @@ is divided by 1000 which is the usual way to mimmick floating point factors in
\subsection {Tracing}
+\topicindex {math+tracing}
+
Because there are quite some math related parameters and values, it is possible
to limit tracing. Only when \type {tracingassigns} and|/|or \type
{tracingrestores} are set to~2 or more they will be traced.
@@ -1402,7 +1480,7 @@ to limit tracing. Only when \type {tracingassigns} and|/|or \type
The logic in the math engine is rather complex and there are often no universal
solutions (read: what works out well for one font, fails for another). Therefore
some variations in the implementation will be driven by options for which a new
-primitive \type {\mathoption} has been introduced (so that we don't end up with
+primitive \lpr {mathoption} has been introduced (so that we don't end up with
many new commands). The approach of options also permits us to see what effect a
specific solution has.
diff --git a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
index 16d5477fd..58280aaac 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
@@ -10,6 +10,9 @@
\startsubsection[title=The need for change]
+\topicindex {engines}
+\topicindex {history}
+
The first version of \LUATEX\ only had a few extra primitives and it was largely
the same as \PDFTEX. Then we merged substantial parts of \ALEPH\ into the code
and got more primitives. When we got more stable the decision was made to clean
@@ -28,6 +31,8 @@ the internal interfaces. These will also be mentioned.
\startsubsection[title=Changes from \TEX\ 3.1415926]
+\topicindex {\TEX}
+
Of course it all starts with traditional \TEX. Even if we started with \PDFTEX,
most still comes from the original. But we divert a bit.
@@ -62,21 +67,21 @@ most still comes from the original. But we divert a bit.
\stopitem
\startitem
- The upper limit to \type {\endlinechar} and \type {\newlinechar} is 127.
+ The upper limit to \prm {endlinechar} and \prm {newlinechar} is 127.
\stopitem
\startitem
- Magnification (\type {\mag}) is only supported in \DVI\ output mode. You can
+ Magnification (\prm {mag}) is only supported in \DVI\ output mode. You can
set this parameter and it even works with \type {true} units till you switch
to \PDF\ output mode. When you use \PDF\ output you can best not touch the
- \type {\mag} variable. This fuzzy behaviour is not much different from using
+ \prm {mag} variable. This fuzzy behaviour is not much different from using
\PDF\ backend related functionality while eventually \DVI\ output is
required.
After the output mode has been frozen (normally that happens when the first
page is shipped out) or when \PDF\ output is enabled, the \type {true}
specification is ignored. When you preload a plain format adapted to
- \LUATEX\ it can be that the \type {\mag} parameter already has been set.
+ \LUATEX\ it can be that the \prm {mag} parameter already has been set.
\stopitem
\stopitemize
@@ -85,6 +90,8 @@ most still comes from the original. But we divert a bit.
\startsubsection[title=Changes from \ETEX\ 2.2]
+\topicindex {\ETEX}
+
Being the de factor standard extension of course we provide the \ETEX\
functionality, but with a few small adaptations.
@@ -103,8 +110,8 @@ functionality, but with a few small adaptations.
\stopitem
\startitem
- Some of the tracing information that is output by \ETEX's \type
- {\tracingassigns} and \type {\tracingrestores} is not there.
+ Some of the tracing information that is output by \ETEX's \prm
+ {tracingassigns} and \prm {tracingrestores} is not there.
\stopitem
\startitem
@@ -127,6 +134,8 @@ functionality, but with a few small adaptations.
\startsubsection[title=Changes from \PDFTEX\ 1.40]
+\topicindex {\PDFTEX}
+
Because we want to produce \PDF\ the most natural starting point was the popular
\PDFTEX\ program. We inherit the stable features, dropped most of the
experimental code and promoted some functionality to core \LUATEX\ functionality
@@ -134,8 +143,8 @@ which in turn triggered renaming primitives.
For compatibility reasons we still refer to \type {\pdf...} commands but \LUATEX\
has a different backend interface. Instead of these primitives there are three
-interfacing primitives: \type {\pdfextension}, \type {\pdfvariable} and
-\type {\pdffeedback} that take keywords and optional further arguments. This way
+interfacing primitives: \lpr {pdfextension}, \lpr {pdfvariable} and
+\lpr {pdffeedback} that take keywords and optional further arguments. This way
we can extend the features when needed but don't need to adapt the core engine.
The front- and backend are decoupled as much as possible.
@@ -169,20 +178,20 @@ The front- and backend are decoupled as much as possible.
\stopitem
\startitem
- The version related primitives \type {\pdftexbanner}, \type {\pdftexversion}
- and \type {\pdftexrevision} are no longer present as there is no longer a
+ The version related primitives \orm {pdftexbanner}, \orm {pdftexversion}
+ and \orm {pdftexrevision} are no longer present as there is no longer a
relationship with \PDFTEX\ development.
\stopitem
\startitem
The experimental snapper mechanism has been removed and therefore also the
- primitives \type {\pdfignoreddimen}, \type {\pdffirstlineheight}, \type
- {\pdfeachlineheight}, \type {\pdfeachlinedepth} and \type {\pdflastlinedepth}
+ primitives \orm {pdfignoreddimen}, \orm {pdffirstlineheight}, \orm
+ {pdfeachlineheight}, \orm {pdfeachlinedepth} and \orm {pdflastlinedepth}
\stopitem
\startitem
- The experimental primitives \type {\primitive}, \type {\ifprimitive}, \type
- {\ifabsnum} and \type {\ifabsdim} are promoted to core primitives. The \type
+ The experimental primitives \lpr {primitive}, \lpr {ifprimitive}, \lpr
+ {ifabsnum} and \lpr {ifabsdim} are promoted to core primitives. The \type
{\pdf*} prefixed originals are not available.
\stopitem
@@ -193,8 +202,8 @@ The front- and backend are decoupled as much as possible.
\stopitem
\startitem
- Two extra token lists are provides, \type {\pdfxformresources} and \type
- {\pdfxformattr}, as an alternative to \type {\pdfxform} keywords.
+ Two extra token lists are provides, \orm {pdfxformresources} and \orm
+ {pdfxformattr}, as an alternative to \orm {pdfxform} keywords.
\stopitem
\startitem
@@ -205,27 +214,27 @@ The front- and backend are decoupled as much as possible.
\stopitem
\startitem
- The primitives \type {\pdfpagewidth} and \type {\pdfpageheight} have been removed
- because \type {\pagewidth} and \type {\pageheight} have that purpose.
+ The primitives \orm {pdfpagewidth} and \orm {pdfpageheight} have been removed
+ because \lpr {pagewidth} and \lpr {pageheight} have that purpose.
\stopitem
\startitem
- The primitives \type {\pdfnormaldeviate}, \type {\pdfuniformdeviate}, \type
- {\pdfsetrandomseed} and \type {\pdfrandomseed} have been promoted to core
+ The primitives \orm {pdfnormaldeviate}, \orm {pdfuniformdeviate}, \orm
+ {pdfsetrandomseed} and \orm {pdfrandomseed} have been promoted to core
primitives without \type {pdf} prefix so the original commands are no longer
recognized.
\stopitem
\startitem
- The primitives \type {\ifincsname}, \type {\expanded} and \type {\quitvmode}
+ The primitives \lpr {ifincsname}, \lpr {expanded} and \lpr {quitvmode}
are now core primitives.
\stopitem
\startitem
As the hz and protrusion mechanism are part of the core the related
- primitives \type {\lpcode}, \type {\rpcode}, \type {\efcode}, \type
- {\leftmarginkern}, \type {\rightmarginkern} are promoted to core primitives. The
- two commands \type {\protrudechars} and \type {\adjustspacing} replace their
+ primitives \lpr {lpcode}, \lpr {rpcode}, \lpr {efcode}, \lpr
+ {leftmarginkern}, \lpr {rightmarginkern} are promoted to core primitives. The
+ two commands \lpr {protrudechars} and \lpr {adjustspacing} replace their
prefixed with \type {\pdf} originals.
\stopitem
@@ -236,36 +245,36 @@ The front- and backend are decoupled as much as possible.
\stopitem
\startitem
- When \type {\adjustspacing} has value~2, hz optimization will be applied to
+ When \lpr {adjustspacing} has value~2, hz optimization will be applied to
glyphs and kerns. When the value is~3, only glyphs will be treated. A value
smaller than~2 disables this feature.
\stopitem
\startitem
- The \type {\tagcode} primitive is promoted to core primitive.
+ The \lpr {tagcode} primitive is promoted to core primitive.
\stopitem
\startitem
- The \type {\letterspacefont} feature is now part of the core but will not be
+ The \lpr {letterspacefont} feature is now part of the core but will not be
changed (improved). We just provide it for legacy use.
\stopitem
\startitem
- The \type {\pdfnoligatures} primitive is now \type {\ignoreligaturesinfont}.
+ The \orm {pdfnoligatures} primitive is now \lpr {ignoreligaturesinfont}.
\stopitem
\startitem
- The \type {\pdfcopyfont} primitive is now \type {\copyfont}.
+ The \orm {pdfcopyfont} primitive is now \lpr {copyfont}.
\stopitem
\startitem
- The \type {\pdffontexpand} primitive is now \type {\expandglyphsinfont}.
+ The \orm {pdffontexpand} primitive is now \lpr {expandglyphsinfont}.
\stopitem
\startitem
- Because position tracking is also available in \DVI\ mode the \type
- {\savepos}, \type {\lastxpos} and \type {\lastypos} commands now replace
- their \type {pdf} prefixed originals.
+ Because position tracking is also available in \DVI\ mode the \lpr {savepos},
+ \lpr {lastxpos} and \lpr {lastypos} commands now replace their \type {pdf}
+ prefixed originals.
\stopitem
\startitem
@@ -275,27 +284,27 @@ The front- and backend are decoupled as much as possible.
\stopitem
\startitem
- The initializers \type {\pdfoutput} has been replaced by \type {\outputmode} and
- \type {\pdfdraftmode} is now \type {\draftmode}.
+ The initializers \orm {pdfoutput} has been replaced by \lpr {outputmode} and
+ \orm {pdfdraftmode} is now \lpr {draftmode}.
\stopitem
\startitem
- The pixel multiplier dimension \type {\pdfpxdimen} lost its prefix and is now calles
- \type {\pxdimen}.
+ The pixel multiplier dimension \orm {pdfpxdimen} lost its prefix and is now
+ called \lpr {pxdimen}.
\stopitem
\startitem
- An extra \type {\pdfimageaddfilename} option has been added that can be used to block
- writing the filename to the \PDF\ file.
+ An extra \orm {pdfimageaddfilename} option has been added that can be used to
+ block writing the filename to the \PDF\ file.
\stopitem
\startitem
- The primitive \type {\pdftracingfonts} is now \type {\tracingfonts} as it
+ The primitive \orm {pdftracingfonts} is now \lpr {tracingfonts} as it
doesn't relate to the backend.
\stopitem
\startitem
- The experimental primitive \type {\pdfinsertht} is kept as \type {\insertht}.
+ The experimental primitive \orm {pdfinsertht} is kept as \lpr {insertht}.
\stopitem
\startitem
@@ -317,22 +326,24 @@ optimal line breaks. In \LUATEX\ these are now promoted to a special type of rul
nodes, which simplifies code that needs those dimensions.
Another reason for promotion is that these are useful concepts. Backends can
-provide the ability to use content that has been rendered in several places,
-and images are also common. For that reason we also changed the names:
+provide the ability to use content that has been rendered in several places, and
+images are also common. As already mentioned in \in {section}
+[sec:imagedandforms], we now have:
\starttabulate[|l|l|]
-\DB new name \BC old name \NC \NR
-\TB[small,samepage]
-\NC \type {\saveboxresource} \NC \type {\pdfxform} \NC \NR
-\NC \type {\saveimageresource} \NC \type {\pdfximage} \NC \NR
-\NC \type {\useboxresource} \NC \type {\pdfrefxform} \NC \NR
-\NC \type {\useimageresource} \NC \type {\pdfrefximage} \NC \NR
-\NC \type {\lastsavedboxresourceindex} \NC \type {\pdflastxform} \NC \NR
-\NC \type {\lastsavedimageresourceindex} \NC \type {\pdflastximage} \NC \NR
-\NC \type {\lastsavedimageresourcepages} \NC \type {\pdflastximagepages} \NC \NR
+\DB \LUATEX \BC \PDFTEX \NC \NR
+\TB
+\NC \lpr {saveboxresource} \NC \orm {pdfxform} \NC \NR
+\NC \lpr {saveimageresource} \NC \orm {pdfximage} \NC \NR
+\NC \lpr {useboxresource} \NC \orm {pdfrefxform} \NC \NR
+\NC \lpr {useimageresource} \NC \orm {pdfrefximage} \NC \NR
+\NC \lpr {lastsavedboxresourceindex} \NC \orm {pdflastxform} \NC \NR
+\NC \lpr {lastsavedimageresourceindex} \NC \orm {pdflastximage} \NC \NR
+\NC \lpr {lastsavedimageresourcepages} \NC \orm {pdflastximagepages} \NC \NR
+\LL
\stoptabulate
-There are a few \type {\pdffeedback} features that relate to this but these are
+There are a few \lpr {pdffeedback} features that relate to this but these are
typical backend specific ones. The index that gets returned is to be considered
as \quote {just a number} and although it still has the same meaning (object
related) as before, you should not depend on that.
@@ -370,6 +381,8 @@ instance content moved into the margin:
\startsubsection[title=Changes from \ALEPH\ RC4]
+\topicindex {\ALEPH}
+
Because we wanted proper directional typesetting the \ALEPH\ mechanisms looked
most attractive. These are rather close to the ones provided by \OMEGA, so what
we say next applies to both these programs.
@@ -409,8 +422,8 @@ we say next applies to both these programs.
\stopitem
\startitem
- Several bugs have been fixed an confusing implementation details have been sorted
- out.
+ Several bugs have been fixed an confusing implementation details have been
+ sorted out.
\stopitem
\startitem
@@ -419,13 +432,13 @@ we say next applies to both these programs.
\stopitem
\startitem
- The \type {^^} notation has been extended: after \type {^^^^} four hexadecimal
- characters are expected and after \type {^^^^^^} six hexadecimal characters
- have to be given. The original \TEX\ interpretation is still valid for the
- \type {^^} case but the four and six variants do no backtracking, i.e.\ when
- they are not followed by the right number of hexadecimal digits they issue an
- error message. Because \type{^^^} is a normal \TEX\ case, we don't support the
- odd number of \type {^^^^^} either.
+ The \type {^^} notation has been extended: after \type {^^^^} four
+ hexadecimal characters are expected and after \type {^^^^^^} six hexadecimal
+ characters have to be given. The original \TEX\ interpretation is still valid
+ for the \type {^^} case but the four and six variants do no backtracking,
+ i.e.\ when they are not followed by the right number of hexadecimal digits
+ they issue an error message. Because \type{^^^} is a normal \TEX\ case, we
+ don't support the odd number of \type {^^^^^} either.
\stopitem
\startitem
@@ -439,9 +452,9 @@ we say next applies to both these programs.
\stopitem
\startitem
- The page dimension related primitives \type {\pagewidth} and \type
- {\pageheight} have been promoted to core primitives. The \type {\hoffset} and
- \type {\voffset} primitives have been fixed.
+ The page dimension related primitives \lpr {pagewidth} and \lpr {pageheight}
+ have been promoted to core primitives. The \prm {hoffset} and \prm {voffset}
+ primitives have been fixed.
\stopitem
\startitem
@@ -451,14 +464,14 @@ we say next applies to both these programs.
\stopitem
\startitem
- The two dimension registers \type {\pagerightoffset} and \type
- {\pagebottomoffset} are now core primitives.
+ The two dimension registers \lpr {pagerightoffset} and \lpr
+ {pagebottomoffset} are now core primitives.
\stopitem
\startitem
- The direction related primitives \type {\pagedir}, \type {\bodydir}, \type
- {\pardir}, \type {\textdir}, \type {\mathdir} and \type {\boxdir} are now
- core primitives.
+ The direction related primitives \lpr {pagedir}, \lpr {bodydir}, \lpr
+ {pardir}, \lpr {textdir}, \lpr {mathdir} and \lpr {boxdir} are now core
+ primitives.
\stopitem
\startitem
@@ -478,6 +491,8 @@ opened it up.
\startsubsection[title=Changes from standard \WEBC]
+\topicindex {\WEBC}
+
The compilation framework is \WEBC\ and we keep using that but without the
\PASCAL\ to \CCODE\ step. This framework also provides some common features that
deal with reading bytes from files and locating files in \TDS. This is what we do
@@ -500,7 +515,7 @@ different:
\stopitem
\startitem
- The \type {\openout} whatsits are not written to the log file.
+ The \prm {openout} whatsits are not written to the log file.
\stopitem
\startitem
@@ -524,6 +539,9 @@ different:
\startsection[reference=backendprimitives,title=The backend primitives \type {\pdf*}]
+\topicindex {backend}
+\topicindex {\PDF+backend}
+
In a previous section we mentioned that some \PDFTEX\ primitives were removed and
others promoted to core \LUATEX\ primitives. That is only part of the story. In
order to separate the backend specific primitives in de code these commands are
@@ -651,7 +669,7 @@ macro:->[internal backend integer]
macro:->[internal backend tokenlist]
\stoptyping
-The \type {\edef} can also be an \type {\def} but it's a bit more efficient
+The \prm {edef} can also be an \prm {def} but it's a bit more efficient
to expand the lookup related register beforehand. After that you can adapt
the defaults; these are:
@@ -926,6 +944,10 @@ that can be passed to the extensions.
\startsection[title=Directions]
+\topicindex {\OMEGA}
+\topicindex {\ALEPH}
+\topicindex {directions}
+
The directional model in \LUATEX\ is inherited from \OMEGA|/|\ALEPH\ but we tried
to improve it a bit. At some point we played with recovery of modes but that was
disabled later on when we found that it interfered with nested directions. That
@@ -1025,7 +1047,7 @@ It gets typeset as:
We could define the two helpers to look back, pick up a skip, remove it and
inject it after the dir node. But that way we loose the subtype information that
for some applications can be handy to be kept as|-|is. This is why we now have a
-variant of \type {\textdir} which injects the balanced node before the skip.
+variant of \lpr {textdir} which injects the balanced node before the skip.
Instead of the previous definition we can use:
\startbuffer[def]
@@ -1054,11 +1076,11 @@ comes out as a properly spaced:
Anything more complex that this, like combination of skips and penalties, or
kerns, should be handled in the input or macro package because there is no way we
-can predict the expected behaviour. In fact, the \type {\linedir} is just a
+can predict the expected behaviour. In fact, the \lpr {linedir} is just a
convenience extra which could also have been implemented using node list parsing.
Glue after a dir node is ignored in the linebreak decision but you can bypass that
-by setting \type {\breakafterdirmode} to~\type {1}. The following table shows the
+by setting \lpr {breakafterdirmode} to~\type {1}. The following table shows the
difference. Watch your spaces.
\def\ShowSome#1{%
@@ -1067,40 +1089,41 @@ difference. Watch your spaces.
\NC
\NC \breakafterdirmode\plusone\hsize\zeropoint#1
\NC
- \NC \NR \HL
+ \NC \NR
}
-\starttabulate[|lp(10em)|Tp(1pt)|w(5em)|Tp(1pt)|w(5em)|]
- \HL
- \BC \type{\breakafterdirmode}
+\starttabulate[|l|Tp(1pt)|w(5em)|Tp(1pt)|w(5em)|]
+ \DB
\BC \type{0}
\NC
\BC \type{1}
\NC
\NC \NR
- \HL
+ \TB
\ShowSome{pre {\textdir TLT xxx} post}
\ShowSome{pre {\textdir TLT xxx }post}
\ShowSome{pre{ \textdir TLT xxx} post}
\ShowSome{pre{ \textdir TLT xxx }post}
\ShowSome{pre { \textdir TLT xxx } post}
\ShowSome{pre {\textdir TLT\relax\space xxx} post}
+ \LL
\stoptabulate
Another adaptation to the \ALEPH\ directional model is control over shapes driven
-by \type {\hangindent} and \type {\parshape}. This is controlled by a new parameter
-\type {\shapemode}:
+by \prm {hangindent} and \prm {parshape}. This is controlled by a new parameter
+\lpr {shapemode}:
-\starttabulate[|c|c|c|]
-\DB value \BC \type {\hangindent} \BC \type {\parshape} \NC \NR
-\TB[small,samepage]
+\starttabulate[|c|l|l|]
+\DB value \BC \prm {hangindent} \BC \prm {parshape} \NC \NR
+\TB
\BC \type{0} \NC normal \NC normal \NC \NR
\BC \type{1} \NC mirrored \NC normal \NC \NR
\BC \type{2} \NC normal \NC mirrored \NC \NR
\BC \type{3} \NC mirrored \NC mirrored \NC \NR
+\LL
\stoptabulate
-The value is reset to zero (like \type {\hangindent} and \type {\parshape})
+The value is reset to zero (like \prm {hangindent} and \prm {parshape})
after the paragraph is done with. You can use negative values to prevent
this. In \in {figure} [fig:shapemode] a few examples are given.
@@ -1153,6 +1176,8 @@ this. In \in {figure} [fig:shapemode] a few examples are given.
\startsubsection[title=Memory allocation]
+\topicindex {memory}
+
The single internal memory heap that traditional \TEX\ used for tokens and nodes
is split into two separate arrays. Each of these will grow dynamically when
needed.
@@ -1190,19 +1215,19 @@ ignored.
\startsubsection[title=Sparse arrays]
-The \type {\mathcode}, \type {\delcode}, \type {\catcode}, \type {\sfcode}, \type
-{\lccode} and \type {\uccode} (and the new \type {\hjcode}) tables are now sparse
-arrays that are implemented in~\CCODE. They are no longer part of the \TEX\
-\quote {equivalence table} and because each had 1.1 million entries with a few
-memory words each, this makes a major difference in memory usage. Performance is
-not really hurt by this.
+The \prm {mathcode}, \prm {delcode}, \prm {catcode}, \prm {sfcode}, \prm {lccode}
+and \prm {uccode} (and the new \lpr {hjcode}) tables are now sparse arrays that
+are implemented in~\CCODE. They are no longer part of the \TEX\ \quote
+{equivalence table} and because each had 1.1 million entries with a few memory
+words each, this makes a major difference in memory usage. Performance is not
+really hurt by this.
-The \type {\catcode}, \type {\sfcode}, \type {\lccode}, \type {\uccode} and \type
-{\hjcode} assignments don't show up when using the \ETEX\ tracing routines \type
-{\tracingassigns} and \type {\tracingrestores} but we don't see that as a real
+The \prm {catcode}, \prm {sfcode}, \prm {lccode}, \prm {uccode} and \lpr {hjcode}
+assignments don't show up when using the \ETEX\ tracing routines \prm
+{tracingassigns} and \prm {tracingrestores} but we don't see that as a real
limitation.
-A side|-|effect of the current implementation is that \type {\global} is now more
+A side|-|effect of the current implementation is that \prm {global} is now more
expensive in terms of processing than non|-|global assignments but not many users
will notice that.
@@ -1212,7 +1237,9 @@ users will not notice this.
\stopsubsection
-\startsubsection[title=Simple single-character csnames]
+\startsubsection[title=Simple single|-|character csnames]
+
+\topicindex {csnames}
Single|-|character commands are no longer treated specially in the internals,
they are stored in the hash just like the multiletter csnames.
@@ -1227,6 +1254,8 @@ control sequences that uses a prefix that is otherwise impossible to obtain.
\startsubsection[title=Compressed format]
+\topicindex {format}
+
The format is passed through \type {zlib}, allowing it to shrink to roughly half
of the size it would have had in uncompressed form. This takes a bit more \CPU\
cycles but much less disk \IO, so it should still be faster.
@@ -1235,6 +1264,8 @@ cycles but much less disk \IO, so it should still be faster.
\startsubsection[title=Binary file reading]
+\topicindex {files+binary}
+
All of the internal code is changed in such a way that if one of the \type
{read_xxx_file} callbacks is not set, then the file is read by a \CCODE\ function
using basically the same convention as the callback: a single read into a buffer
@@ -1246,6 +1277,9 @@ previous code (that mostly used \type {getc} calls), it can be quite a bit faste
\startsubsection[title=Tabs and spaces]
+\topicindex {space}
+\topicindex {newline}
+
We conform to the way other \TEX\ engines handle trailing tabs and spaces. For
decades trailing tabs and spaces (before a newline) were removed from the input
but this behaviour was changed in September 2017 to only handle spaces. We are
diff --git a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
index e0d93d7c3..4a36151a6 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
@@ -8,6 +8,8 @@
\section{\LUA\ node representation}
+\topicindex {nodes}
+
\TEX's nodes are represented in \LUA\ as userdata object with a variable set of
fields. In the following syntax tables, such the type of such a userdata object
is represented as \syntax {<node>}.
@@ -23,7 +25,7 @@ The current return value of \type {node.types()} is:
\stopluacode
. % period
-The \type {\lastnodetype} primitive is \ETEX\ compliant. The valid range is still
+The \prm {lastnodetype} primitive is \ETEX\ compliant. The valid range is still
$[-1,15]$ and glyph nodes (formerly known as char nodes) have number~0 while
ligature nodes are mapped to~7. That way macro packages can use the same symbolic
names as in traditional \ETEX. Keep in mind that these \ETEX\ node numbers are
@@ -35,14 +37,16 @@ and for valid subtypes with \type {node.subtypes} (which takes a string because
eventually we might support more used enumerations).
The \type {node.values} function reports some used values. Valid arguments are
-\type {dir}, \type {direction}, \type {glue}, \type {pdf_literal}, \type
-{pdf_action}, \type {pdf_window} and \type {color_stack}. Keep in mind that the
+\nod {dir}, \type {direction}, \nod {glue}, \whs {pdf_literal}, \whs
+{pdf_action}, \whs {pdf_window} and \whs {color_stack}. Keep in mind that the
setters normally expect a number, but this helper gives you a list of what
numbers matter. For practical reason the \type {pagestate} values are also
reported with this helper.
\subsection{Attributes}
+\topicindex {attributes}
+
The newly introduced attribute registers are non|-|trivial, because the value
that is attached to a node is essentially a sparse array of key|-|value pairs. It
is generally easiest to deal with attribute lists and attributes by using the
@@ -51,28 +55,32 @@ the low|-|level interface.
\subsubsection{attribute_list nodes}
-An \type {attribute_list} item is used as a head pointer for a list of attribute
+\topicindex {nodes+attributes}
+
+An \nod {attribute_list} item is used as a head pointer for a list of attribute
items. It has only one user-visible field:
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{next} \NC node \NC pointer to the first attribute \NC \NR
+\LL
\stoptabulate
-\subsubsection{attribute nodes}
+\subsubsection{\nod {attr} nodes}
-A normal node's attribute field will point to an item of type \type
+A normal node's attribute field will point to an item of type \nod
{attribute_list}, and the \type {next} field in that item will point to the first
defined \quote {attribute} item, whose \type {next} will point to the second
\quote {attribute} item, etc.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{next} \NC node \NC pointer to the next attribute \NC \NR
\NC \type{number} \NC number \NC the attribute type id \NC \NR
\NC \type{value} \NC number \NC the attribute value \NC \NR
+\LL
\stoptabulate
As mentioned it's better to use the official helpers rather than edit these
@@ -81,15 +89,18 @@ and there is no double linked list.
\subsection{Main text nodes}
+\topicindex {nodes+text}
+
These are the nodes that comprise actual typesetting commands. A few fields are
present in all nodes regardless of their type, these are:
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{next} \NC node \NC the next node in a list, or nil \NC \NR
\NC \type{id} \NC number \NC the node's type (\type {id}) number \NC \NR
\NC \type{subtype} \NC number \NC the node \type {subtype} identifier \NC \NR
+\LL
\stoptabulate
The \type {subtype} is sometimes just a stub entry. Not all nodes actually use
@@ -103,26 +114,33 @@ but only initialized on explicit request: when the function \type {node.slide()}
is called, it will set up the \type {prev} fields to be a backwards pointer in
the argument node list. By now most of \TEX's node processing makes sure that the
\type {prev} nodes are valid but there can be exceptions, especially when the
-internal magic uses a leading \type {temp} nodes to temporarily store a state.
+internal magic uses a leading \nod {temp} nodes to temporarily store a state.
-\subsubsection{hlist nodes}
+\subsubsection{\nod {hlist} nodes}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{list} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{width} \NC number \NC the width of the box \NC \NR
\NC \type{height} \NC number \NC the height of the box \NC \NR
\NC \type{depth} \NC number \NC the depth of the box \NC \NR
-\NC \type{shift} \NC number \NC a displacement perpendicular to the character progression direction \NC \NR
-\NC \type{glue_order} \NC number \NC a number in the range $[0,4]$, indicating the glue order \NC \NR
+\NC \type{shift} \NC number \NC a displacement perpendicular to the character
+ progression direction \NC \NR
+\NC \type{glue_order} \NC number \NC a number in the range $[0,4]$, indicating the
+ glue order \NC \NR
\NC \type{glue_set} \NC number \NC the calculated glue ratio \NC \NR
-\NC \type{glue_sign} \NC number \NC 0 = \type {normal}, 1 = \type {stretching}, 2 = \type {shrinking} \NC \NR
+\NC \type{glue_sign} \NC number \NC 0 = \type {normal}, 1 = \type {stretching}, 2 =
+ \type {shrinking} \NC \NR
\NC \type{head/list} \NC node \NC the first node of the body of this list \NC \NR
-\NC \type{dir} \NC string \NC the direction of this box, see~\in[dirnodes] \NC \NR
+\NC \type{dir} \NC string \NC the direction of this box, see~\in [dirnodes] \NC \NR
+\LL
\stoptabulate
+\topicindex {nodes+lists}
+\topicindex {lists}
+
A warning: never assign a node list to the \type {head} field unless you are sure
its internal link structure is correct, otherwise an error may result.
@@ -130,41 +148,69 @@ Note: the field name \type {head} and \type {list} are both valid. Sometimes it
makes more sense to refer to a list by \type {head}, sometimes \type {list} makes
more sense.
-\subsubsection{vlist nodes}
+\subsubsection{\nod {vlist} nodes}
-This node is similar to \type {hlist}, except that \quote {shift} is a displacement
+\topicindex {nodes+lists}
+\topicindex {lists}
+
+This node is similar to \nod {hlist}, except that \quote {shift} is a displacement
perpendicular to the line progression direction, and \quote {subtype} only has
the values 0, 4, and~5.
-\subsubsection{rule nodes}
+\subsubsection{\nod {rule} nodes}
+
+\topicindex {nodes+rules}
+\topicindex {rules}
-Contrary to traditional \TEX, \LUATEX\ has more subtypes because we also use
-rules to store reuseable objects and images. User nodes are invisible and can be
-intercepted by a callback.
+Contrary to traditional \TEX, \LUATEX\ has more \prm {rule} subtypes because we
+also use rules to store reuseable objects and images. User nodes are invisible
+and can be intercepted by a callback.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
-\NC \type{subtype} \NC number \NC \showsubtypes{rule} \NC \NR
+\TB
+\NC \type{subtype} \NC number \NC \showsubtypes {rule} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
-\NC \type{width} \NC number \NC the width of the rule where the special value $-1073741824$ is used for \quote {running} glue dimensions \NC \NR
+\NC \type{width} \NC number \NC the width of the rule where the special value
+ $-1073741824$ is used for \quote {running} glue dimensions \NC \NR
\NC \type{height} \NC number \NC the height of the rule (can be negative) \NC \NR
\NC \type{depth} \NC number \NC the depth of the rule (can be negative) \NC \NR
+\NC \type{left} \NC number \NC shift at the left end (also subtracted from width) \NC \NR
+\NC \type{right} \NC number \NC (subtracted from width) \NC \NR
\NC \type{dir} \NC string \NC the direction of this rule, see~\in[dirnodes] \NC \NR
\NC \type{index} \NC number \NC an optional index that can be referred to \NC \NR
+\LL
\stoptabulate
-\subsubsection{ins nodes}
+The \type {left} and type {right} keys are somewhat special (and experimental).
+When rules are auto adapting to the surrounding box width you can enforce a shift
+to the right by setting \type {left}. The value is also subtracted from the width
+which can be a value set by the engine itself and is not entirely under user
+control. The \type {right} is also subtracted from the width. It all happens in
+the backend so these are not affecting the calculations in the frontend (actually
+the auto settings also happen in the backend). For a vertical rule \type {left}
+affects the height and \type {right} affects the depth. There is no matching
+interface at the \TEX\ end (although we can have more keywords for rules it would
+complicate matters and introduce a speed penalty.) However, you can just
+construct a rule node with \LUA\ and write it to the \TEX\ input.
+
+\subsubsection{\nod {ins} nodes}
+
+\topicindex {nodes+insertions}
+\topicindex {insertions}
+
+This node relates to the \prm {insert} primitive.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC the insertion class \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{cost} \NC number \NC the penalty associated with this insert \NC \NR
\NC \type{height} \NC number \NC height of the insert \NC \NR
\NC \type{depth} \NC number \NC depth of the insert \NC \NR
\NC \type{head/list} \NC node \NC the first node of the body of this insert \NC \NR
+\LL
\stoptabulate
There is a set of extra fields that concern the associated glue: \type {width},
@@ -176,52 +222,72 @@ its internal link structure is correct, otherwise an error may be result. You ca
\type {list} instead (often in functions you want to use local variable swith similar
names and both names are equally sensible).
-\subsubsection{mark nodes}
+\subsubsection{\nod {mark} nodes}
+
+\topicindex {nodes+marks}
+\topicindex {marks}
+
+This one relates to the \prm {mark} primitive.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC unused \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{class} \NC number \NC the mark class \NC \NR
\NC \type{mark} \NC table \NC a table representing a token list \NC \NR
+\LL
\stoptabulate
-\subsubsection{adjust nodes}
+\subsubsection{\nod {adjust} nodes}
+
+\topicindex {nodes+adjust}
+\topicindex {adjust}
+
+This node comes from \prm {vadjust} primitive.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{adjust} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{head/list} \NC node \NC adjusted material \NC \NR
+\LL
\stoptabulate
A warning: never assign a node list to the \type {head} field unless you are sure
its internal link structure is correct, otherwise an error may be result.
-\subsubsection{disc nodes}
+\subsubsection{\nod {disc} nodes}
+
+\topicindex {nodes+discretionaries}
+\topicindex {discretionaries}
+
+The \prm {discretionary} and \prm {-}, the \type {-} character but also the
+hyphenation mechanism produces these nodes.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{disc} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{pre} \NC node \NC pointer to the pre|-|break text \NC \NR
\NC \type{post} \NC node \NC pointer to the post|-|break text \NC \NR
\NC \type{replace} \NC node \NC pointer to the no|-|break text \NC \NR
-\NC \type{penalty} \NC number \NC the penalty associated with the break, normally \type {\hyphenpenalty} or \type {\exhyphenpenalty} \NC \NR
+\NC \type{penalty} \NC number \NC the penalty associated with the break, normally
+ \prm {hyphenpenalty} or \prm {exhyphenpenalty} \NC \NR
+\LL
\stoptabulate
The subtype numbers~4 and~5 belong to the \quote {of-f-ice} explanation given
-elsewhere.
+elsewhere. These disc nodes are kind of special as at some point they also keep
+information about breakpoints and nested ligatures.
-These disc nodes are kind of special as at some point they also keep information
-about breakpoints and nested ligatures. The \type {pre}, \type {post} and \type
-{replace} fields at the \LUA\ end are in fact indirectly accessed and have a
-\type {prev} pointer that is not \type {nil}. This means that when you mess
-around with the head of these (three) lists, you also need to reassign them
-because that will restore the proper \type {prev} pointer, so:
+The \type {pre}, \type {post} and \type {replace} fields at the \LUA\ end are in
+fact indirectly accessed and have a \type {prev} pointer that is not \type {nil}.
+This means that when you mess around with the head of these (three) lists, you
+also need to reassign them because that will restore the proper \type {prev}
+pointer, so:
\starttyping
pre = d.pre
@@ -236,34 +302,47 @@ And you definitely must not mess with the node that \type {prev} points to, if
only because it is not really an node but part of the disc data structure (so
freeing it again might crash \LUATEX).
-\subsubsection{math nodes}
+\subsubsection{\nod {math} nodes}
+
+\topicindex {nodes+math}
+\topicindex {math+nodes}
+
+Math nodes represent the boundaries of a math formula, normally wrapped into
+\type {$} signs.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{math} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
-\NC \type{surround} \NC number \NC width of the \type {\mathsurround} kern \NC \NR
+\NC \type{surround} \NC number \NC width of the \prm {mathsurround} kern \NC \NR
+\LL
\stoptabulate
There is a set of extra fields that concern the associated glue: \type {width},
\type {stretch}, \type {stretch_order}, \type {shrink} and \type {shrink_order}.
These are all numbers.
-\subsubsection{glue nodes}
+\subsubsection{\nod {glue} nodes}
+
+\topicindex {nodes+glue}
+\topicindex {glue}
Skips are about the only type of data objects in traditional \TEX\ that are not a
-simple value. The structure that represents the glue components of a skip is
-called a \type {glue_spec}, and it has the following accessible fields:
+simple value. They are inserted when \TEX\ sees a space in the text flow but also
+by \prm {hskip} and \prm {vskip}. The structure that represents the glue
+components of a skip is called a \nod {glue_spec}, and it has the following
+accessible fields:
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{width} \NC number \NC the horizontal or vertical displacement \NC \NR
\NC \type{stretch} \NC number \NC extra (positive) displacement or stretch amount \NC \NR
\NC \type{stretch_order} \NC number \NC factor applied to stretch amount \NC \NR
\NC \type{shrink} \NC number \NC extra (negative) displacement or shrink amount\NC \NR
\NC \type{shrink_order} \NC number \NC factor applied to shrink amount \NC \NR
+\LL
\stoptabulate
The effective width of some glue subtypes depends on the stretch or shrink needed
@@ -273,10 +352,10 @@ the content fit in the available space. The \type {effective_glue} function that
takes a glue node and a parent (hlist or vlist) returns the effective width of
that glue item.
-A gluespec node is a special kind of node that is used for storing a set of glue
-values in registers. Originally they were also used to store properties of glue
-nodes (using a system of reference counts) but we now keep these properties in
-the glue nodes themselves, which gives a cleaner interface to \LUA.
+A \nod {glue_spec} node is a special kind of node that is used for storing a set
+of glue values in registers. Originally they were also used to store properties
+of glue nodes (using a system of reference counts) but we now keep these
+properties in the glue nodes themselves, which gives a cleaner interface to \LUA.
The indirect spec approach was in fact an optimization in the original \TEX\
code. First of all it can save quite some memory because all these spaces that
@@ -292,10 +371,11 @@ is only a few memory words larger than a spec).
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{glue} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{leader} \NC node \NC pointer to a box or rule for leaders \NC \NR
+\LL
\stoptabulate
In addition there are the \type {width}, \type {stretch} \type {stretch_order},
@@ -306,35 +386,55 @@ so we decided to stick to that naming.
A regular word space also results in a \type {spaceskip} subtype (this used to be
a \type {userskip} with subtype zero).
-\subsubsection{kern nodes}
+\subsubsection{\nod {kern} nodes}
+
+\topicindex {nodes+kerns}
+\topicindex {kerns}
+
+The \prm {kern} command creates such nodes but for instance the font and math
+machinery can also add them.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{kern} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{kern} \NC number \NC fixed horizontal or vertical advance \NC \NR
+\LL
\stoptabulate
-\subsubsection{penalty nodes}
+\subsubsection{\nod {penalty} nodes}
+
+\topicindex {nodes+penalty}
+\topicindex {penalty}
+
+The \prm {penalty} command is one that generates these nodes.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{penalty} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{penalty} \NC number \NC the penalty value \NC \NR
+\LL
\stoptabulate
The subtypes are just informative and \TEX\ itself doesn't use them. When you
run into an \type {linebreakpenalty} you need to keep in mind that it's a
accumulation of \type {club}, \type{widow} and other relevant penalties.
-\subsubsection[glyphnodes]{glyph nodes}
+\subsubsection[glyphnodes]{\nod {glyph} nodes}
+
+\topicindex {nodes+glyph}
+\topicindex {glyph}
+
+These are probably the mostly used nodes and although you can push on tin the
+list with for instance \prm {char} \TEX\ will normally do it for you when it
+considers some input to be text.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC bitfield \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{char} \NC number \NC the chatacter index in the font \NC \NR
@@ -342,7 +442,7 @@ accumulation of \type {club}, \type{widow} and other relevant penalties.
\NC \type{lang} \NC number \NC the language identifier \NC \NR
\NC \type{left} \NC number \NC the frozen \type {\lefthyphenmnin} value \NC \NR
\NC \type{right} \NC number \NC the frozen \type {\righthyphenmnin} value \NC \NR
-\NC \type{uchyph} \NC boolean \NC the frozen \type {\uchyph} value \NC \NR
+\NC \type{uchyph} \NC boolean \NC the frozen \prm {uchyph} value \NC \NR
\NC \type{components} \NC node \NC pointer to ligature components \NC \NR
\NC \type{xoffset} \NC number \NC a virtual displacement in horizontal direction \NC \NR
\NC \type{yoffset} \NC number \NC a virtual displacement in vertical direction \NC \NR
@@ -351,6 +451,7 @@ accumulation of \type {club}, \type{widow} and other relevant penalties.
\NC \type{height} \NC number \NC the (original) height of the character\NC \NR
\NC \type{depth} \NC number \NC the (original) depth of the character\NC \NR
\NC \type{expansion_factor} \NC number \NC the to be applied expansion_factor \NC \NR
+\LL
\stoptabulate
The \type {width}, \type {height} and \type {depth} values are read|-|only. The
@@ -362,12 +463,13 @@ bits for the \type {subtype} field are:
\starttabulate[|c|l|]
\DB bit \BC meaning \NC \NR
-\TB[small,samepage]
+\TB
\NC 0 \NC character \NC \NR
\NC 1 \NC ligature \NC \NR
\NC 2 \NC ghost \NC \NR
\NC 3 \NC left \NC \NR
\NC 4 \NC right \NC \NR
+\LL
\stoptabulate
See \in {section} [charsandglyphs] for a detailed description of the \type
@@ -393,52 +495,68 @@ helpers are not always faster than separate calls but they sometimes permit
making more readable tests. The \type {uses_font} helpers takes a node
and font id and returns true when a glyph or disc node references that font.
-\subsubsection{boundary nodes}
+\subsubsection{\nod {boundary} nodes}
+
+\topicindex {nodes+boundary}
+\topicindex {boundary}
+
+This node relates to the \prm {noboundary}, \prm {boundary}, \prm
+{protrusionboundary} and \prm {wordboundary} primitives.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{boundary} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{value} \NC number \NC values 0--255 are reserved \NC \NR
+\LL
\stoptabulate
-This node relates to the \type {\noboundary}, \type {\boundary}, \type
-{\protrusionboundary} and \type {\wordboundary} primitives.
+\subsubsection{\nod {local_par} nodes}
+
+\topicindex {nodes+paragraphs}
+\topicindex {paragraphs}
-\subsubsection{local_par nodes}
+This node in inserted a the start of a paragraph. You should not mess
+too much with this one.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
-\NC \type{pen_inter} \NC number \NC local interline penalty (from \type {\localinterlinepenalty}) \NC \NR
-\NC \type{pen_broken} \NC number \NC local broken penalty (from \type {\localbrokenpenalty}) \NC \NR
+\NC \type{pen_inter} \NC number \NC local interline penalty (from \lpr {localinterlinepenalty}) \NC \NR
+\NC \type{pen_broken} \NC number \NC local broken penalty (from \lpr {localbrokenpenalty}) \NC \NR
\NC \type{dir} \NC string \NC the direction of this par. see~\in [dirnodes] \NC \NR
-\NC \type{box_left} \NC node \NC the \type {\localleftbox} \NC \NR
-\NC \type{box_left_width} \NC number \NC width of the \type {\localleftbox} \NC \NR
-\NC \type{box_right} \NC node \NC the \type {\localrightbox} \NC \NR
-\NC \type{box_right_width} \NC number \NC width of the \type {\localrightbox} \NC \NR
+\NC \type{box_left} \NC node \NC the \lpr {localleftbox} \NC \NR
+\NC \type{box_left_width} \NC number \NC width of the \lpr {localleftbox} \NC \NR
+\NC \type{box_right} \NC node \NC the \lpr {localrightbox} \NC \NR
+\NC \type{box_right_width} \NC number \NC width of the \lpr {localrightbox} \NC \NR
+\LL
\stoptabulate
A warning: never assign a node list to the \type {box_left} or \type {box_right}
field unless you are sure its internal link structure is correct, otherwise an
error may be result.
-\subsubsection[dirnodes]{dir nodes}
+\subsubsection[dirnodes]{\nod {dir} nodes}
+
+\topicindex {nodes+direction}
+\topicindex {directions}
+
+Direction nodes mark parts of the running text that need a change of direction and \
+the \prm {textdir} command generates them.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{dir} \NC string \NC the direction (but see below) \NC \NR
\NC \type{level} \NC number \NC nesting level of this direction whatsit \NC \NR
+\LL
\stoptabulate
-A note on \type {dir} strings. Direction specifiers are three|-|letter
-combinations of \type {T}, \type {B}, \type {R}, and \type {L}.
-
-These are built up out of three separate items:
+Direction specifiers are three|-|letter combinations of \type {T}, \type {B},
+\type {R}, and \type {L}. These are built up out of three separate items:
\startitemize[packed]
\startitem
@@ -453,25 +571,33 @@ These are built up out of three separate items:
\stopitemize
However, only four combinations are accepted: \type {TLT}, \type {TRT}, \type
-{RTT}, and \type {LTL}.
+{RTT}, and \type {LTL}. Inside actual \nod {dir} nodes, the representation of
+\nod {dir} is not a three|-|letter but a combination of numbers. When printed the
+direction is indicated by a \type {+} or \type {-}, indicating whether the value
+is pushed or popped from the direction stack.
+
+\subsubsection{\nod {margin_kern} nodes}
-Inside actual \type {dir} whatsit nodes, the representation of \type {dir} is not
-a three-letter but a four|-|letter combination. The first character in this case
-is always either \type {+} or \type {-}, indicating whether the value is pushed
-or popped from the direction stack.
+\topicindex {nodes+paragraphs}
+\topicindex {paragraphs}
+\topicindex {protrusion}
-\subsubsection{margin_kern nodes}
+Margin kerns result from protrusion.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{margin_kern} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{width} \NC number \NC the advance of the kern \NC \NR
\NC \type{glyph} \NC node \NC the glyph to be used \NC \NR
+\LL
\stoptabulate
-\subsection{Math nodes}
+\subsection{Math noads}
+
+\topicindex {nodes+math}
+\topicindex {math+nodes}
These are the so||called \quote {noad}s and the nodes that are specifically
associated with math processing. Most of these nodes contain subnodes so that the
@@ -486,52 +612,53 @@ these cases (in the following node descriptions these are indicated by the word
The \type {next} and \type {prev} fields for these subnodes are unused.
-\subsubsubsection{math_char and math_text_char subnodes}
+\subsubsubsection{\nod {math_char} and \nod {math_text_char} subnodes}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{char} \NC number \NC the character index \NC \NR
\NC \type{fam} \NC number \NC the family number \NC \NR
+\LL
\stoptabulate
-The \type {math_char} is the simplest subnode field, it contains the character
-and family for a single glyph object. The \type {math_text_char} is a special
+The \nod {math_char} is the simplest subnode field, it contains the character
+and family for a single glyph object. The \nod {math_text_char} is a special
case that you will not normally encounter, it arises temporarily during math list
conversion (its sole function is to suppress a following italic correction).
-\subsubsubsection{sub_box and sub_mlist subnodes}
+\subsubsubsection{\nod {sub_box} and \nod {sub_mlist} subnodes}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{head/list} \NC node \NC list of nodes \NC \NR
+\LL
\stoptabulate
-These two subnode types are used for subsidiary list items. For \type {sub_box},
-the \type {head} points to a \quote {normal} vbox or hbox. For \type {sub_mlist},
+These two subnode types are used for subsidiary list items. For \nod {sub_box},
+the \type {head} points to a \quote {normal} vbox or hbox. For \nod {sub_mlist},
the \type {head} points to a math list that is yet to be converted.
A warning: never assign a node list to the \type {head} field unless you are sure
its internal link structure is correct, otherwise an error may be result.
-\subsubsection{Math delimiter subnode}
+\subsubsubsection{\nod {delim} subnodes}
There is a fifth subnode type that is used exclusively for delimiter fields. As
before, the \type {next} and \type {prev} fields are unused.
-\subsubsubsection{delim subnodes}
-
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{small_char} \NC number \NC character index of base character \NC \NR
\NC \type{small_fam} \NC number \NC family number of base character \NC \NR
\NC \type{large_char} \NC number \NC character index of next larger character \NC \NR
\NC \type{large_fam} \NC number \NC family number of next larger character \NC \NR
+\LL
\stoptabulate
The fields \type {large_char} and \type {large_fam} can be zero, in that case the
@@ -549,7 +676,7 @@ Some noads have an option field. The values in this bitset are common:
\starttabulate[|l|r|]
\DB meaning \BC bits \NC \NR
-\TB[small,samepage]
+\TB
\NC set \NC \type{0x08} \NC \NR
\NC internal \NC \type{0x00} + \type{0x08} \NC \NR
\NC internal \NC \type{0x01} + \type{0x08} \NC \NR
@@ -562,26 +689,28 @@ Some noads have an option field. The values in this bitset are common:
\NC no sub script \NC \type{0x21} + \type{0x08} \NC \NR
\NC no super script \NC \type{0x22} + \type{0x08} \NC \NR
\NC no script \NC \type{0x23} + \type{0x08} \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{simple nodes}
+\subsubsubsection{simple \nod {noad} nodes}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{noad} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{nucleus} \NC kernel node \NC base \NC \NR
\NC \type{sub} \NC kernel node \NC subscript \NC \NR
\NC \type{sup} \NC kernel node \NC superscript \NC \NR
\NC \type{options} \NC number \NC bitset of rendering options \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{accent nodes}
+\subsubsubsection{\nod {accent} nodes}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{accent} \NC \NR
\NC \type{nucleus} \NC kernel node \NC base \NC \NR
\NC \type{sub} \NC kernel node \NC subscript \NC \NR
@@ -589,61 +718,65 @@ Some noads have an option field. The values in this bitset are common:
\NC \type{accent} \NC kernel node \NC top accent \NC \NR
\NC \type{bot_accent} \NC kernel node \NC bottom accent \NC \NR
\NC \type{fraction} \NC number \NC larger step criterium (divided by 1000) \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{style nodes}
+\subsubsubsection{\nod {style} nodes}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{style} \NC string \NC contains the style \NC \NR
+\LL
\stoptabulate
There are eight possibilities for the string value: one of \type {display},
\type {text}, \type {script}, or \type {scriptscript}. Each of these can have
be prefixed by \type {cramped}.
-\subsubsubsection{choice nodes}
+\subsubsubsection{\nod {choice} nodes}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{display} \NC node \NC list of display size alternatives \NC \NR
\NC \type{text} \NC node \NC list of text size alternatives \NC \NR
\NC \type{script} \NC node \NC list of scriptsize alternatives \NC \NR
\NC \type{scriptscript} \NC node \NC list of scriptscriptsize alternatives \NC \NR
+\LL
\stoptabulate
Warning: never assign a node list to the \type {display}, \type {text}, \type
{script}, or \type {scriptscript} field unless you are sure its internal link
structure is correct, otherwise an error may be result.
-\subsubsubsection{radical nodes}
+\subsubsubsection{\nod {radical} nodes}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{radical} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{nucleus} \NC kernel node \NC base \NC \NR
\NC \type{sub} \NC kernel node \NC subscript \NC \NR
\NC \type{sup} \NC kernel node \NC superscript \NC \NR
\NC \type{left} \NC delimiter node \NC \NC \NR
-\NC \type{degree} \NC kernel node \NC only set by \type {\Uroot} \NC \NR
+\NC \type{degree} \NC kernel node \NC only set by \lpr {Uroot} \NC \NR
\NC \type{width} \NC number \NC required width \NC \NR
\NC \type{options} \NC number \NC bitset of rendering options \NC \NR
+\LL
\stoptabulate
Warning: never assign a node list to the \type {nucleus}, \type {sub}, \type
{sup}, \type {left}, or \type {degree} field unless you are sure its internal
link structure is correct, otherwise an error may be result.
-\subsubsubsection{fraction nodes}
+\subsubsubsection{\nod {fraction} nodes}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{width} \NC number \NC (optional) width of the fraction \NC \NR
\NC \type{num} \NC kernel node \NC numerator \NC \NR
@@ -652,17 +785,18 @@ link structure is correct, otherwise an error may be result.
\NC \type{right} \NC delimiter node \NC right side symbol \NC \NR
\NC \type{middle} \NC delimiter node \NC middle symbol \NC \NR
\NC \type{options} \NC number \NC bitset of rendering options \NC \NR
+\LL
\stoptabulate
Warning: never assign a node list to the \type {num}, or \type {denom} field
unless you are sure its internal link structure is correct, otherwise an error
may be result.
-\subsubsubsection{fence nodes}
+\subsubsubsection{\nod {fence} nodes}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{subtype} \NC number \NC \showsubtypes{fence} \NC \NR
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{delim} \NC delimiter node \NC delimiter specification \NC \NR
@@ -671,6 +805,7 @@ may be result.
\NC \type{depth} \NC number \NC required depth \NC \NR
\NC \type{options} \NC number \NC bitset of rendering options \NC \NR
\NC \type{class} \NC number \NC spacing related class \NC \NR
+\LL
\stoptabulate
Warning: some of these fields are used by the renderer and might get adapted in
@@ -692,38 +827,41 @@ Whatsit nodes come in many subtypes that you can ask for by running
\subsubsection{front|-|end whatsits}
-\subsubsubsection{open whatsits}
+\subsubsubsection{\whs {open}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{stream} \NC number \NC \TEX's stream id number \NC \NR
\NC \type{name} \NC string \NC file name \NC \NR
\NC \type{ext} \NC string \NC file extension \NC \NR
\NC \type{area} \NC string \NC file area (this may become obsolete) \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{write whatsits}
+\subsubsubsection{\whs {write}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{stream} \NC number \NC \TEX's stream id number \NC \NR
\NC \type{data} \NC table \NC a table representing the token list to be written \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{close whatsits}
+\subsubsubsection{\whs {close}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{stream} \NC number \NC \TEX's stream id number \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{user_defined whatsits}
+\subsubsubsection{\whs {user_defined}}
User|-|defined whatsit nodes can only be created and handled from \LUA\ code. In
effect, they are an extension to the extension mechanism. The \LUATEX\ engine
@@ -731,7 +869,7 @@ will simply step over such whatsits without ever looking at the contents.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{user_id} \NC number \NC id number \NC \NR
\NC \type{type} \NC number \NC type of the value \NC \NR
@@ -739,6 +877,7 @@ will simply step over such whatsits without ever looking at the contents.
\NC \NC node \NC a node list \NC \NR
\NC \NC string \NC a \LUA\ string \NC \NR
\NC \NC table \NC a \LUA\ table \NC \NR
+\LL
\stoptabulate
The \type {type} can have one of six distinct values. The number is the \ASCII\
@@ -747,104 +886,112 @@ instead of \type {108}).
\starttabulate[|r|c|p|]
\DB value \BC meaning \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC 97 \NC a \NC list of attributes (a node list) \NC \NR
\NC 100 \NC d \NC a \LUA\ number \NC \NR
\NC 108 \NC l \NC a \LUA\ value (table, number, boolean, etc) \NC \NR
\NC 110 \NC n \NC a node list \NC \NR
\NC 115 \NC s \NC a \LUA\ string \NC \NR
\NC 116 \NC t \NC a \LUA\ token list in \LUA\ table form (a list of triplets) \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{save_pos whatsits}
+\subsubsubsection{\whs {save_pos}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{late_lua whatsits}
+\subsubsubsection{\whs {late_lua}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{data} \NC string \NC data to execute \NC \NR
\NC \type{string} \NC string \NC data to execute \NC \NR
\NC \type{name} \NC string \NC the name to use for \LUA\ error reporting \NC \NR
+\LL
\stoptabulate
The difference between \type {data} and \type {string} is that on assignment, the
-\type {data} field is converted to a token list, cf.\ use as \type {\latelua}. The
+\type {data} field is converted to a token list, cf.\ use as \lpr {latelua}. The
\type {string} version is treated as a literal string.
\subsubsection{\DVI\ backend whatsits}
-\subsubsection{special whatsits}
+\subsubsection{\whs {special}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
-\NC \type{data} \NC string \NC the \type {\special} information \NC \NR
+\NC \type{data} \NC string \NC the \prm {special} information \NC \NR
+\LL
\stoptabulate
\subsubsection{\PDF\ backend whatsits}
-\subsubsubsection{pdf_literal whatsits}
+\subsubsubsection{\whs {pdf_literal}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{mode} \NC number \NC the \quote {mode} setting of this literal \NC \NR
-\NC \type{data} \NC string \NC the \type {\pdfliteral} information \NC \NR
+\NC \type{data} \NC string \NC the \orm {pdfliteral} information \NC \NR
+\LL
\stoptabulate
Possible mode values are:
-\starttabulate[|l|p|]
+\starttabulate[|c|p|]
\DB value \BC keyword \NC \NR
-\TB[small,samepage]
+\TB
\NC 0 \NC \type{origin} \NC \NR
\NC 1 \NC \type{page} \NC \NR
\NC 2 \NC \type{direct} \NC \NR
\NC 3 \NC \type{raw} \NC \NR
\NC 4 \NC \type{text} \NC \NR
+\LL
\stoptabulate
The higher the number, the less checking and the more you can run into troubles.
Especially the \type {raw} variant can produce bad \PDF\ so you can best check
what you generate.
-\subsubsubsection{pdf_refobj whatsits}
+\subsubsubsection{\whs {pdf_refobj}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{objnum} \NC number \NC the referenced \PDF\ object number \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_annot whatsits}
+\subsubsubsection{\whs {pdf_annot}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR
\NC \type{objnum} \NC number \NC the referenced \PDF\ object number \NC \NR
\NC \type{data} \NC string \NC the annotation data \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_start_link whatsits}
+\subsubsubsection{\whs {pdf_start_link}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
@@ -852,21 +999,23 @@ what you generate.
\NC \type{objnum} \NC number \NC the referenced \PDF\ object number \NC \NR
\NC \type{link_attr} \NC table \NC the link attribute token list \NC \NR
\NC \type{action} \NC node \NC the action to perform \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_end_link whatsits}
+\subsubsubsection{\whs {pdf_end_link}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_dest whatsits}
+\subsubsubsection{\whs {pdf_dest}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
@@ -877,50 +1026,54 @@ what you generate.
\NC \type{dest_type} \NC number \NC type of destination \NC \NR
\NC \type{xyz_zoom} \NC number \NC the zoom factor (times 1000) \NC \NR
\NC \type{objnum} \NC number \NC the \PDF\ object number \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_action whatsits}
+\subsubsubsection{\whs {pdf_action}}
These are a special kind of item that only appears inside \PDF\ start link
objects.
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{action_type} \NC number \NC the kind of action involved \NC \NR
\NC \type{action_id} \NC number or string \NC token list reference or string \NC \NR
\NC \type{named_id} \NC number \NC the index of the destination \NC \NR
\NC \type{file} \NC string \NC the target filename \NC \NR
\NC \type{new_window} \NC number \NC the window state of the target \NC \NR
\NC \type{data} \NC string \NC the name of the destination \NC \NR
+\LL
\stoptabulate
Valid action types are:
\starttabulate[|l|l|]
\DB value \BC meaning \NC \NR
-\TB[small,samepage]
+\TB
\NC 0 \NC \type{page} \NC \NR
\NC 1 \NC \type{goto} \NC \NR
\NC 2 \NC \type{thread} \NC \NR
\NC 3 \NC \type{user} \NC \NR
+\LL
\stoptabulate
Valid window types are:
\starttabulate[|l|l|]
\DB value \BC meaning \NC \NR
-\TB[small,samepage]
+\TB
\NC 0 \NC \type{notset} \NC \NR
\NC 1 \NC \type{new} \NC \NR
\NC 2 \NC \type{nonew} \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_thread whatsits}
+\subsubsubsection{\whs {pdf_thread}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
@@ -929,13 +1082,14 @@ Valid window types are:
\NC \type{tread_id} \NC number \NC the thread id \NC \NR
\NC \NC string \NC the thread name \NC \NR
\NC \type{thread_attr} \NC number \NC extra thread information \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_start_thread whatsits}
+\subsubsubsection{\whs {pdf_start_thread}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
@@ -944,50 +1098,56 @@ Valid window types are:
\NC \type{tread_id} \NC number \NC the thread id \NC \NR
\NC \NC string \NC the thread name \NC \NR
\NC \type{thread_attr} \NC number \NC extra thread information \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_end_thread whatsits}
+\subsubsubsection{\whs {pdf_end_thread}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_colorstack whatsits}
+\subsubsubsection{\whs {pdf_colorstack}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{stack} \NC number \NC colorstack id number \NC \NR
\NC \type{command} \NC number \NC command to execute \NC \NR
\NC \type{data} \NC string \NC data \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_setmatrix whatsits}
+\subsubsubsection{\whs {pdf_setmatrix}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
\NC \type{data} \NC string \NC data \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_save whatsits}
+\subsubsubsection{\whs {pdf_save}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\LL
\stoptabulate
-\subsubsubsection{pdf_restore whatsits}
+\subsubsubsection{\whs {pdf_restore}}
\starttabulate[|l|l|p|]
\DB field \BC type \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\LL
\stoptabulate
\section{The \type {node} library}
@@ -1000,8 +1160,7 @@ insert \LUATEX\ node objects, the core objects within the typesetter.
\type {luatex.node}. The various parts within a node can be accessed using
named fields.
-Each node has at least the three fields \type {next}, \type {id}, and \type
-{subtype}:
+Each node has at least the three fields \type {next}, \type {id}, and \type {subtype}:
\startitemize[intro]
@@ -1029,7 +1188,7 @@ The other available fields depend on the \type {id} (and for \quote {whatsits},
the \type {subtype}) of the node. Further details on the various fields and their
meanings are given in~\in{chapter}[nodes].
-Support for \type {unset} (alignment) nodes is partial: they can be queried and
+Support for \nod {unset} (alignment) nodes is partial: they can be queried and
modified from \LUA\ code, but not created.
Nodes can be compared to each other, but: you are actually comparing indices into
@@ -1053,6 +1212,8 @@ can be handy for tracing.
\subsubsection{\type {node.is_node}}
+\topicindex {nodes+functions}
+
\startfunctioncall
<boolean> t =
node.is_node(<any> item)
@@ -1078,7 +1239,7 @@ providing an overview of the possible top|-|level \type {id} types.
node.whatsits()
\stopfunctioncall
-\TEX's \quote{whatsits} all have the same \type {id}. The various subtypes are
+\TEX's \quote {whatsits} all have the same \type {id}. The various subtypes are
defined by their \type {subtype} fields. The function is much like \type
{node.types}, except that it provides an array of \type {subtype} mappings.
@@ -1281,11 +1442,11 @@ This function creates a new hlist by packaging the list that begins at node \typ
{n} into a horizontal box. With only a single argument, this box is created using
the natural width of its components. In the three argument form, \type {info}
must be either \type {additional} or \type {exactly}, and \type {w} is the
-additional (\type {\hbox spread}) or exact (\type {\hbox to}) width to be used. The
-second return value is the badness of the generated box.
+additional (\type {\hbox spread}) or exact (\type {\hbox to}) width to be used.
+The second return value is the badness of the generated box.
Caveat: at this moment, there can be unexpected side|-|effects to this function,
-like updating some of the \type {\marks} and \type {\inserts}. Also note that the
+like updating some of the \prm {marks} and \type {\inserts}. Also note that the
content of \type {h} is the original node list \type {n}: if you call \type
{node.free(h)} you will also free the node list itself, unless you explicitly set
the \type {list} field to \type {nil} beforehand. And in a similar way, calling
@@ -1386,7 +1547,7 @@ cases:
This runs the internal mlist to hlist conversion, converting the math list in
\type {n} into the horizontal list \type {h}. The interface is exactly the same
-as for the callback \type {mlist_to_hlist}.
+as for the callback \cbk {mlist_to_hlist}.
\subsubsection{\type {node.slide}}
@@ -1863,6 +2024,9 @@ some assumptions (heuristics).
\section{Two access models}
+\topicindex{nodes+direct}
+\topicindex{direct nodes}
+
Deep down in \TEX\ a node has a number which is an numeric entry in a memory
table. In fact, this model, where \TEX\ manages memory is real fast and one of
the reasons why plugging in callbacks that operate on nodes is quite fast too.
@@ -1931,7 +2095,7 @@ Some accessors are used frequently and for these we provide more efficient helpe
\starttabulate[|l|p|]
\DB function \BC explanation \NC \NR
-\TB[small,samepage]
+\TB
\NC \type{getnext} \NC parsing nodelist always involves this one \NC \NR
\NC \type{getprev} \NC used less but is logical companion to \type {getnext} \NC \NR
\NC \type{getboth} \NC returns the next and prev pointer of a node \NC \NR
@@ -1949,6 +2113,7 @@ Some accessors are used frequently and for these we provide more efficient helpe
\NC \type{getfield} \NC generic getter, sufficient for the rest (other field names are
often shared so a specific getter makes no sense then) \NC \NR
\NC \type{getbox} \NC gets the given box (a list node) \NC \NR
+\LL
\stoptabulate
In the direct namespace there are more such helpers and most of them are
@@ -1972,13 +2137,11 @@ provided and there are a few that probably are used seldom too but were added fo
consistency. You can of course always define additional accessor using \type
{getfield} and \type {setfield} with little overhead.
-% \startcolumns[balance=yes]
-
\def\yes{$+$} \def\nop{$-$}
\starttabulate[|l|c|c|]
\DB function \BC node \BC direct \NC \NR
-\TB[small,samepage]
+\TB
%NC \type {do_ligature_n} \NC \yes \NC \yes \NC \NR % was never documented and experimental
\NC \type {check_discretionaries}\NC \yes \NC \yes \NC \NR
\NC \type {copy_list} \NC \yes \NC \yes \NC \NR
@@ -2103,10 +2266,9 @@ consistency. You can of course always define additional accessor using \type
\NC \type {write} \NC \yes \NC \yes \NC \NR
\NC \type {set_synctex_fields} \NC \yes \NC \yes \NC \NR
\NC \type {get_synctex_fields} \NC \yes \NC \yes \NC \NR
+\LL
\stoptabulate
-% \stopcolumns
-
The \type {node.next} and \type {node.prev} functions will stay but for
consistency there are variants called \type {getnext} and \type {getprev}. We had
to use \type {get} because \type {node.id} and \type {node.subtype} are already
diff --git a/doc/context/sources/general/manuals/luatex/luatex-preamble.tex b/doc/context/sources/general/manuals/luatex/luatex-preamble.tex
index 036dd49fc..98837e98d 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-preamble.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-preamble.tex
@@ -6,6 +6,10 @@
\startchapter[reference=preamble,title={Preamble}]
+\topicindex{nodes}
+\topicindex{boxes}
+\topicindex[lua]{\LUA}
+
This is a reference manual, not a tutorial. This means that we discuss changes
relative to traditonal \TEX\ and also present new functionality. As a consequence
we will refer to concepts that we assume to be known or that might be explained
@@ -22,7 +26,8 @@ want to peek in \quotation {The \ETEX\ manual} and documentation about \PDFTEX.
But \unknown\ if you're here because of \LUA, then all you need to know is that
you can call it from within a run. The macro package that you use probably will
-provide a few wrapper mechanisms but the basic command that does the job is:
+provide a few wrapper mechanisms but the basic \lpr {directlua} command that
+does the job is:
\starttyping
\directlua{tex.print("Hi there")}
@@ -78,6 +83,26 @@ pages, including images, and so on. You should be aware of the fact that when yo
hook in your own code to manipulate lists, this can interfere with the macro
package that you use.
+When you read about nodes in the following chapters it's good to keep in mind their
+commands that relate to then. here are a few:
+
+\starttabulate[|l|l|p|]
+\DB command \BC node \BC explanation \NC \NR
+\TB
+\NC \prm {hbox} \NC \nod {hlist} \NC horizontal box \NC \NR
+\NC \prm {vbox} \NC \nod {vlist} \NC vertical box with the baseline at the bottom \NC \NR
+\NC \prm {vtop} \NC \nod {vlist} \NC vertical box with the baseline at the top \NC \NR
+\NC \prm {hskip} \NC \nod {glue} \NC horizontal skip with optional stretch and shrink \NC \NR
+\NC \prm {vskip} \NC \nod {glue} \NC vertical skip with optional stretch and shrink \NC \NR
+\NC \prm {kern} \NC \nod {kern} \NC horizontal or vertical fixed skip \NC \NR
+\NC \prm {discretionary} \NC \nod {disc} \NC hyphenation point (pre, post, replace) \NC \NR
+\NC \prm {char} \NC \nod {glyph} \NC a character \NC \NR
+\NC \prm {hrule} \NC \nod {rule} \NC a horizontal rule \NC \NR
+\NC \prm {vrule} \NC \nod {rule} \NC a vertical rule \NC \NR
+\NC \prm {textdir} \NC \nod {dir} \NC a change in text direction \NC \NR
+\LL
+\stoptabulate
+
For now this should be enough to enable you to understand the next chapters.
\stopchapter
diff --git a/doc/context/sources/general/manuals/luatex/luatex-registers.tex b/doc/context/sources/general/manuals/luatex/luatex-registers.tex
new file mode 100644
index 000000000..c9d1352f6
--- /dev/null
+++ b/doc/context/sources/general/manuals/luatex/luatex-registers.tex
@@ -0,0 +1,38 @@
+\environment luatex-style
+
+\startcomponent luatex-registers
+
+\startchapter[title=Topics]
+
+ \placeregister[topicindex]
+
+\stopchapter
+
+\startchapter[title=Primitives]
+
+ This register contains the primitives that are mentioned in the manual. There
+ are of course many more primitives. The \LUATEX\ primitives are typeset in
+ bold. The primitives from \PDFTEX\ are not supported that way but mentioned
+ anyway.
+
+ \placeregister[primitiveindex][indicator=no]
+
+\stopchapter
+
+\startchapter[title=Callbacks]
+
+ \placeregister[callbackindex]
+
+\stopchapter
+
+\startchapter[title=Nodes]
+
+ This register contains the nodes that are known to \LUATEX. The primary nodes
+ are in bold, whatsits that are determined by their subtype are normal. The
+ names prefixed by \type {pdf_} are backend specific.
+
+ \placeregister[nodeindex]
+
+\stopchapter
+
+\stopcomponent
diff --git a/doc/context/sources/general/manuals/luatex/luatex-statistics.tex b/doc/context/sources/general/manuals/luatex/luatex-statistics.tex
index 99941a8ab..ad3c12488 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-statistics.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-statistics.tex
@@ -6,6 +6,8 @@
\startchapter[title={Statistics}]
+ \topicindex{fonts+used}
+
\showfontusage
\stopchapter
diff --git a/doc/context/sources/general/manuals/luatex/luatex-style.tex b/doc/context/sources/general/manuals/luatex/luatex-style.tex
index eedf05aab..5245723c4 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-style.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-style.tex
@@ -33,6 +33,10 @@
[each]
[packed]
+\definesymbol[1][\Uchar"2023]
+\definesymbol[2][\endash]
+\definesymbol[3][\wait] % we want to catch it
+
\setupitemize
[each]
[headcolor=maincolor,
@@ -43,7 +47,10 @@
[medium]
\setuptabulate
- [headstyle=bold,
+ [blank={small,samepage},
+ headstyle=bold,
+ rulecolor=maincolor,
+ rulethickness=1pt,
foregroundcolor=white,
foregroundstyle=\ss\bfx\WORD,
backgroundcolor=maincolor]
@@ -131,6 +138,10 @@
\setupheadertexts
[]
+% \setuplayout
+% [style=bold,
+% color=maincolor]
+
\definemixedcolumns
[twocolumns]
[n=2,
@@ -249,12 +260,14 @@
\setlayerframed
[page]
[preset=rightbottom,x=2.5cm,y=\measure{banneroffset}]
- [frame=off,height=1cm,width=1cm,offset=overlay]
+ [frame=off,height=1cm,width=1cm,offset=overlay,
+ foregroundstyle=bold,foregroundcolor=maincolor]
{\strut\pagenumber}
\setlayerframed
[page]
[preset=rightbottom,x=3.5cm,y=\measure{banneroffset}]
- [frame=off,height=1cm,offset=overlay]
+ [frame=off,height=1cm,offset=overlay,
+ foregroundstyle=bold,foregroundcolor=maincolor]
{\strut\getmarking[chapter]}
\stopsetups
@@ -262,12 +275,14 @@
\setlayerframed
[page]
[preset=leftbottom,x=3.5cm,y=\measure{banneroffset}]
- [frame=off,height=1cm,offset=overlay]
+ [frame=off,height=1cm,offset=overlay,
+ foregroundstyle=bold,foregroundcolor=maincolor]
{\strut\getmarking[chapter]}
\setlayerframed
[page]
[preset=leftbottom,x=2.5cm,y=\measure{banneroffset}]
- [frame=off,height=1cm,width=1cm,offset=overlay]
+ [frame=off,height=1cm,width=1cm,offset=overlay,
+ foregroundstyle=bold,foregroundcolor=maincolor]
{\strut\pagenumber}
\setlayerframed
[page]
@@ -299,13 +314,15 @@
{\par
\tt
\startnarrower
- \maincolor #1
+ % \maincolor
+ #1
\stopnarrower
\par}
\unexpanded\def\syntaxbody#1%
{\begingroup
- \maincolor \tt #1%
+ % \maincolor
+ \tt #1%
\endgroup}
\bgroup \catcodetable\syntaxcodetable
@@ -317,7 +334,7 @@
\definetyping
[texsyntax]
- [color=maincolor]
+% [color=maincolor]
% end of wave
@@ -381,4 +398,17 @@
\environment luatex-logos
+\defineregister[topicindex]
+\defineregister[primitiveindex]
+\defineregister[callbackindex]
+\defineregister[nodeindex]
+
+\unexpanded\def\lpr#1{\doifmode{*bodypart}{\primitiveindex[#1]{\bf\tex {#1}}}\tex {#1}}
+\unexpanded\def\prm#1{\doifmode{*bodypart}{\primitiveindex[#1]{\tex {#1}}}\tex {#1}}
+\unexpanded\def\orm#1{\doifmode{*bodypart}{\primitiveindex[#1]{\tex {#1}}}\tex {#1}}
+\unexpanded\def\cbk#1{\doifmode{*bodypart}{\callbackindex [#1]{\type {#1}}}\type{#1}}
+\unexpanded\def\nod#1{\doifmode{*bodypart}{\nodeindex [#1]{\bf\type{#1}}}\type{#1}}
+\unexpanded\def\whs#1{\doifmode{*bodypart}{\nodeindex [#1]{\type {#1}}}\type{#1}}
+\unexpanded\def\noa#1{\doifmode{*bodypart}{\nodeindex [#1]{\type {#1}}}\type{#1}}
+
\stopenvironment
diff --git a/doc/context/sources/general/manuals/luatex/luatex.tex b/doc/context/sources/general/manuals/luatex/luatex.tex
index 29dfdbb8b..370092624 100644
--- a/doc/context/sources/general/manuals/luatex/luatex.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex.tex
@@ -33,6 +33,8 @@
% \setupsynctex[state=start,method=max] % adds 5 pct overhead
+% after adding primitives: context mult-prm.mkiv
+
\environment luatex-style
% \environment luatex-book
\environment luatex-logos
@@ -81,6 +83,7 @@
\stopbodymatter
\startbackmatter
+ \component luatex-registers
\component luatex-statistics
\stopbackmatter
diff --git a/doc/context/sources/general/manuals/rules/rules-mkiv.tex b/doc/context/sources/general/manuals/rules/rules-mkiv.tex
index 614f9cc4d..e1d8acfaa 100644
--- a/doc/context/sources/general/manuals/rules/rules-mkiv.tex
+++ b/doc/context/sources/general/manuals/rules/rules-mkiv.tex
@@ -257,8 +257,10 @@ A running box is seen as text. As you (probably) expect, a nested ornamental
rule is supported as well:
\startbuffer
-\underbars{We see this \high{\tfxx\underdot{®}} symbol \runninghbox to 1cm{\hss} often.}
-\underbar {We see this \high{\tfxx\underdot{®}} symbol \runninghbox to 1cm{\hss} often.}
+\underbars
+ {We see this \high{\tfxx\underdot{®}} symbol \runninghbox to 1cm{\hss} often.}
+\underbar
+ {We see this \high{\tfxx\underdot{®}} symbol \runninghbox to 1cm{\hss} often.}
\stopbuffer
\typebuffer
@@ -269,6 +271,30 @@ This time we get (you might need a magnifier to see it):
\getbuffer
\stoplines
+We end this section with an extreme example:
+
+\startbuffer
+\definebar
+ [xbarone]
+ [text=\lower\exheight\hbox{\darkred \infofont +},
+ repeat=yes]
+\definebar
+ [xbartwo]
+ [text=\lower\exheight\hbox{\darkblue\infofont +},
+ repeat=yes,
+ continue=yes]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+Klein : \xbarone{\samplefile {klein}\removeunwantedspaces}\par
+Sapolsky : \xbartwo{\samplefile{sapolsky}\removeunwantedspaces}\par
+\stopbuffer
+
+\typebuffer \getbuffer
+
+
\stopsubject
\startsubject[title=Shifting]
@@ -623,9 +649,11 @@ primitive here, so we follow the \TEX\ conventions of keywords.
\startbuffer
\ruledhbox\bgroup
- \darkgray \frule width 100mm height 10mm depth 8mm radius 2mm line 2pt type fill\relax
+ \darkgray
+ \frule width 100mm height 10mm depth 8mm radius 2mm line 2pt type fill\relax
\hskip-100mm
- \darkred \frule width 100mm height 10mm depth 8mm radius 2mm line 2pt\relax
+ \darkred
+ \frule width 100mm height 10mm depth 8mm radius 2mm line 2pt\relax
\hskip-100mm
\hbox to 100mm{\white \bold \hfill some handy word with frames\hfill}%
\egroup
@@ -818,4 +846,164 @@ the spacing is kept at a linebreak:
\stopsubject
+\startsubject[title=Tabulate]
+
+The previously discussed mechanism is also available in the tabulate mechanism.
+We start with simple backgrounds:
+
+\startbuffer
+\starttabulate
+ \NL[darkred] foo \NC bar \NC \NR
+ \NL[darkgreen] foo \NC bar \NC \NR
+ \NL[darkblue] foo \NC \samplefile{tufte} \NC \NR
+ \NL[darkgray] foo \NC bar \NC \NR
+ \NL[darkyellow] foo \NC bar \NC \NR
+ \LL
+\stoptabulate
+\stopbuffer
+
+\typebuffer
+
+This comes out as:
+
+{\startcolor[white]\getbuffer\stopcolor}
+
+There are several two character commands that deal with this:
+
+\starttabulate[|c|c|l|]
+\BC command \BC related to \BC effect \NC
+\NC \type{\NL} \NC \type{\NC} \NC Normal with Line \NC \NR
+\NC \type{\ND} \NC \type{\NC} \NC Normal with Default Line \NC \NR
+\NC \type{\LB} \NC \type{\BC} \NC Bold with Line \NC \NR
+\NC \type{\DB} \NC \type{\BC} \NC Bold with Default Line \NC \NR
+\NC \type{\NF} \NC \type{\NC} \NC Normal with Filler \NC \NR
+\NC \type{\NP} \NC \type{\NC} \NC Normal with Predefined Filler \NC \NR
+\NC \type{\FB} \NC \type{\BC} \NC Bold with Filler \NC \NR
+\NC \type{\NA} \NC \type{\NC} \NC Normal with Auto Toggled Line \NC \NR
+\NC \type{\BA} \NC \type{\BC} \NC Bold with Auto Toggled Line \NC \NR
+\stoptabulate
+
+Before we show more, we set up tabulate:
+
+\startbuffer[setup]
+\setuptabulate
+ [blank={small,samepage},
+ headstyle=bold,
+ rulecolor=darkred,
+ rulethickness=1pt,
+ background=foo,
+ backgroundcolor=darkred,
+ foregroundcolor=white]
+\stopbuffer
+
+\typebuffer[setup]
+
+This time we don't set colors in the table itself:
+
+\startbuffer
+\starttabulate[|l|l|]
+ \DB foos \BC bars \BC \NR
+ \TB
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+ \LL
+\stoptabulate
+\stopbuffer
+
+\typebuffer {\getbuffer[setup]\getbuffer}
+
+Instead of coming up with a separate mechanism for hooking in \METAPOST\ we
+use the linefiller mechanism. We use these graphics:
+
+\startbuffer
+\startuseMPgraphic{foo}
+ fill unitsquare
+ xyscaled (RuleWidth,RuleHeight+RuleDepth) enlarged (ExHeight/4,ExHeight/8)
+ shifted (-ExHeight/8,ExHeight/16)
+ withcolor RuleColor ;
+\stopuseMPgraphic
+
+\startuseMPgraphic{bar}
+ fill unitsquare
+ xyscaled (RuleWidth,RuleHeight+RuleDepth) enlarged (ExHeight/4,ExHeight/8)
+ shifted (-ExHeight/8,ExHeight/16)
+ randomized ExHeight
+ withcolor RuleColor ;
+\stopuseMPgraphic
+\stopbuffer
+
+\typebuffer \getbuffer
+
+With these fillers:
+
+\startbuffer
+\definelinefiller[foo][mp=foo,color=darkgreen]
+\definelinefiller[bar][mp=bar,color=darkred]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+An example of usage is:
+
+\startbuffer
+\linefillerhbox[foo] to 12cm{\hss\strut\white\bf FOO\hss} \blank
+\linefillerhbox[bar] to 10cm{\hss\strut\white\bf BAR\hss} \blank
+\linefillerhbox[foo] to 9cm{\hss\strut\white\bf FOO\hss} \blank
+\linefillerhbox[bar] to 14cm{\hss\strut\white\bf BAR\hss}
+\stopbuffer
+
+\typebuffer \blank \getbuffer \blank
+
+We can rely on the default:
+
+\startbuffer
+\starttabulate[|||]
+ \PB foo \BC bars \BC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer \start\getbuffer[setup]\getbuffer\stop
+
+or be explicit:
+
+\startbuffer
+\starttabulate[|||]
+ \FB[bar] foos \BC bars \BC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+ \NC foo foo foo \NC bar bar bar bar \NC \NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer \start\getbuffer[setup]\getbuffer\stop
+
+The auto variants will switch between colors:
+
+\startbuffer
+\setuptabulate[backgroundcolor:1=darkred]
+\setuptabulate[backgroundcolor:2=darkgreen]
+\setuptabulate[backgroundcolor:3=darkblue]
+
+\starttabulate[|||]
+ \BA foo foo foo \BC bar bar bar bar \NC \NR
+ \BA foo foo foo \BC bar bar bar bar \NC \NR
+ \BA foo foo foo \BC bar bar bar bar \NC \NR
+ \BA foo foo foo \BC bar bar bar bar \NC \NR
+ \BA foo foo foo \BC bar bar bar bar \NC \NR
+ \BA foo foo foo \BC bar bar bar bar \NC \NR
+\stoptabulate
+\stopbuffer
+
+\typebuffer \start\getbuffer[setup]\getbuffer\stop
+
+
+\stopsubject
+
\stopdocument
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 1c4691d8c..b00d14298 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2018.04.16 12:05}
+\newcontextversion{2018.04.19 15:53}
%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 d10d2d600..118a48a35 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.04.16 12:05}
+\edef\contextversion{2018.04.19 15:53}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/buff-ini.mkiv b/tex/context/base/mkiv/buff-ini.mkiv
index 6baf752cd..b139e2b51 100644
--- a/tex/context/base/mkiv/buff-ini.mkiv
+++ b/tex/context/base/mkiv/buff-ini.mkiv
@@ -44,8 +44,12 @@
% \def\buff_start_indeed#1#2#3#4#5% \donothing needed ! #5=undent)
% {\normalexpanded{\buff_pickup{#2}{#3}{#4}{}{\buff_stop{#4}}\plusone}}
+% \def\buff_start_indeed#1#2#3#4%
+% {\normalexpanded{\buff_pickup{#2}{#3}{#4}{}{\buff_stop{#4}}\plusone}}
+
\def\buff_start_indeed#1#2#3#4%
- {\normalexpanded{\buff_pickup{#2}{#3}{#4}{}{\buff_stop{#4}}\plusone}}
+ {\edef\p_strip{\namedbufferparameter{#1}\c!strip}% for aditya
+ \normalexpanded{\buff_pickup{#2}{#3}{#4}{}{\buff_stop{#4}}\ifx\p_strip\v!no\zerocount\else\plusone\fi}}
\unexpanded\def\grabbufferdata % was: \dostartbuffer
{\begingroup % (4)
@@ -155,7 +159,7 @@
\setexpandedbufferparameter\c!number{\number\c_buff_n_of_defined}%
\edef\currentdefinedbuffer{def-\number\c_buff_n_of_defined}%
\setuevalue{\e!start\currentbuffer}{\buff_start_defined{\currentbuffer}{\currentdefinedbuffer}{\e!start\currentbuffer}{\e!stop\currentbuffer}}%
- \setuevalue{\e!get\currentbuffer }{\buff_get_stored{\currentbuffer}{\currentdefinedbuffer}}%
+ \setuevalue{\e!get \currentbuffer}{\buff_get_stored {\currentbuffer}{\currentdefinedbuffer}}%
\to \everydefinebuffer
\unexpanded\def\buff_start_defined
diff --git a/tex/context/base/mkiv/cldf-scn.lua b/tex/context/base/mkiv/cldf-scn.lua
index ccf1f01c6..a8dddc6c8 100644
--- a/tex/context/base/mkiv/cldf-scn.lua
+++ b/tex/context/base/mkiv/cldf-scn.lua
@@ -25,6 +25,7 @@ local scanners = interfaces.scanners
local register = interfaces.registerscanner
local compile = tokens.compile or function() end
+local presets = tokens.presets
local dummy = function() end
@@ -47,6 +48,10 @@ function interfaces.implement(specification)
if name == "" then
name = nil
end
+ local p = arguments and presets[arguments]
+ if p then
+ arguments = p
+ end
local scanner
local resetter = onlyonce and name and commands.ctxresetter(name)
if resetter then
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index e0353b955..9fa8f68a4 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2018.04.16 12:05}
+\newcontextversion{2018.04.19 15:53}
%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 9a05525a1..24482906c 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -42,7 +42,7 @@
%D has to match \type {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.04.16 12:05}
+\edef\contextversion{2018.04.19 15:53}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-cff.lua b/tex/context/base/mkiv/font-cff.lua
index 1d4f01007..87234dd46 100644
--- a/tex/context/base/mkiv/font-cff.lua
+++ b/tex/context/base/mkiv/font-cff.lua
@@ -47,6 +47,21 @@ local setposition = streamreader.setposition
local getposition = streamreader.getposition
local readbytetable = streamreader.readbytetable
+directives.register("fonts.streamreader",function()
+
+ streamreader = utilities.streams
+
+ readstring = streamreader.readstring
+ readbyte = streamreader.readcardinal1
+ readushort = streamreader.readcardinal2
+ readuint = streamreader.readcardinal3
+ readulong = streamreader.readcardinal4
+ setposition = streamreader.setposition
+ getposition = streamreader.getposition
+ readbytetable = streamreader.readbytetable
+
+end)
+
local setmetatableindex = table.setmetatableindex
local trace_charstrings = false trackers.register("fonts.cff.charstrings",function(v) trace_charstrings = v end)
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index 77b2b7ff0..c896aa711 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -97,6 +97,29 @@ local readfword = readshort
local readbytetable = streamreader.readbytetable
local readbyte = streamreader.readbyte
+directives.register("fonts.streamreader",function()
+
+ streamreader = utilities.streams
+
+ setposition = streamreader.setposition
+ getposition = streamreader.getposition
+ readushort = streamreader.readcardinal2
+ readulong = streamreader.readcardinal4
+ readinteger = streamreader.readinteger1
+ readshort = streamreader.readinteger2
+ readstring = streamreader.readstring
+ readtag = streamreader.readtag
+ readbytes = streamreader.readbytes
+ readfixed = streamreader.readfixed4
+ read2dot14 = streamreader.read2dot14
+ skipshort = streamreader.skipshort
+ skipbytes = streamreader.skip
+ readfword = readshort
+ readbytetable = streamreader.readbytetable
+ readbyte = streamreader.readbyte
+
+end)
+
local gsubhandlers = { }
local gposhandlers = { }
diff --git a/tex/context/base/mkiv/font-osd.lua b/tex/context/base/mkiv/font-osd.lua
index 9f99fd57f..51f644ad1 100644
--- a/tex/context/base/mkiv/font-osd.lua
+++ b/tex/context/base/mkiv/font-osd.lua
@@ -293,10 +293,6 @@ if not indicgroups and characters then
characters.indicgroups = indicgroups
-else
-
- indicgroups = table.setmetatableindex("table")
-
end
local consonant = indicgroups.consonant
@@ -422,19 +418,19 @@ local sequence_remove_joiners = {
-- as it might depends on the font. Not that it's a bottleneck.
local basic_shaping_forms = {
- init = true, -- new
- abvs = true, -- new
+ -- init = true, -- new
+ -- abvs = true, -- new
akhn = true,
blwf = true,
- calt = true, -- new
+ -- calt = true, -- new
cjct = true,
half = true,
- haln = true, -- new
+ -- haln = true, -- new
nukt = true,
pref = true,
- pres = true, -- new
+ -- pres = true, -- new
pstf = true,
- psts = true, -- new
+ -- psts = true, -- new
rkrf = true,
rphf = true,
vatu = true,
@@ -605,9 +601,7 @@ local function initializedevanagi(tfmdata)
end
end
end
-if reph then
- seqsubset[#seqsubset+1] = { kind, coverage, reph }
-end
+ seqsubset[#seqsubset+1] = { kind, coverage, reph }
end
end
end
@@ -691,6 +685,19 @@ registerotffeature {
},
}
+local show_syntax_errors = false
+
+local function inject_syntax_error(head,current,char)
+ local signal = copy_node(current)
+ copyinjection(signal,current)
+ if pre_mark[char] then
+ setchar(signal,dotted_circle)
+ else
+ setchar(current,dotted_circle)
+ end
+ return insert_node_after(head,current,signal)
+end
+
-- hm, this is applied to one character:
local function initialize_one(font,attr) -- we need a proper hook into the dataset initializer
@@ -793,10 +800,9 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
setprop(tempcurrent,a_state,unsetvalue)
if getchar(next) == getchar(tempcurrent) then
flush_list(tempcurrent)
- local n = copy_node(current)
- copyinjection(n,current) -- KE: necessary? HH: probably not as positioning comes later and we rawget/set
- setchar(current,dotted_circle)
- head = insert_node_after(head, current, n)
+ if show_syntax_errors then
+ head, current = inject_syntax_error(head,current,char)
+ end
else
setchar(current,getchar(tempcurrent)) -- we assumes that the result of blwf consists of one node
local freenode = getnext(current)
@@ -1217,7 +1223,7 @@ function handlers.devanagari_reorder_reph(head,start)
while current do
local char = ischar(current,startfont)
if char and getprop(current,a_syllabe) == startattr then
- if not c and mark_above_below_post[char] and after_subscript[char] then
+ if not c and mark_above_below_post[char] and not after_subscript[char] then
c = current
end
current = getnext(current)
@@ -1560,10 +1566,9 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas
setprop(current,a_state,unsetvalue)
if halant[getchar(current)] then
setnext(getnext(current),tmp)
- local nc = copy_node(current)
- copyinjection(nc,current)
- setchar(current,dotted_circle)
- head = insert_node_after(head,current,nc)
+ if show_syntax_errors then
+ head, current = inject_syntax_error(head,current,char)
+ end
else
setnext(current,tmp) -- assumes that result of pref, blwf, or pstf consists of one node
if changestop then
@@ -2058,19 +2063,6 @@ local function analyze_next_chars_two(c,font)
end
end
-local show_syntax_errors = false
-
-local function inject_syntax_error(head,current,char)
- local signal = copy_node(current)
- copyinjection(signal,current)
- if pre_mark[char] then
- setchar(signal,dotted_circle)
- else
- setchar(current,dotted_circle)
- end
- return insert_node_after(head,current,signal)
-end
-
-- It looks like these two analyzers were written independently but they share
-- a lot. Common code has been synced.
diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua
index 5bac75052..8b5c676c1 100644
--- a/tex/context/base/mkiv/font-otr.lua
+++ b/tex/context/base/mkiv/font-otr.lua
@@ -126,6 +126,34 @@ function streamreader.readtag(f)
return lower(stripstring(readstring(f,4)))
end
+directives.register("fonts.streamreader",function()
+
+ streamreader = utilities.streams
+
+ openfile = streamreader.open
+ closefile = streamreader.close
+ setposition = streamreader.setposition
+ skipshort = streamreader.skipshort
+ readbytes = streamreader.readbytes
+ readstring = streamreader.readstring
+ readbyte = streamreader.readcardinal1
+ readushort = streamreader.readcardinal2
+ readuint = streamreader.readcardinal3
+ readulong = streamreader.readcardinal4
+ readshort = streamreader.readinteger2
+ readlong = streamreader.readinteger4
+ readfixed = streamreader.readfixed4
+ read2dot14 = streamreader.read2dot14
+ readfword = readshort
+ readufword = readushort
+ readoffset = readushort
+
+ function streamreader.readtag(f)
+ return lower(stripstring(readstring(f,4)))
+ end
+
+end)
+
-- date represented in number of seconds since 12:00 midnight, January 1, 1904. The value is represented as a
-- signed 64-bit integer
diff --git a/tex/context/base/mkiv/font-ttf.lua b/tex/context/base/mkiv/font-ttf.lua
index df08787f9..181bfbcc6 100644
--- a/tex/context/base/mkiv/font-ttf.lua
+++ b/tex/context/base/mkiv/font-ttf.lua
@@ -56,6 +56,23 @@ local readshort = streamreader.readinteger2 -- 16-bit signed integer
local read2dot14 = streamreader.read2dot14 -- 16-bit signed fixed number with the low 14 bits of fraction (2.14) (F2DOT14)
local readinteger = streamreader.readinteger1
+directives.register("fonts.streamreader",function()
+
+ streamreader = utilities.streams
+
+ setposition = streamreader.setposition
+ getposition = streamreader.getposition
+ skipbytes = streamreader.skip
+ readbyte = streamreader.readcardinal1
+ readushort = streamreader.readcardinal2
+ readulong = streamreader.readcardinal4
+ readchar = streamreader.readinteger1
+ readshort = streamreader.readinteger2
+ read2dot14 = streamreader.read2dot14
+ readinteger = streamreader.readinteger1
+
+end)
+
local helpers = readers.helpers
local gotodatatable = helpers.gotodatatable
diff --git a/tex/context/base/mkiv/font-web.lua b/tex/context/base/mkiv/font-web.lua
index 452a8f59b..376b036f2 100644
--- a/tex/context/base/mkiv/font-web.lua
+++ b/tex/context/base/mkiv/font-web.lua
@@ -23,18 +23,30 @@ local streamwriter = readers and readers.streamwriter or utilities.files
local readstring = streamreader.readstring
local readcardinal2 = streamreader.readcardinal2
local readcardinal4 = streamreader.readcardinal4
+local getsize = streamreader.getsize
+local setposition = streamreader.setposition
+local getposition = streamreader.getposition
local writestring = streamwriter.writestring
local writecardinal4 = streamwriter.writecardinal4
local writecardinal2 = streamwriter.writecardinal2
local writebyte = streamwriter.writebyte
-local getsize = streamreader.getsize
-local setposition = streamreader.setposition
-local getposition = streamreader.getposition
-
local decompress = zlib.decompress
+directives.register("fonts.streamreader",function()
+
+ streamreader = utilities.streams
+
+ readstring = streamreader.readstring
+ readcardinal2 = streamreader.readcardinal2
+ readcardinal4 = streamreader.readcardinal4
+ getsize = streamreader.getsize
+ setposition = streamreader.setposition
+ getposition = streamreader.getposition
+
+end)
+
local infotags = {
["os/2"] = true,
["head"] = true,
diff --git a/tex/context/base/mkiv/luat-lib.mkiv b/tex/context/base/mkiv/luat-lib.mkiv
index 0df31a4e5..320d68920 100644
--- a/tex/context/base/mkiv/luat-lib.mkiv
+++ b/tex/context/base/mkiv/luat-lib.mkiv
@@ -19,7 +19,7 @@
\registerctxluafile{util-sac}{optimize}
\registerctxluafile{util-sto}{} % could also be done in trac-deb.mkiv
\registerctxluafile{util-pck}{}
-\registerctxluafile{util-seq}{}
+% \registerctxluafile{util-seq}{}
%registerctxluafile{util-mrg}{} % not needed in context itself, only mtxrun
%registerctxluafile{util-lua}{} % moved
\registerctxluafile{util-prs}{}
@@ -35,6 +35,7 @@
\registerctxluafile{util-deb}{} % could also be done in trac-deb.mkiv
\registerctxluafile{util-tpl}{} % needs tracker
+\registerctxluafile{util-seq}{}
\registerctxluafile{util-sta}{}
diff --git a/tex/context/base/mkiv/mult-ini.mkiv b/tex/context/base/mkiv/mult-ini.mkiv
index d66749d14..ef9dcd249 100644
--- a/tex/context/base/mkiv/mult-ini.mkiv
+++ b/tex/context/base/mkiv/mult-ini.mkiv
@@ -111,6 +111,8 @@
\def\s!spread{spread} \let\!!spread\s!spread % obsolete
\def\s!plus {plus} \let\!!plus \s!plus % obsolete
\def\s!minus {minus} \let\!!minus \s!minus % obsolete
+\def\s!left {left}
+\def\s!right {right}
\def\s!fil {fil}
\def\s!fill {fill} \let\!!fill \s!fill % obsolete
\def\s!filll {filll}
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index be5e90889..e10a8e6fa 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -165,6 +165,8 @@ return {
"then",
"begcsname",
--
+ "autorule",
+ --
"strippedcsname","checkedstrippedcsname",
--
"firstargumentfalse", "firstargumenttrue",
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 50b798b79..6351df180 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -231,8 +231,8 @@ return {
"breakafterdirmode",
"catcodetable",
"clearmarks",
- "copyfont",
"compoundhyphenmode",
+ "copyfont",
"crampeddisplaystyle",
"crampedscriptscriptstyle",
"crampedscriptstyle",
@@ -298,10 +298,10 @@ return {
"mathpenaltiesmode",
"mathrulesfam",
"mathrulesmode",
- "mathscriptsmode",
- "mathscriptcharmode",
- "mathscriptboxmode",
"mathrulethicknessmode",
+ "mathscriptboxmode",
+ "mathscriptcharmode",
+ "mathscriptsmode",
"mathstyle",
"mathsurroundmode",
"mathsurroundskip",
@@ -425,9 +425,9 @@ return {
"pdflastypos",
"pdflinkmargin",
"pdfliteral",
+ "pdfmajorversion",
"pdfmapfile",
"pdfmapline",
- "pdfmajorversion",
"pdfminorversion",
"pdfnames",
"pdfnoligatures",
@@ -826,4 +826,4 @@ return {
["xetex"]={
"XeTeXversion",
},
-}
+} \ No newline at end of file
diff --git a/tex/context/base/mkiv/node-bck.lua b/tex/context/base/mkiv/node-bck.lua
index 054135669..995620710 100644
--- a/tex/context/base/mkiv/node-bck.lua
+++ b/tex/context/base/mkiv/node-bck.lua
@@ -38,11 +38,13 @@ local getattr = nuts.getattr
local getsubtype = nuts.getsubtype
local getwhd = nuts.getwhd
local getwidth = nuts.getwidth
+local getprop = nuts.getprop
local setattr = nuts.setattr
local setlink = nuts.setlink
local setlist = nuts.setlist
local setattributelist = nuts.setattributelist
+local setprop = nuts.setprop
local takebox = nuts.takebox
local findtail = nuts.tail
@@ -56,6 +58,7 @@ local new_rule = nodepool.rule
local new_kern = nodepool.kern
local privateattributes = attributes.private
+local unsetvalue = attributes.unsetvalue
local linefillers = nodes.linefillers
@@ -67,8 +70,19 @@ local a_alignbackground = privateattributes("alignbackground")
local a_linefiller = privateattributes("linefiller")
local a_ruled = privateattributes("ruled")
--- actually we can be more clever now: we can store cells and row data
--- and apply it
+local trace_alignment = false
+local report_alignment = logs.reported("backgrounds","alignment")
+
+trackers.register("backgrounds.alignments",function(v) trace_alignment = v end)
+
+-- We can't use listbuilders with where=alignment because at that stage we have
+-- unset boxes. Also, post_linebreak is unsuitable for nested processing as we
+-- get the same stuff many times (wrapped again and again).
+--
+-- After many experiments with different callbacks the shipout is still the best
+-- place but then we need to store some settings longer or save them with the node.
+-- For color only we can get away with it with an extra attribute flagging a row
+-- but for more complex stuff we can better do as we do here now.
local function colored_a(current,list,template,id)
local width, height, depth = getwhd(current)
@@ -117,84 +131,112 @@ local function colored_b(current,list,template,id,indent)
end
end
-local function add_backgrounds(head)
- for current, id in traverse(head) do
- if id == hlist_code or id == vlist_code then
- local list = getlist(current)
- if list then
- local head = add_backgrounds(list)
- if head then
- setlist(current,head)
- list = head
- end
- end
- local background = getattr(current,a_background)
- if background then
- local list = colored_a(current,list,current,id)
- if list then
- setlist(current,list)
- end
- end
- end
- end
- return head, true
-end
-
--- We use a fake hlist with proper attributes.
-
local templates = { }
local currentrow = 0
+local enabled = false
+local alignments = false
-local function add_alignbackgrounds(head)
- for current in traverse_id(hlist_code,head) do -- what is valign?
- if getsubtype(current) == alignment_code then
+local function add_alignbackgrounds(head,list)
+ for current in traverse_id(hlist_code,list) do
+ if getsubtype(current) == cell_code then
local list = getlist(current)
if list then
- for current in traverse_id(hlist_code,list) do
- if getsubtype(current) == cell_code then
- local list = getlist(current)
+ for template in traverse_id(hlist_code,list) do
+ local background = getattr(template,a_alignbackground)
+ if background then
+ local list = colored_a(current,list,template)
if list then
- for template in traverse_id(hlist_code,list) do
- local background = getattr(template,a_alignbackground)
- if background then
- local list = colored_a(current,list,template)
- if list then
- setlist(current,list)
- end
- end
- break
- end
+ setlist(current,list)
end
+ setattr(template,a_alignbackground,unsetvalue) -- or property
end
+ break
end
end
- currentrow = currentrow + 1
- local template = templates[currentrow]
- if template then
- local list = colored_b(current,list,template[1],hlist_code,template[2])
+ end
+ end
+ local template = getprop(head,"alignmentchecked")
+ if template then
+ list = colored_b(head,list,template[1],hlist_code,template[2])
+ flush_node_list(template)
+ templates[currentrow] = false
+ return list
+ end
+end
+
+local function add_backgrounds(head,id,list)
+ if list then
+ for current, id in traverse(list) do
+ if id == hlist_code or id == vlist_code then
+ local list = getlist(current)
if list then
- setlist(current,list)
+ if alignments and getsubtype(current) == alignment_code then
+ local l = add_alignbackgrounds(current,list)
+ if l then
+ list = l
+ setlist(current,list)
+ end
+ end
+ local l = add_backgrounds(current,id,list)
+ if l then
+ list = l
+ setlist(current,l)
+ end
end
- flush_node_list(template)
- templates[currentrow] = false
end
end
end
+ if id == hlist_code or id == vlist_code then
+ local background = getattr(head,a_background)
+ if background then
+ list = colored_a(head,list,head,id)
+ -- not needed
+ setattr(head,a_background,unsetvalue) -- or property
+ return list
+ end
+ end
+end
+
+function nodes.handlers.backgrounds(head)
+ local h = tonut(head)
+ add_backgrounds(h,getid(h),getlist(h))
return head, true
end
-function nodes.handlers.backgrounds(head,where)
- local head, done = add_backgrounds(tonut(head))
- return tonode(head), done
+function nodes.handlers.backgroundspage(head,where)
+ if head and where == "alignment" then
+ local head = tonut(head)
+ for n in traverse_id(hlist_code,head) do
+ local p = getprop(n,"alignmentchecked")
+ if not p and getsubtype(n) == alignment_code then
+ currentrow = currentrow + 1
+ local template = templates[currentrow]
+ if trace_alignment then
+ report_alignment("%03i %s %s",currentrow,"page",template and "+" or "-")
+ end
+ setprop(n,"alignmentchecked",template)
+ end
+ end
+ end
+ return head, true
end
-function nodes.handlers.alignbackgrounds(head,where)
- if where == "alignment" and head then
- local head, done = add_alignbackgrounds(tonut(head))
- return tonode(head), done
- else
- return head, false
+function nodes.handlers.backgroundsvbox(head,where)
+ if head and where == "vbox" then
+ local head = tonut(head)
+ for n in traverse_id(hlist_code,getlist(head)) do
+ local p = getprop(n,"alignmentchecked")
+ if not p and getsubtype(n) == alignment_code then
+ currentrow = currentrow + 1
+ local template = templates[currentrow]
+ if trace_alignment then
+ report_alignment("%03i %s %s",currentrow,"vbox",template and "+" or "-")
+ end
+ setprop(n,"alignmentchecked",template)
+ end
+ end
end
+ return head, true
end
-- interfaces.implement {
@@ -206,21 +248,29 @@ end
--
-- doing it in the shipout works as well but this is nicer
+local function enable(alignmentstoo)
+ if not enabled then
+ enabled = true
+ enableaction("shipouts","nodes.handlers.backgrounds")
+ end
+ if not alignments and alignmentstoo then
+ alignments = true
+ enableaction("vboxbuilders","nodes.handlers.backgroundsvbox")
+ enableaction("mvlbuilders", "nodes.handlers.backgroundspage")
+ end
+end
+
interfaces.implement {
name = "enablebackgroundboxes",
onlyonce = true,
- actions = function()
- enableaction("mvlbuilders", "nodes.handlers.backgrounds")
- enableaction("vboxbuilders","nodes.handlers.backgrounds")
- end,
+ actions = enable,
}
interfaces.implement {
name = "enablebackgroundalign",
onlyonce = true,
actions = function()
- enableaction("mvlbuilders", "nodes.handlers.alignbackgrounds")
- enableaction("vboxbuilders","nodes.handlers.alignbackgrounds")
+ enable(true)
end,
}
@@ -228,7 +278,12 @@ interfaces.implement {
name = "setbackgroundrowdata",
arguments = { "integer", "integer", "dimension" },
actions = function(row,box,indent)
- templates[row] = { takebox(box), indent }
+ row = row -1 -- better here than in tex
+ if box == 0 then
+ templates[row] = false
+ else
+ templates[row] = { takebox(box), indent }
+ end
end,
}
diff --git a/tex/context/base/mkiv/node-bck.mkiv b/tex/context/base/mkiv/node-bck.mkiv
index 6bfc43d6a..47aaa1629 100644
--- a/tex/context/base/mkiv/node-bck.mkiv
+++ b/tex/context/base/mkiv/node-bck.mkiv
@@ -16,8 +16,6 @@
%D This is first attempt to replacing backgrounds in a few tables
%D mechanisms. When used more frequently, we can store the color
%D spec in the attribute.
-%D
-%D Maybe move some to the bar handler.
\unprotect
@@ -74,6 +72,9 @@
\unexpanded\def\backgroundvbox{\node_backgrounds_boxes_add\vbox}
\unexpanded\def\backgroundvtop{\node_backgrounds_boxes_add\vtop}
+\unexpanded\def\backgroundline{\dontleavehmode
+ \node_backgrounds_boxes_add\hbox}
+
% \def\node_backgrounds_boxes_add#1[#2]%
% {\begingroup
% \clf_enablebackgroundboxes
@@ -90,18 +91,4 @@
{\clf_enablebackgroundboxes
#1\backgroundcolorattr{#2}}
-% less argument carry over:
-%
-% \def\node_backgrounds_boxes_add#1[#2]%
-% {\clf_enablebackgroundboxes#1%
-% \ifcsname\??colorattribute\currentcolorprefix#2\endcsname
-% \thebackgroundcolorattr{\currentcolorprefix#2}%
-% \else\ifcsname\??colorattribute#2\endcsname
-% \thebackgroundcolorattr{#2}%
-% \fi\fi}
-
-% \def\backgroundvbox[#1]{\vbox \backgroundcolorattr{#1}}
-% \def\backgroundvtop[#1]{\vtop \backgroundcolorattr{#1}}
-% \def\backgroundhbox[#1]{\hbox \backgroundcolorattr{#1}}
-
\protect \endinput
diff --git a/tex/context/base/mkiv/node-nut.lua b/tex/context/base/mkiv/node-nut.lua
index 302ece4bf..282a37e2e 100644
--- a/tex/context/base/mkiv/node-nut.lua
+++ b/tex/context/base/mkiv/node-nut.lua
@@ -780,8 +780,22 @@ nuts.theprop = function(n)
return p
end
-nodes.setprop = nodes.setproperty
-nodes.getprop = nodes.getproperty
+nuts.isdone = function(n,k)
+ local p = propertydata[n]
+ if not p then
+ propertydata[n] = { [k] = true }
+ return false
+ end
+ local v = p[k]
+ if v == nil then
+ propertydata[n] = { [k] = true }
+ return false
+ end
+ return v
+end
+
+-- nodes.setprop = nodes.setproperty
+-- nodes.getprop = nodes.getproperty
function nuts.copy_properties(source,target,what)
local newprops = propertydata[source]
diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua
index b8388f373..7c4c2c2f2 100644
--- a/tex/context/base/mkiv/node-rul.lua
+++ b/tex/context/base/mkiv/node-rul.lua
@@ -49,6 +49,7 @@ local setattrlist = nuts.setattrlist
local setshift = nuts.setshift
local getwidth = nuts.getwidth
local setwidth = nuts.setwidth
+local setfield = nuts.setfield
local flushlist = nuts.flush_list
local effective_glue = nuts.effective_glue
@@ -348,12 +349,13 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
else
local tx = d.text
if tx then
- tx = copy_list(tx)
+ local l = copy_list(tx)
if d["repeat"] == v_yes then
- tx = new_leader(w,tx)
+ l = new_leader(w,l)
+ setattrlist(l,tx)
end
- local r = hpack_nodes(tx,w,"exactly")
- inject(r,w,ht,dp)
+ l = hpack_nodes(l,w,"exactly")
+ inject(l,w,ht,dp)
else
for i=1,level do
local ht = (offset+(i-1)*dy)*e + rulethickness - m
@@ -746,3 +748,38 @@ implement {
onlyonce = true,
actions = nodes.linefillers.enable
}
+
+-- We add a bonus feature here:
+
+local new_rule = nodes.pool.rule
+
+interfaces.implement {
+ name = "autorule",
+ arguments = {
+ {
+ { "width", "dimension" },
+ { "height", "dimension" },
+ { "depth", "dimension" },
+ { "left", "dimension" },
+ { "right", "dimension" },
+ },
+ },
+ actions = function(t)
+ local l = t.left
+ local r = t.right
+ local n = new_rule(
+ t.width,
+ t.height,
+ t.depth
+ )
+ if LUATEXFUNCTIONALITY >= 6710 then
+ if l then
+ n.left = l
+ end
+ if r then
+ n.right = r
+ end
+ end
+ context(n)
+ end
+}
diff --git a/tex/context/base/mkiv/node-rul.mkiv b/tex/context/base/mkiv/node-rul.mkiv
index a7ec99f7d..c413edb1c 100644
--- a/tex/context/base/mkiv/node-rul.mkiv
+++ b/tex/context/base/mkiv/node-rul.mkiv
@@ -592,10 +592,10 @@
{\bgroup
\clf_enablebackgroundboxes
\dowithnextbox{%
- \node_linefiller_set{#3}%
+ \node_linefiller_set{#3}% already sets the attribute
#1%
attr \backgroundattribute \plusone
- attr \linefillerattribute \the\attribute\linefillerattribute
+ % attr \linefillerattribute \the\attribute\linefillerattribute
{\box\nextbox}%
\egroup}%
#2}
@@ -604,4 +604,8 @@
\unexpanded\def\linefillervbox{\node_backgrounds_filler_box\vpack\vbox}
\unexpanded\def\linefillervtop{\node_backgrounds_filler_box\tpack\vtop}
+%D Bonus:
+
+\unexpanded\def\autorule{\clf_autorule}
+
\protect \endinput
diff --git a/tex/context/base/mkiv/node-tsk.lua b/tex/context/base/mkiv/node-tsk.lua
index 1ce7ab1dc..4aec3a038 100644
--- a/tex/context/base/mkiv/node-tsk.lua
+++ b/tex/context/base/mkiv/node-tsk.lua
@@ -52,19 +52,20 @@ end
function tasks.new(specification) -- was: name,arguments,list
local name = specification.name
- local arguments = specification.arguments or 0
local sequence = specification.sequence
if name and sequence then
local tasklist = newsequencer {
-- we can move more to the sequencer now .. todo
}
tasksdata[name] = {
+ name = name,
list = tasklist,
runner = false,
- arguments = arguments,
- -- sequence = sequence,
frozen = { },
- processor = specification.processor or nodeprocessor
+ processor = specification.processor or nodeprocessor,
+ -- could be metatable but best freeze it
+ arguments = specification.arguments or 0,
+ templates = specification.templates,
}
for l=1,#sequence do
appendgroup(tasklist,sequence[l])
@@ -219,6 +220,22 @@ end)
function tasks.actions(name) -- we optimize for the number or arguments (no ...)
local data = tasksdata[name]
if data then
+ local t = data.templates
+ if t then
+ return function(...)
+ total = total + 1 -- will go away
+ local runner = data.runner
+ if not runner then
+ created = created + 1
+-- if trace_tasks then
+ report_tasks("creating runner %a",name)
+-- end
+ runner = compile(data.list,data.processor,t)
+ data.runner = runner
+ end
+ return runner(...)
+ end
+ end
local n = data.arguments or 0
if n == 0 then
return function(head)
@@ -452,3 +469,32 @@ tasks.new {
}
}
+-- for now quite useless (too fuzzy0
+--
+-- tasks.new {
+-- name = "listbuilders",
+-- processor = nodeprocessor,
+-- sequence = {
+-- "before", -- for users
+-- "normalizers",
+-- "after", -- for users
+-- },
+-- templates = {
+-- -- we don't need a default
+-- default = [[
+-- return function(box,location,prevdepth)
+-- return box, prevdepth
+-- end
+-- ]],
+-- process = [[
+-- %localize%
+-- return function(box,location,prevdepth,mirrored)
+-- %actions%
+-- return box, prevdepth
+-- end
+-- ]],
+-- step = [[
+-- box, prevdepth = %action%(box,location,prevdepth,mirrored)
+-- ]],
+-- },
+-- }
diff --git a/tex/context/base/mkiv/pack-bck.mkvi b/tex/context/base/mkiv/pack-bck.mkvi
index 346e7df57..9f9d843ce 100644
--- a/tex/context/base/mkiv/pack-bck.mkvi
+++ b/tex/context/base/mkiv/pack-bck.mkvi
@@ -245,18 +245,42 @@
%D \macros
%D {backgroundline}
-\unexpanded\def\backgroundline[#color]%
- {\dontleavehmode
- \dowithnextbox{\pack_backgrounds_add_to_nextbox{#color}}\hbox}
+% \unexpanded\def\backgroundline[#color]%
+% {\dontleavehmode
+% \dowithnextbox{\pack_backgrounds_add_to_nextbox{#color}}\hbox}
+%
+% \unexpanded\def\pack_backgrounds_add_to_nextbox#color% handy helper
+% {\hpack
+% {\dousecolorparameter{#color}%
+% \vrule
+% \??width \nextboxwd
+% \??height\nextboxht
+% \??depth \nextboxdp
+% \hskip-\nextboxwd
+% \flushnextbox}}
+
+%D We implement this elsewhere avoiding the rule.
-\unexpanded\def\pack_backgrounds_add_to_nextbox#color% handy helper
- {\hbox
- {\dousecolorparameter{#color}%
- \vrule
- \!!width \nextboxwd
- \!!height\nextboxht
- \!!depth \nextboxdp
- \hskip-\nextboxwd
- \flushnextbox}}
+% \unexpanded\def\backgroundline
+% {\dontleavehmode
+% \pack_backgrounds_add_to_nextbox\hbox\hpack}
+%
+% \unexpanded\def\pack_backgrounds_add_to_nextbox#box#pack[#color]%
+% {\dontleavehmode
+% \dowithnextbox{\pack_backgrounds_add_to_nextbox_indeed#pack{#color}}#box}
+%
+% \unexpanded\def\pack_backgrounds_add_to_nextbox_indeed#pack#color% handy helper
+% {#pack%
+% {\dousecolorparameter{#color}%
+% \vrule
+% \??width \nextboxwd
+% \??height\nextboxht
+% \??depth \nextboxdp
+% \hskip-\nextboxwd
+% \flushnextbox}}
+%
+% \unexpanded\def\backgroundhbox{\pack_backgrounds_add_to_nextbox\hbox\hpack}
+% \unexpanded\def\backgroundvtop{\pack_backgrounds_add_to_nextbox\vtop\tpack}
+% \unexpanded\def\backgroundvbox{\pack_backgrounds_add_to_nextbox\vbox\vpack}
\protect \endinput
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 489383f73..c8ca9b98e 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 f0e3e40b0..16940503b 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-sbe.mkiv b/tex/context/base/mkiv/strc-sbe.mkiv
index 9f1d214cf..005f03df3 100644
--- a/tex/context/base/mkiv/strc-sbe.mkiv
+++ b/tex/context/base/mkiv/strc-sbe.mkiv
@@ -45,7 +45,7 @@
\def\strc_sectionblock_define[#1][#2][#3]% singular plural settings
{\strc_sectionblock_define_normal[#1][#3]%
- \expandafter\newif\csname if#2\endcsname % obsolete
+ %\expandafter\newif\csname if#2\endcsname % obsolete
\strc_sectionblock_set_environment{#1}\empty
\setuvalue{\e!start#2}{\startsectionblock[#1]}%
\setuvalue{\e!stop #2}{\stopsectionblock}}
@@ -98,7 +98,7 @@
\clf_pushsectionblock{#1}
bookmark {\sectionblockparameter\c!bookmark}%
\relax
- \csname #1true\endcsname % obsolete
+ %\csname #1true\endcsname % obsolete
\setsystemmode\currentsectionblock
\the\everybeforesectionblock\relax
\showmessage\m!structures1\currentsectionblock}
diff --git a/tex/context/base/mkiv/tabl-tbl.mkiv b/tex/context/base/mkiv/tabl-tbl.mkiv
index 033b5cff6..f80813eef 100644
--- a/tex/context/base/mkiv/tabl-tbl.mkiv
+++ b/tex/context/base/mkiv/tabl-tbl.mkiv
@@ -176,6 +176,7 @@
\newcount \c_tabl_tabulate_minusnoflines
\newcount \c_tabl_tabulate_align
\newcount \c_tabl_tabulate_nofrealrows
+\newcount \c_tabl_tabulate_autocolor
\newcount \c_tabl_tabulate_nofcolumns % set at the lua end by parser
\newcount \c_tabl_tabulate_has_rule_spec_first % set at the lua end by parser (for the moment a count)
@@ -1327,6 +1328,7 @@
\edef\p_bodyfont {\tabulationparameter\c!bodyfont}
\edef\p_indenting {\tabulationparameter\c!indenting}%
\edef\p_keeptogether {\tabulationparameter\c!keeptogether}%
+ \edef\p_blank {\tabulationparameter\c!blank}%
%
\ifx\p_keeptogether\v!no
\settrue \c_tabl_tabulate_tolerant_break
@@ -1339,6 +1341,8 @@
\settrue\c_tabl_tabulate_split
\csname\??tabulatesplit\tabulationparameter\c!split\endcsname
%
+ \let\m_tabl_tabulate_blank_default\p_blank
+ %
\d_tabl_tabulate_unit\tabulationparameter\c!unit
\d_tabl_tabulate_margin\tabulationparameter\c!margin
\let\m_tabl_tabulate_vrule_color_default\p_rulecolor
@@ -1385,6 +1389,7 @@
\let\m_tabl_tabulate_vrule_color_local \empty
\let\m_tabl_tabulate_vrule_color_default\empty % used local
\let\m_tabl_tabulate_hrule_color_default\empty % used local
+\let\m_tabl_tabulate_blank_default \empty
\appendtoks
\global\let\m_tabl_tabulate_color_previous \empty
@@ -1639,10 +1644,11 @@
#1}
\def\tabl_tabulate_hrule_inject_normal
- {\hrule
- \s!height.5\d_tabl_tabulate_hrulethickness_local
- \s!depth .5\d_tabl_tabulate_hrulethickness_local
- \relax}
+ {\autorule
+ \s!height .5\d_tabl_tabulate_hrulethickness_local
+ \s!depth .5\d_tabl_tabulate_hrulethickness_local
+ \s!left \d_tabl_tabulate_indent
+ \relax}
\def\tabl_tabulate_hrule_inject_colored
{\dousecolorparameter\currenttabulationlocalhrulecolor
@@ -2518,9 +2524,11 @@
\def\tabl_tabulate_TB_indeed[#1]%
{\iffirstargument
\blank[#1]
- \else
+ \else\ifx\m_tabl_tabulate_blank_default\empty
\blank
- \fi
+ \else
+ \blank[\m_tabl_tabulate_blank_default]%
+ \fi\fi
\stoptabulatenoalign}
% to be tested:
@@ -2825,6 +2833,7 @@
\let\m_table_current_row_background_default \empty
\let\m_table_current_row_background_filler \empty
\let\m_table_current_row_background_defaultfiller\empty
+\let\m_table_current_row_background_auto \empty
\unexpanded\def\tabl_register_row_background#1%
{\xdef\m_table_current_row_background{#1}}
@@ -2837,6 +2846,7 @@
\ifx\m_table_current_row_background_filler\empty
\ifx\m_table_current_row_background\empty
% nothing
+ \tabl_synchronize_row_background_dummy
\else
\tabl_synchronize_row_background_indeed\m_table_current_row_background
\fi
@@ -2845,26 +2855,41 @@
\fi
\fi}
+\unexpanded\def\tabl_synchronize_row_background_dummy
+ {\iftrialtypesetting\else
+ \begingroup
+ %\clf_setbackgroundrowdata\numexpr\c_tabl_tabulate_nofrealrows+\minusone\relax\zerocount\zeropoint
+ \clf_setbackgroundrowdata\c_tabl_tabulate_nofrealrows\zerocount\zeropoint
+ \endgroup
+ \fi}
+
\unexpanded\def\tabl_synchronize_row_background_indeed#1%
- {\begingroup
- \clf_enablebackgroundalign % can be moved into \clf_setbackgroundrowdata
- \directcolor[#1]%
- \setbox\scratchbox\hpack{}%
- \clf_setbackgroundrowdata\numexpr\c_tabl_tabulate_nofrealrows+\minusone\relax\scratchbox\d_tabl_tabulate_indent
- \endgroup}
+ {\iftrialtypesetting\else
+ \begingroup
+ \clf_enablebackgroundalign % can be moved into \clf_setbackgroundrowdata
+ \dousecolorparameter{#1}%
+ \setbox\scratchbox\hpack{}%
+ %\clf_setbackgroundrowdata\numexpr\c_tabl_tabulate_nofrealrows+\minusone\relax\scratchbox\d_tabl_tabulate_indent
+ \clf_setbackgroundrowdata\c_tabl_tabulate_nofrealrows\scratchbox\d_tabl_tabulate_indent
+ \endgroup
+ \fi}
\unexpanded\def\tabl_synchronize_row_background_filler_indeed#1%
- {\begingroup
- \clf_enablebackgroundalign % can be moved into \clf_setbackgroundrowdata
- \node_linefiller_set{#1}%
- \setbox\scratchbox\hpack{}%
- \clf_setbackgroundrowdata\numexpr\c_tabl_tabulate_nofrealrows+\minusone\relax\scratchbox\d_tabl_tabulate_indent
- \endgroup}
+ {\iftrialtypesetting\else
+ \begingroup
+ \clf_enablebackgroundalign % can be moved into \clf_setbackgroundrowdata
+ \node_linefiller_set{#1}%
+ \setbox\scratchbox\hpack{}%
+ %\clf_setbackgroundrowdata\numexpr\c_tabl_tabulate_nofrealrows+\minusone\relax\scratchbox\d_tabl_tabulate_indent
+ \clf_setbackgroundrowdata\c_tabl_tabulate_nofrealrows\scratchbox\d_tabl_tabulate_indent
+ \endgroup
+ \fi}
\appendtoks
\glet\m_table_current_row_background\empty
\glet\m_table_current_row_background_filler\empty
\global\c_tabl_tabulate_nofrealrows\zerocount
+ \global\c_tabl_tabulate_autocolor\zerocount
\clf_resetbackgroundrowdata
\to \t_tabl_tabulate_initializers_first
@@ -2872,6 +2897,7 @@
\glet\m_table_current_row_background\empty
\glet\m_table_current_row_background_filler\empty
\global\c_tabl_tabulate_nofrealrows\zerocount
+ \global\c_tabl_tabulate_autocolor\zerocount
\clf_resetbackgroundrowdata
\to \t_tabl_tabulate_initializers_second
@@ -2959,26 +2985,60 @@
\usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor
\fi}
+\unexpanded\def\tabl_tabulate_A_first
+ {\global\advance\c_tabl_tabulate_autocolor\plusone
+ \edef\m_table_current_row_background_auto{\tabulateparameter{\c!backgroundcolor:\number\c_tabl_tabulate_autocolor}}%
+ \ifx\m_table_current_row_background_auto\empty
+ \global\c_tabl_tabulate_autocolor\plusone
+ \edef\m_table_current_row_background_auto{\tabulateparameter{\c!backgroundcolor:\number\c_tabl_tabulate_autocolor}}%
+ \fi
+ \ifx\m_table_current_row_background_auto\empty
+ \let\m_table_current_row_background_auto\empty % \m_table_current_row_background_default
+ \fi
+ \tabl_register_row_background{\m_table_current_row_background_auto}}
+
+\unexpanded\def\tabl_tabulate_NA_first
+ {\tabl_tabulate_column_normal\zerocount\zerocount\relax
+ \iftrialtypesetting\else
+ \ifcase\c_tabl_tabulate_column\or
+ \tabl_tabulate_A_first
+ \fi
+ \fi
+ \ignorespaces}
+
+\unexpanded\def\tabl_tabulate_BA_first
+ {\tabl_tabulate_column_normal\plusone\zerocount\relax
+ \iftrialtypesetting\else
+ \ifcase\c_tabl_tabulate_column\or
+ \tabl_tabulate_A_first
+ \fi
+ \fi
+ \usetabulationstyleandcolor\c!foregroundstyle\c!foregroundcolor
+ \ignorespaces}
+
\appendtoks
- \let\NL\tabl_tabulate_NL_first % NC = NC with Line
- \let\ND\tabl_tabulate_ND_first % NC = NC with Default Line
- \let\LB\tabl_tabulate_LB_first % BC = BC with Line
- \let\DB\tabl_tabulate_DB_first % BC = BC with Default Line
- \let\NF\tabl_tabulate_NF_first % NF = NC with Filler
- \let\NP\tabl_tabulate_NP_first % NP = NC with Predefined Fller
- \let\FB\tabl_tabulate_FB_first % FB = BC with Filler
- \let\PB\tabl_tabulate_PB_first % PB = BC with Predefined Fller
+ \let\NL\tabl_tabulate_NL_first % NC with Line
+ \let\ND\tabl_tabulate_ND_first % NC with Default Line
+ \let\LB\tabl_tabulate_LB_first % BC with Line
+ \let\DB\tabl_tabulate_DB_first % BC with Default Line
+ \let\NF\tabl_tabulate_NF_first % NC with Filler
+ \let\NP\tabl_tabulate_NP_first % NC with Predefined Filler
+ \let\FB\tabl_tabulate_FB_first % BC with Filler
+ \let\PB\tabl_tabulate_PB_first % BC with Predefined Filler
+ \let\NA\tabl_tabulate_NA_first % NC with Auto Line
+ \let\BA\tabl_tabulate_BA_first % NC with Auto Line
\to \t_tabl_tabulate_initializers_first
\appendtoks
\edef\m_table_current_row_background_default {\tabulateparameter\c!backgroundcolor}%
\edef\m_table_current_row_background_default_filler{\tabulateparameter\c!background}%
+ \let \m_table_current_row_background_auto \empty
\to \everytabulate
-
\setuptabulate
[\c!headcolor=,
\c!headstyle=\bf,
+ \c!backgroundcolor=\tabulationparameter\c!rulecolor,
\c!foregroundcolor=,
\c!foregroundstyle=\tabulationparameter\c!headstyle]
diff --git a/tex/context/base/mkiv/task-ini.lua b/tex/context/base/mkiv/task-ini.lua
index 02713320e..27d997584 100644
--- a/tex/context/base/mkiv/task-ini.lua
+++ b/tex/context/base/mkiv/task-ini.lua
@@ -78,7 +78,7 @@ appendaction("shipouts", "normalizers", "nodes.rules.handler")
appendaction("shipouts", "normalizers", "nodes.shifts.handler") -- disabled
appendaction("shipouts", "normalizers", "structures.tags.handler") -- disabled
appendaction("shipouts", "normalizers", "nodes.handlers.accessibility") -- disabled
-------------("shipouts", "normalizers", "nodes.handlers.backgrounds") -- disabled
+appendaction("shipouts", "normalizers", "nodes.handlers.backgrounds") -- disabled
------------("shipouts", "normalizers", "nodes.handlers.export") -- disabled
appendaction("shipouts", "normalizers", "typesetters.rubies.attach") -- disabled
@@ -132,11 +132,8 @@ appendaction("finalizers", "lists", "nodes.linefillers.handler")
appendaction("contributers", "normalizers", "nodes.handlers.flattenline")
appendaction("contributers", "normalizers", "nodes.handlers.textbackgrounds")
-appendaction("mvlbuilders", "normalizers", "nodes.handlers.alignbackgrounds")
-appendaction("vboxbuilders", "normalizers", "nodes.handlers.alignbackgrounds")
-
-appendaction("mvlbuilders", "normalizers", "nodes.handlers.backgrounds")
-appendaction("vboxbuilders", "normalizers", "nodes.handlers.backgrounds")
+appendaction("vboxbuilders", "normalizers", "nodes.handlers.backgroundsvbox")
+appendaction("mvlbuilders", "normalizers", "nodes.handlers.backgroundspage")
appendaction("mvlbuilders", "normalizers", "typesetters.margins.globalhandler") -- disabled
appendaction("mvlbuilders", "normalizers", "nodes.handlers.migrate")
@@ -203,9 +200,9 @@ disableaction("shipouts", "attributes.viewerlayers.handler")
disableaction("shipouts", "structures.tags.handler")
disableaction("shipouts", "nodes.visualizers.handler")
disableaction("shipouts", "nodes.handlers.accessibility")
--------------("shipouts", "nodes.handlers.backgrounds")
disableaction("shipouts", "nodes.references.handler")
disableaction("shipouts", "nodes.destinations.handler")
+disableaction("shipouts", "nodes.handlers.backgrounds")
-------------("shipouts", "nodes.handlers.export")
disableaction("shipouts", "typesetters.rubies.attach")
@@ -219,6 +216,9 @@ disableaction("finalizers", "nodes.linefillers.handler")
disableaction("contributers","nodes.handlers.flattenline")
disableaction("contributers","nodes.handlers.textbackgrounds")
+disableaction("vboxbuilders","nodes.handlers.backgroundsvbox")
+disableaction("mvlbuilders", "nodes.handlers.backgroundspage")
+
disableaction("math", "noads.handlers.showtree")
disableaction("math", "noads.handlers.tags")
disableaction("math", "noads.handlers.italics")
@@ -230,12 +230,6 @@ disableaction("math", "noads.handlers.autofences")
disableaction("math", "noads.handlers.makeup")
disableaction("math", "typesetters.directions.processmath")
-disableaction("mvlbuilders", "nodes.handlers.backgrounds")
-disableaction("vboxbuilders", "nodes.handlers.backgrounds")
-
-disableaction("mvlbuilders", "nodes.handlers.alignbackgrounds")
-disableaction("vboxbuilders", "nodes.handlers.alignbackgrounds")
-
disableaction("mvlbuilders", "typesetters.margins.globalhandler")
disableaction("mvlbuilders", "nodes.handlers.migrate")
disableaction("mvlbuilders", "typesetters.checkers.handler")
diff --git a/tex/context/base/mkiv/toks-scn.lua b/tex/context/base/mkiv/toks-scn.lua
index fe32a1de4..f73ecc86c 100644
--- a/tex/context/base/mkiv/toks-scn.lua
+++ b/tex/context/base/mkiv/toks-scn.lua
@@ -106,7 +106,40 @@ local function scanconditional()
return nil
end
+local function scantable(t,data)
+ if not data then
+ data = { }
+ end
+ local wrapped = scanopen()
+ while true do
+ local key = scanword()
+ if key then
+ local get = t[key]
+ if get then
+ data[key] = get()
+ else
+ -- catch all we can get
+ end
+ else
+ break
+ end
+ end
+ if wrapped then
+ scanclose()
+ end
+ return data
+end
+
+function tokens.constant(s)
+ if type(s) == "string" then
+ return "'" .. s .. "'"
+ else
+ return s
+ end
+end
+
scanners.list = scanlist
+scanners.table = scantable
scanners.conditional = scanconditional
local shortcuts = {
@@ -118,6 +151,7 @@ local shortcuts = {
scanstring = scanstring,
scaninteger = scaninteger,
scannumber = scannumber,
+ scantable = scantable,
scankeyword = scankeyword,
scankeywordcs = scankeywordcs,
scanword = scanword,
@@ -254,6 +288,8 @@ local presets = {
["8 strings"] = { "string", "string", "string", "string", "string", "string", "string", "string" },
}
+tokens.presets = presets
+
function tokens.compile(specification)
local f = { }
local n = 0
@@ -319,7 +355,7 @@ function tokens.compile(specification)
return c
end
end
- local p = t and presets[t]
+ local p = t and presets[t] -- already done in implement
if p then
t = p
end
@@ -460,35 +496,3 @@ end
-- }
--
-- os.exit()
-
-function tokens.scantable(t,data)
- if not data then
- data = { }
- end
- local wrapped = scanopen()
- while true do
- local key = scanword()
- if key then
- local get = t[key]
- if get then
- data[key] = get()
- else
- -- catch all we can get
- end
- else
- break
- end
- end
- if wrapped then
- scanclose()
- end
- return data
-end
-
-function tokens.constant(s)
- if type(s) == "string" then
- return "'" .. s .. "'"
- else
- return s
- end
-end
diff --git a/tex/context/base/mkiv/typo-bld.lua b/tex/context/base/mkiv/typo-bld.lua
index 753748a2e..8d349f3a6 100644
--- a/tex/context/base/mkiv/typo-bld.lua
+++ b/tex/context/base/mkiv/typo-bld.lua
@@ -54,10 +54,12 @@ storage.register("builders/paragraphs/constructors/names", names, "builders.
storage.register("builders/paragraphs/constructors/numbers", numbers, "builders.paragraphs.constructors.numbers")
local trace_page_builder = false trackers.register("builders.page", function(v) trace_page_builder = v end)
+local trace_vbox_builder = false trackers.register("builders.vbox", function(v) trace_vbox_builder = v end)
local trace_post_builder = false trackers.register("builders.post", function(v) trace_post_builder = v end)
-local report_par_builder = logs.reporter("builders","par")
local report_page_builder = logs.reporter("builders","page")
+local report_vbox_builder = logs.reporter("builders","vbox")
+local report_par_builder = logs.reporter("builders","par")
local mainconstructor = nil -- not stored in format
local nofconstructors = 0
@@ -193,7 +195,7 @@ function builders.vpack_filter(head,groupcode,size,packtype,maxdepth,direction)
local done = false
if head then
starttiming(builders)
- if trace_vpacking then
+ if trace_vbox_builder then
local before = count_nodes(head)
head, done = vboxactions(head,groupcode,size,packtype,maxdepth,direction)
local after = count_nodes(head)
@@ -258,9 +260,53 @@ function builders.buildpage_filter(groupcode)
end
end
-registercallback('vpack_filter', builders.vpack_filter, "vertical spacing etc")
-registercallback('buildpage_filter', builders.buildpage_filter, "vertical spacing etc (mvl)")
-----------------('contribute_filter', builders.contribute_filter, "adding content to lists")
+------------------------
+
+-- do
+--
+-- local nuts = nodes.nuts
+-- local tonut = nodes.tonut
+-- local tonode = nuts.tonode
+-- local getglue = tex.getglue
+-- local getwhd = nuts.getwhd
+-- local new_b_skip = nuts.pool.baselineskip
+-- local new_l_skip = nuts.pool.lineskip
+-- local find_tail = nuts.tail
+-- local setlink = nuts.setlink
+--
+-- function nodes.setprevdepth(box,prevdepth) -- this will become a helper
+-- local head = tonut(box)
+-- local wd, ht, dp = getwhd(head)
+-- if prevdepth > -65536000 then
+-- local b_width, b_stretch, b_shrink = getglue("baselineskip")
+-- local l_width, l_stretch, l_shrink = getglue("lineskip")
+-- local correction = b_width - prevdepth - (mirrored and dp or ht)
+-- if correction < l_width then
+-- head = setlink(new_l_skip(l_width,l_stretch,l_shrink),head)
+-- else
+-- head = setlink(new_b_skip(correction,b_stretch,b_shrink),head)
+-- end
+-- end
+-- return tonode(head), mirrored and ht or dp
+-- end
+--
+-- end
+--
+-- local setprevdepth = nodes.setprevdepth
+-- local appendactions = nodes.tasks.actions("listbuilders")
+--
+-- function builders.append_filter(box,location,prevdepth,mirrored)
+-- starttiming(builders)
+-- box, prevdepth = appendactions(box,location,prevdepth,mirrored)
+-- box, prevdepth = setprevdepth(box,prevdepth)
+-- stoptiming(builders)
+-- return box, prevdepth
+-- end
+
+registercallback('vpack_filter', builders.vpack_filter, "vertical spacing etc")
+registercallback('buildpage_filter', builders.buildpage_filter, "vertical spacing etc (mvl)")
+----------------("append_to_vlist_filter",builders.append_filter, "add content to the vlist")
+----------------('contribute_filter', builders.contribute_filter, "adding content to lists")
statistics.register("v-node processing time", function()
return statistics.elapsedseconds(builders)
@@ -387,3 +433,4 @@ end)
-- end,
-- "experimental prevdepth checking"
-- )
+
diff --git a/tex/context/base/mkiv/util-seq.lua b/tex/context/base/mkiv/util-seq.lua
index d302ff276..ec6ed2ceb 100644
--- a/tex/context/base/mkiv/util-seq.lua
+++ b/tex/context/base/mkiv/util-seq.lua
@@ -20,17 +20,18 @@ use locals to refer to them when compiling the chain.</p>
local gsub, concat, gmatch = string.gsub, table.concat, string.gmatch
local type, load = type, load
-utilities = utilities or { }
-local tables = utilities.tables
-local allocate = utilities.storage.allocate
+utilities = utilities or { }
+local tables = utilities.tables
+local allocate = utilities.storage.allocate
-local formatters = string.formatters
+local formatters = string.formatters
+local replacer = utilities.templates.replacer
-local sequencers = { }
-utilities.sequencers = sequencers
+local sequencers = { }
+utilities.sequencers = sequencers
-local functions = allocate()
-sequencers.functions = functions
+local functions = allocate()
+sequencers.functions = functions
local removevalue = tables.removevalue
local replacevalue = tables.replacevalue
@@ -66,6 +67,7 @@ function sequencers.new(t) -- was reset
}
if t then
s.arguments = t.arguments
+ s.templates = t.templates
s.returnvalues = t.returnvalues
s.results = t.results
local name = t.name
@@ -253,7 +255,6 @@ local function construct(t)
t.compiled = formatters["%s\nreturn function(%s)\n%s\nend"](variables,arguments,calls)
end
end
--- print(t.compiled)
return t.compiled -- also stored so that we can trace
end
@@ -276,7 +277,6 @@ compile = function(t,compiler,n) -- already referred to in sequencers.new
if compiled == "" then
runner = false
else
--- inspect(compiled)
runner = compiled and load(compiled)() -- we can use loadstripped here
end
t.runner = runner
@@ -313,7 +313,7 @@ return function()
return false, false
end]]
-function sequencers.nodeprocessor(t,nofarguments) -- todo: handle 'kind' in plug into tostring
+local function nodeprocessor(t,nofarguments) -- todo: handle 'kind' in plug into tostring
local list, order, kind, gskip, askip = t.list, t.order, t.kind, t.gskip, t.askip
local nostate = t.nostate
local vars, calls, args, n = { }, { }, nil, 0
@@ -364,3 +364,56 @@ function sequencers.nodeprocessor(t,nofarguments) -- todo: handle 'kind' in plug
-- print(processor)
return processor
end
+
+function sequencers.nodeprocessor(t,nofarguments)
+ local kind = type(nofarguments)
+ if kind == "number" then
+ return nodeprocessor(t,nofarguments)
+ elseif kind ~= "table" then
+ return
+ end
+ --
+ local templates = nofarguments
+ local process = templates.process
+ local step = templates.step
+ --
+ if not process or not step then
+ return ""
+ end
+ --
+ local construct = replacer(process)
+ local newaction = replacer(step)
+ local calls = { }
+ local aliases = { }
+ local n = 0
+ --
+ local list = t.list
+ local order = t.order
+ local kind = t.kind
+ local gskip = t.gskip
+ local askip = t.askip
+ --
+ for i=1,#order do
+ local group = order[i]
+ if not gskip[group] then
+ local actions = list[group]
+ for i=1,#actions do
+ local action = actions[i]
+ if not askip[action] then
+ local localized = localize(action)
+ n = n + 1
+ aliases[n] = formatters["local %s = %s"](localized,action)
+ calls[n] = newaction { action = localized }
+ end
+ end
+ end
+ end
+ if n == 0 then
+ return templates.default or construct { }
+ end
+ local processor = construct {
+ localize = concat(aliases,"\n"),
+ actions = concat(calls,"\n"),
+ }
+ return processor
+end
diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml
index 46e1f7f86..67d229f4e 100644
--- a/tex/context/interface/mkiv/context-en.xml
+++ b/tex/context/interface/mkiv/context-en.xml
@@ -2975,6 +2975,10 @@
<cd:parameter name="after">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="strip">
+ <cd:constant type="yes"/>
+ <cd:constant type="no"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -41508,6 +41512,68 @@
<cd:constant type="grid"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="blank">
+ <cd:constant type="preference"/>
+ <cd:constant type="samepage"/>
+ <cd:constant type="max"/>
+ <cd:constant type="force"/>
+ <cd:constant type="enable"/>
+ <cd:constant type="disable"/>
+ <cd:constant type="nowhite"/>
+ <cd:constant type="packed"/>
+ <cd:constant type="back"/>
+ <cd:constant type="overlay"/>
+ <cd:constant type="always"/>
+ <cd:constant type="weak"/>
+ <cd:constant type="strong"/>
+ <cd:constant type="default"/>
+ <cd:constant type="before"/>
+ <cd:constant type="inbetween"/>
+ <cd:constant type="after"/>
+ <cd:constant type="fixed"/>
+ <cd:constant type="flexible"/>
+ <cd:constant type="none"/>
+ <cd:constant type="small"/>
+ <cd:constant type="medium"/>
+ <cd:constant type="big"/>
+ <cd:constant type="line"/>
+ <cd:constant type="halfline"/>
+ <cd:constant type="quarterline"/>
+ <cd:constant type="formula"/>
+ <cd:constant type="white"/>
+ <cd:constant type="height"/>
+ <cd:constant type="depth"/>
+ <cd:constant type="standard"/>
+ <cd:constant method="factor" prefix="cd:number" type="small"/>
+ <cd:constant method="factor" prefix="cd:number" type="medium"/>
+ <cd:constant method="factor" prefix="cd:number" type="big"/>
+ <cd:constant method="factor" prefix="cd:number" type="line"/>
+ <cd:constant method="factor" prefix="cd:number" type="halfline"/>
+ <cd:constant method="factor" prefix="cd:number" type="quarterline"/>
+ <cd:constant method="factor" prefix="cd:number" type="formula"/>
+ <cd:constant method="factor" prefix="cd:number" type="white"/>
+ <cd:constant method="factor" prefix="cd:number" type="height"/>
+ <cd:constant method="factor" prefix="cd:number" type="depth"/>
+ <cd:constant method="range" prefix="category" type="cd:number"/>
+ <cd:constant method="range" prefix="order" type="cd:number"/>
+ <cd:constant method="range" prefix="penalty" type="cd:number"/>
+ <cd:constant type="cd:dimension"/>
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ <cd:parameter name="headstyle">
+ <cd:constant type="cd:style"/>
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
+ <cd:parameter name="backgroundcolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
+ <cd:parameter name="foregroundcolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
+ <cd:parameter name="foregroundstyle">
+ <cd:constant type="cd:style"/>
+ <cd:constant type="cd:command"/>
+ </cd:parameter>
<cd:parameter name="align">
<cd:constant type="left"/>
<cd:constant type="middle"/>
@@ -44684,6 +44750,7 @@
<cd:constant type="enable"/>
<cd:constant type="disable"/>
<cd:constant type="nowhite"/>
+ <cd:constant type="packed"/>
<cd:constant type="back"/>
<cd:constant type="overlay"/>
<cd:constant type="always"/>
diff --git a/tex/context/interface/mkiv/i-buffer.xml b/tex/context/interface/mkiv/i-buffer.xml
index 2ec89f571..6dda83b64 100644
--- a/tex/context/interface/mkiv/i-buffer.xml
+++ b/tex/context/interface/mkiv/i-buffer.xml
@@ -65,6 +65,10 @@
<cd:parameter name="after">
<cd:constant type="cd:command"/>
</cd:parameter>
+ <cd:parameter name="strip">
+ <cd:constant type="yes"/>
+ <cd:constant type="no"/>
+ </cd:parameter>
</cd:assignments>
</cd:arguments>
</cd:command>
@@ -164,7 +168,7 @@
</cd:arguments>
</cd:command>
- <cd:command name="getbufferdata" level="style" category="buffer" file="buff-ini.mkiv">
+ <cd:command name="getbufferdata" level="style" category="buffer" file="buff-ini.mkiv">
<cd:arguments>
<cd:resolve name="keyword-buffer-optional"/>
</cd:arguments>
@@ -227,4 +231,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/tex/context/interface/mkiv/i-common-value.xml b/tex/context/interface/mkiv/i-common-value.xml
index c362779c4..22db8a1b6 100644
--- a/tex/context/interface/mkiv/i-common-value.xml
+++ b/tex/context/interface/mkiv/i-common-value.xml
@@ -683,4 +683,55 @@
<cd:constant type="cd:name"/>
</cd:define>
+ <!-- blank -->
+
+ <cd:define name="value-blank">
+ <cd:constant type="preference"/>
+ <cd:constant type="samepage"/>
+ <cd:constant type="max"/>
+ <cd:constant type="force"/>
+ <cd:constant type="enable"/>
+ <cd:constant type="disable"/>
+ <cd:constant type="nowhite"/>
+ <cd:constant type="packed"/>
+ <cd:constant type="back"/>
+ <cd:constant type="overlay"/>
+ <cd:constant type="always"/>
+ <cd:constant type="weak"/>
+ <cd:constant type="strong"/>
+ <cd:constant type="default"/>
+ <cd:constant type="before"/>
+ <cd:constant type="inbetween"/>
+ <cd:constant type="after"/>
+ <cd:constant type="fixed"/>
+ <cd:constant type="flexible"/>
+ <cd:constant type="none"/>
+ <cd:constant type="small"/>
+ <cd:constant type="medium"/>
+ <cd:constant type="big"/>
+ <cd:constant type="line"/>
+ <cd:constant type="halfline"/>
+ <cd:constant type="quarterline"/>
+ <cd:constant type="formula"/>
+ <cd:constant type="white"/>
+ <cd:constant type="height"/>
+ <cd:constant type="depth"/>
+ <cd:constant type="standard"/>
+ <cd:constant type="small" prefix="cd:number" method="factor"/>
+ <cd:constant type="medium" prefix="cd:number" method="factor"/>
+ <cd:constant type="big" prefix="cd:number" method="factor"/>
+ <cd:constant type="line" prefix="cd:number" method="factor"/>
+ <cd:constant type="halfline" prefix="cd:number" method="factor"/>
+ <cd:constant type="quarterline" prefix="cd:number" method="factor"/>
+ <cd:constant type="formula" prefix="cd:number" method="factor"/>
+ <cd:constant type="white" prefix="cd:number" method="factor"/>
+ <cd:constant type="height" prefix="cd:number" method="factor"/>
+ <cd:constant type="depth" prefix="cd:number" method="factor"/>
+ <cd:constant type="cd:number" prefix="category" method="range"/>
+ <cd:constant type="cd:number" prefix="order" method="range"/>
+ <cd:constant type="cd:number" prefix="penalty" method="range"/>
+ <cd:constant type="cd:dimension"/>
+ <cd:constant type="cd:name"/>
+ </cd:define>
+
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 3e39f95c8..30f792944 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-framed.xml b/tex/context/interface/mkiv/i-framed.xml
index a4667dd2e..e026465a1 100644
--- a/tex/context/interface/mkiv/i-framed.xml
+++ b/tex/context/interface/mkiv/i-framed.xml
@@ -627,4 +627,4 @@
</cd:arguments>
</cd:command>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 5cf37dc48..d0e8abe4a 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-tabulation.xml b/tex/context/interface/mkiv/i-tabulation.xml
index 3efc34f42..8dc0f1d2c 100644
--- a/tex/context/interface/mkiv/i-tabulation.xml
+++ b/tex/context/interface/mkiv/i-tabulation.xml
@@ -38,6 +38,21 @@
<cd:constant type="grid"/>
<cd:constant type="cd:dimension"/>
</cd:parameter>
+ <cd:parameter name="blank">
+ <cd:resolve name="value-blank"/>
+ </cd:parameter>
+ <cd:parameter name="headstyle">
+ <cd:resolve name="value-style"/>
+ </cd:parameter>
+ <cd:parameter name="backgroundcolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
+ <cd:parameter name="foregroundcolor">
+ <cd:constant type="cd:color"/>
+ </cd:parameter>
+ <cd:parameter name="foregroundstyle">
+ <cd:resolve name="value-style"/>
+ </cd:parameter>
<cd:parameter name="align">
<cd:constant type="left"/>
<cd:constant type="middle"/>
@@ -276,4 +291,4 @@
-->
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/tex/context/interface/mkiv/i-vspace.xml b/tex/context/interface/mkiv/i-vspace.xml
index ce6d5ac08..249ed10ab 100644
--- a/tex/context/interface/mkiv/i-vspace.xml
+++ b/tex/context/interface/mkiv/i-vspace.xml
@@ -24,52 +24,7 @@
<cd:command name="vspacing" level="system" category="whitespace" file="spac-ver.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
- <cd:constant type="preference"/>
- <cd:constant type="samepage"/>
- <cd:constant type="max"/>
- <cd:constant type="force"/>
- <cd:constant type="enable"/>
- <cd:constant type="disable"/>
- <cd:constant type="nowhite"/>
- <cd:constant type="packed"/>
- <cd:constant type="back"/>
- <cd:constant type="overlay"/>
- <cd:constant type="always"/>
- <cd:constant type="weak"/>
- <cd:constant type="strong"/>
- <cd:constant type="default"/>
- <cd:constant type="before"/>
- <cd:constant type="inbetween"/>
- <cd:constant type="after"/>
- <cd:constant type="fixed"/>
- <cd:constant type="flexible"/>
- <cd:constant type="none"/>
- <cd:constant type="small"/>
- <cd:constant type="medium"/>
- <cd:constant type="big"/>
- <cd:constant type="line"/>
- <cd:constant type="halfline"/>
- <cd:constant type="quarterline"/>
- <cd:constant type="formula"/>
- <cd:constant type="white"/>
- <cd:constant type="height"/>
- <cd:constant type="depth"/>
- <cd:constant type="standard"/>
- <cd:constant type="small" prefix="cd:number" method="factor"/>
- <cd:constant type="medium" prefix="cd:number" method="factor"/>
- <cd:constant type="big" prefix="cd:number" method="factor"/>
- <cd:constant type="line" prefix="cd:number" method="factor"/>
- <cd:constant type="halfline" prefix="cd:number" method="factor"/>
- <cd:constant type="quarterline" prefix="cd:number" method="factor"/>
- <cd:constant type="formula" prefix="cd:number" method="factor"/>
- <cd:constant type="white" prefix="cd:number" method="factor"/>
- <cd:constant type="height" prefix="cd:number" method="factor"/>
- <cd:constant type="depth" prefix="cd:number" method="factor"/>
- <cd:constant type="cd:number" prefix="category" method="range"/>
- <cd:constant type="cd:number" prefix="order" method="range"/>
- <cd:constant type="cd:number" prefix="penalty" method="range"/>
- <cd:constant type="cd:dimension"/>
- <cd:constant type="cd:name"/>
+ <cd:resolve name="value-blank"/>
</cd:keywords>
</cd:arguments>
</cd:command>
@@ -121,51 +76,7 @@
<cd:command name="blank" level="document" category="whitespace" file="spac-ver.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
- <cd:constant type="preference"/>
- <cd:constant type="samepage"/>
- <cd:constant type="max"/>
- <cd:constant type="force"/>
- <cd:constant type="enable"/>
- <cd:constant type="disable"/>
- <cd:constant type="nowhite"/>
- <cd:constant type="back"/>
- <cd:constant type="overlay"/>
- <cd:constant type="always"/>
- <cd:constant type="weak"/>
- <cd:constant type="strong"/>
- <cd:constant type="default"/>
- <cd:constant type="before"/>
- <cd:constant type="inbetween"/>
- <cd:constant type="after"/>
- <cd:constant type="fixed"/>
- <cd:constant type="flexible"/>
- <cd:constant type="none"/>
- <cd:constant type="small"/>
- <cd:constant type="medium"/>
- <cd:constant type="big"/>
- <cd:constant type="line"/>
- <cd:constant type="halfline"/>
- <cd:constant type="quarterline"/>
- <cd:constant type="formula"/>
- <cd:constant type="white"/>
- <cd:constant type="height"/>
- <cd:constant type="depth"/>
- <cd:constant type="standard"/>
- <cd:constant type="small" prefix="cd:number" method="factor"/>
- <cd:constant type="medium" prefix="cd:number" method="factor"/>
- <cd:constant type="big" prefix="cd:number" method="factor"/>
- <cd:constant type="line" prefix="cd:number" method="factor"/>
- <cd:constant type="halfline" prefix="cd:number" method="factor"/>
- <cd:constant type="quarterline" prefix="cd:number" method="factor"/>
- <cd:constant type="formula" prefix="cd:number" method="factor"/>
- <cd:constant type="white" prefix="cd:number" method="factor"/>
- <cd:constant type="height" prefix="cd:number" method="factor"/>
- <cd:constant type="depth" prefix="cd:number" method="factor"/>
- <cd:constant type="cd:number" prefix="category" method="range"/>
- <cd:constant type="cd:number" prefix="order" method="range"/>
- <cd:constant type="cd:number" prefix="penalty" method="range"/>
- <cd:constant type="cd:dimension"/>
- <cd:constant type="cd:name"/>
+ <cd:resolve name="value-blank"/>
</cd:keywords>
</cd:arguments>
</cd:command>
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 519590bf8..f2cbe59d8 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/16/18 12:05:06
+-- merge date : 04/19/18 15:53:45
do -- begin closure to overcome local limits and interference
@@ -11298,6 +11298,29 @@ local readoffset=readushort
function streamreader.readtag(f)
return lower(stripstring(readstring(f,4)))
end
+directives.register("fonts.streamreader",function()
+ streamreader=utilities.streams
+ openfile=streamreader.open
+ closefile=streamreader.close
+ setposition=streamreader.setposition
+ skipshort=streamreader.skipshort
+ readbytes=streamreader.readbytes
+ readstring=streamreader.readstring
+ readbyte=streamreader.readcardinal1
+ readushort=streamreader.readcardinal2
+ readuint=streamreader.readcardinal3
+ readulong=streamreader.readcardinal4
+ readshort=streamreader.readinteger2
+ readlong=streamreader.readinteger4
+ readfixed=streamreader.readfixed4
+ read2dot14=streamreader.read2dot14
+ readfword=readshort
+ readufword=readushort
+ readoffset=readushort
+ function streamreader.readtag(f)
+ return lower(stripstring(readstring(f,4)))
+ end
+end)
local function readlongdatetime(f)
local a,b,c,d,e,f,g,h=readbytes(f,8)
return 0x100000000*d+0x1000000*e+0x10000*f+0x100*g+h
@@ -13038,6 +13061,17 @@ local readulong=streamreader.readcardinal4
local setposition=streamreader.setposition
local getposition=streamreader.getposition
local readbytetable=streamreader.readbytetable
+directives.register("fonts.streamreader",function()
+ streamreader=utilities.streams
+ readstring=streamreader.readstring
+ readbyte=streamreader.readcardinal1
+ readushort=streamreader.readcardinal2
+ readuint=streamreader.readcardinal3
+ readulong=streamreader.readcardinal4
+ setposition=streamreader.setposition
+ getposition=streamreader.getposition
+ readbytetable=streamreader.readbytetable
+end)
local setmetatableindex=table.setmetatableindex
local trace_charstrings=false trackers.register("fonts.cff.charstrings",function(v) trace_charstrings=v end)
local report=logs.reporter("otf reader","cff")
@@ -14893,6 +14927,19 @@ local readchar=streamreader.readinteger1
local readshort=streamreader.readinteger2
local read2dot14=streamreader.read2dot14
local readinteger=streamreader.readinteger1
+directives.register("fonts.streamreader",function()
+ streamreader=utilities.streams
+ setposition=streamreader.setposition
+ getposition=streamreader.getposition
+ skipbytes=streamreader.skip
+ readbyte=streamreader.readcardinal1
+ readushort=streamreader.readcardinal2
+ readulong=streamreader.readcardinal4
+ readchar=streamreader.readinteger1
+ readshort=streamreader.readinteger2
+ read2dot14=streamreader.read2dot14
+ readinteger=streamreader.readinteger1
+end)
local helpers=readers.helpers
local gotodatatable=helpers.gotodatatable
local function mergecomposites(glyphs,shapes)
@@ -15988,6 +16035,25 @@ local skipbytes=streamreader.skip
local readfword=readshort
local readbytetable=streamreader.readbytetable
local readbyte=streamreader.readbyte
+directives.register("fonts.streamreader",function()
+ streamreader=utilities.streams
+ setposition=streamreader.setposition
+ getposition=streamreader.getposition
+ readushort=streamreader.readcardinal2
+ readulong=streamreader.readcardinal4
+ readinteger=streamreader.readinteger1
+ readshort=streamreader.readinteger2
+ readstring=streamreader.readstring
+ readtag=streamreader.readtag
+ readbytes=streamreader.readbytes
+ readfixed=streamreader.readfixed4
+ read2dot14=streamreader.read2dot14
+ skipshort=streamreader.skipshort
+ skipbytes=streamreader.skip
+ readfword=readshort
+ readbytetable=streamreader.readbytetable
+ readbyte=streamreader.readbyte
+end)
local gsubhandlers={}
local gposhandlers={}
readers.gsubhandlers=gsubhandlers
@@ -28088,8 +28154,6 @@ if not indicgroups and characters then
indicclasses=nil
indicorders=nil
characters.indicgroups=indicgroups
-else
- indicgroups=table.setmetatableindex("table")
end
local consonant=indicgroups.consonant
local independent_vowel=indicgroups.independent_vowel
@@ -28192,19 +28256,13 @@ local sequence_remove_joiners={
}
}
local basic_shaping_forms={
- init=true,
- abvs=true,
akhn=true,
blwf=true,
- calt=true,
cjct=true,
half=true,
- haln=true,
nukt=true,
pref=true,
- pres=true,
pstf=true,
- psts=true,
rkrf=true,
rphf=true,
vatu=true,
@@ -28345,9 +28403,7 @@ local function initializedevanagi(tfmdata)
end
end
end
-if reph then
- seqsubset[#seqsubset+1]={ kind,coverage,reph }
-end
+ seqsubset[#seqsubset+1]={ kind,coverage,reph }
end
end
end
@@ -28412,6 +28468,17 @@ registerotffeature {
node=initializedevanagi,
},
}
+local show_syntax_errors=false
+local function inject_syntax_error(head,current,char)
+ local signal=copy_node(current)
+ copyinjection(signal,current)
+ if pre_mark[char] then
+ setchar(signal,dotted_circle)
+ else
+ setchar(current,dotted_circle)
+ end
+ return insert_node_after(head,current,signal)
+end
local function initialize_one(font,attr)
local tfmdata=fontdata[font]
local datasets=otf.dataset(tfmdata,font,attr)
@@ -28494,10 +28561,9 @@ local function reorder_one(head,start,stop,font,attr,nbspaces)
setprop(tempcurrent,a_state,unsetvalue)
if getchar(next)==getchar(tempcurrent) then
flush_list(tempcurrent)
- local n=copy_node(current)
- copyinjection(n,current)
- setchar(current,dotted_circle)
- head=insert_node_after(head,current,n)
+ if show_syntax_errors then
+ head,current=inject_syntax_error(head,current,char)
+ end
else
setchar(current,getchar(tempcurrent))
local freenode=getnext(current)
@@ -28834,7 +28900,7 @@ function handlers.devanagari_reorder_reph(head,start)
while current do
local char=ischar(current,startfont)
if char and getprop(current,a_syllabe)==startattr then
- if not c and mark_above_below_post[char] and after_subscript[char] then
+ if not c and mark_above_below_post[char] and not after_subscript[char] then
c=current
end
current=getnext(current)
@@ -29124,10 +29190,9 @@ local function reorder_two(head,start,stop,font,attr,nbspaces)
setprop(current,a_state,unsetvalue)
if halant[getchar(current)] then
setnext(getnext(current),tmp)
- local nc=copy_node(current)
- copyinjection(nc,current)
- setchar(current,dotted_circle)
- head=insert_node_after(head,current,nc)
+ if show_syntax_errors then
+ head,current=inject_syntax_error(head,current,char)
+ end
else
setnext(current,tmp)
if changestop then
@@ -29591,17 +29656,6 @@ local function analyze_next_chars_two(c,font)
return c
end
end
-local show_syntax_errors=false
-local function inject_syntax_error(head,current,char)
- local signal=copy_node(current)
- copyinjection(signal,current)
- if pre_mark[char] then
- setchar(signal,dotted_circle)
- else
- setchar(current,dotted_circle)
- end
- return insert_node_after(head,current,signal)
-end
local function method_one(head,font,attr)
head=tonut(head)
local current=head