diff options
59 files changed, 4377 insertions, 519 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 6b17f9b22..ea88e98de 100644 --- a/context/data/scite/context/lexers/data/scite-context-data-context.lua +++ b/context/data/scite/context/lexers/data/scite-context-data-context.lua @@ -1,4 +1,4 @@ return { - ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "frozenhsizecode", "frozenskipcode", "frozenhangcode", "frozenindentcode", "frozenparfillcode", "frozenadjustcode", "frozenprotrudecode", "frozentolerancecode", "frozenstretchcode", "frozenloosenesscode", "frozenlastlinecode", "frozenlinepenaltycode", "frozenclubpenaltycode", "frozenwidowpenaltycode", "frozendisplaypenaltycode", "frozenbrokenpenaltycode", "frozendemeritscode", "frozenshapecode", "frozenlinecode", "frozenallcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "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", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationmodecode", "automatichyphenationmodecode", "explicithyphenationmodecode", "syllablehyphenationmodecode", "uppercasehyphenationmodecode", "completehyphenationmodecode", "compoundhyphenationmodecode", "strictstarthyphenationmodecode", "strictendhyphenationmodecode", "automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode", "permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode", "normalizelinemodecode", "indentskipmodecode", "swaphangindentmodecode", "swapparskipmodecode", "breakafterdirmodecode", "noligaturingcode", "nokerningcode", "noleftligaturecode", "noleftkerncode", "norightligaturecode", "norightkerncode", "noexpansioncode", "noprotrusioncode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "continuewhenlmtxmode" }, - ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "nofarguments", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "vpenalty", "hpenalty", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "thebox", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "usedbaselineskip", "usedlineskip", "usedlineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextcharcs", "doifnextcharcselse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doifelseassignmentcs", "doifassignmentelsecs", "validassignment", "novalidassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "quitcondition", "truecondition", "falsecondition", "tracingall", "tracingnone", "loggingall", "showluatokens", "aliasmacro", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeytabs", "obeypages", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "naturalspace", "controlspace", "normalspaces", "ignoretabs", "ignorelines", "ignorepages", "ignoreeofs", "setcontrolspaces", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "directmeasure", "setquantity", "setequantity", "setgquantity", "setxquantity", "definequantity", "freezequantity", "quantity", "quantitied", "directquantity", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "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", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "doloopovermatch", "doloopovermatched", "doloopoverlist", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "setconditional", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "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", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", "uncramped", "cramped", "mathstyletrigger", "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", "ctxluamatch", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "freezeparagraphproperties", "defrostparagraphproperties", "setparagraphfreezing", "forgetparagraphfreezing", "updateparagraphproperties", "updateparagraphpenalties", "updateparagraphdemerits", "updateparagraphshapes", "updateparagraphlines", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "Umathtopaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "compounddiscretionary", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs", "openout", "closeout", "write", "openin", "closein", "read", "readline", "readfromterminal", "boxlines", "boxline", "setboxline", "copyboxline", "boxlinewd", "boxlineht", "boxlinedp", "boxlinenw", "boxlinenh", "boxlinend", "boxlinels", "boxliners", "boxlinelh", "boxlinerh", "boxlinelp", "boxlinerp", "boxlinein", "boxrangewd", "boxrangeht", "boxrangedp", "bitwiseset", "bitwiseand", "bitwiseor", "bitwisexor", "bitwisenot", "bitwisenil", "ifbitwiseand", "bitwise", "bitwiseshift", "bitwiseflip", "textdir", "linedir", "pardir", "boxdir", "prelistbox", "postlistbox", "prelistcopy", "postlistcopy", "setprelistbox", "setpostlistbox", "noligaturing", "nokerning", "noexpansion", "noprotrusion", "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", "pushoverloadmode", "popoverloadmode" }, + ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", "frozenhsizecode", "frozenskipcode", "frozenhangcode", "frozenindentcode", "frozenparfillcode", "frozenadjustcode", "frozenprotrudecode", "frozentolerancecode", "frozenstretchcode", "frozenloosenesscode", "frozenlastlinecode", "frozenlinepenaltycode", "frozenclubpenaltycode", "frozenwidowpenaltycode", "frozendisplaypenaltycode", "frozenbrokenpenaltycode", "frozendemeritscode", "frozenshapecode", "frozenlinecode", "frozenallcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "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", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationmodecode", "automatichyphenationmodecode", "explicithyphenationmodecode", "syllablehyphenationmodecode", "uppercasehyphenationmodecode", "completehyphenationmodecode", "compoundhyphenationmodecode", "strictstarthyphenationmodecode", "strictendhyphenationmodecode", "automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode", "permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode", "normalizelinemodecode", "indentskipmodecode", "swaphangindentmodecode", "swapparskipmodecode", "breakafterdirmodecode", "noligaturingcode", "nokerningcode", "noleftligaturecode", "noleftkerncode", "norightligaturecode", "norightkerncode", "noexpansioncode", "noprotrusioncode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "continuewhenlmtxmode" }, + ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "nofarguments", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "vpenalty", "hpenalty", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "thebox", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "scratchmacro", "scratchmacroone", "scratchmacrotwo", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "usedbaselineskip", "usedlineskip", "usedlineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextcharcs", "doifnextcharcselse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doifelseassignmentcs", "doifassignmentelsecs", "validassignment", "novalidassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "quitcondition", "truecondition", "falsecondition", "tracingall", "tracingnone", "loggingall", "showluatokens", "aliasmacro", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeytabs", "obeypages", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "naturalspace", "controlspace", "normalspaces", "ignoretabs", "ignorelines", "ignorepages", "ignoreeofs", "setcontrolspaces", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "directmeasure", "setquantity", "setequantity", "setgquantity", "setxquantity", "definequantity", "freezequantity", "quantity", "quantitied", "directquantity", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "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", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "doloopovermatch", "doloopovermatched", "doloopoverlist", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "setconditional", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "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", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", "uncramped", "cramped", "mathstyletrigger", "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", "ctxluamatch", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "freezeparagraphproperties", "defrostparagraphproperties", "setparagraphfreezing", "forgetparagraphfreezing", "updateparagraphproperties", "updateparagraphpenalties", "updateparagraphdemerits", "updateparagraphshapes", "updateparagraphlines", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "Umathtopaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "compounddiscretionary", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs", "openout", "closeout", "write", "openin", "closein", "read", "readline", "readfromterminal", "boxlines", "boxline", "setboxline", "copyboxline", "boxlinewd", "boxlineht", "boxlinedp", "boxlinenw", "boxlinenh", "boxlinend", "boxlinels", "boxliners", "boxlinelh", "boxlinerh", "boxlinelp", "boxlinerp", "boxlinein", "boxrangewd", "boxrangeht", "boxrangedp", "bitwiseset", "bitwiseand", "bitwiseor", "bitwisexor", "bitwisenot", "bitwisenil", "ifbitwiseand", "bitwise", "bitwiseshift", "bitwiseflip", "textdir", "linedir", "pardir", "boxdir", "prelistbox", "postlistbox", "prelistcopy", "postlistcopy", "setprelistbox", "setpostlistbox", "noligaturing", "nokerning", "noexpansion", "noprotrusion", "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", "pushoverloadmode", "popoverloadmode" }, }
\ 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 b3b95d491..a47f20d77 100644 --- a/context/data/scite/context/scite-context-data-context.properties +++ b/context/data/scite/context/scite-context-data-context.properties @@ -28,65 +28,66 @@ commentasciicode ampersandasciicode colonasciicode backslashasciicode circumflex underscoreasciicode leftbraceasciicode barasciicode rightbraceasciicode tildeasciicode \ delasciicode leftparentasciicode rightparentasciicode lessthanasciicode morethanasciicode \ doublecommentsignal atsignasciicode exclamationmarkasciicode questionmarkasciicode doublequoteasciicode \ -singlequoteasciicode forwardslashasciicode primeasciicode hyphenasciicode frozenhsizecode \ -frozenskipcode frozenhangcode frozenindentcode frozenparfillcode frozenadjustcode \ -frozenprotrudecode frozentolerancecode frozenstretchcode frozenloosenesscode frozenlastlinecode \ -frozenlinepenaltycode frozenclubpenaltycode frozenwidowpenaltycode frozendisplaypenaltycode frozenbrokenpenaltycode \ -frozendemeritscode frozenshapecode frozenlinecode frozenallcode activemathcharcode \ -activetabtoken activeformfeedtoken activeendoflinetoken batchmodecode nonstopmodecode \ -scrollmodecode errorstopmodecode bottomlevelgroupcode simplegroupcode hboxgroupcode \ -adjustedhboxgroupcode vboxgroupcode vtopgroupcode aligngroupcode noaligngroupcode \ -outputgroupcode mathgroupcode discretionarygroupcode insertgroupcode vadjustgroupcode \ -vcentergroupcode mathabovegroupcode mathchoicegroupcode semisimplegroupcode mathshiftgroupcode \ -mathleftgroupcode localboxgroupcode splitoffgroupcode splitkeepgroupcode preamblegroupcode \ -alignsetgroupcode finrowgroupcode discretionarygroupcode 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 \ -mathaxisheight muquad startmode stopmode startnotmode \ -stopnotmode startmodeset stopmodeset doifmode doifelsemode \ -doifmodeelse doifnotmode startmodeset stopmodeset startallmodes \ -stopallmodes startnotallmodes stopnotallmodes doifallmodes doifelseallmodes \ -doifallmodeselse doifnotallmodes startenvironment stopenvironment environment \ -startcomponent stopcomponent component startproduct stopproduct \ -product startproject stopproject project starttext \ -stoptext startnotext stopnotext startdocument stopdocument \ -documentvariable unexpandeddocumentvariable setupdocument presetdocument doifelsedocumentvariable \ -doifdocumentvariableelse doifdocumentvariable doifnotdocumentvariable startmodule stopmodule \ -usemodule usetexmodule useluamodule setupmodule currentmoduleparameter \ -moduleparameter everystarttext everystoptext startTEXpage stopTEXpage \ -enablemode disablemode preventmode definemode globalenablemode \ -globaldisablemode globalpreventmode pushmode popmode typescriptone \ -typescripttwo typescriptthree mathsizesuffix mathordcode mathopcode \ -mathbincode mathrelcode mathopencode mathclosecode mathpunctcode \ -mathalphacode mathinnercode mathnothingcode mathlimopcode mathnolopcode \ -mathboxcode mathchoicecode mathaccentcode mathradicalcode constantnumber \ -constantnumberargument constantdimen constantdimenargument constantemptyargument continueifinputfile \ -luastringsep !!bs !!es lefttorightmark righttoleftmark \ -lrm rlm bidilre bidirle bidipop \ -bidilro bidirlo breakablethinspace nobreakspace nonbreakablespace \ -narrownobreakspace zerowidthnobreakspace ideographicspace ideographichalffillspace twoperemspace \ -threeperemspace fourperemspace fiveperemspace sixperemspace figurespace \ -punctuationspace hairspace enquad emquad zerowidthspace \ -zerowidthnonjoiner zerowidthjoiner zwnj zwj optionalspace \ -asciispacechar softhyphen Ux eUx Umathaccents \ -parfillleftskip parfillrightskip startlmtxmode stoplmtxmode startmkivmode \ -stopmkivmode wildcardsymbol normalhyphenationmodecode automatichyphenationmodecode explicithyphenationmodecode \ -syllablehyphenationmodecode uppercasehyphenationmodecode completehyphenationmodecode compoundhyphenationmodecode strictstarthyphenationmodecode \ -strictendhyphenationmodecode automaticpenaltyhyphenationmodecode explicitpenaltyhyphenationmodecode permitgluehyphenationmodecode permitallhyphenationmodecode \ -permitmathreplacehyphenationmodecode normalizelinemodecode indentskipmodecode swaphangindentmodecode swapparskipmodecode \ -breakafterdirmodecode noligaturingcode nokerningcode noleftligaturecode noleftkerncode \ -norightligaturecode norightkerncode noexpansioncode noprotrusioncode frozenflagcode \ -tolerantflagcode protectedflagcode primitiveflagcode permanentflagcode noalignedflagcode \ -immutableflagcode mutableflagcode globalflagcode overloadedflagcode immediateflagcode \ -conditionalflagcode valueflagcode instanceflagcode continuewhenlmtxmode +singlequoteasciicode forwardslashasciicode primeasciicode hyphenasciicode percentasciicode \ +leftbracketasciicode rightbracketasciicode frozenhsizecode frozenskipcode frozenhangcode \ +frozenindentcode frozenparfillcode frozenadjustcode frozenprotrudecode frozentolerancecode \ +frozenstretchcode frozenloosenesscode frozenlastlinecode frozenlinepenaltycode frozenclubpenaltycode \ +frozenwidowpenaltycode frozendisplaypenaltycode frozenbrokenpenaltycode frozendemeritscode frozenshapecode \ +frozenlinecode frozenallcode activemathcharcode activetabtoken activeformfeedtoken \ +activeendoflinetoken batchmodecode nonstopmodecode scrollmodecode errorstopmodecode \ +bottomlevelgroupcode simplegroupcode hboxgroupcode adjustedhboxgroupcode vboxgroupcode \ +vtopgroupcode aligngroupcode noaligngroupcode outputgroupcode mathgroupcode \ +discretionarygroupcode insertgroupcode vadjustgroupcode vcentergroupcode mathabovegroupcode \ +mathchoicegroupcode semisimplegroupcode mathshiftgroupcode mathleftgroupcode localboxgroupcode \ +splitoffgroupcode splitkeepgroupcode preamblegroupcode alignsetgroupcode finrowgroupcode \ +discretionarygroupcode 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 mathaxisheight muquad \ +startmode stopmode startnotmode stopnotmode startmodeset \ +stopmodeset doifmode doifelsemode doifmodeelse doifnotmode \ +startmodeset stopmodeset startallmodes stopallmodes startnotallmodes \ +stopnotallmodes doifallmodes doifelseallmodes doifallmodeselse doifnotallmodes \ +startenvironment stopenvironment environment startcomponent stopcomponent \ +component startproduct stopproduct product startproject \ +stopproject project starttext stoptext startnotext \ +stopnotext startdocument stopdocument documentvariable unexpandeddocumentvariable \ +setupdocument presetdocument doifelsedocumentvariable doifdocumentvariableelse doifdocumentvariable \ +doifnotdocumentvariable startmodule stopmodule usemodule usetexmodule \ +useluamodule setupmodule currentmoduleparameter moduleparameter everystarttext \ +everystoptext startTEXpage stopTEXpage enablemode disablemode \ +preventmode definemode globalenablemode globaldisablemode globalpreventmode \ +pushmode popmode typescriptone typescripttwo typescriptthree \ +mathsizesuffix mathordcode mathopcode mathbincode mathrelcode \ +mathopencode mathclosecode mathpunctcode mathalphacode mathinnercode \ +mathnothingcode mathlimopcode mathnolopcode mathboxcode mathchoicecode \ +mathaccentcode mathradicalcode constantnumber constantnumberargument constantdimen \ +constantdimenargument constantemptyargument continueifinputfile luastringsep !!bs \ +!!es lefttorightmark righttoleftmark lrm rlm \ +bidilre bidirle bidipop bidilro bidirlo \ +breakablethinspace nobreakspace nonbreakablespace narrownobreakspace zerowidthnobreakspace \ +ideographicspace ideographichalffillspace twoperemspace threeperemspace fourperemspace \ +fiveperemspace sixperemspace figurespace punctuationspace hairspace \ +enquad emquad zerowidthspace zerowidthnonjoiner zerowidthjoiner \ +zwnj zwj optionalspace asciispacechar softhyphen \ +Ux eUx Umathaccents parfillleftskip parfillrightskip \ +startlmtxmode stoplmtxmode startmkivmode stopmkivmode wildcardsymbol \ +normalhyphenationmodecode automatichyphenationmodecode explicithyphenationmodecode syllablehyphenationmodecode uppercasehyphenationmodecode \ +completehyphenationmodecode compoundhyphenationmodecode strictstarthyphenationmodecode strictendhyphenationmodecode automaticpenaltyhyphenationmodecode \ +explicitpenaltyhyphenationmodecode permitgluehyphenationmodecode permitallhyphenationmodecode permitmathreplacehyphenationmodecode normalizelinemodecode \ +indentskipmodecode swaphangindentmodecode swapparskipmodecode breakafterdirmodecode noligaturingcode \ +nokerningcode noleftligaturecode noleftkerncode norightligaturecode norightkerncode \ +noexpansioncode noprotrusioncode frozenflagcode tolerantflagcode protectedflagcode \ +primitiveflagcode permanentflagcode noalignedflagcode immutableflagcode mutableflagcode \ +globalflagcode overloadedflagcode immediateflagcode conditionalflagcode valueflagcode \ +instanceflagcode continuewhenlmtxmode keywordclass.context.helpers=\ startsetups stopsetups startxmlsetups stopxmlsetups \ @@ -129,151 +130,152 @@ filledhboxc filledhboxm filledhboxy filledhboxk scratchcounter \ globalscratchcounter privatescratchcounter scratchdimen globalscratchdimen privatescratchdimen \ scratchskip globalscratchskip privatescratchskip scratchmuskip globalscratchmuskip \ privatescratchmuskip scratchtoks globalscratchtoks privatescratchtoks scratchbox \ -globalscratchbox privatescratchbox globalscratchcounterone globalscratchcountertwo globalscratchcounterthree \ -groupedcommand groupedcommandcs triggergroupedcommand triggergroupedcommandcs simplegroupedcommand \ -pickupgroupedcommand usedbaselineskip usedlineskip usedlineskiplimit availablehsize \ -localhsize setlocalhsize distributedhsize hsizefraction next \ -nexttoken nextbox dowithnextbox dowithnextboxcs dowithnextboxcontent \ -dowithnextboxcontentcs flushnextbox boxisempty givenwidth givenheight \ -givendepth scangivendimensions scratchwidth scratchheight scratchdepth \ -scratchoffset scratchdistance scratchtotal scratchhsize scratchvsize \ -scratchxoffset scratchyoffset scratchhoffset scratchvoffset scratchxposition \ -scratchyposition scratchtopoffset scratchbottomoffset scratchleftoffset scratchrightoffset \ -scratchcounterone scratchcountertwo scratchcounterthree scratchcounterfour scratchcounterfive \ -scratchcountersix scratchdimenone scratchdimentwo scratchdimenthree scratchdimenfour \ -scratchdimenfive scratchdimensix scratchskipone scratchskiptwo scratchskipthree \ -scratchskipfour scratchskipfive scratchskipsix scratchmuskipone scratchmuskiptwo \ -scratchmuskipthree scratchmuskipfour scratchmuskipfive scratchmuskipsix scratchtoksone \ -scratchtokstwo scratchtoksthree scratchtoksfour scratchtoksfive scratchtokssix \ -scratchboxone scratchboxtwo scratchboxthree scratchboxfour scratchboxfive \ -scratchboxsix scratchnx scratchny scratchmx scratchmy \ -scratchunicode scratchmin scratchmax scratchleftskip scratchrightskip \ -scratchtopskip scratchbottomskip doif doifnot doifelse \ -firstinset doifinset doifnotinset doifelseinset doifinsetelse \ -doifelsenextchar doifnextcharelse doifelsenextcharcs doifnextcharcselse doifelsenextoptional \ -doifnextoptionalelse doifelsenextoptionalcs doifnextoptionalcselse doifelsefastoptionalcheck doiffastoptionalcheckelse \ -doifelsefastoptionalcheckcs doiffastoptionalcheckcselse doifelsenextbgroup doifnextbgroupelse doifelsenextbgroupcs \ -doifnextbgroupcselse doifelsenextparenthesis doifnextparenthesiselse doifelseundefined doifundefinedelse \ -doifelsedefined doifdefinedelse doifundefined doifdefined doifelsevalue \ -doifvalue doifnotvalue doifnothing doifsomething doifelsenothing \ -doifnothingelse doifelsesomething doifsomethingelse doifvaluenothing doifvaluesomething \ -doifelsevaluenothing doifvaluenothingelse doifelsedimension doifdimensionelse doifelsenumber \ -doifnumberelse doifnumber doifnotnumber doifelsecommon doifcommonelse \ -doifcommon doifnotcommon doifinstring doifnotinstring doifelseinstring \ -doifinstringelse doifelseassignment doifassignmentelse docheckassignment doifelseassignmentcs \ -doifassignmentelsecs validassignment novalidassignment doiftext doifelsetext \ -doiftextelse doifnottext quitcondition truecondition falsecondition \ -tracingall tracingnone loggingall showluatokens aliasmacro \ -removetoks appendtoks prependtoks appendtotoks prependtotoks \ -to endgraf endpar reseteverypar finishpar \ -empty null space quad enspace \ -emspace charspace nbsp crlf obeyspaces \ -obeylines obeytabs obeypages obeyedspace obeyedline \ -obeyedtab obeyedpage normalspace naturalspace controlspace \ -normalspaces ignoretabs ignorelines ignorepages ignoreeofs \ -setcontrolspaces executeifdefined singleexpandafter doubleexpandafter tripleexpandafter \ -dontleavehmode removelastspace removeunwantedspaces keepunwantedspaces removepunctuation \ -ignoreparskip forcestrutdepth onlynonbreakablespace wait writestatus \ -define defineexpandable redefine setmeasure setemeasure \ -setgmeasure setxmeasure definemeasure freezemeasure measure \ -measured directmeasure setquantity setequantity setgquantity \ -setxquantity definequantity freezequantity quantity quantitied \ -directquantity installcorenamespace getvalue getuvalue setvalue \ -setevalue setgvalue setxvalue letvalue letgvalue \ -resetvalue undefinevalue ignorevalue setuvalue setuevalue \ -setugvalue setuxvalue globallet 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 protect unprotect firstofoneargument \ -firstoftwoarguments secondoftwoarguments firstofthreearguments secondofthreearguments thirdofthreearguments \ -firstoffourarguments secondoffourarguments thirdoffourarguments fourthoffourarguments firstoffivearguments \ -secondoffivearguments thirdoffivearguments fourthoffivearguments fifthoffivearguments firstofsixarguments \ -secondofsixarguments thirdofsixarguments fourthofsixarguments fifthofsixarguments sixthofsixarguments \ -firstofoneunexpanded firstoftwounexpanded secondoftwounexpanded firstofthreeunexpanded secondofthreeunexpanded \ -thirdofthreeunexpanded gobbleoneargument gobbletwoarguments gobblethreearguments gobblefourarguments \ -gobblefivearguments gobblesixarguments gobblesevenarguments gobbleeightarguments gobbleninearguments \ -gobbletenarguments gobbleoneoptional gobbletwooptionals gobblethreeoptionals gobblefouroptionals \ -gobblefiveoptionals dorecurse doloop exitloop dostepwiserecurse \ -recurselevel recursedepth dofastloopcs fastloopindex fastloopfinal \ -dowith doloopovermatch doloopovermatched doloopoverlist newconstant \ -setnewconstant setconstant setconstantvalue newconditional settrue \ -setfalse settruevalue setfalsevalue setconditional newmacro \ -setnewmacro newfraction newsignal dosingleempty dodoubleempty \ -dotripleempty doquadrupleempty doquintupleempty dosixtupleempty doseventupleempty \ -dosingleargument dodoubleargument dotripleargument doquadrupleargument doquintupleargument \ -dosixtupleargument doseventupleargument dosinglegroupempty dodoublegroupempty dotriplegroupempty \ -doquadruplegroupempty doquintuplegroupempty permitspacesbetweengroups dontpermitspacesbetweengroups nopdfcompression \ -maximumpdfcompression normalpdfcompression onlypdfobjectcompression nopdfobjectcompression modulonumber \ -dividenumber getfirstcharacter doifelsefirstchar doiffirstcharelse startnointerference \ -stopnointerference twodigits threedigits leftorright offinterlineskip \ -oninterlineskip nointerlineskip strut halfstrut quarterstrut \ -depthstrut halflinestrut noheightstrut setstrut strutbox \ -strutht strutdp strutwd struthtdp strutgap \ -begstrut endstrut lineheight leftboundary rightboundary \ -signalcharacter shiftbox vpackbox hpackbox vpackedbox \ -hpackedbox 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 superprescript subprescript nosuperprescript \ -nosubsprecript uncramped cramped mathstyletrigger 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 ctxluamatch startluaparameterset stopluaparameterset luaparameterset \ -definenamedlua obeylualines obeyluatokens startluacode stopluacode \ -startlua stoplua startctxfunction stopctxfunction ctxfunction \ -startctxfunctiondefinition stopctxfunctiondefinition installctxfunction installprotectedctxfunction installprotectedctxscanner \ -installctxscanner resetctxscanner cldprocessfile cldloadfile cldloadviafile \ -cldcontext cldcommand carryoverpar freezeparagraphproperties defrostparagraphproperties \ -setparagraphfreezing forgetparagraphfreezing updateparagraphproperties updateparagraphpenalties updateparagraphdemerits \ -updateparagraphshapes updateparagraphlines lastlinewidth assumelongusagecs Umathbotaccent \ -Umathtopaccent righttolefthbox lefttorighthbox righttoleftvbox lefttorightvbox \ -righttoleftvtop lefttorightvtop rtlhbox ltrhbox rtlvbox \ -ltrvbox rtlvtop ltrvtop autodirhbox autodirvbox \ -autodirvtop leftorrighthbox leftorrightvbox leftorrightvtop lefttoright \ -righttoleft checkedlefttoright checkedrighttoleft synchronizelayoutdirection synchronizedisplaydirection \ -synchronizeinlinedirection dirlre dirrle dirlro dirrlo \ -lesshyphens morehyphens nohyphens dohyphens compounddiscretionary \ -Ucheckedstartdisplaymath Ucheckedstopdisplaymath break nobreak allowbreak \ -goodbreak nospace nospacing dospacing naturalhbox \ -naturalvbox naturalvtop naturalhpack naturalvpack naturaltpack \ -reversehbox reversevbox reversevtop reversehpack reversevpack \ -reversetpack frule compoundhyphenpenalty start stop \ -unsupportedcs openout closeout write openin \ -closein read readline readfromterminal boxlines \ -boxline setboxline copyboxline boxlinewd boxlineht \ -boxlinedp boxlinenw boxlinenh boxlinend boxlinels \ -boxliners boxlinelh boxlinerh boxlinelp boxlinerp \ -boxlinein boxrangewd boxrangeht boxrangedp bitwiseset \ -bitwiseand bitwiseor bitwisexor bitwisenot bitwisenil \ -ifbitwiseand bitwise bitwiseshift bitwiseflip textdir \ -linedir pardir boxdir prelistbox postlistbox \ -prelistcopy postlistcopy setprelistbox setpostlistbox noligaturing \ -nokerning noexpansion noprotrusion futureletnexttoken defbackslashbreak \ -letbackslashbreak pushoverloadmode popoverloadmode +globalscratchbox privatescratchbox scratchmacro scratchmacroone scratchmacrotwo \ +globalscratchcounterone globalscratchcountertwo globalscratchcounterthree groupedcommand groupedcommandcs \ +triggergroupedcommand triggergroupedcommandcs simplegroupedcommand pickupgroupedcommand usedbaselineskip \ +usedlineskip usedlineskiplimit availablehsize localhsize setlocalhsize \ +distributedhsize hsizefraction next nexttoken nextbox \ +dowithnextbox dowithnextboxcs dowithnextboxcontent dowithnextboxcontentcs flushnextbox \ +boxisempty givenwidth givenheight givendepth scangivendimensions \ +scratchwidth scratchheight scratchdepth scratchoffset scratchdistance \ +scratchtotal scratchhsize scratchvsize scratchxoffset scratchyoffset \ +scratchhoffset scratchvoffset scratchxposition scratchyposition scratchtopoffset \ +scratchbottomoffset scratchleftoffset scratchrightoffset scratchcounterone scratchcountertwo \ +scratchcounterthree scratchcounterfour scratchcounterfive scratchcountersix scratchdimenone \ +scratchdimentwo scratchdimenthree scratchdimenfour scratchdimenfive scratchdimensix \ +scratchskipone scratchskiptwo scratchskipthree scratchskipfour scratchskipfive \ +scratchskipsix scratchmuskipone scratchmuskiptwo scratchmuskipthree scratchmuskipfour \ +scratchmuskipfive scratchmuskipsix scratchtoksone scratchtokstwo scratchtoksthree \ +scratchtoksfour scratchtoksfive scratchtokssix scratchboxone scratchboxtwo \ +scratchboxthree scratchboxfour scratchboxfive scratchboxsix scratchnx \ +scratchny scratchmx scratchmy scratchunicode scratchmin \ +scratchmax scratchleftskip scratchrightskip scratchtopskip scratchbottomskip \ +doif doifnot doifelse firstinset doifinset \ +doifnotinset doifelseinset doifinsetelse doifelsenextchar doifnextcharelse \ +doifelsenextcharcs doifnextcharcselse doifelsenextoptional doifnextoptionalelse doifelsenextoptionalcs \ +doifnextoptionalcselse doifelsefastoptionalcheck doiffastoptionalcheckelse doifelsefastoptionalcheckcs doiffastoptionalcheckcselse \ +doifelsenextbgroup doifnextbgroupelse doifelsenextbgroupcs doifnextbgroupcselse doifelsenextparenthesis \ +doifnextparenthesiselse doifelseundefined doifundefinedelse doifelsedefined doifdefinedelse \ +doifundefined doifdefined doifelsevalue doifvalue doifnotvalue \ +doifnothing doifsomething doifelsenothing doifnothingelse doifelsesomething \ +doifsomethingelse doifvaluenothing doifvaluesomething doifelsevaluenothing doifvaluenothingelse \ +doifelsedimension doifdimensionelse doifelsenumber doifnumberelse doifnumber \ +doifnotnumber doifelsecommon doifcommonelse doifcommon doifnotcommon \ +doifinstring doifnotinstring doifelseinstring doifinstringelse doifelseassignment \ +doifassignmentelse docheckassignment doifelseassignmentcs doifassignmentelsecs validassignment \ +novalidassignment doiftext doifelsetext doiftextelse doifnottext \ +quitcondition truecondition falsecondition tracingall tracingnone \ +loggingall showluatokens aliasmacro removetoks appendtoks \ +prependtoks appendtotoks prependtotoks to endgraf \ +endpar reseteverypar finishpar empty null \ +space quad enspace emspace charspace \ +nbsp crlf obeyspaces obeylines obeytabs \ +obeypages obeyedspace obeyedline obeyedtab obeyedpage \ +normalspace naturalspace controlspace normalspaces ignoretabs \ +ignorelines ignorepages ignoreeofs setcontrolspaces executeifdefined \ +singleexpandafter doubleexpandafter tripleexpandafter dontleavehmode removelastspace \ +removeunwantedspaces keepunwantedspaces removepunctuation ignoreparskip forcestrutdepth \ +onlynonbreakablespace wait writestatus define defineexpandable \ +redefine setmeasure setemeasure setgmeasure setxmeasure \ +definemeasure freezemeasure measure measured directmeasure \ +setquantity setequantity setgquantity setxquantity definequantity \ +freezequantity quantity quantitied directquantity installcorenamespace \ +getvalue getuvalue setvalue setevalue setgvalue \ +setxvalue letvalue letgvalue resetvalue undefinevalue \ +ignorevalue setuvalue setuevalue setugvalue setuxvalue \ +globallet 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 \ +protect unprotect firstofoneargument firstoftwoarguments secondoftwoarguments \ +firstofthreearguments secondofthreearguments thirdofthreearguments firstoffourarguments secondoffourarguments \ +thirdoffourarguments fourthoffourarguments firstoffivearguments secondoffivearguments thirdoffivearguments \ +fourthoffivearguments fifthoffivearguments firstofsixarguments secondofsixarguments thirdofsixarguments \ +fourthofsixarguments fifthofsixarguments sixthofsixarguments firstofoneunexpanded firstoftwounexpanded \ +secondoftwounexpanded firstofthreeunexpanded secondofthreeunexpanded thirdofthreeunexpanded gobbleoneargument \ +gobbletwoarguments gobblethreearguments gobblefourarguments gobblefivearguments gobblesixarguments \ +gobblesevenarguments gobbleeightarguments gobbleninearguments gobbletenarguments gobbleoneoptional \ +gobbletwooptionals gobblethreeoptionals gobblefouroptionals gobblefiveoptionals dorecurse \ +doloop exitloop dostepwiserecurse recurselevel recursedepth \ +dofastloopcs fastloopindex fastloopfinal dowith doloopovermatch \ +doloopovermatched doloopoverlist newconstant setnewconstant setconstant \ +setconstantvalue newconditional settrue setfalse settruevalue \ +setfalsevalue setconditional newmacro setnewmacro newfraction \ +newsignal dosingleempty dodoubleempty dotripleempty doquadrupleempty \ +doquintupleempty dosixtupleempty doseventupleempty dosingleargument dodoubleargument \ +dotripleargument doquadrupleargument doquintupleargument dosixtupleargument doseventupleargument \ +dosinglegroupempty dodoublegroupempty dotriplegroupempty doquadruplegroupempty doquintuplegroupempty \ +permitspacesbetweengroups dontpermitspacesbetweengroups nopdfcompression maximumpdfcompression normalpdfcompression \ +onlypdfobjectcompression nopdfobjectcompression modulonumber dividenumber getfirstcharacter \ +doifelsefirstchar doiffirstcharelse startnointerference stopnointerference twodigits \ +threedigits leftorright offinterlineskip oninterlineskip nointerlineskip \ +strut halfstrut quarterstrut depthstrut halflinestrut \ +noheightstrut setstrut strutbox strutht strutdp \ +strutwd struthtdp strutgap begstrut endstrut \ +lineheight leftboundary rightboundary signalcharacter shiftbox \ +vpackbox hpackbox vpackedbox hpackedbox 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 \ +superprescript subprescript nosuperprescript nosubsprecript uncramped \ +cramped mathstyletrigger 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 ctxluamatch \ +startluaparameterset stopluaparameterset luaparameterset definenamedlua obeylualines \ +obeyluatokens startluacode stopluacode startlua stoplua \ +startctxfunction stopctxfunction ctxfunction startctxfunctiondefinition stopctxfunctiondefinition \ +installctxfunction installprotectedctxfunction installprotectedctxscanner installctxscanner resetctxscanner \ +cldprocessfile cldloadfile cldloadviafile cldcontext cldcommand \ +carryoverpar freezeparagraphproperties defrostparagraphproperties setparagraphfreezing forgetparagraphfreezing \ +updateparagraphproperties updateparagraphpenalties updateparagraphdemerits updateparagraphshapes updateparagraphlines \ +lastlinewidth assumelongusagecs Umathbotaccent Umathtopaccent righttolefthbox \ +lefttorighthbox righttoleftvbox lefttorightvbox righttoleftvtop lefttorightvtop \ +rtlhbox ltrhbox rtlvbox ltrvbox rtlvtop \ +ltrvtop autodirhbox autodirvbox autodirvtop leftorrighthbox \ +leftorrightvbox leftorrightvtop lefttoright righttoleft checkedlefttoright \ +checkedrighttoleft synchronizelayoutdirection synchronizedisplaydirection synchronizeinlinedirection dirlre \ +dirrle dirlro dirrlo lesshyphens morehyphens \ +nohyphens dohyphens compounddiscretionary Ucheckedstartdisplaymath Ucheckedstopdisplaymath \ +break nobreak allowbreak goodbreak nospace \ +nospacing dospacing naturalhbox naturalvbox naturalvtop \ +naturalhpack naturalvpack naturaltpack reversehbox reversevbox \ +reversevtop reversehpack reversevpack reversetpack frule \ +compoundhyphenpenalty start stop unsupportedcs openout \ +closeout write openin closein read \ +readline readfromterminal boxlines boxline setboxline \ +copyboxline boxlinewd boxlineht boxlinedp boxlinenw \ +boxlinenh boxlinend boxlinels boxliners boxlinelh \ +boxlinerh boxlinelp boxlinerp boxlinein boxrangewd \ +boxrangeht boxrangedp bitwiseset bitwiseand bitwiseor \ +bitwisexor bitwisenot bitwisenil ifbitwiseand bitwise \ +bitwiseshift bitwiseflip textdir linedir pardir \ +boxdir prelistbox postlistbox prelistcopy postlistcopy \ +setprelistbox setpostlistbox noligaturing nokerning noexpansion \ +noprotrusion futureletnexttoken defbackslashbreak letbackslashbreak pushoverloadmode \ +popoverloadmode 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 6b17f9b22..ea88e98de 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", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "frozenhsizecode", "frozenskipcode", "frozenhangcode", "frozenindentcode", "frozenparfillcode", "frozenadjustcode", "frozenprotrudecode", "frozentolerancecode", "frozenstretchcode", "frozenloosenesscode", "frozenlastlinecode", "frozenlinepenaltycode", "frozenclubpenaltycode", "frozenwidowpenaltycode", "frozendisplaypenaltycode", "frozenbrokenpenaltycode", "frozendemeritscode", "frozenshapecode", "frozenlinecode", "frozenallcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "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", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationmodecode", "automatichyphenationmodecode", "explicithyphenationmodecode", "syllablehyphenationmodecode", "uppercasehyphenationmodecode", "completehyphenationmodecode", "compoundhyphenationmodecode", "strictstarthyphenationmodecode", "strictendhyphenationmodecode", "automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode", "permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode", "normalizelinemodecode", "indentskipmodecode", "swaphangindentmodecode", "swapparskipmodecode", "breakafterdirmodecode", "noligaturingcode", "nokerningcode", "noleftligaturecode", "noleftkerncode", "norightligaturecode", "norightkerncode", "noexpansioncode", "noprotrusioncode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "continuewhenlmtxmode" }, - ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "nofarguments", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "vpenalty", "hpenalty", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "thebox", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "usedbaselineskip", "usedlineskip", "usedlineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextcharcs", "doifnextcharcselse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doifelseassignmentcs", "doifassignmentelsecs", "validassignment", "novalidassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "quitcondition", "truecondition", "falsecondition", "tracingall", "tracingnone", "loggingall", "showluatokens", "aliasmacro", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeytabs", "obeypages", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "naturalspace", "controlspace", "normalspaces", "ignoretabs", "ignorelines", "ignorepages", "ignoreeofs", "setcontrolspaces", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "directmeasure", "setquantity", "setequantity", "setgquantity", "setxquantity", "definequantity", "freezequantity", "quantity", "quantitied", "directquantity", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "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", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "doloopovermatch", "doloopovermatched", "doloopoverlist", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "setconditional", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "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", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", "uncramped", "cramped", "mathstyletrigger", "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", "ctxluamatch", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "freezeparagraphproperties", "defrostparagraphproperties", "setparagraphfreezing", "forgetparagraphfreezing", "updateparagraphproperties", "updateparagraphpenalties", "updateparagraphdemerits", "updateparagraphshapes", "updateparagraphlines", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "Umathtopaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "compounddiscretionary", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs", "openout", "closeout", "write", "openin", "closein", "read", "readline", "readfromterminal", "boxlines", "boxline", "setboxline", "copyboxline", "boxlinewd", "boxlineht", "boxlinedp", "boxlinenw", "boxlinenh", "boxlinend", "boxlinels", "boxliners", "boxlinelh", "boxlinerh", "boxlinelp", "boxlinerp", "boxlinein", "boxrangewd", "boxrangeht", "boxrangedp", "bitwiseset", "bitwiseand", "bitwiseor", "bitwisexor", "bitwisenot", "bitwisenil", "ifbitwiseand", "bitwise", "bitwiseshift", "bitwiseflip", "textdir", "linedir", "pardir", "boxdir", "prelistbox", "postlistbox", "prelistcopy", "postlistcopy", "setprelistbox", "setpostlistbox", "noligaturing", "nokerning", "noexpansion", "noprotrusion", "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", "pushoverloadmode", "popoverloadmode" }, + ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", "frozenhsizecode", "frozenskipcode", "frozenhangcode", "frozenindentcode", "frozenparfillcode", "frozenadjustcode", "frozenprotrudecode", "frozentolerancecode", "frozenstretchcode", "frozenloosenesscode", "frozenlastlinecode", "frozenlinepenaltycode", "frozenclubpenaltycode", "frozenwidowpenaltycode", "frozendisplaypenaltycode", "frozenbrokenpenaltycode", "frozendemeritscode", "frozenshapecode", "frozenlinecode", "frozenallcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "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", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationmodecode", "automatichyphenationmodecode", "explicithyphenationmodecode", "syllablehyphenationmodecode", "uppercasehyphenationmodecode", "completehyphenationmodecode", "compoundhyphenationmodecode", "strictstarthyphenationmodecode", "strictendhyphenationmodecode", "automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode", "permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode", "normalizelinemodecode", "indentskipmodecode", "swaphangindentmodecode", "swapparskipmodecode", "breakafterdirmodecode", "noligaturingcode", "nokerningcode", "noleftligaturecode", "noleftkerncode", "norightligaturecode", "norightkerncode", "noexpansioncode", "noprotrusioncode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "continuewhenlmtxmode" }, + ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "nofarguments", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "vpenalty", "hpenalty", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "thebox", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "scratchmacro", "scratchmacroone", "scratchmacrotwo", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "usedbaselineskip", "usedlineskip", "usedlineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextcharcs", "doifnextcharcselse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doifelseassignmentcs", "doifassignmentelsecs", "validassignment", "novalidassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "quitcondition", "truecondition", "falsecondition", "tracingall", "tracingnone", "loggingall", "showluatokens", "aliasmacro", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeytabs", "obeypages", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "naturalspace", "controlspace", "normalspaces", "ignoretabs", "ignorelines", "ignorepages", "ignoreeofs", "setcontrolspaces", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "directmeasure", "setquantity", "setequantity", "setgquantity", "setxquantity", "definequantity", "freezequantity", "quantity", "quantitied", "directquantity", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "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", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "doloopovermatch", "doloopovermatched", "doloopoverlist", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "setconditional", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "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", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", "uncramped", "cramped", "mathstyletrigger", "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", "ctxluamatch", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "freezeparagraphproperties", "defrostparagraphproperties", "setparagraphfreezing", "forgetparagraphfreezing", "updateparagraphproperties", "updateparagraphpenalties", "updateparagraphdemerits", "updateparagraphshapes", "updateparagraphlines", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "Umathtopaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "compounddiscretionary", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs", "openout", "closeout", "write", "openin", "closein", "read", "readline", "readfromterminal", "boxlines", "boxline", "setboxline", "copyboxline", "boxlinewd", "boxlineht", "boxlinedp", "boxlinenw", "boxlinenh", "boxlinend", "boxlinels", "boxliners", "boxlinelh", "boxlinerh", "boxlinelp", "boxlinerp", "boxlinein", "boxrangewd", "boxrangeht", "boxrangedp", "bitwiseset", "bitwiseand", "bitwiseor", "bitwisexor", "bitwisenot", "bitwisenil", "ifbitwiseand", "bitwise", "bitwiseshift", "bitwiseflip", "textdir", "linedir", "pardir", "boxdir", "prelistbox", "postlistbox", "prelistcopy", "postlistcopy", "setprelistbox", "setpostlistbox", "noligaturing", "nokerning", "noexpansion", "noprotrusion", "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", "pushoverloadmode", "popoverloadmode" }, }
\ No newline at end of file diff --git a/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json b/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json index 8126818f3..9d46aa698 100644 --- a/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json +++ b/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json @@ -68,7 +68,7 @@ "name" : "context.comment.comment.tex" }, "constant" : { - "match" : "\u005C\u005C(zwnj|zwj|zerowidthspace|zerowidthnonjoiner|zerowidthnobreakspace|zerowidthjoiner|zeroskip|zeropoint|zeromuskip|zerocount|xmlcatcodes|xifcode|xetexengine|wildcardsymbol|whatsitnodecode|vtopgroupcode|vrbcatcodes|voidifcode|voidbox|vmodeifcode|vlistnodecode|vcentergroupcode|vboxifcode|vboxgroupcode|valueflagcode|vadjustgroupcode|usetexmodule|usemodule|useluamodule|uprotationangle|uppercasehyphenationmodecode|unsetnodecode|unknownengine|unexpandeddocumentvariable|underscoreasciicode|undefined|typescripttwo|typescriptthree|typescriptone|txtcatcodes|twoperemspace|trueifcode|tpbcatcodes|tpacatcodes|tolerantflagcode|tildeasciicode|threeperemspace|thousandpoint|texengineversion|texenginename|texenginefunctionality|texengine|texcatcodes|tabasciicode|syllablehyphenationmodecode|swapparskipmodecode|swaphangindentmodecode|superscriptcatcode|subscriptcatcode|strictstarthyphenationmodecode|strictendhyphenationmodecode|stoptext|stopproject|stopproduct|stopnotmode|stopnotext|stopnotallmodes|stopmodule|stopmodeset|stopmodeset|stopmode|stopmkivmode|stoplmtxmode|stopenvironment|stopdocument|stopcomponent|stopallmodes|stopTEXpage|starttext|startproject|startproduct|startnotmode|startnotext|startnotallmodes|startmodule|startmodeset|startmodeset|startmode|startmkivmode|startlmtxmode|startenvironment|startdocument|startcomponent|startallmodes|startTEXpage|splitoffgroupcode|splitkeepgroupcode|spacecatcode|spaceasciicode|softhyphen|smallskipamount|slantperpoint|sixperemspace|singlequoteasciicode|simplegroupcode|setupmodule|setupdocument|semisimplegroupcode|scrollmodecode|scaledpoint|rulenodecode|rlm|righttoleftmark|rightrotationangle|rightparentasciicode|rightbraceasciicode|questionmarkasciicode|pushmode|punctuationspace|prtcatcodes|protectedflagcode|project|product|primitiveflagcode|primeasciicode|preventmode|presetdocument|preamblegroupcode|popmode|points|plustwohundred|plustwo|plustwentythousand|plustwelve|plusthree|plusthousand|plustenthousand|plusten|plussixteen|plussix|plusseven|plusonehundred|plusone|plusnine|plushundred|plusfour|plusfivehundred|plusfive|plusfifty|pluseleven|pluseight|pluscxxviii|pluscxxvii|pluscclvi|pluscclv|permitmathreplacehyphenationmodecode|permitgluehyphenationmodecode|permitallhyphenationmodecode|permanentflagcode|periodasciicode|penaltynodecode|pdftexengine|parfillrightskip|parfillleftskip|parametercatcode|overloadedflagcode|outputnewlinechar|outputgroupcode|othercatcode|optionalspace|onepoint|onemuskip|onebasepoint|oddifcode|numifcode|notcatcodes|normalpagebox|normalizelinemodecode|normalhyphenationmodecode|norightligaturecode|norightkerncode|noprotrusioncode|nonstopmodecode|nonbreakablespace|noligaturingcode|noleftligaturecode|noleftkerncode|nokerningcode|noexpansioncode|nobreakspace|noaligngroupcode|noalignedflagcode|nilcatcodes|newlineasciicode|narrownobreakspace|mutableflagcode|muquad|morethanasciicode|moduleparameter|mmodeifcode|mksuffix|minustwo|minusone|medskipamount|medcard|maxdimen|maxcount|maxcardminusone|maxcard|mathsnodecode|mathsizesuffix|mathshiftgroupcode|mathshiftcatcode|mathrelcode|mathradicalcode|mathpunctcode|mathordcode|mathopencode|mathopcode|mathnothingcode|mathnolopcode|mathnodecode|mathlimopcode|mathleftgroupcode|mathinnercode|mathgroupcode|mathexheight|mathemwidth|mathclosecode|mathchoicegroupcode|mathchoicecode|mathboxcode|mathbincode|mathaxisheight|mathalphacode|mathaccentcode|mathabovegroupcode|marknodecode|luatexengine|luastringsep|luacatcodes|lrm|localboxgroupcode|ligaturenodecode|lettercatcode|lessthanasciicode|lefttorightmark|leftrotationangle|leftparentasciicode|leftbraceasciicode|kernnodecode|invalidcatcode|interwordstretch|interwordspace|interwordshrink|instanceflagcode|insertnodecode|insertgroupcode|innerifcode|inicatcodes|indentskipmodecode|immutableflagcode|immediateflagcode|ignorecatcode|ideographicspace|ideographichalffillspace|hyphenasciicode|hmodeifcode|hlistnodecode|hboxifcode|hboxgroupcode|hashasciicode|halfpoint|halfapoint|hairspace|gluenodecode|globalpreventmode|globalflagcode|globalenablemode|globaldisablemode|frozenwidowpenaltycode|frozentolerancecode|frozenstretchcode|frozenskipcode|frozenshapecode|frozenprotrudecode|frozenparfillcode|frozenloosenesscode|frozenlinepenaltycode|frozenlinecode|frozenlastlinecode|frozenindentcode|frozenhsizecode|frozenhangcode|frozenflagcode|frozendisplaypenaltycode|frozendemeritscode|frozenclubpenaltycode|frozenbrokenpenaltycode|frozenallcode|frozenadjustcode|fourperemspace|forwardslashasciicode|formfeedasciicode|fontslantperpoint|fontinterwordstretch|fontinterwordspace|fontinterwordshrink|fontextraspace|fontexheight|fontemwidth|fontcharifcode|fmtversion|fmtname|fiveperemspace|finrowgroupcode|figurespace|falseifcode|extraspace|explicitpenaltyhyphenationmodecode|explicithyphenationmodecode|exheight|exclamationmarkasciicode|everystoptext|everystarttext|escapecatcode|errorstopmodecode|eofifcode|environment|enquad|endoflinetoken|endoflinecatcode|endoflineasciicode|endoffileasciicode|endline|endgroupcatcode|enablemode|emwidth|emquad|emptyvbox|emptytoks|emptyhbox|emptybox|empty|egroup|eUx|downrotationangle|doublequoteasciicode|doublecommentsignal|dollarasciicode|doifnotmode|doifnotdocumentvariable|doifnotallmodes|doifmodeelse|doifmode|doifelsemode|doifelsedocumentvariable|doifelseallmodes|doifdocumentvariableelse|doifdocumentvariable|doifallmodeselse|doifallmodes|documentvariable|discretionarynodecode|discretionarygroupcode|discretionarygroupcode|disablemode|directionrighttoleft|directionlefttoright|dimifcode|delasciicode|definemode|definedifcode|currentmoduleparameter|ctxcatcodes|ctdcatcodes|csnameifcode|continuewhenlmtxmode|continueifinputfile|contextversion|contextmark|contextlmtxmode|contextformat|constantnumberargument|constantnumber|constantemptyargument|constantdimenargument|constantdimen|conditionaltrue|conditionalflagcode|conditionalfalse|compoundhyphenationmodecode|component|completehyphenationmodecode|commentcatcode|commentasciicode|commaasciicode|colonasciicode|circumflexasciicode|charnodecode|charifcode|catifcode|caseifcode|breakafterdirmodecode|breakablethinspace|bottomlevelgroupcode|bigskipamount|bidirlo|bidirle|bidipop|bidilro|bidilre|bgroup|begingroupcatcode|batchmodecode|barasciicode|backslashasciicode|automaticpenaltyhyphenationmodecode|automatichyphenationmodecode|attributeunsetvalue|atsignasciicode|asciispacechar|ampersandasciicode|alignsetgroupcode|alignmentcatcode|aligngroupcode|adjustnodecode|adjustedhboxgroupcode|activetabtoken|activemathcharcode|activeformfeedtoken|activeendoflinetoken|activecatcode|activecatcode|Ux|Umathaccents|!!es|!!bs)(?=[^a-zA-Z])", + "match" : "\u005C\u005C(zwnj|zwj|zerowidthspace|zerowidthnonjoiner|zerowidthnobreakspace|zerowidthjoiner|zeroskip|zeropoint|zeromuskip|zerocount|xmlcatcodes|xifcode|xetexengine|wildcardsymbol|whatsitnodecode|vtopgroupcode|vrbcatcodes|voidifcode|voidbox|vmodeifcode|vlistnodecode|vcentergroupcode|vboxifcode|vboxgroupcode|valueflagcode|vadjustgroupcode|usetexmodule|usemodule|useluamodule|uprotationangle|uppercasehyphenationmodecode|unsetnodecode|unknownengine|unexpandeddocumentvariable|underscoreasciicode|undefined|typescripttwo|typescriptthree|typescriptone|txtcatcodes|twoperemspace|trueifcode|tpbcatcodes|tpacatcodes|tolerantflagcode|tildeasciicode|threeperemspace|thousandpoint|texengineversion|texenginename|texenginefunctionality|texengine|texcatcodes|tabasciicode|syllablehyphenationmodecode|swapparskipmodecode|swaphangindentmodecode|superscriptcatcode|subscriptcatcode|strictstarthyphenationmodecode|strictendhyphenationmodecode|stoptext|stopproject|stopproduct|stopnotmode|stopnotext|stopnotallmodes|stopmodule|stopmodeset|stopmodeset|stopmode|stopmkivmode|stoplmtxmode|stopenvironment|stopdocument|stopcomponent|stopallmodes|stopTEXpage|starttext|startproject|startproduct|startnotmode|startnotext|startnotallmodes|startmodule|startmodeset|startmodeset|startmode|startmkivmode|startlmtxmode|startenvironment|startdocument|startcomponent|startallmodes|startTEXpage|splitoffgroupcode|splitkeepgroupcode|spacecatcode|spaceasciicode|softhyphen|smallskipamount|slantperpoint|sixperemspace|singlequoteasciicode|simplegroupcode|setupmodule|setupdocument|semisimplegroupcode|scrollmodecode|scaledpoint|rulenodecode|rlm|righttoleftmark|rightrotationangle|rightparentasciicode|rightbracketasciicode|rightbraceasciicode|questionmarkasciicode|pushmode|punctuationspace|prtcatcodes|protectedflagcode|project|product|primitiveflagcode|primeasciicode|preventmode|presetdocument|preamblegroupcode|popmode|points|plustwohundred|plustwo|plustwentythousand|plustwelve|plusthree|plusthousand|plustenthousand|plusten|plussixteen|plussix|plusseven|plusonehundred|plusone|plusnine|plushundred|plusfour|plusfivehundred|plusfive|plusfifty|pluseleven|pluseight|pluscxxviii|pluscxxvii|pluscclvi|pluscclv|permitmathreplacehyphenationmodecode|permitgluehyphenationmodecode|permitallhyphenationmodecode|permanentflagcode|periodasciicode|percentasciicode|penaltynodecode|pdftexengine|parfillrightskip|parfillleftskip|parametercatcode|overloadedflagcode|outputnewlinechar|outputgroupcode|othercatcode|optionalspace|onepoint|onemuskip|onebasepoint|oddifcode|numifcode|notcatcodes|normalpagebox|normalizelinemodecode|normalhyphenationmodecode|norightligaturecode|norightkerncode|noprotrusioncode|nonstopmodecode|nonbreakablespace|noligaturingcode|noleftligaturecode|noleftkerncode|nokerningcode|noexpansioncode|nobreakspace|noaligngroupcode|noalignedflagcode|nilcatcodes|newlineasciicode|narrownobreakspace|mutableflagcode|muquad|morethanasciicode|moduleparameter|mmodeifcode|mksuffix|minustwo|minusone|medskipamount|medcard|maxdimen|maxcount|maxcardminusone|maxcard|mathsnodecode|mathsizesuffix|mathshiftgroupcode|mathshiftcatcode|mathrelcode|mathradicalcode|mathpunctcode|mathordcode|mathopencode|mathopcode|mathnothingcode|mathnolopcode|mathnodecode|mathlimopcode|mathleftgroupcode|mathinnercode|mathgroupcode|mathexheight|mathemwidth|mathclosecode|mathchoicegroupcode|mathchoicecode|mathboxcode|mathbincode|mathaxisheight|mathalphacode|mathaccentcode|mathabovegroupcode|marknodecode|luatexengine|luastringsep|luacatcodes|lrm|localboxgroupcode|ligaturenodecode|lettercatcode|lessthanasciicode|lefttorightmark|leftrotationangle|leftparentasciicode|leftbracketasciicode|leftbraceasciicode|kernnodecode|invalidcatcode|interwordstretch|interwordspace|interwordshrink|instanceflagcode|insertnodecode|insertgroupcode|innerifcode|inicatcodes|indentskipmodecode|immutableflagcode|immediateflagcode|ignorecatcode|ideographicspace|ideographichalffillspace|hyphenasciicode|hmodeifcode|hlistnodecode|hboxifcode|hboxgroupcode|hashasciicode|halfpoint|halfapoint|hairspace|gluenodecode|globalpreventmode|globalflagcode|globalenablemode|globaldisablemode|frozenwidowpenaltycode|frozentolerancecode|frozenstretchcode|frozenskipcode|frozenshapecode|frozenprotrudecode|frozenparfillcode|frozenloosenesscode|frozenlinepenaltycode|frozenlinecode|frozenlastlinecode|frozenindentcode|frozenhsizecode|frozenhangcode|frozenflagcode|frozendisplaypenaltycode|frozendemeritscode|frozenclubpenaltycode|frozenbrokenpenaltycode|frozenallcode|frozenadjustcode|fourperemspace|forwardslashasciicode|formfeedasciicode|fontslantperpoint|fontinterwordstretch|fontinterwordspace|fontinterwordshrink|fontextraspace|fontexheight|fontemwidth|fontcharifcode|fmtversion|fmtname|fiveperemspace|finrowgroupcode|figurespace|falseifcode|extraspace|explicitpenaltyhyphenationmodecode|explicithyphenationmodecode|exheight|exclamationmarkasciicode|everystoptext|everystarttext|escapecatcode|errorstopmodecode|eofifcode|environment|enquad|endoflinetoken|endoflinecatcode|endoflineasciicode|endoffileasciicode|endline|endgroupcatcode|enablemode|emwidth|emquad|emptyvbox|emptytoks|emptyhbox|emptybox|empty|egroup|eUx|downrotationangle|doublequoteasciicode|doublecommentsignal|dollarasciicode|doifnotmode|doifnotdocumentvariable|doifnotallmodes|doifmodeelse|doifmode|doifelsemode|doifelsedocumentvariable|doifelseallmodes|doifdocumentvariableelse|doifdocumentvariable|doifallmodeselse|doifallmodes|documentvariable|discretionarynodecode|discretionarygroupcode|discretionarygroupcode|disablemode|directionrighttoleft|directionlefttoright|dimifcode|delasciicode|definemode|definedifcode|currentmoduleparameter|ctxcatcodes|ctdcatcodes|csnameifcode|continuewhenlmtxmode|continueifinputfile|contextversion|contextmark|contextlmtxmode|contextformat|constantnumberargument|constantnumber|constantemptyargument|constantdimenargument|constantdimen|conditionaltrue|conditionalflagcode|conditionalfalse|compoundhyphenationmodecode|component|completehyphenationmodecode|commentcatcode|commentasciicode|commaasciicode|colonasciicode|circumflexasciicode|charnodecode|charifcode|catifcode|caseifcode|breakafterdirmodecode|breakablethinspace|bottomlevelgroupcode|bigskipamount|bidirlo|bidirle|bidipop|bidilro|bidilre|bgroup|begingroupcatcode|batchmodecode|barasciicode|backslashasciicode|automaticpenaltyhyphenationmodecode|automatichyphenationmodecode|attributeunsetvalue|atsignasciicode|asciispacechar|ampersandasciicode|alignsetgroupcode|alignmentcatcode|aligngroupcode|adjustnodecode|adjustedhboxgroupcode|activetabtoken|activemathcharcode|activeformfeedtoken|activeendoflinetoken|activecatcode|activecatcode|Ux|Umathaccents|!!es|!!bs)(?=[^a-zA-Z])", "name" : "context.constant.commands.constant.tex" }, "csname" : { @@ -88,7 +88,7 @@ "name" : "context.grouping.symbols.groups.tex" }, "helper" : { - "match" : "\u005C\u005C(xmlsetup|writestatus|write|wait|vpenalty|vpackedbox|vpackbox|vkern|vglue|vfillneg|vfilllneg|vfilll|validassignment|uxdef|usedummystyleparameter|usedummystyleandcolor|usedummycolorparameter|usedlineskiplimit|usedlineskip|usedbaselineskip|updateparagraphshapes|updateparagraphproperties|updateparagraphpenalties|updateparagraphlines|updateparagraphdemerits|unvoidbox|unsupportedcs|unprotect|unique|unexpanded|undefinevalue|uncramped|ugdef|uedef|uedcatcodecommand|udef|twodigits|truecondition|tripleexpandafter|triggeruncrampedstyle|triggeruncrampedsmallstyle|triggeruncrampedbigstyle|triggertextstyle|triggersmallstyle|triggerscriptstyle|triggerscriptscriptstyle|triggermathstyle|triggergroupedcommandcs|triggergroupedcommand|triggerdisplaystyle|triggercrampedstyle|triggercrampedsmallstyle|triggercrampedbigstyle|triggerbigstyle|tracingnone|tracingall|to|threedigits|thirdofthreeunexpanded|thirdofthreearguments|thirdofsixarguments|thirdoffourarguments|thirdoffivearguments|thirdargumenttrue|thirdargumentfalse|then|thebox|textdir|texsetup|texdefinition|synchronizelayoutdirection|synchronizeinlinedirection|synchronizedisplaydirection|superscript|superprescript|subscript|subprescript|strutwd|struthtdp|strutht|strutgap|strutdp|strutbox|strut|strippedcsname|stopxmlsetups|stoptexsetups|stoptexdefinition|stoptexcode|stopsetups|stoprawsetups|stoppickupmath|stopnointerference|stopluasetups|stopluaparameterset|stopluacode|stoplua|stoplocalsetups|stopimath|stopforceddisplaymath|stopextendcatcodetable|stopexpanded|stopdmath|stopctxfunctiondefinition|stopctxfunction|stopcontextdefinitioncode|stopcontextcode|stopcatcodetable|stop|startxmlsetups|starttexsetups|starttexdefinition|starttexcode|startsetups|startrawsetups|startpickupmath|startnointerference|startluasetups|startluaparameterset|startluacode|startlua|startlocalsetups|startimath|startforceddisplaymath|startextendcatcodetable|startexpanded|startdmath|startctxfunctiondefinition|startctxfunction|startcontextdefinitioncode|startcontextcode|startcatcodetable|start|space|sixthofsixarguments|sixthargumenttrue|sixthargumentfalse|singleexpandafter|simplegroupedcommand|signalcharacter|showluatokens|shiftbox|seventhargumenttrue|seventhargumentfalse|setxvalue|setxquantity|setxmeasure|setvalue|setuxvalue|setuvalue|setups|setup|setugvalue|setuevalue|settruevalue|settrue|setsystemmode|setstrut|setquantity|setprelistbox|setpostlistbox|setparagraphfreezing|setnewmacro|setnewconstant|setmode|setmeasure|setmathtextbox|setmathsmalltextbox|setlocalhsize|setgvalue|setgquantity|setgmeasure|setfalsevalue|setfalse|setexpandeddummyparameter|setevalue|setequantity|setemeasure|setdummyparameter|setcontrolspaces|setconstantvalue|setconstant|setconditional|setcatcodetable|setboxline|secondoftwounexpanded|secondoftwoarguments|secondofthreeunexpanded|secondofthreearguments|secondofsixarguments|secondoffourarguments|secondoffivearguments|secondargumenttrue|secondargumentfalse|scratchyposition|scratchyoffset|scratchxposition|scratchxoffset|scratchwidth|scratchvsize|scratchvoffset|scratchunicode|scratchtotal|scratchtopskip|scratchtopoffset|scratchtokstwo|scratchtoksthree|scratchtokssix|scratchtoksone|scratchtoksfour|scratchtoksfive|scratchtoks|scratchskiptwo|scratchskipthree|scratchskipsix|scratchskipone|scratchskipfour|scratchskipfive|scratchskip|scratchrightskip|scratchrightoffset|scratchoffset|scratchny|scratchnx|scratchmy|scratchmx|scratchmuskiptwo|scratchmuskipthree|scratchmuskipsix|scratchmuskipone|scratchmuskipfour|scratchmuskipfive|scratchmuskip|scratchmin|scratchmax|scratchleftskip|scratchleftoffset|scratchhsize|scratchhoffset|scratchheight|scratchdistance|scratchdimentwo|scratchdimenthree|scratchdimensix|scratchdimenone|scratchdimenfour|scratchdimenfive|scratchdimen|scratchdepth|scratchcountertwo|scratchcounterthree|scratchcountersix|scratchcounterone|scratchcounterfour|scratchcounterfive|scratchcounter|scratchboxtwo|scratchboxthree|scratchboxsix|scratchboxone|scratchboxfour|scratchboxfive|scratchbox|scratchbottomskip|scratchbottomoffset|scangivendimensions|ruledvtop|ruledvss|ruledvskip|ruledvpack|ruledvglue|ruledvfilneg|ruledvfillneg|ruledvfilll|ruledvfill|ruledvfil|ruledvcenter|ruledvbox|ruledtpack|ruledpenalty|ruledmskip|ruledmkern|ruledmbox|ruledkern|ruledhss|ruledhskip|ruledhpack|ruledhglue|ruledhfilneg|ruledhfillneg|ruledhfilll|ruledhfill|ruledhfil|ruledhbox|rtlvtop|rtlvbox|rtlhbox|righttoleftvtop|righttoleftvbox|righttolefthbox|righttoleft|rightboundary|reversevtop|reversevpack|reversevbox|reversetpack|reversehpack|reversehbox|restorecatcodes|resetvalue|resetsystemmode|resetsetups|resetmode|resetglobal|reseteverypar|resetctxscanner|reqno|removeunwantedspaces|removetoks|removepunctuation|removelastspace|relrelspacing|relpunctspacing|relordspacing|relopspacing|relopenspacing|relinnerspacing|relclosespacing|relbinspacing|registerctxluafile|redoglobal|redefine|recurselevel|recursedepth|readline|readfromterminal|read|quitprevcommalist|quitcondition|quitcommalist|quarterstrut|quantity|quantitied|quad|pushsystemmode|pushoverloadmode|pushmathstyle|pushcatcodetable|punctrelspacing|punctpunctspacing|punctordspacing|punctopspacing|punctopenspacing|punctinnerspacing|punctclosespacing|punctbinspacing|protect|processfirstactioninset|processcommalist|processcommacommand|processallactionsinset|processallactions|processaction|privatescratchtoks|privatescratchskip|privatescratchmuskip|privatescratchdimen|privatescratchcounter|privatescratchbox|prependtotoks|prependtoks|prelistcopy|prelistbox|postlistcopy|postlistbox|popsystemmode|popoverloadmode|popmathstyle|popcatcodetable|pickupgroupedcommand|permitspacesbetweengroups|pardir|ordrelspacing|ordpunctspacing|ordordspacing|ordopspacing|ordopenspacing|ordinnerspacing|ordclosespacing|ordbinspacing|oprelspacing|oppunctspacing|opordspacing|opopspacing|opopenspacing|opinnerspacing|openrelspacing|openpunctspacing|openout|openordspacing|openopspacing|openopenspacing|openinnerspacing|openin|openclosespacing|openbinspacing|opclosespacing|opbinspacing|onlypdfobjectcompression|onlynonbreakablespace|oninterlineskip|offinterlineskip|obeytabs|obeyspaces|obeypages|obeyluatokens|obeylualines|obeylines|obeyedtab|obeyedspace|obeyedpage|obeyedline|null|novalidassignment|nosuperscript|nosuperprescript|nosubsprecript|nosubscript|nospacing|nospace|normalvglue|normalvfillneg|normalvfilllneg|normalsuperscript|normalsubscript|normalstopimath|normalstopdmath|normalstartimath|normalstartdmath|normalspaces|normalspace|normalreqno|normalpdfcompression|normalnosuperscript|normalnosubscript|normalhglue|normalhfillneg|normalhfilllneg|noprotrusion|nopdfobjectcompression|nopdfcompression|noligaturing|nokerning|nointerlineskip|nohyphens|noheightstrut|nofarguments|noexpansion|nobreak|nexttoken|nextbox|next|newwrite|newtoks|newsystemmode|newskip|newsignal|newread|newmuskip|newmode|newmarks|newmacro|newlanguage|newinsert|newif|newhelp|newfraction|newfamily|newfam|newdimen|newcount|newconstant|newconditional|newcatcodetable|newbox|newattribute|nbsp|naturalvtop|naturalvpack|naturalvbox|naturaltpack|naturalspace|naturalhpack|naturalhbox|morehyphens|modulonumber|measured|measure|maximumpdfcompression|mathtext|mathstylevcenteredvbox|mathstylevcenteredhbox|mathstylevcenter|mathstylevbox|mathstyletrigger|mathstylehbox|mathstylefont|mathstyleface|mathstylecommand|mathsmallstylefont|mathsmallstyleface|mathpalette|mathortext|mathnothing|mathnolop|mathlimop|mathbox|mathalpha|luaversion|luasetup|luaparameterset|luaminorversion|luamajorversion|luaexpr|luaexpanded|luaconditional|luacode|ltrvtop|ltrvbox|ltrhbox|loggingall|localhsize|lineheight|linedir|letvalue|letgvalue|letdummyparameter|letcatcodecommand|letbackslashbreak|lesshyphens|lefttorightvtop|lefttorightvbox|lefttorighthbox|lefttoright|leftorrightvtop|leftorrightvbox|leftorrighthbox|leftorright|leftboundary|lateluacode|lastlinewidth|keepunwantedspaces|installprotectedctxscanner|installprotectedctxfunction|installctxscanner|installctxfunction|installcorenamespace|innerrelspacing|innerpunctspacing|innerordspacing|inneropspacing|inneropenspacing|innerinnerspacing|innerclosespacing|innerbinspacing|inlineordisplaymath|indisplaymath|ignorevalue|ignoretabs|ignoreparskip|ignorepages|ignorelines|ignoreeofs|ifbitwiseand|htdp|hsizefraction|hpenalty|hpackedbox|hpackbox|hkern|hglue|hfillneg|hfilllneg|hfilll|halfstrut|halflinestrut|groupedcommandcs|groupedcommand|goodbreak|gobbletwooptionals|gobbletwoarguments|gobblethreeoptionals|gobblethreearguments|gobbletenarguments|gobblesixarguments|gobblesevenarguments|gobbleoneoptional|gobbleoneargument|gobbleninearguments|gobblefouroptionals|gobblefourarguments|gobblefiveoptionals|gobblefivearguments|gobbleeightarguments|globalsetsystemmode|globalsetmode|globalscratchtoks|globalscratchskip|globalscratchmuskip|globalscratchdimen|globalscratchcountertwo|globalscratchcounterthree|globalscratchcounterone|globalscratchcounter|globalscratchbox|globalresetsystemmode|globalresetmode|globallet|glet|givenwidth|givenheight|givendepth|getxparameters|getvalue|getuvalue|getparameters|getgparameters|getfirstcharacter|geteparameters|getdummyparameters|futureletnexttoken|frule|freezequantity|freezeparagraphproperties|freezemeasure|fourthofsixarguments|fourthoffourarguments|fourthoffivearguments|fourthargumenttrue|fourthargumentfalse|foundtrue|foundfalse|forgetparameters|forgetparagraphfreezing|forgetall|forcestrutdepth|forcedisplaymath|flushnextbox|firstoftwounexpanded|firstoftwoarguments|firstofthreeunexpanded|firstofthreearguments|firstofsixarguments|firstofoneunexpanded|firstofoneargument|firstoffourarguments|firstoffivearguments|firstinset|firstargumenttrue|firstargumentfalse|finishpar|filledhboxy|filledhboxr|filledhboxm|filledhboxk|filledhboxg|filledhboxc|filledhboxb|fifthofsixarguments|fifthoffivearguments|fifthargumenttrue|fifthargumentfalse|fastsetup|fastloopindex|fastloopfinal|falsecondition|expelsedoif|expdoifnot|expdoifinsetelse|expdoifelseinset|expdoifelsecommon|expdoifcommonelse|expdoif|expanded|exitloop|executeifdefined|enspace|endstrut|endpar|endgraf|emspace|empty|dummyparameter|dowithnextboxcs|dowithnextboxcontentcs|dowithnextboxcontent|dowithnextbox|dowith|doubleexpandafter|dotriplegroupempty|dotripleempty|dotripleargument|dostepwiserecurse|dospacing|dosixtupleempty|dosixtupleargument|dosinglegroupempty|dosingleempty|dosingleargument|doseventupleempty|doseventupleargument|dorecurse|doquintuplegroupempty|doquintupleempty|doquintupleargument|doquadruplegroupempty|doquadrupleempty|doquadrupleargument|dontpermitspacesbetweengroups|dontleavehmode|dontcomplain|donothing|donetrue|donefalse|doloopovermatched|doloopovermatch|doloopoverlist|doloop|doifvaluesomething|doifvaluenothingelse|doifvaluenothing|doifvalue|doifundefinedelse|doifundefined|doiftextelse|doiftext|doifsomethingelse|doifsomething|doifsetupselse|doifsetups|doifnumberelse|doifnumber|doifnotvalue|doifnottext|doifnotsetups|doifnotnumber|doifnotinstring|doifnotinset|doifnothingelse|doifnothing|doifnotcommon|doifnotcommandhandler|doifnot|doifnextparenthesiselse|doifnextoptionalelse|doifnextoptionalcselse|doifnextcharelse|doifnextcharcselse|doifnextbgroupelse|doifnextbgroupcselse|doifinstringelse|doifinstring|doifinsetelse|doifinset|doiffirstcharelse|doiffastoptionalcheckelse|doiffastoptionalcheckcselse|doifelsevaluenothing|doifelsevalue|doifelseundefined|doifelsetext|doifelsesomething|doifelsesetups|doifelsenumber|doifelsenothing|doifelsenextparenthesis|doifelsenextoptionalcs|doifelsenextoptional|doifelsenextcharcs|doifelsenextchar|doifelsenextbgroupcs|doifelsenextbgroup|doifelseinstring|doifelseinset|doifelsefirstchar|doifelsefastoptionalcheckcs|doifelsefastoptionalcheck|doifelsedimension|doifelsedefined|doifelsecommon|doifelsecommandhandler|doifelseassignmentcs|doifelseassignment|doifelse|doifdimensionelse|doifdefinedelse|doifdefined|doifcommonelse|doifcommon|doifcommandhandlerelse|doifcommandhandler|doifassignmentelsecs|doifassignmentelse|doif|dohyphens|doglobal|dofastloopcs|dodoublegroupempty|dodoubleempty|dodoubleargument|dodoglobal|docheckassignment|dividenumber|distributedhsize|dirrlo|dirrle|dirlro|dirlre|directsetup|directquantity|directmeasure|directluacode|directdummyparameter|depthstrut|defrostparagraphproperties|definequantity|definenamedlua|definemeasure|defineexpandable|define|defcatcodecommand|defbackslashbreak|defaultcatcodetable|currentcatcodetable|ctxwrite|ctxsprint|ctxreport|ctxluamatch|ctxluacode|ctxlua|ctxloadluafile|ctxlatelua|ctxlatecommand|ctxfunction|ctxdirectlua|ctxdirectcommand|ctxcommand|crlf|cramped|copysetups|copyparameters|copyboxline|controlspace|compoundhyphenpenalty|compounddiscretionary|closerelspacing|closepunctspacing|closeout|closeordspacing|closeopspacing|closeopenspacing|closeinnerspacing|closein|closeclosespacing|closebinspacing|cldprocessfile|cldloadviafile|cldloadfile|cldcontext|cldcommand|checkedstrippedcsname|checkedrighttoleft|checkedlefttoright|checked|charspace|catcodetablename|carryoverpar|break|boxrangewd|boxrangeht|boxrangedp|boxlinewd|boxlines|boxliners|boxlinerp|boxlinerh|boxlinenw|boxlinenh|boxlinend|boxlinels|boxlinelp|boxlinelh|boxlinein|boxlineht|boxlinedp|boxline|boxisempty|boxdir|booleanmodevalue|bitwisexor|bitwiseshift|bitwiseset|bitwiseor|bitwisenot|bitwisenil|bitwiseflip|bitwiseand|bitwise|binrelspacing|binpunctspacing|binordspacing|binopspacing|binopenspacing|bininnerspacing|binclosespacing|binbinspacing|begstrut|begcsname|availablehsize|autorule|autodirvtop|autodirvbox|autodirhbox|assumelongusagecs|appendtotoks|appendtoks|allowbreak|aliasmacro|Umathtopaccent|Umathbotaccent|Ucheckedstopdisplaymath|Ucheckedstartdisplaymath)(?=[^a-zA-Z])", + "match" : "\u005C\u005C(xmlsetup|writestatus|write|wait|vpenalty|vpackedbox|vpackbox|vkern|vglue|vfillneg|vfilllneg|vfilll|validassignment|uxdef|usedummystyleparameter|usedummystyleandcolor|usedummycolorparameter|usedlineskiplimit|usedlineskip|usedbaselineskip|updateparagraphshapes|updateparagraphproperties|updateparagraphpenalties|updateparagraphlines|updateparagraphdemerits|unvoidbox|unsupportedcs|unprotect|unique|unexpanded|undefinevalue|uncramped|ugdef|uedef|uedcatcodecommand|udef|twodigits|truecondition|tripleexpandafter|triggeruncrampedstyle|triggeruncrampedsmallstyle|triggeruncrampedbigstyle|triggertextstyle|triggersmallstyle|triggerscriptstyle|triggerscriptscriptstyle|triggermathstyle|triggergroupedcommandcs|triggergroupedcommand|triggerdisplaystyle|triggercrampedstyle|triggercrampedsmallstyle|triggercrampedbigstyle|triggerbigstyle|tracingnone|tracingall|to|threedigits|thirdofthreeunexpanded|thirdofthreearguments|thirdofsixarguments|thirdoffourarguments|thirdoffivearguments|thirdargumenttrue|thirdargumentfalse|then|thebox|textdir|texsetup|texdefinition|synchronizelayoutdirection|synchronizeinlinedirection|synchronizedisplaydirection|superscript|superprescript|subscript|subprescript|strutwd|struthtdp|strutht|strutgap|strutdp|strutbox|strut|strippedcsname|stopxmlsetups|stoptexsetups|stoptexdefinition|stoptexcode|stopsetups|stoprawsetups|stoppickupmath|stopnointerference|stopluasetups|stopluaparameterset|stopluacode|stoplua|stoplocalsetups|stopimath|stopforceddisplaymath|stopextendcatcodetable|stopexpanded|stopdmath|stopctxfunctiondefinition|stopctxfunction|stopcontextdefinitioncode|stopcontextcode|stopcatcodetable|stop|startxmlsetups|starttexsetups|starttexdefinition|starttexcode|startsetups|startrawsetups|startpickupmath|startnointerference|startluasetups|startluaparameterset|startluacode|startlua|startlocalsetups|startimath|startforceddisplaymath|startextendcatcodetable|startexpanded|startdmath|startctxfunctiondefinition|startctxfunction|startcontextdefinitioncode|startcontextcode|startcatcodetable|start|space|sixthofsixarguments|sixthargumenttrue|sixthargumentfalse|singleexpandafter|simplegroupedcommand|signalcharacter|showluatokens|shiftbox|seventhargumenttrue|seventhargumentfalse|setxvalue|setxquantity|setxmeasure|setvalue|setuxvalue|setuvalue|setups|setup|setugvalue|setuevalue|settruevalue|settrue|setsystemmode|setstrut|setquantity|setprelistbox|setpostlistbox|setparagraphfreezing|setnewmacro|setnewconstant|setmode|setmeasure|setmathtextbox|setmathsmalltextbox|setlocalhsize|setgvalue|setgquantity|setgmeasure|setfalsevalue|setfalse|setexpandeddummyparameter|setevalue|setequantity|setemeasure|setdummyparameter|setcontrolspaces|setconstantvalue|setconstant|setconditional|setcatcodetable|setboxline|secondoftwounexpanded|secondoftwoarguments|secondofthreeunexpanded|secondofthreearguments|secondofsixarguments|secondoffourarguments|secondoffivearguments|secondargumenttrue|secondargumentfalse|scratchyposition|scratchyoffset|scratchxposition|scratchxoffset|scratchwidth|scratchvsize|scratchvoffset|scratchunicode|scratchtotal|scratchtopskip|scratchtopoffset|scratchtokstwo|scratchtoksthree|scratchtokssix|scratchtoksone|scratchtoksfour|scratchtoksfive|scratchtoks|scratchskiptwo|scratchskipthree|scratchskipsix|scratchskipone|scratchskipfour|scratchskipfive|scratchskip|scratchrightskip|scratchrightoffset|scratchoffset|scratchny|scratchnx|scratchmy|scratchmx|scratchmuskiptwo|scratchmuskipthree|scratchmuskipsix|scratchmuskipone|scratchmuskipfour|scratchmuskipfive|scratchmuskip|scratchmin|scratchmax|scratchmacrotwo|scratchmacroone|scratchmacro|scratchleftskip|scratchleftoffset|scratchhsize|scratchhoffset|scratchheight|scratchdistance|scratchdimentwo|scratchdimenthree|scratchdimensix|scratchdimenone|scratchdimenfour|scratchdimenfive|scratchdimen|scratchdepth|scratchcountertwo|scratchcounterthree|scratchcountersix|scratchcounterone|scratchcounterfour|scratchcounterfive|scratchcounter|scratchboxtwo|scratchboxthree|scratchboxsix|scratchboxone|scratchboxfour|scratchboxfive|scratchbox|scratchbottomskip|scratchbottomoffset|scangivendimensions|ruledvtop|ruledvss|ruledvskip|ruledvpack|ruledvglue|ruledvfilneg|ruledvfillneg|ruledvfilll|ruledvfill|ruledvfil|ruledvcenter|ruledvbox|ruledtpack|ruledpenalty|ruledmskip|ruledmkern|ruledmbox|ruledkern|ruledhss|ruledhskip|ruledhpack|ruledhglue|ruledhfilneg|ruledhfillneg|ruledhfilll|ruledhfill|ruledhfil|ruledhbox|rtlvtop|rtlvbox|rtlhbox|righttoleftvtop|righttoleftvbox|righttolefthbox|righttoleft|rightboundary|reversevtop|reversevpack|reversevbox|reversetpack|reversehpack|reversehbox|restorecatcodes|resetvalue|resetsystemmode|resetsetups|resetmode|resetglobal|reseteverypar|resetctxscanner|reqno|removeunwantedspaces|removetoks|removepunctuation|removelastspace|relrelspacing|relpunctspacing|relordspacing|relopspacing|relopenspacing|relinnerspacing|relclosespacing|relbinspacing|registerctxluafile|redoglobal|redefine|recurselevel|recursedepth|readline|readfromterminal|read|quitprevcommalist|quitcondition|quitcommalist|quarterstrut|quantity|quantitied|quad|pushsystemmode|pushoverloadmode|pushmathstyle|pushcatcodetable|punctrelspacing|punctpunctspacing|punctordspacing|punctopspacing|punctopenspacing|punctinnerspacing|punctclosespacing|punctbinspacing|protect|processfirstactioninset|processcommalist|processcommacommand|processallactionsinset|processallactions|processaction|privatescratchtoks|privatescratchskip|privatescratchmuskip|privatescratchdimen|privatescratchcounter|privatescratchbox|prependtotoks|prependtoks|prelistcopy|prelistbox|postlistcopy|postlistbox|popsystemmode|popoverloadmode|popmathstyle|popcatcodetable|pickupgroupedcommand|permitspacesbetweengroups|pardir|ordrelspacing|ordpunctspacing|ordordspacing|ordopspacing|ordopenspacing|ordinnerspacing|ordclosespacing|ordbinspacing|oprelspacing|oppunctspacing|opordspacing|opopspacing|opopenspacing|opinnerspacing|openrelspacing|openpunctspacing|openout|openordspacing|openopspacing|openopenspacing|openinnerspacing|openin|openclosespacing|openbinspacing|opclosespacing|opbinspacing|onlypdfobjectcompression|onlynonbreakablespace|oninterlineskip|offinterlineskip|obeytabs|obeyspaces|obeypages|obeyluatokens|obeylualines|obeylines|obeyedtab|obeyedspace|obeyedpage|obeyedline|null|novalidassignment|nosuperscript|nosuperprescript|nosubsprecript|nosubscript|nospacing|nospace|normalvglue|normalvfillneg|normalvfilllneg|normalsuperscript|normalsubscript|normalstopimath|normalstopdmath|normalstartimath|normalstartdmath|normalspaces|normalspace|normalreqno|normalpdfcompression|normalnosuperscript|normalnosubscript|normalhglue|normalhfillneg|normalhfilllneg|noprotrusion|nopdfobjectcompression|nopdfcompression|noligaturing|nokerning|nointerlineskip|nohyphens|noheightstrut|nofarguments|noexpansion|nobreak|nexttoken|nextbox|next|newwrite|newtoks|newsystemmode|newskip|newsignal|newread|newmuskip|newmode|newmarks|newmacro|newlanguage|newinsert|newif|newhelp|newfraction|newfamily|newfam|newdimen|newcount|newconstant|newconditional|newcatcodetable|newbox|newattribute|nbsp|naturalvtop|naturalvpack|naturalvbox|naturaltpack|naturalspace|naturalhpack|naturalhbox|morehyphens|modulonumber|measured|measure|maximumpdfcompression|mathtext|mathstylevcenteredvbox|mathstylevcenteredhbox|mathstylevcenter|mathstylevbox|mathstyletrigger|mathstylehbox|mathstylefont|mathstyleface|mathstylecommand|mathsmallstylefont|mathsmallstyleface|mathpalette|mathortext|mathnothing|mathnolop|mathlimop|mathbox|mathalpha|luaversion|luasetup|luaparameterset|luaminorversion|luamajorversion|luaexpr|luaexpanded|luaconditional|luacode|ltrvtop|ltrvbox|ltrhbox|loggingall|localhsize|lineheight|linedir|letvalue|letgvalue|letdummyparameter|letcatcodecommand|letbackslashbreak|lesshyphens|lefttorightvtop|lefttorightvbox|lefttorighthbox|lefttoright|leftorrightvtop|leftorrightvbox|leftorrighthbox|leftorright|leftboundary|lateluacode|lastlinewidth|keepunwantedspaces|installprotectedctxscanner|installprotectedctxfunction|installctxscanner|installctxfunction|installcorenamespace|innerrelspacing|innerpunctspacing|innerordspacing|inneropspacing|inneropenspacing|innerinnerspacing|innerclosespacing|innerbinspacing|inlineordisplaymath|indisplaymath|ignorevalue|ignoretabs|ignoreparskip|ignorepages|ignorelines|ignoreeofs|ifbitwiseand|htdp|hsizefraction|hpenalty|hpackedbox|hpackbox|hkern|hglue|hfillneg|hfilllneg|hfilll|halfstrut|halflinestrut|groupedcommandcs|groupedcommand|goodbreak|gobbletwooptionals|gobbletwoarguments|gobblethreeoptionals|gobblethreearguments|gobbletenarguments|gobblesixarguments|gobblesevenarguments|gobbleoneoptional|gobbleoneargument|gobbleninearguments|gobblefouroptionals|gobblefourarguments|gobblefiveoptionals|gobblefivearguments|gobbleeightarguments|globalsetsystemmode|globalsetmode|globalscratchtoks|globalscratchskip|globalscratchmuskip|globalscratchdimen|globalscratchcountertwo|globalscratchcounterthree|globalscratchcounterone|globalscratchcounter|globalscratchbox|globalresetsystemmode|globalresetmode|globallet|glet|givenwidth|givenheight|givendepth|getxparameters|getvalue|getuvalue|getparameters|getgparameters|getfirstcharacter|geteparameters|getdummyparameters|futureletnexttoken|frule|freezequantity|freezeparagraphproperties|freezemeasure|fourthofsixarguments|fourthoffourarguments|fourthoffivearguments|fourthargumenttrue|fourthargumentfalse|foundtrue|foundfalse|forgetparameters|forgetparagraphfreezing|forgetall|forcestrutdepth|forcedisplaymath|flushnextbox|firstoftwounexpanded|firstoftwoarguments|firstofthreeunexpanded|firstofthreearguments|firstofsixarguments|firstofoneunexpanded|firstofoneargument|firstoffourarguments|firstoffivearguments|firstinset|firstargumenttrue|firstargumentfalse|finishpar|filledhboxy|filledhboxr|filledhboxm|filledhboxk|filledhboxg|filledhboxc|filledhboxb|fifthofsixarguments|fifthoffivearguments|fifthargumenttrue|fifthargumentfalse|fastsetup|fastloopindex|fastloopfinal|falsecondition|expelsedoif|expdoifnot|expdoifinsetelse|expdoifelseinset|expdoifelsecommon|expdoifcommonelse|expdoif|expanded|exitloop|executeifdefined|enspace|endstrut|endpar|endgraf|emspace|empty|dummyparameter|dowithnextboxcs|dowithnextboxcontentcs|dowithnextboxcontent|dowithnextbox|dowith|doubleexpandafter|dotriplegroupempty|dotripleempty|dotripleargument|dostepwiserecurse|dospacing|dosixtupleempty|dosixtupleargument|dosinglegroupempty|dosingleempty|dosingleargument|doseventupleempty|doseventupleargument|dorecurse|doquintuplegroupempty|doquintupleempty|doquintupleargument|doquadruplegroupempty|doquadrupleempty|doquadrupleargument|dontpermitspacesbetweengroups|dontleavehmode|dontcomplain|donothing|donetrue|donefalse|doloopovermatched|doloopovermatch|doloopoverlist|doloop|doifvaluesomething|doifvaluenothingelse|doifvaluenothing|doifvalue|doifundefinedelse|doifundefined|doiftextelse|doiftext|doifsomethingelse|doifsomething|doifsetupselse|doifsetups|doifnumberelse|doifnumber|doifnotvalue|doifnottext|doifnotsetups|doifnotnumber|doifnotinstring|doifnotinset|doifnothingelse|doifnothing|doifnotcommon|doifnotcommandhandler|doifnot|doifnextparenthesiselse|doifnextoptionalelse|doifnextoptionalcselse|doifnextcharelse|doifnextcharcselse|doifnextbgroupelse|doifnextbgroupcselse|doifinstringelse|doifinstring|doifinsetelse|doifinset|doiffirstcharelse|doiffastoptionalcheckelse|doiffastoptionalcheckcselse|doifelsevaluenothing|doifelsevalue|doifelseundefined|doifelsetext|doifelsesomething|doifelsesetups|doifelsenumber|doifelsenothing|doifelsenextparenthesis|doifelsenextoptionalcs|doifelsenextoptional|doifelsenextcharcs|doifelsenextchar|doifelsenextbgroupcs|doifelsenextbgroup|doifelseinstring|doifelseinset|doifelsefirstchar|doifelsefastoptionalcheckcs|doifelsefastoptionalcheck|doifelsedimension|doifelsedefined|doifelsecommon|doifelsecommandhandler|doifelseassignmentcs|doifelseassignment|doifelse|doifdimensionelse|doifdefinedelse|doifdefined|doifcommonelse|doifcommon|doifcommandhandlerelse|doifcommandhandler|doifassignmentelsecs|doifassignmentelse|doif|dohyphens|doglobal|dofastloopcs|dodoublegroupempty|dodoubleempty|dodoubleargument|dodoglobal|docheckassignment|dividenumber|distributedhsize|dirrlo|dirrle|dirlro|dirlre|directsetup|directquantity|directmeasure|directluacode|directdummyparameter|depthstrut|defrostparagraphproperties|definequantity|definenamedlua|definemeasure|defineexpandable|define|defcatcodecommand|defbackslashbreak|defaultcatcodetable|currentcatcodetable|ctxwrite|ctxsprint|ctxreport|ctxluamatch|ctxluacode|ctxlua|ctxloadluafile|ctxlatelua|ctxlatecommand|ctxfunction|ctxdirectlua|ctxdirectcommand|ctxcommand|crlf|cramped|copysetups|copyparameters|copyboxline|controlspace|compoundhyphenpenalty|compounddiscretionary|closerelspacing|closepunctspacing|closeout|closeordspacing|closeopspacing|closeopenspacing|closeinnerspacing|closein|closeclosespacing|closebinspacing|cldprocessfile|cldloadviafile|cldloadfile|cldcontext|cldcommand|checkedstrippedcsname|checkedrighttoleft|checkedlefttoright|checked|charspace|catcodetablename|carryoverpar|break|boxrangewd|boxrangeht|boxrangedp|boxlinewd|boxlines|boxliners|boxlinerp|boxlinerh|boxlinenw|boxlinenh|boxlinend|boxlinels|boxlinelp|boxlinelh|boxlinein|boxlineht|boxlinedp|boxline|boxisempty|boxdir|booleanmodevalue|bitwisexor|bitwiseshift|bitwiseset|bitwiseor|bitwisenot|bitwisenil|bitwiseflip|bitwiseand|bitwise|binrelspacing|binpunctspacing|binordspacing|binopspacing|binopenspacing|bininnerspacing|binclosespacing|binbinspacing|begstrut|begcsname|availablehsize|autorule|autodirvtop|autodirvbox|autodirhbox|assumelongusagecs|appendtotoks|appendtoks|allowbreak|aliasmacro|Umathtopaccent|Umathbotaccent|Ucheckedstopdisplaymath|Ucheckedstartdisplaymath)(?=[^a-zA-Z])", "name" : "context.plain.commands.plain.tex" }, "ifprimitive" : { diff --git a/doc/context/documents/general/manuals/lowlevel-grouping.pdf b/doc/context/documents/general/manuals/lowlevel-grouping.pdf Binary files differnew file mode 100644 index 000000000..5439f29e5 --- /dev/null +++ b/doc/context/documents/general/manuals/lowlevel-grouping.pdf diff --git a/doc/context/documents/general/manuals/lowlevel-security.pdf b/doc/context/documents/general/manuals/lowlevel-security.pdf Binary files differnew file mode 100644 index 000000000..b92f00ce3 --- /dev/null +++ b/doc/context/documents/general/manuals/lowlevel-security.pdf diff --git a/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex b/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex new file mode 100644 index 000000000..eadcca6a9 --- /dev/null +++ b/doc/context/sources/general/manuals/lowlevel/lowlevel-grouping.tex @@ -0,0 +1,170 @@ +% language=us + +\environment lowlevel-style + +\startdocument + [title=grouping, + color=middlecyan] + +\startsection[title=Introduction] + +This is a rather short explanation. I decided to write it after presenting the +other topics at the 2019 \CONTEXT\ meeting where there was a question about +grouping. + +\stopsection + +\startsection[title=\PASCAL] + +In a language like \PASCAL, the language that \TEX\ has been written in, or +\MODULA, its successor, there is no concept of grouping like in \TEX. But we can +find keywords that suggests this: + +\starttyping +for i := 1 to 10 do begin ... end +\stoptyping + +This language probably inspired some of the syntax of \TEX\ and \METAPOST. For +instance an assignment in \METAPOST\ uses \type {:=} too. However, the \type +{begin} and \type {end} don't really group but define a block of statements. You +can have local variables in a procedure or function but the block is just a way +to pack a sequence of statements. + +\stopsection + +\startsection[title=\TEX] + +In \TEX\ macros (or source code) the following can occur: + +\starttyping +\begingroup + ... +\endgroup +\stoptyping + +as well as: + +\starttyping +\bgroup + ... +\egroup +\stoptyping + +Here we really group in the sense that assignments to variables inside a group +are forgotten afterwards. All assignments are local to the group unless they are +explicitly done global: + +\starttyping +\scratchcounter=1 +\def\foo{foo} +\begingroup + \scratchcounter=2 + \global\globalscratchcounter=2 + \gdef\foo{FOO} +\endgroup +\stoptyping + +Here \type {\scratchcounter} is still one after the group is left but its global +counterpart is now two. The \type {\foo} macro is also changed globally. + +Although you can use both sets of commands to group, you cannot mix them, so this +will trigger an error: + +\starttyping +\bgroup +\endgroup +\stoptyping + +The bottomline is: if you want a value to persist after the group, you need to +explicitly change its value globally. This makes a lot of sense in the perspective +of \TEX. + +\stopsection + +\startsection[title=\METAPOST] + +The \METAPOST\ language also has a concept of grouping but in this case it's more like a +programming language. + +\starttyping +begingroup ; + n := 123 ; +engroup ; +\stoptyping + +In this case the value of \type {n} is 123 after the group is left, unless you do +this (for numerics there is actually no need to declare them): + +\starttyping +begingroup ; + save n ; numeric n ; n := 123 ; +engroup ; +\stoptyping + +Given the use of \METAPOST\ (read: \METAFONT) this makes a lot of sense: often +you use macros to simplify code and you do want variables to change. Grouping in +this language serves other purposes, like hiding what is between these commands +and let the last expression become the result. In a \type {vardef} grouping is +implicit. + +So, in \METAPOST\ all assignments are global, unless a variable is explicitly +saved inside a group. + +\stopsection + +\startsection[title=\LUA] + +In \LUA\ all assignments are global unless a variable is defines local: + +\starttyping +local x = 1 +local y = 1 +for i = 1, 10 do + local x = 2 + y = 2 +end +\stoptyping + +Here the value of \type {x} after the loop is still one but \type {y} is now two. +As in \LUATEX\ we mix \TEX, \METAPOST\ and \LUA\ you can mix up these concepts. +Another mixup is using \type {:=}, \type {endfor}, \type {fi} in \LUA\ after done +some \METAPOST\ coding or using \type {end} instead of \type {endfor} in +\METAPOST\ which can make the library wait for more without triggering an error. +Proper syntax highlighting in an editor clearly helps. + +\stopsection + +\startsection[title=\CCODE] + +The \LUA\ language is a mix between \PASCAL\ (which is one reason why I like it) +and \CCODE. + +\starttyping +int x = 1 ; +int y = 1 ; +for (i=1; i<=10;i++) { + int x = 2 ; + y = 2 ; +} +\stoptyping + +The semicolon is also used in \PASCAL\ but there it is a separator and not a +statement end, while in \METAPOST\ it does end a statement (expression). + +\stopsection + +\stopsection + +\startsubject[title=Colofon] + +\starttabulate +\NC Author \NC Hans Hagen \NC \NR +\NC \CONTEXT \NC \contextversion \NC \NR +\NC \LUAMETATEX \NC \texengineversion \NC \NR +\NC Support \NC www.pragma-ade.com \NC \NR +\NC \NC contextgarden.net \NC \NR +\stoptabulate + +\stopsubject + +\stopdocument diff --git a/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex b/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex new file mode 100644 index 000000000..4bb0c19d8 --- /dev/null +++ b/doc/context/sources/general/manuals/lowlevel/lowlevel-security.tex @@ -0,0 +1,248 @@ +% language=us + +% It took some time to get the right balance of using the overload related features +% but at some point it started feeling right. Of course it will never be as +% perfectly timed and integrated as Gavin Harrison performance on "Threatening War" +% (youtube movie) but that doesn't mean I should not aim for perfection. But as +% with drumming, it takes practising and that is what I did on a subset of sources +% when writing the engine code. + +\usemodule[system-tokens] + +\environment lowlevel-style + +\startdocument + [title=security, + color=middleorange] + +\startsection[title=Preamble] + +Here I will discuss a moderate security subsystem of \LUAMETATEX\ and therefore +\CONTEXT\ \LMTX. This is not about security in the sense of the typesetting +machinery doing harm to your environment, but more about making sure that a user +doesn't change the behavior of the macro package in ways that introduce +interference and thereby unwanted side effect. It's all about protecting macros. + +This is all very experimental and we need to adapt the \CONTEXT\ source code to +this. Actually that will happen a few times because experiments trigger that. It +might take a few years before the security model is finalized and all files are +updated accordingly. There are lots of files and macros involved. In the process +the underlying features in the engine might evolve. + +\stopsection + +\startsection[title=Flags] + +Before we go into the security levels we see what flags can be set. The \TEX\ +language has a couple of so called prefixes that can be used when setting values +and defining macros. Any engine that has traditional \TEX\ with \ETEX\ extensions +can do this: + +\starttyping[option=TEX] + \def\foo{foo} +\global \def\foo{foo} +\global\protected\def\foo{foo} +\stoptyping + +And \LUAMETATEX\ adds another one: + +\starttyping[option=TEX] + \tolerant \def\foo{foo} +\global\tolerant \def\foo{foo} +\global\tolerant\protected\def\foo{foo} +\stoptyping + +What these prefixes do is discussed elsewhere. For now is is enough to know that +the two optional prefixes \type {\protected} and \type {\tolerant} make for four +distinctive cases of macro calls. + +But there are more prefixes: + +\starttabulate +\HL +\NC \type {frozen} \NC a macro that has to be redefined in a managed way \NC \NR +\NC \type {permanent} \NC a macro that had better not be redefined \NC \NR +\NC \type {primitive} \NC a primitive that normally will not be adapted \NC \NR +\NC \type {immutable} \NC a macro or quantity that cannot be changed, it is a constant \NC \NR +\NC \type {mutable} \NC a macro that can be changed no matter how well protected it is \NC \NR +\HL +\NC \type {instance} \NC a macro marked as (for instance) be generated by an interface \NC \NR +\HL +\NC \type {noaligned} \NC the macro becomes acceptable as \type {\noalign} alias \NC \NR +\HL +\NC \type {overloaded} \NC when permitted the flags will be adapted \NC \NR +\NC \type {enforced} \NC all is permitted (but only in zero mode or ini mode) \NC \NR +\NC \type {aliased} \NC the macro gets the same flags as the original \NC \NR +\HL +\stoptabulate + +These prefixed set flags to the command at hand which can be a macro but +basically any control sequence. + +To what extent the engine will complain when a property is changed in a way that +violates the above depends on the parameter \type {\overloadmode}. When this +parameter is set to zero no checking takes place. More interesting are values +larger than zero. If that is the case, when a control sequence is flagged as +mutable, it is always permitted to change. When it is set to immutable one can +never change it. The other flags determine the kind of checking done. Currently +the following overload values are used: + +\starttabulate[|l|l|c|c|c|c|c|] + \NC \NC \BC immutable \BC permanent \BC primitive \BC frozen \BC instance \NC \NR + \NC 1 \NC warning \NC \star \NC \star \NC \star \NC \NC \NC \NR + \NC 2 \NC error \NC \star \NC \star \NC \star \NC \NC \NC \NR + \NC 3 \NC warning \NC \star \NC \star \NC \star \NC \star \NC \NC \NR + \NC 4 \NC error \NC \star \NC \star \NC \star \NC \star \NC \NC \NR + \NC 5 \NC warning \NC \star \NC \star \NC \star \NC \star \NC \star \NC \NR + \NC 6 \NC error \NC \star \NC \star \NC \star \NC \star \NC \star \NC \NR +\stoptabulate + +The even values (except zero) will abort the run. In \CONTEXT\ we plug in a +callback that deals with the messages. A value of 255 will freeze this parameter. +At level five and above the \type {instance} flag is also checked but no drastic +action takes place. We use this to signal to the user that a specific instance is +redefined (of course the definition macros can check for that too). + +So, how does it work. The following is okay: + +\starttyping[option=TEX] +\def\MacroA{A} +\def\MacroB{B} +\let\MyMacro\MacroA +\let\MyMacro\MacroB +\stoptyping + +The first two macros are ordinary ones, and the last two lines just create an alias. Such +an alias shares the definition, but when for instance \type {\MacroA} is redefined, its +new meaning will not be reflected in the alias. + +\starttyping[option=TEX] +\permanent\protected\def\MacroA{A} +\permanent\protected\def\MacroB{B} +\let\MyMacro\MacroA +\let\MyMacro\MacroB +\stoptyping + +This also works, because the \type {\let} will create an alias with the protected +property but it will not take the \type {permanent} propery along. For that we need +to say: + +\starttyping[option=TEX] +\permanent\protected\def\MacroA{A} +\permanent\protected\def\MacroB{B} +\permanent\let\MyMacro\MacroA +\permanent\let\MyMacro\MacroB +\stoptyping + +or, when we want to copy all properties: + +\starttyping[option=TEX] +\permanent\protected\def\MacroA{A} +\permanent\protected\def\MacroB{B} +\aliased\let\MyMacro\MacroA +\aliased\let\MyMacro\MacroB +\stoptyping + +However, in \CONTEXT\ we have commands that we like to protect against +overloading but at the same time have a different meaning depending on the use +case. An example is the \type {\NC} (next column) command that has a different +implementation in each of the table mechanisms. + +\starttyping[option=TEX] +\permanent\protected\def\NC_in_table {...} +\permanent\protected\def\NC_in_tabulate{...} +\aliased\let\NC\NC_in_table +\aliased\let\NC\NC_in_tabulate +\stoptyping + +Here the second aliasing of \type {\NC} fails (assuming of course that we enabled +overload checking). One can argue that grouping can be used but often no grouping +takes place when we redefine on the fly. Because \type {frozen} is less restrictive +than \type {primitive} or \type {permanent}, and of course \type {immutable}, the +next variant works: + +\starttyping[option=TEX] +\frozen\protected\def\NC_in_table {...} +\frozen\protected\def\NC_in_tabulate{...} +\overloaded\let\NC\NC_in_table +\overloaded\let\NC\NC_in_tabulate +\stoptyping + +However, in practice, as we want to keep the overload checking, we have to do: + +\starttyping[option=TEX] +\frozen\protected\def\NC_in_table {...} +\frozen\protected\def\NC_in_tabulate{...} +\overloaded\frozen\let\NC\NC_in_table +\overloaded\frozen\let\NC\NC_in_tabulate +\stoptyping + +or use \type {\aliased}, but there might be conflicting permissions. This is not +that nice, so there is a kind of dirty trick possible. Consider this: + +\starttyping[option=TEX] +\frozen\protected\def\NC_in_table {...} +\frozen\protected\def\NC_in_tabulate{...} +\def\setNCintable {\enforced\let\frozen\let\NC\NC_in_table} +\def\setNCintabulate{\enforced\let\frozen\let\NC\NC_in_tabulate} +\stoptyping + +When we're in so called \type {initex} mode or when the overload mode is zero, +the \type {\enforced} prefix is internalized in a way that signals that the +follow up is not limited by the overload mode and permissions. This definition +time binding mechanism makes it possible to use \type {permanent} macros that +users cannot redefine, but existing macros can, unless of course they tweak the +mode parameter. + +Now keep in mind that users can always cheat but that is intentional. If you +really want to avoid that you can set the overload mode to 255 after which it +cannot be set any more. However, it can be useful to set the mode to zero (or +some warning level) when foreign macro packages are used. + +\stopsection + +\startsection[title=Complications] + +One side effect of all this is that all those prefixes can lead to more code. On +the other hand we save some due to the extended macro argument handling features. +When you take the size of the format file as reference, in the end we get a +somewhat smaller file. Every token that you add of remove gives a 8~bytes +difference. The extra overhead that got added to the engine is compensated by the +fact that some macro implementations can be more efficient. In the end, in spite +of these new features and the more extensive testing of flags performance is +about the same. \footnote {And if you wonder about memory, by compacting the used +(often scattered) token memory before dumping I manages to save some 512K on the +format file, so often the loss and gain are somewhere else.} + +\stopsection + +\startsection[title=Introspection] + +In case you want to get some details about the properties of a macro, you can +check its meaning. The full variant shows all of them. + +\startbuffer +% a macro with two optional arguments with optional spacing in between: + +\permanent\tolerant\protected\def\MyFoo[#1]#*[#2]{(#1)(#2)} + +\meaningless\MyFoo\par +\meaning \MyFoo\par +\meaningfull\MyFoo\par +\stopbuffer + +\typebuffer[option=TEX] + +\startpacked \getbuffer \stoppacked + +\stopsection + +% In \CONTEXT: +% c! v! s! ?? +% newif newcount ... newconditional etc +% userinterface (permanent) +% primitives +% noaligned +% frozen is for users + +\stopdocument diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index e3fbc2cc3..8e57e6627 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{2020.11.15 20:40} +\newcontextversion{2020.11.16 19:37} %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 9c628dbae..d22d7b6e7 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{2020.11.15 20:40} +\edef\contextversion{2020.11.16 19:37} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-cs.mkii b/tex/context/base/mkii/mult-cs.mkii index 2f38323ef..290ae510e 100644 --- a/tex/context/base/mkii/mult-cs.mkii +++ b/tex/context/base/mkii/mult-cs.mkii @@ -1368,7 +1368,6 @@ \setinterfaceelement{type}{opis} % definitions for interface commands for language cs % -\setinterfacecommand{CAPPED}{KAP} \setinterfacecommand{Character}{Znak} \setinterfacecommand{Characters}{Znaky} \setinterfacecommand{MONTH}{MESIC} diff --git a/tex/context/base/mkii/mult-fr.mkii b/tex/context/base/mkii/mult-fr.mkii index 6eed238c6..d39d3619c 100644 --- a/tex/context/base/mkii/mult-fr.mkii +++ b/tex/context/base/mkii/mult-fr.mkii @@ -1368,7 +1368,6 @@ \setinterfaceelement{type}{transcrire} % definitions for interface commands for language fr % -\setinterfacecommand{CAPPED}{CAP} \setinterfacecommand{Character}{Caractere} \setinterfacecommand{Characters}{Caracteres} \setinterfacecommand{MONTH}{MOIS} diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii index 1c8de1c87..0663659e3 100644 --- a/tex/context/base/mkii/mult-ro.mkii +++ b/tex/context/base/mkii/mult-ro.mkii @@ -1368,7 +1368,6 @@ \setinterfaceelement{type}{type} % definitions for interface commands for language ro % -\setinterfacecommand{CAPPED}{KAP} \setinterfacecommand{Character}{Litera} \setinterfacecommand{Characters}{Litere} \setinterfacecommand{MONTH}{LUNA} diff --git a/tex/context/base/mkiv/anch-bar.mkxl b/tex/context/base/mkiv/anch-bar.mkxl new file mode 100644 index 000000000..3587eb8a0 --- /dev/null +++ b/tex/context/base/mkiv/anch-bar.mkxl @@ -0,0 +1,220 @@ +%D \module +%D [ file=anch-bar, +%D version=2003.03.16, +%D title=\CONTEXT\ Anchoring Macros, +%D subtitle=Margin Bars and alike, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Anchoring Macros / Margin Bars} + +\unprotect + +%D This can be done better now ... + +%D We will implement a sidebar mechanism using the functionality from +%D \type {core-pos}. +%D +%D \starttyping +%D \definesidebar[whow][rulecolor=green,distance=0pt] +%D +%D \input tufte \par +%D \startsidebar +%D \input tufte \par +%D \input tufte \par +%D \startsidebar[whow] +%D \input tufte \par +%D \input tufte \par +%D \input tufte +%D \stopsidebar \par +%D \input tufte \par +%D \input tufte +%D \stopsidebar \par +%D \input tufte \par +%D \input tufte \par +%D \startsidebar +%D \input tufte \par +%D \input tufte \par +%D \input tufte \par +%D \input tufte \par +%D \input tufte +%D \stopsidebar \par +%D \input tufte \par +%D \input tufte \par +%D \startsidebar +%D \input tufte +%D \input tufte +%D \input tufte +%D \input tufte +%D \input tufte +%D \stopsidebar +%D \stoptyping + +\installcorenamespace{sidebar} + +\installcommandhandler \??sidebar {sidebar} \??sidebar + +\newcount\c_anch_sidebars_n +\newcount\c_anch_sidebars_current % local +\newdimen\d_anch_sidebars_distance +\newcount\c_anch_sidebars_level + +% \setupMPvariables +% [mpos:sidebar] +% [linecolor=red, +% linewidth=2pt, +% distance=5pt] + +\setupsidebar + [\c!rulethickness=\dimexpr\bodyfontsize/6\relax, % 2pt default + \c!rulecolor=\s!black, + \c!alternative=0, + \c!topoffset=\zeropoint, + \c!bottomoffset=\zeropoint, + \c!distance=.5\bodyfontsize, + \c!level=, + \c!leftmargindistance=\zeropoint] + +\aliased\let\setupsidebars\setupsidebar + +\permanent\tolerant\protected\def\startsidebar[#1]#*[#2]% + {\bgroup + \dontleavehmode + \advance\c_anch_sidebars_level\plusone + \global\advance\c_anch_sidebars_n\plusone + \c_anch_sidebars_current\c_anch_sidebars_n\relax % relax needed + \ifhastok={#1}% + \edef\currentsidebar{\the\c_anch_sidebars_level}% + \checksidebarparent + \setupcurrentsidebar[#1]% + \else + \def\currentsidebar{#1}% + \setupcurrentsidebar[#2]% + \fi + \scratchdistance\sidebarparameter\c!distance\relax + \scratchdimen\sidebarparameter\c!leftmargindistance\relax + \edef\m_level{\sidebarparameter\c!level}% + \ifempty\m_level + \ifnum\c_anch_sidebars_level=\plusone + \ifzeropt\scratchdimen + \advance\d_anch_sidebars_distance\scratchdistance\relax + \else + \d_anch_sidebars_distance\scratchdimen + \fi + \else + \advance\d_anch_sidebars_distance\scratchdistance\relax + \fi + \else + \ifnum\m_level=\plusone + \ifzeropt\scratchdimen + \advance\d_anch_sidebars_distance\scratchdistance\relax + \else + \d_anch_sidebars_distance\scratchdimen + \fi + \else + \d_anch_sidebars_distance\dimexpr\scratchdimen+\numexpr\m_level-\plusone\relax\dimexpr\scratchdistance\relax\relax + \fi + \fi + \startpositionoverlay{\v!text-1}% + \normalexpanded{\setMPpositiongraphicrange % maybe expand in definition + {b:sidebar:\the\c_anch_sidebars_n}% + {e:sidebar:\the\c_anch_sidebars_n}% + {mpos:sidebar}% + {self=sidebar:\the\c_anch_sidebars_n, + linewidth=\sidebarparameter\c!rulethickness, + linecolor=\sidebarparameter\c!rulecolor, + alternative=\sidebarparameter\c!alternative, + topoffset=\the\dimexpr\sidebarparameter\c!topoffset, + bottomoffset=\the\dimexpr\sidebarparameter\c!bottomoffset, + distance=\the\d_anch_sidebars_distance}% + }% + \stoppositionoverlay + \bpos{sidebar:\the\c_anch_sidebars_current}% + \ignorespaces} + +\permanent\protected\def\stopsidebar + {\removelastspace + \epos{sidebar:\the\c_anch_sidebars_current} + \carryoverpar\egroup} + +%D Let's keep this nice and simple (okay, we could pass the 6 variables in +%D one lua call). + +\startMPpositionmethod{mpos:sidebar} + \startMPpositiongraphic{mpos:sidebar}{linecolor,linewidth,distance,alternative}% + anch_sidebars_draw ( + \MPp\MPbself,\MPp\MPeself,\MPy\MPbself,\MPy\MPeself,\MPh\MPbself,\MPd\MPeself, + \MPx{\textanchor},\MPy{\textanchor},\MPw{\textanchor},\MPh{\textanchor}, + \MPvar{alternative},\MPvar{distance},\MPvar{linewidth},\MPvar{linecolor}, + \MPvar{topoffset}, \MPvar{bottomoffset} + ) ; + \stopMPpositiongraphic + \MPpositiongraphic{mpos:sidebar}{}% +\stopMPpositionmethod + +%D We now reimplement the \MKII\ margin rules handler in a more +%D modern way. +%D +%D \setupmarginrules +%D [rulecolor=darkred, +%D rulethickness=2pt] +%D +%D \setupmarginrules % sidebar +%D [2] +%D [rulecolor=darkblue] +%D +%D \startmarginrule[1] +%D \input ward +%D \startmarginrule[2] +%D \input ward +%D \startmarginrule[3] +%D \input ward +%D \startmarginrule[level=6,rulecolor=darkgreen] +%D \input ward +%D \stopmarginrule +%D \input ward +%D \stopmarginrule +%D \input ward +%D \stopmarginrule +%D \input ward +%D \stopmarginrule +%D +%D Compared to the old mechanism we now can pass settings too. + +\definesidebar + [\v!margin] + [\c!leftmargindistance=\dimexpr\leftmargindistance+\sidebarparameter\c!rulethickness/2\relax] + +\dorecurse{5}{\definesidebar[\v!margin:#1][\v!margin]} % let's be nice and predefine 5 levels + +\permanent\tolerant\protected\def\setupmarginrule[#1]#*[#2]% + {\ifarguments\or + \setupsidebar[\v!margin][#1]% + \or + \setupsidebar[\v!margin:#1][#2]% + \fi} + +\aliased\let\setupmarginrules\setupmarginrule + +\permanent\tolerant\protected\def\startmarginrule[#1]% pretty inefficient checking + {\edef\m_anch_marginrules_kind{#1}% + \ifempty\m_anch_marginrules_kind + \startsidebar[\v!margin][]% + \orelse\ifhastok={\m_anch_marginrules_kind}% + \startsidebar[\v!margin][#1]% + \else + \anch_marginrules_check{#1}% + \startsidebar[\v!margin:#1][\c!level=#1]% + \fi} + +\def\anch_marginrules_check#1% + {\doifnotcommandhandler\??sidebar{\v!margin:#1}{\definesidebar[\v!margin:#1][\v!margin]}} + +\aliased\let\stopmarginrule\stopsidebar + +\protect \endinput diff --git a/tex/context/base/mkiv/anch-bck.mklx b/tex/context/base/mkiv/anch-bck.mklx new file mode 100644 index 000000000..91e523d8f --- /dev/null +++ b/tex/context/base/mkiv/anch-bck.mklx @@ -0,0 +1,747 @@ +%D \module +%D [ file=anch-bck, % moved from anch-pgr (1999.08.01) +%D version=2011.12.19, +%D title=\CONTEXT\ Anchoring Macros, +%D subtitle=Backgrounds, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Anchoring Macros / Backgrounds} + +%D This module is quite okay but at some point I might add methods that use +%D attributes although not too much is to be expected, apart from better anchoring. +%D In fact better anchoring can be done independent of that. + +\unprotect + +% This might be overloaded later on: + +% \defineoverlay[\v!text-2][\positionoverlay{\v!text-2}] +% \defineoverlay[\v!text-1][\positionoverlay{\v!text-1}] +% \defineoverlay[\v!text+1][\positionoverlay{\v!text+1}] +% \defineoverlay[\v!text+2][\positionoverlay{\v!text+2}] + +% Paragraph positions: + +\newcount\c_anch_backgrounds_text_n + +\def\v_anch_backgrounds_text_current {tbg:0} +\def\v_anch_backgrounds_anchor_current_b{b:\v_anch_backgrounds_text_current} +\def\v_anch_backgrounds_anchor_current_e{e:\v_anch_backgrounds_text_current} + +\def\anch_backgrounds_text_initialize_next + {\global\advance\c_anch_backgrounds_text_n\plusone + \edef\v_anch_backgrounds_text_current{tbg:\number\c_anch_backgrounds_text_n}} + +% The first position can be used in the middle of a paragraph in which case we're +% too late with initializing par positions. Therefore we check if positions are +% used at all. +% +% tricky: we need to catch newly set! otherwise an old run can have positions + +\protected\def\anch_backgrounds_text_initialize + {\doifelsepositionsused\enableparpositions\donothing + \glet\anch_backgrounds_text_initialize\relax} + +\appendtoks + \anch_backgrounds_text_initialize +\to \everystarttext + +%D Some MP + +\newcount\MPparcounter + +\permanent\def\MPself {\MPvar{self}} +\permanent\def\MPbself {b:\MPvar{self}} +\permanent\def\MPeself {e:\MPvar{self}} +\permanent\def\MPparanchor{p:\number\MPparcounter} + +% \carryoverpar is needed for left/right floats + +% \definetextbackground[more][state=start,backgroundcolor=red] % location=paragraph +% \definetextbackground[test][state=start,backgroundcolor=green] +% +% \page \placefigure[left]{}{} +% +% \starttextbackground[test] +% \readfile{ward}{}{} +% \starttextbackground[more] +% \readfile{ward}{}{} +% \stoptextbackground +% \readfile{ward}{}{} +% \stoptextbackground +% +% \page \placefigure[right]{}{} +% +% \starttextbackground[test] +% \readfile{ward}{}{} +% \starttextbackground[more] +% \readfile{ward}{}{} +% \stoptextbackground +% \readfile{ward}{}{} +% \stoptextbackground + +\newcount\c_anch_backgrounds_text_level + +\installcorenamespace{textbackground} +\installcorenamespace{textbackgroundlevel} + +\installcommandhandler \??textbackground {textbackground} \??textbackground + +\appendtoks + \frozen\instance\setuevalue{\currenttextbackground}{\groupedcommand{\starttextbackground[\currenttextbackground]}{\stoptextbackground}}% + \frozen\instance\setuevalue{\e!start\currenttextbackground}{\starttextbackground[\currenttextbackground]}% + \frozen\instance\setuevalue{\e!stop \currenttextbackground}{\stoptextbackground}% +\to \everydefinetextbackground + +\newconstant \c_anch_backgrounds_pos_state +\newconditional\c_anch_backgrounds_pos_no_shape + +\def\anch_backgrounds_bpos + {\ifconditional\c_anch_backgrounds_pos_no_shape + \bposkind\v_anch_backgrounds_text_current\plusthree + \else + \bposkind\v_anch_backgrounds_text_current\c_anch_backgrounds_pos_state + \fi} + +\def\anch_backgrounds_epos + {\ifconditional\c_anch_backgrounds_pos_no_shape + \eposkind\v_anch_backgrounds_text_current\plusthree + \else + \eposkind\v_anch_backgrounds_text_current\c_anch_backgrounds_pos_state + \fi} + +% \permanent\tolerant\protected\def\starttextbackground[#tag]#spacer[#settings]% +% {\begingroup +% \advance\c_anch_backgrounds_text_level\plusone +% \def\currenttextbackground{#tag}% +% \anch_backgrounds_text_initialize_next +% \ifparameter#settings\or +% \setupcurrenttextbackground[#settings]% +% \fi +% \doifelse{\textbackgroundparameter\c!state}\v!start +% \anch_backgrounds_text_preset_yes +% \anch_backgrounds_text_preset_nop +% \anch_backgrounds_text_start_indeed} + +% ugly hack to register usage + +\newcount \c_anch_backgrounds_text_count +\newcount \c_anch_backgrounds_text_check +\newconstant\c_anch_backgrounds_text_state + +\permanent\tolerant\protected\def\starttextbackground[#tag]#spacer[#settings]% + {\begingroup + \global\advance\c_anch_backgrounds_text_count\plusone + \advance\c_anch_backgrounds_text_level\plusone + \def\currenttextbackground{#tag}% + \anch_backgrounds_text_initialize_next + \ifparameter#settings\or + \setupcurrenttextbackground[#settings]% + \fi + \doifelse{\textbackgroundparameter\c!state}\v!start + \anch_backgrounds_text_preset_yes + \anch_backgrounds_text_preset_nop + \anch_backgrounds_text_start_indeed} + +\def\anch_backgrounds_text_level_start + {\c_anch_backgrounds_text_check\c_anch_backgrounds_text_count} + +\def\anch_backgrounds_text_level_stop + {\c_anch_backgrounds_text_state + \ifnum\c_anch_backgrounds_text_count>\c_anch_backgrounds_text_check + \plusone + \else + \zerocount + \fi} + +% todo \backgroundvariable\c!variant + +% criterium determines when we fall back on text +% always is always forcing paragraphs + +\let\anch_backgrounds_text_start_indeed\relax +\let\anch_backgrounds_text_stop_indeed \relax + +\setvalue{\??textbackgroundlevel\v!text}% + {\let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_txt + \let\anch_backgrounds_text_stop_indeed \anch_backgrounds_text_stop_txt} + +\setvalue{\??textbackgroundlevel\v!paragraph}% + {\ifnum\c_anch_backgrounds_text_level>\textbackgroundparameter\c!criterium\relax + \let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_txt + \let\anch_backgrounds_text_stop_indeed \anch_backgrounds_text_stop_txt + \else + \let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_par + \let\anch_backgrounds_text_stop_indeed \anch_backgrounds_text_stop_par + \fi} + +\setvalue{\??textbackgroundlevel\v!always}% + {\let\anch_backgrounds_text_start_indeed\anch_backgrounds_text_start_par + \let\anch_backgrounds_text_stop_indeed \anch_backgrounds_text_stop_par} + +\setvalue{\??textbackgroundlevel\v!none}% + {\anch_backgrounds_text_preset_nop} + +\def\anch_backgrounds_text_preset_nop + {\let\anch_backgrounds_text_start_indeed\relax + \let\anch_backgrounds_text_stop_indeed \relax} + +\def\anch_backgrounds_text_preset_yes + {\anch_backgrounds_text_preset_nop + \csname\??textbackgroundlevel\textbackgroundparameter\c!location\endcsname + \edef\p_anch_backgrounds_text_frame {\textbackgroundparameter\c!frame}% + \edef\p_anch_backgrounds_text_corner {\textbackgroundparameter\c!corner}% + \edef\p_anch_backgrounds_text_background{\textbackgroundparameter\c!background}% + \ifx\p_anch_backgrounds_text_frame\v!on + \ifx\p_anch_backgrounds_text_corner\v!round + \let\p_anch_backgrounds_text_frame\!!plustwo + \else + \let\p_anch_backgrounds_text_frame\!!plusone + \fi + \else + \let\p_anch_backgrounds_text_frame\!!zerocount + \fi + \ifx\p_anch_backgrounds_text_background\v!color + \let\p_anch_backgrounds_text_background\!!plusone + \else + \let\p_anch_backgrounds_text_background\!!zerocount + \fi + \startpositionoverlay{\textbackgroundoverlay{\textbackgroundparameter\c!level}}% + \anch_backgrounds_text_meta_graphic % gets expanded directly + \stoppositionoverlay} + +\def\anch_backgrounds_text_meta_graphic + {\normalexpanded + {\setMPpositiongraphicrange % needs to be optimized + {\v_anch_backgrounds_anchor_current_b}% + {\v_anch_backgrounds_anchor_current_e}% + {\textbackgroundparameter\c!method}% + {self=\v_anch_backgrounds_text_current, + mp=\textbackgroundparameter\c!mp, + gridtype=\textbackgroundparameter\c!alternative, + filltype=\p_anch_backgrounds_text_background, + linetype=\p_anch_backgrounds_text_frame, + dashtype=\textbackgroundparameter\c!dash, + gridcolor=\textbackgroundparameter\c!framecolor, + linecolor=\textbackgroundparameter\c!framecolor, + lineoffset=\textbackgroundparameter\c!frameoffset, + fillcolor=\textbackgroundparameter\c!backgroundcolor, + filloffset=\textbackgroundparameter\c!backgroundoffset, + gridwidth=\textbackgroundparameter\c!rulethickness, + gridshift=\textbackgroundparameter\c!voffset, + linewidth=\textbackgroundparameter\c!rulethickness, + lineradius=\textbackgroundparameter\c!radius}}} + +\permanent\protected\def\stoptextbackground + {\anch_backgrounds_text_stop_indeed + \carryoverpar\endgroup} % why doesn't this work ? + +\permanent\protected\def\starttextbackgroundmanual + {\begingroup + \c_anch_backgrounds_pos_state\plusone + \usetextbackgroundstyleandcolor\c!style\c!color + \anch_backgrounds_bpos} + +\permanent\protected\def\stoptextbackgroundmanual + {\anch_backgrounds_epos + \carryoverpar\endgroup} + +\def\anch_backgrounds_text_start_txt + {\ifvmode \dontleavehmode \fi + \begingroup + \c_anch_backgrounds_pos_state\plusone + \usetextbackgroundstyleandcolor\c!style\c!color + \anch_backgrounds_bpos} + +\def\anch_backgrounds_text_stop_txt + {\anch_backgrounds_epos + \carryoverpar\endgroup} + +\newskip\textbackgroundskip + +% maybe we should have a resetter for such compensation struts + +\def\anch_backgrounds_reset_attributes + {\scratchcounter\c_attr_snapmethod + \resetallattributes % \c_attr_linenumber\attributeunsetvalue + \c_attr_snapmethod\scratchcounter} + +\def\anch_backgrounds_text_start_par % beware .. background shapes + {\endgraf % new + \textbackgroundparameter\c!before + \begingroup + \c_anch_backgrounds_pos_state\plustwo + \begingroup + \anch_backgrounds_reset_attributes + \noindent + \ifgridsnapping + \spac_helpers_assign_skip\textbackgroundskip{\textbackgroundparameter\c!topoffset}% + \ifdim\textbackgroundskip>\zeropoint + \struttedbox % not always ok (e.g. setups) + {\hpack{\raise\textbackgroundskip\hpack{\anch_backgrounds_bpos}}}% + \else + \anch_backgrounds_bpos + \fi + \else + \anch_backgrounds_bpos + \fi + \endgraf % we need a vertical nobreak - 29/06/2004 + \endgroup + \nobreak + \vskip-\lineheight + \nobreak + \ifgridsnapping \else + \spac_helpers_assign_skip\textbackgroundskip{\textbackgroundparameter\c!topoffset}% + \ifdim\textbackgroundskip>\zeropoint + \kern\textbackgroundskip\nobreak + \fi + \fi + \dosetleftskipadaption{\textbackgroundparameter\c!leftoffset}% + \advance\leftskip\leftskipadaption + \dosetleftskipadaption{\textbackgroundparameter\c!rightoffset}% + \advance\rightskip\leftskipadaption + % new + \dosetraggedcommand{\textbackgroundparameter\c!align}% + \raggedcommand + % + \usetextbackgroundstyleandcolor\c!style\c!color + \nowhitespace + \seteffectivehsize + \doinhibitblank % \blank[\v!disable]% new + \par} + +\def\anch_backgrounds_text_stop_par + {\par + \removelastskip % new + \spac_helpers_assign_skip\textbackgroundskip{\textbackgroundparameter\c!bottomoffset}% + \ifdim\lastskip>\zeropoint + \advance\textbackgroundskip-\lastskip + \fi + \ifgridsnapping \else \ifdim\textbackgroundskip>\zeropoint + \kern\textbackgroundskip\nobreak + \fi \fi + \nobreak + \vskip-\dimexpr\lineheight+\parskip\relax % problem: we loose the hangindent + \nobreak + \endgroup + \begingroup + \forgeteverypar % NOT REALLY NEEDED, SAVES HASH/MEM + \anch_backgrounds_reset_attributes + \nobreak \noindent \strut \hfill \kern\zeropoint + % so far + \spac_helpers_assign_skip\textbackgroundskip{\textbackgroundparameter\c!bottomoffset}% + \ifgridsnapping % experimental, pascal (todo: topoffset in same way) + \ifdim\textbackgroundskip>\zeropoint + \struttedbox % not always ok (e.g. setups) + {\hpack{\lower\textbackgroundskip\hpack{\anch_backgrounds_epos}}}% + \else + \anch_backgrounds_epos + \fi + \else + \anch_backgrounds_epos + \fi + \endgraf + \carryoverpar\endgroup + \endgraf % new + \textbackgroundparameter\c!after} + +\permanent\protected\def\checkpositionoverlays % overloads \relax in anch-pgr + {\ifproductionrun + \enabletextarearegistration + \enablehiddenbackground + \enforced\glet\checkpositionoverlays\relax + \fi} + +% shape handling + +\definesystemattribute[textbackground][public] + +% \def\page_prepare_backgrounds#1% +% {\clf_collectbackgrounds\realpageno#1\relax} + +\def\anch_backgrounds_bpos + {\ifconditional\c_anch_backgrounds_pos_no_shape + \c_attr_textbackground\attributeunsetvalue + \bposkind\v_anch_backgrounds_text_current\plusthree + \orelse\ifnum\c_anch_backgrounds_pos_state=\plusone + \bposkind\v_anch_backgrounds_text_current\c_anch_backgrounds_pos_state + \clf_registerbackground{\v_anch_backgrounds_text_current}% + \else + \bposkind\v_anch_backgrounds_text_current\c_anch_backgrounds_pos_state + \c_attr_textbackground\attributeunsetvalue + \fi} + +% plugs into other code + +\def\strc_floats_wrap_free_region + {\global\setbox\floatbox\hpack % we always need to wrap + {\ifconditional\c_strc_floats_trace_free + \strc_floats_show_free_region + \fi + \box\floatbox}} + +\startuseMPgraphic{floatfree} + draw_free_region( + \the\wd\floatbox, + \the\ht\floatbox, + \the\dp\floatbox, + \the\d_free_offset_left, + \the\d_free_offset_right, + \the\d_free_offset_top, + \the\d_free_offset_bottom + ) ; +\stopuseMPgraphic + +\def\strc_floats_show_free_region + {\lower\dp\floatbox\hpack to \zeropoint {\useMPgraphic{floatfree}}} + +\newconditional\c_strc_floats_mark_as_free +\newconditional\c_strc_floats_trace_free +\newconstant \c_free_offset_kind +\newdimen \d_free_offset_left +\newdimen \d_free_offset_right +\newdimen \d_free_offset_top +\newdimen \d_free_offset_bottom + +\installtextracker{floats.freeregion} + {\settrue \c_strc_floats_trace_free} + {\setfalse\c_strc_floats_trace_free} + +\def\strc_floats_mark_as_free#1#2#3#4#5% + {\c_free_offset_kind #1% + \d_free_offset_left #2% + \d_free_offset_right #3% + \d_free_offset_top #4% + \d_free_offset_bottom#5% + \strc_floats_wrap_free_region + \anch_mark_tagged_box_free + \floatbox + \c_free_offset_kind + \d_free_offset_left + \d_free_offset_right + \d_free_offset_top + \d_free_offset_bottom} + +\ifx\strc_floats_mark_pag_as_free\relax \else + \writestatus{error}{wrong place for pag_as_free}\wait +\fi + +\ifx\strc_floats_mark_par_as_free\relax \else + \writestatus{error}{wrong place for par_as_free}\wait +\fi + +\def\strc_floats_mark_pag_as_free + {\ifpositioning + \ifconditional\c_strc_floats_mark_as_free + \strc_floats_mark_as_free + \plusone + \zeropoint + \zeropoint + \d_strc_floats_top + \d_strc_floats_bottom + \fi + \fi} + +\def\strc_floats_mark_par_as_free + {\ifpositioning + \ifconditional\c_strc_floats_mark_as_free + \ifcase\c_page_sides_float_type + \or % backspace + \strc_floats_mark_as_free + \plustwo + \zeropoint + \d_page_sides_rightoffset + \d_page_sides_topskip + \d_page_sides_bottomskip + \or % leftedge + \strc_floats_mark_as_free + \plustwo + \zeropoint + \d_page_sides_rightoffset + \d_page_sides_topskip + \d_page_sides_bottomskip + \or % leftmargin + \strc_floats_mark_as_free + \plustwo + \zeropoint + \d_page_sides_rightoffset + \d_page_sides_topskip + \d_page_sides_bottomskip + \or % leftside + \strc_floats_mark_as_free + \plustwo + \d_page_sides_leftskip % maybe too + \d_page_sides_margin + \d_page_sides_topskip + \d_page_sides_bottomskip + \or % rightside + \strc_floats_mark_as_free + \plusthree + \d_page_sides_margin + \d_page_sides_rightskip % maybe too + \d_page_sides_topskip + \d_page_sides_bottomskip + \or % rightmargin + \strc_floats_mark_as_free + \plusthree + \d_page_sides_leftoffset + \zeropoint + \d_page_sides_topskip + \d_page_sides_bottomskip + \or % rightedge + \strc_floats_mark_as_free + \plusthree + \d_page_sides_leftoffset + \zeropoint + \d_page_sides_topskip + \d_page_sides_bottomskip + \or % cutspace + \strc_floats_mark_as_free + \plusthree + \d_page_sides_leftoffset + \zeropoint + \d_page_sides_topskip + \d_page_sides_bottomskip + \fi + \fi + \fi} + +% so far + +\setuptextbackground + [\c!mp=mpos:region:draw, + \c!method=mpos:region, + \c!state=\v!start, + \c!location=\v!text, + \c!leftoffset=\!!zeropoint, % 1em, + \c!rightoffset=\textbackgroundparameter\c!leftoffset, + \c!topoffset=\!!zeropoint, % \v!medium, + \c!bottomoffset=\textbackgroundparameter\c!topoffset, + \c!criterium=\plusone, + \c!level=-1, + \c!alternative=0, + \c!align=, + \c!dash=0, % to be internationalized + \c!background=\v!color, + \c!backgroundcolor=lightgray, + \c!backgroundoffset=\!!zeropoint, + \c!corner=\v!rectangular, + \c!radius=.5\bodyfontsize, + \c!voffset=\!!zeropoint, + \c!frame=\v!on, + \c!framecolor=blue, + \c!frameoffset=\!!zeropoint, + \c!rulethickness=\linewidth] + +%D The \METAPOST\ connection: + +% gridtype = 1 => baseline +% gridtype = 2 => betweenline + +\setupMPvariables + [mpos:region] + [mp=mpos:region:unset, + gridtype=0, + linetype=1, + filltype=1, + dashtype=0, % 1 = dashed, 2 = dashed with background + gridcolor=red, + linecolor=blue, + fillcolor=lightgray, + filloffset=\!!zeropoint, + linewidth=\linewidth, + gridwidth=\linewidth, + gridshift=\!!zeropoint, + lineradius=.5\bodyfontsize, + lineoffset=\!!zeropoint, + dashtype=1] + +\startuseMPgraphic{mpos:region:setup} + boxgridtype := \MPvar{gridtype} ; + boxlinetype := \MPvar{linetype} ; + boxfilltype := \MPvar{filltype} ; + boxdashtype := \MPvar{dashtype} ; + boxfilloffset := \MPvar{filloffset} ; + boxlinewidth := \MPvar{linewidth} ; + boxgridwidth := \MPvar{gridwidth} ; + boxgridshift := \MPvar{gridshift} ; + boxlineradius := \MPvar{lineradius} ; + boxlineoffset := \MPvar{lineoffset} ; + % + def boxgridcolor = \MPvar{gridcolor} enddef ; + def boxlinecolor = \MPvar{linecolor} enddef ; + def boxfillcolor = \MPvar{fillcolor} enddef ; + % + def boxgridoptions = withcolor boxgridcolor enddef ; + def boxlineoptions = withcolor boxlinecolor enddef ; + def boxfilloptions = withcolor boxfillcolor enddef ; +\stopuseMPgraphic + +\startuseMPgraphic{mpos:region:extra} + % user stuff +\stopuseMPgraphic + +\startuseMPgraphic{mpos:region:anchor} + setbounds currentpicture to multibox ; +\stopuseMPgraphic + +\startMPpositiongraphic{mpos:region}{fillcolor,filloffset,linecolor,gridcolor,linewidth,gridwidth,gridshift,lineradius,lineoffset} + \includeMPgraphic{mpos:region:setup} ; + \includeMPgraphic{mpos:region:extra} ; + \MPgetmultipars{\MPvar{self}}{\MPanchorid} ; + \includeMPgraphic{\MPvar{mp}} ; + \includeMPgraphic{mpos:region:anchor} ; +\stopMPpositiongraphic + +%D For old times sake: + +\startMPpositiongraphic{mpos:box}{fillcolor,linecolor,linewidth} + string tag; tag := "\MPvar{self}" ; + path box ; box := positionbox(tag) ; + + box := box enlarged \MPvar{filloffset} ; + fill box withcolor \MPvar{fillcolor} ; + draw box withcolor \MPvar{linecolor} withpen pencircle scaled \MPvar{linewidth} ; + + positioninregion; +\stopMPpositiongraphic + +\startMPpositionmethod{mpos:region} + \MPpositiongraphic{mpos:region}{}% +\stopMPpositionmethod + +\startuseMPgraphic{mpos:region:draw} + draw_multi_pars +\stopuseMPgraphic + +\startuseMPgraphic{mpos:region:show} + show_multi_pars +\stopuseMPgraphic + +\startuseMPgraphic{mpos:region:kind} + show_multi_kind +\stopuseMPgraphic + +\startuseMPgraphic{mpos:region:sideline} + draw_multi_side +\stopuseMPgraphic + +\startuseMPgraphic{mpos:region:sideline:dashed} + draw_multi_side_path dashed evenly ; +\stopuseMPgraphic + +%D As an example we define a grid background: + +\definetextbackground + [\v!grid] + [\c!state=\v!stop, + \c!location=\v!paragraph, + \c!frame=\v!off, + \c!framecolor=red, + \c!background=, + \c!alternative=1] + +\ifx\basegrid\undefined \else \overloaded\aliased\letcsname\v!grid\endcsname\basegrid \fi + +%D Some examples (that might become modules anch-imp-whatever): + +\setupMPvariables + [mpos:encircle] + [fillcolor=lightgray, + filloffset=\!!zeropoint, + linecolor=blue, + lineoffset=5pt, + linewidth=1pt] + +\startMPpositiongraphic{mpos:encircle}{linecolor,fillcolor,linewidth,lineoffset} + \MPgetposboxes{\MPvar{self}}{\MPanchorid} + if nofposboxes = 1 : + posboxes[1] := posboxes[1] enlarged \MPvar{lineoffset} cornered \MPvar{lineoffset} ; + fill posboxes[1] withcolor \MPvar{fillcolor} ; + draw posboxes[1] withpen pencircle scaled \MPvar{linewidth} withcolor \MPvar{linecolor} ; + fi ; +\stopMPpositiongraphic + +\setupMPvariables + [mpos:connect] + [linecolor=red, + lineoffset=.25ex, + linewidth=1pt] + +\startMPpositiongraphic{mpos:connect}{linecolor,lineoffset,linewidth} + boxlinewidth := \MPvar{linewidth} ; + boxlineoffset := \MPvar{lineoffset} ; + def boxlineoptions = withcolor \MPvar{linecolor} enddef ; + \MPgetposboxes{\MPvar{from},\MPvar{to}}{\MPanchorid} + connect_positions ; +\stopMPpositiongraphic + +\protect \endinput + +\definetextbackground[underline] [location=text,alternative=1,background=,frame=off] +\definetextbackground[overstrike] [location=text,alternative=2,background=,frame=off] +\definetextbackground[exlines] [location=text,alternative=3,background=,frame=off] +\definetextbackground[strikethrough][location=text,alternative=4,background=,frame=off] + +\definestartstop [underline] + [before={\starttextbackground[underline]}, + after=\stoptextbackground] + +\definestartstop + [overstrike] + [before={\starttextbackground[overstrike]}, + after=\stoptextbackground] + +\definestartstop + [exlines] + [before={\starttextbackground[exlines]}, + after=\stoptextbackground] + +\definestartstop + [strikethrough] + [before={\starttextbackground[strikethrough]}, + after=\stoptextbackground] + +\definetextbackground + [sideline] + [mp=mpos:region:sideline, + location=paragraph, + framecolor=red, + frameoffset=5mm] + +\definestartstop [sideline] + [before={\starttextbackground[sideline]}, + after=\stoptextbackground] + +\starttext + + \startunderline \input tufte \stopunderline \blank + \startoverstrike \input tufte \stopoverstrike \blank + \startexlines \input tufte \stopexlines \blank + \startstrikethrough \input tufte \stopstrikethrough \blank + \startsideline \input tufte \stopsideline \blank + + \page + + \startpositionoverlay{text-1} + \setMPpositiongraphic{connect-1-b}{mpos:connect}{from=connect-1-b,to=connect-1-e} + \setMPpositiongraphic{connect-1-e}{mpos:connect}{from=connect-1-b,to=connect-1-e} + \stoppositionoverlay + + \startpositionoverlay{text-1} + \setMPpositiongraphic{encircle-1}{mpos:encircle}{self=encircle-1} + \stoppositionoverlay + + test \hpos{connect-1-b}{START} + \dorecurse{10}{\input ward} + \hpos{encircle-1}{\strut HERE} + \dorecurse{10}{\input ward} + \hpos{connect-1-e}{STOP} test + +\stoptext diff --git a/tex/context/base/mkiv/anch-pgr.mkxl b/tex/context/base/mkiv/anch-pgr.mkxl new file mode 100644 index 000000000..3439fd5a2 --- /dev/null +++ b/tex/context/base/mkiv/anch-pgr.mkxl @@ -0,0 +1,445 @@ +%D \module +%D [ file=anch-pgr, % split off core-pos +%D version=1999.08.01, +%D title=\CONTEXT\ Anchoring Macros, +%D subtitle=Positioning Graphics, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Anchoring Macros / Grapics} + +%D Before we come to graphics support, we have to make sure of the reference point +%D on the page. The next macros do so and are hooked into the page building routine. + +\registerctxluafile{anch-pgr}{} + +\unprotect + +%D A few more low level macros take care of defining and recalling actions. Actions +%D are saved globally! The lists can become quite long because there can be lots of +%D parameters passed on so we clean up the list afterwards. + +\newtoks\everypositionaction +\newtoks\everyinsertpositionaction +\newtoks\everycleanpositionaction + +\installcorenamespace{positionaction} +\installcorenamespace{positioncleanup} + +\protected\def\anch_positions_set_action#1% + {\expandafter\gdef\csname\??positionaction#1\endcsname} % nicely gobbles spaces + +\permanent\protected\def\doifpositionaction#1% + {\ifcsname\??positionaction#1\endcsname + \expandafter\firstofoneargument + \else + \expandafter\gobbleoneargument + \fi} + +\permanent\protected\def\doifelsepositionaction#1% + {\ifcsname\??positionaction#1\endcsname + \expandafter\firstoftwoarguments + \else + \expandafter\secondoftwoarguments + \fi} + +\aliased\let\doifpositionactionelse\doifelsepositionaction + +\protected\def\dopositionaction#1% + {\edef\currentpositionaction{#1}% + \ifcsname\??positionaction\currentpositionaction\endcsname + \anch_positions_action_indeed + \fi} + +\def\anch_positions_action_indeed + {\doifelseposition\currentpositionaction + \anch_positions_action_indeed_yes + \anch_positions_action_indeed_nop} + +\def\anch_positions_action_indeed_nop + {\anch_positions_trace_action_nop} + +\def\anch_positions_action_indeed_yes % we need a way to figure out if we have actions + {\begingroup + \setbox\scratchbox\hbox % \hpack + {\anch_positions_trace_action_yes + \the\everyinsertpositionaction + \the\everypositionaction + \begincsname\??positionaction\currentpositionaction\endcsname + \anch_positions_cleanup_action}% + \smashedbox\scratchbox % smashing is really needed else we get problems with too big overlays + \endgroup} + +\protected\def\anch_positions_trace_action_nop_indeed + {\anch_positions_trace\clap\darkred{<\currentpositionaction>}} + +\protected\def\anch_positions_trace_action_yes_indeed + {\anch_positions_trace\clap\darkgreen{<\currentpositionaction>}} + +\let\anch_positions_trace_action_nop\relax +\let\anch_positions_trace_action_yes\relax + +\appendtoks + \let\anch_positions_trace_action_nop\anch_positions_trace_action_nop_indeed + \let\anch_positions_trace_action_yes\anch_positions_trace_action_yes_indeed +\to \t_anch_positions_tracers + +%D Here the complication has to do with collecting actions for later execution. This +%D collection is especially handy when we want to move actions to a specific layer. +%D Such series of actions are stored in a macro that is cleaned up after each +%D invocation. + +\def\anch_positions_cleanup_action % not in trialtypesetting + {\ifcsname\??positioncleanup\currentpositionaction\endcsname + \the\everycleanpositionaction + \setxvalue{\??positioncleanup\currentpositionaction}{\csname\??positioncleanup\currentpositionaction\endcsname}% + \fi} + +\permanent\protected\def\handlepositionaction#1\with#2\on#3% ugly, will change + {\begingroup + \edef\currentpositionanchor + {\ifempty\currentpositionoverlay#3\else\currentpositionoverlay::\MPanchoridentifier\fi}% + \normalexpanded{\anch_positions_set_action{\currentpositionanchor}{\noexpand\getvalue{\??positioncleanup\currentpositionanchor}}}% + \let#1\relax + \ifcsname\??positioncleanup\currentpositionanchor\endcsname + \setxvalue{\??positioncleanup\currentpositionanchor}% + {\csname\??positioncleanup\currentpositionanchor\endcsname#1#2}% + \else + \setxvalue{\??positioncleanup\currentpositionanchor}% + {#1#2}% + \fi + \endgroup} + +%D The first version of this module implemented head and tail anchors. Currently we +%D stick to just one anchor and derive the head and tail anchors from this one. We +%D set these anchors before and after each page. + +\newdimen\c_anch_page_width +\newdimen\c_anch_page_height + +\protected\def\anch_positions_register_page#1% this one is flushed first ! ... can't we avoid this one + {\ifpositioning\ifcase\realpageno\or + \ifdim\c_anch_page_height=\paperheight + \ifdim\c_anch_page_width=\paperwidth + % no change + \else + \c_anch_page_width \paperwidth + \c_anch_page_height\paperheight + \anch_make_page_box{#1}% \ifvbox#1\setbox#1\hpack{\box#1}\fi + \fi + \else + \c_anch_page_width \paperwidth + \c_anch_page_height\paperheight + \anch_make_page_box{#1}% \ifvbox#1\setbox#1\hpack{\box#1}\fi + \fi + \fi\fi} + +\protected\def\anch_positions_place_anchors + {\ifpositioning + \anch_positions_place_anchors_yes + \else + \anch_positions_place_anchors_nop + \fi} + +\def\anch_positions_place_anchors_yes % todo : depth pagebox + {\begingroup + \setbox\scratchbox\emptyhbox + \ht\scratchbox\textheight + \dp\scratchbox\zeropoint % redundant + \wd\scratchbox\makeupwidth + \anch_mark_text_box\scratchbox + \box\scratchbox + \endgroup} + +\def\anch_positions_place_anchors_nop + {\vkern\textheight} + +%D \macros +%D {positionoverlay,startpositionoverlay} +%D +%D As long as we're dealing with graphics it makes much sense to use the available +%D overlay mechanism. For this purpose, we define some dedicated overlay extensions. +%D +%D \startbuffer[sample] +%D \defineoverlay [sample] [\positionoverlay{sample}] +%D +%D \startpositionoverlay{sample} +%D \setMPpositiongraphic{A-1}{connectcenter}{from=A-1,to=A-2} +%D \stoppositionoverlay +%D \stopbuffer +%D +%D \typebuffer[sample] +%D +%D \startbuffer[graphic] +%D \startMPpositiongraphic{connectcenter} +%D path pa, pb ; pair ca, cb ; +%D initialize_box(\MPpos{\MPvar{from}}) ; pa := pxy ; ca := cxy ; +%D initialize_box(\MPpos{\MPvar{to}}) ; pb := pxy ; cb := cxy ; +%D draw pa withcolor red ; +%D draw pb withcolor red ; +%D draw ca -- cb withcolor blue ; +%D anchor_box(\MPanchor{\MPvar{from}}) ; +%D \stopMPpositiongraphic +%D \stopbuffer +%D +%D We can best demonstrate this in an example, say: +%D +%D \startbuffer[text] +%D \framed +%D [backgroundachtergrond=sample,align=middle,width=7cm] +%D {We want to connect \hpos {A-1} {this} word with its +%D grammatical cousin \hpos {A-2} {that}.} +%D \stopbuffer +%D +%D \typebuffer[text] +%D +%D \startlinecorrection +%D %\getbuffer[graphic,sample,text] +%D \stoplinecorrection +%D +%D The graphic is defined in the following way, using some macros defined in an +%D auxiliary \METAPOST\ module that is preloaded. +%D +%D \typebuffer[graphic] + +\def\MPanchoridentifier{mpa} % {mp-anchor} + +%D The rest of the definitions concerning such overlays may look complicated, + +\let\currentpositionoverlay\empty + +%D Position actions are automatically executed when a position is set. + +\def\textbackgroundoverlay#1{\v!text#1} +\def\MPanchornumber {\the\realpageno} + +\permanent\protected\def\positionoverlay % the test prevents too many redundant positions + {\ifpositioning % in (not used) text* position layers + \expandafter\anch_positions_overlay_indeed + \else % also \iftrialtypesetting test here? + \expandafter\gobbleoneargument + \fi} + +\def\anch_positions_overlay_indeed#1% + {\begingroup + \edef\currentpositionoverlay{#1}% + \ifcsname\??positionaction\currentpositionoverlay::\MPanchoridentifier\endcsname + \anch_positions_overlay_compose + \fi + \endgroup} + +\def\MPoverlayanchor#1{\MPpos\MPanchorid} + +\def\anch_positions_overlay_compose + {\vpack to \d_overlay_height + {%\writestatus{!!!}{\currentpositionoverlay/\MPanchoridentifier/\MPanchornumber}% + \edef\MPanchorid{\currentpositionoverlay::\MPanchoridentifier:\MPanchornumber}% realpageno + % \edef\MPanchor##1{\MPpos\MPanchorid}% + \let\MPanchor\MPoverlayanchor % no need to fetch it already, seldom used + \the\everyinsertpositionaction + \copyposition{\currentpositionoverlay::\MPanchoridentifier}\MPanchorid + \setbox\scratchbox\hbox to \d_overlay_width % \hpack + {\dopositionaction{\currentpositionoverlay::\MPanchoridentifier}\hss}% + \ht\scratchbox\d_overlay_height + \dp\scratchbox\zeropoint + \anch_mark_tagged_box\scratchbox\MPanchorid % needs an hbox + \box\scratchbox + \vfill}} + +\permanent\protected\def\positionregionoverlay % shares regions + {\ifpositioning + \expandafter\anch_positions_region_overlay_indeed + \else % also \iftrialtypesetting test here? + \expandafter\gobbletwoarguments + \fi} + +\let\currentpositionregion\empty + +\def\anch_positions_region_overlay_indeed#1#2% + {\begingroup + \edef\currentpositionregion {#1}% + \edef\currentpositionoverlay{#2}% + \ifcsname\??positionaction\currentpositionoverlay::\MPanchoridentifier\endcsname + \anch_positions_region_overlay_compose + \fi + \endgroup} + +\def\anch_positions_region_overlay_compose + {\vpack to \d_overlay_height + {\let\MPanchorid\currentpositionregion + \let\MPanchor\MPoverlayanchor % no need to fetch it already, seldom used + \the\everyinsertpositionaction + \copyposition{\currentpositionoverlay::\MPanchoridentifier}\MPanchorid + \setbox\scratchbox\hbox to \d_overlay_width % \hpack + {\dopositionaction{\currentpositionoverlay::\MPanchoridentifier}\hss}% + \ht\scratchbox\d_overlay_height + \dp\scratchbox\zeropoint + \box\scratchbox + \vfill}} + +% \let\anch_positions_overlay_nop\gobbleoneargument + +\permanent\protected\def\startpositionoverlay + {\iftrialtypesetting + \expandafter\anch_positions_overlay_start_nop + \else + \expandafter\anch_positions_overlay_start_yes + \fi} + +\def\anch_positions_overlay_start_nop#1\stoppositionoverlay + {} + +\ifdefined\checkpositionoverlays \else \let\checkpositionoverlays\relax \fi + +\let\currentpositionoverlay\empty + +\def\anch_positions_overlay_start_yes#1% + {\checkpositionoverlays + \edef\currentpositionoverlay{#1}} + +\permanent\protected\def\stoppositionoverlay + {\let\currentpositionoverlay\empty} + +%D A position graphic is a normal (non||reused) \METAPOST\ graphic, used +%D immediately, with zero dimensions, so that a sequence of them does not harm. + +\installcorenamespace{positiongraphic} +\installcorenamespace{positionmethod} +%installcorenamespace{graphicvariable} + +\newbox\b_anch_positions_graphic + +\permanent\tolerant\protected\def\startMPpositiongraphic#=#*#=#:#3\stopMPpositiongraphic % tag list mpcode + {\setgvalue{\??positiongraphic#1}{\anch_positions_meta_graphic_use{#1}{#2}{#3}}} + +\aliased\let\stopMPpositiongraphic\relax + +\def\anch_positions_meta_graphic_prepare + {\ifcsname\??graphicvariable\currentmpvariableclass:self\endcsname \else + \letvalue{\??graphicvariable\currentmpvariableclass:self}\currentposition + \fi + \ifcsname\??graphicvariable\currentmpvariableclass:from\endcsname \else + \letvalue{\??graphicvariable\currentmpvariableclass:from}\currentposition + \fi} + +\def\anch_positions_meta_graphic_use#1#2#3% + {\begingroup + \meta_prepare_variables{#2}% + \anch_positions_meta_graphic_prepare + \startMPcode#3\stopMPcode + \endgroup} + +\permanent\tolerant\protected\def\MPpositiongraphic#=#*#=% + {\ifcsname\??positionmethod#1\endcsname % method + \expandafter\anch_positions_meta_graphic_direct_method + \orelse\ifcsname\??positiongraphic#1\endcsname + \expandafter\anch_positions_meta_graphic_direct_normal + \else + \expandafter\gobbletwoarguments + \fi{#1}{#2}} + +\def\anch_positions_meta_graphic_direct_method{\anch_positions_meta_graphic_direct\??positionmethod } +\def\anch_positions_meta_graphic_direct_normal{\anch_positions_meta_graphic_direct\??positiongraphic} + +\def\anch_positions_meta_graphic_direct#1#2#3% what tag setups + {\begingroup + \setupMPvariables[#2][#3]% + \edef\currentmpvariableclass{#2}% + \anch_positions_meta_graphic_prepare + \obeyMPboxorigin % do we also set the size ? when needed this must be done in mp ... might change + \enforced\def\MPpositiongraphic{\anch_positions_meta_graphic_nested{#3}}% takes two extra arguments + \setbox\b_anch_positions_graphic\hbox % \hpack + {\ignorespaces\begincsname#1#2\endcsname\removelastspace}% + \smashbox\b_anch_positions_graphic + \box\b_anch_positions_graphic + \endgroup} + +\def\anch_positions_meta_graphic_nested#1#2#3% nesting used in prikkels / pascal (might go away) + {\begingroup + \setupMPvariables[#2][#1,#3]% + \edef\currentmpvariableclass{#2}% + \anch_positions_meta_graphic_prepare + \begincsname\??positiongraphic#2\endcsname + \endgroup}% + +\permanent\def\startMPpositionmethod#1#2\stopMPpositionmethod + {\setgvalue{\??positionmethod#1}{#2}} % todo: var list here + +\aliased\let\stopMPpositionmethod\relax + +%D Simple one position graphics. + +\permanent\tolerant\protected\def\setMPpositiongraphic#=#*#=#*#=% + {\ifempty\currentpositionoverlay + \anch_positions_set_action{#1}{\MPpositiongraphic{#2}{#3}}% + \else % silly can be one + \anch_positions_meta_graphic_handle{#1}{#2}{#3}% + \fi} + +\def\anch_positions_meta_graphic_handle#1#2#3% combine with boxes + {\handlepositionaction\anch_positions_meta_graphic_handle_indeed\with{#1}{#2}{#3}\on{#2}} + +\def\anch_positions_meta_graphic_insert#1#2#3% pos tag setups + {\ifnum\MPp{#1}=\realpageno\relax % extra saveguard + \def\currentposition{#1}\MPpositiongraphic{#2}{#3}% + \fi} + +\let\anch_positions_meta_graphic_handle_indeed\relax + +\appendtoks + \let\anch_positions_meta_graphic_handle_indeed\anch_positions_meta_graphic_insert +\to \everyinsertpositionaction + +\def\anch_positions_meta_graphic_cleanup#1#2#3% pos tag setups + {\ifnum\MPp{#1}<\realpageno \else + \noexpand\anch_positions_meta_graphic_handle_indeed{#1}{#2}{#3}% + \fi} + +\appendtoks + \let\anch_positions_meta_graphic_handle_indeed\anch_positions_meta_graphic_cleanup +\to \everycleanpositionaction + +%D Graphics that span two positions (beware, does not cross pages). + +\permanent\tolerant\protected\def\setMPpositiongraphicrange#=#*#=#*#=#*#=% + {\ifempty\currentpositionoverlay + \anch_positions_set_action{#1}{\MPpositiongraphic{#3}{#4}}% + \else + \anch_positions_meta_graphic_handle_range{#1}{#2}{#3}{#4}% + \fi} + +\def\anch_positions_meta_graphic_handle_range#1#2#3#4% + {\handlepositionaction\anch_positions_meta_graphic_handle_range_indeed\with{#1}{#2}{#3}{#4}\on{#2}} + +\def\anch_positions_meta_graphic_insert_range#1#2#3#4% pos pos tag setups + {\clf_doifelserangeonpage{#1}{#2}\realpageno + {\def\currentposition{#1}% + \MPpositiongraphic{#3}{#4}}% + {}} + +\appendtoks + \let\anch_positions_meta_graphic_handle_range_indeed\anch_positions_meta_graphic_insert_range +\to \everyinsertpositionaction + +\def\anch_positions_meta_graphic_cleanup_range#1#2#3#4% pos tag setups + {\ifnum\MPp{#2}<\realpageno \else + \noexpand \anch_positions_meta_graphic_handle_range_indeed{#1}{#2}{#3}{#4}% + \fi} + +\appendtoks + \let\anch_positions_meta_graphic_handle_range_indeed\anch_positions_meta_graphic_cleanup_range +\to \everycleanpositionaction + +\let\anch_positions_meta_graphic_handle_range_indeed\gobblefourarguments + +% Helpers: + +\permanent\def\MPgetposboxes #1#2{\clf_fetchposboxes{#1}{#2}\realpageno} +\permanent\def\MPgetmultipars#1#2{\clf_fetchmultipar{#1}{#2}\realpageno} + +\protect \endinput diff --git a/tex/context/base/mkiv/anch-snc.mkxl b/tex/context/base/mkiv/anch-snc.mkxl new file mode 100644 index 000000000..5f0246155 --- /dev/null +++ b/tex/context/base/mkiv/anch-snc.mkxl @@ -0,0 +1,160 @@ +%D \module +%D [ file=anch-snc, +%D version=2003.12.01, % actually 1999 so real old +%D title=\CONTEXT\ Anchoring Macros, +%D subtitle=Synchronization, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D The original is in the mkii file. It does more at the \TEX\ end and +%D has some more magic. If we really need that I'll add it. After all, +%D in mkiv we can do things different. + +%D TODO: bleed : + left , minus right oro check if it touches page ... autobleed + +\writestatus{loading}{ConTeXt Anchoring Macros / Synchronization} + +\registerctxluafile{anch-snc}{} + +\unprotect + +\ifx\??syncposcounter\undefined \installcorenamespace{syncposcounter} \fi +\ifx\s!syncpos \undefined \def\s!syncpos {syncpos} \fi + +\let\c_sync_n\relax + +\unexpanded\def\definesyncpositions[#1]% + {\ifcsname\??syncposcounter:#1\endcsname \else + \expandafter\newcount\csname\??syncposcounter:#1\endcsname + \fi} + +\unexpanded\def\syncposition + {\dodoubleempty\anch_sync_position} + +\def\anch_sync_position[#1][#2]% we could actually use par positions + {\dontleavehmode + \ifcsname\??syncposcounter:#1\endcsname + \let\c_sync_n\lastnamedcs + \global\advance\c_sync_n\plusone + \enabletextarearegistration + \setpositionplus{\s!syncpos:#1:\the\c_sync_n}{#2}\hpack{\strut}% + \else + \strut + \fi + \ignorespaces} + +\protect + +\continueifinputfile{anch-snc.mkiv} + +\starttext + +% \setuppapersize[A4][A3] + +\setuplayout[location=middle] + +\setupbodyfont[dejavu] + +\definesyncpositions[1] +\definesyncpositions[2] + +% \enabletrackers[metapost.lua] + +\startMPdefinitions + input "mp-asnc.mpiv" ; + + SetSyncColor(1,0,"magenta") ; + SetSyncColor(1,1,"red") ; + SetSyncColor(1,2,"green") ; + SetSyncColor(1,3,"blue") ; + SetSyncColor(1,4,"yellow") ; + + SetSyncColor(2,0,"magenta") ; + SetSyncColor(2,1,"red") ; + SetSyncColor(2,2,"green") ; + SetSyncColor(2,3,"blue") ; + SetSyncColor(2,4,"yellow") ; +\stopMPdefinitions + +\startuseMPgraphic{sync1} + StartPage ; + StartSync(1) ; + SyncHOffset := 0 ; + SyncWidth := BackSpace - LeftMarginDistance; + CollectSyncDataPage ; + % ExtendSyncPaths ; % to top of text area + PruneSyncPaths ; % clip top / bottom + CollapseSyncPaths ; + MakeSyncPaths ; + % DrawSyncPaths ; + FillSyncPaths ; + StopSync ; + clip currentpicture to Page ; + setbounds currentpicture to Page ; + StopPage ; +\stopuseMPgraphic + +\startuseMPgraphic{sync2} + StartSync(2) ; + SyncHOffset := -1cm ; + SyncWidth := 1cm ; + CollectSyncDataRegion(OverlayRegion) ; + ExtendSyncPaths ; % to top of text area + MakeSyncPaths ; + FillSyncPaths ; + StopSync ; + clip currentpicture to OverlayBox leftenlarged 1cm; + setbounds currentpicture to OverlayBox ; +\stopuseMPgraphic + +\defineoverlay[tempoverlay1][\useMPgraphic{sync1}] +\defineoverlay[tempoverlay2][\useMPgraphic{sync2}] + +\setupbackgrounds[page][background=tempoverlay1] + +\framed[region=yes,background=tempoverlay2,width=14cm,align=normal]{ + \syncposition[2][1]\samplefile{ward}\endgraf + \syncposition[2][2]\samplefile{ward}\endgraf + \syncposition[2][3]\samplefile{ward}\endgraf +} + + +\vskip1cm \hskip1cm \framed[region=yes,background=tempoverlay2,width=16cm,align=normal]{ + \syncposition[2][1]\samplefile{ward}\endgraf + \syncposition[2][2]\samplefile{ward}\endgraf + \syncposition[2][3]\samplefile{ward}\endgraf +} + +\vskip1cm \hskip1cm \framed[region=yes,background=tempoverlay2,width=10cm,align=normal]{ + \syncposition[2][1]\samplefile{ward}\endgraf + \syncposition[2][2]\samplefile{ward}\endgraf + \syncposition[2][3]\samplefile{ward}\endgraf +} + + +\dorecurse {100} { +% \dorecurse {1} { + \startchapter[title={Test #1}] + \syncposition[1][1,reset]\dorecurse{20}{\samplefile{ward}\endgraf} + \syncposition[1][2]\dorecurse {4}{\samplefile{ward}\endgraf} + \syncposition[1][3]\dorecurse {7}{\samplefile{ward}\endgraf} + \syncposition[1][4]\dorecurse {3}{\samplefile{ward}\endgraf} + \stopchapter +} + +\dorecurse {100} { +% \dorecurse {1} { + \startchapter[title={Test #1}] + \syncposition[1][1]\dorecurse{1}{\samplefile{ward}\endgraf} + \syncposition[1][2]\dorecurse{1}{\samplefile{ward}\endgraf} + \syncposition[1][3]\dorecurse{1}{\samplefile{ward}\endgraf} + \syncposition[1][4]\dorecurse{1}{\samplefile{ward}\endgraf} + \stopchapter +} + +\stoptext diff --git a/tex/context/base/mkiv/anch-tab.mkxl b/tex/context/base/mkiv/anch-tab.mkxl index 0cc0b6dc9..8f4bb0b5b 100644 --- a/tex/context/base/mkiv/anch-tab.mkxl +++ b/tex/context/base/mkiv/anch-tab.mkxl @@ -87,19 +87,26 @@ \protected\def\tablepos {\normalexpanded{\global\posXCtoks\emptytoks\the\posXCtoks}} -\permanent\tolerant\protected\def\tbXC [#1]{\anch_table_check_state\ifparameters#1\or\anch_tables_indeed_XC [#1]\else\expandafter\NC\fi} -\permanent\tolerant\protected\def\tbGSC[#1]{\anch_table_check_state\ifparameters#1\or\anch_tables_indeed_GSC[#1]\else\expandafter\NC\fi} -\permanent\tolerant\protected\def\tbGFC[#1]{\anch_table_check_state\ifparameters#1\or\anch_tables_indeed_GFC[#1]\else\expandafter\NC\fi} -\permanent\tolerant\protected\def\tbGTC[#1]{\anch_table_check_state\ifparameters#1\or\anch_tables_indeed_GTC[#1]\else\expandafter\NC\fi} +\permanent\protected\def\tbXC {\anch_table_checked\anch_tables_indeed_XC } +\permanent\protected\def\tbGSC{\anch_table_checked\anch_tables_indeed_GSC} +\permanent\protected\def\tbGFC{\anch_table_checked\anch_tables_indeed_GFC} +\permanent\protected\def\tbGTC{\anch_table_checked\anch_tables_indeed_GTC} -\def\anch_table_check_state +\tolerant\def\anch_table_checked#1[#2]% {\iftrialtypesetting \global\settrue\tablehaspositions - \firstargumentfalse - \fi} + \expandafter\anch_tables_indeed_NC + \orelse\ifparameter#2\or + \expandafter#1% + \else + \expandafter\anch_tables_indeed_NC + \fi[#2]} + +\def\anch_tables_indeed_NC[#1]% + {\NC} \def\anch_tables_indeed_XC[#1]% - {{\overloaded\let\NC\relax\processcommalist[#1]\anch_tables_step_XC}} + {{\enforced\let\NC\relax\processcommalist[#1]\anch_tables_step_XC}} \def\anch_tables_step_XC#1% {\anch_tables_step_indeed_XC[#1]} diff --git a/tex/context/base/mkiv/catc-act.mkxl b/tex/context/base/mkiv/catc-act.mkxl new file mode 100644 index 000000000..4ccf22a7f --- /dev/null +++ b/tex/context/base/mkiv/catc-act.mkxl @@ -0,0 +1,51 @@ +%D \module +%D [ file=catc-act, +%D version=2006.09.18, +%D title=\CONTEXT\ Catcode Macros, +%D subtitle=Default Catcode Tables, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +%D \macros +%D {installactivecharacter, defineactivecharacter} +%D +%D This module deals with some active character handling and I still need to +%D update it to use \typ {\letcharcode <number> = \something}. This module +%D will be simplified stepwise. Look into the \MKIV\ variant for originals. +%D +%D There was a time when we had active double quotes and such but we no longer +%D do that. In fact, only the tilde and bar can be active in \CONTEXT. +%D +%D For those who love the more obscure features of \TEX: whenever you see +%D uppercase magic with active characters, keep in mind that this is something +%D deep down in the engine: handling of that specific case. The code here is +%D not used and not really tested. + +\permanent\protected\def\installactivecharacter#1 % + {\ifchknum#1\or + \scratchcounter #1\edef\scratchmacro{\expandtoken\othercatcode\scratchcounter}% + \else + \scratchcounter`#1\let \scratchmacro #1% + \fi + \normalexpanded{\startextendcatcodetable\ctxcatcodes\catcode\the\scratchcounter\activecatcode\stopextendcatcodetable}% + \letcatcodecommand \ctxcatcodes \scratchcounter \scratchmacro + \ifnum\currentcatcodetable=\ctxcatcodes \setcatcodetable\ctxcatcodes \fi} + +\permanent\protected\def\defineactivecharacter #1 #2% + {\ifchknum#1\or\letcharcode#1=#2\relax\else\letcharcode`#1=#2\relax\fi} + +\permanent\protected\def\makecharacteractive #1 % + {\catcode`#1\activecatcode} + +\permanent\protected\def\installanddefineactivecharacter #1 #2% + {\normalexpanded{\installactivecharacter \utfchar{#1} }% + \defineactivecharacter #1 #2} + +\protect \endinput diff --git a/tex/context/base/mkiv/catc-def.mkxl b/tex/context/base/mkiv/catc-def.mkxl new file mode 100644 index 000000000..e93345e1c --- /dev/null +++ b/tex/context/base/mkiv/catc-def.mkxl @@ -0,0 +1,147 @@ +%D \module +%D [ file=catc-def, +%D version=2006.09.18, +%D title=\CONTEXT\ Catcode Macros, +%D subtitle=Default Tables, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D The following catcode tables are rather \CONTEXT\ independent. + +\ifdefined\nilcatcodes \else \newcatcodetable \nilcatcodes \fi +\ifdefined\texcatcodes \else \newcatcodetable \texcatcodes \fi +\ifdefined\luacatcodes \else \newcatcodetable \luacatcodes \fi +\ifdefined\notcatcodes \else \newcatcodetable \notcatcodes \fi +\ifdefined\vrbcatcodes \else \newcatcodetable \vrbcatcodes \fi +\ifdefined\prtcatcodes \else \newcatcodetable \prtcatcodes \fi + +\startcatcodetable \nilcatcodes + \catcode\tabasciicode \spacecatcode + \catcode\endoflineasciicode \endoflinecatcode + \catcode\formfeedasciicode \endoflinecatcode + \catcode\spaceasciicode \spacecatcode + \catcode\endoffileasciicode \ignorecatcode +\stopcatcodetable + +\startcatcodetable \texcatcodes + \catcode\tabasciicode \spacecatcode + \catcode\endoflineasciicode \endoflinecatcode + \catcode\formfeedasciicode \endoflinecatcode + \catcode\spaceasciicode \spacecatcode + \catcode\endoffileasciicode \ignorecatcode + \catcode\circumflexasciicode\superscriptcatcode + \catcode\underscoreasciicode\subscriptcatcode + \catcode\ampersandasciicode \alignmentcatcode + \catcode\backslashasciicode \escapecatcode + \catcode\leftbraceasciicode \begingroupcatcode + \catcode\rightbraceasciicode\endgroupcatcode + \catcode\dollarasciicode \mathshiftcatcode + \catcode\hashasciicode \parametercatcode + \catcode\commentasciicode \commentcatcode +\stopcatcodetable + +\startcatcodetable \luacatcodes + \catcode\tabasciicode \othercatcode + \catcode\endoflineasciicode \othercatcode + \catcode\formfeedasciicode \othercatcode + \catcode\spaceasciicode \othercatcode + \catcode\endoffileasciicode \ignorecatcode + \catcode\circumflexasciicode\othercatcode + \catcode\underscoreasciicode\othercatcode + \catcode\ampersandasciicode \othercatcode + \catcode\backslashasciicode \escapecatcode + \catcode\commentasciicode \othercatcode + \catcode\hashasciicode \othercatcode + \catcode\barasciicode \othercatcode + \catcode\leftbraceasciicode \othercatcode + \catcode\rightbraceasciicode\othercatcode + \catcode\tildeasciicode \othercatcode + \catcode\dollarasciicode \othercatcode +\stopcatcodetable + +\startcatcodetable \notcatcodes % probably less needed + \catcode\tabasciicode \spacecatcode + \catcode\endoflineasciicode \endoflinecatcode + \catcode\formfeedasciicode \endoflinecatcode + \catcode\spaceasciicode \spacecatcode + \catcode\endoffileasciicode \ignorecatcode + \catcode\circumflexasciicode \othercatcode + \catcode\underscoreasciicode \othercatcode + \catcode\ampersandasciicode \othercatcode + \catcode\tildeasciicode \othercatcode + \catcode\hashasciicode \othercatcode + \catcode\dollarasciicode \othercatcode + \catcode\commentasciicode \othercatcode + \catcode\lessthanasciicode \othercatcode + \catcode\morethanasciicode \othercatcode + \catcode\leftbraceasciicode \othercatcode + \catcode\rightbraceasciicode \othercatcode + \catcode\doublequoteasciicode \othercatcode + \catcode\singlequoteasciicode \othercatcode + \catcode\forwardslashasciicode\othercatcode + \catcode\backslashasciicode \othercatcode + \catcode\barasciicode \othercatcode +\stopcatcodetable + +\startcatcodetable \vrbcatcodes % probably less needed + \catcode\tabasciicode \othercatcode + \catcode\endoflineasciicode\othercatcode + \catcode\formfeedasciicode \othercatcode + \catcode\spaceasciicode \othercatcode + \catcode\endoffileasciicode\othercatcode +\stopcatcodetable + +\startcatcodetable \prtcatcodes + \catcode\tabasciicode \spacecatcode + \catcode\endoflineasciicode \endoflinecatcode + \catcode\formfeedasciicode \endoflinecatcode + \catcode\spaceasciicode \spacecatcode + \catcode\endoffileasciicode \ignorecatcode + \catcode\circumflexasciicode \superscriptcatcode + %catcode\underscoreasciicode \subscriptcatcode + \catcode\underscoreasciicode \lettercatcode + \catcode\ampersandasciicode \alignmentcatcode + \catcode\backslashasciicode \escapecatcode + \catcode\leftbraceasciicode \begingroupcatcode + \catcode\rightbraceasciicode \endgroupcatcode + \catcode\dollarasciicode \mathshiftcatcode + \catcode\hashasciicode \parametercatcode + \catcode\commentasciicode \commentcatcode + \catcode\atsignasciicode \lettercatcode + \catcode\exclamationmarkasciicode\lettercatcode + \catcode\questionmarkasciicode \lettercatcode + \catcode\tildeasciicode \activecatcode + \catcode\barasciicode \activecatcode +\stopcatcodetable + +%D Because some characters have a special meaning, we provide shortcuts to their +%D character representation. Some will be overloaded (which might change). + +\chardef \^ = \circumflexasciicode +\chardef \_ = \underscoreasciicode +\chardef \& = \ampersandasciicode +\chardef \% = \commentasciicode +\chardef \# = \hashasciicode +\chardef \$ = \dollarasciicode +\chardef \{ = \leftbraceasciicode +\chardef \} = \rightbraceasciicode +\chardef \\ = \backslashasciicode +\chardef \| = \barasciicode + +% way too wide in lm, so one can also use: +% +% \def\_{\dontleavehmode \kern.06em \vbox{\hrule width.3em}} % this will become a \chardef + +%D From now on we can use the protection mechanisms. + +\permanent\protected\def\unprotect{\pushcatcodetable\setcatcodetable\prtcatcodes} +\permanent\protected\def\protect {\popcatcodetable} + +% \prependtoks \catcodetable\ctxcatcodes \to \everyjob + +\endinput diff --git a/tex/context/base/mkiv/catc-ini.mkxl b/tex/context/base/mkiv/catc-ini.mkxl index c32ba5fc1..1dcd2107f 100644 --- a/tex/context/base/mkiv/catc-ini.mkxl +++ b/tex/context/base/mkiv/catc-ini.mkxl @@ -92,7 +92,7 @@ {\global\advance\c_syst_catcodes_n\plusone \global\defcsname\??catcodetablen\number\c_syst_catcodes_n\endcsname{\string#1}% logging %\setnewconstant#1\c_syst_catcodes_n - \overloaded\integerdef#1\c_syst_catcodes_n + \immutable\integerdef#1\c_syst_catcodes_n \ctxcommand{registercatcodetable("\expandafter\gobbleoneargument\string#1",\number#1)}} \newtoks \everysetdefaultcatcodes @@ -127,7 +127,7 @@ \permanent\protected\def\permitcircumflexescape % to be used grouped {\catcode\circumflexasciicode\superscriptcatcode} -\let\permitcaretescape\permitcircumflexescape +\aliased\let\permitcaretescape\permitcircumflexescape % == % @@ -148,9 +148,9 @@ %D Once a catcode is assigned, the next assignments will happen faster. However, %D redefinitions probably happen seldom so it's sort of overkill. -\permanent\def\letcatcodecommand{\afterassignment\syst_catcodes_let_a\c_syst_catcodes_a} -\permanent\def\defcatcodecommand{\afterassignment\syst_catcodes_def_a\c_syst_catcodes_a} -\permanent\def\uedcatcodecommand{\afterassignment\syst_catcodes_ued_a\c_syst_catcodes_a} +\permanent\protected\def\letcatcodecommand{\afterassignment\syst_catcodes_let_a\c_syst_catcodes_a} +\permanent\protected\def\defcatcodecommand{\afterassignment\syst_catcodes_def_a\c_syst_catcodes_a} +\permanent\protected\def\uedcatcodecommand{\afterassignment\syst_catcodes_ued_a\c_syst_catcodes_a} \def\syst_catcodes_let_a{\afterassignment\syst_catcodes_let_b\c_syst_catcodes_b} \def\syst_catcodes_def_a{\afterassignment\syst_catcodes_def_b\c_syst_catcodes_b} diff --git a/tex/context/base/mkiv/catc-sym.mkxl b/tex/context/base/mkiv/catc-sym.mkxl new file mode 100644 index 000000000..5334d7723 --- /dev/null +++ b/tex/context/base/mkiv/catc-sym.mkxl @@ -0,0 +1,95 @@ +%D \module +%D [ file=catc-sym, +%D version=1997.01.03, % moved code +%D title=\CONTEXT\ Catcode Macros, +%D subtitle=Some Handy Constants, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D The following definitions can be used for mapping special characters onto +%D letters, although we cheat a bit: they actually are of category other but +%D for users that distinction doesn't matter here. The definitions in \MKII\ +%D and \MKIV\ look more impressive but here we use a \LUAMETATEX\ feature +%D that permits a more direct definition (that also looks nice with the +%D \CONTEXT\ syntax highlighting): + +\immutable\edef\letterleftbrace {\expandtoken \othercatcode \leftbraceasciicode} +\immutable\edef\letterrightbrace {\expandtoken \othercatcode \rightbraceasciicode} +\immutable\edef\letterampersand {\expandtoken \othercatcode \ampersandasciicode} +\immutable\edef\letterless {\expandtoken \othercatcode \lessthanasciicode} +\immutable\edef\lettermore {\expandtoken \othercatcode \morethanasciicode} +\immutable\edef\letterhash {\expandtoken \othercatcode \hashasciicode} +\immutable\edef\letterdoublequote {\expandtoken \othercatcode \doublequoteasciicode} +\immutable\edef\lettersinglequote {\expandtoken \othercatcode \singlequoteasciicode} +\immutable\edef\letterdollar {\expandtoken \othercatcode \dollarasciicode} +\immutable\edef\letterpercent {\expandtoken \othercatcode \percentasciicode} +\immutable\edef\letterhat {\expandtoken \othercatcode \circumflexasciicode} +\immutable\edef\letterunderscore {\expandtoken \othercatcode \underscoreasciicode} +\immutable\edef\letterbar {\expandtoken \othercatcode \barasciicode} +\immutable\edef\lettertilde {\expandtoken \othercatcode \tildeasciicode} +\immutable\edef\letterbackslash {\expandtoken \othercatcode \backslashasciicode} +\immutable\edef\letterslash {\expandtoken \othercatcode \forwardslashasciicode} +\immutable\edef\letterquestionmark {\expandtoken \othercatcode \questionmarkasciicode} +\immutable\edef\letterexclamationmark {\expandtoken \othercatcode \exclamationmarkasciicode} +\immutable\edef\letterat {\expandtoken \othercatcode \atsignasciicode} +\immutable\edef\lettercolon {\expandtoken \othercatcode \colonasciicode} + +\immutable\edef\letterleftparenthesis {\expandtoken \othercatcode \leftparentasciicode} +\immutable\edef\letterrightparenthesis {\expandtoken \othercatcode \rightparentasciicode} +\immutable\edef\letterleftbracket {\expandtoken \othercatcode \leftbracketasciicode} +\immutable\edef\letterrightbracket {\expandtoken \othercatcode \rightbracketasciicode} + +\aliased\let\letterescape \letterbackslash +\aliased\let\letterbgroup \letterleftbrace +\aliased\let\letteregroup \letterrightbrace +\aliased\let\letteropenbrace \letterleftbrace +\aliased\let\letterclosebrace\letterrightbrace + +\unprotect + +%immutable\edef\_n_u_l_{\expandtoken \othercatcode \zerocount} % nul(l) +%immutable\edef\_s_o_h_{\expandtoken \othercatcode \plusone } % start of header ^^^^0001 +\immutable\edef\_s_t_x_{\expandtoken \othercatcode \plustwo } % start of text ^^^^0002 +\immutable\edef\_e_t_x_{\expandtoken \othercatcode \plusthree} % end of text ^^^^0003 +\immutable\edef\_e_o_t_{\expandtoken \othercatcode \plusfour } % end of transmission ^^^^0004 +%immutable\edef\_e_n_q_{\expandtoken \othercatcode \plusfive } % enquiry +%immutable\edef\_a_c_k_{\expandtoken \othercatcode \plussix } % aknowledgement + +\protect + +%D \macros +%D {uncatcodespecials,setnaturalcatcodes,setnormalcatcodes, +%D uncatcodecharacters,uncatcodeallcharacters, +%D uncatcodespacetokens} +%D +%D The following macros are more or less replaced by switching to a catcode table +%D (which we simulate in \MKII) but we keep them for convenience and compatibility. +%D Some old engine code has been removed. A few ar still used a few times so I need +%D to clean that up. + +%permanent\protected\def\uncatcodespecials {\setcatcodetable\nilcatcodes \uncatcodespacetokens} +%permanent\protected\def\setnaturalcatcodes {\setcatcodetable\nilcatcodes} +\permanent\protected\def\setnormalcatcodes {\setcatcodetable\ctxcatcodes} % maybe \texcatcodes +%permanent\protected\def\uncatcodecharacters {\setcatcodetable\nilcatcodes} % was fast version, gone now +%permanent\protected\def\uncatcodeallcharacters{\setcatcodetable\nilcatcodes} % was slow one, with restore + +\permanent\protected\def\uncatcodespacetokens + {\catcode\spaceasciicode \spacecatcode + \catcode\tabasciicode \spacecatcode + \catcode\formfeedasciicode \endoflinecatcode + \catcode\endoflineasciicode\endoflinecatcode + \catcode\delasciicode \ignorecatcode} + +%D These two are probably no longer needed, but we keep them for a while. Some more +%D explanation can be foun din the mkiv variant of this module, where we also +%D discuss side effects. It's time to move on, so these might go away some day. + +\aliased \let\rescan \scantextokens +\permanent\def\rescanwithsetup#1#2{\begingroup\directsetup{#1}\scantextokens{#2}\endgroup} + +\endinput diff --git a/tex/context/base/mkiv/char-act.mkxl b/tex/context/base/mkiv/char-act.mkxl index bdc5b0717..3fb4d2da6 100644 --- a/tex/context/base/mkiv/char-act.mkxl +++ b/tex/context/base/mkiv/char-act.mkxl @@ -79,34 +79,21 @@ % but ... as we don't want to freeze to \obeyedspace etc which can be set after % \obeyspaces, we use an idirectness -\def\_obeyed_space_{\obeyedspace} -\def\_obeyed_tab_ {\obeyedtab} -\def\_obeyed_line_ {\obeyedline} -\def\_obeyed_page_ {\obeyedpage} - -\permanent\protected\def\obeyspaces {\catcode\spaceasciicode \activecatcode\enforced\letcharcode\spaceasciicode \_obeyed_space_} -\permanent\protected\def\obeytabs {\catcode\tabasciicode \activecatcode\enforced\letcharcode\tabasciicode \_obeyed_tab_} -\permanent\protected\def\obeylines {\catcode\endoflineasciicode\activecatcode\enforced\letcharcode\endoflineasciicode\_obeyed_line_} -\permanent\protected\def\obeypages {\catcode\formfeedasciicode \activecatcode\enforced\letcharcode\formfeedasciicode \_obeyed_page_} - -\permanent\protected\def\ignoretabs {\catcode\tabasciicode \activecatcode\enforced\letcharcode\tabasciicode \_obeyed_space_} -\permanent\protected\def\ignorelines{\catcode\endoflineasciicode\activecatcode\enforced\letcharcode\endoflineasciicode\_obeyed_space_} +\def\syst_obeyed_space{\obeyedspace} +\def\syst_obeyed_tab {\obeyedtab} +\def\syst_obeyed_line {\obeyedline} +\def\syst_obeyed_page {\obeyedpage} + +\permanent\protected\def\obeyspaces {\catcode\spaceasciicode \activecatcode\enforced\letcharcode\spaceasciicode \syst_obeyed_space} +\permanent\protected\def\obeytabs {\catcode\tabasciicode \activecatcode\enforced\letcharcode\tabasciicode \syst_obeyed_tab } +\permanent\protected\def\obeylines {\catcode\endoflineasciicode\activecatcode\enforced\letcharcode\endoflineasciicode\syst_obeyed_line } +\permanent\protected\def\obeypages {\catcode\formfeedasciicode \activecatcode\enforced\letcharcode\formfeedasciicode \syst_obeyed_page } + +\permanent\protected\def\ignoretabs {\catcode\tabasciicode \activecatcode\enforced\letcharcode\tabasciicode \syst_obeyed_space} +\permanent\protected\def\ignorelines{\catcode\endoflineasciicode\activecatcode\enforced\letcharcode\endoflineasciicode\syst_obeyed_space} \permanent\protected\def\ignorepages{\catcode\formfeedasciicode \ignorecatcode} \permanent\protected\def\ignoreeofs {\catcode\endoffileasciicode\ignorecatcode} -\permanent\protected\def\setcontrolspaces{\catcode\spaceasciicode\activecatcode\enforced\letcharcode\spaceasciicode\_control_space_} - -%D \macros -%D {naturaltextext} -%D -%D When one uses \ETEX, switching to normal \TEX\ is possible too. We also introduce -%D a switch that can be used in the drivers and set in higher level shell macros. - -\permanent\protected\def\naturaltextext#1\relax % this command will become obsolete - {\begingroup - \def\ascii{#1}% - \setcatcodetable\ctxcatcodes - \prettynaturalfont{\scantextokens\expandafter{\ascii}\ifhmode\unskip\fi}% - \endgroup} +\permanent\protected\def\setcontrolspaces{\catcode\spaceasciicode\activecatcode\enforced\letcharcode\spaceasciicode\controlspace} \endinput \protect diff --git a/tex/context/base/mkiv/chem-ini.mkxl b/tex/context/base/mkiv/chem-ini.mkxl new file mode 100644 index 000000000..55bbbd874 --- /dev/null +++ b/tex/context/base/mkiv/chem-ini.mkxl @@ -0,0 +1,53 @@ +%D \module +%D [ file=chem-ini, +%D version=2008.03.06, +%D subtitle=Chemistry, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% todo: \mathscriptsmode + +\writestatus{loading}{ConTeXt Chemistry Macros / Initialization} % might become Inline + +\registerctxluafile{chem-ini}{} + +\unprotect + +% todo: use \mathscriptsmode if needed + +%D \macros +%D {molecule} +%D +%D Quick and dirty: +%D +%D \starttyping +%D \unexpanded\def\molecule#1% +%D {$\enablesupersub\tf#1$} +%D \stoptyping +%D +%D Using \LUA: +%D +%D \startbuffer +%D \molecule{H_2SO_4^-2} +%D \molecule{H_2SO_4^{-2}} +%D \molecule{H_2SO_4^{-2{x}}} +%D \stopbuffer +%D +%D \typebuffer \getbuffer + +\permanent\protected\def\molecule#1% todo: can become a public implementor + {\clf_molecule{#1}} + +%D For old times sake: + +\permanent\protected\def\chem#1#2#3% + {\dontleavehmode\begingroup#1\lohi{#2}{#3}\endgroup} + +\protect \endinput + + diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 0f6cc7c6b..1389645e0 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2020.11.15 20:40} +\newcontextversion{2020.11.16 19:37} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index e0941a513..97762871c 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -45,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2020.11.15 20:40} +\edef\contextversion{2020.11.16 19:37} %D Kind of special: diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl index e417248eb..ea5d97d8f 100644 --- a/tex/context/base/mkiv/context.mkxl +++ b/tex/context/base/mkiv/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2020.11.15 20:40} +\edef\contextversion{2020.11.16 19:37} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error @@ -95,10 +95,10 @@ \loadmarkfile{luat-soc} \loadmkxlfile{catc-ini} -\loadmarkfile{catc-act} -\loadmarkfile{catc-def} +\loadmkxlfile{catc-act} +\loadmkxlfile{catc-def} \loadmkxlfile{catc-ctx} -\loadmarkfile{catc-sym} +\loadmkxlfile{catc-sym} \loadmkxlfile{toks-ini} \loadmkxlfile{cldf-ini} @@ -153,7 +153,7 @@ \loadmkxlfile{attr-ini} -\loadmarkfile{core-ini} +\loadmkxlfile{core-ini} \loadmkxlfile{core-env} \loadmkxlfile{layo-ini} @@ -187,16 +187,16 @@ \loadmarkfile{supp-ran} \loadmkxlfile{supp-mat} -\loadmarkfile{core-uti} +\loadmkxlfile{core-uti} \loadmklxfile{file-job} \loadmkxlfile{anch-pos} -\loadmarkfile{typo-ini} +\loadmkxlfile{typo-ini} \loadmarkfile{typo-lin} \loadmarkfile{typo-bld} % par builders -\loadmarkfile{typo-inj} +\loadmkxlfile{typo-inj} \loadmklxfile{file-syn} \loadmklxfile{file-mod} @@ -216,9 +216,8 @@ \loadmkxlfile{unic-ini} -% \loadmarkfile{core-uti} -\loadmarkfile{core-two} -\loadmarkfile{core-dat} +\loadmkxlfile{core-two} +\loadmkxlfile{core-dat} \loadmkxlfile{colo-ini} \loadmkxlfile{colo-grp} % optional @@ -332,7 +331,7 @@ \loadmkvifile{page-lin} \loadmarkfile{page-par} \loadmarkfile{typo-pag} -\loadmarkfile{typo-mar} +\loadmkxlfile{typo-mar} \loadmarkfile{typo-itm} \loadmarkfile{buff-ini} @@ -423,8 +422,8 @@ \loadmarkfile{typo-krn} \loadmkvifile{typo-itc} \loadmkxlfile{typo-dir} -\loadmarkfile{typo-brk} -\loadmarkfile{typo-cap} +\loadmkxlfile{typo-brk} +\loadmkxlfile{typo-cap} \loadmarkfile{typo-dig} \loadmarkfile{typo-rep} \loadmkvifile{typo-txt} @@ -469,11 +468,11 @@ \loadmarkfile{page-plg} \loadmarkfile{page-str} -\loadmarkfile{anch-pgr} % can be moved up (nicer for dependencies) -\loadmkvifile{anch-bck} +\loadmkxlfile{anch-pgr} % can be moved up (nicer for dependencies) +\loadmklxfile{anch-bck} \loadmkxlfile{anch-tab} % overloads tabl-tbl -\loadmarkfile{anch-bar} -%loadmarkfile{anch-snc} % when needed this one will be redone +\loadmkxlfile{anch-bar} +%loadmkxlfile{anch-snc} % when needed this one will be redone \loadmkxlfile{math-ini} % way after font-pre ! \loadmkxlfile{math-pln} @@ -497,7 +496,7 @@ \loadmarkfile{strc-mat} -\loadmarkfile{chem-ini} +\loadmkxlfile{chem-ini} \loadmkxlfile{chem-str} \loadmkxlfile{typo-scr} @@ -555,9 +554,9 @@ \loadmkxlfile{cldf-ver} % verbatim, this can come late \loadmkxlfile{cldf-com} % commands, this can come late -\loadmarkfile{core-ctx} % this order might change but we need to check depedencies / move to another namespace +\loadmkxlfile{core-ctx} % this order might change but we need to check depedencies / move to another namespace -\loadmarkfile{core-def} +\loadmkxlfile{core-def} %usemodule[x][res-04] % xml resource libraries %usemodule[x][res-08] % rlx runtime conversion diff --git a/tex/context/base/mkiv/core-ctx.mkxl b/tex/context/base/mkiv/core-ctx.mkxl new file mode 100644 index 000000000..77fb0f139 --- /dev/null +++ b/tex/context/base/mkiv/core-ctx.mkxl @@ -0,0 +1,29 @@ +%D \module +%D [ file=core-ctx, +%D version=2006.08.16, % old stuff +%D title=\CONTEXT\ Core Macros, +%D subtitle=Job Control, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Core Macros / Job Control} + +\registerctxluafile{core-ctx}{} + +\unprotect + +% called directly in core-def.mkiv +% +% \unexpanded\def\job_options_get_commandline {\clf_setdocumentcommandline} +% \unexpanded\def\job_options_get_ctxfile {\clf_setdocumentctxfile} +% \unexpanded\def\job_options_set_modes {\clf_setdocumentmodes} +% \unexpanded\def\job_options_set_modules {\clf_setdocumentmodules} +% \unexpanded\def\job_options_set_environments{\clf_setdocumentenvironments} +% \unexpanded\def\job_options_set_filenames {\clf_setdocumentfilenames} + +\protect \endinput diff --git a/tex/context/base/mkiv/core-dat.mkxl b/tex/context/base/mkiv/core-dat.mkxl new file mode 100644 index 000000000..7360a4e46 --- /dev/null +++ b/tex/context/base/mkiv/core-dat.mkxl @@ -0,0 +1,110 @@ +%D \module +%D [ file=core-dat, +%D version=20122.04.17, % replaces core-two from 1997.03.31, +%D title=\CONTEXT\ Core Macros, +%D subtitle=Multipass Datasets, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Core Macros / Multipass Datasets} + +%D \starttyping +%D \definedataset[test-1] +%D \definedataset[test-2][delay=yes] +%D +%D \startlines +%D set 1: \setdataset[test-1][whatever=this-or-that-1] +%D set 2: \setdataset[test-2][whatever=this-or-that-2] +%D set 3: \setdataset[test-2][whatever=this-or-that-3] +%D \stoplines +%D +%D \startlines +%D get 1: \datasetvariable{test-1}{1}{whatever} / \datasetvariable{test-1}{1}{realpage} +%D get 2: \datasetvariable{test-2}{1}{whatever} / \datasetvariable{test-2}{1}{realpage} +%D get 3: \datasetvariable{test-2}{2}{whatever} / \datasetvariable{test-2}{2}{realpage} +%D \stoplines +%D \stoptyping + +\unprotect + +\registerctxluafile{core-dat}{} + +\installcorenamespace{dataset} + +\installcommandhandler \??dataset {dataset} \??dataset + +\permanent\tolerant\protected\def\setdataset[#1]#*[#2]#*[#3]% + {\begingroup + \edef\currentdataset{#1}% + \ifparameters\or\or + \clf_setdataset + name {\currentdataset}% + delay {\datasetparameter\c!delay}% + data {#2}% + \relax + \or + \edef\currentdataset{#1}% + \clf_setdataset + name {\currentdataset}% + tag {#2}% + delay {\datasetparameter\c!delay}% + data {#3}% + \relax + \fi + \endgroup} + +\permanent\def\datasetvariable#1#2#3% + {\clf_datasetvariable{#1}{#2}{#3}} + +\installcorenamespace{pagestate} +\installcorenamespace{pagestatecounter} + +\installcommandhandler \??pagestate {pagestate} \??pagestate + +\def\syst_pagestates_allocate + {\expandafter\newcount\csname\??pagestatecounter\currentpagestate\endcsname} + +\appendtoks + \syst_pagestates_allocate +\to \everydefinepagestate + +\setuppagestate + [\c!delay=\v!yes] + +\permanent\tolerant\protected\def\setpagestate[#1]#*[#2]% + {\begingroup + \edef\currentpagestate{#1}% + \ifcsname\??pagestatecounter\currentpagestate\endcsname + \scratchcounter\lastnamedcs + \advance\scratchcounter\plusone + \else + \scratchcounter\plusone + \syst_pagestates_allocate + \fi + \global\csname\??pagestatecounter\currentpagestate\endcsname\scratchcounter + \clf_setpagestate + name {\currentpagestate}% + tag {\ifparameter#2\or#2\else\number\scratchcounter\fi}% + delay {\pagestateparameter\c!delay}% + \relax + \endgroup} + +\permanent\protected\def\autosetpagestate#1% + {\syst_pagestates_set[#1]\relax} + +\permanent\def\autopagestatenumber#1{\begincsname\??pagestatecounter#1\endcsname} + +\permanent\def\pagestaterealpage #1#2{\clf_pagestaterealpage {#1}{#2}} +\permanent\def\setpagestaterealpageno#1#2{\clf_setpagestaterealpageno{#1}{#2}} +\permanent\def\pagestaterealpageorder#1#2{\clf_pagestaterealpageorder{#1}#2\relax} + +\permanent\def\autopagestaterealpage #1{\clf_pagestaterealpage {#1}{\number\autopagestatenumber{#1}}} +\permanent\def\setautopagestaterealpageno#1{\clf_setpagestaterealpageno{#1}{\number\autopagestatenumber{#1}}} +\permanent\def\autopagestaterealpageorder#1{\clf_pagestaterealpageorder{#1}\numexpr\autopagestatenumber{#1}\relax} + +\protect diff --git a/tex/context/base/mkiv/core-def.mkiv b/tex/context/base/mkiv/core-def.mkiv index b1d984ae5..b09d5b28f 100644 --- a/tex/context/base/mkiv/core-def.mkiv +++ b/tex/context/base/mkiv/core-def.mkiv @@ -49,13 +49,6 @@ \typo_firstline_handle \to \everypar -\ifcase\contextlmtxmode \else - \appendtoks - \spac_paragraph_wrap - \spac_paragraph_freeze - \to \everypar -\fi - \appendtoks \flushnotes \to \everydisplay diff --git a/tex/context/base/mkiv/core-def.mkxl b/tex/context/base/mkiv/core-def.mkxl new file mode 100644 index 000000000..a413b8738 --- /dev/null +++ b/tex/context/base/mkiv/core-def.mkxl @@ -0,0 +1,182 @@ +%D \module +%D [ file=core-def, +%D version=2002.05.07, +%D title=\CONTEXT\ Core Macros, +%D subtitle=Defaults, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Core Macros / Defaults} + +%D Here we collect settings that cannot be done earlier due to +%D depedencies. More code will moved to this module later. + +\unprotect + +\usesymbols[mis,nav] % no longer mvs preloaded + +\setupsymbolset[navigation 1] + +\setupinteraction[\c!symbolset=navigation 1] + +% what a mess + +\everypar \emptytoks +\neverypar \emptytoks + +\appendtoks + % \flushnotes + \page_otr_command_synchronize_side_floats % an otr specific command + \checkindentation + \showparagraphnumber + \restoreinterlinepenalty + % \flushmargincontents + % \flushcommentanchors + \flushnotes + \synchronizenotes + % \OTRSETshowstatus + \registerparoptions + % \flushsyncpositions + \flushpostponednodedata + \typo_delimited_repeat + \insertparagraphintro + \typo_initial_handle + \typo_firstline_handle + % + \spac_paragraph_wrap + \spac_paragraph_freeze +\to \everypar + +\appendtoks + \flushnotes +\to \everydisplay + +% \appendtoks +% \adjustsidefloatdisplaylines +% \to \everydisplay + +% \appendtoks +% \flushpostponednodedata +% \to \neverypar + +% \appendtoks +% \flushsyncpositions +% \to \everyheadstart + +% \appendtoks +% \flushsyncresets +% \to \everyendoftextbody + +\appendtoks + \ignorespaces +\to \everybeginofpar + +\appendtoks + \removeunwantedspaces + % \strut % option ? + % \flushsyncresets + % \setlastlinewidth % gone, will be done in lua + \endgraf +\to \everyendofpar + +% initialization order: + +\ifdefined\font_preloads_at_every_job \else \let\font_preloads_at_every_job \relax \fi +\ifdefined\font_preloads_at_start_text \else \let\font_preloads_at_start_text\relax \fi +\ifdefined\font_preloads_at_stop_text \else \let\font_preloads_at_stop_text \relax \fi + +\appendtoks + \font_preloads_at_start_text +\to \everystarttext + +\appendtoks + \font_preloads_at_stop_text +\to \everystoptext + +% We made \loadoptionfile obsolete: we pass options via the command line to +% luatex now and handle them directly instead of via a file. This also makes +% the next obsolete: +% +% \directsetup{*runtime:options} +% \directsetup{*runtime:modules} + +\appendtoks + \showcontextbanner + \initializenewlinechar + \calculatecurrenttime + \syst_files_load + % for the moment here (before doc env) + \setupoutput[pdf]% + % + \clf_setdocumentcommandline + \clf_setdocumentctxfile + \clf_setdocumentfilenames + \font_preloads_at_every_job + \settopskip % brrr + \initializemainlanguage + \initializepagebackgrounds + \initializepagecounters + \clf_setdocumentmodes + \clf_setdocumentmodules + \clf_setdocumentenvironments +\to \everyjob + +\appendtoks + \ifarrangingpages\poparrangedpages\fi +\to \everybye + +\prependtoks + \resetallattributes +\to \everybeforeoutput + +\appendtoks + \the\everybackendshipout +\to \everyshipout + +\prependtoks + \the\everylastbackendshipout +\to \everylastshipout + +\prependtoks + \lefttoright +\to \everybeforeoutput + +% temporary here: + +\pushoverloadmode + \frozen\unexpanded\def\arg{\mathortext\normalmatharg\normaltextarg} +\popoverloadmode + +% might move to \everydump or even disappear: + +\nonknuthmode + +% brrr + +\appendtoks + \synchronizegloballinespecs + \synchronizelocallinespecs +\to \everysetupbodyfont + +\appendtoks + \synchronizelocallinespecs +\to \everyswitchtobodyfont + +% who knows + +% \appendtoks +% \resetcharacterspacing +% \to \everyhyphenatedurl + +% \setbreakpoints[compound] + +%D Till we fixed all styles: + +\enforced\let\\\crlf % frozen or permanent? + +\protect \endinput diff --git a/tex/context/base/mkiv/core-env.mkxl b/tex/context/base/mkiv/core-env.mkxl index 47f2c3c6c..e1a96b35f 100644 --- a/tex/context/base/mkiv/core-env.mkxl +++ b/tex/context/base/mkiv/core-env.mkxl @@ -304,8 +304,10 @@ \newconditional\c_syst_modes_set_done % conditionals can be pushed/popped +\installmacrostack\c_syst_modes_set_done + \permanent\protected\def\startmodeset - {\pushmacro\c_syst_modes_set_done + {\push_macro_c_syst_modes_set_done \setfalse\c_syst_modes_set_done \doifelsenextoptionalcs\syst_modes_set_start\syst_modes_set_quit} @@ -333,7 +335,7 @@ {\doifelsenextoptionalcs\syst_modes_set_start\syst_modes_set_quit} \def\syst_modes_set_quit#-\stopmodeset - {\popmacro\c_syst_modes_set_done} + {\pop_macro_c_syst_modes_set_done} %D Lets now set a mode: @@ -358,7 +360,7 @@ \letvalue{\??setup:\??empty}\gobbleoneargument -\def\syst_setups#1% the grid option will be extended to other main modes +\permanent\def\syst_setups#1% the grid option will be extended to other main modes {\csname\??setup \ifgridsnapping \ifcsname\??setup\v!grid:#1\endcsname\v!grid:#1\else:\ifcsname\??setup:#1\endcsname#1\else\??empty\fi\fi @@ -369,22 +371,22 @@ % no checking and we assume it being defined: -\def\fastsetup #1{\csname\??setup:#1\endcsname\empty} -\def\fastsetupwithargument #1{\csname\??setup:#1\endcsname} % swapped per 2015-08-30 -\def\fastsetupwithargumentswapped#1#2{\csname\??setup:#2\endcsname{#1}}% swapped per 2015-09-05 +\permanent\def\fastsetup #1{\csname\??setup:#1\endcsname\empty} +\permanent\def\fastsetupwithargument #1{\csname\??setup:#1\endcsname} % swapped per 2015-08-30 +\permanent\def\fastsetupwithargumentswapped#1#2{\csname\??setup:#2\endcsname{#1}}% swapped per 2015-09-05 % the next one is meant for \c!setups situations, hence the check for % a shortcut \let\m_syst_setups_asked\empty -\def\doprocesslocalsetups#1% sort of public, fast local variant +\permanent\protected\def\doprocesslocalsetups#1% sort of public, fast local variant {\edef\m_syst_setups_asked{#1}% \ifempty\m_syst_setups_asked\else \expandafter\syst_setups_process_local \fi} -\protected\def\usesetupsparameter#1% +\permanent\protected\def\usesetupsparameter#1% {\edef\m_syst_setups_asked{#1\c!setups}% \ifempty\m_syst_setups_asked\else \expandafter\syst_setups_process_local @@ -399,35 +401,34 @@ {\clf_autosetups{\m_syst_setups_asked}% \relax} % let's prevent lookahead -\def\autosetups#1% - {\clf_autosetups{#1}} +\permanent\def\autosetups#1{\clf_autosetups{#1}} % todo: public implementor -\edef\setupwithargument#1% saves a few expansions +\permanent\edef\setupwithargument#1% saves a few expansions {\noexpand\csname\??setup:\noexpand\ifcsname\??setup:#1\endcsname#1\noexpand\else\??empty\noexpand\fi\endcsname} -\edef\setupwithargumentswapped#1#2% saves a few expansions (can be \let) +\permanent\edef\setupwithargumentswapped#1#2% saves a few expansions (can be \let) {\noexpand\csname\??setup:\noexpand\ifcsname\??setup:#2\endcsname#2\noexpand\else\??empty\noexpand\fi\endcsname{#1}} -\let\directsetup\syst_setups -\let\texsetup \syst_setups % nicer than \directsetup and more en par with xmlsetup and luasetup +\aliased\let\directsetup\syst_setups +\aliased\let\texsetup \syst_setups % nicer than \directsetup and more en par with xmlsetup and luasetup -\protected\def\doifelsesetups#1% to be done: grid +\permanent\protected\def\doifelsesetups#1% to be done: grid {\ifcsname\??setup:#1\endcsname \expandafter\firstoftwoarguments \else \expandafter\secondoftwoarguments \fi} -\let\doifsetupselse\doifelsesetups +\aliased\let\doifsetupselse\doifelsesetups -\protected\def\doifsetups#1% to be done: grid +\permanent\protected\def\doifsetups#1% to be done: grid {\ifcsname\??setup:#1\endcsname \expandafter\firstofoneargument \else \expandafter\gobbleoneargument \fi} -\protected\def\doifnotsetups#1% to be done: grid +\permanent\protected\def\doifnotsetups#1% to be done: grid {\ifcsname\??setup:#1\endcsname \expandafter\gobbleoneargument \else @@ -571,26 +572,23 @@ %D System setups: -\let\systemsetupsprefix\wildcardsymbol +\aliased\let\systemsetupsprefix\wildcardsymbol -\def\systemsetups#1{\syst_setups{\systemsetupsprefix#1}} +\permanent\def\systemsetups#1{\syst_setups{\systemsetupsprefix#1}} -\protected\def\resetsetups[#1]% see x-fo for usage +\permanent\protected\def\resetsetups[#1]% see x-fo for usage {\ifcsname\??setup\ifgridsnapping\v!grid\fi:#1\endcsname \dodoglobal\undefinevalue{\??setup\ifgridsnapping\v!grid\fi:#1}% \else \dodoglobal\undefinevalue{\??setup:#1}% \fi} -\protected\def\copysetups - {\dodoubleargument\syst_setups_copy} - -\def\syst_setups_copy[#1][#2]% +\permanent\tolerant\protected\def\copysetups[#1]#*[#2]% {\ifcsname\??setup:#2\endcsname \letcsname\??setup:#1\expandafter\endcsname\lastnamedcs \fi} -\protected\def\showsetupsdefinition[#1]% +\permanent\protected\def\showsetupsdefinition[#1]% {\showvalue{\??setup:#1}} % temp hack for debugging %D \macros @@ -612,9 +610,6 @@ \permanent\protected\def\setgvariables{\syst_variables_set[\getrawgparameters]} \permanent\protected\def\setxvariables{\syst_variables_set[\getrawxparameters]} -% \protected\def\globalsetvariables % obsolete -% {\dotripleargument\syst_variables_set[\globalgetrawparameters]} - \tolerant\def\syst_variables_set[#1]#*[#2]#*[#3]% tricky, test on s-pre-60 {\doifelse{#2}\currentvariableclass {#1[\??variables#2:][#3]}% diff --git a/tex/context/base/mkiv/core-ini.mkiv b/tex/context/base/mkiv/core-ini.mkiv index 31ef501d9..9352c9487 100644 --- a/tex/context/base/mkiv/core-ini.mkiv +++ b/tex/context/base/mkiv/core-ini.mkiv @@ -91,7 +91,7 @@ %D Exporting: -\newtoks\everyinitializeexport +\newtoks \everyinitializeexport %D Sectioning: diff --git a/tex/context/base/mkiv/core-ini.mkxl b/tex/context/base/mkiv/core-ini.mkxl new file mode 100644 index 000000000..2e32e9bdd --- /dev/null +++ b/tex/context/base/mkiv/core-ini.mkxl @@ -0,0 +1,224 @@ +%D \module +%D [ file=core-ini, +%D version=2003.12.01, +%D title=\CONTEXT\ Core Macros, +%D subtitle=Additional Initialization, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Core Macros / Additional Initialization} + +\unprotect + +%D We introduce a couple of variables that are used all over \CONTEXT. Alternatively +%D we could define them in each module but as they are part of the bigger picture we +%D prefer to do it here. Ideally we should hav ea proper dependency tree but it might +%D be that we want to make versions with a smaller footprints in which case one would +%D still need to define the token list registers (unless we could do that runtime). + +%D \macros +%D {every...} +%D +%D A few every's. + +%D Output routine: + +\newtoks \everybeforeoutput +\newtoks \everyafteroutput + +%D Shipout: + +\newtoks \everyshipout +\newtoks \everybeforeshipout +\newtoks \everyaftershipout +\newtoks \everyfirstshipout +\newtoks \everylastshipout + +%D End of run: + +\newtoks \everybye +\newtoks \everygoodbye +\newtoks \everynotabene + +%D Document: + +\newtoks \everyendoftextbody + +\newtoks \everystarttext +\newtoks \everystoptext + +\newtoks \everystartdocument +\newtoks \everystopdocument + +%D Purity: + +\newtoks \everyforgetall +\newtoks \everycleanupfeatures +\newtoks \everysimplifycommands +\newtoks \everypreroll + +\let\simplifiedcommands\everysimplifycommands % backward compatible, will stay as it's used in styles + +\newconditional\simplifyingcommands % public + +\permanent\protected\def\forgetall {\the\everyforgetall} +\permanent\protected\def\cleanupfeatures {\the\everycleanupfeatures} +\permanent\protected\def\simplifycommands{\the\everysimplifycommands} + +\appendtoks + \settrue\simplifyingcommands +\to \everysimplifycommands + +\appendtoks + \everypar\emptytoks % pretty important +\to \everyforgetall + +%D Page building: + +\newtoks \everybeforepagebody +\newtoks \everyafterpagebody + +\aliased\let\everypagebody\everybeforepagebody % backward compatible, will become obsolete + +%D Floats: + +\newtoks \everyinsidefloat + +%D Exporting: + +\newtoks \everyinitializeexport + +%D Sectioning: + +%newtoks \everyheadstart + +%D Par building (experimental, used in xml <p> .. </p>) + +\newtoks \everybeginofpar +\newtoks \everyendofpar +%newtoks \everyparflush + +\protected\def\bpar{\the\everybeginofpar\ignorespaces} % may interfere with \everypar +\protected\def\epar{\ifhmode\removeunwantedspaces\the\everyendofpar\fi} % test prevents problems with \bpar\epar + +%D Lists: + +\newtoks \everylistentry +\newtoks \everysavesortkeys + +%D Marks: + +%newtoks \everymarking + +%D Fonts: + +\newtoks \everyfont +\newtoks \everyglobalbodyfont +\newtoks \everydefinedfont + +\newtoks \everybodyfont +\newtoks \everyfontswitch + +\newtoks \everysetupbodyfont +\newtoks \everyswitchtobodyfont + +%D Math: + +\newtoks \everybeforedisplayformula +\newtoks \everymathematics + +\prependtoks \the\everymathematics \to \everymath +\prependtoks \the\everymathematics \to \everydisplay + +%D Tables: + +%newtoks \everytable % we need to disstinguish kinds + +%D More generic (used to be pushcolor etc) + +\newtoks\everystarttextproperties +\newtoks\everystoptextproperties + +\unexpanded\def\starttextproperties{\the\everystarttextproperties} +\unexpanded\def\stoptextproperties {\the\everystoptextproperties} + +%D \macros +%D {trialtypesetting} +%D +%D We disable trial typesetting in the output routine, +%D just to be sure. + +\prependtoks + \resettrialtypesetting +\to \everybeforepagebody + +%D \macros +%D {ifinpagebody,ifinsidecolumns,ifdoublesided,ifsinglesided} +%D +%D These will become system modes and conditionals + +\newif \ifinpagebody +\newif \ifinsidecolumns +\newif \ifinsidemulticolumns % simple mixed-in-text columns +\newif \ifdoublesided \doublesidedfalse +\newif \ifsinglesided \singlesidedtrue +\newif \ifinsidefloat +\newif \ifdoingblocks +\newif \ifgridsnapping +\newif \ifexporting + +\newconstant\pageduplexmode % 0 single 1 double 2 mix +\newconstant\pagebodymode % 0 not 1 normal pagebody 2 spread + +\newcount\nofcolumns \nofcolumns \plusone +\newcount\nofmulticolumns \nofmulticolumns\plusone + +%D \macros +%D {ifproductionrun} +%D +%D This boolean can be used to bypass certain initializations. + +% \newif\ifproductionrun % already defined + +\appendtoks + \productionruntrue +\to \everydump + +%D \macros +%D {everyboxedcontent, ifboxedcontent, +%D startboxedcontent, stopboxedcontent} +%D +%D This one is relatively new and will be used as a more robust test for inner +%D situations. + +\newif \ifboxedcontent +\newtoks\everyboxedcontent + +\appendtoks + \boxedcontenttrue +\to \everyboxedcontent + +\unexpanded\def\startboxedcontent{\bgroup\the\everyboxedcontent} + +\let\stopboxedcontent\egroup + +%D We store some original meanings, maybe in \type {math-ini}. + +\let\normalat \at +\let\normalin \in +\let\normalfrom \from +%let\normalover \over +\let\normalabout\about + +%D This will be implemented way later: + +\let\setlayoutcomponentattribute \gobbleoneargument +\let\resetlayoutcomponentattribute\relax +\let\layoutcomponentboxattribute \empty + +\protect \endinput diff --git a/tex/context/base/mkiv/core-two.mkxl b/tex/context/base/mkiv/core-two.mkxl new file mode 100644 index 000000000..0299e76f5 --- /dev/null +++ b/tex/context/base/mkiv/core-two.mkxl @@ -0,0 +1,109 @@ +%D \module +%D [ file=core-two, % moved from core-uti +%D version=1997.03.31, +%D title=\CONTEXT\ Core Macros, +%D subtitle=Two Pass Data, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Core Macros / Two Pass Data} + +%D This is a rather old mechanism which has not changed much over time, apart from +%D adding a few more selectors. This code used to be part of \type {core-uti}. The +%D following examples demonstrate the interface. +%D +%D \startbuffer +%D \definetwopasslist{test-1} +%D +%D \gettwopassdatalist{test-1} [\twopassdatalist=] +%D \checktwopassdata {test-1} [\twopassdata=] +%D \checktwopassdata {test-1} [\twopassdata=] +%D \gettwopassdata {test-1} [\twopassdata=] +%D \gettwopassdata {test-1} [\twopassdata=] +%D +%D \definetwopasslist{test-2} +%D +%D \lazysavetwopassdata{test-2}{1}{x} +%D \lazysavetwopassdata{test-2}{2}{y} +%D \lazysavetwopassdata{test-2}{3}{z} +%D +%D \gettwopassdatalist{test-2} [\twopassdatalist=x,y,z] +%D \checktwopassdata {test-2} [\twopassdata=x] +%D \checktwopassdata {test-2} [\twopassdata=x] +%D \gettwopassdata {test-2} [\twopassdata=x] +%D \gettwopassdata {test-2} [\twopassdata=y] +%D \gettwopassdata {test-2} [\twopassdata=z] +%D \gettwopassdata {test-2} [\twopassdata=] +%D +%D \definetwopasslist{test-3} +%D +%D \lazysavetaggedtwopassdata{test-3}{1}{x}{a} +%D \lazysavetaggedtwopassdata{test-3}{2}{y}{b} +%D \lazysavetaggedtwopassdata{test-3}{3}{z}{c} +%D +%D \findtwopassdata{test-3}{x} [\twopassdata=a] +%D \findtwopassdata{test-3}{y} [\twopassdata=b] +%D \findtwopassdata{test-3}{z} [\twopassdata=c] +%D \findtwopassdata{test-3}{w} [\twopassdata=] +%D +%D \definetwopasslist{test-4} +%D +%D \lazysavetwopassdata{test-4}{1}{A} +%D \lazysavetwopassdata{test-4}{2}{B} +%D \lazysavetwopassdata{test-4}{3}{C} +%D +%D \getfirsttwopassdata{test-4} [\twopassdata=A] +%D \getlasttwopassdata {test-4} [\twopassdata=C] +%D \getfirsttwopassdata{test-4} [\twopassdata=A] +%D \getlasttwopassdata {test-4} [\twopassdata=C] +%D \getfromtwopassdata {test-4}{1} [\twopassdata=A] +%D \getfromtwopassdata {test-4}{3} [\twopassdata=C] +%D \getfromtwopassdata {test-4}{2} [\twopassdata=B] +%D \stopbuffer +%D +%D \getbuffer \typebuffer + +\unprotect + +\registerctxluafile{core-two}{} + +\permanent\def\immediatesavetwopassdata #1#2#3{\normalexpanded{\noexpand\clf_savetwopassdata{#1}{#3}}} +\permanent\def \lazysavetwopassdata #1#2#3{\normalexpanded{\noexpand\ctxlatecommand{savetwopassdata("#1","#3")}}} +\permanent\let \savetwopassdata \lazysavetwopassdata +\permanent\def \savetaggedtwopassdata#1#2#3#4{\normalexpanded{\noexpand\clf_savetaggedtwopassdata{#1}{#3}{#4}}} +\permanent\def\lazysavetaggedtwopassdata#1#2#3#4{\normalexpanded{\noexpand\ctxlatecommand{savetaggedtwopassdata("#1",'#3',"#4")}}} + +% temp hack: needs a proper \starteverytimeluacode + +\setfalse\twopassdatafound +\let \twopassdata \empty +\let \twopassdatalist \empty + +\def\syst_twopass_check % can be delegated to lua once obsolete is gone + {\ifx\twopassdata\empty + \setfalse\twopassdatafound + \else + \settrue\twopassdatafound + \fi} + +\permanent\protected\def\definetwopasslist #1{\clf_definetwopasslist{#1}} +\permanent\protected\def\gettwopassdata #1{\edef\twopassdata {\clf_gettwopassdata {#1}}\syst_twopass_check} +\permanent\protected\def\checktwopassdata #1{\edef\twopassdata {\clf_checktwopassdata {#1}}\syst_twopass_check} +\permanent\protected\def\findtwopassdata #1#2{\edef\twopassdata {\clf_findtwopassdata {#1}{#2}}\syst_twopass_check} +\permanent\protected\def\getfirsttwopassdata #1{\edef\twopassdata {\clf_getfirsttwopassdata {#1}}\syst_twopass_check} +\permanent\protected\def\getlasttwopassdata #1{\edef\twopassdata {\clf_getlasttwopassdata {#1}}% + \edef\noftwopassitems{\clf_counttwopassdata {#1}}\syst_twopass_check} +\permanent\protected\def\getnamedtwopassdatalist#1#2{\edef #1{\clf_gettwopassdatalist {#2}}} +\permanent\protected\def\gettwopassdatalist #1{\edef\twopassdatalist{\clf_gettwopassdatalist {#1}}} + +\permanent\protected\def\doifelseintwopassdata #1#2{\clf_doifelseintwopassdata{#1}{#2}} + +\aliased\let\doifintwopassdataelse\doifelseintwopassdata +\aliased\let\getfromtwopassdata \findtwopassdata + +\protect \endinput diff --git a/tex/context/base/mkiv/core-uti.lua b/tex/context/base/mkiv/core-uti.lua index 1debf347b..60cf3d6a9 100644 --- a/tex/context/base/mkiv/core-uti.lua +++ b/tex/context/base/mkiv/core-uti.lua @@ -392,53 +392,24 @@ statistics.register("jobdata time",function() end end) -if CONTEXTLMTXMODE > 0 then - - function statistics.callbacks() - local backend = backends.getcallbackstate() - local frontend = status.getcallbackstate() - local pages = structures.pages.nofpages or 0 - local total = frontend.count + backend.count - local average = pages > 0 and math.round(total/pages) or 0 - local result = format ( - "file: %s, saved: %s, direct: %s, function: %s, value: %s, message: %s, bytecode: %s, late %s, total: %s (%s per page)", - frontend.file, frontend.saved, frontend.direct, frontend["function"], - frontend.value, frontend.message, frontend.bytecode, backend.count, - total, average - ) - statistics.callbacks = function() - return result - end - return result - end - - statistics.register("callbacks", statistics.callbacks) - -else - - function statistics.callbacks() - local c_internal = status.callbacks or 0 - local c_file = status.indirect_callbacks or 0 - local c_direct = status.direct_callbacks or 0 - local c_late = backends.getcallbackstate().count - local c_function = status.function_callbacks or 0 - local c_total = c_internal + c_file + c_direct + c_late + c_function - local n_pages = structures.pages.nofpages or 0 - local c_average = n_pages > 0 and math.round(c_total/n_pages) or 0 - local result = format ( - "internal: %s, file: %s, direct: %s, late: %s, function %s, total: %s (%s per page)", - c_internal, c_file, c_direct, c_late, c_function, c_total, c_average - ) - statistics.callbacks = function() - return result - end +statistics.register("callbacks", function() + local c_internal = status.callbacks or 0 + local c_file = status.indirect_callbacks or 0 + local c_direct = status.direct_callbacks or 0 + local c_late = backends.getcallbackstate().count + local c_function = status.function_callbacks or 0 + local c_total = c_internal + c_file + c_direct + c_late + c_function + local n_pages = structures.pages.nofpages or 0 + local c_average = n_pages > 0 and math.round(c_total/n_pages) or 0 + local result = format ( + "internal: %s, file: %s, direct: %s, late: %s, function %s, total: %s (%s per page)", + c_internal, c_file, c_direct, c_late, c_function, c_total, c_average + ) + statistics.callbacks = function() return result end - - statistics.register("callbacks", statistics.callbacks) - -end - + return result +end) statistics.register("randomizer", function() if rmethod and rvalue then diff --git a/tex/context/base/mkiv/core-uti.mkxl b/tex/context/base/mkiv/core-uti.mkxl new file mode 100644 index 000000000..b8d3bf7eb --- /dev/null +++ b/tex/context/base/mkiv/core-uti.mkxl @@ -0,0 +1,35 @@ +%D \module +%D [ file=core-uti, +%D version=1997.03.31, % 2006.09.19 mkiv +%D title=\CONTEXT\ Core Macros, +%D subtitle=Utility File Handling, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Core Macros / Utility File Handling} + +\unprotect + +\registerctxluafile{core-uti}{} + +% savecurrentvalue#1#2% immediate, expanded, defined at lua end + +\appendtoks + \clf_setjobcomment + file {\jobname}% + format {\contextformat}% + stamp {\contextversion}% + escape {\!!bs\space...\space\!!es}% + \relax +\to \everystarttext + +\appendtoks + \clf_initializejob +\to \everyjob + +\protect \endinput diff --git a/tex/context/base/mkiv/meta-ini.mkxl b/tex/context/base/mkiv/meta-ini.mkxl index 5422f3f1c..3e1c54d53 100644 --- a/tex/context/base/mkiv/meta-ini.mkxl +++ b/tex/context/base/mkiv/meta-ini.mkxl @@ -380,12 +380,13 @@ \permanent\tolerant\def\startMPdrawing[#1]% todo: use pickup #: {\meta_start_drawing#1} -\def\meta_start_drawing#1#2\stopMPdrawing % to be redone, this ascii stuff +\def\meta_start_drawing#1#2\stopMPdrawing {\relax \bgroup \meta_enable_include - \doifelse{#1}{-}{\convertargument#2\to\asciia}{\def\asciia{#2}}% - \xdef\MPdrawingdata{\MPdrawingdata\asciia}% + \doifelse{#1}{-} + {\xdef\MPdrawingdata{\MPdrawingdata\detokenize{#2}}}% + {\xdef\MPdrawingdata{\MPdrawingdata#2}}% \egroup} \permanent\let\stopMPdrawing\relax @@ -981,13 +982,10 @@ \installcorenamespace{mptext} -\permanent\protected\def\setMPtext#1#2% todo : #1 must be made : safe - {\defconvertedargument\ascii{#2}% hm, kind of old fashioned, this - \dodoglobal\letvalue{\??mptext#1}\ascii} - -\permanent\def\MPtext #1{\begincsname\??mptext#1\endcsname\empty} -\permanent\def\MPstring#1{"\begincsname\??mptext#1\endcsname\empty"} -\permanent\def\MPbetex #1{btex \begincsname\??mptext#1\endcsname\space etex} +\permanent\protected\def\setMPtext#1#2{\dodoglobal\edefcsname\??mptext#1\endcsname{\detokenize{#2}}} +\permanent \def\MPtext #1{\begincsname\??mptext#1\endcsname\empty} +\permanent \def\MPstring #1{"\begincsname\??mptext#1\endcsname\empty"} +\permanent \def\MPbetex #1{btex \begincsname\??mptext#1\endcsname\space etex} %D In order to communicate conveniently with the \TEX\ engine, we introduce some %D typesetting variables. diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua index 08baaf437..6d6813fde 100644 --- a/tex/context/base/mkiv/mult-def.lua +++ b/tex/context/base/mkiv/mult-def.lua @@ -11,16 +11,16 @@ if not modules then modules = { } end modules ['mult-def'] = { return { ["commands"]={ - ["CAPPED"]={ - ["cs"]="KAP", - ["de"]="KAP", - ["en"]="CAP", - ["fr"]="CAP", - ["it"]="CAP", - ["nl"]="KAP", - ["pe"]="CAP", - ["ro"]="KAP", - }, +--["CAPPED"]={ +-- ["cs"]="KAP", +-- ["de"]="KAP", +-- ["en"]="CAP", +-- ["fr"]="CAP", +-- ["it"]="CAP", +-- ["nl"]="KAP", +-- ["pe"]="CAP", +-- ["ro"]="KAP", +--}, ["Character"]={ ["cs"]="Znak", ["de"]="Buchstabe", diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index ab7e78e18..e72c3ab22 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -65,7 +65,7 @@ return { "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", - "primeasciicode", "hyphenasciicode", + "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", -- "frozenhsizecode", "frozenskipcode", "frozenhangcode", "frozenindentcode", "frozenparfillcode", "frozenadjustcode", "frozenprotrudecode", "frozentolerancecode", "frozenstretchcode", @@ -255,6 +255,7 @@ return { "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", + "scratchmacro", "scratchmacroone", "scratchmacrotwo", -- "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", -- diff --git a/tex/context/base/mkiv/node-mig.mkxl b/tex/context/base/mkiv/node-mig.mkxl index f15f87f23..420140e6f 100644 --- a/tex/context/base/mkiv/node-mig.mkxl +++ b/tex/context/base/mkiv/node-mig.mkxl @@ -38,7 +38,7 @@ \registerctxluafile{node-mig}{autosuffix} -\let\automigrateinserts\relax -\let\automigratemarks \relax +\aliased\let\automigrateinserts\donothing +\aliased\let\automigratemarks \donothing \protect diff --git a/tex/context/base/mkiv/spac-hor.mkxl b/tex/context/base/mkiv/spac-hor.mkxl index f6fb41ea8..450e4fd76 100644 --- a/tex/context/base/mkiv/spac-hor.mkxl +++ b/tex/context/base/mkiv/spac-hor.mkxl @@ -178,10 +178,9 @@ %newif\ifindentation \indentationtrue % will become a mode -\let\checkindentation\relax +\aliased\let\checkindentation\relax \installmacrostack\checkindentation -%installmacrostack\ifindentation \def\spac_indentation_remove {\ifzeropt\parindent \else @@ -194,25 +193,25 @@ {%\global\indentationfalse \spac_indentation_remove} -\def\spac_indentation_do_toggle_indeed +\permanent\protected\def\spac_indentation_do_toggle_indeed {%\global\indentationfalse - \glet\checkindentation\spac_indentation_no_toggle_indeed + \enforced\glet\checkindentation\spac_indentation_no_toggle_indeed \spac_indentation_remove} -\def\spac_indentation_no_toggle_indeed +\permanent\protected\def\spac_indentation_no_toggle_indeed {%\global\indentationtrue - \glet\checkindentation\spac_indentation_do_toggle_indeed} + \enforced\glet\checkindentation\spac_indentation_do_toggle_indeed} -\def\spac_indentation_do_indeed +\permanent\protected\def\spac_indentation_do_indeed {}%\global\indentationtrue} -\def\spac_indentation_do_toggle - {\glet\checkindentation\spac_indentation_do_toggle_indeed} +\permanent\protected\def\spac_indentation_do_toggle + {\enforced\glet\checkindentation\spac_indentation_do_toggle_indeed} -\def\spac_indentation_no_toggle - {\glet\checkindentation\spac_indentation_no_toggle_indeed} +\permanent\protected\def\spac_indentation_no_toggle + {\enforced\glet\checkindentation\spac_indentation_no_toggle_indeed} -\def\spac_indentation_check_toggle +\permanent\protected\def\spac_indentation_check_toggle {\ifcase\c_spac_indentation_toggle_state % nothing \or @@ -221,23 +220,23 @@ \spac_indentation_do_toggle \fi} -\def\spac_indentation_variant_yes - {\glet\checkindentation\spac_indentation_do_indeed} +\permanent\protected\def\spac_indentation_variant_yes + {\enforced\glet\checkindentation\spac_indentation_do_indeed} -\def\spac_indentation_no_next_check +\permanent\protected\def\spac_indentation_no_next_check {\spac_indentation_remove - \glet\checkindentation\spac_indentation_do_indeed} + \enforced\glet\checkindentation\spac_indentation_do_indeed} \permanent\protected\def\spac_indentation_variant_no % made global {\ifinpagebody \else %\global\indentationfalse - \glet\checkindentation\spac_indentation_no_next_check + \enforced\glet\checkindentation\spac_indentation_no_next_check \fi} \permanent\protected\def\nonoindentation % bv bij floats {\ifinpagebody \else %\global\indentationtrue - \glet\checkindentation\spac_indentation_do_indeed + \enforced\glet\checkindentation\spac_indentation_do_indeed \fi} \permanent\protected\def\spac_indentation_variant_force @@ -248,26 +247,16 @@ \noindent\hskip\parindent \fi \fi} -\appendtoks - \push_macro_checkindentation - \push_macro_ifindentation -\to \everypushsomestate - -\appendtoks - \pop_macro_ifindentation - \pop_macro_checkindentation -\to \everypopsomestate - % public: -\let\indentation \spac_indentation_variant_force -\let\noindentation\spac_indentation_variant_no % public -\let\doindentation\spac_indentation_variant_yes % public +\aliased\let\indentation \spac_indentation_variant_force +\aliased\let\noindentation\spac_indentation_variant_no % public +\aliased\let\doindentation\spac_indentation_variant_yes % public \permanent\protected\def\dontrechecknextindentation % public (in macros) {\global\enforced\let\dorechecknextindentation\relax} -\let\dorechecknextindentation\relax % public (in macros) +\aliased\let\dorechecknextindentation\relax % public (in macros) \permanent\protected\protected\def\spac_indentation_check_next_indentation {\global\enforced\let\dorechecknextindentation\relax diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex ab1d3a038..59506d8ca 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 21b55a433..46ad6854d 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/strc-enu.mklx b/tex/context/base/mkiv/strc-enu.mklx index 0561ad340..c593a65b0 100644 --- a/tex/context/base/mkiv/strc-enu.mklx +++ b/tex/context/base/mkiv/strc-enu.mklx @@ -244,10 +244,6 @@ \newtoks\everyenumeration -\appendtoks - \disablepseudocaps % sorry, uppercase causes troubles -\to \everyenumeration - \letcsname\??constructionmainhandler \v!enumeration\expandafter\endcsname\csname\??constructionmainhandler \v!description\endcsname \letcsname\??constructioncommandhandler\v!enumeration\expandafter\endcsname\csname\??constructioncommandhandler\v!description\endcsname \letcsname\??constructionstarthandler \v!enumeration\expandafter\endcsname\csname\??constructionstarthandler \v!description\endcsname diff --git a/tex/context/base/mkiv/syst-aux.mkxl b/tex/context/base/mkiv/syst-aux.mkxl index 0f268854b..d3e75fd07 100644 --- a/tex/context/base/mkiv/syst-aux.mkxl +++ b/tex/context/base/mkiv/syst-aux.mkxl @@ -219,7 +219,7 @@ %D is more efficient but it probably won't be noticed. It's anyway cheaper on memory %D access. We use versions that don't even store the arguments. -%def\gobbleoneargument #-{} +%permanent\def\gobbleoneargument #-{} \permanent\def\gobbletwoarguments #-#-{} \permanent\def\gobblethreearguments #-#-#-{} \permanent\def\gobblefourarguments #-#-#-#-{} @@ -259,9 +259,6 @@ % \mutable\let\nextnextnext \relax % kind of obsolete % \mutable\let\nexttoken \relax -\let\m_syst_action_yes\relax -\let\m_syst_action_nop\relax - \permanent\protected\def\doifelsenextchar#1#2#3% #1 should not be {} ! {\def\m_syst_action_yes{#2}% \def\m_syst_action_nop{#3}% @@ -3756,75 +3753,13 @@ \aliased\let\doifsamestringelse\doifelsesamestring -% BEGIN OF OBSOLETE % - -%D \macros -%D {ConvertToConstant,ConvertConstantAfter} -%D -%D When comparing arguments with a constant, we can get into trouble when this -%D argument consists of tricky expandable commands. One solution for this is -%D converting the argument to a string of unexpandable characters. To make -%D comparison possible, we have to convert the constant too. -%D -%D \starttyping -%D \ConvertToConstant\doifelse {...} {...} {then ...} {else ...} -%D \stoptyping -%D -%D This construction is only needed when the first argument can give troubles. -%D Misuse can slow down processing. -%D -%D \starttyping -%D \ConvertToConstant\doifelse{\c!alfa} {\c!alfa}{...}{...} -%D \ConvertToConstant\doifelse{alfa} {\c!alfa}{...}{...} -%D \ConvertToConstant\doifelse{alfa} {alfa} {...}{...} -%D \ConvertToConstant\doifelse{alfa \alfa test}{\c!alfa}{...}{...} -%D \stoptyping -%D -%D In examples~2 and~3 both arguments equal, in~1 and~4 they differ. - -\permanent\protected\def\ConvertToConstant#1#2#3% will go - {\edef\m_syst_string_one{\expandafter\detokenize\expandafter{#2}}% - \edef\m_syst_string_two{\expandafter\detokenize\expandafter{#3}}% - #1{\m_syst_string_one}{\m_syst_string_two}} - -%D When the argument \type{#1} consists of commands, we had better use +%D These are obsolete in MTX: %D %D \starttyping -%D \ConvertConstantAfter\processaction[#1][...] -%D \ConvertConstantAfter\doifelse{#1}{\v!something}{}{} +%D \ConvertToConstant #1#2#3 +%D \CheckConstantAfter #1#2 +%D \ConvertConstantAfter #1#2#3 %D \stoptyping -%D -%D This commands accepts things like: -%D -%D \starttyping -%D \v!constant -%D constant -%D \hbox to \hsize{\rubish} -%D \stoptyping -%D -%D As we will see in the core modules, this macro permits constructions like: -%D -%D \starttyping -%D \setupfootertexts[...][...] -%D \setupfootertexts[margin][...][...] -%D \setupfootertexts[\v!margin][...][...] -%D \stoptyping -%D -%D where \type {...} can be anything legally \TEX. - -\permanent\protected\def\CheckConstantAfter#1#2% will go - {\expandafter\convertargument\v!prefix!\to\ascii - \convertargument#1\to#2\relax - \doifelseinstring\ascii{#2} - {\expandafter\convertargument#1\to#2} - {}} - -\permanent\protected\def\ConvertConstantAfter#1#2#3% will go - {\CheckConstantAfter{#2}\asciia - \CheckConstantAfter{#3}\asciib - #1{\asciia}{\asciib}} - -% END OF OBSOLETE % %D \macros %D {assignifempty} diff --git a/tex/context/base/mkiv/syst-ini.mkxl b/tex/context/base/mkiv/syst-ini.mkxl index f04e2e2db..8cb2b8c1c 100644 --- a/tex/context/base/mkiv/syst-ini.mkxl +++ b/tex/context/base/mkiv/syst-ini.mkxl @@ -67,7 +67,9 @@ \immutable\integerdef\morethanasciicode 62 % > used as alternative verbatim } \immutable\integerdef\questionmarkasciicode 63 % ? used in namespace protection \immutable\integerdef\atsignasciicode 64 % @ used in namespace protection +\immutable\integerdef\leftbracketasciicode 91 \immutable\integerdef\backslashasciicode 92 % `\\ +\immutable\integerdef\rightbracketasciicode 93 \immutable\integerdef\circumflexasciicode 94 \immutable\integerdef\underscoreasciicode 95 \immutable\integerdef\leftbraceasciicode 123 % `\{ @@ -76,6 +78,8 @@ \immutable\integerdef\tildeasciicode 126 % `\~ \immutable\integerdef\delasciicode 127 +\aliased\let\percentasciicode\commentasciicode + %catcode\zeroasciicode \ignorecatcode % `\^^@ ascii null is ignored \catcode\tabasciicode \spacecatcode % `\^^I ascii tab is a blank space \catcode\formfeedasciicode \activecatcode % `\^^L ascii form-feed (active, set later) @@ -155,8 +159,8 @@ \permanent\def\gobbleoneargument#-{} % will be defined later on anyway -%D First we define a simplified version of the \CONTEXT\ protection mechanism. -%D Later we will implement a better variant. +%D First we define a simplified version of the \CONTEXT\ protection mechanism. Later +%D we will implement a better variant. \def\unprotect {\edef\protect @@ -388,6 +392,10 @@ \newcount\globalscratchcountertwo \newcount\globalscratchcounterthree +\mutable\let\scratchmacro \relax +\mutable\let\scratchmacroone\relax +\mutable\let\scratchmacrotwo\relax + %D \macros %D {tempstring} diff --git a/tex/context/base/mkiv/tabl-ntb.mkxl b/tex/context/base/mkiv/tabl-ntb.mkxl index 45e9236ff..f47c67802 100644 --- a/tex/context/base/mkiv/tabl-ntb.mkxl +++ b/tex/context/base/mkiv/tabl-ntb.mkxl @@ -895,10 +895,10 @@ \let\eTABLEbody\relax \let\eTABLEfoot\relax -\permanent\tolerant\protected\def\bTABLEhead[#1]#2\eTABLEhead{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_head} -\permanent\tolerant\protected\def\bTABLEnext[#1]#2\eTABLEnext{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_next} -\permanent\tolerant\protected\def\bTABLEbody[#1]#2\eTABLEbody{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_body} -\permanent\tolerant\protected\def\bTABLEfoot[#1]#2\eTABLEfoot{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_foot} +\permanent\tolerant\protected\def\bTABLEhead[#1]#:#2\eTABLEhead{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_head} +\permanent\tolerant\protected\def\bTABLEnext[#1]#:#2\eTABLEnext{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_next} +\permanent\tolerant\protected\def\bTABLEbody[#1]#:#2\eTABLEbody{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_body} +\permanent\tolerant\protected\def\bTABLEfoot[#1]#:#2\eTABLEfoot{\appendtoks\tabl_ntb_section[#1]{#2}\to\t_tabl_ntb_foot} \def\tabl_ntb_section[#1]#2% also used in tabl-nte {\protected\def\tabl_ntb_setup_section{\setupcurrentnaturaltablelocal[#1]}% diff --git a/tex/context/base/mkiv/typo-brk.mkxl b/tex/context/base/mkiv/typo-brk.mkxl new file mode 100644 index 000000000..51abc1034 --- /dev/null +++ b/tex/context/base/mkiv/typo-brk.mkxl @@ -0,0 +1,94 @@ +%D \module +%D [ file=typo-brk, +%D version=2009.03.27, % code moved from core-spa.mkiv +%D title=\CONTEXT\ Typesetting Macros, +%D subtitle=Breakpoints, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Typesetting Macros / Breakpoints} + +\unprotect + +% hm, we cannot prebuild lists, font dependent +% +% -- type nleft nright language left right middle +% +% -- we might eventually stick to only method 5 + +\registerctxluafile{typo-brk}{} + +\definesystemattribute[breakpoint][public,global] + +% see below: \exhyphenchar \minusone % we use a different order than base tex, so we really need this + +\permanent\tolerant\protected\def\definebreakpoints[#1]% + {\clf_definebreakpoints{#1}} % todo: public implementor + +\permanent\tolerant\protected\def\definebreakpoint[#1]#*[#2]#*[#3]% name char settings + {\begingroup + \getdummyparameters + [\c!type=\plusone,\c!nleft=\plusthree,\c!nright=\plusthree,% + \s!language=,\c!left=,\c!right=,\c!middle=,\c!range=\v!no,% + #3]% + \clf_definebreakpoint + {#1}% + {#2}% + {\reallanguagetag{\directdummyparameter\s!language}}% + {% maybe deal with #3 at the lua end + type \directdummyparameter\c!type + nleft \directdummyparameter\c!nleft + nright \directdummyparameter\c!nright + right {\directdummyparameter\c!right}% + left {\directdummyparameter\c!left}% + middle {\directdummyparameter\c!middle}% + range {\directdummyparameter\c!range}% + }% + \relax + \endgroup} + +\permanent\protected\def\setbreakpoints[#1]% + {\exhyphenchar\minusone % we use a different order than base tex, so we really need this + \clf_setbreakpoints{#1}} + +\permanent\protected\def\resetbreakpoints + {\exhyphenchar\hyphenasciicode % 2020.03.05 + \c_attr_breakpoint\attributeunsetvalue} + +\definebreakpoints[compound] + +% 1: simple break +% 6: simple break but skip same + +\definebreakpoint [compound] [+] [\c!nleft=3,\c!nright=3,\c!type=1] % middle=+,left=,right= +%definebreakpoint [compound] [-] [\c!nleft=3,\c!nright=3,\c!type=1,\c!range=\v!yes] % middle=+,left=,right= +\definebreakpoint [compound] [-] [\c!nleft=3,\c!nright=3,\c!type=6,\c!range=\v!yes] % middle=+,left=,right= +\definebreakpoint [compound] [/] [\c!nleft=3,\c!nright=3,\c!type=1] % middle=+,left=,right= +\definebreakpoint [compound] [(] [\c!nleft=3,\c!nright=3,\c!type=2] % type=5,middle=(,left=(-,right= +\definebreakpoint [compound] [)] [\c!nleft=3,\c!nright=3,\c!type=3] % type=5,middle=),left=,right=-) + +\aliased\let\installbreakpoint\definebreakpoint % for a while + +% \start \hsize 1.5cm \setbreakpoints[compound] +% \definebreakpoint [compound] [-] [nleft=3,nright=3,type=5,left=,right={-},middle={-}] +% \definebreakpoint [compound] [(] [nleft=3,nright=3,type=5,left=,right={(-},middle={(}] +% \definebreakpoint [compound] [)] [nleft=3,nright=3,type=5,left={-)},right=,middle={)}] +% composed-word\par composed(word)\par +% \stop + +% \mainlanguage[czech] +% \definebreakpoint [compound] [\number`-] [language=cs,nleft=3,nright=3,type=4] +% \setbreakpoints[compound] +% \start \hsize 1mm test-test \par \stop + +%D Maybe some day default: +% +% \setbreakpoints[compound] + +\protect \endinput + diff --git a/tex/context/base/mkiv/typo-cap.mkxl b/tex/context/base/mkiv/typo-cap.mkxl new file mode 100644 index 000000000..1674f1eed --- /dev/null +++ b/tex/context/base/mkiv/typo-cap.mkxl @@ -0,0 +1,265 @@ +%D \module +%D [ file=typo-cap, +%D version=2009.03.27, % code moved from core-spa.mkiv +%D title=\CONTEXT\ Typesetting Macros, +%D subtitle=Capping, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Typesetting Macros / Caps} + +\unprotect + +%D Maybe we need a more clever system: either command or style mode etc. so +%D that we can avoid the grouped mess in a simple style switch. + +\registerctxluafile{typo-cap}{optimize} + +% \definesystemattribute[case][public] % already predefined + +%D \macros +%D {setupcapitals} +%D +%D By default we use pseudo small caps in titles. This can be set up with: +%D +%D \showsetup{setupcapitals} + +\installcorenamespace{capitals} + +\installcommandhandler \??capitals {capitals} \??capitals + +%D Beware, these are not really defines (yet). + +\definecapitals[\v!WORD] % all upper +\definecapitals[\v!capital] % one upper + font +\definecapitals[\v!Capital] % some upper + font +\definecapitals[\v!mixed] % UpperCase +\definecapitals[\v!Word] % one upper + font +\definecapitals[\v!Words] % some upper +\definecapitals[\v!camel] % lowers first +\definecapitals[\v!word][\c!style=] % nothing + +%D \macros +%D {Word, Words, WORD, WORDS} +%D +%D This is probably not the right place to present the next set of macros. +%D +%D \starttyping +%D \Word {far too many words} +%D \Words{far too many words} +%D \WORD {far too many words} +%D \WORDS{far too many words} +%D \stoptyping +%D +%D \typebuffer +%D +%D This calls result in: +%D +%D \startlines +%D \getbuffer +%D \stoplines +%D +%D \showsetup{Word} +%D \showsetup{Words} +%D \showsetup{WORD} +%D \showsetup{WORDS} + +% test \WORD{test TEST \TeX} test +% test \word{test TEST \TeX} test +% test \Word{test TEST \TeX} test + +\permanent\protected\def\setcharactercasing[#1]{\clf_setcharactercasing{#1}\fontid\font} % can be public implementor + +\protected\def\typo_capitale_WORD {\clf_setcharactercasing{\v!WORD }\fontid\font} +\protected\def\typo_capitale_word {\clf_setcharactercasing{\v!word }\fontid\font} +\protected\def\typo_capitale_Word {\clf_setcharactercasing{\v!Word }\fontid\font} +\protected\def\typo_capitale_Words{\clf_setcharactercasing{\v!Words}\fontid\font} +\protected\def\typo_capitale_camel{\clf_setcharactercasing{\v!camel}\fontid\font} + +\permanent\protected\def\WORD {\triggergroupedcommandcs\typo_capitale_WORD } +\permanent\protected\def\word {\triggergroupedcommandcs\typo_capitale_word } +\permanent\protected\def\Word {\triggergroupedcommandcs\typo_capitale_Word } +\permanent\protected\def\Words{\triggergroupedcommandcs\typo_capitale_Words} +\permanent\protected\def\camel{\triggergroupedcommandcs\typo_capitale_camel} + +\aliased\let\WORDS\WORD +\aliased\let\words\word + +%D \macros +%D {kap,KAP,Kap,Kaps,nokap,userealcaps,usepseudocaps} +%D +%D We already introduced \type {\cap} as way to capitalize words. This command comes +%D in several versions: +%D +%D \startbuffer +%D \cap {let's put on a \cap{cap}} +%D \cap {let's put on a \nocap{cap}} +%D \CAP {let's put on a \\{cap}} +%D \Cap {let's put on a \\{cap}} +%D \Caps{let's put on a cap} +%D \stopbuffer +%D +%D \typebuffer +%D +%D Note the use of \type {\nocap}, \type {\\} and the nested \type {\cap}. +%D +%D \startlines +%D \getbuffer +%D \stoplines +%D +%D These macros show te main reason why we introduced the smaller \type {\tx} and +%D \type {\txx}. +%D +%D \starttyping +%D \cap\romannumerals{1995} +%D \stoptyping +%D +%D This at first sight unusual capitilization is completely legal. +%D +%D \showsetup{smallcapped} +%D \showsetup{notsmallcapped} +%D \showsetup{CAPPED} +%D \showsetup{SmallCapped} +%D \showsetup{SmallCaps} +%D +%D The difference between pseudo and real caps is demonstrated below: +%D +%D \startbuffer +%D \usepseudocaps \cap{Hans Hagen} +%D \userealcaps \cap{Hans Hagen} +%D \stopbuffer +%D +%D \typebuffer +%D +%D \getbuffer +%D +%D The \type {\bgroup} trickery below is needed because of \type {\groupedcommand}. + +\newconditional\c_typo_capitals_pseudo + +\permanent\protected\def\usepseudocaps{\settrue \c_typo_capitals_pseudo} +\permanent\protected\def\userealcaps {\setfalse\c_typo_capitals_pseudo} + +\usepseudocaps + +% we use char0 as placeholder for the larger font +% +% here we keep the \groupedcommand + +\def\typo_capitals_set_fake#1% + {\edef\currentcapitals{#1}% + \clf_setcharactercasing{\currentcapitals}\fontid\font + \usecapitalsstyleparameter\c!style} + +\def\typo_capitals_set_real#1% + {\edef\currentcapitals{#1}% + \sc + \clf_setcharactercasing{\currentcapitals}\fontid\font} + +\permanent\protected\def\pseudosmallcapped{\triggergroupedcommandcs\font_style_pseudosmallcapped} +\permanent\protected\def\pseudoSmallcapped{\triggergroupedcommandcs\font_style_pseudoSmallcapped} +\permanent\protected\def\pseudoSmallCapped{\triggergroupedcommandcs\font_style_pseudoSmallCapped} +\permanent\protected\def\pseudoMixedCapped{\triggergroupedcommandcs\font_style_pseudoMixedCapped} + +\permanent\protected\def\realsmallcapped {\triggergroupedcommandcs\font_style_realsmallcapped} +\permanent\protected\def\realSmallcapped {\triggergroupedcommandcs\font_style_realSmallcapped} +\permanent\protected\def\realSmallCapped {\triggergroupedcommandcs\font_style_realSmallCapped} + +\permanent\protected\def\notsmallcapped {\triggergroupedcommandcs\font_style_notsmallcapped} + +\protected\def\font_style_pseudosmallcapped{\typo_capitals_set_fake\v!WORD } % all upper +\protected\def\font_style_pseudoSmallcapped{\typo_capitals_set_fake\v!capital} % one upper + font +\protected\def\font_style_pseudoSmallCapped{\typo_capitals_set_fake\v!Capital} % some upper + font +\protected\def\font_style_pseudoMixedCapped{\typo_capitals_set_fake\v!mixed } + +\protected\def\font_style_realsmallcapped {\typo_capitals_set_real\v!WORD } % all lower +\protected\def\font_style_realSmallcapped {\typo_capitals_set_real\v!Word } % one upper + font +\protected\def\font_style_realSmallCapped {\typo_capitals_set_real\v!Words } % some upper + +\protected\def\font_style_notsmallcapped {\typo_capitals_set_fake\v!word } + +\protected\def\typo_capitals_smallcaps + {\ifconditional\c_typo_capitals_pseudo + \expandafter\firstoftwoarguments + \else + \expandafter\secondoftwoarguments + \fi} + +\permanent\protected\def\smallcapped{\typo_capitals_smallcaps\pseudosmallcapped\realsmallcapped} +\permanent\protected\def\Smallcapped{\typo_capitals_smallcaps\pseudoSmallcapped\realSmallcapped} +\permanent\protected\def\SmallCapped{\typo_capitals_smallcaps\pseudoSmallCapped\realSmallCapped} + +\permanent\protected\def\font_style_smallcapped{\typo_capitals_smallcaps\font_style_pseudosmallcapped\font_style_realsmallcapped} +\permanent\protected\def\font_style_Smallcapped{\typo_capitals_smallcaps\font_style_pseudoSmallcapped\font_style_realSmallcapped} +\permanent\protected\def\font_style_SmallCapped{\typo_capitals_smallcaps\font_style_pseudoSmallCapped\font_style_realSmallCapped} + +\permanent\protected\def\autocap{\ifmmode\expandafter\normalcap\else\expandafter\smallcapped\fi} + +\prependtoks + \enforced\let\normalcap\cap % mathmode cap +\to \everydump + +\appendtoks + \enforced\let\cap\autocap +\to \everydump + +\aliased\let\kap\cap % for old times sake +\aliased\let\Caps\SmallCapped % for old times sake + +\aliased\let\mixedcaps\pseudoMixedCapped + +\aliased\let\normalsmallcapped\smallcapped +\aliased\let\normalWORD \WORD +\aliased\let\normalword \word + +\aliased\let\font_style_normalsmallcapped\font_style_smallcapped +\aliased\let\font_style_normalWORD \WORD +\aliased\let\font_style_normalword \word + +\appendtoks + \ifx\currentcapitals\empty + \doifelse{\directcapitalsparameter\c!title}\v!yes + {\definealternativestyle[\v!capital ][\font_style_normalsmallcapped][\font_style_normalsmallcapped]% + \definealternativestyle[\v!smallcaps][\setsmallcaps][\setsmallcaps]} + {\definealternativestyle[\v!capital ][\font_style_normalsmallcapped][\font_style_normalWORD]% + \definealternativestyle[\v!smallcaps][\setsmallcaps][\font_style_normalWORD]}% + \doifelse{\directcapitalsparameter\s!sc}\v!yes + \userealcaps + \usepseudocaps + \fi +\to \everysetupcapitals + +\aliased\let\uppercased\normalWORD +\aliased\let\lowercased\normalword + +\setupcapitals + [\c!title=\v!yes, + \c!style=\tx, + \s!sc=\v!no] % no \c!sc any longer + +\definefont + [MixedCaps] + [CurrentFont*default cp 1.2\exheight] + +\setupcapitals + [\v!mixed] + [\c!style=MixedCaps] + +% \definestartstop is not yet in available at core-spa time +% +% \startrandomized \input tufte \stoprandomized +% +% \definestartstop[randomized][\c!before=\dosetattribute{case}{8},\c!after=] + +% \protected\def\randomizetext{\groupedcommand{\c_attr_case\pluseight}{}} + +\permanent\protected\def\randomizetext{\triggergroupedcommand{\c_attr_case\pluseight}} + +\definestartstop[randomized][\c!before=\dosetattribute{case}{8},\c!after=] + +\protect \endinput diff --git a/tex/context/base/mkiv/typo-ini.mkxl b/tex/context/base/mkiv/typo-ini.mkxl new file mode 100644 index 000000000..3e0790af0 --- /dev/null +++ b/tex/context/base/mkiv/typo-ini.mkxl @@ -0,0 +1,49 @@ +%D \module +%D [ file=typo-ini, +%D version=2000.16.09, +%D title=\CONTEXT\ Typographic Macros, +%D subtitle=Initialization, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D Since \CONTEXT\ is dealing with typographics, isn't +%D September 2000 a bit late to start writing this module? It +%D may seem so, but since more and more languages are +%D supported, we think it is time to isolate language specific +%D typographic extensions in modules. The first language that +%D demands this is Chinese, and more will follow. + +\writestatus{loading}{ConTeXt Typographic Macros / Initialization} + +\registerctxluafile{typo-ini}{} + +\unprotect + +% This will be done differently: +% +% %D \macros +% %D {ifvertical} +% %D +% %D The following switch can be used to signal macros that they +% %D should adapt their behaviour. +% +% \newif\ifvertical % maybe also ifreverse +% +% %D \macros +% %D {vhbox} +% %D +% %D A stupid but useful macro. +% +% \def\vhbox{\ifvertical\vbox\else\hbox\fi} + +%D \macros +%D {everyresettypesetting} + +\newtoks\everyresettypesetting + +\protect \endinput diff --git a/tex/context/base/mkiv/typo-inj.mkiv b/tex/context/base/mkiv/typo-inj.mkiv index 633d430e4..db5bb2d5b 100644 --- a/tex/context/base/mkiv/typo-inj.mkiv +++ b/tex/context/base/mkiv/typo-inj.mkiv @@ -44,35 +44,31 @@ %D \startsection[title=Delta] fourth \index{fourth} \stopsection %D \stoptext -\unexpanded\def\resetinjector [#1]{\clf_resetinjector{#1}} -\unexpanded\def\markinjector [#1]{\dontleavehmode\clf_markinjector{#1}} -\unexpanded\def\docheckinjector [#1][#2]{\clf_checkinjector{#1}{#2}} -\unexpanded\def\checknextinjector [#1]{\clf_checkinjector{#1}{\v!next}} -\unexpanded\def\checkpreviousinjector [#1]{\clf_checkinjector{#1}{\v!previous}} -%unexpanded\def\checknextinjector [#1]{\clf_checknextinjector{#1}} -%unexpanded\def\checkpreviousinjector [#1]{\clf_checkpreviousinjector{#1}} -\unexpanded\def\dosetinjector [#1][#2][#3]{\clf_setinjector{#1}{#2}{#3}} -\unexpanded\def\doshowinjector [#1]{\clf_showinjector{#1}} +\permanent \protected\def\resetinjector [#1]{\clf_resetinjector{#1}} +\permanent \protected\def\markinjector [#1]{\dontleavehmode\clf_markinjector{#1}} +\permanent\tolerant\protected\def\checkinjector [#1]#*[#2]{\clf_checkinjector{#1}{#2}} +\permanent \protected\def\checknextinjector [#1]{\clf_checkinjector{#1}{\v!next}} +\permanent \protected\def\checkpreviousinjector [#1]{\clf_checkinjector{#1}{\v!previous}} +%permanent \protected\def\checknextinjector [#1]{\clf_checknextinjector{#1}} +%permanent \protected\def\checkpreviousinjector [#1]{\clf_checkpreviousinjector{#1}} +\permanent\tolerant\protected\def\setinjector [#1]#*[#2]#*[#3]{\clf_setinjector{#1}{#2}{#3}} +\permanent\tolerant\protected\def\showinjector [#1]{\clf_showinjector{#1}} -\unexpanded\def\checkinjector{\dodoubleempty \docheckinjector} -\unexpanded\def\setinjector {\dotripleargument\dosetinjector} -\unexpanded\def\showinjector {\dosingleempty \doshowinjector} - -\unexpanded\def\domarkinjector#1#2% called at the lua end +\permanent\protected\def\domarkinjector#1#2% called at the lua end {\dontleavehmode\llap{\infofont\ifcase#1\else\red\fi<#2>\quad}} % low level definers .. we could have \injectors_mark and \injectors_check and then % use \v!list instead of \s!list -\unexpanded\def\doinstallinjector#1% +\permanent\protected\def\doinstallinjector#1% {\letvalue{typo_injectors_mark_#1}\donothing \letvalue{typo_injectors_check_#1}\donothing} -\unexpanded\def\doactivateinjector#1% used at lua end +\permanent\protected\def\doactivateinjector#1% used at lua end {\setuxvalue{typo_injectors_mark_#1}{\dontleavehmode\noexpand\clf_markinjector{#1}}% \setuxvalue{typo_injectors_check_#1}{\noexpand\clf_checkinjector{#1}}} -\unexpanded\def\dotestinjector#1% only for testing outside unprotect +\permanent\protected\def\dotestinjector#1% only for testing outside unprotect {\begincsname typo_injectors_check_#1\endcsname \begincsname typo_injectors_mark_#1\endcsname} diff --git a/tex/context/base/mkiv/typo-inj.mkxl b/tex/context/base/mkiv/typo-inj.mkxl new file mode 100644 index 000000000..633d430e4 --- /dev/null +++ b/tex/context/base/mkiv/typo-inj.mkxl @@ -0,0 +1,80 @@ +%D \module +%D [ file=typo-inj, +%D version=2014.10.13, +%D title=\CONTEXT\ Typesetting Macros, +%D subtitle=Triggering Actions, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt Typesetting Macros / Triggering Actions} + +%D This is a sort of escape from too automatic typesetting of lists. I have +%D been thinking fo a more generic injector for instance based on tags (as we +%D already index each element) but thi sis sort of fuzzy because the number of a +%D tag is not always incremented before we check for it. Also, registers and lists +%D are among the few candidates that cannot be controlled directly by putting +%D something in the input. So,m for the moment I stick to this mechanism but +%D future versions of \CONTEXT\ might do it differently. Compatibility is not much +%D of an issue here as this mechanism is only to be used in final production runs. + +\unprotect + +\registerctxluafile{typo-inj}{} + +% todo: no need in trialmode + +%D \showinjector +%D +%D \setinjector[register][3][\column] +%D \setinjector[list] [2][{\blank[3*big]}] +%D +%D \starttext +%D \placelist[section][criterium=text] +%D \blank[3*big] +%D \placeregister[index][criterium=text] +%D \page +%D \startsection[title=Alpha] first \index{first} \stopsection +%D \startsection[title=Beta] second \index{second} \stopsection +%D \startsection[title=Gamma] third \index{third} \stopsection +%D \startsection[title=Delta] fourth \index{fourth} \stopsection +%D \stoptext + +\unexpanded\def\resetinjector [#1]{\clf_resetinjector{#1}} +\unexpanded\def\markinjector [#1]{\dontleavehmode\clf_markinjector{#1}} +\unexpanded\def\docheckinjector [#1][#2]{\clf_checkinjector{#1}{#2}} +\unexpanded\def\checknextinjector [#1]{\clf_checkinjector{#1}{\v!next}} +\unexpanded\def\checkpreviousinjector [#1]{\clf_checkinjector{#1}{\v!previous}} +%unexpanded\def\checknextinjector [#1]{\clf_checknextinjector{#1}} +%unexpanded\def\checkpreviousinjector [#1]{\clf_checkpreviousinjector{#1}} +\unexpanded\def\dosetinjector [#1][#2][#3]{\clf_setinjector{#1}{#2}{#3}} +\unexpanded\def\doshowinjector [#1]{\clf_showinjector{#1}} + +\unexpanded\def\checkinjector{\dodoubleempty \docheckinjector} +\unexpanded\def\setinjector {\dotripleargument\dosetinjector} +\unexpanded\def\showinjector {\dosingleempty \doshowinjector} + +\unexpanded\def\domarkinjector#1#2% called at the lua end + {\dontleavehmode\llap{\infofont\ifcase#1\else\red\fi<#2>\quad}} + +% low level definers .. we could have \injectors_mark and \injectors_check and then +% use \v!list instead of \s!list + +\unexpanded\def\doinstallinjector#1% + {\letvalue{typo_injectors_mark_#1}\donothing + \letvalue{typo_injectors_check_#1}\donothing} + +\unexpanded\def\doactivateinjector#1% used at lua end + {\setuxvalue{typo_injectors_mark_#1}{\dontleavehmode\noexpand\clf_markinjector{#1}}% + \setuxvalue{typo_injectors_check_#1}{\noexpand\clf_checkinjector{#1}}} + +\unexpanded\def\dotestinjector#1% only for testing outside unprotect + {\begincsname typo_injectors_check_#1\endcsname + \begincsname typo_injectors_mark_#1\endcsname} + +\protect \endinput + diff --git a/tex/context/base/mkiv/typo-mar.mkxl b/tex/context/base/mkiv/typo-mar.mkxl new file mode 100644 index 000000000..8c8fc218e --- /dev/null +++ b/tex/context/base/mkiv/typo-mar.mkxl @@ -0,0 +1,474 @@ +% macros=mkvi + +%D \module +%D [ file=typo-mar, +%D version=2010.02.15, % was experimental code +%D title=\CONTEXT\ Typesetting Macros, +%D subtitle=Margindata, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% maybe dontleavehmode when scope is local + +% todo: tags +% todo: force inline with option (saves pos) +% todo: margintitle (also less position then) + +\writestatus{loading}{ConTeXt Typesetting Macros / Margindata} + +\unprotect + +%D This module has been on the agenda for a while. Actually, it is one of the things +%D that I really need myself, for instance when rendering rather unpredictable +%D (educational) tests encoded in XML. This module permits anchoring for instance +%D item numbers and also overload them when they have subnumbers. In the future it +%D might replace the current maginal note mechanism (that then will be just an +%D instance). +%D +%D In spite of what might be expected, the more advanced \LUA\ based variant is upto +%D twice as fast on simple entries. Also, we no longer need an extra pass to get +%D inner and outer alignments in sync with the pagebuilder. + +\registerctxluafile{typo-mar}{} + +%definesystemattribute[margindata] % only at the lua end + +%D In \MKII\ we have three categories and their historically meaning is as follows: +%D +%D marginlines: These are flushed relative to the start of a line and need to be +%D invoked there. +%D +%D marginwords: These can be issued in the text flow and will migrate sidewards; in +%D spite of the name, it can be a paragraph of text as well, but normally it's +%D words. +%D +%D margintexts: These can be set beforehand and are flushed at the next paragraph of +%D text (of header). +%D +%D In \MKIV\ we have further integrated the mechanism and we now have: +%D +%D margindata: This can be anything that needs to go into the margin. It can be +%D anchored in the text or given beforehand in which case it gets flushed at the +%D first occasion. +%D +%D margintext: This runs on top of margindata and the only difference is that it +%D uses the framed mechanism for packaging. +%D +%D Stacking is done differently as is inner and outer alignment (in most cases more +%D efficient). The functionality is mostly the same as in \MKII, but there are a few +%D additions, like names entries, where later ones overload preceding not yet +%D flushed ones. Data can get catagorized and is then treated as a group (e.g. when +%D stacking is needed). +%D +%D The amount of \TEX\ code is less than in \MKII\ because we do all trickery in at +%D the \LUA\ end. At the end of this file we define several commands, like \type +%D {\inleftmargin} and \type {\inleft}. You can configure them individually or as a +%D group. There is an inheritance model in place. +%D +%D The following notes will be stacked: +%D +%D \starttyping +%D \ininner[line=2]{IM A} +%D \ininner[stack=yes]{IM B} +%D \ininner[stack=yes]{IM C} +%D \stoptyping +%D +%D The distance between them is determined by \type {dy}: +%D +%D \starttyping +%D \ininner[stack=yes,dy=2ex][frame=on] {IM A} +%D \ininner[stack=yes,dy=2ex][frame=on] {IM B} +%D \stoptyping +%D +%D There are several methods of vertical alignment. +%D +%D \starttyping +%D \inmargin [method=first] [frame=on] {first\\second} \input ward \par +%D \inmargin [method=first] [frame=on,offset=3pt] {first\\second} \input ward \par +%D \inmargin [method=first,voffset=-3pt][frame=on,offset=3pt,rulethickness=3pt] {first\\second} \input ward \par +%D \inmargin [method=first,voffset=-6pt][frame=on,offset=3pt,rulethickness=3pt] {first\\second} \input ward \par +%D \stoptyping +%D +%D You sometimes need to combine \type {voffset} with \type {offset}. The first +%D argument concerns the data, the second the framed. Not sharing the setup is on +%D purpose: location, offset, alignment and other parameters might clash. + +\installcorenamespace{margindata} +\installcorenamespace{marginframed} + +\installcommandhandler \??margindata {margindata} \??margindata +\installframedcommandhandler \??marginframed {marginframed} \??marginframed + +\setupmargindata + [\c!location=\v!left, + % \c!align=, + % \c!method=, + \c!style=\v!bold, + \c!color=, % maybe \maintextcolor + % \c!name=, + % \c!category=, + \c!threshold=.25\exheight, + \c!margin=\v!normal, + \c!scope=\v!global, + \c!width=, + % \c!stack=, + % \c!stackname=, + % \c!option=, % \v!paragraph (follow shape) + \c!line=0, + \c!anchor=\v!text, + \c!bottomspace=\strutdepth, % slack used for keeptogether + \c!dy=\zeropoint, + \c!distance=\zeropoint, + \c!hoffset=\zeropoint, + \c!voffset=\zeropoint] + +\setupmarginframed % so, align should be set with the data command + [\c!strut=\v!yes, % so by default we scale the strut to the font ! + \c!offset=\v!overlay, + \c!fr!analyze=\v!yes, + \c!frame=\v!off, + \c!width=\margindataparameter\c!width, + \c!align=\margindataparameter\c!align] + +\appendtoks + \frozen\instance\setuevalue\currentmargindata{\margindata[\currentmargindata]}% +\to \everydefinemargindata + +\newconditional\inhibitmargindata % This one is used at the Lua end! +\newtoks \everymargindatacontent % Later on we will set this one. + +\appendtoks + \settrue\inhibitmargindata +\to \everyforgetall + +\appendtoks + \forgetall + \tf + \resetallattributes % \deactivatecolor % needed, but maybe we should switch to maintextcolor: \onlyinheritmaintextcolor + \pickupattributes +\to \everymargindatacontent + +% trialtypesetting: no need for margin stuff while trialing as +% is has no dimensions + +\newcount\nofmargintexts +\newcount\c_typo_margins_n + +\ifdefined\dotagmarginanchor \else \let\dotagmarginanchor\gobbleoneargument \fi +\ifdefined\dotagmargintext \else \let\dotagmargintext \gobbleoneargument \fi + +\definepagestate[\s!margintext] + +\protected\def\typo_margins_data_synchronize + {\doforcedtrackpagestate\s!margintext\nofmargintexts % includes increment + \docheckpagestate\s!margintext\nofmargintexts + %\doifelserightpagestate\s!margintext\nofmargintexts\relax\relax + \realpageno\realpagestateno + \swapmargins} + +\permanent\protected\def\margindata + {\iftrialtypesetting + \expandafter\typo_margins_data_nop + \else + \expandafter\typo_margins_data_yes + \fi} + +\permanent\tolerant\protected\def\typo_margins_data_nop[#name]#spacer[#dataparameters]#spacer[#textparameters]#:#content% + {} + +\permanent\tolerant\protected\def\typo_margins_data_yes[#name]#spacer[#dataparameters]#spacer[#textparameters]#:#content% + {\setfalse\inhibitmargindata % flushing afterwards + \begingroup + %\settrue\inhibitmargindata % no flushing in here + \def\currentmargindata{#name}% + \let\currentmarginframed\currentmargindata + \ifparameter#dataparameters\or + \setupcurrentmargindata[#dataparameters]% + \fi + \doifelsenothing{#content}\donefalse\donetrue + \global\advance\c_typo_margins_n\plusone + \ifdone + \edef\currentmarginreference{\margindataparameter\c!reference}% + \ifempty\currentmarginreference \else + \strc_references_set_page_only_destination_box_attribute\currentmarginreference\currentmarginreference + \fi + \edef\currentmargindatastrut{\margindataparameter\c!strut}% + \dostarttaggedchained\t!margintext\currentmargindata\??margindata + \dotagmargintext\c_typo_margins_n + \ifcsname\currentmarginframedhash\s!parent\endcsname + \setbox\nextbox\naturalhbox \currentmarginreference \bgroup + \the\everymargindatacontent + \usemargindatastyleandcolor\c!style\c!color + \setupcurrentmarginframed[\c!location=\v!normal,#textparameters]% + \typo_margins_data_synchronize + \inheritedmarginframedframed\bgroup + \ifempty\currentmargindatastrut \else + \synchronizestrut\currentmargindatastrut + \fi + \begstrut + \strc_references_flush_destination_nodes + \margindataparameter\c!command{#content}% + \endstrut + \egroup + \egroup + \edef\currentmarginfirstheight{\number\dimexpr\framedfirstheight}% + \else + \edef\currentmargindatawidth{\margindataparameter\c!width}% + \ifempty\currentmargindatawidth + \setbox\nextbox\naturalhbox \currentmarginreference \bgroup + \typo_margins_data_synchronize + \the\everymargindatacontent + \usemargindatastyleandcolor\c!style\c!color + \ifempty\currentmargindatastrut \else + \synchronizestrut\currentmargindatastrut + \fi + \begstrut + \strc_references_flush_destination_nodes + \margindataparameter\c!command{#content}% + \endstrut + \egroup + \let\currentmarginfirstheight\empty + \else + \setbox\nextbox\naturalhbox \currentmarginreference \bgroup + \typo_margins_data_synchronize + \dosetraggedcommand{\margindataparameter\c!align}% + \vtop \bgroup + \the\everymargindatacontent + \usemargindatastyleandcolor\c!style\c!color + \hsize\currentmargindatawidth + \raggedcommand + \ifempty\currentmargindatastrut \else + \synchronizestrut\currentmargindatastrut + \fi + \begstrut + \strc_references_flush_destination_nodes + \margindataparameter\c!command{#content}% + \endstrut + \egroup + \egroup + \edef\currentmarginfirstheight{true}% + \fi + \fi + \dostoptagged + \fi + \ifdone + \edef\p_anchor{\margindataparameter\c!anchor}% + \anch_positions_initialize % we use positions at the lua end + \dostarttagged\t!marginanchor\empty + \dotagmarginanchor\c_typo_margins_n + \clf_savemargindata + location {\margindataparameter\c!location}% + method {\margindataparameter\c!method}% + category {\margindataparameter\c!category}% + name {\margindataparameter\c!name}% + scope {\margindataparameter\c!scope}% + option {\margindataparameter\c!option}% + number \nextbox + margin {\margindataparameter\c!margin}% local normal margin edge + distance \dimexpr\margindataparameter\c!distance\relax + hoffset \dimexpr\margindataparameter\c!hoffset\relax + voffset \dimexpr\margindataparameter\c!voffset\relax + dy \dimexpr\margindataparameter\c!dy\relax + bottomspace \dimexpr\margindataparameter\c!bottomspace\relax + \ifempty\currentmarginfirstheight \else + baseline {\currentmarginfirstheight}% + \fi + threshold \dimexpr\margindataparameter\c!threshold\relax % overlap related, will change + \ifhmode + inline true % + \fi + anchor {\p_anchor\ifx\p_anchor\v!region:0\fi}% kind of a hack to force column anchoring (for now) + % + % we're not in forgetall + % + % \ifzeropt\leftskip \else + % leftskip \dimexpr\leftskip\relax + % \fi + % \ifzeropt\leftskip \else + % rightskip \dimexpr\rightskip\relax + % \fi + align {\margindataparameter\c!align}% + line \numexpr\margindataparameter\c!line\relax + stackname {\margindataparameter\c!stackname}% + stack {\margindataparameter\c!stack}% + index \c_typo_margins_n + \relax + \dostoptagged + \else + \clf_savemargindata + location {\margindataparameter\c!location}% + method {\margindataparameter\c!method}% + category {\margindataparameter\c!category}% + name {\margindataparameter\c!name}% + scope {\margindataparameter\c!scope}% + number \nextbox + \relax + \fi + \endgroup} + +%D Downward compatible hack: + +\permanent\protected\def\typo_margins_space_or_par + {\endgraf\ifhmode\space\fi} + +\appendtoks + \enforced\let\\\typo_margins_space_or_par +\to \everymargindatacontent + +%D Another one: + +% \installcorenamespace{oppositemargin} +% +% \letvalue{\??oppositemargin\v!left }\v!right +% \letvalue{\??oppositemargin\v!right }\v!left +% \letvalue{\??oppositemargin\v!inner }\v!outer +% \letvalue{\??oppositemargin\v!outer }\v!inner +% \letvalue{\??oppositemargin\v!normal}\v!normal +% +% \def\oppositemargin#1% +% {\csname\??oppositemargin\ifcsname\??oppositemargin#1\endcsname#1\else\v!normal\fi\endcsname} + +%D Definitions: + +% common to lines and text + +\setupmargindata [\v!left ] [\c!method=\v!first,\c!location=\v!left ,\c!margin=\v!margin,\c!align=\v!flushright,\s!parent=\??margindata] % we could autoparent when no define yet +\setupmargindata [\v!right] [\c!method=\v!first,\c!location=\v!right,\c!margin=\v!margin,\c!align=\v!flushleft, \s!parent=\??margindata] +\setupmargindata [\v!outer] [\c!method=\v!first,\c!location=\v!outer,\c!margin=\v!margin,\c!align=\v!inner, \s!parent=\??margindata] +\setupmargindata [\v!inner] [\c!method=\v!first,\c!location=\v!inner,\c!margin=\v!margin,\c!align=\v!outer, \s!parent=\??margindata] + +% lines + +\definemargindata [\v!inleftmargin] [\v!left ] [\c!margin=\v!margin,\c!width=\leftmarginwidth ,\c!style=,\c!color=] +\definemargindata [\v!inrightmargin] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!style=,\c!color=] +\definemargindata [\v!inoutermargin] [\v!outer] [\c!margin=\v!margin,\c!width=\outermarginwidth,\c!style=,\c!color=] +\definemargindata [\v!ininnermargin] [\v!inner] [\c!margin=\v!margin,\c!width=\innermarginwidth,\c!style=,\c!color=] + +\definemargindata [\v!inleftedge] [\v!left ] [\c!margin=\v!edge ,\c!width=\leftedgewidth ,\c!style=,\c!color=,\c!category=\v!edge] +\definemargindata [\v!inrightedge] [\v!right] [\c!margin=\v!edge ,\c!width=\rightedgewidth ,\c!style=,\c!color=,\c!category=\v!edge] +\definemargindata [\v!inouteredge] [\v!outer] [\c!margin=\v!edge ,\c!width=\outeredgewidth ,\c!style=,\c!color=,\c!category=\v!edge] +\definemargindata [\v!ininneredge] [\v!inner] [\c!margin=\v!edge ,\c!width=\inneredgewidth ,\c!style=,\c!color=,\c!category=\v!edge] + +\definemargindata [\v!atleftmargin] [\v!left ] [\c!margin=\v!normal,\c!width=\leftmarginwidth ,\c!style=,\c!color=] +\definemargindata [\v!atrightmargin] [\v!right] [\c!margin=\v!normal,\c!width=\rightmarginwidth,\c!style=,\c!color=] + +% text: \v!added + +\definemargindata [\v!inleft] [\v!left ] [\c!margin=\v!margin,\c!width=\leftmarginwidth ,\c!align=\v!flushright] +\definemargindata [\v!inright] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!align=\v!flushleft] +\definemargindata [\v!inouter] [\v!outer] [\c!margin=\v!margin,\c!width=\outermarginwidth,\c!align=\v!inner] +\definemargindata [\v!ininner] [\v!inner] [\c!margin=\v!margin,\c!width=\innermarginwidth,\c!align=\v!outer] + +% no longer auto auto-other + +\definemargindata [\v!inmargin] [\v!left] [\c!margin=\v!margin,\c!width=\leftmarginwidth, \c!align=\v!flushright] +\definemargindata [\v!inother] [\v!right] [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!align=\v!flushleft] + +\definemargindata [\v!margintext] [\v!left] [\c!margin=\v!margin,\c!width=\leftmarginwidth, \c!align=\v!flushright,\c!stack=\v!yes] + +\setupmarginframed [\v!left ] [\c!method=\v!first,\c!align=\v!flushright,\s!parent=\??marginframed] % we could autoparent when no define yet +\setupmarginframed [\v!right] [\c!method=\v!first,\c!align=\v!flushleft, \s!parent=\??marginframed] +\setupmarginframed [\v!outer] [\c!method=\v!first,\c!align=\v!inner, \s!parent=\??marginframed] +\setupmarginframed [\v!inner] [\c!method=\v!first,\c!align=\v!outer, \s!parent=\??marginframed] + +\definemarginframed [\v!inleft] [\v!left ] +\definemarginframed [\v!inright] [\v!right] +\definemarginframed [\v!inouter] [\v!outer] +\definemarginframed [\v!ininner] [\v!inner] +\definemarginframed [\v!inmargin] [\v!inleft] +\definemarginframed [\v!inother] [\v!inright] + +\aliased\let\marginword \margintext +\aliased\let\margintitle \margintext +\aliased\let\inothermargin\inother % for old times sake + +%definemargindata [inouterextra] [\v!outer] [\c!margin=\v!edge,\c!location=\v!outer,\c!width=\outeredgewidth,\c!align=\v!outer,\c!category=\v!edge] +%definemargindata [ininnerextra] [\v!inner] [\c!margin=\v!edge,\c!location=\v!inner,\c!width=\inneredgewidth,\c!align=\v!inner,\c!category=\v!edge] +% +%definemarginframed [inouterextra] [\v!outer] +%definemarginframed [ininnerextra] [\v!inner] + +%D As we have more control we are not backward compatible although in +%D practice it won't hurt that much. So, from now on use: +%D +%D \starttyping +%D \definemargindata +%D \setupmargindata +%D \definemarginframed +%D \setupmarginframed +%D \stoptyping + +% The following sort of works okay but is to be avoided ... it will disappear from lmtx: + +\permanent\tolerant\protected\def\defineinmargin[#name]#spacer[#location]#spacer[#align]#spacer[#settings]% not completely compatible + {\ifarguments\else + \definemargindata[#name][\c!location=#location,\c!align=#align,#settings]% + \definemarginframed[#name][#location][\c!align=#align,#settings]% + \fi} + +\aliased\let\definemarginline\definemargindata % for old times sake +\aliased\let\setupinmargin \setupmargindata % only partial (no framed), for old times sake + +% begin of experimental code (will move) +% +% \dosetanchor{x}test \dostarthanchoring{x}\llap{crap}\dostophanchoring{x}test test test +% test \dostarthanchoring{text}\llap{crap}\dostophanchoring{text}test test test + +% \def\dosetanchor #1{\dontleavehmode\latelua{anchors.set("#1")}} +% \def\doresetanchor #1{\dontleavehmode\latelua{anchors.reset("#1")}} +% \def\doresetanchornow #1{\directlua{anchors.reset("#1")}} +% \def\dostartanchoring #1{\dontleavehmode\latelua{anchors.startmove("#1")}} +% \def\dostopanchoring #1{\dontleavehmode\latelua{anchors.stopmove("#1")}} +% \def\dostarthanchoring#1{\dontleavehmode\latelua{anchors.startmove("#1","h")}} +% \def\dostartvanchoring#1{\dontleavehmode\latelua{anchors.startmove("#1","v")}} +% \let\dostophanchoring \dostopanchoring +% \let\dostopvanchoring \dostopanchoring + +%D Here because in strc-ren we are too early: + +% % \definemargindata +% % [margintext:chapter] +% % [margintext:section] +% % +% % \defineheadalternative +% % [margintext:chapter] +% % [margintext] +% % [margintext=margintext:chapter] +% % +% % \setuphead +% % [chapter] +% % [alternative=margintext:chapter] +% +% \setuphead +% [chapter] +% [alternative=margintext] + +\definemargindata + [\v!margintext:\v!section] + [\v!left] + [\c!margin=\v!margin, + \c!width=\leftmarginwidth, + \c!align=\v!flushright] + +\defineheadalternative + [\v!margintext] + [\c!alternative=\v!somewhere, + \c!margintext=\v!margintext:\v!section, + \c!renderingsetup=\??headrenderings:\v!margintext] + +\startsetups[\??headrenderings:\v!margintext] + \executeifdefined{\headalternativeparameter\c!margintext}\margintext { + \ifconditional\headshownumber + \headnumbercontent + \hskip\headnumberdistance + \fi + \headtextcontent + } +\stopsetups + +\protect \endinput diff --git a/tex/context/interface/mkii/keys-cs.xml b/tex/context/interface/mkii/keys-cs.xml index f97364024..1a0faa2b5 100644 --- a/tex/context/interface/mkii/keys-cs.xml +++ b/tex/context/interface/mkii/keys-cs.xml @@ -1380,7 +1380,6 @@ <!-- definitions for interface commands for language cs --> <cd:commands> - <cd:command name='CAPPED' value='KAP'/> <cd:command name='Character' value='Znak'/> <cd:command name='Characters' value='Znaky'/> <cd:command name='MONTH' value='MESIC'/> diff --git a/tex/context/interface/mkii/keys-fr.xml b/tex/context/interface/mkii/keys-fr.xml index 74f8d4c99..4be991a8a 100644 --- a/tex/context/interface/mkii/keys-fr.xml +++ b/tex/context/interface/mkii/keys-fr.xml @@ -1380,7 +1380,6 @@ <!-- definitions for interface commands for language fr --> <cd:commands> - <cd:command name='CAPPED' value='CAP'/> <cd:command name='Character' value='Caractere'/> <cd:command name='Characters' value='Caracteres'/> <cd:command name='MONTH' value='MOIS'/> diff --git a/tex/context/interface/mkii/keys-ro.xml b/tex/context/interface/mkii/keys-ro.xml index 0f632ddb0..f27a02302 100644 --- a/tex/context/interface/mkii/keys-ro.xml +++ b/tex/context/interface/mkii/keys-ro.xml @@ -1380,7 +1380,6 @@ <!-- definitions for interface commands for language ro --> <cd:commands> - <cd:command name='CAPPED' value='KAP'/> <cd:command name='Character' value='Litera'/> <cd:command name='Characters' value='Litere'/> <cd:command name='MONTH' value='LUNA'/> diff --git a/tex/context/modules/mkiv/s-system-macros.mkxl b/tex/context/modules/mkiv/s-system-macros.mkxl index 58360b4bf..9ba57882d 100644 --- a/tex/context/modules/mkiv/s-system-macros.mkxl +++ b/tex/context/modules/mkiv/s-system-macros.mkxl @@ -105,7 +105,7 @@ -- local tolerant = v.tolerant and "tolerant" local noaligned = v.noaligned and "noaligned" local instance = v.instance and "instance" - local parameters = v.parameters or 0 + local parameters = v.parameters local dealtwith = mutable or immutable or frozen or permanent or primitive -- beware: we can have combinations local cscommand = gsub(v.cmdname or "","_"," ") local whatever = find(k,"^[a-z][a-z][a-z]+_") @@ -113,7 +113,7 @@ local csname = context.escape(k) ctx_NC() if dealtwith then context("+") elseif whatever then context("-") elseif instance then context("!")end ctx_NC() if primitive then ctx_bold(csname) else context(csname) end - ctx_NC() if parameters > 0 then context(parameters) end + ctx_NC() if parameters then context(parameters > 0 and parameters or "-") end ctx_NC() context(cscommand) -- ctx_NC() if tolerant then context(tolerant) end ctx_NC() if primitive then context(primitive) end diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 7548b39df..55d0f22d6 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 : 2020-11-15 20:40 +-- merge date : 2020-11-16 19:37 do -- begin closure to overcome local limits and interference |