From 3668eb2ecc0f7dcc6c44fd1e971cbe37fa010fd6 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 2 Aug 2019 21:03:52 +0200 Subject: 2019-08-02 19:47:00 --- .../lexers/data/scite-context-data-context.lua | 2 +- .../lexers/data/scite-context-data-metapost.lua | 2 +- .../context/scite-context-data-context.properties | 241 ++-- .../context/scite-context-data-metapost.properties | 3 +- .../context/data/scite-context-data-context.lua | 2 +- .../context/data/scite-context-data-metapost.lua | 2 +- .../context/syntaxes/context-syntax-mps.json | 2 +- .../context/syntaxes/context-syntax-tex.json | 2 +- doc/context/documents/general/qrcs/setup-cs.pdf | Bin 882482 -> 882210 bytes doc/context/documents/general/qrcs/setup-de.pdf | Bin 884361 -> 884149 bytes doc/context/documents/general/qrcs/setup-en.pdf | Bin 890332 -> 889985 bytes doc/context/documents/general/qrcs/setup-fr.pdf | Bin 880954 -> 880751 bytes doc/context/documents/general/qrcs/setup-it.pdf | Bin 886291 -> 886041 bytes .../documents/general/qrcs/setup-mapping-cs.pdf | Bin 349698 -> 349439 bytes .../documents/general/qrcs/setup-mapping-de.pdf | Bin 434492 -> 434343 bytes .../documents/general/qrcs/setup-mapping-en.pdf | Bin 347087 -> 346740 bytes .../documents/general/qrcs/setup-mapping-fr.pdf | Bin 349892 -> 349701 bytes .../documents/general/qrcs/setup-mapping-it.pdf | Bin 348874 -> 348633 bytes .../documents/general/qrcs/setup-mapping-nl.pdf | Bin 347854 -> 347638 bytes .../documents/general/qrcs/setup-mapping-ro.pdf | Bin 512619 -> 512482 bytes doc/context/documents/general/qrcs/setup-nl.pdf | Bin 875994 -> 875765 bytes doc/context/documents/general/qrcs/setup-ro.pdf | Bin 880480 -> 880343 bytes metapost/context/base/mpiv/metafun.mpiv | 1 + metapost/context/base/mpiv/metafun.mpxl | 1 + metapost/context/base/mpiv/minifun.mpiv | 1 + metapost/context/base/mpiv/minifun.mpxl | 1 + metapost/context/base/mpiv/mp-cont.mpiv | 158 +++ metapost/context/base/mpiv/mp-cont.mpxl | 158 +++ metapost/context/base/mpiv/mp-luas.mpxl | 9 + metapost/context/base/mpiv/mp-math.mpxl | 226 +-- metapost/context/base/mpiv/mp-page.mpiv | 142 -- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkii/grph-trf.mkii | 2 +- tex/context/base/mkii/mult-ro.mkii | 5 + tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/context.mkxl | 17 +- tex/context/base/mkiv/core-con.lua | 1 + tex/context/base/mkiv/driv-shp.lua | 68 +- tex/context/base/mkiv/grph-trf.mkiv | 6 +- tex/context/base/mkiv/lpdf-lmt.lua | 56 +- tex/context/base/mkiv/math-noa.lua | 52 +- tex/context/base/mkiv/meta-ini.mkiv | 41 +- tex/context/base/mkiv/meta-ini.mkxl | 1457 ++++++++++++++++++++ tex/context/base/mkiv/mlib-int.lua | 387 ++++-- tex/context/base/mkiv/mlib-pdf.mkiv | 34 - tex/context/base/mkiv/mlib-scn.lua | 36 +- tex/context/base/mkiv/mult-def.lua | 28 + tex/context/base/mkiv/mult-low.lua | 2 + tex/context/base/mkiv/mult-mps.lua | 2 +- tex/context/base/mkiv/pack-lyr.mkiv | 77 +- tex/context/base/mkiv/pack-obj.mkiv | 20 +- tex/context/base/mkiv/pack-ori.lua | 70 + tex/context/base/mkiv/pack-ori.mkxl | 88 ++ tex/context/base/mkiv/pack-rul.mkxl | 36 +- tex/context/base/mkiv/page-one.mkiv | 2 +- tex/context/base/mkiv/status-files.pdf | Bin 26567 -> 26631 bytes tex/context/base/mkiv/status-lua.pdf | Bin 268461 -> 268478 bytes tex/context/base/mkiv/strc-pag.lua | 5 + tex/context/base/mkiv/supp-box.lua | 30 +- tex/context/base/mkiv/supp-box.mkiv | 39 +- tex/context/base/mkiv/supp-box.mkxl | 452 ++++-- tex/context/base/mkiv/syst-con.mkiv | 105 +- tex/context/base/mkiv/syst-con.mkxl | 93 ++ tex/context/base/mkiv/syst-lua.mkiv | 45 +- tex/context/base/mkiv/syst-lua.mkxl | 61 + tex/context/base/mkiv/tabl-tsp.mkiv | 4 +- tex/context/filenames.pdf | Bin 0 -> 25145 bytes tex/context/filenames.tex | 119 ++ tex/context/interface/mkii/keys-ro.xml | 5 + tex/context/interface/mkiv/i-context.pdf | Bin 890332 -> 889985 bytes tex/context/interface/mkiv/i-readme.pdf | Bin 61165 -> 61165 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 74 files changed, 3392 insertions(+), 1016 deletions(-) create mode 100644 metapost/context/base/mpiv/mp-cont.mpiv create mode 100644 metapost/context/base/mpiv/mp-cont.mpxl create mode 100644 tex/context/base/mkiv/meta-ini.mkxl create mode 100644 tex/context/base/mkiv/pack-ori.lua create mode 100644 tex/context/base/mkiv/pack-ori.mkxl create mode 100644 tex/context/base/mkiv/syst-con.mkxl create mode 100644 tex/context/base/mkiv/syst-lua.mkxl create mode 100644 tex/context/filenames.pdf create mode 100644 tex/context/filenames.tex 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 bc0163c71..b56816a1b 100644 --- a/context/data/scite/context/lexers/data/scite-context-data-context.lua +++ b/context/data/scite/context/lexers/data/scite-context-data-context.lua @@ -1,4 +1,4 @@ return { ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextkind", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "quitcondition", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol" }, - ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "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", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs" }, + ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "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", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs" }, } \ No newline at end of file diff --git a/context/data/scite/context/lexers/data/scite-context-data-metapost.lua b/context/data/scite/context/lexers/data/scite-context-data-metapost.lua index d25b11098..6b30a4d89 100644 --- a/context/data/scite/context/lexers/data/scite-context-data-metapost.lua +++ b/context/data/scite/context/lexers/data/scite-context-data-metapost.lua @@ -3,7 +3,7 @@ return { ["disabled"]={ "verbatimtex", "troffmode" }, ["internals"]={ "mitered", "rounded", "beveled", "butt", "squared", "eps", "epsilon", "infinity", "bboxmargin", "ahlength", "ahangle", "labeloffset", "dotlabeldiam", "defaultpen", "defaultscale", "join_radius", "charscale", "ditto", "EOF", "pen_lft", "pen_rt", "pen_top", "pen_bot" }, ["metafont"]={ "autorounding", "beginchar", "blacker", "boundarychar", "capsule_def", "capsule_end", "change_width", "chardp", "chardx", "chardy", "charexists", "charext", "charht", "charic", "charlist", "charwd", "cull", "cullit", "currenttransform", "currentwindow", "define_blacker_pixels", "define_corrected_pixels", "define_good_x_pixels", "define_good_y_pixels", "define_horizontal_corrected_pixels", "define_pixels", "define_whole_blacker_pixels", "define_whole_pixels", "define_whole_vertical_blacker_pixels", "define_whole_vertical_pixels", "designsize", "display", "displaying", "endchar", "extensible", "extra_beginchar", "extra_endchar", "extra_setup", "fillin", "font_coding_scheme", "font_extra_space", "font_identifier", "font_normal_shrink", "font_normal_space", "font_normal_stretch", "font_quad", "font_size", "font_slant", "font_x_height", "fontdimen", "fontmaking", "gfcorners", "granularity", "grayfont", "headerbyte", "hppp", "hround", "imagerules", "italcorr", "kern", "labelfont", "ligtable", "lowres_fix", "makebox", "makegrid", "maketicks", "mode_def", "mode_setup", "nodisplays", "notransforms", "numspecial", "o_correction", "openit", "openwindow", "pixels_per_inch", "proofing", "proofoffset", "proofrule", "proofrulethickness", "rulepen", "screenchars", "screenrule", "screenstrokes", "screen_cols", "screen_rows", "showit", "slantfont", "smode", "smoothing", "titlefont", "totalweight", "tracingedges", "tracingpens", "turningcheck", "unitpixel", "vppp", "vround", "xoffset", "yoffset" }, - ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "penspec", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "void", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withcmykcolor", "withpen", "dashed", "envelope", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "closefrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "colormodel", "graypart", "greypart", "greycolor", "graycolor", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", "minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode", "runscript", "maketext" }, + ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "penspec", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "void", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withcmykcolor", "withpen", "dashed", "envelope", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "closefrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "colormodel", "graypart", "greypart", "greycolor", "graycolor", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", "minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode", "runscript", "maketext", "numbersystem" }, ["shortcuts"]={ "..", "...", "--", "---", "&", "\\" }, ["tex"]={ "btex", "etex", "verbatimtex" }, } \ 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 56803c6e1..f21a74ea6 100644 --- a/context/data/scite/context/scite-context-data-context.properties +++ b/context/data/scite/context/scite-context-data-context.properties @@ -120,124 +120,125 @@ globalscratchcounterthree groupedcommand groupedcommandcs triggergroupedcommand simplegroupedcommand pickupgroupedcommand normalbaselineskip normallineskip normallineskiplimit \ availablehsize localhsize setlocalhsize distributedhsize hsizefraction \ next nexttoken nextbox dowithnextbox dowithnextboxcs \ -dowithnextboxcontent dowithnextboxcontentcs flushnextbox boxisempty scratchwidth \ -scratchheight scratchdepth scratchoffset scratchdistance scratchhsize \ -scratchvsize scratchxoffset scratchyoffset scratchhoffset scratchvoffset \ -scratchxposition scratchyposition scratchtopoffset scratchbottomoffset scratchleftoffset \ -scratchrightoffset scratchcounterone scratchcountertwo scratchcounterthree scratchcounterfour \ -scratchcounterfive scratchcountersix scratchdimenone scratchdimentwo scratchdimenthree \ -scratchdimenfour scratchdimenfive scratchdimensix scratchskipone scratchskiptwo \ -scratchskipthree scratchskipfour scratchskipfive scratchskipsix scratchmuskipone \ -scratchmuskiptwo scratchmuskipthree scratchmuskipfour scratchmuskipfive scratchmuskipsix \ -scratchtoksone scratchtokstwo scratchtoksthree scratchtoksfour scratchtoksfive \ -scratchtokssix scratchboxone scratchboxtwo scratchboxthree scratchboxfour \ -scratchboxfive scratchboxsix scratchnx scratchny scratchmx \ -scratchmy scratchunicode scratchmin scratchmax scratchleftskip \ -scratchrightskip scratchtopskip scratchbottomskip doif doifnot \ -doifelse firstinset doifinset doifnotinset doifelseinset \ -doifinsetelse doifelsenextchar doifnextcharelse 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 tracingall tracingnone \ -loggingall removetoks appendtoks prependtoks appendtotoks \ -prependtotoks to endgraf endpar everyendpar \ -reseteverypar finishpar empty null space \ -quad enspace emspace charspace nbsp \ -crlf obeyspaces obeylines obeyedspace obeyedline \ -obeyedtab obeyedpage normalspace executeifdefined singleexpandafter \ -doubleexpandafter tripleexpandafter dontleavehmode removelastspace removeunwantedspaces \ -keepunwantedspaces removepunctuation ignoreparskip forcestrutdepth onlynonbreakablespace \ -wait writestatus define defineexpandable redefine \ -setmeasure setemeasure setgmeasure setxmeasure definemeasure \ -freezemeasure measure measured installcorenamespace getvalue \ -getuvalue setvalue setevalue setgvalue setxvalue \ -letvalue letgvalue resetvalue undefinevalue ignorevalue \ -setuvalue setuevalue setugvalue setuxvalue globallet \ -glet udef ugdef uedef uxdef \ -checked unique getparameters geteparameters getgparameters \ -getxparameters forgetparameters copyparameters getdummyparameters dummyparameter \ -directdummyparameter setdummyparameter letdummyparameter setexpandeddummyparameter usedummystyleandcolor \ -usedummystyleparameter usedummycolorparameter processcommalist processcommacommand quitcommalist \ -quitprevcommalist processaction processallactions processfirstactioninset processallactionsinset \ -unexpanded expanded startexpanded stopexpanded protected \ -protect unprotect firstofoneargument firstoftwoarguments secondoftwoarguments \ -firstofthreearguments secondofthreearguments thirdofthreearguments firstoffourarguments secondoffourarguments \ -thirdoffourarguments fourthoffourarguments firstoffivearguments secondoffivearguments thirdoffivearguments \ -fourthoffivearguments fifthoffivearguments firstofsixarguments secondofsixarguments thirdofsixarguments \ -fourthofsixarguments fifthofsixarguments sixthofsixarguments firstofoneunexpanded firstoftwounexpanded \ -secondoftwounexpanded firstofthreeunexpanded secondofthreeunexpanded thirdofthreeunexpanded gobbleoneargument \ -gobbletwoarguments gobblethreearguments gobblefourarguments gobblefivearguments gobblesixarguments \ -gobblesevenarguments gobbleeightarguments gobbleninearguments gobbletenarguments gobbleoneoptional \ -gobbletwooptionals gobblethreeoptionals gobblefouroptionals gobblefiveoptionals dorecurse \ -doloop exitloop dostepwiserecurse recurselevel recursedepth \ -dofastloopcs fastloopindex fastloopfinal dowith newconstant \ -setnewconstant setconstant setconstantvalue newconditional settrue \ -setfalse settruevalue setfalsevalue newmacro setnewmacro \ -newfraction newsignal dosingleempty dodoubleempty dotripleempty \ -doquadrupleempty doquintupleempty dosixtupleempty doseventupleempty dosingleargument \ -dodoubleargument dotripleargument doquadrupleargument doquintupleargument dosixtupleargument \ -doseventupleargument dosinglegroupempty dodoublegroupempty dotriplegroupempty doquadruplegroupempty \ -doquintuplegroupempty permitspacesbetweengroups dontpermitspacesbetweengroups nopdfcompression maximumpdfcompression \ -normalpdfcompression onlypdfobjectcompression nopdfobjectcompression modulonumber dividenumber \ -getfirstcharacter doifelsefirstchar doiffirstcharelse startnointerference stopnointerference \ -twodigits threedigits leftorright offinterlineskip oninterlineskip \ -nointerlineskip strut halfstrut quarterstrut depthstrut \ -halflinestrut noheightstrut setstrut strutbox strutht \ -strutdp strutwd struthtdp strutgap begstrut \ -endstrut lineheight leftboundary rightboundary signalcharacter \ -ordordspacing ordopspacing ordbinspacing ordrelspacing ordopenspacing \ -ordclosespacing ordpunctspacing ordinnerspacing opordspacing opopspacing \ -opbinspacing oprelspacing opopenspacing opclosespacing oppunctspacing \ -opinnerspacing binordspacing binopspacing binbinspacing binrelspacing \ -binopenspacing binclosespacing binpunctspacing bininnerspacing relordspacing \ -relopspacing relbinspacing relrelspacing relopenspacing relclosespacing \ -relpunctspacing relinnerspacing openordspacing openopspacing openbinspacing \ -openrelspacing openopenspacing openclosespacing openpunctspacing openinnerspacing \ -closeordspacing closeopspacing closebinspacing closerelspacing closeopenspacing \ -closeclosespacing closepunctspacing closeinnerspacing punctordspacing punctopspacing \ -punctbinspacing punctrelspacing punctopenspacing punctclosespacing punctpunctspacing \ -punctinnerspacing innerordspacing inneropspacing innerbinspacing innerrelspacing \ -inneropenspacing innerclosespacing innerpunctspacing innerinnerspacing normalreqno \ -startimath stopimath normalstartimath normalstopimath startdmath \ -stopdmath normalstartdmath normalstopdmath normalsuperscript normalsubscript \ -normalnosuperscript normalnosubscript superscript subscript nosuperscript \ -nosubscript uncramped cramped triggermathstyle mathstylefont \ -mathsmallstylefont mathstyleface mathsmallstyleface mathstylecommand mathpalette \ -mathstylehbox mathstylevbox mathstylevcenter mathstylevcenteredhbox mathstylevcenteredvbox \ -mathtext setmathsmalltextbox setmathtextbox pushmathstyle popmathstyle \ -triggerdisplaystyle triggertextstyle triggerscriptstyle triggerscriptscriptstyle triggeruncrampedstyle \ -triggercrampedstyle triggersmallstyle triggeruncrampedsmallstyle triggercrampedsmallstyle triggerbigstyle \ -triggeruncrampedbigstyle triggercrampedbigstyle luaexpr expelsedoif expdoif \ -expdoifnot expdoifelsecommon expdoifcommonelse expdoifelseinset expdoifinsetelse \ -ctxdirectlua ctxlatelua ctxsprint ctxwrite ctxcommand \ -ctxdirectcommand ctxlatecommand ctxreport ctxlua luacode \ -lateluacode directluacode registerctxluafile ctxloadluafile luaversion \ -luamajorversion luaminorversion ctxluacode luaconditional luaexpanded \ -startluaparameterset stopluaparameterset luaparameterset definenamedlua obeylualines \ -obeyluatokens startluacode stopluacode startlua stoplua \ -startctxfunction stopctxfunction ctxfunction startctxfunctiondefinition stopctxfunctiondefinition \ -installctxfunction installprotectedctxfunction installprotectedctxscanner installctxscanner resetctxscanner \ -cldprocessfile cldloadfile cldloadviafile cldcontext cldcommand \ -carryoverpar lastlinewidth assumelongusagecs Umathbotaccent righttolefthbox \ -lefttorighthbox righttoleftvbox lefttorightvbox righttoleftvtop lefttorightvtop \ -rtlhbox ltrhbox rtlvbox ltrvbox rtlvtop \ -ltrvtop autodirhbox autodirvbox autodirvtop leftorrighthbox \ -leftorrightvbox leftorrightvtop lefttoright righttoleft checkedlefttoright \ -checkedrighttoleft synchronizelayoutdirection synchronizedisplaydirection synchronizeinlinedirection dirlre \ -dirrle dirlro dirrlo lesshyphens morehyphens \ -nohyphens dohyphens Ucheckedstartdisplaymath Ucheckedstopdisplaymath break \ -nobreak allowbreak goodbreak nospace nospacing \ -dospacing naturalhbox naturalvbox naturalvtop naturalhpack \ -naturalvpack naturaltpack reversehbox reversevbox reversevtop \ -reversehpack reversevpack reversetpack frule compoundhyphenpenalty \ -start stop unsupportedcs +dowithnextboxcontent dowithnextboxcontentcs flushnextbox boxisempty givenwidth \ +givenheight givendepth scangivendimensions scratchwidth scratchheight \ +scratchdepth scratchoffset scratchdistance scratchhsize scratchvsize \ +scratchxoffset scratchyoffset scratchhoffset scratchvoffset scratchxposition \ +scratchyposition scratchtopoffset scratchbottomoffset scratchleftoffset scratchrightoffset \ +scratchcounterone scratchcountertwo scratchcounterthree scratchcounterfour scratchcounterfive \ +scratchcountersix scratchdimenone scratchdimentwo scratchdimenthree scratchdimenfour \ +scratchdimenfive scratchdimensix scratchskipone scratchskiptwo scratchskipthree \ +scratchskipfour scratchskipfive scratchskipsix scratchmuskipone scratchmuskiptwo \ +scratchmuskipthree scratchmuskipfour scratchmuskipfive scratchmuskipsix scratchtoksone \ +scratchtokstwo scratchtoksthree scratchtoksfour scratchtoksfive scratchtokssix \ +scratchboxone scratchboxtwo scratchboxthree scratchboxfour scratchboxfive \ +scratchboxsix scratchnx scratchny scratchmx scratchmy \ +scratchunicode scratchmin scratchmax scratchleftskip scratchrightskip \ +scratchtopskip scratchbottomskip doif doifnot doifelse \ +firstinset doifinset doifnotinset doifelseinset doifinsetelse \ +doifelsenextchar doifnextcharelse 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 tracingall tracingnone loggingall \ +removetoks appendtoks prependtoks appendtotoks prependtotoks \ +to endgraf endpar everyendpar reseteverypar \ +finishpar empty null space quad \ +enspace emspace charspace nbsp crlf \ +obeyspaces obeylines obeyedspace obeyedline obeyedtab \ +obeyedpage normalspace executeifdefined singleexpandafter doubleexpandafter \ +tripleexpandafter dontleavehmode removelastspace removeunwantedspaces keepunwantedspaces \ +removepunctuation ignoreparskip forcestrutdepth onlynonbreakablespace wait \ +writestatus define defineexpandable redefine setmeasure \ +setemeasure setgmeasure setxmeasure definemeasure freezemeasure \ +measure measured installcorenamespace getvalue getuvalue \ +setvalue setevalue setgvalue setxvalue letvalue \ +letgvalue resetvalue undefinevalue ignorevalue setuvalue \ +setuevalue setugvalue setuxvalue globallet glet \ +udef ugdef uedef uxdef checked \ +unique getparameters geteparameters getgparameters getxparameters \ +forgetparameters copyparameters getdummyparameters dummyparameter directdummyparameter \ +setdummyparameter letdummyparameter setexpandeddummyparameter usedummystyleandcolor usedummystyleparameter \ +usedummycolorparameter processcommalist processcommacommand quitcommalist quitprevcommalist \ +processaction processallactions processfirstactioninset processallactionsinset unexpanded \ +expanded startexpanded stopexpanded protected protect \ +unprotect firstofoneargument firstoftwoarguments secondoftwoarguments firstofthreearguments \ +secondofthreearguments thirdofthreearguments firstoffourarguments secondoffourarguments thirdoffourarguments \ +fourthoffourarguments firstoffivearguments secondoffivearguments thirdoffivearguments fourthoffivearguments \ +fifthoffivearguments firstofsixarguments secondofsixarguments thirdofsixarguments fourthofsixarguments \ +fifthofsixarguments sixthofsixarguments firstofoneunexpanded firstoftwounexpanded secondoftwounexpanded \ +firstofthreeunexpanded secondofthreeunexpanded thirdofthreeunexpanded gobbleoneargument gobbletwoarguments \ +gobblethreearguments gobblefourarguments gobblefivearguments gobblesixarguments gobblesevenarguments \ +gobbleeightarguments gobbleninearguments gobbletenarguments gobbleoneoptional gobbletwooptionals \ +gobblethreeoptionals gobblefouroptionals gobblefiveoptionals dorecurse doloop \ +exitloop dostepwiserecurse recurselevel recursedepth dofastloopcs \ +fastloopindex fastloopfinal dowith newconstant setnewconstant \ +setconstant setconstantvalue newconditional settrue setfalse \ +settruevalue setfalsevalue newmacro setnewmacro newfraction \ +newsignal dosingleempty dodoubleempty dotripleempty doquadrupleempty \ +doquintupleempty dosixtupleempty doseventupleempty dosingleargument dodoubleargument \ +dotripleargument doquadrupleargument doquintupleargument dosixtupleargument doseventupleargument \ +dosinglegroupempty dodoublegroupempty dotriplegroupempty doquadruplegroupempty doquintuplegroupempty \ +permitspacesbetweengroups dontpermitspacesbetweengroups nopdfcompression maximumpdfcompression normalpdfcompression \ +onlypdfobjectcompression nopdfobjectcompression modulonumber dividenumber getfirstcharacter \ +doifelsefirstchar doiffirstcharelse startnointerference stopnointerference twodigits \ +threedigits leftorright offinterlineskip oninterlineskip nointerlineskip \ +strut halfstrut quarterstrut depthstrut halflinestrut \ +noheightstrut setstrut strutbox strutht strutdp \ +strutwd struthtdp strutgap begstrut endstrut \ +lineheight leftboundary rightboundary signalcharacter ordordspacing \ +ordopspacing ordbinspacing ordrelspacing ordopenspacing ordclosespacing \ +ordpunctspacing ordinnerspacing opordspacing opopspacing opbinspacing \ +oprelspacing opopenspacing opclosespacing oppunctspacing opinnerspacing \ +binordspacing binopspacing binbinspacing binrelspacing binopenspacing \ +binclosespacing binpunctspacing bininnerspacing relordspacing relopspacing \ +relbinspacing relrelspacing relopenspacing relclosespacing relpunctspacing \ +relinnerspacing openordspacing openopspacing openbinspacing openrelspacing \ +openopenspacing openclosespacing openpunctspacing openinnerspacing closeordspacing \ +closeopspacing closebinspacing closerelspacing closeopenspacing closeclosespacing \ +closepunctspacing closeinnerspacing punctordspacing punctopspacing punctbinspacing \ +punctrelspacing punctopenspacing punctclosespacing punctpunctspacing punctinnerspacing \ +innerordspacing inneropspacing innerbinspacing innerrelspacing inneropenspacing \ +innerclosespacing innerpunctspacing innerinnerspacing normalreqno startimath \ +stopimath normalstartimath normalstopimath startdmath stopdmath \ +normalstartdmath normalstopdmath normalsuperscript normalsubscript normalnosuperscript \ +normalnosubscript superscript subscript nosuperscript nosubscript \ +uncramped cramped triggermathstyle mathstylefont mathsmallstylefont \ +mathstyleface mathsmallstyleface mathstylecommand mathpalette mathstylehbox \ +mathstylevbox mathstylevcenter mathstylevcenteredhbox mathstylevcenteredvbox mathtext \ +setmathsmalltextbox setmathtextbox pushmathstyle popmathstyle triggerdisplaystyle \ +triggertextstyle triggerscriptstyle triggerscriptscriptstyle triggeruncrampedstyle triggercrampedstyle \ +triggersmallstyle triggeruncrampedsmallstyle triggercrampedsmallstyle triggerbigstyle triggeruncrampedbigstyle \ +triggercrampedbigstyle luaexpr expelsedoif expdoif expdoifnot \ +expdoifelsecommon expdoifcommonelse expdoifelseinset expdoifinsetelse ctxdirectlua \ +ctxlatelua ctxsprint ctxwrite ctxcommand ctxdirectcommand \ +ctxlatecommand ctxreport ctxlua luacode lateluacode \ +directluacode registerctxluafile ctxloadluafile luaversion luamajorversion \ +luaminorversion ctxluacode luaconditional luaexpanded startluaparameterset \ +stopluaparameterset luaparameterset definenamedlua obeylualines obeyluatokens \ +startluacode stopluacode startlua stoplua startctxfunction \ +stopctxfunction ctxfunction startctxfunctiondefinition stopctxfunctiondefinition installctxfunction \ +installprotectedctxfunction installprotectedctxscanner installctxscanner resetctxscanner cldprocessfile \ +cldloadfile cldloadviafile cldcontext cldcommand carryoverpar \ +lastlinewidth assumelongusagecs Umathbotaccent righttolefthbox lefttorighthbox \ +righttoleftvbox lefttorightvbox righttoleftvtop lefttorightvtop rtlhbox \ +ltrhbox rtlvbox ltrvbox rtlvtop ltrvtop \ +autodirhbox autodirvbox autodirvtop leftorrighthbox leftorrightvbox \ +leftorrightvtop lefttoright righttoleft checkedlefttoright checkedrighttoleft \ +synchronizelayoutdirection synchronizedisplaydirection synchronizeinlinedirection dirlre dirrle \ +dirlro dirrlo lesshyphens morehyphens nohyphens \ +dohyphens Ucheckedstartdisplaymath Ucheckedstopdisplaymath break nobreak \ +allowbreak goodbreak nospace nospacing dospacing \ +naturalhbox naturalvbox naturalvtop naturalhpack naturalvpack \ +naturaltpack reversehbox reversevbox reversevtop reversehpack \ +reversevpack reversetpack frule compoundhyphenpenalty start \ +stop unsupportedcs diff --git a/context/data/scite/context/scite-context-data-metapost.properties b/context/data/scite/context/scite-context-data-metapost.properties index 31e14f2dd..32863ed08 100644 --- a/context/data/scite/context/scite-context-data-metapost.properties +++ b/context/data/scite/context/scite-context-data-metapost.properties @@ -116,7 +116,8 @@ greycolor graycolor dashpart penpart stroked \ filled textual clipped bounded pathpart \ expandafter minute hour outputformat outputtemplate \ filenametemplate fontmapfile fontmapline fontpart fontsize \ -glyph restoreclipcolor troffmode runscript maketext +glyph restoreclipcolor troffmode runscript maketext \ +numbersystem keywordclass.metapost.shortcuts=\ .. ... -- --- \ 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 bc0163c71..b56816a1b 100644 --- a/context/data/textadept/context/data/scite-context-data-context.lua +++ b/context/data/textadept/context/data/scite-context-data-context.lua @@ -1,4 +1,4 @@ return { ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextkind", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "quitcondition", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol" }, - ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "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", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs" }, + ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "mathortext", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "pickupgroupedcommand", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "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", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "glet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protected", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "superscript", "subscript", "nosuperscript", "nosubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "lastlinewidth", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs" }, } \ No newline at end of file diff --git a/context/data/textadept/context/data/scite-context-data-metapost.lua b/context/data/textadept/context/data/scite-context-data-metapost.lua index d25b11098..6b30a4d89 100644 --- a/context/data/textadept/context/data/scite-context-data-metapost.lua +++ b/context/data/textadept/context/data/scite-context-data-metapost.lua @@ -3,7 +3,7 @@ return { ["disabled"]={ "verbatimtex", "troffmode" }, ["internals"]={ "mitered", "rounded", "beveled", "butt", "squared", "eps", "epsilon", "infinity", "bboxmargin", "ahlength", "ahangle", "labeloffset", "dotlabeldiam", "defaultpen", "defaultscale", "join_radius", "charscale", "ditto", "EOF", "pen_lft", "pen_rt", "pen_top", "pen_bot" }, ["metafont"]={ "autorounding", "beginchar", "blacker", "boundarychar", "capsule_def", "capsule_end", "change_width", "chardp", "chardx", "chardy", "charexists", "charext", "charht", "charic", "charlist", "charwd", "cull", "cullit", "currenttransform", "currentwindow", "define_blacker_pixels", "define_corrected_pixels", "define_good_x_pixels", "define_good_y_pixels", "define_horizontal_corrected_pixels", "define_pixels", "define_whole_blacker_pixels", "define_whole_pixels", "define_whole_vertical_blacker_pixels", "define_whole_vertical_pixels", "designsize", "display", "displaying", "endchar", "extensible", "extra_beginchar", "extra_endchar", "extra_setup", "fillin", "font_coding_scheme", "font_extra_space", "font_identifier", "font_normal_shrink", "font_normal_space", "font_normal_stretch", "font_quad", "font_size", "font_slant", "font_x_height", "fontdimen", "fontmaking", "gfcorners", "granularity", "grayfont", "headerbyte", "hppp", "hround", "imagerules", "italcorr", "kern", "labelfont", "ligtable", "lowres_fix", "makebox", "makegrid", "maketicks", "mode_def", "mode_setup", "nodisplays", "notransforms", "numspecial", "o_correction", "openit", "openwindow", "pixels_per_inch", "proofing", "proofoffset", "proofrule", "proofrulethickness", "rulepen", "screenchars", "screenrule", "screenstrokes", "screen_cols", "screen_rows", "showit", "slantfont", "smode", "smoothing", "titlefont", "totalweight", "tracingedges", "tracingpens", "turningcheck", "unitpixel", "vppp", "vround", "xoffset", "yoffset" }, - ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "penspec", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "void", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withcmykcolor", "withpen", "dashed", "envelope", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "closefrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "colormodel", "graypart", "greypart", "greycolor", "graycolor", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", "minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode", "runscript", "maketext" }, + ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "penspec", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "void", "length", "llcorner", "lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not", "numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point", "postcontrol", "precontrol", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withcmykcolor", "withpen", "dashed", "envelope", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "chardy", "hppp", "tracingedges", "vppp", "extra_beginfig", "extra_endfig", "mpxbreak", "endinput", "message", "delimiters", "turningnumber", "errmessage", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "closefrom", "withprescript", "withpostscript", "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt", "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "colormodel", "graypart", "greypart", "greycolor", "graycolor", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter", "minute", "hour", "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode", "runscript", "maketext", "numbersystem" }, ["shortcuts"]={ "..", "...", "--", "---", "&", "\\" }, ["tex"]={ "btex", "etex", "verbatimtex" }, } \ No newline at end of file diff --git a/context/data/vscode/extensions/context/syntaxes/context-syntax-mps.json b/context/data/vscode/extensions/context/syntaxes/context-syntax-mps.json index 476caf7d3..716bbbf42 100644 --- a/context/data/vscode/extensions/context/syntaxes/context-syntax-mps.json +++ b/context/data/vscode/extensions/context/syntaxes/context-syntax-mps.json @@ -119,7 +119,7 @@ "name" : "context.plain.plain.mps" }, "primitive" : { - "match" : "(zscaled|yypart|yxpart|yscaled|ypart|yoffset|yellowpart|year|xypart|xxpart|xscaled|xpart|xoffset|write|withprescript|withpostscript|withpen|within|withcolor|withcmykcolor|warningcheck|vppp|void|vardef|urt|urcorner|until|unknown|uniformdeviate|ulft|ulcorner|turningnumber|turningcheck|truecorners|true|troffmode|transformed|transform|tracingtitles|tracingstats|tracingspecs|tracingrestores|tracingpens|tracingoutput|tracingonline|tracingmacros|tracinglostchars|tracingequations|tracingedges|tracingcommands|tracingchoices|tracingcapsules|totalweight|top|to|time|textual|text|tertiarydef|tertiary|tension|suffix|substring|subpath|stroked|string|str|step|sqrt|special|smoothing|slanted|sind|showvariable|showtoken|showstopping|showdependencies|show|shipout|shifted|setbounds|secondarydef|secondary|screen_rows|screen_cols|scantokens|scaled|save|runscript|rt|rotated|rgbcolor|reverse|restoreclipcolor|redpart|readfrom|randomseed|proofing|prologues|primarydef|primary|prescriptpart|precontrol|postscriptpart|postcontrol|point|pixels_per_inch|picture|penspec|penpart|penoffset|pencircle|pen|pausing|pathpart|path|pair|outputtemplate|outputformat|outer|or|openwindow|openit|on|off|of|odd|oct|numspecial|numeric|nullpicture|notransforms|not|normaldeviate|nodisplays|newinternal|mpxbreak|mpprocset|month|mlog|miterlimit|minute|mexp|message|maketext|makepen|makepath|magentapart|lrt|lrcorner|lowres_fix|llft|llcorner|linejoin|linecap|ligtable|lft|let|length|known|kern|intersectiontimes|interpath|interim|input|inner|infont|imagerules|if|hround|hppp|hour|hex|headerbyte|greypart|greycolor|greenpart|graypart|grayfont|graycolor|granularity|glyph|gfcorners|forsuffixes|forever|for|fontsize|fontsize|fontpart|fontmapline|fontmapfile|fontmaking|fontdimen|floor|fillin|filled|filenametemplate|fi|false|extra_endfig|extra_beginfig|extensible|expr|expandafter|exitif|errmessage|envelope|endinput|endgroup|endfor|enddef|end|elseif|else|doublepath|displaying|display|directiontime|designsize|delimiters|def|decimal|day|dashpart|dashed|cycle|cyanpart|currentwindow|currenttransform|curl|cullit|cull|cosd|controls|contour|colormodel|color|cmykcolor|closefrom|clipped|clip|charwd|charlist|charic|charht|charext|charexists|chardy|chardx|chardp|charcode|char|bounded|boundarychar|bot|bot|boolean|bluepart|blackpart|begingroup|autorounding|arctime|arclength|angle|and|and|also|addto|ASCII)(?=[^a-zA-Z\u005C_@!?-ÿ])", + "match" : "(zscaled|yypart|yxpart|yscaled|ypart|yoffset|yellowpart|year|xypart|xxpart|xscaled|xpart|xoffset|write|withprescript|withpostscript|withpen|within|withcolor|withcmykcolor|warningcheck|vppp|void|vardef|urt|urcorner|until|unknown|uniformdeviate|ulft|ulcorner|turningnumber|turningcheck|truecorners|true|troffmode|transformed|transform|tracingtitles|tracingstats|tracingspecs|tracingrestores|tracingpens|tracingoutput|tracingonline|tracingmacros|tracinglostchars|tracingequations|tracingedges|tracingcommands|tracingchoices|tracingcapsules|totalweight|top|to|time|textual|text|tertiarydef|tertiary|tension|suffix|substring|subpath|stroked|string|str|step|sqrt|special|smoothing|slanted|sind|showvariable|showtoken|showstopping|showdependencies|show|shipout|shifted|setbounds|secondarydef|secondary|screen_rows|screen_cols|scantokens|scaled|save|runscript|rt|rotated|rgbcolor|reverse|restoreclipcolor|redpart|readfrom|randomseed|proofing|prologues|primarydef|primary|prescriptpart|precontrol|postscriptpart|postcontrol|point|pixels_per_inch|picture|penspec|penpart|penoffset|pencircle|pen|pausing|pathpart|path|pair|outputtemplate|outputformat|outer|or|openwindow|openit|on|off|of|odd|oct|numspecial|numeric|numbersystem|nullpicture|notransforms|not|normaldeviate|nodisplays|newinternal|mpxbreak|mpprocset|month|mlog|miterlimit|minute|mexp|message|maketext|makepen|makepath|magentapart|lrt|lrcorner|lowres_fix|llft|llcorner|linejoin|linecap|ligtable|lft|let|length|known|kern|intersectiontimes|interpath|interim|input|inner|infont|imagerules|if|hround|hppp|hour|hex|headerbyte|greypart|greycolor|greenpart|graypart|grayfont|graycolor|granularity|glyph|gfcorners|forsuffixes|forever|for|fontsize|fontsize|fontpart|fontmapline|fontmapfile|fontmaking|fontdimen|floor|fillin|filled|filenametemplate|fi|false|extra_endfig|extra_beginfig|extensible|expr|expandafter|exitif|errmessage|envelope|endinput|endgroup|endfor|enddef|end|elseif|else|doublepath|displaying|display|directiontime|designsize|delimiters|def|decimal|day|dashpart|dashed|cycle|cyanpart|currentwindow|currenttransform|curl|cullit|cull|cosd|controls|contour|colormodel|color|cmykcolor|closefrom|clipped|clip|charwd|charlist|charic|charht|charext|charexists|chardy|chardx|chardp|charcode|char|bounded|boundarychar|bot|bot|boolean|bluepart|blackpart|begingroup|autorounding|arctime|arclength|angle|and|and|also|addto|ASCII)(?=[^a-zA-Z\u005C_@!?-ÿ])", "name" : "context.primitive.primitive.mps" }, "quoted" : { 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 af4e8d1bc..0f77904c8 100644 --- a/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json +++ b/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json @@ -88,7 +88,7 @@ "name" : "context.grouping.symbols.groups.tex" }, "helper" : { - "match" : "\u005C\u005C(xmlsetup|writestatus|wait|vkern|vglue|vfillneg|vfilllneg|vfilll|validassignment|uxdef|usedummystyleparameter|usedummystyleandcolor|usedummycolorparameter|unvoidbox|unsupportedcs|unprotect|unique|unexpanded|undefinevalue|uncramped|ugdef|uedef|uedcatcodecommand|udef|twodigits|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|texsetup|texdefinition|synchronizelayoutdirection|synchronizeinlinedirection|synchronizedisplaydirection|superscript|subscript|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|seventhargumenttrue|seventhargumentfalse|setxvalue|setxmeasure|setvalue|setuxvalue|setuvalue|setups|setup|setugvalue|setuevalue|settruevalue|settrue|setsystemmode|setstrut|setnewmacro|setnewconstant|setmode|setmeasure|setmathtextbox|setmathsmalltextbox|setlocalhsize|setgvalue|setgmeasure|setfalsevalue|setfalse|setexpandeddummyparameter|setevalue|setemeasure|setdummyparameter|setconstantvalue|setconstant|setcatcodetable|secondoftwounexpanded|secondoftwoarguments|secondofthreeunexpanded|secondofthreearguments|secondofsixarguments|secondoffourarguments|secondoffivearguments|secondargumenttrue|secondargumentfalse|scratchyposition|scratchyoffset|scratchxposition|scratchxoffset|scratchwidth|scratchvsize|scratchvoffset|scratchunicode|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|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|quitprevcommalist|quitcommalist|quarterstrut|quad|pushsystemmode|pushmathstyle|pushcatcodetable|punctrelspacing|punctpunctspacing|punctordspacing|punctopspacing|punctopenspacing|punctinnerspacing|punctclosespacing|punctbinspacing|protected|protect|processfirstactioninset|processcommalist|processcommacommand|processallactionsinset|processallactions|processaction|privatescratchtoks|privatescratchskip|privatescratchmuskip|privatescratchdimen|privatescratchcounter|privatescratchbox|prependtotoks|prependtoks|popsystemmode|popmathstyle|popcatcodetable|pickupgroupedcommand|permitspacesbetweengroups|ordrelspacing|ordpunctspacing|ordordspacing|ordopspacing|ordopenspacing|ordinnerspacing|ordclosespacing|ordbinspacing|oprelspacing|oppunctspacing|opordspacing|opopspacing|opopenspacing|opinnerspacing|openrelspacing|openpunctspacing|openordspacing|openopspacing|openopenspacing|openinnerspacing|openclosespacing|openbinspacing|opclosespacing|opbinspacing|onlypdfobjectcompression|onlynonbreakablespace|oninterlineskip|offinterlineskip|obeyspaces|obeyluatokens|obeylualines|obeylines|obeyedtab|obeyedspace|obeyedpage|obeyedline|null|novalidassignment|nosuperscript|nosubscript|nospacing|nospace|normalvglue|normalvfillneg|normalvfilllneg|normalsuperscript|normalsubscript|normalstopimath|normalstopdmath|normalstartimath|normalstartdmath|normalspace|normalreqno|normalpdfcompression|normalnosuperscript|normalnosubscript|normallineskiplimit|normallineskip|normalhglue|normalhfillneg|normalhfilllneg|normalbaselineskip|nopdfobjectcompression|nopdfcompression|nointerlineskip|nohyphens|noheightstrut|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|naturalhpack|naturalhbox|morehyphens|modulonumber|measured|measure|maximumpdfcompression|mathtext|mathstylevcenteredvbox|mathstylevcenteredhbox|mathstylevcenter|mathstylevbox|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|letvalue|letgvalue|letdummyparameter|letcatcodecommand|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|ignoreparskip|htdp|hsizefraction|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|getxparameters|getvalue|getuvalue|getparameters|getgparameters|getfirstcharacter|geteparameters|getdummyparameters|frule|freezemeasure|fourthofsixarguments|fourthoffourarguments|fourthoffivearguments|fourthargumenttrue|fourthargumentfalse|foundtrue|foundfalse|forgetparameters|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|expelsedoif|expdoifnot|expdoifinsetelse|expdoifelseinset|expdoifelsecommon|expdoifcommonelse|expdoif|expanded|exitloop|executeifdefined|everyendpar|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|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|directluacode|directdummyparameter|depthstrut|definenamedlua|definemeasure|defineexpandable|define|defcatcodecommand|defaultcatcodetable|currentcatcodetable|ctxwrite|ctxsprint|ctxreport|ctxluacode|ctxlua|ctxloadluafile|ctxlatelua|ctxlatecommand|ctxfunction|ctxdirectlua|ctxdirectcommand|ctxcommand|crlf|cramped|copysetups|copyparameters|compoundhyphenpenalty|closerelspacing|closepunctspacing|closeordspacing|closeopspacing|closeopenspacing|closeinnerspacing|closeclosespacing|closebinspacing|cldprocessfile|cldloadviafile|cldloadfile|cldcontext|cldcommand|checkedstrippedcsname|checkedrighttoleft|checkedlefttoright|checked|charspace|catcodetablename|carryoverpar|break|boxisempty|booleanmodevalue|binrelspacing|binpunctspacing|binordspacing|binopspacing|binopenspacing|bininnerspacing|binclosespacing|binbinspacing|begstrut|begcsname|availablehsize|autorule|autodirvtop|autodirvbox|autodirhbox|assumelongusagecs|appendtotoks|appendtoks|allowbreak|Umathbotaccent|Ucheckedstopdisplaymath|Ucheckedstartdisplaymath)(?=[^a-zA-Z])", + "match" : "\u005C\u005C(xmlsetup|writestatus|wait|vkern|vglue|vfillneg|vfilllneg|vfilll|validassignment|uxdef|usedummystyleparameter|usedummystyleandcolor|usedummycolorparameter|unvoidbox|unsupportedcs|unprotect|unique|unexpanded|undefinevalue|uncramped|ugdef|uedef|uedcatcodecommand|udef|twodigits|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|texsetup|texdefinition|synchronizelayoutdirection|synchronizeinlinedirection|synchronizedisplaydirection|superscript|subscript|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|seventhargumenttrue|seventhargumentfalse|setxvalue|setxmeasure|setvalue|setuxvalue|setuvalue|setups|setup|setugvalue|setuevalue|settruevalue|settrue|setsystemmode|setstrut|setnewmacro|setnewconstant|setmode|setmeasure|setmathtextbox|setmathsmalltextbox|setlocalhsize|setgvalue|setgmeasure|setfalsevalue|setfalse|setexpandeddummyparameter|setevalue|setemeasure|setdummyparameter|setconstantvalue|setconstant|setcatcodetable|secondoftwounexpanded|secondoftwoarguments|secondofthreeunexpanded|secondofthreearguments|secondofsixarguments|secondoffourarguments|secondoffivearguments|secondargumenttrue|secondargumentfalse|scratchyposition|scratchyoffset|scratchxposition|scratchxoffset|scratchwidth|scratchvsize|scratchvoffset|scratchunicode|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|quitprevcommalist|quitcommalist|quarterstrut|quad|pushsystemmode|pushmathstyle|pushcatcodetable|punctrelspacing|punctpunctspacing|punctordspacing|punctopspacing|punctopenspacing|punctinnerspacing|punctclosespacing|punctbinspacing|protected|protect|processfirstactioninset|processcommalist|processcommacommand|processallactionsinset|processallactions|processaction|privatescratchtoks|privatescratchskip|privatescratchmuskip|privatescratchdimen|privatescratchcounter|privatescratchbox|prependtotoks|prependtoks|popsystemmode|popmathstyle|popcatcodetable|pickupgroupedcommand|permitspacesbetweengroups|ordrelspacing|ordpunctspacing|ordordspacing|ordopspacing|ordopenspacing|ordinnerspacing|ordclosespacing|ordbinspacing|oprelspacing|oppunctspacing|opordspacing|opopspacing|opopenspacing|opinnerspacing|openrelspacing|openpunctspacing|openordspacing|openopspacing|openopenspacing|openinnerspacing|openclosespacing|openbinspacing|opclosespacing|opbinspacing|onlypdfobjectcompression|onlynonbreakablespace|oninterlineskip|offinterlineskip|obeyspaces|obeyluatokens|obeylualines|obeylines|obeyedtab|obeyedspace|obeyedpage|obeyedline|null|novalidassignment|nosuperscript|nosubscript|nospacing|nospace|normalvglue|normalvfillneg|normalvfilllneg|normalsuperscript|normalsubscript|normalstopimath|normalstopdmath|normalstartimath|normalstartdmath|normalspace|normalreqno|normalpdfcompression|normalnosuperscript|normalnosubscript|normallineskiplimit|normallineskip|normalhglue|normalhfillneg|normalhfilllneg|normalbaselineskip|nopdfobjectcompression|nopdfcompression|nointerlineskip|nohyphens|noheightstrut|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|naturalhpack|naturalhbox|morehyphens|modulonumber|measured|measure|maximumpdfcompression|mathtext|mathstylevcenteredvbox|mathstylevcenteredhbox|mathstylevcenter|mathstylevbox|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|letvalue|letgvalue|letdummyparameter|letcatcodecommand|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|ignoreparskip|htdp|hsizefraction|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|frule|freezemeasure|fourthofsixarguments|fourthoffourarguments|fourthoffivearguments|fourthargumenttrue|fourthargumentfalse|foundtrue|foundfalse|forgetparameters|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|expelsedoif|expdoifnot|expdoifinsetelse|expdoifelseinset|expdoifelsecommon|expdoifcommonelse|expdoif|expanded|exitloop|executeifdefined|everyendpar|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|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|directluacode|directdummyparameter|depthstrut|definenamedlua|definemeasure|defineexpandable|define|defcatcodecommand|defaultcatcodetable|currentcatcodetable|ctxwrite|ctxsprint|ctxreport|ctxluacode|ctxlua|ctxloadluafile|ctxlatelua|ctxlatecommand|ctxfunction|ctxdirectlua|ctxdirectcommand|ctxcommand|crlf|cramped|copysetups|copyparameters|compoundhyphenpenalty|closerelspacing|closepunctspacing|closeordspacing|closeopspacing|closeopenspacing|closeinnerspacing|closeclosespacing|closebinspacing|cldprocessfile|cldloadviafile|cldloadfile|cldcontext|cldcommand|checkedstrippedcsname|checkedrighttoleft|checkedlefttoright|checked|charspace|catcodetablename|carryoverpar|break|boxisempty|booleanmodevalue|binrelspacing|binpunctspacing|binordspacing|binopspacing|binopenspacing|bininnerspacing|binclosespacing|binbinspacing|begstrut|begcsname|availablehsize|autorule|autodirvtop|autodirvbox|autodirhbox|assumelongusagecs|appendtotoks|appendtoks|allowbreak|Umathbotaccent|Ucheckedstopdisplaymath|Ucheckedstartdisplaymath)(?=[^a-zA-Z])", "name" : "context.plain.commands.plain.tex" }, "ifprimitive" : { diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf index 9e7b71d86..7f09234ba 100644 Binary files a/doc/context/documents/general/qrcs/setup-cs.pdf and b/doc/context/documents/general/qrcs/setup-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf index 68e8afb2b..955224427 100644 Binary files a/doc/context/documents/general/qrcs/setup-de.pdf and b/doc/context/documents/general/qrcs/setup-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf index e1c0e85ae..20ca3b4a7 100644 Binary files a/doc/context/documents/general/qrcs/setup-en.pdf and b/doc/context/documents/general/qrcs/setup-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf index dc72b7a18..ade5c72a3 100644 Binary files a/doc/context/documents/general/qrcs/setup-fr.pdf and b/doc/context/documents/general/qrcs/setup-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf index 310ccfa86..0380e4537 100644 Binary files a/doc/context/documents/general/qrcs/setup-it.pdf and b/doc/context/documents/general/qrcs/setup-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf index becacaffc..ec540bdd1 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf and b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf index 737f6fac8..3121559ae 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-de.pdf and b/doc/context/documents/general/qrcs/setup-mapping-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf index 32b5171bd..9e30de5cb 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-en.pdf and b/doc/context/documents/general/qrcs/setup-mapping-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf index 598017b33..712e8d424 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf and b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf index 7e9c9bab3..30c8a19bf 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-it.pdf and b/doc/context/documents/general/qrcs/setup-mapping-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf index 25710e0ff..4359c5bcd 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf and b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf index 3eb0f137f..f98d76276 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf and b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf index 0c45ec4ea..020a25a19 100644 Binary files a/doc/context/documents/general/qrcs/setup-nl.pdf and b/doc/context/documents/general/qrcs/setup-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf index c12df5d0b..c575dc189 100644 Binary files a/doc/context/documents/general/qrcs/setup-ro.pdf and b/doc/context/documents/general/qrcs/setup-ro.pdf differ diff --git a/metapost/context/base/mpiv/metafun.mpiv b/metapost/context/base/mpiv/metafun.mpiv index 346642cac..f00cc260c 100644 --- a/metapost/context/base/mpiv/metafun.mpiv +++ b/metapost/context/base/mpiv/metafun.mpiv @@ -24,6 +24,7 @@ input "mp-base.mpiv" ; input "mp-tool.mpiv" ; input "mp-mlib.mpiv" ; input "mp-luas.mpiv" ; +input "mp-cont.mpiv" ; input "mp-page.mpiv" ; input "mp-butt.mpiv" ; input "mp-shap.mpiv" ; diff --git a/metapost/context/base/mpiv/metafun.mpxl b/metapost/context/base/mpiv/metafun.mpxl index 93fb0ab82..edbb5bacd 100644 --- a/metapost/context/base/mpiv/metafun.mpxl +++ b/metapost/context/base/mpiv/metafun.mpxl @@ -22,6 +22,7 @@ input "mp-tool.mpiv" ; input "mp-mlib.mpiv" ; input "mp-luas.mpxl" ; input "mp-math.mpxl" ; +input "mp-cont.mpxl" ; input "mp-page.mpiv" ; input "mp-butt.mpiv" ; input "mp-shap.mpiv" ; diff --git a/metapost/context/base/mpiv/minifun.mpiv b/metapost/context/base/mpiv/minifun.mpiv index 1aa496da2..e78bd8e2e 100644 --- a/metapost/context/base/mpiv/minifun.mpiv +++ b/metapost/context/base/mpiv/minifun.mpiv @@ -23,6 +23,7 @@ input "mp-base.mpiv" ; input "mp-tool.mpiv" ; input "mp-mlib.mpiv" ; input "mp-luas.mpiv" ; +input "mp-cont.mpiv" ; input "mp-page.mpiv" ; string minifunversion ; minifunversion = "minifun iv " & mfun_timestamp; diff --git a/metapost/context/base/mpiv/minifun.mpxl b/metapost/context/base/mpiv/minifun.mpxl index ff71bdfcc..ec5cb364c 100644 --- a/metapost/context/base/mpiv/minifun.mpxl +++ b/metapost/context/base/mpiv/minifun.mpxl @@ -24,6 +24,7 @@ input "mp-tool.mpiv" ; input "mp-mlib.mpiv" ; input "mp-luas.mpxl" ; input "mp-math.mpxl" ; +input "mp-cont.mpiv" ; input "mp-page.mpiv" ; string minifunversion ; minifunversion = "minifun xl " & mfun_timestamp; diff --git a/metapost/context/base/mpiv/mp-cont.mpiv b/metapost/context/base/mpiv/mp-cont.mpiv new file mode 100644 index 000000000..083286bee --- /dev/null +++ b/metapost/context/base/mpiv/mp-cont.mpiv @@ -0,0 +1,158 @@ +%D \module +%D [ file=mp-cont.mpiv, +%D version=1999.03.10, +%D title=\CONTEXT\ \METAPOST\ graphics, +%D subtitle=Interfaces, +%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 This module is rather preliminary and subjected to changes. + +if known context_cont : endinput ; fi ; + +boolean context_cont ; context_cont := true ; + +string CurrentLayout ; CurrentLayout := "default" ; + +boolean mfun_swapped ; + +def SwapPageState = + mfun_swapped := true ; % eventually this will go ! +enddef ; + +extra_beginfig := extra_beginfig & "mfun_swapped := false ;" ; + +% runscript("mp.PaperHeight()") is much faster than lua.mp.PaperHeight() so we use that now: + +vardef PaperHeight = runscript("mp.PaperHeight()") enddef ; +vardef PaperWidth = runscript("mp.PaperWidth()") enddef ; +vardef PrintPaperHeight = runscript("mp.PrintPaperHeight()") enddef ; +vardef PrintPaperWidth = runscript("mp.PrintPaperWidth()") enddef ; +vardef TopSpace = runscript("mp.TopSpace()") enddef ; +vardef BottomSpace = runscript("mp.BottomSpace()") enddef ; +vardef BackSpace = runscript("mp.BackSpace()") enddef ; +vardef CutSpace = runscript("mp.CutSpace()") enddef ; +vardef MakeupHeight = runscript("mp.MakeupHeight()") enddef ; +vardef MakeupWidth = runscript("mp.MakeupWidth()") enddef ; +vardef TopHeight = runscript("mp.TopHeight()") enddef ; +vardef TopDistance = runscript("mp.TopDistance()") enddef ; +vardef HeaderHeight = runscript("mp.HeaderHeight()") enddef ; +vardef HeaderDistance = runscript("mp.HeaderDistance()") enddef ; +vardef TextHeight = runscript("mp.TextHeight()") enddef ; +vardef FooterDistance = runscript("mp.FooterDistance()") enddef ; +vardef FooterHeight = runscript("mp.FooterHeight()") enddef ; +vardef BottomDistance = runscript("mp.BottomDistance()") enddef ; +vardef BottomHeight = runscript("mp.BottomHeight()") enddef ; +vardef LeftEdgeWidth = runscript("mp.LeftEdgeWidth()") enddef ; +vardef LeftEdgeDistance = runscript("mp.LeftEdgeDistance()") enddef ; +vardef LeftMarginWidth = runscript("mp.LeftMarginWidth()") enddef ; +vardef LeftMarginDistance = runscript("mp.LeftMarginDistance()") enddef ; +vardef TextWidth = runscript("mp.TextWidth()") enddef ; +vardef RightMarginDistance = runscript("mp.RightMarginDistance()") enddef ; +vardef RightMarginWidth = runscript("mp.RightMarginWidth()") enddef ; +vardef RightEdgeDistance = runscript("mp.RightEdgeDistance()") enddef ; +vardef RightEdgeWidth = runscript("mp.RightEdgeWidth()") enddef ; +vardef InnerMarginDistance = runscript("mp.InnerMarginDistance()") enddef ; +vardef InnerMarginWidth = runscript("mp.InnerMarginWidth()") enddef ; +vardef OuterMarginDistance = runscript("mp.OuterMarginDistance()") enddef ; +vardef OuterMarginWidth = runscript("mp.OuterMarginWidth()") enddef ; +vardef InnerEdgeDistance = runscript("mp.InnerEdgeDistance()") enddef ; +vardef InnerEdgeWidth = runscript("mp.InnerEdgeWidth()") enddef ; +vardef OuterEdgeDistance = runscript("mp.OuterEdgeDistance()") enddef ; +vardef OuterEdgeWidth = runscript("mp.OuterEdgeWidth()") enddef ; +vardef PageOffset = runscript("mp.PageOffset()") enddef ; +vardef PageDepth = runscript("mp.PageDepth()") enddef ; +vardef LayoutColumns = runscript("mp.LayoutColumns()") enddef ; +vardef LayoutColumnDistance = runscript("mp.LayoutColumnDistance()") enddef ; +vardef LayoutColumnWidth = runscript("mp.LayoutColumnWidth()") enddef ; + +vardef OnRightPage = runscript("mp.OnRightPage()") enddef ; +vardef OnOddPage = runscript("mp.OnOddPage()") enddef ; +vardef InPageBody = runscript("mp.InPageBody()") enddef ; + +vardef RealPageNumber = runscript("mp.RealPageNumber()") enddef ; +vardef LastPageNumber = runscript("mp.LastPageNumber()") enddef ; % duplicates + +vardef PageNumber = runscript("mp.PageNumber()") enddef ; +vardef NOfPages = runscript("mp.NOfPages()") enddef ; + +vardef SubPageNumber = runscript("mp.SubPageNumber()") enddef ; +vardef NOfSubPages = runscript("mp.NOfSubPages()") enddef ; + +vardef CurrentColumn = runscript("mp.CurrentColumn()") enddef ; +vardef NOfColumns = runscript("mp.NOfColumns()") enddef ; + +vardef BaseLineSkip = runscript("mp.BaseLineSkip()") enddef ; +vardef LineHeight = runscript("mp.LineHeight()") enddef ; +vardef BodyFontSize = runscript("mp.BodyFontSize()") enddef ; + +vardef TopSkip = runscript("mp.TopSkip()") enddef ; +vardef StrutHeight = runscript("mp.StrutHeight()") enddef ; +vardef StrutDepth = runscript("mp.StrutDepth()") enddef ; + +vardef CurrentWidth = runscript("mp.CurrentWidth()") enddef ; +vardef CurrentHeight = runscript("mp.CurrentHeight()") enddef ; + +vardef HSize = runscript("mp.HSize()") enddef ; % duplicates +vardef VSize = runscript("mp.VSize()") enddef ; % duplicates + +vardef EmWidth = runscript("mp.EmWidth()") enddef ; +vardef ExHeight = runscript("mp.ExHeight()") enddef ; + +vardef PageFraction = runscript("mp.PageFraction()") enddef ; + +vardef SpineWidth = runscript("mp.SpineWidth()") enddef ; +vardef PaperBleed = runscript("mp.PaperBleed()") enddef ; + +% CurrentLayout = runscript("mp.CurrentLayout()") enddef ; +vardef OverlayWidth = runscript("mp.OverlayWidth()") enddef ; +vardef OverlayHeight = runscript("mp.OverlayHeight()") enddef ; +vardef OverlayDepth = runscript("mp.OverlayDepth()") enddef ; +vardef OverlayLineWidth = runscript("mp.OverlayLineWidth()") enddef ; +vardef OverlayOffset = runscript("mp.OverlayOffset()") enddef ; +vardef OverlayRegion = runscript("mp.OverlayRegion()") enddef ; +% OverlayLineColor = runscript("mp.OverlayLineColor()") enddef ; +% OverlayColor = runscript("mp.OverlayColor()") enddef ; + +vardef defaultcolormodel = runscript("mp.defaultcolormodel()") enddef ; + +vardef LeftMarginWidth = if mfun_swapped and not OnRightPage : runscript("mp.RightMarginWidth()") else : runscript("mp.LeftMarginWidth()") fi enddef ; +vardef RightMarginWidth = if mfun_swapped and not OnRightPage : runscript("mp.LeftMarginWidth()") else : runscript("mp.RightMarginWidth()") fi enddef ; +vardef LeftMarginDistance = if mfun_swapped and not OnRightPage : runscript("mp.RightMarginDistance()") else : runscript("mp.LeftMarginDistance()") fi enddef ; +vardef RightMarginDistance = if mfun_swapped and not OnRightPage : runscript("mp.LeftMarginDistance()") else : runscript("mp.RightMarginDistance()") fi enddef ; + +vardef LeftEdgeWidth = if mfun_swapped and not OnRightPage : runscript("mp.RightEdgeWidth()") else : runscript("mp.LeftEdgeWidth()") fi enddef ; +vardef RightEdgeWidth = if mfun_swapped and not OnRightPage : runscript("mp.LeftEdgeWidth()") else : runscript("mp.RightEdgeWidth()") fi enddef ; +vardef LeftEdgeDistance = if mfun_swapped and not OnRightPage : runscript("mp.RightEdgeDistance()") else : runscript("mp.LeftEdgeDistance()") fi enddef ; +vardef RightEdgeDistance = if mfun_swapped and not OnRightPage : runscript("mp.LeftEdgeDistance()") else : runscript("mp.RightEdgeDistance()") fi enddef ; + +vardef BackSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi runscript("mp.BackSpace()") enddef ; +vardef CutSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi runscript("mp.CutSpace()") enddef ; + +% better use: + +vardef OuterMarginWidth = if not OnRightPage : runscript("mp.LeftMarginWidth()") else : runscript("mp.RightMarginWidth()") fi enddef ; +vardef InnerMarginWidth = if not OnRightPage : runscript("mp.RightMarginWidth()") else : runscript("mp.LeftMarginWidth()") fi enddef ; +vardef OuterMarginDistance = if not OnRightPage : runscript("mp.LeftMarginDistance()") else : runscript("mp.RightMarginDistance()") fi enddef ; +vardef InnerMarginDistance = if not OnRightPage : runscript("mp.RightMarginDistance()") else : runscript("mp.LeftMarginDistance()") fi enddef ; + +vardef OuterEdgeWidth = if not OnRightPage : runscript("mp.LeftEdgeWidth()") else : runscript("mp.RightEdgeWidth()") fi enddef ; +vardef InnerEdgeWidth = if not OnRightPage : runscript("mp.RightEdgeWidth()") else : runscript("mp.LeftEdgeWidth()") fi enddef ; +vardef OuterEdgeDistance = if not OnRightPage : runscript("mp.LeftEdgeDistance()") else : runscript("mp.RightEdgeDistance()") fi enddef ; +vardef InnerEdgeDistance = if not OnRightPage : runscript("mp.RightEdgeDistance()") else : runscript("mp.LeftEdgeDistance()") fi enddef ; + +vardef OuterSpaceWidth = if not OnRightPage : runscript("mp.BackSpace()") else : runscript("mp.CutSpace()") fi enddef ; +vardef InnerSpaceWidth = if not OnRightPage : runscript("mp.CutSpace()") else : runscript("mp.BackSpace()") fi enddef ; + +% indices + +vardef OuterMargin = if not OnRightPage : LeftMargin else : RightMargin fi enddef ; +vardef InnerMargin = if not OnRightPage : RightMargin else : LeftMargin fi enddef ; + +vardef OuterEdge = if not OnRightPage : LeftEdge else : RightEdge fi enddef ; +vardef InnerEdge = if not OnRightPage : Rightedge else : LeftEdge fi enddef ; diff --git a/metapost/context/base/mpiv/mp-cont.mpxl b/metapost/context/base/mpiv/mp-cont.mpxl new file mode 100644 index 000000000..bc318d4b9 --- /dev/null +++ b/metapost/context/base/mpiv/mp-cont.mpxl @@ -0,0 +1,158 @@ +%D \module +%D [ file=mp-cont.mpiv, +%D version=1999.03.10, +%D title=\CONTEXT\ \METAPOST\ graphics, +%D subtitle=Interfaces, +%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 This module is rather preliminary and subjected to changes. + +if known context_cont : endinput ; fi ; + +boolean context_cont ; context_cont := true ; + +string CurrentLayout ; CurrentLayout := "default" ; + +boolean mfun_swapped ; + +def SwapPageState = + mfun_swapped := true ; % eventually this will go ! +enddef ; + +extra_beginfig := extra_beginfig & "mfun_swapped := false ;" ; + +newinternal mfid_PaperHeight ; mfid_PaperHeight := scriptindex "PaperHeight" ; vardef PaperHeight = runscript mfid_PaperHeight enddef ; +newinternal mfid_PaperWidth ; mfid_PaperWidth := scriptindex "PaperWidth" ; vardef PaperWidth = runscript mfid_PaperWidth enddef ; +newinternal mfid_PrintPaperHeight ; mfid_PrintPaperHeight := scriptindex "PrintPaperHeight" ; vardef PrintPaperHeight = runscript mfid_PrintPaperHeight enddef ; +newinternal mfid_PrintPaperWidth ; mfid_PrintPaperWidth := scriptindex "PrintPaperWidth" ; vardef PrintPaperWidth = runscript mfid_PrintPaperWidth enddef ; +newinternal mfid_TopSpace ; mfid_TopSpace := scriptindex "TopSpace" ; vardef TopSpace = runscript mfid_TopSpace enddef ; +newinternal mfid_BottomSpace ; mfid_BottomSpace := scriptindex "BottomSpace" ; vardef BottomSpace = runscript mfid_BottomSpace enddef ; +newinternal mfid_BackSpace ; mfid_BackSpace := scriptindex "BackSpace" ; vardef BackSpace = runscript mfid_BackSpace enddef ; +newinternal mfid_CutSpace ; mfid_CutSpace := scriptindex "CutSpace" ; vardef CutSpace = runscript mfid_CutSpace enddef ; +newinternal mfid_MakeupHeight ; mfid_MakeupHeight := scriptindex "MakeupHeight" ; vardef MakeupHeight = runscript mfid_MakeupHeight enddef ; +newinternal mfid_MakeupWidth ; mfid_MakeupWidth := scriptindex "MakeupWidth" ; vardef MakeupWidth = runscript mfid_MakeupWidth enddef ; +newinternal mfid_TopHeight ; mfid_TopHeight := scriptindex "TopHeight" ; vardef TopHeight = runscript mfid_TopHeight enddef ; +newinternal mfid_TopDistance ; mfid_TopDistance := scriptindex "TopDistance" ; vardef TopDistance = runscript mfid_TopDistance enddef ; +newinternal mfid_HeaderHeight ; mfid_HeaderHeight := scriptindex "HeaderHeight" ; vardef HeaderHeight = runscript mfid_HeaderHeight enddef ; +newinternal mfid_HeaderDistance ; mfid_HeaderDistance := scriptindex "HeaderDistance" ; vardef HeaderDistance = runscript mfid_HeaderDistance enddef ; +newinternal mfid_TextHeight ; mfid_TextHeight := scriptindex "TextHeight" ; vardef TextHeight = runscript mfid_TextHeight enddef ; +newinternal mfid_FooterDistance ; mfid_FooterDistance := scriptindex "FooterDistance" ; vardef FooterDistance = runscript mfid_FooterDistance enddef ; +newinternal mfid_FooterHeight ; mfid_FooterHeight := scriptindex "FooterHeight" ; vardef FooterHeight = runscript mfid_FooterHeight enddef ; +newinternal mfid_BottomDistance ; mfid_BottomDistance := scriptindex "BottomDistance" ; vardef BottomDistance = runscript mfid_BottomDistance enddef ; +newinternal mfid_BottomHeight ; mfid_BottomHeight := scriptindex "BottomHeight" ; vardef BottomHeight = runscript mfid_BottomHeight enddef ; +newinternal mfid_LeftEdgeWidth ; mfid_LeftEdgeWidth := scriptindex "LeftEdgeWidth" ; vardef LeftEdgeWidth = runscript mfid_LeftEdgeWidth enddef ; +newinternal mfid_LeftEdgeDistance ; mfid_LeftEdgeDistance := scriptindex "LeftEdgeDistance" ; vardef LeftEdgeDistance = runscript mfid_LeftEdgeDistance enddef ; +newinternal mfid_LeftMarginWidth ; mfid_LeftMarginWidth := scriptindex "LeftMarginWidth" ; vardef LeftMarginWidth = runscript mfid_LeftMarginWidth enddef ; +newinternal mfid_LeftMarginDistance ; mfid_LeftMarginDistance := scriptindex "LeftMarginDistance" ; vardef LeftMarginDistance = runscript mfid_LeftMarginDistance enddef ; +newinternal mfid_TextWidth ; mfid_TextWidth := scriptindex "TextWidth" ; vardef TextWidth = runscript mfid_TextWidth enddef ; +newinternal mfid_RightMarginDistance ; mfid_RightMarginDistance := scriptindex "RightMarginDistance" ; vardef RightMarginDistance = runscript mfid_RightMarginDistance enddef ; +newinternal mfid_RightMarginWidth ; mfid_RightMarginWidth := scriptindex "RightMarginWidth" ; vardef RightMarginWidth = runscript mfid_RightMarginWidth enddef ; +newinternal mfid_RightEdgeDistance ; mfid_RightEdgeDistance := scriptindex "RightEdgeDistance" ; vardef RightEdgeDistance = runscript mfid_RightEdgeDistance enddef ; +newinternal mfid_RightEdgeWidth ; mfid_RightEdgeWidth := scriptindex "RightEdgeWidth" ; vardef RightEdgeWidth = runscript mfid_RightEdgeWidth enddef ; +newinternal mfid_InnerMarginDistance ; mfid_InnerMarginDistance := scriptindex "InnerMarginDistance" ; vardef InnerMarginDistance = runscript mfid_InnerMarginDistance enddef ; +newinternal mfid_InnerMarginWidth ; mfid_InnerMarginWidth := scriptindex "InnerMarginWidth" ; vardef InnerMarginWidth = runscript mfid_InnerMarginWidth enddef ; +newinternal mfid_OuterMarginDistance ; mfid_OuterMarginDistance := scriptindex "OuterMarginDistance" ; vardef OuterMarginDistance = runscript mfid_OuterMarginDistance enddef ; +newinternal mfid_OuterMarginWidth ; mfid_OuterMarginWidth := scriptindex "OuterMarginWidth" ; vardef OuterMarginWidth = runscript mfid_OuterMarginWidth enddef ; +newinternal mfid_InnerEdgeDistance ; mfid_InnerEdgeDistance := scriptindex "InnerEdgeDistance" ; vardef InnerEdgeDistance = runscript mfid_InnerEdgeDistance enddef ; +newinternal mfid_InnerEdgeWidth ; mfid_InnerEdgeWidth := scriptindex "InnerEdgeWidth" ; vardef InnerEdgeWidth = runscript mfid_InnerEdgeWidth enddef ; +newinternal mfid_OuterEdgeDistance ; mfid_OuterEdgeDistance := scriptindex "OuterEdgeDistance" ; vardef OuterEdgeDistance = runscript mfid_OuterEdgeDistance enddef ; +newinternal mfid_OuterEdgeWidth ; mfid_OuterEdgeWidth := scriptindex "OuterEdgeWidth" ; vardef OuterEdgeWidth = runscript mfid_OuterEdgeWidth enddef ; +newinternal mfid_PageOffset ; mfid_PageOffset := scriptindex "PageOffset" ; vardef PageOffset = runscript mfid_PageOffset enddef ; +newinternal mfid_PageDepth ; mfid_PageDepth := scriptindex "PageDepth" ; vardef PageDepth = runscript mfid_PageDepth enddef ; +newinternal mfid_LayoutColumns ; mfid_LayoutColumns := scriptindex "LayoutColumns" ; vardef LayoutColumns = runscript mfid_LayoutColumns enddef ; +newinternal mfid_LayoutColumnDistance ; mfid_LayoutColumnDistance := scriptindex "LayoutColumnDistance" ; vardef LayoutColumnDistance = runscript mfid_LayoutColumnDistance enddef ; +newinternal mfid_LayoutColumnWidth ; mfid_LayoutColumnWidth := scriptindex "LayoutColumnWidth" ; vardef LayoutColumnWidth = runscript mfid_LayoutColumnWidth enddef ; + +newinternal mfid_OnRightPage ; mfid_OnRightPage := scriptindex "OnRightPage" ; vardef OnRightPage = runscript mfid_OnRightPage enddef ; +newinternal mfid_OnOddPage ; mfid_OnOddPage := scriptindex "OnOddPage" ; vardef OnOddPage = runscript mfid_OnOddPage enddef ; +newinternal mfid_InPageBody ; mfid_InPageBody := scriptindex "InPageBody" ; vardef InPageBody = runscript mfid_InPageBody enddef ; + +newinternal mfid_RealPageNumber ; mfid_RealPageNumber := scriptindex "RealPageNumber" ; vardef RealPageNumber = runscript mfid_RealPageNumber enddef ; +newinternal mfid_LastPageNumber ; mfid_LastPageNumber := scriptindex "LastPageNumber" ; vardef LastPageNumber = runscript mfid_LastPageNumber enddef ; + +newinternal mfid_PageNumber ; mfid_PageNumber := scriptindex "PageNumber" ; vardef PageNumber = runscript mfid_PageNumber enddef ; +newinternal mfid_NOfPages ; mfid_NOfPages := scriptindex "NOfPages" ; vardef NOfPages = runscript mfid_NOfPages enddef ; + +newinternal mfid_SubPageNumber ; mfid_SubPageNumber := scriptindex "SubPageNumber" ; vardef SubPageNumber = runscript mfid_SubPageNumber enddef ; +newinternal mfid_NOfSubPages ; mfid_NOfSubPages := scriptindex "NOfSubPages" ; vardef NOfSubPages = runscript mfid_NOfSubPages enddef ; + +newinternal mfid_CurrentColumn ; mfid_CurrentColumn := scriptindex "CurrentColumn" ; vardef CurrentColumn = runscript mfid_CurrentColumn enddef ; +newinternal mfid_NOfColumns ; mfid_NOfColumns := scriptindex "NOfColumns" ; vardef NOfColumns = runscript mfid_NOfColumns enddef ; + +newinternal mfid_BaseLineSkip ; mfid_BaseLineSkip := scriptindex "BaseLineSkip" ; vardef BaseLineSkip = runscript mfid_BaseLineSkip enddef ; +newinternal mfid_LineHeight ; mfid_LineHeight := scriptindex "LineHeight" ; vardef LineHeight = runscript mfid_LineHeight enddef ; +newinternal mfid_BodyFontSize ; mfid_BodyFontSize := scriptindex "BodyFontSize" ; vardef BodyFontSize = runscript mfid_BodyFontSize enddef ; + +newinternal mfid_TopSkip ; mfid_TopSkip := scriptindex "TopSkip" ; vardef TopSkip = runscript mfid_TopSkip enddef ; +newinternal mfid_StrutHeight ; mfid_StrutHeight := scriptindex "StrutHeight" ; vardef StrutHeight = runscript mfid_StrutHeight enddef ; +newinternal mfid_StrutDepth ; mfid_StrutDepth := scriptindex "StrutDepth" ; vardef StrutDepth = runscript mfid_StrutDepth enddef ; + +newinternal mfid_CurrentWidth ; mfid_CurrentWidth := scriptindex "CurrentWidth" ; vardef CurrentWidth = runscript mfid_CurrentWidth enddef ; +newinternal mfid_CurrentHeight ; mfid_CurrentHeight := scriptindex "CurrentHeight" ; vardef CurrentHeight = runscript mfid_CurrentHeight enddef ; + +newinternal mfid_HSize ; mfid_HSize := scriptindex "HSize" ; vardef HSize = runscript mfid_HSize enddef ; +newinternal mfid_VSize ; mfid_VSize := scriptindex "VSize" ; vardef VSize = runscript mfid_VSize enddef ; + +newinternal mfid_EmWidth ; mfid_EmWidth := scriptindex "EmWidth" ; vardef EmWidth = runscript mfid_EmWidth enddef ; +newinternal mfid_ExHeight ; mfid_ExHeight := scriptindex "ExHeight" ; vardef ExHeight = runscript mfid_ExHeight enddef ; + +newinternal mfid_PageFraction ; mfid_PageFraction := scriptindex "PageFraction" ; vardef PageFraction = runscript mfid_PageFraction enddef ; + +newinternal mfid_SpineWidth ; mfid_SpineWidth := scriptindex "SpineWidth" ; vardef SpineWidth = runscript mfid_SpineWidth enddef ; +newinternal mfid_PaperBleed ; mfid_PaperBleed := scriptindex "PaperBleed" ; vardef PaperBleed = runscript mfid_PaperBleed enddef ; + +% mfid_CurrentLayout ; mfid_CurrentLayout := scriptindex "CurrentLayout" ; vardef CurrentLayout = runscript mfid_CurrentLayout enddef ; +newinternal mfid_OverlayWidth ; mfid_OverlayWidth := scriptindex "OverlayWidth" ; vardef OverlayWidth = runscript mfid_OverlayWidth enddef ; +newinternal mfid_OverlayHeight ; mfid_OverlayHeight := scriptindex "OverlayHeight" ; vardef OverlayHeight = runscript mfid_OverlayHeight enddef ; +newinternal mfid_OverlayDepth ; mfid_OverlayDepth := scriptindex "OverlayDepth" ; vardef OverlayDepth = runscript mfid_OverlayDepth enddef ; +newinternal mfid_OverlayLineWidth ; mfid_OverlayLineWidth := scriptindex "OverlayLineWidth" ; vardef OverlayLineWidth = runscript mfid_OverlayLineWidth enddef ; +newinternal mfid_OverlayOffset ; mfid_OverlayOffset := scriptindex "OverlayOffset" ; vardef OverlayOffset = runscript mfid_OverlayOffset enddef ; +newinternal mfid_OverlayRegion ; mfid_OverlayRegion := scriptindex "OverlayRegion" ; vardef OverlayRegion = runscript mfid_OverlayRegion enddef ; +% mfid_OverlayLineColor ; mfid_OverlayLineColor := scriptindex "OverlayLineColor ; vardef OverlayLineColor = runscript mfid_OverlayLineColor enddef ; +% mfid_OverlayColor ; mfid_OverlayColor := scriptindex "OverlayColor ; vardef OverlayColor = runscript mfid_OverlayColor enddef ; + +newinternal mfid_defaultcolormodel ; mfid_defaultcolormodel := scriptindex "defaultcolormodel" ; vardef defaultcolormodel = runscript mfid_defaultcolormodel enddef ; + +vardef LeftMarginWidth = if mfun_swapped and not OnRightPage : runscript mfid_RightMarginWidth else : runscript mfid_LeftMarginWidth fi enddef ; +vardef RightMarginWidth = if mfun_swapped and not OnRightPage : runscript mfid_LeftMarginWidth else : runscript mfid_RightMarginWidth fi enddef ; +vardef LeftMarginDistance = if mfun_swapped and not OnRightPage : runscript mfid_RightMarginDistance else : runscript mfid_LeftMarginDistance fi enddef ; +vardef RightMarginDistance = if mfun_swapped and not OnRightPage : runscript mfid_LeftMarginDistance else : runscript mfid_RightMarginDistance fi enddef ; + +vardef LeftEdgeWidth = if mfun_swapped and not OnRightPage : runscript mfid_RightEdgeWidth else : runscript mfid_LeftEdgeWidth fi enddef ; +vardef RightEdgeWidth = if mfun_swapped and not OnRightPage : runscript mfid_LeftEdgeWidth else : runscript mfid_RightEdgeWidth fi enddef ; +vardef LeftEdgeDistance = if mfun_swapped and not OnRightPage : runscript mfid_RightEdgeDistance else : runscript mfid_LeftEdgeDistance fi enddef ; +vardef RightEdgeDistance = if mfun_swapped and not OnRightPage : runscript mfid_LeftEdgeDistance else : runscript mfid_RightEdgeDistance fi enddef ; + +vardef BackSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi runscript mfid_BackSpace enddef ; +vardef CutSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi runscript mfid_CutSpace enddef ; + +% better use: + +vardef OuterMarginWidth = if not OnRightPage : runscript mfid_LeftMarginWidth else : runscript mfid_RightMarginWidth fi enddef ; +vardef InnerMarginWidth = if not OnRightPage : runscript mfid_RightMarginWidth else : runscript mfid_LeftMarginWidth fi enddef ; +vardef OuterMarginDistance = if not OnRightPage : runscript mfid_LeftMarginDistance else : runscript mfid_RightMarginDistance fi enddef ; +vardef InnerMarginDistance = if not OnRightPage : runscript mfid_RightMarginDistance else : runscript mfid_LeftMarginDistance fi enddef ; + +vardef OuterEdgeWidth = if not OnRightPage : runscript mfid_LeftEdgeWidth else : runscript mfid_RightEdgeWidth fi enddef ; +vardef InnerEdgeWidth = if not OnRightPage : runscript mfid_RightEdgeWidth else : runscript mfid_LeftEdgeWidth fi enddef ; +vardef OuterEdgeDistance = if not OnRightPage : runscript mfid_LeftEdgeDistance else : runscript mfid_RightEdgeDistance fi enddef ; +vardef InnerEdgeDistance = if not OnRightPage : runscript mfid_RightEdgeDistance else : runscript mfid_LeftEdgeDistance fi enddef ; + +vardef OuterSpaceWidth = if not OnRightPage : runscript mfid_BackSpace else : runscript mfid_CutSpace fi enddef ; +vardef InnerSpaceWidth = if not OnRightPage : runscript mfid_CutSpace else : runscript mfid_BackSpace fi enddef ; + +% indices + +vardef OuterMargin = if not OnRightPage : LeftMargin else : RightMargin fi enddef ; +vardef InnerMargin = if not OnRightPage : RightMargin else : LeftMargin fi enddef ; + +vardef OuterEdge = if not OnRightPage : LeftEdge else : RightEdge fi enddef ; +vardef InnerEdge = if not OnRightPage : Rightedge else : LeftEdge fi enddef ; + + diff --git a/metapost/context/base/mpiv/mp-luas.mpxl b/metapost/context/base/mpiv/mp-luas.mpxl index 0dac5cefc..2bdeb915c 100644 --- a/metapost/context/base/mpiv/mp-luas.mpxl +++ b/metapost/context/base/mpiv/mp-luas.mpxl @@ -221,3 +221,12 @@ def getparametertext = runscript mfid_getparametertext enddef ; def applyparameters = runscript mfid_applyparameters enddef ; def pushparameters = runscript mfid_pushparameters enddef ; def popparameters = runscript mfid_popparameters enddef ; + +% This might also be done in stock mkiv: + +newinternal mfid_year ; mfid_year := scriptindex "year" ; vardef year = runscript mfid_year enddef ; +newinternal mfid_month ; mfid_month := scriptindex "month" ; vardef month = runscript mfid_month enddef ; +newinternal mfid_day ; mfid_day := scriptindex "day" ; vardef day = runscript mfid_day enddef ; +newinternal mfid_hour ; mfid_hour := scriptindex "hour" ; vardef hour = runscript mfid_hour enddef ; +newinternal mfid_minute ; mfid_minute := scriptindex "minute" ; vardef minute = runscript mfid_minute enddef ; +newinternal mfid_second ; mfid_second := scriptindex "second" ; vardef second = runscript mfid_second enddef ; diff --git a/metapost/context/base/mpiv/mp-math.mpxl b/metapost/context/base/mpiv/mp-math.mpxl index 52fbd1615..ea8c1cd7c 100644 --- a/metapost/context/base/mpiv/mp-math.mpxl +++ b/metapost/context/base/mpiv/mp-math.mpxl @@ -17,98 +17,98 @@ boolean context_math ; context_math := true ; % draw textext(decimal runscript("mp.numeric(xmath.gamma(.12))")) ; -newinternal mfid_m_acos ; mfid_m_acos := scriptindex "m_acos" ; def m_acos = runscript mfid_m_acos enddef ; -newinternal mfid_m_acosh ; mfid_m_acosh := scriptindex "m_acosh" ; def m_acosh = runscript mfid_m_acosh enddef ; -newinternal mfid_m_asin ; mfid_m_asin := scriptindex "m_asin" ; def m_asin = runscript mfid_m_asin enddef ; -newinternal mfid_m_asinh ; mfid_m_asinh := scriptindex "m_asinh" ; def m_asinh = runscript mfid_m_asinh enddef ; -newinternal mfid_m_atan ; mfid_m_atan := scriptindex "m_atan" ; def m_atan = runscript mfid_m_atan enddef ; -newinternal mfid_m_atantwo ; mfid_m_atantwo := scriptindex "m_atan2" ; def m_atantwo = runscript mfid_m_atantwo enddef ; % atan2 -newinternal mfid_m_atanh ; mfid_m_atanh := scriptindex "m_atanh" ; def m_atanh = runscript mfid_m_atanh enddef ; -newinternal mfid_m_cbrt ; mfid_m_cbrt := scriptindex "m_cbrt" ; def m_cbrt = runscript mfid_m_cbrt enddef ; -newinternal mfid_m_ceil ; mfid_m_ceil := scriptindex "m_ceil" ; def m_ceil = runscript mfid_m_ceil enddef ; -newinternal mfid_m_copysign ; mfid_m_copysign := scriptindex "m_copysign" ; def m_copysign = runscript mfid_m_copysign enddef ; -newinternal mfid_m_cos ; mfid_m_cos := scriptindex "m_cos" ; def m_cos = runscript mfid_m_cos enddef ; -newinternal mfid_m_cosh ; mfid_m_cosh := scriptindex "m_cosh" ; def m_cosh = runscript mfid_m_cosh enddef ; -newinternal mfid_m_deg ; mfid_m_deg := scriptindex "m_deg" ; def m_deg = runscript mfid_m_deg enddef ; -newinternal mfid_m_erf ; mfid_m_erf := scriptindex "m_erf" ; def m_erf = runscript mfid_m_erf enddef ; -newinternal mfid_m_erfc ; mfid_m_erfc := scriptindex "m_erfc" ; def m_erfc = runscript mfid_m_erfc enddef ; -newinternal mfid_m_exp ; mfid_m_exp := scriptindex "m_exp" ; def m_exp = runscript mfid_m_exp enddef ; -newinternal mfid_m_exptwo ; mfid_m_exptwo := scriptindex "m_exp2" ; def m_exptwo = runscript mfid_m_exptwo enddef ; % exp2 -newinternal mfid_m_expm ; mfid_m_expm := scriptindex "m_expm1" ; def m_expm = runscript mfid_m_expm enddef ; % expm1 -newinternal mfid_m_fabs ; mfid_m_fabs := scriptindex "m_fabs" ; def m_fabs = runscript mfid_m_fabs enddef ; -newinternal mfid_m_fdim ; mfid_m_fdim := scriptindex "m_fdim" ; def m_fdim = runscript mfid_m_fdim enddef ; -newinternal mfid_m_floor ; mfid_m_floor := scriptindex "m_floor" ; def m_floor = runscript mfid_m_floor enddef ; -newinternal mfid_m_fma ; mfid_m_fma := scriptindex "m_fma" ; def m_fma = runscript mfid_m_fma enddef ; -newinternal mfid_m_fmax ; mfid_m_fmax := scriptindex "m_fmax" ; def m_fmax = runscript mfid_m_fmax enddef ; -newinternal mfid_m_fmin ; mfid_m_fmin := scriptindex "m_fmin" ; def m_fmin = runscript mfid_m_fmin enddef ; -newinternal mfid_m_fmod ; mfid_m_fmod := scriptindex "m_fmod" ; def m_fmod = runscript mfid_m_fmod enddef ; -newinternal mfid_m_frexp ; mfid_m_frexp := scriptindex "m_frexp" ; def m_frexp = runscript mfid_m_frexp enddef ; -newinternal mfid_m_gamma ; mfid_m_gamma := scriptindex "m_gamma" ; def m_gamma = runscript mfid_m_gamma enddef ; -newinternal mfid_m_hypot ; mfid_m_hypot := scriptindex "m_hypot" ; def m_hypot = runscript mfid_m_hypot enddef ; -newinternal mfid_m_isfinite ; mfid_m_isfinite := scriptindex "m_isfinite" ; def m_isfinite = runscript mfid_m_isfinite enddef ; -newinternal mfid_m_isinf ; mfid_m_isinf := scriptindex "m_isinf" ; def m_isinf = runscript mfid_m_isinf enddef ; -newinternal mfid_m_isnan ; mfid_m_isnan := scriptindex "m_isnan" ; def m_isnan = runscript mfid_m_isnan enddef ; -newinternal mfid_m_isnormal ; mfid_m_isnormal := scriptindex "m_isnormal" ; def m_isnormal = runscript mfid_m_isnormal enddef ; -newinternal mfid_m_jz ; mfid_m_jz := scriptindex "m_j0" ; def m_jz = runscript mfid_m_jz enddef ; % j0 -newinternal mfid_m_j ; mfid_m_j := scriptindex "m_j1" ; def m_j = runscript mfid_m_j enddef ; % j1 -newinternal mfid_m_jn ; mfid_m_jn := scriptindex "m_jn" ; def m_jn = runscript mfid_m_jn enddef ; -newinternal mfid_m_ldexp ; mfid_m_ldexp := scriptindex "m_ldexp" ; def m_ldexp = runscript mfid_m_ldexp enddef ; -newinternal mfid_m_lgamma ; mfid_m_lgamma := scriptindex "m_lgamma" ; def m_lgamma = runscript mfid_m_lgamma enddef ; -newinternal mfid_m_log ; mfid_m_log := scriptindex "m_log" ; def m_log = runscript mfid_m_log enddef ; -newinternal mfid_m_logten ; mfid_m_logte := scriptindex "m_log10" ; def m_logten = runscript mfid_m_logten enddef ; % log10 -newinternal mfid_m_logp ; mfid_m_logp := scriptindex "m_log1p" ; def m_logp = runscript mfid_m_logp enddef ; % log1p -newinternal mfid_m_logtwo ; mfid_m_logtwo := scriptindex "m_log2" ; def m_logtwo = runscript mfid_m_logtwo enddef ; % log2 -newinternal mfid_m_logb ; mfid_m_logb := scriptindex "m_logb" ; def m_logb = runscript mfid_m_logb enddef ; -newinternal mfid_m_modf ; mfid_m_modf := scriptindex "m_modf" ; def m_modf = runscript mfid_m_modf enddef ; +newinternal mfid_m_acos ; mfid_m_acos := scriptindex "m_acos" ; def m_acos = runscript mfid_m_acos enddef ; +newinternal mfid_m_acosh ; mfid_m_acosh := scriptindex "m_acosh" ; def m_acosh = runscript mfid_m_acosh enddef ; +newinternal mfid_m_asin ; mfid_m_asin := scriptindex "m_asin" ; def m_asin = runscript mfid_m_asin enddef ; +newinternal mfid_m_asinh ; mfid_m_asinh := scriptindex "m_asinh" ; def m_asinh = runscript mfid_m_asinh enddef ; +newinternal mfid_m_atan ; mfid_m_atan := scriptindex "m_atan" ; def m_atan = runscript mfid_m_atan enddef ; +newinternal mfid_m_atantwo ; mfid_m_atantwo := scriptindex "m_atan2" ; def m_atantwo = runscript mfid_m_atantwo enddef ; % atan2 +newinternal mfid_m_atanh ; mfid_m_atanh := scriptindex "m_atanh" ; def m_atanh = runscript mfid_m_atanh enddef ; +newinternal mfid_m_cbrt ; mfid_m_cbrt := scriptindex "m_cbrt" ; def m_cbrt = runscript mfid_m_cbrt enddef ; +newinternal mfid_m_ceil ; mfid_m_ceil := scriptindex "m_ceil" ; def m_ceil = runscript mfid_m_ceil enddef ; +newinternal mfid_m_copysign ; mfid_m_copysign := scriptindex "m_copysign" ; def m_copysign = runscript mfid_m_copysign enddef ; +newinternal mfid_m_cos ; mfid_m_cos := scriptindex "m_cos" ; def m_cos = runscript mfid_m_cos enddef ; +newinternal mfid_m_cosh ; mfid_m_cosh := scriptindex "m_cosh" ; def m_cosh = runscript mfid_m_cosh enddef ; +newinternal mfid_m_deg ; mfid_m_deg := scriptindex "m_deg" ; def m_deg = runscript mfid_m_deg enddef ; +newinternal mfid_m_erf ; mfid_m_erf := scriptindex "m_erf" ; def m_erf = runscript mfid_m_erf enddef ; +newinternal mfid_m_erfc ; mfid_m_erfc := scriptindex "m_erfc" ; def m_erfc = runscript mfid_m_erfc enddef ; +newinternal mfid_m_exp ; mfid_m_exp := scriptindex "m_exp" ; def m_exp = runscript mfid_m_exp enddef ; +newinternal mfid_m_exptwo ; mfid_m_exptwo := scriptindex "m_exp2" ; def m_exptwo = runscript mfid_m_exptwo enddef ; % exp2 +newinternal mfid_m_expm ; mfid_m_expm := scriptindex "m_expm1" ; def m_expm = runscript mfid_m_expm enddef ; % expm1 +newinternal mfid_m_fabs ; mfid_m_fabs := scriptindex "m_fabs" ; def m_fabs = runscript mfid_m_fabs enddef ; +newinternal mfid_m_fdim ; mfid_m_fdim := scriptindex "m_fdim" ; def m_fdim = runscript mfid_m_fdim enddef ; +newinternal mfid_m_floor ; mfid_m_floor := scriptindex "m_floor" ; def m_floor = runscript mfid_m_floor enddef ; +newinternal mfid_m_fma ; mfid_m_fma := scriptindex "m_fma" ; def m_fma = runscript mfid_m_fma enddef ; +newinternal mfid_m_fmax ; mfid_m_fmax := scriptindex "m_fmax" ; def m_fmax = runscript mfid_m_fmax enddef ; +newinternal mfid_m_fmin ; mfid_m_fmin := scriptindex "m_fmin" ; def m_fmin = runscript mfid_m_fmin enddef ; +newinternal mfid_m_fmod ; mfid_m_fmod := scriptindex "m_fmod" ; def m_fmod = runscript mfid_m_fmod enddef ; +newinternal mfid_m_frexp ; mfid_m_frexp := scriptindex "m_frexp" ; def m_frexp = runscript mfid_m_frexp enddef ; +newinternal mfid_m_gamma ; mfid_m_gamma := scriptindex "m_gamma" ; def m_gamma = runscript mfid_m_gamma enddef ; +newinternal mfid_m_hypot ; mfid_m_hypot := scriptindex "m_hypot" ; def m_hypot = runscript mfid_m_hypot enddef ; +newinternal mfid_m_isfinite ; mfid_m_isfinite := scriptindex "m_isfinite" ; def m_isfinite = runscript mfid_m_isfinite enddef ; +newinternal mfid_m_isinf ; mfid_m_isinf := scriptindex "m_isinf" ; def m_isinf = runscript mfid_m_isinf enddef ; +newinternal mfid_m_isnan ; mfid_m_isnan := scriptindex "m_isnan" ; def m_isnan = runscript mfid_m_isnan enddef ; +newinternal mfid_m_isnormal ; mfid_m_isnormal := scriptindex "m_isnormal" ; def m_isnormal = runscript mfid_m_isnormal enddef ; +newinternal mfid_m_jz ; mfid_m_jz := scriptindex "m_j0" ; def m_jz = runscript mfid_m_jz enddef ; % j0 +newinternal mfid_m_j ; mfid_m_j := scriptindex "m_j1" ; def m_j = runscript mfid_m_j enddef ; % j1 +newinternal mfid_m_jn ; mfid_m_jn := scriptindex "m_jn" ; def m_jn = runscript mfid_m_jn enddef ; +newinternal mfid_m_ldexp ; mfid_m_ldexp := scriptindex "m_ldexp" ; def m_ldexp = runscript mfid_m_ldexp enddef ; +newinternal mfid_m_lgamma ; mfid_m_lgamma := scriptindex "m_lgamma" ; def m_lgamma = runscript mfid_m_lgamma enddef ; +newinternal mfid_m_log ; mfid_m_log := scriptindex "m_log" ; def m_log = runscript mfid_m_log enddef ; +newinternal mfid_m_logten ; mfid_m_logte := scriptindex "m_log10" ; def m_logten = runscript mfid_m_logten enddef ; % log10 +newinternal mfid_m_logp ; mfid_m_logp := scriptindex "m_log1p" ; def m_logp = runscript mfid_m_logp enddef ; % log1p +newinternal mfid_m_logtwo ; mfid_m_logtwo := scriptindex "m_log2" ; def m_logtwo = runscript mfid_m_logtwo enddef ; % log2 +newinternal mfid_m_logb ; mfid_m_logb := scriptindex "m_logb" ; def m_logb = runscript mfid_m_logb enddef ; +newinternal mfid_m_modf ; mfid_m_modf := scriptindex "m_modf" ; def m_modf = runscript mfid_m_modf enddef ; newinternal mfid_m_nearbyint ; mfid_m_nearbyint := scriptindex "m_nearbyint" ; def m_nearbyint = runscript mfid_m_nearbyint enddef ; newinternal mfid_m_nextafter ; mfid_m_nextafter := scriptindex "m_nextafter" ; def m_nextafter = runscript mfid_m_nextafter enddef ; -newinternal mfid_m_pow ; mfid_m_pow := scriptindex "m_pow" ; def m_pow = runscript mfid_m_pow enddef ; -newinternal mfid_m_rad ; mfid_m_rad := scriptindex "m_rad" ; def m_rad = runscript mfid_m_rad enddef ; +newinternal mfid_m_pow ; mfid_m_pow := scriptindex "m_pow" ; def m_pow = runscript mfid_m_pow enddef ; +newinternal mfid_m_rad ; mfid_m_rad := scriptindex "m_rad" ; def m_rad = runscript mfid_m_rad enddef ; newinternal mfid_m_remainder ; mfid_m_remainder := scriptindex "m_remainder" ; def m_remainder = runscript mfid_m_remainder enddef ; -newinternal mfid_m_remquo ; mfid_m_remquo := scriptindex "m_remquo" ; def m_remquo = runscript mfid_m_remquo enddef ; -newinternal mfid_m_round ; mfid_m_round := scriptindex "m_round" ; def m_round = runscript mfid_m_round enddef ; -newinternal mfid_m_scalbn ; mfid_m_scalbn := scriptindex "m_scalbn" ; def m_scalbn = runscript mfid_m_scalbn enddef ; -newinternal mfid_m_sin ; mfid_m_sin := scriptindex "m_sin" ; def m_sin = runscript mfid_m_sin enddef ; -newinternal mfid_m_sinh ; mfid_m_sinh := scriptindex "m_sinh" ; def m_sinh = runscript mfid_m_sinh enddef ; -newinternal mfid_m_sqrt ; mfid_m_sqrt := scriptindex "m_sqrt" ; def m_sqrt = runscript mfid_m_sqrt enddef ; -newinternal mfid_m_tan ; mfid_m_tan := scriptindex "m_tan" ; def m_tan = runscript mfid_m_tan enddef ; -newinternal mfid_m_tanh ; mfid_m_tanh := scriptindex "m_tanh" ; def m_tanh = runscript mfid_m_tanh enddef ; -newinternal mfid_m_tgamma ; mfid_m_tgamma := scriptindex "m_tgamma" ; def m_tgamma = runscript mfid_m_tgamma enddef ; -newinternal mfid_m_trunc ; mfid_m_trunc := scriptindex "m_trunc" ; def m_trunc = runscript mfid_m_trunc enddef ; -newinternal mfid_m_yz ; mfid_m_yz := scriptindex "m_y0" ; def m_yz = runscript mfid_m_yz enddef ; % y0 -newinternal mfid_m_y ; mfid_m_y := scriptindex "m_y1" ; def m_y = runscript mfid_m_y enddef ; % y1 -newinternal mfid_m_yn ; mfid_m_yn := scriptindex "m_yn" ; def m_yn = runscript mfid_m_yn enddef ; - -newinternal mfid_c_sin ; mfid_c_asin := scriptindex "c_sin" ; def c_sin = runscript mfid_c_sin enddef ; -newinternal mfid_c_cos ; mfid_c_acos := scriptindex "c_cos" ; def c_cos = runscript mfid_c_cos enddef ; -newinternal mfid_c_tan ; mfid_c_acos := scriptindex "c_tan" ; def c_tan = runscript mfid_c_tan enddef ; -newinternal mfid_c_sinh ; mfid_c_acos := scriptindex "c_sinh" ; def c_sinh = runscript mfid_c_sinh enddef ; -newinternal mfid_c_cosh ; mfid_c_acos := scriptindex "c_cosh" ; def c_cosh = runscript mfid_c_cosh enddef ; -newinternal mfid_c_tanh ; mfid_c_acos := scriptindex "c_tanh" ; def c_tanh = runscript mfid_c_tanh enddef ; - -newinternal mfid_c_asin ; mfid_c_acos := scriptindex "c_asin" ; def c_asin = runscript mfid_c_asin enddef ; -newinternal mfid_c_acos ; mfid_c_acos := scriptindex "c_acos" ; def c_acos = runscript mfid_c_acos enddef ; -newinternal mfid_c_atan ; mfid_c_acos := scriptindex "c_atan" ; def c_atan = runscript mfid_c_atan enddef ; -newinternal mfid_c_asinh ; mfid_c_acos := scriptindex "c_asinh" ; def c_asinh = runscript mfid_c_asinh enddef ; -newinternal mfid_c_acosh ; mfid_c_acos := scriptindex "c_acosh" ; def c_acosh = runscript mfid_c_acosh enddef ; -newinternal mfid_c_atanh ; mfid_c_acos := scriptindex "c_atanh" ; def c_atanh = runscript mfid_c_atanh enddef ; - -newinternal mfid_c_sqrt ; mfid_c_acos := scriptindex "c_sqrt" ; def c_sqrt = runscript mfid_c_sqrt enddef ; -newinternal mfid_c_abs ; mfid_c_acos := scriptindex "c_abs" ; def c_abs = runscript mfid_c_abs enddef ; -newinternal mfid_c_arg ; mfid_c_acos := scriptindex "c_arg" ; def c_arg = runscript mfid_c_arg enddef ; -newinternal mfid_c_conj ; mfid_c_acos := scriptindex "c_conj" ; def c_conj = runscript mfid_c_conj enddef ; -newinternal mfid_c_exp ; mfid_c_acos := scriptindex "c_exp" ; def c_exp = runscript mfid_c_exp enddef ; -newinternal mfid_c_log ; mfid_c_acos := scriptindex "c_log" ; def c_log = runscript mfid_c_log enddef ; -newinternal mfid_c_proj ; mfid_c_acos := scriptindex "c_proj" ; def c_proj = runscript mfid_c_proj enddef ; - -newinternal mfid_c_erf ; mfid_c_erf := scriptindex "c_erf" ; def c_erf = runscript mfid_c_erf enddef ; -newinternal mfid_c_erfc ; mfid_c_erfc := scriptindex "c_erfc" ; def c_erfc = runscript mfid_c_erfc enddef ; -newinternal mfid_c_erfcx ; mfid_c_erfcx := scriptindex "c_erfcx" ; def c_erfcx = runscript mfid_c_erfcx enddef ; -newinternal mfid_c_erfi ; mfid_c_erfi := scriptindex "c_erfi" ; def c_erfi = runscript mfid_c_erfi enddef ; - -% mfid_c_imag ; mfid_c_acos := scriptindex "c_imag" ; def c_imag = runscript mfid_c_imag enddef ; -% mfid_c_real ; mfid_c_acos := scriptindex "c_real" ; def c_real = runscript mfid_c_real enddef ; -% mfid_c_neg ; mfid_c_neg := scriptindex "c_neg" ; def c_neg = runscript mfid_c_neg enddef ; +newinternal mfid_m_remquo ; mfid_m_remquo := scriptindex "m_remquo" ; def m_remquo = runscript mfid_m_remquo enddef ; +newinternal mfid_m_round ; mfid_m_round := scriptindex "m_round" ; def m_round = runscript mfid_m_round enddef ; +newinternal mfid_m_scalbn ; mfid_m_scalbn := scriptindex "m_scalbn" ; def m_scalbn = runscript mfid_m_scalbn enddef ; +newinternal mfid_m_sin ; mfid_m_sin := scriptindex "m_sin" ; def m_sin = runscript mfid_m_sin enddef ; +newinternal mfid_m_sinh ; mfid_m_sinh := scriptindex "m_sinh" ; def m_sinh = runscript mfid_m_sinh enddef ; +newinternal mfid_m_sqrt ; mfid_m_sqrt := scriptindex "m_sqrt" ; def m_sqrt = runscript mfid_m_sqrt enddef ; +newinternal mfid_m_tan ; mfid_m_tan := scriptindex "m_tan" ; def m_tan = runscript mfid_m_tan enddef ; +newinternal mfid_m_tanh ; mfid_m_tanh := scriptindex "m_tanh" ; def m_tanh = runscript mfid_m_tanh enddef ; +newinternal mfid_m_tgamma ; mfid_m_tgamma := scriptindex "m_tgamma" ; def m_tgamma = runscript mfid_m_tgamma enddef ; +newinternal mfid_m_trunc ; mfid_m_trunc := scriptindex "m_trunc" ; def m_trunc = runscript mfid_m_trunc enddef ; +newinternal mfid_m_yz ; mfid_m_yz := scriptindex "m_y0" ; def m_yz = runscript mfid_m_yz enddef ; % y0 +newinternal mfid_m_y ; mfid_m_y := scriptindex "m_y1" ; def m_y = runscript mfid_m_y enddef ; % y1 +newinternal mfid_m_yn ; mfid_m_yn := scriptindex "m_yn" ; def m_yn = runscript mfid_m_yn enddef ; + +newinternal mfid_c_sin ; mfid_c_asin := scriptindex "c_sin" ; def c_sin = runscript mfid_c_sin enddef ; +newinternal mfid_c_cos ; mfid_c_acos := scriptindex "c_cos" ; def c_cos = runscript mfid_c_cos enddef ; +newinternal mfid_c_tan ; mfid_c_acos := scriptindex "c_tan" ; def c_tan = runscript mfid_c_tan enddef ; +newinternal mfid_c_sinh ; mfid_c_acos := scriptindex "c_sinh" ; def c_sinh = runscript mfid_c_sinh enddef ; +newinternal mfid_c_cosh ; mfid_c_acos := scriptindex "c_cosh" ; def c_cosh = runscript mfid_c_cosh enddef ; +newinternal mfid_c_tanh ; mfid_c_acos := scriptindex "c_tanh" ; def c_tanh = runscript mfid_c_tanh enddef ; + +newinternal mfid_c_asin ; mfid_c_acos := scriptindex "c_asin" ; def c_asin = runscript mfid_c_asin enddef ; +newinternal mfid_c_acos ; mfid_c_acos := scriptindex "c_acos" ; def c_acos = runscript mfid_c_acos enddef ; +newinternal mfid_c_atan ; mfid_c_acos := scriptindex "c_atan" ; def c_atan = runscript mfid_c_atan enddef ; +newinternal mfid_c_asinh ; mfid_c_acos := scriptindex "c_asinh" ; def c_asinh = runscript mfid_c_asinh enddef ; +newinternal mfid_c_acosh ; mfid_c_acos := scriptindex "c_acosh" ; def c_acosh = runscript mfid_c_acosh enddef ; +newinternal mfid_c_atanh ; mfid_c_acos := scriptindex "c_atanh" ; def c_atanh = runscript mfid_c_atanh enddef ; + +newinternal mfid_c_sqrt ; mfid_c_acos := scriptindex "c_sqrt" ; def c_sqrt = runscript mfid_c_sqrt enddef ; +newinternal mfid_c_abs ; mfid_c_acos := scriptindex "c_abs" ; def c_abs = runscript mfid_c_abs enddef ; +newinternal mfid_c_arg ; mfid_c_acos := scriptindex "c_arg" ; def c_arg = runscript mfid_c_arg enddef ; +newinternal mfid_c_conj ; mfid_c_acos := scriptindex "c_conj" ; def c_conj = runscript mfid_c_conj enddef ; +newinternal mfid_c_exp ; mfid_c_acos := scriptindex "c_exp" ; def c_exp = runscript mfid_c_exp enddef ; +newinternal mfid_c_log ; mfid_c_acos := scriptindex "c_log" ; def c_log = runscript mfid_c_log enddef ; +newinternal mfid_c_proj ; mfid_c_acos := scriptindex "c_proj" ; def c_proj = runscript mfid_c_proj enddef ; + +newinternal mfid_c_erf ; mfid_c_erf := scriptindex "c_erf" ; def c_erf = runscript mfid_c_erf enddef ; +newinternal mfid_c_erfc ; mfid_c_erfc := scriptindex "c_erfc" ; def c_erfc = runscript mfid_c_erfc enddef ; +newinternal mfid_c_erfcx ; mfid_c_erfcx := scriptindex "c_erfcx" ; def c_erfcx = runscript mfid_c_erfcx enddef ; +newinternal mfid_c_erfi ; mfid_c_erfi := scriptindex "c_erfi" ; def c_erfi = runscript mfid_c_erfi enddef ; + +% mfid_c_imag ; mfid_c_acos := scriptindex "c_imag" ; def c_imag = runscript mfid_c_imag enddef ; +% mfid_c_real ; mfid_c_acos := scriptindex "c_real" ; def c_real = runscript mfid_c_real enddef ; +% mfid_c_neg ; mfid_c_neg := scriptindex "c_neg" ; def c_neg = runscript mfid_c_neg enddef ; newinternal mfid_c_pow ; mfid_c_pow := scriptindex "c_pow" ; def c_pow (expr a,b) = runscript mfid_c_pow a b enddef ; % mfid_c_add ; mfid_c_add := scriptindex "c_add" ; def c_add (expr a,b) = runscript mfid_c_add a b enddef ; @@ -125,29 +125,37 @@ vardef c_imag(expr a) = ypart a enddef ; vardef c_real(expr a) = xpart a enddef ; vardef c_neg (expr a) = -a enddef ; -% to be redefined: +if (numbersystem == "scaled") or (numbersystem == "double") : -% vardef sqr primary x = x*x enddef ; -% vardef log primary x = if x=0: 0 else: mlog(x)/mlog(10) fi enddef ; -% vardef ln primary x = if x=0: 0 else: mlog(x)/256 fi enddef ; -% vardef exp primary x = (mexp 256)**x enddef ; -% vardef inv primary x = if x=0: 0 else: x**-1 fi enddef ; + % vardef sqrt primary x = m_sqrt x enddef ; -% vardef tand primary x = sind(x)/cosd(x) enddef ; -% vardef cotd primary x = cosd(x)/sind(x) enddef ; + % vardef sqr primary x = x*x enddef ; + % vardef log primary x = if x=0: 0 else: mlog(x)/mlog(10) fi enddef ; + % vardef ln primary x = if x=0: 0 else: mlog(x)/256 fi enddef ; + % vardef exp primary x = (mexp 256)**x enddef ; + % vardef inv primary x = if x=0: 0 else: x**-1 fi enddef ; -% vardef invsin primary x = (asin(x))/radian enddef ; -% vardef invcos primary x = (acos(x))/radian enddef ; -% vardef invtan primary x = (atan(x))/radian enddef ; + vardef sin primary x = m_sin x enddef ; vardef sinh primary x = m_sinh x enddef ; + vardef cos primary x = m_cos x enddef ; vardef cosh primary x = m_cosh x enddef ; + vardef tan primary x = m_tan x enddef ; vardef tanh primary x = m_tanh x enddef ; + vardef asin primary x = m_asin x enddef ; vardef asinh primary x = m_asinh x enddef ; + vardef acos primary x = m_acos x enddef ; vardef acosh primary x = m_acosh x enddef ; + vardef atan primary x = m_atan x enddef ; vardef atanh primary x = m_atanh x enddef ; -% vardef sin primary x = m_sin x enddef ; vardef sinh primary x = m_sinh x enddef ; -% vardef cos primary x = m_cos x enddef ; vardef cosh primary x = m_cosh x enddef ; -% vardef tan primary x = m_tan x enddef ; vardef tanh primary x = m_tanh x enddef ; -% vardef asin primary x = m_asin x enddef ; vardef asinh primary x = m_asinh x enddef ; -% vardef acos primary x = m_acos x enddef ; vardef acosh primary x = m_acosh x enddef ; -% vardef atan primary x = m_atan x enddef ; vardef atanh primary x = m_atanh x enddef ; + vardef invsin primary x = (m_asin(x))/radian enddef ; + vardef invcos primary x = (m_acos(x))/radian enddef ; + vardef invtan primary x = (m_atan(x))/radian enddef ; -% vardef sind primary x = angle(m_sin x) enddef ; vardef asind primary x = angle(m_asin x) enddef ; -% vardef cosd primary x = angle(m_cos x) enddef ; vardef acosd primary x = angle(m_acos x) enddef ; -% vardef tand primary x = angle(m_tan x) enddef ; vardef atand primary x = angle(m_atan x) enddef ; + % vardef sind primary x = angle(m_sin x) enddef ; + % vardef cosd primary x = angle(m_cos x) enddef ; + % vardef tand primary x = angle(m_tan x) enddef ; + + vardef asind primary x = angle(m_asin x) enddef ; + vardef acosd primary x = angle(m_acos x) enddef ; + vardef atand primary x = angle(m_atan x) enddef ; + + % vardef tand primary x = sind(x)/cosd(x) enddef ; + % vardef cotd primary x = cosd(x)/sind(x) enddef ; + +fi ; diff --git a/metapost/context/base/mpiv/mp-page.mpiv b/metapost/context/base/mpiv/mp-page.mpiv index a996bfd66..18e28d6ca 100644 --- a/metapost/context/base/mpiv/mp-page.mpiv +++ b/metapost/context/base/mpiv/mp-page.mpiv @@ -186,148 +186,6 @@ if unknown PageStateAvailable : PageStateAvailable := false ; fi ; -string CurrentLayout ; CurrentLayout := "default" ; - -% runscript("mp.PaperHeight()") is much faster than lua.mp.PaperHeight() so we use that now: - -vardef PaperHeight = runscript("mp.PaperHeight()") enddef ; -vardef PaperWidth = runscript("mp.PaperWidth()") enddef ; -vardef PrintPaperHeight = runscript("mp.PrintPaperHeight()") enddef ; -vardef PrintPaperWidth = runscript("mp.PrintPaperWidth()") enddef ; -vardef TopSpace = runscript("mp.TopSpace()") enddef ; -vardef BottomSpace = runscript("mp.BottomSpace()") enddef ; -vardef BackSpace = runscript("mp.BackSpace()") enddef ; -vardef CutSpace = runscript("mp.CutSpace()") enddef ; -vardef MakeupHeight = runscript("mp.MakeupHeight()") enddef ; -vardef MakeupWidth = runscript("mp.MakeupWidth()") enddef ; -vardef TopHeight = runscript("mp.TopHeight()") enddef ; -vardef TopDistance = runscript("mp.TopDistance()") enddef ; -vardef HeaderHeight = runscript("mp.HeaderHeight()") enddef ; -vardef HeaderDistance = runscript("mp.HeaderDistance()") enddef ; -vardef TextHeight = runscript("mp.TextHeight()") enddef ; -vardef FooterDistance = runscript("mp.FooterDistance()") enddef ; -vardef FooterHeight = runscript("mp.FooterHeight()") enddef ; -vardef BottomDistance = runscript("mp.BottomDistance()") enddef ; -vardef BottomHeight = runscript("mp.BottomHeight()") enddef ; -vardef LeftEdgeWidth = runscript("mp.LeftEdgeWidth()") enddef ; -vardef LeftEdgeDistance = runscript("mp.LeftEdgeDistance()") enddef ; -vardef LeftMarginWidth = runscript("mp.LeftMarginWidth()") enddef ; -vardef LeftMarginDistance = runscript("mp.LeftMarginDistance()") enddef ; -vardef TextWidth = runscript("mp.TextWidth()") enddef ; -vardef RightMarginDistance = runscript("mp.RightMarginDistance()") enddef ; -vardef RightMarginWidth = runscript("mp.RightMarginWidth()") enddef ; -vardef RightEdgeDistance = runscript("mp.RightEdgeDistance()") enddef ; -vardef RightEdgeWidth = runscript("mp.RightEdgeWidth()") enddef ; -vardef InnerMarginDistance = runscript("mp.InnerMarginDistance()") enddef ; -vardef InnerMarginWidth = runscript("mp.InnerMarginWidth()") enddef ; -vardef OuterMarginDistance = runscript("mp.OuterMarginDistance()") enddef ; -vardef OuterMarginWidth = runscript("mp.OuterMarginWidth()") enddef ; -vardef InnerEdgeDistance = runscript("mp.InnerEdgeDistance()") enddef ; -vardef InnerEdgeWidth = runscript("mp.InnerEdgeWidth()") enddef ; -vardef OuterEdgeDistance = runscript("mp.OuterEdgeDistance()") enddef ; -vardef OuterEdgeWidth = runscript("mp.OuterEdgeWidth()") enddef ; -vardef PageOffset = runscript("mp.PageOffset()") enddef ; -vardef PageDepth = runscript("mp.PageDepth()") enddef ; -vardef LayoutColumns = runscript("mp.LayoutColumns()") enddef ; -vardef LayoutColumnDistance = runscript("mp.LayoutColumnDistance()") enddef ; -vardef LayoutColumnWidth = runscript("mp.LayoutColumnWidth()") enddef ; - -vardef OnRightPage = runscript("mp.OnRightPage()") enddef ; -vardef OnOddPage = runscript("mp.OnOddPage()") enddef ; -vardef InPageBody = runscript("mp.InPageBody()") enddef ; - -vardef RealPageNumber = runscript("mp.RealPageNumber()") enddef ; -vardef LastPageNumber = runscript("mp.LastPageNumber()") enddef ; % duplicates - -vardef PageNumber = runscript("mp.PageNumber()") enddef ; -vardef NOfPages = runscript("mp.NOfPages()") enddef ; - -vardef SubPageNumber = runscript("mp.SubPageNumber()") enddef ; -vardef NOfSubPages = runscript("mp.NOfSubPages()") enddef ; - -vardef CurrentColumn = runscript("mp.CurrentColumn()") enddef ; -vardef NOfColumns = runscript("mp.NOfColumns()") enddef ; - -vardef BaseLineSkip = runscript("mp.BaseLineSkip()") enddef ; -vardef LineHeight = runscript("mp.LineHeight()") enddef ; -vardef BodyFontSize = runscript("mp.BodyFontSize()") enddef ; - -vardef TopSkip = runscript("mp.TopSkip()") enddef ; -vardef StrutHeight = runscript("mp.StrutHeight()") enddef ; -vardef StrutDepth = runscript("mp.StrutDepth()") enddef ; - -vardef CurrentWidth = runscript("mp.CurrentWidth()") enddef ; -vardef CurrentHeight = runscript("mp.CurrentHeight()") enddef ; - -vardef HSize = runscript("mp.HSize()") enddef ; % duplicates -vardef VSize = runscript("mp.VSize()") enddef ; % duplicates - -vardef EmWidth = runscript("mp.EmWidth()") enddef ; -vardef ExHeight = runscript("mp.ExHeight()") enddef ; - -vardef PageFraction = runscript("mp.PageFraction()") enddef ; - -vardef SpineWidth = runscript("mp.SpineWidth()") enddef ; -vardef PaperBleed = runscript("mp.PaperBleed()") enddef ; - -boolean mfun_swapped ; - -def SwapPageState = - mfun_swapped := true ; % eventually this will go ! -enddef ; - -extra_beginfig := extra_beginfig & "mfun_swapped := false ;" ; - -vardef LeftMarginWidth = if mfun_swapped and not OnRightPage : runscript("mp.RightMarginWidth()") else : runscript("mp.LeftMarginWidth()") fi enddef ; -vardef RightMarginWidth = if mfun_swapped and not OnRightPage : runscript("mp.LeftMarginWidth()") else : runscript("mp.RightMarginWidth()") fi enddef ; -vardef LeftMarginDistance = if mfun_swapped and not OnRightPage : runscript("mp.RightMarginDistance()") else : runscript("mp.LeftMarginDistance()") fi enddef ; -vardef RightMarginDistance = if mfun_swapped and not OnRightPage : runscript("mp.LeftMarginDistance()") else : runscript("mp.RightMarginDistance()") fi enddef ; - -vardef LeftEdgeWidth = if mfun_swapped and not OnRightPage : runscript("mp.RightEdgeWidth()") else : runscript("mp.LeftEdgeWidth()") fi enddef ; -vardef RightEdgeWidth = if mfun_swapped and not OnRightPage : runscript("mp.LeftEdgeWidth()") else : runscript("mp.RightEdgeWidth()") fi enddef ; -vardef LeftEdgeDistance = if mfun_swapped and not OnRightPage : runscript("mp.RightEdgeDistance()") else : runscript("mp.LeftEdgeDistance()") fi enddef ; -vardef RightEdgeDistance = if mfun_swapped and not OnRightPage : runscript("mp.LeftEdgeDistance()") else : runscript("mp.RightEdgeDistance()") fi enddef ; - -vardef BackSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi runscript("mp.BackSpace()") enddef ; -vardef CutSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi runscript("mp.CutSpace()") enddef ; - -% better use: - -vardef OuterMarginWidth = if not OnRightPage : runscript("mp.LeftMarginWidth()") else : runscript("mp.RightMarginWidth()") fi enddef ; -vardef InnerMarginWidth = if not OnRightPage : runscript("mp.RightMarginWidth()") else : runscript("mp.LeftMarginWidth()") fi enddef ; -vardef OuterMarginDistance = if not OnRightPage : runscript("mp.LeftMarginDistance()") else : runscript("mp.RightMarginDistance()") fi enddef ; -vardef InnerMarginDistance = if not OnRightPage : runscript("mp.RightMarginDistance()") else : runscript("mp.LeftMarginDistance()") fi enddef ; - -vardef OuterEdgeWidth = if not OnRightPage : runscript("mp.LeftEdgeWidth()") else : runscript("mp.RightEdgeWidth()") fi enddef ; -vardef InnerEdgeWidth = if not OnRightPage : runscript("mp.RightEdgeWidth()") else : runscript("mp.LeftEdgeWidth()") fi enddef ; -vardef OuterEdgeDistance = if not OnRightPage : runscript("mp.LeftEdgeDistance()") else : runscript("mp.RightEdgeDistance()") fi enddef ; -vardef InnerEdgeDistance = if not OnRightPage : runscript("mp.RightEdgeDistance()") else : runscript("mp.LeftEdgeDistance()") fi enddef ; - -vardef OuterSpaceWidth = if not OnRightPage : runscript("mp.BackSpace()") else : runscript("mp.CutSpace()") fi enddef ; -vardef InnerSpaceWidth = if not OnRightPage : runscript("mp.CutSpace()") else : runscript("mp.BackSpace()") fi enddef ; - -% indices - -vardef OuterMargin = if not OnRightPage : LeftMargin else : RightMargin fi enddef ; -vardef InnerMargin = if not OnRightPage : RightMargin else : LeftMargin fi enddef ; - -vardef OuterEdge = if not OnRightPage : LeftEdge else : RightEdge fi enddef ; -vardef InnerEdge = if not OnRightPage : Rightedge else : LeftEdge fi enddef ; - -% vardef CurrentLayout = runscript("mp.CurrentLayout()") enddef ; - -vardef OverlayWidth = runscript("mp.OverlayWidth()") enddef ; -vardef OverlayHeight = runscript("mp.OverlayHeight()") enddef ; -vardef OverlayDepth = runscript("mp.OverlayDepth()") enddef ; -vardef OverlayLineWidth = runscript("mp.OverlayLineWidth()") enddef ; -vardef OverlayOffset = runscript("mp.OverlayOffset()") enddef ; -vardef OverlayRegion = runscript("mp.OverlayRegion()") enddef ; - -vardef defaultcolormodel = runscript("mp.mf_default_color_model()") enddef ; - -% def OverlayLineColor = runscript("mp.OverlayLineColor()") enddef ; -% def OverlayColor = runscript("mp.OverlayColor()") enddef ; - % Next we implement the the page area model. First some constants. LeftEdge := -4 ; Top := -40 ; diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 9387a9475..9af34509b 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2019.07.31 18:05} +\newcontextversion{2019.08.02 19:40} %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 0c0370cd4..83494251a 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2019.07.31 18:05} +\edef\contextversion{2019.08.02 19:40} %D For those who want to use this: diff --git a/tex/context/base/mkii/grph-trf.mkii b/tex/context/base/mkii/grph-trf.mkii index bd9875806..68e53d376 100644 --- a/tex/context/base/mkii/grph-trf.mkii +++ b/tex/context/base/mkii/grph-trf.mkii @@ -554,7 +554,7 @@ %D \stopbuffer %D %D \typebuffer \getbuffer - + %D Mirroring. \def\domirrorbox % \hbox/\vbox/\vtop diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii index 302bc3fa3..da1370aaf 100644 --- a/tex/context/base/mkii/mult-ro.mkii +++ b/tex/context/base/mkii/mult-ro.mkii @@ -637,6 +637,7 @@ \setinterfaceconstant{aligntitle}{alinieretitlu} \setinterfaceconstant{alternative}{alternativ} \setinterfaceconstant{anchor}{anchor} +\setinterfaceconstant{anchoring}{anchoring} \setinterfaceconstant{andtext}{andtext} \setinterfaceconstant{apa}{apa} \setinterfaceconstant{arguments}{arguments} @@ -866,6 +867,7 @@ \setinterfaceconstant{hfil}{hfil} \setinterfaceconstant{hidenumber}{hidenumber} \setinterfaceconstant{hoffset}{hoffset} +\setinterfaceconstant{horizontal}{orizontal} \setinterfaceconstant{horoffset}{offsetoriz} \setinterfaceconstant{hyphen}{hyphen} \setinterfaceconstant{hyphens}{hyphens} @@ -1286,6 +1288,7 @@ \setinterfaceconstant{vcompact}{vcompact} \setinterfaceconstant{vector}{vector} \setinterfaceconstant{veroffset}{veroffset} +\setinterfaceconstant{vertical}{vertical} \setinterfaceconstant{vfactor}{vfactor} \setinterfaceconstant{vfil}{vfil} \setinterfaceconstant{viewerprefix}{viewerprefix} @@ -1296,6 +1299,7 @@ \setinterfaceconstant{white}{alb} \setinterfaceconstant{width}{latime} \setinterfaceconstant{words}{words} +\setinterfaceconstant{xanchor}{xanchor} \setinterfaceconstant{xfactor}{xfactor} \setinterfaceconstant{xhtml}{xhtml} \setinterfaceconstant{xmax}{xmax} @@ -1303,6 +1307,7 @@ \setinterfaceconstant{xoffset}{xoffset} \setinterfaceconstant{xscale}{xscala} \setinterfaceconstant{xstep}{xstep} +\setinterfaceconstant{yanchor}{yanchor} \setinterfaceconstant{yfactor}{yfactor} \setinterfaceconstant{ymax}{ymax} \setinterfaceconstant{yoffset}{yoffset} diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 08abe123a..0665e7235 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{2019.07.31 18:05} +\newcontextversion{2019.08.02 19:40} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 497bfdc08..79f24bda9 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{2019.07.31 18:05} +\edef\contextversion{2019.08.02 19:40} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl index f3373a1f7..128eddc68 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{2019.07.31 18:05} +\edef\contextversion{2019.08.02 19:40} \edef\contextkind {beta} %D Kind of special: @@ -112,8 +112,8 @@ \loadmarkfile{toks-scn} \loadmkxlfile{syst-aux} % LMTX -\loadmarkfile{syst-lua} -\loadmarkfile{syst-con} +\loadmkxlfile{syst-lua} % LMTX +\loadmkxlfile{syst-con} % LMTX \loadmarkfile{syst-fnt} \loadmarkfile{syst-rtp} @@ -245,6 +245,7 @@ \loadmarkfile{sort-ini} \loadmkvifile{pack-mis} +\loadmkxlfile{pack-ori} % LMTX \loadmkxlfile{pack-rul} % LMTX \loadmarkfile{pack-mrl} \loadmkvifile{pack-bck} @@ -330,7 +331,13 @@ %loadmarkfile{page-set} % \usecolumns[old-columnsets] \loadmarkfile{page-cst} \loadmarkfile{page-pcl} % new -\loadmarkfile{pack-lyr} + +\doifelsefileexists {pack-lyr.mkxl} { + \loadmkxlfile{pack-lyr} % LMTX +} { + \loadmkivfile{pack-lyr} +} + \loadmarkfile{pack-pos} \loadmkvifile{page-mak} @@ -458,7 +465,7 @@ \loadmkxlfile{mlib-ctx} % messy order -\loadmarkfile{meta-ini} +\loadmkxlfile{meta-ini} \loadmarkfile{meta-tex} \loadmarkfile{meta-fun} \loadmarkfile{meta-pag} diff --git a/tex/context/base/mkiv/core-con.lua b/tex/context/base/mkiv/core-con.lua index 3829efc9c..3cf1485a1 100644 --- a/tex/context/base/mkiv/core-con.lua +++ b/tex/context/base/mkiv/core-con.lua @@ -313,6 +313,7 @@ end function converters.year () return osdate("%Y") end function converters.month () return osdate("%m") end +function converters.day () return osdate("%d") end function converters.hour () return osdate("%H") end function converters.minute() return osdate("%M") end function converters.second() return osdate("%S") end diff --git a/tex/context/base/mkiv/driv-shp.lua b/tex/context/base/mkiv/driv-shp.lua index 980dda357..b965b6c64 100644 --- a/tex/context/base/mkiv/driv-shp.lua +++ b/tex/context/base/mkiv/driv-shp.lua @@ -70,40 +70,40 @@ local dircodes = nodes.dircodes local dirvalues = nodes.dirvalues local subtypes = nodes.subtypes -local normaldir_code = dircodes.normal - -local lefttoright_code = dirvalues.lefttoright -local righttoleft_code = dirvalues.righttoleft - -local glyph_code = nodecodes.glyph -local kern_code = nodecodes.kern -local glue_code = nodecodes.glue -local hlist_code = nodecodes.hlist -local vlist_code = nodecodes.vlist -local dir_code = nodecodes.dir -local disc_code = nodecodes.disc -local math_code = nodecodes.math -local rule_code = nodecodes.rule -local marginkern_code = nodecodes.marginkern -local whatsit_code = nodecodes.whatsit ------ penalty_code = nodecodes.penalty ------ boundary_code = nodecodes.boundary - -local leaders_code = leadercodes.leaders -local cleaders_code = leadercodes.cleaders -local xleaders_code = leadercodes.xleaders -local gleaders_code = leadercodes.gleaders - -local saveposwhatsit_code = whatsitcodes.savepos -local userdefinedwhatsit_code = whatsitcodes.userdefined -local openwhatsit_code = whatsitcodes.open -local writewhatsit_code = whatsitcodes.write -local closewhatsit_code = whatsitcodes.close -local lateluawhatsit_code = whatsitcodes.latelua -local literalwhatsit_code = whatsitcodes.literal -local setmatrixwhatsit_code = whatsitcodes.setmatrix -local savewhatsit_code = whatsitcodes.save -local restorewhatsit_code = whatsitcodes.restore +local normaldir_code = dircodes.normal + +local lefttoright_code = dirvalues.lefttoright +local righttoleft_code = dirvalues.righttoleft + +local glyph_code = nodecodes.glyph +local kern_code = nodecodes.kern +local glue_code = nodecodes.glue +local hlist_code = nodecodes.hlist +local vlist_code = nodecodes.vlist +local dir_code = nodecodes.dir +local disc_code = nodecodes.disc +local math_code = nodecodes.math +local rule_code = nodecodes.rule +local marginkern_code = nodecodes.marginkern +local whatsit_code = nodecodes.whatsit +----- penalty_code = nodecodes.penalty +----- boundary_code = nodecodes.boundary + +local leaders_code = leadercodes.leaders +local cleaders_code = leadercodes.cleaders +local xleaders_code = leadercodes.xleaders +local gleaders_code = leadercodes.gleaders + +local saveposwhatsit_code = whatsitcodes.savepos +local userdefinedwhatsit_code = whatsitcodes.userdefined +local openwhatsit_code = whatsitcodes.open +local writewhatsit_code = whatsitcodes.write +local closewhatsit_code = whatsitcodes.close +local lateluawhatsit_code = whatsitcodes.latelua +local literalwhatsit_code = whatsitcodes.literal +local setmatrixwhatsit_code = whatsitcodes.setmatrix +local savewhatsit_code = whatsitcodes.save +local restorewhatsit_code = whatsitcodes.restore local getpagedimensions getpagedimensions = function() getpagedimensions = backends.codeinjections.getpagedimensions diff --git a/tex/context/base/mkiv/grph-trf.mkiv b/tex/context/base/mkiv/grph-trf.mkiv index 35e812b3e..0c7ba22f8 100644 --- a/tex/context/base/mkiv/grph-trf.mkiv +++ b/tex/context/base/mkiv/grph-trf.mkiv @@ -924,12 +924,10 @@ \doifelserightpage{\def\p_rotation_rotation{90}}{\def\p_rotation_rotation{270}}} \setvalue{\??rotatepreset\v!default}% - {\edef\p_rotation_rotation{\realnumber{\p_rotation_rotation}}}% get rid of leading zeros and spaces + {} \def\grph_rotate_finish_yes - {\csname\??rotatepreset - \ifcsname\??rotatepreset\p_rotation_rotation\endcsname\p_rotation_rotation\else\v!default\fi - \endcsname + {\begincsname\??rotatepreset\p_rotation_rotation\endcsname \setbox\nextbox\vpack{\box\nextbox}% not really needed \dontcomplain \ifconditional\c_grph_rotate_center diff --git a/tex/context/base/mkiv/lpdf-lmt.lua b/tex/context/base/mkiv/lpdf-lmt.lua index 5d8ad063c..bab3d682b 100644 --- a/tex/context/base/mkiv/lpdf-lmt.lua +++ b/tex/context/base/mkiv/lpdf-lmt.lua @@ -38,7 +38,7 @@ local band, extract = bit32.band, bit32.extract local concat, sortedhash = table.concat, table.sortedhash local setmetatableindex = table.setmetatableindex -local bpfactor = number.dimenfactors.bp +local bpfactor = number.dimenfactors.bp local md5HEX = md5.HEX local osuuid = os.uuid @@ -596,15 +596,15 @@ end local flushliteral do - local nodeproperties = nodes.properties.data - local literalvalues = nodes.literalvalues + local nodeproperties = nodes.properties.data + local literalvalues = nodes.literalvalues - local originliteral_code = literalvalues.origin - local pageliteral_code = literalvalues.page - local alwaysliteral_code = literalvalues.always - local rawliteral_code = literalvalues.raw - local textliteral_code = literalvalues.text - local fontliteral_code = literalvalues.font + local originliteral_code = literalvalues.origin + local pageliteral_code = literalvalues.page + local alwaysliteral_code = literalvalues.always + local rawliteral_code = literalvalues.raw + local textliteral_code = literalvalues.text + local fontliteral_code = literalvalues.font flushliteral = function(current,pos_h,pos_v,mode,str) if mode then @@ -845,16 +845,16 @@ local flushrule, flushsimplerule, flushimage do local setprop = nuts.setprop local getprop = nuts.getprop - local normalrule_code = rulecodes.normal - local boxrule_code = rulecodes.box - local imagerule_code = rulecodes.image - local emptyrule_code = rulecodes.empty - local userrule_code = rulecodes.user - local overrule_code = rulecodes.over - local underrule_code = rulecodes.under - local fractionrule_code = rulecodes.fraction - local radicalrule_code = rulecodes.radical - local outlinerule_code = rulecodes.outline + local normalrule_code = rulecodes.normal + local boxrule_code = rulecodes.box + local imagerule_code = rulecodes.image + local emptyrule_code = rulecodes.empty + local userrule_code = rulecodes.user + local overrule_code = rulecodes.over + local underrule_code = rulecodes.under + local fractionrule_code = rulecodes.fraction + local radicalrule_code = rulecodes.radical + local outlinerule_code = rulecodes.outline local rule_callback = callbacks.functions.process_rule @@ -1016,7 +1016,7 @@ local flushrule, flushsimplerule, flushimage do local img_stream = imagetypes.stream local img_memstream = imagetypes.memstream - local one_bp = 65536 * bpfactor + local one_bp = 65536 * bpfactor local imageresources, n = { }, 0 @@ -1618,13 +1618,13 @@ end local addtocache, flushcache, cache do - local data, d = { }, 0 - local list, l = { }, 0 - local coffset = 0 - local indices = { } + local data, d = { }, 0 + local list, l = { }, 0 + local coffset = 0 + local indices = { } - local maxsize = 32 * 1024 -- uncompressed - local maxcount = 0xFF + local maxsize = 32 * 1024 -- uncompressed + local maxcount = 0xFF addtocache = function(n,str) local size = #str @@ -2197,8 +2197,8 @@ updaters.register("backend.update.pdf",function() local lastindex = 0 local indices = { } - local bpfactor = number.dimenfactors.bp - local imagerule_code = rulecodes.image + local bpfactor = number.dimenfactors.bp + local imagerule_code = rulecodes.image function codeinjections.newimage(specification) return specification diff --git a/tex/context/base/mkiv/math-noa.lua b/tex/context/base/mkiv/math-noa.lua index fda27222e..d8f4f36fd 100644 --- a/tex/context/base/mkiv/math-noa.lua +++ b/tex/context/base/mkiv/math-noa.lua @@ -850,23 +850,33 @@ do return f end --- local function show(where,pointer) --- print("") --- local i = 0 --- for n in nuts.traverse(pointer) do --- i = i + 1 --- print(i,where,nuts.tonode(n)) --- end --- print("") --- end - - local function makelist(middle, noad, f_o,o_next,c_prev,f_c) + local function show(where,pointer) + print("") + local i = 0 + for n in nuts.traverse(pointer) do + i = i + 1 + print(i,where,nuts.tonode(n)) + end + print("") + end + + local function makelist(middle,noad,f_o,o_next,c_prev,f_c) +-- report_fences( +-- "middle %s, noad %s, open %s, opennext %s, closeprev %s, close %s", +-- middle or "?", +-- noad or "?", +-- f_o or "?", +-- o_next or "?", +-- c_prev or "?", +-- f_c or "?" +-- ) local list = new_submlist() setsubtype(noad,innernoad_code) setnucleus(noad,list) setlist(list,f_o) setlink(f_o,o_next) -- prev of list is nil setlink(c_prev,f_c) -- next of list is nil +-- show("list",f_o) if middle and next(middle) then local prev = f_o local current = o_next @@ -890,17 +900,17 @@ do return noad end - -- relinking is not somewhat overdone + -- relinking is now somewhat overdone local function convert_both(open,close,middle) - local o_prev, o_next = getboth(open) + local o_next = getnext(open) if o_next == close then return close else local c_prev, c_next = getboth(close) local f_o = makefence(leftfence_code,open) local f_c = makefence(rightfence_code,close) - makelist(middle, open, f_o,o_next,c_prev,f_c) + makelist(middle,open,f_o,o_next,c_prev,f_c) setnucleus(close) flush_node(close) -- open is now a list @@ -909,12 +919,11 @@ do end end - local function convert_open(open,last,middle) + local function convert_open(open,last,middle) -- last is really last (final case) local f_o = makefence(leftfence_code,open) local f_c = makefence(rightfence_code) - local o_prev, o_next = getboth(open) - local l_prev, l_next = getboth(last) - makelist(middle, open, f_o,o_next,l_prev,f_c) + local o_next = getnext(open) + makelist(middle,open,f_o,o_next,last,nil) -- open is now a list setlink(open,l_next) return open @@ -923,8 +932,8 @@ do local function convert_close(first,close,middle) local f_o = makefence(leftfence_code) local f_c = makefence(rightfence_code,close) - local c_prev, c_next = getboth(close) - local f_prev, f_next = getboth(first) + local c_prev = getprev(close) + local f_next = getnext(first) makelist(middle, close, f_o,f_next,c_prev,f_c) -- close is now a list if c_prev ~= first then @@ -1035,10 +1044,11 @@ do for i=1,s do local open = remove(stack) if trace_fences then - report_fences("%2i: level %i, handling %s, action %s",#stack,"flush","open") + report_fences("%2i: level %i, handling %s, action %s",n,#stack,"flush","open") end last = convert_open(open,last,middle) end +-- show("done",pointer) end end end diff --git a/tex/context/base/mkiv/meta-ini.mkiv b/tex/context/base/mkiv/meta-ini.mkiv index 65811a8ff..88549c34a 100644 --- a/tex/context/base/mkiv/meta-ini.mkiv +++ b/tex/context/base/mkiv/meta-ini.mkiv @@ -579,36 +579,17 @@ \def\meta_prepare_variable_dimension {\expandafter\edef\csname\m_meta_current_variable_template\endcsname{\the\dimexpr\m_meta_current_variable}} -\startmkivmode - - \def\meta_prepare_variable_yes - {\defconvertedcommand\ascii\m_meta_current_variable % otherwise problems - \doifelsecolor \ascii % with 2\bodyfontsize - {\meta_prepare_variable_color} - {\begingroup - \setbox\b_meta_variable_box\hpack{\scratchdimen\m_meta_current_variable sp}% - \ifzeropt\wd\b_meta_variable_box - \endgroup\meta_prepare_variable_number - \else - \endgroup\meta_prepare_variable_dimension - \fi}} - -\stopmkivmode - -\startlmtxmode - - \def\meta_prepare_variable_yes - {\ifchkdim\m_meta_current_variable\or - \meta_prepare_variable_dimension - \else\ifchknum\m_meta_current_variable\or - \meta_prepare_variable_number - \else - \doifelsecolor\m_meta_current_variable - \meta_prepare_variable_color - \meta_prepare_variable_dimension - \fi\fi} - -\stoplmtxmode +\def\meta_prepare_variable_yes + {\defconvertedcommand\ascii\m_meta_current_variable % otherwise problems + \doifelsecolor \ascii % with 2\bodyfontsize + {\meta_prepare_variable_color} + {\begingroup + \setbox\b_meta_variable_box\hpack{\scratchdimen\m_meta_current_variable sp}% + \ifzeropt\wd\b_meta_variable_box + \endgroup\meta_prepare_variable_number + \else + \endgroup\meta_prepare_variable_dimension + \fi}} % \def\meta_prepare_variable_yes % {\expandafter\edef\csname\m_meta_current_variable_template\endcsname diff --git a/tex/context/base/mkiv/meta-ini.mkxl b/tex/context/base/mkiv/meta-ini.mkxl new file mode 100644 index 000000000..4ae748ba8 --- /dev/null +++ b/tex/context/base/mkiv/meta-ini.mkxl @@ -0,0 +1,1457 @@ +%D \module +%D [ file=meta-ini, +%D version=2008.03.25, +%D title=\METAPOST\ Graphics, +%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. + +% initializations: +% +% - pass settings from tex to mp (delayed expansion) +% - used by context core (and modules) +% - cummulative definitions +% - flushed each graphic +% - can be disabled per instance +% - managed at the tex end +% +% extensions: +% +% - add mp functionality (immediate expansion) +% - cummulative +% - all instances or subset of instances +% - can be disabled per instance +% - managed at the lua/mp end +% - could be managed at the tex end but no real reason and also messy +% +% definitions: +% +% - add mp functionality (delayed expansion) +% - cummulative +% - per instance +% - managed at the tex end +% +% inclusions: +% +% - add mp functionality (delayed expansion) +% - cummulative only when [+] +% - per instance +% - managed at the tex end +% +% order of execution: +% +% definitions +% extensions +% inclusions +% beginfig +% initializations +% graphic +% endfig + +% The instance will be implemented stepwise ... I should redo some code in order to +% make the macros look better than they do now. + +\writestatus{loading}{MetaPost Graphics / Initializations} + +\registerctxluafile{meta-ini}{} + +\unprotect + +\newtoks \everyMPgraphic % mp % public or not ? + +\appendtoks + \restoreendofline % see interferences-001.tex +\to \everyMPgraphic + +\def\MPruntimefile {mprun} +\def\currentMPformat {metafun} +\def\defaultMPinstance{metafun} + +\installcorenamespace{mpinstance} +\installcorenamespace{mpinclusions} +\installcorenamespace{mpdefinitions} +\installcorenamespace{mpgraphic} +\installcorenamespace{mpstaticgraphic} +\installcorenamespace{mpclip} + +\newtoks \t_meta_initializations % tex, each +\def \t_meta_inclusions {\csname\??mpinclusions \currentMPinstance\endcsname} % token register +\def \t_meta_definitions {\csname\??mpdefinitions\currentMPinstance\endcsname} % token register + +%D The next command is, of course, dedicated to Mojca, who needs it for gnuplot. +%D Anyway, the whole multiple engine mechanism is to keep her gnuplot from +%D interfering. + +\unexpanded\def\startMPdefinitions + {\dosinglegroupempty\meta_start_definitions} + +\def\meta_start_definitions#1#2\stopMPdefinitions + {\let\m_meta_saved_instance\currentMPinstance + \edef\currentMPinstance{#1}% + \ifx\currentMPinstance\empty + \let\currentMPinstance\defaultMPinstance + \fi + \gtoksapp\t_meta_definitions{#2}% + \let\currentMPinstance\m_meta_saved_instance} + +\let\stopMPdefinitions\relax + +\unexpanded\def\startMPextensions + {\dosinglegroupempty\meta_start_extensions} + +\def\meta_start_extensions#1#2\stopMPextensions % we could use buffers instead + {\clf_setmpextensions{#1}{#2}} + +\let\stopMPextensions\relax + +\unexpanded\def\startMPinitializations#1\stopMPinitializations % for all instances, when enabled + {\gtoksapp\t_meta_initializations{#1}} + +\let\stopMPinitializations\relax + +\unexpanded\def\startMPinclusions + {\dosingleempty\meta_start_inclusions} + +\unexpanded\def\meta_start_inclusions[#1]% + {\edef\m_meta_option{#1}% + \dosinglegroupempty\meta_start_inclusions_indeed} + +\def\meta_start_inclusions_indeed#1#2\stopMPinclusions + {\let\m_meta_saved_instance\currentMPinstance + \edef\currentMPinstance{#1}% + \ifx\currentMPinstance\empty + \let\currentMPinstance\defaultMPinstance + \fi + \ifx\m_meta_option\!!plustoken \else + \global\t_meta_inclusions\emptytoks + \fi + \gtoksapp\t_meta_inclusions{#2}% + \let\currentMPinstance\m_meta_saved_instance} + +\let\stopMPinclusions\relax + +\unexpanded\def\MPinclusions + {\dosingleempty\meta_inclusions} + +\def\meta_inclusions[#1]% + {\edef\m_meta_option{#1}% + \dosinglegroupempty\meta_inclusions_indeed} + +\def\meta_inclusions_indeed#1#2% + {\let\m_meta_saved_instance\currentMPinstance + \edef\currentMPinstance{#1}% + \ifx\currentMPinstance\empty + \let\currentMPinstance\defaultMPinstance + \fi + \ifx\m_meta_option\!!plustoken \else + \global\t_meta_inclusions\emptytoks + \fi + \gtoksapp\t_meta_inclusions{#2}% + \let\currentMPinstance\m_meta_saved_instance} + +\installcommandhandler \??mpinstance {MPinstance} \??mpinstance + +\setupMPinstance + [\s!format=metafun, + \s!extensions=\v!no, + \s!initializations=\v!no, + \c!method=\s!default, + \c!textstyle=, + \c!textcolor=] + +\appendtoks + \ifcsname\??mpdefinitions\currentMPinstance\endcsname \else + \expandafter\newtoks\csname\??mpdefinitions\currentMPinstance\endcsname + \fi + \ifcsname\??mpinclusions\currentMPinstance\endcsname \else + \expandafter\newtoks\csname\??mpinclusions\currentMPinstance\endcsname + \fi + \t_meta_definitions\emptytoks % in case we redefine + \t_meta_inclusions \emptytoks % in case we redefine +\to \everydefineMPinstance + +\unexpanded\def\resetMPinstance[#1]% + {\writestatus\m!metapost{reset will be implemented when needed}} + +\def\meta_analyze_graphicname[#1]% + %{\normalexpanded{\meta_analyze_graphicname_indeed[#1::::]}} + {\normalexpanded{\meta_analyze_graphicname_indeed[#1}::::]} + +\def\meta_show_properties_indeed + {\writestatus{metapost}{name: \currentMPgraphicname, instance: \currentMPinstance, format: \currentMPformat}} + +\let\meta_show_properties\donothing + +\installtextracker + {metapost.properties} + {\let\meta_show_properties\meta_show_properties_indeed} + {\let\meta_show_properties\donothing} + +\unexpanded\def\meta_analyze_graphicname_indeed[#1::#2::#3]% instance :: + {\edef\currentMPgraphicname{#2}% + \ifx\currentMPgraphicname\empty + \edef\currentMPgraphicname{#1}% + \let\currentMPinstance\defaultMPinstance + \orelse\ifcsname\??mpdefinitions#1\endcsname + \edef\currentMPinstance{#1}% + \else + \let\currentMPinstance\defaultMPinstance + \fi + \edef\currentMPformat{\MPinstanceparameter\s!format}% + \meta_show_properties} + +\def\currentMPgraphicname{\s!unknown} +\def\currentMPinstance {\defaultMPinstance} +\def\currentMPformat {\currentMPinstance} + +\defineMPinstance[metafun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes] +\defineMPinstance[minifun] [\s!format=minifun,\s!extensions=\v!yes,\s!initializations=\v!yes] +\defineMPinstance[extrafun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes] +\defineMPinstance[lessfun] [\s!format=metafun] +\defineMPinstance[doublefun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!double] +\defineMPinstance[binaryfun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!binary] +\defineMPinstance[decimalfun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes,\c!method=\s!decimal] + +\defineMPinstance[mprun] [\s!format=metafun,\s!extensions=\v!yes,\s!initializations=\v!yes] + +\defineMPinstance[metapost] [\s!format=mpost] +\defineMPinstance[nofun] [\s!format=mpost] +\defineMPinstance[doublepost] [\s!format=mpost,\c!method=\s!double] +\defineMPinstance[binarypost] [\s!format=mpost,\c!method=\s!binary] +\defineMPinstance[decimalpost][\s!format=mpost,\c!method=\s!decimal] + +%defineMPinstance[megapost] [\s!format=mpost,\c!method=\s!decimal] + +\newconditional\c_meta_include_initializations + +\def\meta_begin_graphic_group#1% + {\begingroup + \meta_analyze_graphicname[#1]} + +\def\meta_end_graphic_group + {\endgroup} + +\def\MPaskedfigure{false} + +\def\meta_flush_current_initializations + {\ifconditional\c_meta_include_initializations + \the\t_meta_initializations + \fi} + +\def\meta_flush_current_inclusions + {\the\t_meta_inclusions} + +\def\meta_flush_current_definitions + {\the\t_meta_definitions} + +\def\meta_start_current_graphic + {\begingroup + \meta_enable_include + \the\everyMPgraphic + \edef\p_initializations{\MPinstanceparameter\s!initializations}% + \ifx\p_initializations\v!yes + \settrue \c_meta_include_initializations + \else + \setfalse\c_meta_include_initializations + \fi + \edef\p_setups{\MPinstanceparameter\c!setups}% + \ifx\p_setups\empty \else + \setups[\p_setups]% + \fi + \useMPinstancestyleparameter\c!textstyle} + +\def\meta_set_current_color + {\useMPinstancecolorparameter\c!textcolor} + +\def\meta_stop_current_graphic + {\global\t_meta_definitions\emptytoks + \global\t_meta_inclusions\emptytoks + \endgroup} + +\def\meta_process_graphic_start + {\pushMPboundingbox + \setbox\b_meta_graphic\hpack\bgroup} + +\def\meta_process_graphic_stop + {\egroup + \meta_place_graphic + \popMPboundingbox} + +\unexpanded\def\meta_process_graphic_instance#1% + {\edef\currentMPinstance{#1}% + \ifx\currentMPinstance\empty + \let\currentMPinstance\defaultMPinstance + \fi + \edef\currentMPformat{\MPinstanceparameter\s!format}% + \meta_process_graphic} + +\unexpanded\def\meta_process_graphic#1% todo: extensions and inclusions outside beginfig + {\meta_start_current_graphic + \forgetall + \edef\p_extensions{\MPinstanceparameter\s!extensions}% + \meta_process_graphic_start + \normalexpanded{\noexpand\clf_mpgraphic + instance {\currentMPinstance}% + format {\currentMPformat}% + data {#1;}% + initializations {\meta_flush_current_initializations}% + \ifx\p_extensions\v!yes + extensions {\clf_getmpextensions{\currentMPinstance}}% goes through tex again + \fi + inclusions {\meta_flush_current_inclusions}% + definitions {\meta_flush_current_definitions}% + figure {\MPaskedfigure}% + method {\MPinstanceparameter\c!method}% + namespace {\??graphicvariable\currentmpvariableclass:}% + \relax}% + \meta_process_graphic_stop + \meta_stop_current_graphic} + +\let\meta_process_graphic_figure_start\relax +\let\meta_process_graphic_figure_stop \relax + +\unexpanded\def\processMPfigurefile#1% special case: obeys beginfig .. endfig and makes pages + {\begingroup + \let\normal_meta_process_graphic_start\meta_process_graphic_start + \let\normal_meta_process_graphic_stop \meta_process_graphic_stop + \let\meta_process_graphic_start\relax + \let\meta_process_graphic_stop \relax + \def\meta_process_graphic_figure_start{\startTEXpage[\c!offset=\v!overlay,\c!align=]\normal_meta_process_graphic_start}% + \def\meta_process_graphic_figure_stop {\normal_meta_process_graphic_stop\stopTEXpage} + \def\MPaskedfigure{all}% + \meta_process_graphic{input "#1" ;}% + \endgroup} + +%D Calling up previously defined graphics. + +% \def\includeMPgraphic#1% gets expanded ! +% {\ifcsname\??mpgraphic#1\endcsname +% \csname\??mpgraphic#1\endcsname ; % ; is safeguard +% \fi} +% +% \unexpanded\def\meta_enable_include % public +% {\let\meta_handle_use_graphic \thirdofthreearguments +% \let\meta_handle_reusable_graphic\thirdofthreearguments} +% +% but ... we want this too: +% +% \startuseMPgraphic{x} +% draw textext("\externalfigure[foo.pdf]") ; +% \stopuseMPgraphic +% +% \useMPgraphic{x} +% +% so we cannot overload unless we let back to the original meanings each graphic +% ... a better solution is: + +\def\includeMPgraphic#1% gets expanded ! + {\ifcsname\??mpgraphic#1\endcsname + \doubleexpandafter\fourthoffourarguments\lastnamedcs ; % ; is safeguard + \fi} + +\let\meta_enable_include\relax + +%D Drawings (stepwise built): + +\newif\ifMPdrawingdone \MPdrawingdonefalse + +\unexpanded\def\finalizeMPdrawing + {\MPdrawingdonetrue} + +\let\MPdrawingdata\empty + +\unexpanded\def\resetMPdrawing + {\glet\MPdrawingdata\empty + \global\MPdrawingdonefalse} + +\unexpanded\def\pushMPdrawing + {\globalpushmacro\MPdrawingdata + \glet\MPdrawingdata\empty} + +\unexpanded\def\popMPdrawing + {\globalpopmacro\MPdrawingdata} + +\unexpanded\def\getMPdrawing + {\ifMPdrawingdone + \expandafter\meta_process_graphic\expandafter{\MPdrawingdata}% is this expansion still needed? + \fi} + +\def\startMPdrawing + {\dosingleempty\meta_start_drawing} + +\def\meta_start_drawing[#1]#2\stopMPdrawing % to be redone, this ascii stuff + {\relax + \bgroup + \meta_enable_include + \doifelse{#1}{-}{\convertargument#2\to\asciia}{\def\asciia{#2}}% + \xdef\MPdrawingdata{\MPdrawingdata\asciia}% + \egroup} + +\let\stopMPdrawing\relax + +\def\MPdrawing#1% + {\relax + \bgroup + \meta_enable_include + \xdef\MPdrawingdata{\MPdrawingdata#1}% + \egroup} + +\unexpanded\def\startMPclip#1#2\stopMPclip % todo: store at the lua end or just store less + {\setgvalue{\??mpclip#1}{#2}} + +\let\stopMPclip\relax + +\unexpanded\def\meta_grab_clip_path#1#2#3% + {\begingroup + \d_overlay_width #2\relax + \d_overlay_height#3\relax + \edef\width {\the\d_overlay_width \space}% + \edef\height{\the\d_overlay_height\space}% + \edef\currentMPclip{#1}% + \ifcsname\??mpclip\currentMPclip\endcsname + \meta_grab_clip_path_yes + \else + \meta_grab_clip_path_nop + \fi + \endgroup} + +\def\meta_grab_clip_path_yes + {\meta_start_current_graphic + \normalexpanded{\noexpand\clf_mpsetclippath + instance {\currentMPinstance}% + format {\currentMPformat}% + data {\csname\??mpclip\currentMPclip\endcsname}% + initializations {\meta_flush_current_initializations}% + useextensions {\MPinstanceparameter\s!extensions}% + inclusions {\meta_flush_current_inclusions}% + method {\MPinstanceparameter\c!method}% + width \d_overlay_width + height \d_overlay_height + \relax}% + \meta_stop_current_graphic} + +\def\meta_grab_clip_path_nop + {\clf_mpsetclippath + width \d_overlay_width + height \d_overlay_height + \relax} + +%D Since we want labels to follow the document settings, we also set the font +%D related variables. + +\unexpanded\def\MPfontsizehskip#1% + {\dontleavehmode + \begingroup + \definedfont[#1]% + \hskip\clf_currentdesignsize\scaledpoint\relax + \endgroup} + +\definefontsynonym[MetafunDefault][Regular*default] + +\startMPinitializations % scale is not yet ok + defaultfont:="\truefontname{MetafunDefault}"; + % defaultscale:=\the\bodyfontsize/10pt; % only when hard coded 10pt + % defaultscale:=1; +\stopMPinitializations + +%D A signal that we're in combined \CONTEXT||\METAFUN mode: + +\startMPextensions + string contextversion;contextversion:="\contextversion"; % expanded +\stopMPextensions + +%D \macros +%D {setupMPvariables} +%D +%D When we build collections of \METAPOST\ graphics, like background and buttons, +%D the need for passing settings arises. By (mis|)|using the local prefix that +%D belongs to \type {\framed}, we get a rather natural interface to backgrounds. To +%D prevent conflicts, we will use the \type {-} in \METAPOST\ specific variables, +%D like: +%D +%D \starttyping +%D \setupMPvariables[meta:button][size=20pt] +%D \stoptyping + +% \lineheight 2pt 2 \scratchcounter red 0.4 .5\bodyfontsize +% +% see cont-loc for test code + +%D Currently the inheritance of backgrounds does not work and we might drop it +%D anyway (too messy) + +\newbox\b_meta_variable_box + +\let \currentmpvariableclass \empty +\let \m_meta_current_variable \empty +\let \m_meta_current_variable_template\empty + +\installcorenamespace{graphicvariable} + +\def\meta_prepare_variable_default{\MPcolor{black}} % just to be sure we use a color but ... + +\unexpanded\def\setupMPvariables + {\dodoubleempty\meta_setup_variables} + +\def\meta_setup_variables[#1][#2]% + {\ifsecondargument + \getrawparameters[\??graphicvariable#1:][#2]% + \else + \getrawparameters[\??graphicvariable:][#1]% + \fi} + +\unexpanded\def\presetMPvariable + {\dodoubleargument\meta_preset_variable} + +\def\meta_preset_variable[#1][#2=#3]% + {\ifcsname\??graphicvariable#1:#2\endcsname \else + \setvalue{\??graphicvariable#1:#2}{#3}% + \fi} + +\def\MPrawvar#1#2% no checking + {\begincsname\??graphicvariable#1:#2\endcsname} + +\def\MPvariable#1% todo: could be a framed chain + {\begincsname\??graphicvariable\currentmpvariableclass:#1\endcsname} + +\unexpanded\def\useMPvariables + {\dodoubleargument\meta_use_variables} + +\def\meta_use_variables[#1][#2]% + {\edef\currentmpvariableclass{#1}% + \meta_prepare_variables{#2}} + +\unexpanded\def\meta_prepare_variables#1% + {\processcommalist[#1]\meta_prepare_variable} + +\unexpanded\def\meta_prepare_variable#1% + {\edef\m_meta_current_variable_template + {\??graphicvariable\currentmpvariableclass:#1}% + \edef\m_meta_current_variable + {\begincsname\m_meta_current_variable_template\endcsname}% + \ifx\m_meta_current_variable\empty + \expandafter\meta_prepare_variable_nop + \else + \expandafter\meta_prepare_variable_yes + \fi} + +\unexpanded\def\meta_prepare_instance_variables + {\expandafter\processcommalist\expandafter[\m_meta_instance_variables]\meta_prepare_instance_variable} + +\unexpanded\def\meta_prepare_instance_variable#1% + {\edef\m_meta_current_variable_template + {\??graphicvariable\currentmpvariableclass:#1}% + \edef\m_meta_current_variable + {\ifcsname\m_meta_current_variable_template\endcsname + \lastnamedcs + \else + \begincsname\??graphicvariable\currentMPgraphicname:#1\endcsname + \fi}% + \ifx\m_meta_current_variable\empty + \expandafter\meta_prepare_variable_nop + \else + \expandafter\meta_prepare_variable_yes + \fi} + +\def\meta_prepare_variable_nop + {\expandafter \let\csname\m_meta_current_variable_template\endcsname\meta_prepare_variable_default} + +\def\meta_prepare_variable_color % we use the attribute so we dont' go through namedcolor (why not) + {\expandafter\edef\csname\m_meta_current_variable_template\endcsname{\MPcolor\m_meta_current_variable}} + +\def\meta_prepare_variable_number + {\expandafter\edef\csname\m_meta_current_variable_template\endcsname{\number\m_meta_current_variable}}% also accepts 0.number + +\def\meta_prepare_variable_dimension + {\expandafter\edef\csname\m_meta_current_variable_template\endcsname{\the\dimexpr\m_meta_current_variable}} + +\def\meta_prepare_variable_yes + {\ifchkdim\m_meta_current_variable\or + \meta_prepare_variable_dimension + \else\ifchknum\m_meta_current_variable\or + \meta_prepare_variable_number + \else + \doifelsecolor\m_meta_current_variable + \meta_prepare_variable_color + \meta_prepare_variable_dimension + \fi\fi} + +\let\MPvar \MPvariable +\let\setMPvariables\setupMPvariables + +%D \macros +%D {startuniqueMPgraphic, uniqueMPgraphic} +%D +%D This macros is probably of most use to myself, since I like to use graphics that +%D adapt themselves. The next \METAPOST\ kind of graphic is both unique and reused +%D when possible. +%D +%D \starttyping +%D \defineoverlay[example][\uniqueMPgraphic{test}] +%D +%D \startuniqueMPgraphic {test} +%D draw unitsquare xscaled \overlaywidth yscaled \overlayheight ; +%D \stopuniqueMPgraphic +%D \stoptyping + +\def\overlaystamp % watch the \MPcolor, since colors can be redefined + {\the\d_overlay_width :% + \the\d_overlay_height :% + \the\d_overlay_depth :% + \the\d_overlay_offset :% + \the\d_overlay_linewidth:% + \MPcolor\overlaycolor :% % todo, expand once \m_overlaycolor + \MPcolor\overlaylinecolor} % todo, expand once \m_overlaylinecolor + +%D A better approach is to let additional variables play a role in determining the +%D uniqueness. In the next macro, the second, optional, argument is used to +%D guarantee the uniqueness, as well as prepare variables for passing them to +%D \METAPOST. +%D +%D \starttyping +%D \startuniqueMPgraphic{meta:hash}{gap,angle,...} +%D \stoptyping +%D +%D The calling macro also accepts a second argument. For convenient use in overlay +%D definitions, we use \type {{}} instead of \type {[]}. +%D +%D \starttyping +%D \uniqueMPgraphic{meta:hash}{gap=10pt,angle=30} +%D \stoptyping + +\newcount\c_meta_object_counter +\newbox \b_meta_graphic + +% hm, isn't this already done elsewhere? + +\unexpanded\def\meta_obey_box_depth + {\setbox\b_meta_graphic\hpack\bgroup + \raise\MPlly\box\b_meta_graphic + \egroup} + +\unexpanded\def\meta_ignore_box_depth + {\normalexpanded + {\meta_obey_box_depth % hence the \unexpanded + \wd\b_meta_graphic\the\wd\b_meta_graphic + \ht\b_meta_graphic\the\ht\b_meta_graphic + \dp\b_meta_graphic\the\dp\b_meta_graphic}} + +\unexpanded\def\meta_obey_box_origin + {\setbox\b_meta_graphic\hpack\bgroup + \kern\MPllx\raise\MPlly\box\b_meta_graphic + \egroup} + +\unexpanded\def\obeyMPboxdepth {\let\meta_relocate_box\meta_obey_box_depth} +\unexpanded\def\ignoreMPboxdepth{\let\meta_relocate_box\meta_ignore_box_depth} +\unexpanded\def\obeyMPboxorigin {\let\meta_relocate_box\meta_obey_box_origin} +\unexpanded\def\normalMPboxdepth{\let\meta_relocate_box\relax} + +\let\meta_relocate_box\relax + +\unexpanded\def\meta_place_graphic % the converter also displaces so in fact we revert + {\meta_relocate_box + \box\b_meta_graphic} + +\unexpanded\def\meta_reuse_box#1#2#3#4#5% space delimiting would save some tokens + {\MPllx#2\MPlly#3\MPurx#4\MPury#5% + \hpack{\forcecolorhack\getobject{MP}{#1}}} % else no proper color intent + +\unexpanded\def\meta_use_box + {\setunreferencedobject{MP}} + +\def\meta_handle_unique_graphic#1#2#3% when there are too many, we can store data at the lua end, although, + {\begingroup % when there are that many they're probably not that unique anyway + \edef\currentmpvariableclass{#1}% + \extendMPoverlaystamp{#2}% incl prepare + \ifcsname\??mpgraphic\overlaystamp:#1\endcsname + \lastnamedcs + \else + \meta_enable_include % redundant + \global\advance\c_meta_object_counter\plusone + \meta_use_box{\number\c_meta_object_counter}\hpack{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox + \setxvalue{\??mpgraphic\overlaystamp:#1}{\meta_reuse_box{\number\c_meta_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}% + \csname\??mpgraphic\overlaystamp:#1\endcsname\empty + \fi + \endgroup} + +\unexpanded\def\startuniqueMPgraphic + {\dodoublegroupempty\meta_start_unique_graphic} + +\def\meta_start_unique_graphic#1% + {\normalexpanded{\meta_start_unique_graphic_indeed{#1}}} + +\unexpanded\def\meta_start_unique_graphic_indeed#1#2#3\stopuniqueMPgraphic + {\setgvalue{\??mpgraphic#1}{\meta_handle_unique_graphic{#1}{#2}{#3}}} + +\let\stopuniqueMPgraphic\relax + +\unexpanded\def\uniqueMPgraphic + {\dodoublegroupempty\meta_unique_graphic} + +\def\meta_unique_graphic#1#2% + {\meta_begin_graphic_group{#1}% + \setupMPvariables[#1][#2]% + \csname\??mpgraphic#1\endcsname\empty + \meta_end_graphic_group} + +\def\meta_handle_use_graphic#1#2#3% + {\begingroup + \edef\currentmpvariableclass{#1}% + \edef\m_meta_instance_variables{#2}% + \ifx\m_meta_instance_variables\empty \else + \meta_prepare_instance_variables + \fi + \meta_enable_include % redundant + \meta_process_graphic{#3}% + \endgroup} + +\unexpanded\def\startuseMPgraphic + {\dodoublegroupempty\meta_start_use_graphic} + +\def\meta_start_use_graphic#1% + {\normalexpanded{\meta_start_use_graphic_indeed{#1}}} + +\unexpanded\def\meta_start_use_graphic_indeed#1#2#3\stopuseMPgraphic + {\setgvalue{\??mpgraphic#1}{\meta_handle_use_graphic{#1}{#2}{#3}}} + +\let\stopuseMPgraphic\relax + +\unexpanded\def\startusableMPgraphic % redundant but handy + {\dodoublegroupempty\meta_start_usable_graphic} + + +\def\meta_start_usable_graphic#1% + {\normalexpanded{\meta_start_usable_graphic_indeed{#1}}} + +\unexpanded\def\meta_start_usable_graphic_indeed#1#2#3\stopusableMPgraphic + {\setgvalue{\??mpgraphic#1}{\meta_handle_use_graphic{#1}{#2}{#3}}} + +\let\stopusableMPgraphic\relax + +\def\meta_handle_reusable_graphic#1#2#3% + {\begingroup + \edef\currentmpvariableclass{#1}% + \edef\m_meta_instance_variables{#2}% + \ifx\m_meta_instance_variables\empty \else + \meta_prepare_instance_variables + \fi + \meta_enable_include % redundant + \global\advance\c_meta_object_counter\plusone + \meta_use_box{\number\c_meta_object_counter}\hpack{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox + \setxvalue{\??mpgraphic#1}{\meta_reuse_box{\number\c_meta_object_counter}{\the\MPllx}{\the\MPlly}{\the\MPurx}{\the\MPury}}% + \csname\??mpgraphic#1\endcsname\empty + \endgroup} + +\unexpanded\def\startreusableMPgraphic + {\dodoublegroupempty\meta_start_reusable_graphic} + +\def\meta_start_reusable_graphic#1% + {\normalexpanded{\meta_start_reusable_graphic_indeed{#1}}} + +\unexpanded\def\meta_start_reusable_graphic_indeed#1#2#3\stopreusableMPgraphic + {\setgvalue{\??mpgraphic#1}{\meta_handle_reusable_graphic{#1}{#2}{#3}}} + +\let\stopreusableMPgraphic\relax + +\unexpanded\def\useMPgraphic + {\dodoublegroupempty\meta_use_graphic} + +\def\meta_use_graphic#1#2% + {\meta_begin_graphic_group{#1}% + \ifcsname\??mpgraphic#1\endcsname + \edef\usedMPgraphicname{#1}% + \else\ifcsname\??mpgraphic\currentMPgraphicname\endcsname + \let\usedMPgraphicname\currentMPgraphicname + \else + \let\usedMPgraphicname\empty + \fi\fi + \ifx\usedMPgraphicname\empty + % message + \else + \doifsomething{#2}{\setupMPvariables[\usedMPgraphicname][#2]}% + \csname\??mpgraphic\usedMPgraphicname\endcsname + \fi + \meta_end_graphic_group} + +\let\reuseMPgraphic \useMPgraphic % we can save a setup here if needed +\let\reusableMPgraphic\reuseMPgraphic % we can save a setup here if needed + +%D \macros +%D {startuniqueMPpagegraphic,uniqueMPpagegraphic} +%D +%D Experimental. + +\def\m_meta_page_prefix{\doifelseoddpage oe} + +\def\overlaypagestamp + {\m_meta_page_prefix :% + \the\d_overlay_width :% + \the\d_overlay_height :% + \the\d_overlay_depth :% + \the\d_overlay_offset :% + \the\d_overlay_linewidth:% + \MPcolor\overlaycolor :% + \MPcolor\overlaylinecolor} + +\unexpanded\def\startuniqueMPpagegraphic + {\dodoublegroupempty\meta_start_unique_page_graphic} + +\def\meta_start_unique_page_graphic#1% + {\normalexpanded{\meta_start_unique_page_graphic_indeed{#1}}} + +\unexpanded\def\meta_start_unique_page_graphic_indeed#1#2#3\stopuniqueMPpagegraphic % inefficient, double storage + {\setgvalue{\??mpgraphic o:#1}{\meta_handle_unique_graphic{o:#1}{#2}{#3}}% % but these also keep the state + \setgvalue{\??mpgraphic e:#1}{\meta_handle_unique_graphic{e:#1}{#2}{#3}}} % and meaning will be redefined + +\let\stopuniqueMPpagegraphic\relax + +\unexpanded\def\uniqueMPpagegraphic + {\dodoublegroupempty\meta_unique_page_graphic} + +\def\meta_unique_page_graphic#1#2% + {\meta_begin_graphic_group{#1}% + \let\overlaystamp\overlaypagestamp + \setupMPvariables[\m_meta_page_prefix:#1][#2]% prefix is new here + \csname\??mpgraphic\m_meta_page_prefix:#1\endcsname\empty + \meta_end_graphic_group} + +%D One way of defining a stamp is: +%D +%D \starttyping +%D \def\extendMPoverlaystamp#1% +%D {\def\docommand##1% +%D {\edef\overlaystamp{\overlaystamp:\MPvariable{##1}}}% +%D \processcommalist[#1]\docommand} +%D \stoptyping +%D +%D Since we need to feed \METAPOST\ with expanded dimensions, we introduce a +%D dedicated expansion engine. We redefine \type {\extendMPoverlaystamp} to + +\unexpanded\def\extendMPoverlaystamp#1% + {\processcommalist[#1]\meta_extend_overlay_stamp} + +\def\meta_extend_overlay_stamp#1% + {\meta_prepare_instance_variable{#1}% + \edef\overlaystamp{\overlaystamp:\MPvariable{#1}}} + +\unexpanded\def\getMPdata {\clf_getMPdata} + \let\rawMPdata \clf_getMPdata + +\unexpanded\def\getMPstored{\clf_getMPstored} + \let\rawMPstored \clf_getMPstored + +%D We need this trick because we need to make sure that the tex scanner sees +%D newlines and does not quit. Also, we do need to flush the buffer under a normal +%D catcode regime in order to expand embedded tex macros. As usual with buffers, +%D \type {#1} can be a list. + +\unexpanded\def\processMPbuffer + {\dosingleempty\meta_process_buffer} + +\def\meta_process_buffer[#1]% + {\meta_begin_graphic_group{#1}% + \meta_process_graphic{\clf_feedback{\currentMPgraphicname}}% + \meta_end_graphic_group} + +\unexpanded\def\runMPbuffer + {\dosingleempty\meta_run_buffer} + +\def\meta_run_buffer[#1]% processing only + {\startnointerference\meta_process_buffer[#1]\stopnointerference} + +%D \macros +%D {startMPenvironment, resetMPenvironment} +%D +%D In order to synchronize the main \TEX\ run and the runs local to \METAPOST, +%D environments can be passed. + +\unexpanded\def\startMPenvironment + {\begingroup + \catcode\endoflineasciicode \ignorecatcode + \dosingleempty\meta_start_environment} + +\def\meta_start_environment[#1]#2\stopMPenvironment + {\endgroup + \edef\m_meta_option{#1} + \ifx\m_meta_option\s!reset + \resetMPenvironment % reset mp toks + \orelse\ifx\m_meta_option\v!global + #2% % use in main doc too + \orelse\ifx\m_meta_option\!!plustoken + #2% % use in main doc too + \fi + \clf_mptexset{\detokenize{#2}}} + +\let\stopMPenvironment\relax + +\unexpanded\def\resetMPenvironment + {\clf_mptexreset} + +\unexpanded\def\useMPenvironmentbuffer[#1]% + {\clf_mptexsetfrombuffer{#1}} + +%D This command takes \type {[reset]} as optional argument. +%D +%D \starttyping +%D \startMPenvironment +%D \setupbodyfont[pos,14.4pt] +%D \stopMPenvironment +%D +%D \startMPcode +%D draw btex \sl Hans Hagen etex scaled 5 ; +%D \stopMPcode +%D \stoptyping +%D +%D The most simple case: + +\unexpanded\def\startMPcode + {\dosinglegroupempty\meta_start_code} + +\def\meta_start_code + {\iffirstargument + \expandafter\meta_start_code_instance + \else + \expandafter\meta_start_code_standard + \fi} + +\def\meta_start_code_instance#1#2\stopMPcode + {\begingroup + \edef\currentMPinstance{#1}% + \let\currentMPgraphicname\empty + \edef\currentMPformat{\MPinstanceparameter\s!format}% + \meta_enable_include + \meta_process_graphic{#2}% + \endgroup} + +\def\meta_start_code_standard#1#2\stopMPcode + {\begingroup + \let\currentMPinstance\defaultMPinstance + \let\currentMPgraphicname\empty + \edef\currentMPformat{\MPinstanceparameter\s!format}% + \meta_process_graphic{#2}% + \endgroup} + +\let\stopMPcode\relax + +\unexpanded\def\MPcode + {\dodoublegroupempty\meta_code} + +\def\meta_code + {\ifsecondargument + \expandafter\meta_code_instance + \else + \expandafter\meta_code_standard + \fi} + +\def\meta_code_instance#1#2% + {\meta_begin_graphic_group{#1}% + \meta_enable_include + \meta_process_graphic{#2}% + \meta_end_graphic_group} + +\def\meta_code_standard#1#2% + {\let\currentMPinstance\defaultMPinstance + \meta_enable_include + \meta_process_graphic{#1}} + +% a bit nasty (also needed for compatibility: + +% \startMPrun input mp-www.mp ; \stopMPrun +% \externalfigure[mprun.3][width=10cm,height=8cm] + +% \startMPrun{mprun} input mp-www.mp ; \stopMPrun % instance +% \externalfigure[mprun.4][width=10cm,height=8cm] + +\let\MPruninstance\defaultMPinstance + +\unexpanded\def\useMPrun#1#2% name n + {\begingroup + \def\MPaskedfigure{#2}% + \doifelsenothing{#1} + {\useMPgraphic{mprun}}% + {\useMPgraphic{#1}}% + \endgroup} + +\unexpanded\def\startMPrun + {\dosinglegroupempty\meta_start_run} + +\def\meta_start_run#1#2\stopMPrun + {\iffirstargument + \startuseMPgraphic{#1}#2\stopuseMPgraphic + \else + \startuseMPgraphic{mprun}#2\stopuseMPgraphic + \fi} + +\let\stopMPrun\relax + +%D The \type {\resetMPenvironment} is a quick way to erase +%D the token list. +%D +%D You should be aware of independencies. For instance, if you use a font +%D in a graphic that is not used in the main document, you need to load the +%D typescript at the outer level (either directly or by using the global +%D option). +%D +%D \starttyping +%D \usetypescript[palatino][texnansi] +%D +%D \startMPenvironment +%D \usetypescript[palatino][texnansi] +%D \enableregime[utf] +%D \setupbodyfont[palatino] +%D \stopMPenvironment +%D +%D \startMPpage +%D draw btex aap‒noot coördinatie – één etex ; +%D \stopMPpage +%D \stoptyping + +%D Loading specific \METAPOST\ related definitions is +%D accomplished by: + +\unexpanded\def\useMPlibrary[#1]{\clf_useMPlibrary{#1}} + +%D \macros +%D {setMPtext, MPtext, MPstring, MPbetex} +%D +%D To be documented: +%D +%D \starttyping +%D \setMPtext{identifier}{text} +%D +%D \MPtext {identifier} +%D \MPstring{identifier} +%D \MPbetex {identifier} +%D \stoptyping + +\installcorenamespace{mptext} + +\unexpanded\def\setMPtext#1#2% todo : #1 must be made : safe + {\defconvertedargument\ascii{#2}% + \dodoglobal\letvalue{\??mptext#1}\ascii} + +\def\MPtext #1{\begincsname\??mptext#1\endcsname\empty} +\def\MPstring#1{"\begincsname\??mptext#1\endcsname\empty"} +\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. + +% \setupcolors[state=stop,conversion=never] % quite tricky ... type mismatch + +% \startMPextensions +% color OverlayColor,OverlayLineColor; +% \stopMPextensions + +\startMPinitializations + CurrentLayout:="\currentlayout"; +\stopMPinitializations + +% \startMPinitializations +% OverlayWidth:=\overlaywidth; +% OverlayHeight:=\overlayheight; +% OverlayDepth:=\overlaydepth; +% OverlayLineWidth:=\overlaylinewidth; +% OverlayOffset:=\overlayoffset; +% \stopMPinitializations + +%D A dirty trick, ** in colo-ini.lua (mpcolor). We cannot use a vardef, because +%D that fails with spot colors. + +\startMPinitializations + def OverlayLineColor=\ifx\overlaylinecolor\empty black \else\MPcolor{\overlaylinecolor} \fi enddef; + def OverlayColor =\ifx\overlaycolor \empty black \else\MPcolor{\overlaycolor} \fi enddef; +\stopMPinitializations + +% \newcount\c_overlay_colormodel +% \newcount\c_overlay_color +% \newcount\c_overlay_transparency +% \newcount\c_overlay_linecolor +% \newcount\c_overlay_linetransparency + +% \appendtoks +% \c_overlay_colormodel \attribute\colormodelattribute +% \c_overlay_color \colo_helpers_inherited_current_ca\overlaycolor +% \c_overlay_transparency \colo_helpers_inherited_current_ta\overlaycolor +% \c_overlay_linecolor \colo_helpers_inherited_current_ca\overlaylinecolor +% \c_overlay_linetransparency\colo_helpers_inherited_current_ta\overlaylinecolor +% \to \everyMPgraphic + +% \startMPinitializations +% BaseLineSkip:=\the\baselineskip; +% LineHeight:=\the\baselineskip; +% BodyFontSize:=\the\bodyfontsize; +% % +% TopSkip:=\the\topskip; +% StrutHeight:=\strutheight; +% StrutDepth:=\strutdepth; +% % +% CurrentWidth:=\the\hsize; +% CurrentHeight:=\the\vsize; +% HSize:=\the\hsize ; +% VSize:=\the\vsize ; +% % +% EmWidth:=\the\emwidth; +% ExHeight:=\the\exheight; +% \stopMPinitializations + +\appendtoks + \disablediscretionaries + %\disablecompoundcharacters +\to \everyMPgraphic + +% \appendtoks % before color, inefficient, replace by low level copy +% \doregistercolor{currentcolor}\currentcolorname +% \to \everyMPgraphic + +% \color[green]{abc \startMPcode +% fill fullcircle scaled 3cm withoutcolor; +% fill fullcircle scaled 2cm withcolor \MPcolor{currentcolor} ; +% fill fullcircle scaled 1cm withcolor \MPcolor{red} ; +% \stopMPcode def} + +\appendtoks + \baselineskip1\baselineskip + \lineheight 1\lineheight + \topskip 1\topskip +\to \everyMPgraphic + +\appendtoks + \let \# \letterhash + \let \_ \letterunderscore + \let \& \letterampersand + \let \{ \letteropenbrace + \let \} \letterclosebrace +\to \everyMPgraphic + +%D \macros +%D {PDFMPformoffset} +%D +%D In \PDF, forms are clipped and therefore we have to take precautions to get this +%D right. Since this is related to objects, we use the same offset as used there. + +\def\PDFMPformoffset{\objectoffset} + +\newtoks\everyinsertMPfile + +\startMPextensions + def initialize_form_numbers = + do_initialize_numbers; + enddef; +\stopMPextensions + +\startMPextensions + vardef ForegroundBox = + unitsquare xysized(HSize,VSize) + enddef ; +\stopMPextensions + +% \startMPextensions +% PageFraction := 1 ; +% \stopMPextensions + +% \startMPinitializations +% PageFraction := if \lastpage>1: (\realfolio-1)/(\lastpage-1) else: 1 fi ; +% \stopMPinitializations + +\startMPdefinitions {metapost} + if unknown context_bare : input mp-bare.mpiv ; fi ; +\stopMPdefinitions +\startMPdefinitions {binarypost} + if unknown context_bare : input mp-bare.mpiv ; fi ; +\stopMPdefinitions +\startMPdefinitions {decimalpost} + if unknown context_bare : input mp-bare.mpiv ; fi ; +\stopMPdefinitions +\startMPdefinitions {doublepost} + if unknown context_bare : input mp-bare.mpiv ; fi ; +\stopMPdefinitions + +% \startMPdefinitions {nofun} +% if unknown context_bare : input mp-bare.mpiv ; fi ; +% \stopMPdefinitions + +%D And some more. These are not really needed since we don't use the normal figure +%D inclusion macros any longer. + +\appendtoks + \externalfigurepostprocessors\emptytoks % safeguard +\to \everyinsertMPfile + +%D We also take care of disabling fancy figure features, that can terribly interfere +%D when dealing with symbols, background graphics and running (postponed) graphics. +%D You won't believe me if I tell you what funny side effects can occur. One took me +%D over a day to uncover when processing the screen version of the \METAFUN\ manual. + +\def\doifelseMPgraphic#1% + {\ifcsname\??mpgraphic #1\endcsname\expandafter\firstoftwoarguments \orelse + \ifcsname\??mpgraphic o:#1\endcsname\expandafter\firstoftwoarguments \orelse + \ifcsname\??mpgraphic e:#1\endcsname\expandafter\firstoftwoarguments \else + \expandafter\secondoftwoarguments\fi} + +\let\doifMPgraphicelse\doifelseMPgraphic + +%D New: + +\definelayerpreset % no dx,dy - else nasty non-mp placement + [mp] + [\c!y=-\MPury, + \c!x=\MPllx, + \c!method=\v!fit] + +\definelayer + [mp] + [\c!preset=mp] + +%D Usage: +%D +%D \starttyping +%D \defineviewerlayer[one][state=start] +%D \defineviewerlayer[two][state=stop] +%D +%D \startuseMPgraphic{step-1} +%D fill fullcircle scaled 10cm withcolor red ; +%D \stopuseMPgraphic +%D +%D \startuseMPgraphic{step-2} +%D fill fullcircle scaled 5cm withcolor green ; +%D \stopuseMPgraphic +%D +%D \setlayer[mp]{\viewerlayer[one]{\useMPgraphic{step-1}}} +%D \setlayer[mp]{\viewerlayer[two]{\useMPgraphic{step-2}}} +%D +%D \ruledhbox{\flushlayer[mp]} +%D \stoptyping +%D +%D Reusing graphics is also possible (now): +%D +%D \starttyping +%D \startreusableMPgraphic{axis} +%D tickstep := 1cm ; ticklength := 2mm ; +%D drawticks unitsquare xscaled 4cm yscaled 3cm shifted (-1cm,-1cm) ; +%D tickstep := tickstep/2 ; ticklength := ticklength/2 ; +%D drawticks unitsquare xscaled 4cm yscaled 3cm shifted (-1cm,-1cm) ; +%D \stopreusableMPgraphic +%D +%D \startuseMPgraphic{demo} +%D drawpoint "1cm,1.5cm" ; +%D \stopuseMPgraphic +%D +%D \definelayer[mp][preset=mp] +%D \setlayer[mp]{\reuseMPgraphic{axis}} +%D \setlayer[mp]{\useMPgraphic{demo}} +%D \ruledhbox{\flushlayer[mp]} +%D \stoptyping + +%D \macros +%D {startstaticMPfigure,useMPstaticfigure} +%D +%D Static figures are processed only when there has been something changed. Here is +%D Aditya Mahajan's testcase: +%D +%D \startbuffer +%D \startstaticMPfigure{circle} +%D fill fullcircle scaled 1cm withcolor blue; +%D \stopstaticMPfigure +%D +%D \startstaticMPfigure{axis} +%D drawarrow (0,0)--(2cm,0) ; +%D drawarrow (0,0)--(0,2cm) ; +%D label.llft(textext("(0,0)") ,origin) ; +%D \stopstaticMPfigure +%D \stopbuffer +%D +%D \typebuffer \getbuffer + +\unexpanded\def\startstaticMPfigure#1#2\stopstaticMPfigure + {\startreusableMPgraphic{\??mpstaticgraphic#1}#2\stopreusableMPgraphic} + +\unexpanded\def\startstaticMPgraphic + {\dodoublegroupempty\meta_start_static_graphic} + +\def\meta_start_static_graphic#1#2#3\stopstaticMPgraphic + {\startreusableMPgraphic{\??mpstaticgraphic#1}{#2}#3\stopreusableMPgraphic} + +\let\stopstaticMPfigure \relax +\let\stopstaticMPgraphic\relax + +\unexpanded\def\usestaticMPfigure + {\dodoubleempty\meta_use_static_figure} + +\def\meta_use_static_figure[#1][#2]% + {\ifsecondargument + \scale[#2]{\reuseMPgraphic{\??mpstaticgraphic#1}}% + \else + \reuseMPgraphic{\??mpstaticgraphic#1}% + \fi} + +%D Goody for preventing overflows: + +\def\MPdivten[#1]{\withoutpt\the\dimexpr#1pt/10\relax} + +%D There is no way to distinguish the black color that you get when you issue a +%D \type {draw} without color specification from a color that has an explicit black +%D specification unless you set the variable \type {defaultcolormodel} to 1. +%D Hoewever, in that case you cannot distinguish that draw from one with a \type +%D {withoutcolor} specification. This means that we have to provide multiple +%D variants of inheritance. +%D +%D In any case we need to tell the converter what the inherited color is to start +%D with. Case~3 is kind of unpredictable as it closely relates to the order in which +%D paths are flushed. If you want to inherit automatically from the surrounding, you +%D can best stick to variant 1. Variant 0 (an isolated graphic) is the default. +%D +%D \startbuffer +%D \startuseMPgraphic{test} +%D drawoptions(withpen pencircle scaled 1pt) ; +%D def shift_cp = currentpicture := currentpicture shifted (-15pt,0) ; enddef ; +%D draw fullcircle scaled 10pt withoutcolor ; shift_cp ; +%D fill fullcircle scaled 10pt ; shift_cp ; +%D draw fullcircle scaled 10pt withoutcolor ; shift_cp ; +%D fill fullcircle scaled 10pt withcolor red ; shift_cp ; +%D draw fullcircle scaled 10pt withoutcolor ; shift_cp ; +%D fill fullcircle scaled 10pt ; shift_cp ; +%D \stopuseMPgraphic +%D +%D \starttabulate +%D \NC 0\quad \NC \MPcolormethod0 \green XX\quad \useMPgraphic{test}\quad XX \NC \NR +%D \NC 1\quad \NC \MPcolormethod1 \green XX\quad \useMPgraphic{test}\quad XX \NC \NR +%D \NC 2\quad \NC \MPcolormethod2 \green XX\quad \useMPgraphic{test}\quad XX \NC \NR +%D \NC 3\quad \NC \MPcolormethod3 \green XX\quad \useMPgraphic{test}\quad XX \NC \NR +%D \stoptabulate +%D \stopbuffer +%D +%D \typebuffer \getbuffer + +\newconstant\MPcolormethod + +\appendtoks + \clf_mpsetoutercolor + \MPcolormethod\space + \attribute\colormodelattribute\space + \attribute\colorattribute\space + \dogetattribute{transparency}\relax +\to \everyMPgraphic + +% \startMPinitializations +% defaultcolormodel := \ifcase\MPcolormethod1\or1\or3\else3\fi; +% \stopMPinitializations + +%D macros +%D {mprunvar,mpruntab,mprunset} +%D +%D \starttyping +%D \startMPcode +%D passvariable("version","1.0") ; +%D passvariable("number",123) ; +%D passvariable("string","whatever") ; +%D passvariable("point",(1.5,2.8)) ; +%D passvariable("triplet",(1/1,1/2,1/3)) ; +%D passvariable("quad",(1.1,2.2,3.3,4.4)) ; +%D passvariable("boolean",false) ; +%D passvariable("path",fullcircle scaled 1cm) ; +%D draw fullcircle scaled 20pt ; +%D \stopMPcode +%D +%D \ctxlua{inspect(metapost.variables)} +%D +%D \MPrunvar{version} \MPruntab{quad}{3} (\MPrunset{triplet}{,}) +%D +%D $(x,y) = (\MPruntab{point}{1},\MPruntab{point}{2})$ +%D $(x,y) = (\MPrunset{point}{,})$ +%D \stoptyping + +\def\MPrunvar #1{\clf_mprunvar{#1}} \let\mprunvar\MPrunvar +\def\MPruntab#1#2{\clf_mpruntab{#1}#2\relax} \let\mpruntab\MPruntab % #2 is number +\def\MPrunset#1#2{\clf_mprunset{#1}{#2}} \let\mprunset\MPrunset + +\prependtoks \clf_mppushvariables \to \everybeforepagebody +\appendtoks \clf_mppopvariables \to \everyafterpagebody + +\let\MPpushvariables\clf_mppushvariables +\let\MPpopvariables \clf_mppopvariables + +%D We also provide an outputless run: + +\unexpanded\def\startMPcalculation + {\begingroup + \setbox\nextbox\hpack\bgroup + \dosinglegroupempty\meta_start_calculation} + +\def\meta_start_calculation + {\iffirstargument + \expandafter\meta_start_calculation_instance + \else + \expandafter\meta_start_calculation_standard + \fi} + +\def\meta_start_calculation_instance#1#2\stopMPcalculation + {\edef\currentMPinstance{#1}% + \let\currentMPgraphicname\empty + \edef\currentMPformat{\MPinstanceparameter\s!format}% + \meta_enable_include + \meta_process_graphic{#2;draw origin}% + \egroup + \endgroup} + +\def\meta_start_calculation_standard#1#2\stopMPcalculation + {\let\currentMPinstance\defaultMPinstance + \let\currentMPgraphicname\empty + \edef\currentMPformat{\MPinstanceparameter\s!format}% + \meta_process_graphic{#2;draw origin}% + \egroup + \endgroup} + +\let\stopMPcalculation\relax + +%D \macros +%D {setupMPgraphics} +%D +%D Here is a generic setup command: + +\installcorenamespace{MPgraphics} + +\installsetuponlycommandhandler \??MPgraphics {MPgraphics} + +%D Here we hook in the outer color. When \type {color} is set to \type {global} we +%D get the outer color automatically. If you change this setting, you should do it +%D grouped in order not to make other graphics behave in unexpected ways. + +\appendtoks + \doifelse{\directMPgraphicsparameter\c!color}\v!global{\MPcolormethod\plusone}{\MPcolormethod\zerocount}% +\to \everysetupMPgraphics + +\setupMPgraphics + [\c!color=\v!local] + +%D This can save some runtime: rename the mpy file from a first run (when stable) to +%D another file and reuse it. One can also use the original filename, but a copy is +%D often better. +%D +%D \starttyping +%D \setupMPgraphics +%D [mpy=\jobname.mpy] +%D \stoptyping + +\appendtoks + \edef\p_mpy{\directMPgraphicsparameter{mpy}}% + \ifx\p_mpy\empty \else + \let\MPdataMPYfile\p_mpy + \clf_registermpyfile{\p_mpy}% + \fi +\to \everysetupMPgraphics + +%D Some more helpers (see \type {meta-grd.mkiv} for an example of usage): + +\def\MPdpar#1#2{\the\dimexpr#1#2\relax\empty} +\def\MPnpar#1#2{\the\numexpr#1#2\relax\empty} +\def\MPspar#1#2{"#1#2"} + +%D Done. + +\protect \endinput diff --git a/tex/context/base/mkiv/mlib-int.lua b/tex/context/base/mkiv/mlib-int.lua index 63e7278da..6fca95302 100644 --- a/tex/context/base/mkiv/mlib-int.lua +++ b/tex/context/base/mkiv/mlib-int.lua @@ -6,150 +6,261 @@ if not modules then modules = { } end modules ['mlib-int'] = { license = "see context related readme files", } -local factor = number.dimenfactors.bp ------ mpprint = mp.print -local mpnumeric = mp.numeric -local mpboolean = mp.boolean -local mpstring = mp.string -local mpquoted = mp.quoted -local getdimen = tex.getdimen -local getcount = tex.getcount -local getmacro = tokens.getters.macro -local get = tex.get -local mpcolor = attributes.colors.mpcolor -local emwidths = fonts.hashes.emwidths -local exheights = fonts.hashes.exheights - -local mpgetdimen = mp.getdimen - -function mp.PaperHeight () mpnumeric(getdimen("paperheight") *factor) end -function mp.PaperWidth () mpnumeric(getdimen("paperwidth") *factor) end -function mp.PrintPaperHeight () mpnumeric(getdimen("printpaperheight") *factor) end -function mp.PrintPaperWidth () mpnumeric(getdimen("printpaperwidth") *factor) end -function mp.TopSpace () mpnumeric(getdimen("topspace") *factor) end -function mp.BottomSpace () mpnumeric(getdimen("bottomspace") *factor) end -function mp.BackSpace () mpnumeric(getdimen("backspace") *factor) end -function mp.CutSpace () mpnumeric(getdimen("cutspace") *factor) end -function mp.MakeupHeight () mpnumeric(getdimen("makeupheight") *factor) end -function mp.MakeupWidth () mpnumeric(getdimen("makeupwidth") *factor) end -function mp.TopHeight () mpnumeric(getdimen("topheight") *factor) end -function mp.TopDistance () mpnumeric(getdimen("topdistance") *factor) end -function mp.HeaderHeight () mpnumeric(getdimen("headerheight") *factor) end -function mp.HeaderDistance () mpnumeric(getdimen("headerdistance") *factor) end -function mp.TextHeight () mpnumeric(getdimen("textheight") *factor) end -function mp.FooterDistance () mpnumeric(getdimen("footerdistance") *factor) end -function mp.FooterHeight () mpnumeric(getdimen("footerheight") *factor) end -function mp.BottomDistance () mpnumeric(getdimen("bottomdistance") *factor) end -function mp.BottomHeight () mpnumeric(getdimen("bottomheight") *factor) end -function mp.LeftEdgeWidth () mpnumeric(getdimen("leftedgewidth") *factor) end -function mp.LeftEdgeDistance () mpnumeric(getdimen("leftedgedistance") *factor) end -function mp.LeftMarginWidth () mpnumeric(getdimen("leftmarginwidth") *factor) end -function mp.LeftMarginDistance () mpnumeric(getdimen("leftmargindistance") *factor) end -function mp.TextWidth () mpnumeric(getdimen("textwidth") *factor) end -function mp.RightMarginDistance () mpnumeric(getdimen("rightmargindistance") *factor) end -function mp.RightMarginWidth () mpnumeric(getdimen("rightmarginwidth") *factor) end -function mp.RightEdgeDistance () mpnumeric(getdimen("rightedgedistance") *factor) end -function mp.RightEdgeWidth () mpnumeric(getdimen("rightedgewidth") *factor) end -function mp.InnerMarginDistance () mpnumeric(getdimen("innermargindistance") *factor) end -function mp.InnerMarginWidth () mpnumeric(getdimen("innermarginwidth") *factor) end -function mp.OuterMarginDistance () mpnumeric(getdimen("outermargindistance") *factor) end -function mp.OuterMarginWidth () mpnumeric(getdimen("outermarginwidth") *factor) end -function mp.InnerEdgeDistance () mpnumeric(getdimen("inneredgedistance") *factor) end -function mp.InnerEdgeWidth () mpnumeric(getdimen("inneredgewidth") *factor) end -function mp.OuterEdgeDistance () mpnumeric(getdimen("outeredgedistance") *factor) end -function mp.OuterEdgeWidth () mpnumeric(getdimen("outeredgewidth") *factor) end -function mp.PageOffset () mpnumeric(getdimen("pagebackgroundoffset")*factor) end -function mp.PageDepth () mpnumeric(getdimen("pagebackgrounddepth") *factor) end -function mp.LayoutColumns () mpnumeric(getcount("layoutcolumns")) end -function mp.LayoutColumnDistance() mpnumeric(getdimen("layoutcolumndistance")*factor) end -function mp.LayoutColumnWidth () mpnumeric(getdimen("layoutcolumnwidth") *factor) end -function mp.SpineWidth () mpnumeric(getdimen("spinewidth") *factor) end -function mp.PaperBleed () mpnumeric(getdimen("paperbleed") *factor) end - -function mp.RealPageNumber () mpnumeric(getcount("realpageno")) end -function mp.LastPageNumber () mpnumeric(getcount("lastpageno")) end - -function mp.PageNumber () mpnumeric(getcount("pageno")) end -function mp.NOfPages () mpnumeric(getcount("lastpageno")) end - -function mp.SubPageNumber () mpnumeric(getcount("subpageno")) end -function mp.NOfSubPages () mpnumeric(getcount("lastsubpageno")) end - -function mp.CurrentColumn () mpnumeric(getcount("mofcolumns")) end -function mp.NOfColumns () mpnumeric(getcount("nofcolumns")) end - -function mp.BaseLineSkip () mpnumeric(get ("baselineskip",true) *factor) end -function mp.LineHeight () mpnumeric(getdimen("lineheight") *factor) end -function mp.BodyFontSize () mpnumeric(getdimen("bodyfontsize") *factor) end - -function mp.TopSkip () mpnumeric(get ("topskip",true) *factor) end -function mp.StrutHeight () mpnumeric(getdimen("strutht") *factor) end -function mp.StrutDepth () mpnumeric(getdimen("strutdp") *factor) end - -function mp.PageNumber () mpnumeric(getcount("pageno")) end -function mp.RealPageNumber () mpnumeric(getcount("realpageno")) end -function mp.NOfPages () mpnumeric(getcount("lastpageno")) end - -function mp.CurrentWidth () mpnumeric(get ("hsize") *factor) end -function mp.CurrentHeight () mpnumeric(get ("vsize") *factor) end - -function mp.EmWidth () mpnumeric(emwidths [false]*factor) end -function mp.ExHeight () mpnumeric(exheights[false]*factor) end - -mp.HSize = mp.CurrentWidth -mp.VSize = mp.CurrentHeight -mp.LastPageNumber = mp.NOfPages - -function mp.PageFraction() - local lastpage = getcount("lastpageno") - if lastpage > 1 then - mpnumeric((getcount("realpageno")-1)/(lastpage-1)) - else - mpnumeric(1) - end +local factor = number.dimenfactors.bp +----- mpprint = mp.print +local mpnumeric = mp.numeric +local mpboolean = mp.boolean +local mpstring = mp.string +local mpquoted = mp.quoted +local getdimen = tex.getdimen +local getcount = tex.getcount +local getmacro = tokens.getters.macro +local get = tex.get +local mpcolor = attributes.colors.mpcolor +local emwidths = fonts.hashes.emwidths +local exheights = fonts.hashes.exheights + +local mpgetdimen = mp.getdimen + +local registerscript = metapost.registerscript + +local on_right_page = structures.pages.on_right +local is_odd_page = structures.pages.is_odd +local in_body_page = structures.pages.in_body +local page_fraction = structures.pages.fraction + +local function defaultcolormodel() -- can be helper + local colormethod = getcount("MPcolormethod") + return (colormethod == 0 or colormethod == 1) and 1 or 3 end --- locals +if CONTEXTLMTXMODE > 0 then -local on_right = structures.pages.on_right -local is_odd = structures.pages.is_odd -local in_body = structures.pages.in_body + local t = os.date("*t") -- maybe this should be a very early on global -mp.OnRightPage = function() mpboolean(on_right()) end -- needs checking -mp.OnOddPage = function() mpboolean(is_odd ()) end -- needs checking -mp.InPageBody = function() mpboolean(in_body ()) end -- needs checking + registerscript("year", function() return t.year end) + registerscript("month", function() return t.month end) + registerscript("day", function() return t.day end) + registerscript("hour", function() return t.hour end) + registerscript("minute", function() return t.min end) + registerscript("second", function() return t.sec end) --- mp.CurrentLayout : \currentlayout + registerscript("PaperHeight", function() return getdimen("paperheight") * factor end) + registerscript("PaperWidth", function() return getdimen("paperwidth") * factor end) + registerscript("PrintPaperHeight", function() return getdimen("printpaperheight") * factor end) + registerscript("PrintPaperWidth", function() return getdimen("printpaperwidth") * factor end) + registerscript("TopSpace", function() return getdimen("topspace") * factor end) + registerscript("BottomSpace", function() return getdimen("bottomspace") * factor end) + registerscript("BackSpace", function() return getdimen("backspace") * factor end) + registerscript("CutSpace", function() return getdimen("cutspace") * factor end) + registerscript("MakeupHeight", function() return getdimen("makeupheight") * factor end) + registerscript("MakeupWidth", function() return getdimen("makeupwidth") * factor end) + registerscript("TopHeight", function() return getdimen("topheight") * factor end) + registerscript("TopDistance", function() return getdimen("topdistance") * factor end) + registerscript("HeaderHeight", function() return getdimen("headerheight") * factor end) + registerscript("HeaderDistance", function() return getdimen("headerdistance") * factor end) + registerscript("TextHeight", function() return getdimen("textheight") * factor end) + registerscript("FooterDistance", function() return getdimen("footerdistance") * factor end) + registerscript("FooterHeight", function() return getdimen("footerheight") * factor end) + registerscript("BottomDistance", function() return getdimen("bottomdistance") * factor end) + registerscript("BottomHeight", function() return getdimen("bottomheight") * factor end) + registerscript("LeftEdgeWidth", function() return getdimen("leftedgewidth") * factor end) + registerscript("LeftEdgeDistance", function() return getdimen("leftedgedistance") * factor end) + registerscript("LeftMarginWidth", function() return getdimen("leftmarginwidth") * factor end) + registerscript("LeftMarginDistance", function() return getdimen("leftmargindistance") * factor end) + registerscript("TextWidth", function() return getdimen("textwidth") * factor end) + registerscript("RightMarginDistance", function() return getdimen("rightmargindistance") * factor end) + registerscript("RightMarginWidth", function() return getdimen("rightmarginwidth") * factor end) + registerscript("RightEdgeDistance", function() return getdimen("rightedgedistance") * factor end) + registerscript("RightEdgeWidth", function() return getdimen("rightedgewidth") * factor end) + registerscript("InnerMarginDistance", function() return getdimen("innermargindistance") * factor end) + registerscript("InnerMarginWidth", function() return getdimen("innermarginwidth") * factor end) + registerscript("OuterMarginDistance", function() return getdimen("outermargindistance") * factor end) + registerscript("OuterMarginWidth", function() return getdimen("outermarginwidth") * factor end) + registerscript("InnerEdgeDistance", function() return getdimen("inneredgedistance") * factor end) + registerscript("InnerEdgeWidth", function() return getdimen("inneredgewidth") * factor end) + registerscript("OuterEdgeDistance", function() return getdimen("outeredgedistance") * factor end) + registerscript("OuterEdgeWidth", function() return getdimen("outeredgewidth") * factor end) + registerscript("PageOffset", function() return getdimen("pagebackgroundoffset") * factor end) + registerscript("PageDepth", function() return getdimen("pagebackgrounddepth") * factor end) + registerscript("LayoutColumns", function() return getcount("layoutcolumns") end) + registerscript("LayoutColumnDistance", function() return getdimen("layoutcolumndistance") * factor end) + registerscript("LayoutColumnWidth", function() return getdimen("layoutcolumnwidth") * factor end) + registerscript("SpineWidth", function() return getdimen("spinewidth") * factor end) + registerscript("PaperBleed", function() return getdimen("paperbleed") * factor end) -function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end -function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end -function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end -function mp.OverlayLineWidth() mpnumeric(getdimen("d_overlay_linewidth") * factor) end -function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end -function mp.OverlayRegion () mpstring(getmacro("m_overlay_region")) end + registerscript("RealPageNumber", function() return getcount("realpageno") end) + registerscript("LastPageNumber", function() return getcount("lastpageno") end) + + registerscript("PageNumber", function() return getcount("pageno") end) + registerscript("NOfPages", function() return getcount("lastpageno") end) + + registerscript("SubPageNumber", function() return getcount("subpageno") end) + registerscript("NOfSubPages", function() return getcount("lastsubpageno") end) + + registerscript("CurrentColumn", function() return getcount("mofcolumns") end) + registerscript("NOfColumns", function() return getcount("nofcolumns") end) + + registerscript("BaseLineSkip", function() return get ("baselineskip",true) * factor end) + registerscript("LineHeight", function() return getdimen("lineheight") * factor end) + registerscript("BodyFontSize", function() return getdimen("bodyfontsize") * factor end) + + registerscript("TopSkip", function() return get ("topskip",true) * factor end) + registerscript("StrutHeight", function() return getdimen("strutht") * factor end) + registerscript("StrutDepth", function() return getdimen("strutdp") * factor end) + + registerscript("PageNumber", function() return getcount("pageno") end) + registerscript("RealPageNumber", function() return getcount("realpageno") end) + registerscript("NOfPages", function() return getcount("lastpageno") end) + + registerscript("CurrentWidth", function() return get ("hsize") * factor end) + registerscript("CurrentHeight", function() return get ("vsize") * factor end) + + registerscript("EmWidth", function() return emwidths [false] * factor end) + registerscript("ExHeight", function() return exheights[false] * factor end) + + registerscript("HSize", function() return get ("hsize") * factor end) + registerscript("VSize", function() return get ("vsize") * factor end) + registerscript("LastPageNumber", function() return getcount("lastpageno") end) + + registerscript("OverlayWidth", function() return getdimen("d_overlay_width") * factor end) + registerscript("OverlayHeight", function() return getdimen("d_overlay_height") * factor end) + registerscript("OverlayDepth", function() return getdimen("d_overlay_depth") * factor end) + registerscript("OverlayLineWidth", function() return getdimen("d_overlay_linewidth") * factor end) + registerscript("OverlayOffset", function() return getdimen("d_overlay_offset") * factor end) + registerscript("OverlayRegion", function() mpstring(getmacro("m_overlay_region")) end) + -- ("CurrentLayout", function() mpstring(getmacro("currentlayout")) end) + + registerscript("PageFraction", page_fraction) + registerscript("OnRightPage", on_right_page) + registerscript("OnOddPage", is_odd_page ) + registerscript("InPageBody", in_body_page ) + + registerscript("defaultcolormodel", defaultcolormodel) + +else + + function mp.PaperHeight () mpnumeric(getdimen("paperheight") * factor) end + function mp.PaperWidth () mpnumeric(getdimen("paperwidth") * factor) end + function mp.PrintPaperHeight () mpnumeric(getdimen("printpaperheight") * factor) end + function mp.PrintPaperWidth () mpnumeric(getdimen("printpaperwidth") * factor) end + function mp.TopSpace () mpnumeric(getdimen("topspace") * factor) end + function mp.BottomSpace () mpnumeric(getdimen("bottomspace") * factor) end + function mp.BackSpace () mpnumeric(getdimen("backspace") * factor) end + function mp.CutSpace () mpnumeric(getdimen("cutspace") * factor) end + function mp.MakeupHeight () mpnumeric(getdimen("makeupheight") * factor) end + function mp.MakeupWidth () mpnumeric(getdimen("makeupwidth") * factor) end + function mp.TopHeight () mpnumeric(getdimen("topheight") * factor) end + function mp.TopDistance () mpnumeric(getdimen("topdistance") * factor) end + function mp.HeaderHeight () mpnumeric(getdimen("headerheight") * factor) end + function mp.HeaderDistance () mpnumeric(getdimen("headerdistance") * factor) end + function mp.TextHeight () mpnumeric(getdimen("textheight") * factor) end + function mp.FooterDistance () mpnumeric(getdimen("footerdistance") * factor) end + function mp.FooterHeight () mpnumeric(getdimen("footerheight") * factor) end + function mp.BottomDistance () mpnumeric(getdimen("bottomdistance") * factor) end + function mp.BottomHeight () mpnumeric(getdimen("bottomheight") * factor) end + function mp.LeftEdgeWidth () mpnumeric(getdimen("leftedgewidth") * factor) end + function mp.LeftEdgeDistance () mpnumeric(getdimen("leftedgedistance") * factor) end + function mp.LeftMarginWidth () mpnumeric(getdimen("leftmarginwidth") * factor) end + function mp.LeftMarginDistance () mpnumeric(getdimen("leftmargindistance") * factor) end + function mp.TextWidth () mpnumeric(getdimen("textwidth") * factor) end + function mp.RightMarginDistance () mpnumeric(getdimen("rightmargindistance") * factor) end + function mp.RightMarginWidth () mpnumeric(getdimen("rightmarginwidth") * factor) end + function mp.RightEdgeDistance () mpnumeric(getdimen("rightedgedistance") * factor) end + function mp.RightEdgeWidth () mpnumeric(getdimen("rightedgewidth") * factor) end + function mp.InnerMarginDistance () mpnumeric(getdimen("innermargindistance") * factor) end + function mp.InnerMarginWidth () mpnumeric(getdimen("innermarginwidth") * factor) end + function mp.OuterMarginDistance () mpnumeric(getdimen("outermargindistance") * factor) end + function mp.OuterMarginWidth () mpnumeric(getdimen("outermarginwidth") * factor) end + function mp.InnerEdgeDistance () mpnumeric(getdimen("inneredgedistance") * factor) end + function mp.InnerEdgeWidth () mpnumeric(getdimen("inneredgewidth") * factor) end + function mp.OuterEdgeDistance () mpnumeric(getdimen("outeredgedistance") * factor) end + function mp.OuterEdgeWidth () mpnumeric(getdimen("outeredgewidth") * factor) end + function mp.PageOffset () mpnumeric(getdimen("pagebackgroundoffset") * factor) end + function mp.PageDepth () mpnumeric(getdimen("pagebackgrounddepth") * factor) end + function mp.LayoutColumns () mpnumeric(getcount("layoutcolumns")) end + function mp.LayoutColumnDistance() mpnumeric(getdimen("layoutcolumndistance") * factor) end + function mp.LayoutColumnWidth () mpnumeric(getdimen("layoutcolumnwidth") * factor) end + function mp.SpineWidth () mpnumeric(getdimen("spinewidth") * factor) end + function mp.PaperBleed () mpnumeric(getdimen("paperbleed") * factor) end + + function mp.RealPageNumber () mpnumeric(getcount("realpageno") ) end + function mp.LastPageNumber () mpnumeric(getcount("lastpageno") ) end + + function mp.PageNumber () mpnumeric(getcount("pageno") ) end + function mp.NOfPages () mpnumeric(getcount("lastpageno") ) end + + function mp.SubPageNumber () mpnumeric(getcount("subpageno") ) end + function mp.NOfSubPages () mpnumeric(getcount("lastsubpageno") ) end + + function mp.CurrentColumn () mpnumeric(getcount("mofcolumns") ) end + function mp.NOfColumns () mpnumeric(getcount("nofcolumns") ) end + + function mp.BaseLineSkip () mpnumeric(get ("baselineskip",true) * factor) end + function mp.LineHeight () mpnumeric(getdimen("lineheight") * factor) end + function mp.BodyFontSize () mpnumeric(getdimen("bodyfontsize") * factor) end + + function mp.TopSkip () mpnumeric(get ("topskip",true) * factor) end + function mp.StrutHeight () mpnumeric(getdimen("strutht") * factor) end + function mp.StrutDepth () mpnumeric(getdimen("strutdp") * factor) end + + function mp.PageNumber () mpnumeric(getcount("pageno") ) end + function mp.RealPageNumber () mpnumeric(getcount("realpageno") ) end + function mp.NOfPages () mpnumeric(getcount("lastpageno") ) end + + function mp.CurrentWidth () mpnumeric(get ("hsize") * factor) end + function mp.CurrentHeight () mpnumeric(get ("vsize") * factor) end + + function mp.EmWidth () mpnumeric(emwidths [false] * factor) end + function mp.ExHeight () mpnumeric(exheights[false] * factor) end + + function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end + function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end + function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end + function mp.OverlayLineWidth () mpnumeric(getdimen("d_overlay_linewidth") * factor) end + function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end + function mp.OverlayRegion () mpstring (getmacro("m_overlay_region") ) end + + function mp.PageFraction () mpnumeric(page_fraction() ) end + function mp.OnRightPage () mpboolean(on_right_page() ) end + function mp.OnOddPage () mpboolean(is_odd_page () ) end + function mp.InPageBody () mpboolean(in_body_page () ) end + + function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end + function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end + function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end + function mp.OverlayLineWidth () mpnumeric(getdimen("d_overlay_linewidth") * factor) end + function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end + function mp.OverlayRegion () mpstring (getmacro("m_overlay_region") ) end + -- mp.CurrentLayout () mpstring (getmacro("currentlayout")) end + + function mp.defaultcolormodel () mpnumeric(defaultcolormodel()) end + + mp.HSize = mp.CurrentWidth + mp.VSize = mp.CurrentHeight + mp.LastPageNumber = mp.NOfPages + + -- not much difference (10000 calls in a graphic neither as expansion seems to win + -- over defining the macro etc) so let's not waste counters then + + -- function mp.OverlayColor() + -- local c = mpcolor( + -- getcount("c_overlay_colormodel"), + -- getcount("c_overlay_color"), + -- getcount("c_overlay_transparency") + -- ) + -- mpquoted(c) + -- end + -- + -- function mp.OverlayLineColor() + -- local c = mpcolor( + -- getcount("c_overlay_colormodel"), + -- getcount("c_overlay_linecolor"), + -- getcount("c_overlay_linetransparency") + -- ) + -- mpquoted(c) + -- end -function mp.mf_default_color_model() - local colormethod = getcount("MPcolormethod") - return mpnumeric((colormethod == 0 or colormethod == 1) and 1 or 3) end --- not much difference (10000 calls in a graphic neither as expansion seems to win --- over defining the macro etc) so let's not waste counters then - --- function mp.OverlayColor() --- local c = mpcolor( --- getcount("c_overlay_colormodel"), --- getcount("c_overlay_color"), --- getcount("c_overlay_transparency") --- ) --- mpquoted(c) --- end --- --- function mp.OverlayLineColor() --- local c = mpcolor( --- getcount("c_overlay_colormodel"), --- getcount("c_overlay_linecolor"), --- getcount("c_overlay_linetransparency") --- ) --- mpquoted(c) --- end + diff --git a/tex/context/base/mkiv/mlib-pdf.mkiv b/tex/context/base/mkiv/mlib-pdf.mkiv index 6dc73a153..e47df4a99 100644 --- a/tex/context/base/mkiv/mlib-pdf.mkiv +++ b/tex/context/base/mkiv/mlib-pdf.mkiv @@ -88,16 +88,6 @@ \wd\MPbox\MPwidth \ht\MPbox\MPheight} -% \unexpanded\def\MPtextext#1#2#3#4#5% beware: we use a different method now (see mlib-pps) -% {\begingroup -% \setbox\MPbox\hbox{\font\temp=#1\space at #2\onebasepoint \let\c\char \temp #3}% text -% \MPllx-#4\onebasepoint -% \MPlly-#5\onebasepoint -% \repositionMPbox -% \smashbox\MPbox -% \box\MPbox -% \endgroup} - % MPLIB specific: \def\MPLIBtoPDF{\clf_mpflushliteral} % expanded @@ -146,30 +136,6 @@ \unexpanded\def\directMPgraphic {\dodoublegroupempty\mlib_direct_graphic} -% \def\mlib_direct_graphic#1#2% makes pages (todo: make boxes) -% {\meta_begin_graphic_group{#1}% -% \let\startMPLIBtoPDF\directstartMPLIBtoPDF -% \let\stopMPLIBtoPDF \directstopMPLIBtoPDF -% \meta_start_current_graphic -% \forgetall -% \edef\p_extensions{\MPinstanceparameter\s!extensions}% -% \normalexpanded{\noexpand\ctxlua{metapost.graphic { -% instance = "\currentMPinstance", -% format = "\currentMPformat", -% data = \!!bs#2;\!!es, -% initializations = \!!bs\meta_flush_current_initializations\!!es, -% % useextensions = "\MPinstanceparameter\s!extensions", -% \ifx\p_extensions\v!yes -% extensions = \!!bs\clf_getmpextensions{\currentMPinstance}\!!es, -% \fi -% inclusions = \!!bs\meta_flush_current_inclusions\!!es, -% definitions = \!!bs\meta_flush_current_definitions\!!es, -% figure = "all", -% method = "\MPinstanceparameter\c!method", -% }}}% -% \meta_stop_current_graphic -% \meta_end_graphic_group} - \def\mlib_direct_graphic#1#2% makes pages (todo: make boxes) {\meta_begin_graphic_group{#1}% \let\startMPLIBtoPDF\directstartMPLIBtoPDF diff --git a/tex/context/base/mkiv/mlib-scn.lua b/tex/context/base/mkiv/mlib-scn.lua index 4045173ac..d73e210c3 100644 --- a/tex/context/base/mkiv/mlib-scn.lua +++ b/tex/context/base/mkiv/mlib-scn.lua @@ -71,21 +71,21 @@ local mpvalue = mp.value local report = logs.reporter("metapost") -local semicolon_code = codes.semicolon -local equals_code = codes.equals -local comma_code = codes.comma -local colon_code = codes.colon -local leftbrace_code = codes.leftbrace -local rightbrace_code = codes.rightbrace -local leftbracket_code = codes.leftbracket -local rightbracket_code = codes.rightbracket -local leftdelimiter_code = codes.leftdelimiter -local rightdelimiter_code = codes.rightdelimiter -local numeric_code = codes.numeric -local string_code = codes.string -local capsule_code = codes.capsule -local nullary_code = codes.nullary -local tag_code = codes.tag +local semicolon_code = codes.semicolon +local equals_code = codes.equals +local comma_code = codes.comma +local colon_code = codes.colon +local leftbrace_code = codes.leftbrace +local rightbrace_code = codes.rightbrace +local leftbracket_code = codes.leftbracket +local rightbracket_code = codes.rightbracket +local leftdelimiter_code = codes.leftdelimiter +local rightdelimiter_code = codes.rightdelimiter +local numeric_code = codes.numeric +local string_code = codes.string +local capsule_code = codes.capsule +local nullary_code = codes.nullary +local tag_code = codes.tag local typescanners = nil local tokenscanners = nil @@ -484,9 +484,9 @@ local scandimension = scanners.dimension local definitions = { } -local bpfactor = number.dimenfactors.bp -local comma = byte(",") -local close = byte("]") +local bpfactor = number.dimenfactors.bp +local comma = byte(",") +local close = byte("]") local scanrest = function() return scanvalue(comma,close) or "" end local scandimension = function() return scandimension() * bpfactor end diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua index bce5f9d83..b6fdb7021 100644 --- a/tex/context/base/mkiv/mult-def.lua +++ b/tex/context/base/mkiv/mult-def.lua @@ -8321,6 +8321,16 @@ return { ["hidenumber"]={ ["en"]="hidenumber", }, + ["horizontal"]={ + ["cs"]="horizontalne", + ["de"]="horizontal", + ["en"]="horizontal", + ["fr"]="horizontale", + ["it"]="orizzontale", + ["nl"]="horizontaal", + ["pe"]="اÙÙ‚ÛŒ", + ["ro"]="orizontal", + }, ["hoffset"]={ ["cs"]="hoffset", ["de"]="hoffset", @@ -11384,6 +11394,16 @@ return { ["en"]="vector", ["nl"]="vector", }, + ["vertical"]={ + ["cs"]="vertikalne", + ["de"]="vertikal", + ["en"]="vertical", + ["fr"]="verticale", + ["it"]="verticale", + ["nl"]="vertikaal", + ["pe"]="عمودی", + ["ro"]="vertical", + }, ["veroffset"]={ ["cs"]="offsethlavicky", ["de"]="kopfoffset", @@ -11489,6 +11509,10 @@ return { ["xmlsetup"]={ ["en"]="xmlsetup", }, + ["xanchor"]={ + ["en"]="xanchor", + ["nl"]="xanker", + }, ["xoffset"]={ ["cs"]="xoffset", ["de"]="xoffset", @@ -11539,6 +11563,10 @@ return { ["pe"]="ymax", ["ro"]="ymax", }, + ["yanchor"]={ + ["en"]="yanchor", + ["nl"]="yanker", + }, ["yoffset"]={ ["cs"]="yoffset", ["de"]="yoffset", diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index 540b1cfba..02b5ae854 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -244,6 +244,8 @@ return { "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", -- + "givenwidth", "givenheight", "givendepth", "scangivendimensions", + -- "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", diff --git a/tex/context/base/mkiv/mult-mps.lua b/tex/context/base/mkiv/mult-mps.lua index b42beb2b8..335a4c612 100644 --- a/tex/context/base/mkiv/mult-mps.lua +++ b/tex/context/base/mkiv/mult-mps.lua @@ -67,7 +67,7 @@ return { "outputformat", "outputtemplate", "filenametemplate", "fontmapfile", "fontmapline", "fontpart", "fontsize", "glyph", "restoreclipcolor", "troffmode", -- - "runscript", "maketext", + "runscript", "maketext", "numbersystem", }, commands = { "upto", "downto", diff --git a/tex/context/base/mkiv/pack-lyr.mkiv b/tex/context/base/mkiv/pack-lyr.mkiv index e7070cfde..5112aed52 100644 --- a/tex/context/base/mkiv/pack-lyr.mkiv +++ b/tex/context/base/mkiv/pack-lyr.mkiv @@ -19,18 +19,16 @@ \unprotect -% When being backgrounds layers get the background offset -% displacement. Should be an option, on by default -% (compatibility). +% When being backgrounds layers get the background offset displacement. Should be +% an option, on by default (compatibility). -%D The layering mechanism implemented here is independent of -%D the output routine, but future extensions may depend on a -%D more close cooperation. - -%D First we overload a macro from \type {pack-rul}. From now on -%D we accept a (optional) argument: the specific layer it -%D will go in. This means that we can move an overlay from one -%D background to the other using the dimensions of the parent. +%D The layering mechanism implemented here is independent of the output routine, but +%D future extensions may depend on a more close cooperation. +%D +%D First we overload a macro from \type {pack-rul}. From now on we accept a +%D (optional) argument: the specific layer it will go in. This means that we can +%D move an overlay from one background to the other using the dimensions of the +%D parent. \ifdefined\defineoverlay \else \message{loaded to early} \wait \fi @@ -46,13 +44,12 @@ \fi \processcommalist[#1]\pack_framed_define_overlay_indeed} -%D We use the command handler code. The previous, more direct parameter -%D handling was 25\% faster when no parameters were passed when adding -%D content to a layer. However, when we pass for instance a preset, the -%D new methos is some 10\% faster and it happens that in most cases we -%D do pass some parameters. It would be interesting to see if we can push -%D the preset in between the regular chain but it could also lead to -%D unwanted side effects when nesting layer placement. +%D We use the command handler code. The previous, more direct parameter handling was +%D 25\% faster when no parameters were passed when adding content to a layer. +%D However, when we pass for instance a preset, the new methos is some 10\% faster +%D and it happens that in most cases we do pass some parameters. It would be +%D interesting to see if we can push the preset in between the regular chain but it +%D could also lead to unwanted side effects when nesting layer placement. \installcorenamespace{layer} \installcorenamespace{layerbox} @@ -62,13 +59,11 @@ %D \macros %D {definelayer,setuplayer} %D -%D Each layer gets its own (global) box. This also means that -%D the data that goes into a layer, is typeset immediately. -%D Each layer automatically gets an associated overlay, -%D which can be used in any background assignment. +%D Each layer gets its own (global) box. This also means that the data that goes +%D into a layer, is typeset immediately. Each layer automatically gets an associated +%D overlay, which can be used in any background assignment. %D -%D After a layer is defined, you can change its -%D characteristics. +%D After a layer is defined, you can change its characteristics. \installcommandhandler \??layer {layer} \??layer @@ -175,8 +170,7 @@ %D \macros %D {resetlayer} %D -%D This macro hardly needs an explanation (but is seldom -%D needed anyway). +%D This macro hardly needs an explanation (but is seldom needed anyway). \def\pack_layers_reset_box#1% {\ifcsname\??layerbox#1\endcsname @@ -193,10 +187,9 @@ %D \macros %D {setlayer} %D -%D Data is moved into a layer with the following macro. When -%D \type {position} is set, relative positioning is used, with -%D the current point as reference point. Otherwise the topleft -%D corner is used as reference point. +%D Data is moved into a layer with the following macro. When \type {position} is +%D set, relative positioning is used, with the current point as reference point. +%D Otherwise the topleft corner is used as reference point. %D %D \starttyping %D \setlayer [identifier] [optional parameters] {data} @@ -474,11 +467,10 @@ {\ifdim\d_pack_layers_x_size>\zeropoint \advance\d_pack_layers_x_position.5\d_pack_layers_x_size \fi \ifdim\d_pack_layers_y_size>\zeropoint \advance\d_pack_layers_y_position.5\d_pack_layers_y_size \fi} -%D Given the task to be accomplished, the previous macro is -%D not even that complicated. It mainly comes down to skipping -%D to the right place and placing a box on top of or below the -%D existing content. In the case of position tracking, another -%D reference point is chosen. +%D Given the task to be accomplished, the previous macro is not even that +%D complicated. It mainly comes down to skipping to the right place and placing a +%D box on top of or below the existing content. In the case of position tracking, +%D another reference point is chosen. %D \macros %D {doifelselayerdata} @@ -500,10 +492,9 @@ %D \macros %D {flushlayer} %D -%D When we flush a layer, we flush both the main one and the -%D page dependent one (when defined). This feature is more -%D efficient in \ETEX\ since there testing for an undefined -%D macro does not takes hash space. +%D When we flush a layer, we flush both the main one and the page dependent one +%D (when defined). This feature is more efficient in \ETEX\ since there testing for +%D an undefined macro does not takes hash space. % todo: setups before flush, handy hook @@ -709,9 +700,8 @@ %D \macros %D {composedlayer,placelayer,tightlayer} %D -%D This is a handy shortcut, which saves a couple of braces -%D when we use it as parameter. This name also suits better -%D to other layering commands. +%D This is a handy shortcut, which saves a couple of braces when we use it as +%D parameter. This name also suits better to other layering commands. \unexpanded\def\composedlayer#1{\flushlayer[#1]} @@ -736,8 +726,7 @@ %D \macros %D {setMPlayer} %D -%D The following layer macro uses the positions that are -%D registered by \METAPOST. +%D The following layer macro uses the positions that are registered by \METAPOST. %D %D \starttyping %D \definelayer[test] diff --git a/tex/context/base/mkiv/pack-obj.mkiv b/tex/context/base/mkiv/pack-obj.mkiv index d08c66494..4b3b6c2f0 100644 --- a/tex/context/base/mkiv/pack-obj.mkiv +++ b/tex/context/base/mkiv/pack-obj.mkiv @@ -20,24 +20,22 @@ %D \macros %D {setobject,getobject,ifinobject} %D -%D Boxes can be considered reuable objects. Traditionally once passed -%D to the \DVI\ file, such objects cannot be reused. In \PDF\ however, -%D reusing is possible and sometimes even a necessity. Therefore, -%D \CONTEXT\ supports reusable objects and \LUATEX\ has native support -%D for so called box resources. +%D Boxes can be considered reuable objects. Traditionally once passed to the \DVI\ +%D file, such objects cannot be reused. In \PDF\ however, reusing is possible and +%D sometimes even a necessity. Therefore, \CONTEXT\ supports reusable objects and +%D \LUATEX\ has native support for so called box resources. %D -%D The first application of objects in \CONTEXT\ concerned \METAPOST\ -%D graphics and fill||in form fields. Reusing resources can save lots -%D of bytes and sometimes also runtime. +%D The first application of objects in \CONTEXT\ concerned \METAPOST\ graphics and +%D fill||in form fields. Reusing resources can save lots of bytes and sometimes also +%D runtime. %D %D \starttyping %D \setobject{class}{name}\somebox{} %D \getobject{class}{name} %D \stoptyping %D -%D Here \type {\somebox} can be whatever box specification suits \TEX. -%D Although the implementation in \MKIV\ is somewhat different the -%D principles have not changed. +%D Here \type {\somebox} can be whatever box specification suits \TEX. Although the +%D implementation in \MKIV\ is somewhat different the principles have not changed. \installcorenamespace {objects} diff --git a/tex/context/base/mkiv/pack-ori.lua b/tex/context/base/mkiv/pack-ori.lua new file mode 100644 index 000000000..a786b19ef --- /dev/null +++ b/tex/context/base/mkiv/pack-ori.lua @@ -0,0 +1,70 @@ +if not modules then modules = { } end modules ['pack-ori'] = { + version = 1.001, + comment = "companion to supp-box.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local context = context +local implement = interfaces.implement +local variables = interfaces.variables + +local settings_to_array = utilities.parsers.settings_to_array + +local orientation = { + [variables.up] = 0x000, + [variables.left] = 0x001, + [variables.down] = 0x002, + [variables.right] = 0x003, + [variables.top] = 0x004, + [variables.bottom] = 0x005, +} +local vertical = { + [variables.line] = 0x000, + [variables.top] = 0x010, + [variables.bottom] = 0x020, + [variables.middle] = 0x030, +} +local horizontal = { + [variables.middle] = 0x000, + [variables.flushleft] = 0x100, + [variables.flushright] = 0x200, + [variables.left] = 0x300, + [variables.right] = 0x400, +} + +implement { + name = "toorientation", + public = true, + arguments = { + { + { "horizontal", "string" }, + { "vertical", "string" }, + { "orientation", "string" }, + } + }, + actions = function(t) + local n = 0 + local m = t.horizontal if m then n = n | (horizontal [m] or 0) end + local m = t.vertical if m then n = n | (vertical [m] or 0) end + local m = t.orientation if m then n = n | (orientation[m] or 0) end + -- logs.report("orientation","0x%03X : %s",n,table.sequenced(t)) + context(n) + end, +} + +implement { + name = "stringtoorientation", + public = true, + arguments = "string", + actions = function(s) + local n = 0 + local t = settings_to_array(s) + local m = t[1] if m then n = n | (horizontal [m] or 0) end + local m = t[2] if m then n = n | (vertical [m] or 0) end + local m = t[3] if m then n = n | (orientation[m] or 0) end + -- logs.report("orientation","0x%03X : %s",n,s) + context(n) + end, +} diff --git a/tex/context/base/mkiv/pack-ori.mkxl b/tex/context/base/mkiv/pack-ori.mkxl new file mode 100644 index 000000000..061768f94 --- /dev/null +++ b/tex/context/base/mkiv/pack-ori.mkxl @@ -0,0 +1,88 @@ +%D \module +%D [ file=pack-ori, % was experimental +%D version=2019.07.30, +%D title=\CONTEXT\ Packaging Macros, +%D subtitle=Anchoring, +%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 Packaging Macros / Anchoring} + +\registerctxluafile{pack-ori}{} + +\unprotect + +%D Possible options are: +%D +%D \starttabulate[|T|T|] +%D \NC orientation \NC up left down right top bottom +%D \NC vertical \NC line top bottom middle +%D \NC horizontal \NC middle flushleft flushright left right +%D \stoptabulate + +\installcorenamespace{orientation} +\installcorenamespace{orientations} + +\installcommandhandler \??orientation {orientation} \??orientation + +\setuporientation + [\c!orientation=\v!normal, + \c!horizontal=\v!normal, + \c!vertical=\v!normal] + +\appendtoks + \expandafter\chardef\csname\??orientations\currentorientation\endcsname\toorientation + orientation {\orientationparameter\c!orientation} + horizontal {\orientationparameter\c!horizontal} + vertical {\orientationparameter\c!vertical} + \relax\relax +\to \everydefineorientation + +\defineorientation[\v!normal] + +\defineorientation[\v!up] [\c!orientation=\v!up] +\defineorientation[\v!down] [\c!orientation=\v!down] +\defineorientation[\v!left] [\c!orientation=\v!left] +\defineorientation[\v!right] [\c!orientation=\v!right] +\defineorientation[\v!top] [\c!orientation=\v!top] +\defineorientation[\v!bottom][\c!orientation=\v!bottom] + +%D There will be some more helpers here. + +\def\theorientation#1% + {\numexpr + \ifcsname\??orientations#1\endcsname + \lastnamedcs + \else + \zerocount + \fi + \relax} + +\def\autoorientation#1% + {\numexpr + \ifcsname\??orientations#1\endcsname + \lastnamedcs + \else + \auto_orientation{#1}% + \fi + \relax} + +\def\auto_orientation#1% + {\immediateassignment\global\expandafter\chardef\csname\??orientations#1\endcsname\stringtoorientation{#1}% + \csname\??orientations#1\endcsname} + +\unexpanded\def\doifelseorientation#1% + {\ifcsname\??orientations#1\endcsname + \expandafter\firstoftwoarguments + \else + \expandafter\secondoftwoarguments + \fi} + +% \def\iforientationcsname#1{\ifcsname\??orientations} + +\protect \endinput diff --git a/tex/context/base/mkiv/pack-rul.mkxl b/tex/context/base/mkiv/pack-rul.mkxl index e21f5f1c2..0da5bff61 100644 --- a/tex/context/base/mkiv/pack-rul.mkxl +++ b/tex/context/base/mkiv/pack-rul.mkxl @@ -1589,10 +1589,38 @@ \egroup} %D Anchoring is experimental and was prototyped around the ctx meeting in 2018 but -%D never mede it into the core yet. It operates indepedent of the orientation -%D mechanism already present. +%D never mede it into the core yet. It operates independent of the orientation +%D mechanism already present. It's a rather efficient feature. Best is to use +%D predefined orientations, like: +%D +%D \starttyping +%D \defineorientation[leftflushleft] [orientation=left,horizontal=flushleft] +%D +%D \framed [anchoring={leftflushleft}] {anchoring} +%D \stoptyping +%D +%D But this also works: +%D +%D \starttyping +%D \framed [anchoring={flushleft,top,up}] {anchoring} +%D \stoptyping +%D +%D When an anchoring is given (use \type {normal} for the default) you can also +%D use the \type {xanchor} and \type {yanchor} offsets. -\let\pack_framed_handle_anchoring\relax +% because we mess with the width later on, we need double wrapping: + +\def\pack_framed_handle_anchoring + {\scratchcounter\autoorientation\p_framed_anchoring\relax + \edef\p_xanchor{\framedparameter\c!xanchor}% + \edef\p_yanchor{\framedparameter\c!yanchor}% + \setbox\b_framed_normal\hpack{\hpack % here + % using the keyword approachs works ok, don't mess with orientation + % directly here using \boxorientation ... it doesn't work that well + \s!orientation\scratchcounter + \ifx\p_xanchor\empty\else \s!xoffset \p_xanchor\fi + \ifx\p_yanchor\empty\else \s!yoffset \p_yanchor\fi + {\box\b_framed_normal}}} \installcorenamespace{framedlocatorbefore} \installcorenamespace{framedlocatorafter} @@ -1771,7 +1799,7 @@ \setbox\b_framed_normal\hpack{\lower\d_framed_locator_dp\box\b_framed_normal}% \ht\b_framed_normal\d_framed_locator_ht \dp\b_framed_normal\d_framed_locator_dp - \hpack{\box\b_framed_normal}} % why do we pack .. dange of loosing? + \hpack{\box\b_framed_normal}} % why do we pack .. danger of loosing? % also used in fastlocalframed diff --git a/tex/context/base/mkiv/page-one.mkiv b/tex/context/base/mkiv/page-one.mkiv index 356fb4987..9572b3769 100644 --- a/tex/context/base/mkiv/page-one.mkiv +++ b/tex/context/base/mkiv/page-one.mkiv @@ -76,7 +76,7 @@ \global\advance\vsize\d_page_adapts_delta % alternatively we could set it in builders.buildpage_filter % \ifdim\pagegoal<\maxdimen .. \fi - \global\pagegoal\dimexpr\vsize-\d_page_floats_inserted_top-\d_page_floats_inserted_bottom\relax} + \pagegoal\dimexpr\vsize-\d_page_floats_inserted_top-\d_page_floats_inserted_bottom\relax} % 1 = partial page, 2 = whole page, 3 = partial page diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index c0b856eb0..096af2970 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index 5d07a4305..05edff1b1 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/base/mkiv/strc-pag.lua b/tex/context/base/mkiv/strc-pag.lua index a9933a21f..216b5f705 100644 --- a/tex/context/base/mkiv/strc-pag.lua +++ b/tex/context/base/mkiv/strc-pag.lua @@ -316,6 +316,11 @@ function pages.in_body(n) return texgetcount("pagebodymode") > 0 end +function pages.fraction(n) + local lastpage = texgetcount("lastpageno") -- can be cached + return lastpage > 1 and (texgetcount("realpageno")-1)/(lastpage-1) or 1 +end + -- move to strc-pag.lua function counters.analyze(name,counterspecification) diff --git a/tex/context/base/mkiv/supp-box.lua b/tex/context/base/mkiv/supp-box.lua index 1f31f7681..f2da9155b 100644 --- a/tex/context/base/mkiv/supp-box.lua +++ b/tex/context/base/mkiv/supp-box.lua @@ -12,13 +12,13 @@ local report_hyphenation = logs.reporter("languages","hyphenation") local tonumber, next, type = tonumber, next, type -local lpegmatch = lpeg.match +local lpegmatch = lpeg.match -local tex = tex -local context = context -local nodes = nodes +local tex = tex +local context = context +local nodes = nodes -local implement = interfaces.implement +local implement = interfaces.implement local nodecodes = nodes.nodecodes @@ -625,8 +625,26 @@ implement { end } -interfaces.implement { +implement { name = "shiftbox", arguments = { "integer", "dimension" }, actions = function(n,d) setshift(getbox(n),d) end, } + +implement { + name = "scangivendimensions", + public = true, + protected = true, + arguments = { + { + { "width", "dimension" }, + { "height", "dimension" }, + { "depth", "dimension" }, + }, + }, + actions = function(t) + texsetdimen("givenwidth", t.width or 0) + texsetdimen("givenheight",t.height or 0) + texsetdimen("givendepth", t.depth or 0) + end, +} diff --git a/tex/context/base/mkiv/supp-box.mkiv b/tex/context/base/mkiv/supp-box.mkiv index 2fce3311a..4a8ff33f8 100644 --- a/tex/context/base/mkiv/supp-box.mkiv +++ b/tex/context/base/mkiv/supp-box.mkiv @@ -23,6 +23,12 @@ \fixupboxesmode\plusone +%D And some dimensions: + +\newdimen\givenwidth +\newdimen\givenheight +\newdimen\givendepth + % handy to have % % \hbox to \hsize @@ -539,12 +545,9 @@ {\beginofshapebox \unvbox\nextbox \endofshapebox - % \global\count1\zerocount - % \reshapebox{\global\advance\count1\plusone}% - % \egroup\noflines\count1 }% - \scratchcounter\zerocount - \reshapebox{\global\advance\scratchcounter\plusone}% - \expandafter\egroup\expandafter\noflines\the\scratchcounter\relax} + \globalscratchcounter\zerocount + \reshapebox{\global\advance\globalscratchcounter\plusone}% + \expandafter\egroup\expandafter\noflines\the\globalscratchcounter\relax} \unexpanded\def\determinenoflines {\bgroup @@ -851,6 +854,7 @@ \newif \ifsomeshapeleft \newif \ifreshapingbox +\newif \ifreshapingfailed % may save redundant runs \newbox \shapebox \newcount \shapepenalty @@ -859,6 +863,7 @@ \newbox \newshapebox \newbox \oldshapebox +\newbox \tmpshapebox \newcount \shapecounter @@ -873,10 +878,6 @@ {\kern \shapekern }% {\vskip \shapeskip }} -\newbox\tmpshapebox - -\newif\ifreshapingfailed % may save redundant runs - \def\doreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip {\global\reshapingfailedfalse \ifzeropt\ht\oldshapebox % \ifdim\ht\oldshapebox=\zeropoint @@ -1025,10 +1026,10 @@ \unexpanded\def\shapedhbox % lines with non strutted dimensions have {\expanded{\dowithnextbox % interlineskip so if we want the original - {\dp\nextbox\the\ht\shapebox % spacing, we need to preserve the original + {\ht\nextbox\the\ht\shapebox % spacing, we need to preserve the original \dp\nextbox\the\dp\shapebox % height and depth which is definitely \box\nextbox}} % needed if we apply struts to the 'new' - \hbox} % box or do something that changed ist size + \hbox} % box or do something that changed ist size %D \macros %D {hyphenatedword, @@ -1100,7 +1101,7 @@ \unexpanded\def\processtokens#1#2#3#4#5% {\begingroup - \def\lastcharacter{\lastcharacter}% + \def\lastcharacter{\lastcharacter}% hm, recursive ? \def\space{ }% \let\\=\space \def\before {#1}% @@ -1471,13 +1472,13 @@ \unexpanded\def\syst_boxes_sbox_finish {\setbox\nextbox\hpack - {\strut - \dp\nextbox\zeropoint + {\strut % not needed + \dp\nextbox\zeropoint % not needed \lower\strutdp\box\nextbox}% - \dp\nextbox\strutdp - \ht\nextbox\strutht - \box\nextbox - \egroup} + \dp\nextbox\strutdp + \ht\nextbox\strutht + \box\nextbox + \egroup} %D A variant on this: diff --git a/tex/context/base/mkiv/supp-box.mkxl b/tex/context/base/mkiv/supp-box.mkxl index 920624329..a77327b3e 100644 --- a/tex/context/base/mkiv/supp-box.mkxl +++ b/tex/context/base/mkiv/supp-box.mkxl @@ -23,6 +23,12 @@ \fixupboxesmode\plusone +%D And some dimensions: + +\newdimen\givenwidth +\newdimen\givenheight +\newdimen\givendepth + % handy to have % % \hbox to \hsize @@ -224,16 +230,20 @@ %D catcode safer. It is needed by the math module (although the \type {\leavevmode} %D is not added here). +% \unexpanded\def\smash +% {\begingroup +% \futurelet\nexttoken\syst_boxes_smash} +% +% \def\syst_boxes_smash +% {\ifx\nexttoken[% +% \expandafter\syst_boxes_smash_yes +% \else +% \expandafter\syst_boxes_smash_nop +% \fi} + \unexpanded\def\smash {\begingroup - \futurelet\nexttoken\syst_boxes_smash} - -\def\syst_boxes_smash - {\ifx\nexttoken[% - \expandafter\syst_boxes_smash_yes - \else - \expandafter\syst_boxes_smash_nop - \fi} + \futureexpandis[\syst_boxes_smash_yes\syst_boxes_smash_nop} \def\syst_boxes_smash_nop {\edef\m_boxes_smash_options{hd}% @@ -285,6 +295,9 @@ \def\syst_boxes_lower_nextbox_dp {\setbox\nextbox\hpack{\lower\dp\nextbox\box\nextbox}} +% \def\syst_boxes_lower_nextbox_dp +% {\boxymove\nextbox-\dp\nextbox} + %D \starttabulate[|l|l|] %D \NC w \NC \ruledhbox{\smash [w]{This is some great smashing, isn't it?}} \NC \NR %D \NC h \NC \ruledhbox{\smash [h]{This is some great smashing, isn't it?}} \NC \NR @@ -403,8 +416,12 @@ %D The next alternative is slightly more clever, since it accepts \type {{12}} as %D well as \type {12} as box number. +% \unexpanded\def\getboxheight#1\of#2\box#3% +% {\def\next{#1\dimexpr\ht\c_boxes_register+\dp\c_boxes_register\relax}% +% \afterassignment\next\c_boxes_register=#3} + \unexpanded\def\getboxheight#1\of#2\box#3% - {\def\next{#1\dimexpr\ht\c_boxes_register+\dp\c_boxes_register\relax}% + {\def\next{#1\htdp\c_boxes_register}% \afterassignment\next\c_boxes_register=#3} %D For a long time the following three macros were part of the grid snapping core @@ -539,12 +556,9 @@ {\beginofshapebox \unvbox\nextbox \endofshapebox - % \global\count1\zerocount - % \reshapebox{\global\advance\count1\plusone}% - % \egroup\noflines\count1 }% - \scratchcounter\zerocount - \reshapebox{\global\advance\scratchcounter\plusone}% - \expandafter\egroup\expandafter\noflines\the\scratchcounter\relax} + \globalscratchcounter\zerocount + \reshapebox{\global\advance\globalscratchcounter\plusone}% + \expandafter\egroup\expandafter\noflines\the\globalscratchcounter\relax} \unexpanded\def\determinenoflines {\bgroup @@ -575,8 +589,6 @@ \endgroup\expandafter\firstoftwoarguments \fi} -\let\doiftextelse\doifelsetext - \unexpanded\def\doiftext#1% {\begingroup \setbox\scratchbox\hpack @@ -588,6 +600,12 @@ \endgroup\expandafter\firstofoneargument \fi} +% more efficient but maybe fragile: +% +% \nospacing#1}% + +\let\doiftextelse\doifelsetext + %D \macros %D {dowithnextbox,nextbox} %D @@ -851,6 +869,7 @@ \newif \ifsomeshapeleft \newif \ifreshapingbox +\newif \ifreshapingfailed % may save redundant runs \newbox \shapebox \newcount \shapepenalty @@ -859,6 +878,7 @@ \newbox \newshapebox \newbox \oldshapebox +\newbox \tmpshapebox \newcount \shapecounter @@ -873,10 +893,6 @@ {\kern \shapekern }% {\vskip \shapeskip }} -\newbox\tmpshapebox - -\newif\ifreshapingfailed % may save redundant runs - \def\doreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip {\global\reshapingfailedfalse \ifzeropt\ht\oldshapebox % \ifdim\ht\oldshapebox=\zeropoint @@ -1025,7 +1041,7 @@ \unexpanded\def\shapedhbox % lines with non strutted dimensions have {\expanded{\dowithnextbox % interlineskip so if we want the original - {\dp\nextbox\the\ht\shapebox % spacing, we need to preserve the original + {\ht\nextbox\the\ht\shapebox % spacing, we need to preserve the original \dp\nextbox\the\dp\shapebox % height and depth which is definitely \box\nextbox}} % needed if we apply struts to the 'new' \hbox} % box or do something that changed ist size @@ -1100,7 +1116,7 @@ \unexpanded\def\processtokens#1#2#3#4#5% {\begingroup - \def\lastcharacter{\lastcharacter}% + \def\lastcharacter{\lastcharacter}% hm, recursive ? \def\space{ }% \let\\=\space \def\before {#1}% @@ -1114,17 +1130,18 @@ \def\doprocesstokens% the space after = is essential {\afterassignment\dodoprocesstokens\let\nextprocessedtoken= } +\def\redoprocessedtoken + {\dowithnextbox + {\before{\copy\nextbox}% \before can use nextbox several times + \let\before\between + \doprocesstokens} + \hbox\bgroup} + \def\dodoprocesstokens {\ifx\nextprocessedtoken\lastcharacter \after - \let\nextprocessedtoken\relax \orelse\ifx\nextprocessedtoken\bgroup - \def\nextprocessedtoken - {\dowithnextbox - {\before{\copy\nextbox}% \before can use nextbox several times - \let\before\between - \doprocesstokens} - \hbox\bgroup}% + \expandafter\redoprocessedtoken \else \expandafter\if\space\nextprocessedtoken \after\white @@ -1133,9 +1150,8 @@ \before\nextprocessedtoken \let\before\between \fi - \let\nextprocessedtoken\doprocesstokens - \fi - \nextprocessedtoken} + \expandafter\doprocesstokens + \fi} %D \macros %D {doboundtext} @@ -1466,33 +1482,51 @@ %D complicated menus, headers and footers and|/|or margin material. \unexpanded\def\sbox - {\vbox\bgroup + {\vpack\bgroup \dowithnextboxcs\syst_boxes_sbox_finish\vbox} +% \unexpanded\def\syst_boxes_sbox_finish +% {\setbox\nextbox\hpack +% {\strut +% \dp\nextbox\zeropoint +% \lower\strutdp\box\nextbox}% +% \dp\nextbox\strutdp +% \ht\nextbox\strutht +% \box\nextbox +% \egroup} + \unexpanded\def\syst_boxes_sbox_finish - {\setbox\nextbox\hpack - {\strut - \dp\nextbox\zeropoint - \lower\strutdp\box\nextbox}% - \dp\nextbox\strutdp - \ht\nextbox\strutht - \box\nextbox - \egroup} + {\boxyoffset\nextbox-\strutdp + \dp\nextbox\strutdp + \ht\nextbox\strutht + \box\nextbox + \egroup} %D A variant on this: +% \unexpanded\def\inlinedbox +% {\bgroup +% \dowithnextbox +% {\setbox\nextbox\hpack +% {\lower +% \dimexpr(\htdp\nextbox-\lineheight)/\plustwo+\strutdp\relax +% \box\nextbox}% +% \ht\nextbox\strutht +% \dp\nextbox\strutdp +% \box\nextbox +% \egroup}% +% \hbox} + \unexpanded\def\inlinedbox {\bgroup - \dowithnextbox - {\setbox\nextbox\hpack - {\lower - \dimexpr(\htdp\nextbox-\lineheight)/\plustwo+\strutdp\relax - \box\nextbox}% - \ht\nextbox\strutht - \dp\nextbox\strutdp - \box\nextbox - \egroup}% - \hbox} + \dowithnextboxcs\syst_boxes_inlined_finish\hbox} + +\unexpanded\def\syst_boxes_inlined_finish + {\boxyoffset\nextbox-\dimexpr(\htdp\nextbox-\lineheight)/\plustwo+\strutdp\relax + \ht\nextbox\strutht + \dp\nextbox\strutdp + \box\nextbox + \egroup} %D \macros %D {struttedbox} @@ -1567,37 +1601,65 @@ %D The dimensions of the surrounding box are kept intact. This commands handles %D positive and negative dimensions (which is why we need two boxes with rules). +% \unexpanded\def\centeredbox#1#% height +/-dimen width +/-dimen +% {\bgroup +% \setbox\scratchboxone\vpack to \vsize +% \bgroup +% \dontcomplain +% \forgetall +% \setbox\scratchboxone\hpack{\vrule\s!width \zeropoint#1}% +% \setbox\scratchboxtwo\vpack{\hrule\s!height\zeropoint#1}% +% \advance\vsize \ht\scratchboxtwo +% \advance\hsize \wd\scratchboxone +% \vpack to \vsize +% \bgroup +% \vskip-\ht\scratchboxtwo +% \vss +% \hpack to \hsize +% \bgroup +% \dowithnextbox +% {\hskip-\wd\scratchboxone +% \hss +% \box\nextbox +% \hss +% \egroup +% \vss +% \egroup +% \egroup +% \wd\scratchboxone\hsize +% \ht\scratchboxone\vsize +% \box\scratchboxone +% \egroup} +% \hbox} + \unexpanded\def\centeredbox#1#% height +/-dimen width +/-dimen {\bgroup - \setbox\scratchboxone\vpack to \vsize - \bgroup - \dontcomplain - \forgetall - \setbox\scratchboxone\hpack{\vrule\s!width \zeropoint#1}% - \setbox\scratchboxtwo\vpack{\hrule\s!height\zeropoint#1}% - \advance\vsize \ht\scratchboxtwo - \advance\hsize \wd\scratchboxone - \vpack to \vsize - \bgroup - \vskip-\ht\scratchboxtwo - \vss - \hpack to \hsize - \bgroup - \dowithnextbox - {\hskip-\wd\scratchboxone - \hss - \box\nextbox - \hss - \egroup - \vss - \egroup - \egroup - \wd\scratchboxone\hsize - \ht\scratchboxone\vsize - \box\scratchboxone - \egroup} + \dontcomplain + \forgetall + \scangivendimensions#1\relax + \advance\vsize\givenheight + \advance\hsize\givenwidth + \dowithnextboxcs\syst_boxes_centered_finish \hbox} +\def\syst_boxes_centered_finish + {\boxxoffset\nextbox.5\dimexpr + \hsize + -\wd\nextbox + -\givenwidth + \relax + \boxyoffset\nextbox.5\dimexpr + \vsize + -\ht\nextbox + +\dp\nextbox + -\givenheight + \relax + \wd\nextbox\dimexpr\hsize-\givenwidth \relax + \ht\nextbox\dimexpr\vsize-\givenheight\relax + \dp\nextbox\zeropoint + \box\nextbox + \egroup} + %D For those who don't want to deal with \type {\hsize} and \type {\vsize}, we have: %D %D \starttyping @@ -1605,7 +1667,7 @@ %D {\framed[width=100bp,height=100bp]{}} %D \stoptyping %D -%D Do you see what we call this one \type {next}? +%D Do you see why we call this one \type {next}? \unexpanded\def\centerednextbox#1#% {\bgroup @@ -2112,23 +2174,41 @@ \unexpanded\def\tbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_tbox_finish\hbox} \unexpanded\def\bbox{\hpack\bgroup\dowithnextboxcs\syst_boxes_bbox_finish\hbox} +% \def\syst_boxes_tbox_finish +% {\scratchdepth\dimexpr\ht\nextbox+\dp\nextbox-\ht\strutbox\relax +% \ht\nextbox\ht\strutbox +% \dp\nextbox\scratchdepth +% \setbox\nextbox\hpack{\lower\dp\nextbox\box\nextbox}% +% \ht\nextbox\ht\strutbox +% \dp\nextbox\scratchdepth +% \box\nextbox +% \egroup} + +% \def\syst_boxes_bbox_finish +% {\scratchheight\dimexpr\ht\nextbox+\dp\nextbox-\dp\strutbox\relax +% \dp\nextbox\dp\strutbox +% \ht\nextbox\scratchheight +% \setbox\nextbox\hpack{\lower\dp\nextbox\box\nextbox}% +% \dp\nextbox\dp\strutbox +% \ht\nextbox\scratchheight +% \box\nextbox +% \egroup} + \def\syst_boxes_tbox_finish - {\scratchdepth\dimexpr\ht\nextbox+\dp\nextbox-\ht\strutbox\relax - \ht\nextbox\ht\strutbox - \dp\nextbox\scratchdepth - \setbox\nextbox\hpack{\lower\dp\nextbox\box\nextbox}% - \ht\nextbox\ht\strutbox + {\scratchheight\ht\strutbox + \scratchdepth\dimexpr\htdp\nextbox-\scratchheight\relax + \ht\nextbox\scratchheight \dp\nextbox\scratchdepth + \boxyoffset\nextbox-\scratchdepth \box\nextbox \egroup} \def\syst_boxes_bbox_finish - {\scratchheight\dimexpr\ht\nextbox+\dp\nextbox-\dp\strutbox\relax - \dp\nextbox\dp\strutbox - \ht\nextbox\scratchheight - \setbox\nextbox\hpack{\lower\dp\nextbox\box\nextbox}% - \dp\nextbox\dp\strutbox + {\scratchdepth\dp\strutbox + \scratchheight\dimexpr\htdp\nextbox-\scratchdepth\relax + \dp\nextbox\scratchdepth \ht\nextbox\scratchheight + \boxyoffset\nextbox-\scratchdepth \box\nextbox \egroup} @@ -2264,63 +2344,135 @@ \let\bottomleftbox \leftbottombox \let\bottomrightbox\rightbottombox +% \def\syst_boxes_rightbox_finish +% {\global\boxhdisplacement\boxoffset +% \global\boxvdisplacement.5\ht\nextbox +% \global\advance\boxvdisplacement-.5\dp\nextbox +% \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_rightbox_finish {\global\boxhdisplacement\boxoffset - \global\boxvdisplacement.5\ht\nextbox - \global\advance\boxvdisplacement-.5\dp\nextbox - \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox + \global\boxvdisplacement.5\dimexpr\ht\nextbox-\dp\nextbox\relax + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} +% \def\syst_boxes_leftbox_finish +% {\global\boxhdisplacement-\wd\nextbox +% \global\advance\boxhdisplacement-\boxoffset +% \global\boxvdisplacement.5\ht\nextbox +% \global\advance\boxvdisplacement-.5\dp\nextbox +% \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_leftbox_finish - {\global\boxhdisplacement-\wd\nextbox - \global\advance\boxhdisplacement-\boxoffset - \global\boxvdisplacement.5\ht\nextbox - \global\advance\boxvdisplacement-.5\dp\nextbox - \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox + {\global\boxhdisplacement\dimexpr-\wd\nextbox-\boxoffset\relax + \global\boxvdisplacement.5\dimexpr\ht\nextbox-\dp\nextbox\relax + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} +% \def\syst_boxes_topbox_finish +% {\global\boxhdisplacement-.5\wd\nextbox +% \global\boxvdisplacement-\dp\nextbox +% \global\advance\boxvdisplacement-\boxoffset +% \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_topbox_finish {\global\boxhdisplacement-.5\wd\nextbox - \global\boxvdisplacement-\dp\nextbox - \global\advance\boxvdisplacement-\boxoffset - \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox + \global\boxvdisplacement\dimexpr-\dp\nextbox-\boxoffset\relax + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} +% \def\syst_boxes_bottombox_finish +% {\global\boxhdisplacement-.5\wd\nextbox +% \global\boxvdisplacement\ht\nextbox +% \global\advance\boxvdisplacement\boxoffset +% \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_bottombox_finish {\global\boxhdisplacement-.5\wd\nextbox - \global\boxvdisplacement\ht\nextbox - \global\advance\boxvdisplacement\boxoffset - \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox + \global\boxvdisplacement\dimexpr\ht\nextbox+\boxoffset\relax + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} +% \def\syst_boxes_lefttopbox_finish +% {\global\boxhdisplacement-\wd\nextbox +% \global\advance\boxhdisplacement-\boxoffset +% \global\boxvdisplacement-\dp\nextbox +% \global\advance\boxvdisplacement-\boxoffset +% \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_lefttopbox_finish - {\global\boxhdisplacement-\wd\nextbox - \global\advance\boxhdisplacement-\boxoffset - \global\boxvdisplacement-\dp\nextbox - \global\advance\boxvdisplacement-\boxoffset - \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox + {\global\boxhdisplacement\dimexpr-\wd\nextbox-\boxoffset\relax + \global\boxvdisplacement\dimexpr-\dp\nextbox-\boxoffset\relax + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} +% \def\syst_boxes_righttopbox_finish +% {\global\boxhdisplacement\boxoffset +% \global\boxvdisplacement-\dp\nextbox +% \global\advance\boxvdisplacement-\boxoffset +% \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_righttopbox_finish {\global\boxhdisplacement\boxoffset - \global\boxvdisplacement-\dp\nextbox - \global\advance\boxvdisplacement-\boxoffset - \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox + \global\boxvdisplacement\dimexpr-\dp\nextbox-\boxoffset\relax + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} +% \def\syst_boxes_leftbottombox_finish +% {\global\boxhdisplacement-\wd\nextbox +% \global\advance\boxhdisplacement-\boxoffset +% \global\boxvdisplacement\ht\nextbox +% \global\advance\boxvdisplacement\boxoffset +% \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_leftbottombox_finish - {\global\boxhdisplacement-\wd\nextbox - \global\advance\boxhdisplacement-\boxoffset - \global\boxvdisplacement\ht\nextbox - \global\advance\boxvdisplacement\boxoffset - \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox + {\global\boxhdisplacement\dimexpr-\wd\nextbox-\boxoffset\relax + \global\boxvdisplacement\dimexpr\ht\nextbox+\boxoffset\relax + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} +% \def\syst_boxes_rightbottombox_finish +% {\global\boxhdisplacement\boxoffset +% \global\boxvdisplacement\ht\nextbox +% \global\advance\boxvdisplacement\boxoffset +% \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_rightbottombox_finish {\global\boxhdisplacement\boxoffset - \global\boxvdisplacement\ht\nextbox - \global\advance\boxvdisplacement\boxoffset - \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox + \global\boxvdisplacement\dimexpr\ht\nextbox+\boxoffset\relax + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} \unexpanded\def\middlebox {\hpack\bgroup\dowithnextboxcs\syst_boxes_middlebox_finish \placedbox} @@ -2328,31 +2480,67 @@ \unexpanded\def\baselineleftbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselineleftbox_finish \placedbox} \unexpanded\def\baselinerightbox {\hpack\bgroup\dowithnextboxcs\syst_boxes_baselinerightbox_finish \placedbox} +% \def\syst_boxes_middlebox_finish +% {\global\boxhdisplacement-.5\wd\nextbox +% \global\boxvdisplacement.5\ht\nextbox +% \global\advance\boxvdisplacement-.5\dp\nextbox +% \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_middlebox_finish {\global\boxhdisplacement-.5\wd\nextbox - \global\boxvdisplacement.5\ht\nextbox - \global\advance\boxvdisplacement-.5\dp\nextbox - \boxcursor\kern\boxhdisplacement\lower\boxvdisplacement\box\nextbox + \global\boxvdisplacement.5\dimexpr\ht\nextbox-\dp\nextbox\relax + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} +% \def\syst_boxes_baselinemiddlebox_finish +% {\global\boxhdisplacement-.5\wd\nextbox +% \global\advance\boxhdisplacement-\boxoffset +% \global\boxvdisplacement-\boxoffset +% \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_baselinemiddlebox_finish - {\global\boxhdisplacement-.5\wd\nextbox - \global\advance\boxhdisplacement-\boxoffset + {\global\boxhdisplacement\dimexpr-.5\wd\nextbox-\boxoffset\relax \global\boxvdisplacement-\boxoffset - \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} +% \def\syst_boxes_baselineleftbox_finish +% {\global\boxhdisplacement-\wd\nextbox +% \global\advance\boxhdisplacement-\boxoffset +% \global\boxvdisplacement-\boxoffset +% \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_baselineleftbox_finish - {\global\boxhdisplacement-\wd\nextbox - \global\advance\boxhdisplacement-\boxoffset + {\global\boxhdisplacement\dimexpr-\wd\nextbox-\boxoffset\relax \global\boxvdisplacement-\boxoffset - \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} +% \def\syst_boxes_baselinerightbox_finish +% {\global\boxhdisplacement\boxoffset +% \global\boxvdisplacement-\boxoffset +% \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox +% \egroup} + \def\syst_boxes_baselinerightbox_finish {\global\boxhdisplacement\boxoffset \global\boxvdisplacement-\boxoffset - \boxcursor\kern\boxhdisplacement\raise-\boxvdisplacement\box\nextbox + \boxcursor + \boxxmove\nextbox \boxhdisplacement + \boxymove\nextbox-\boxvdisplacement + \box\nextbox \egroup} %D \macros @@ -2591,14 +2779,14 @@ \def\syst_boxes_lower_indeed{\dowithnextboxcs\syst_boxes_lower_finish} \def\syst_boxes_raise_finish - {\setbox\nextbox\hpack{\raise\scratchdimen\box\nextbox}% + {\boxyoffset\nextbox\scratchdimen \ht\nextbox\strutht \dp\nextbox\strutdp \box\nextbox \egroup} \def\syst_boxes_lower_finish - {\setbox\nextbox\hpack{\lower\scratchdimen\box\nextbox}% + {\boxyoffset\nextbox-\scratchdimen \ht\nextbox\strutht \dp\nextbox\strutdp \box\nextbox diff --git a/tex/context/base/mkiv/syst-con.mkiv b/tex/context/base/mkiv/syst-con.mkiv index afbdf8605..56155460a 100644 --- a/tex/context/base/mkiv/syst-con.mkiv +++ b/tex/context/base/mkiv/syst-con.mkiv @@ -15,36 +15,10 @@ \unprotect -%D When the number of conversions grew, it did no longer make -%D sense to spread them over multiple files. So, instead of -%D defining these in \type {font-ini}, we now have a dedicated -%D module. - -%D \macros -%D {lchexnumber,uchexnumber,lchexnumbers,uchexnumbers} -%D -%D In addition to the uppercase hex conversion, as needed in -%D math families, we occasionally need a lowercase one, for -%D instance when we want to compose gbsong fontnames. -%D -%D The ugly indirectness is needed to get rid of \TEX\ -%D induced spaces and \type {\relax}'s. +%D \macros{lchexnumber,uchexnumber,lchexnumbers,uchexnumbers} %D -%D \starttyping -%D [\uchexnumber{0}] -%D [\uchexnumber\scratchcounter] -%D [\uchexnumber\zerocount] -%D [\uchexnumber{\number0}] -%D [\uchexnumber{\number\scratchcounter}] -%D [\uchexnumber{\number\zerocount}] -%D [\uchexnumber{\the\scratchcounter}] -%D [\uchexnumber{\the\zerocount}] -%D [\expandafter\uchexnumber\expandafter{\number0}] -%D [\expandafter\uchexnumber\expandafter{\number\scratchcounter}] -%D [\expandafter\uchexnumber\expandafter{\number\zerocount}] -%D [\expandafter\uchexnumber\expandafter{\the\scratchcounter}] -%D [\expandafter\uchexnumber\expandafter{\the\zerocount}] -%D \stoptyping +%D In addition to the uppercase hex conversion, as needed in math families, we +%D occasionally need a lowercase one. \def\lchexnumber #1{\clf_lchexnumber \numexpr#1\relax} \def\uchexnumber #1{\clf_uchexnumber \numexpr#1\relax} @@ -53,33 +27,28 @@ \let\hexnumber\uchexnumber -%D \macros -%D {octnumber} +%D \macros{octnumber} %D -%D For unicode remapping purposes, we need octal numbers. +%D For \UNICODE\ remapping purposes, we need octal numbers. \def\octnumber#1{\clf_octnumber\numexpr#1\relax} -%D \macros -%D {hexstringtonumber,octstringtonumber} +%D \macros{hexstringtonumber,octstringtonumber} %D -%D This macro converts a two character hexadecimal number into -%D a decimal number, thereby taking care of lowercase characters -%D as well. +%D This macro converts a two character hexadecimal number into a decimal number, +%D thereby taking care of lowercase characters as well. \def\hexstringtonumber#1{\clf_hexstringtonumber\numexpr#1\relax} \def\octstringtonumber#1{\clf_octstringtonumber\numexpr#1\relax} -%D \macros -%D {rawcharacter} +%D \macros{rawcharacter} %D -%D This macro can be used to produce proper 8 bit characters -%D that we sometimes need in backends and round||trips. +%D This macro can be used to produce proper 8 bit characters that we sometimes need +%D in backends and round||trips. \def\rawcharacter#1{\clf_rawcharacter\numexpr#1\relax} -%D \macros -%D {twodigits, threedigits} +%D \macros{twodigits, threedigits} %D %D These macros provides two or three digits always: @@ -88,50 +57,42 @@ %D \macros{modulonumber} %D -%D In the conversion macros described in \type {core-con} we -%D need a wrap||around method. The following solution is -%D provided by Taco. +%D In the conversion macros described in \type {core-con} we need a wrap||around +%D method. The following solution is provided by Taco. %D -%D The \type {modulonumber} macro expands to the mathematical -%D modulo of a positive integer. It is crucial for it's -%D application that this macro is fully exandable. +%D The \type {modulonumber} macro expands to the mathematical modulo of a positive +%D integer. It is crucial for it's application that this macro is fully exandable. %D -%D The expression inside the \type {\numexpr} itself is -%D somewhat bizarre because \ETEX\ uses a rounding -%D division instead of truncation. If \ETEX's division -%D would have behaved like \TEX's normal\type{\divide}, then -%D the expression could have been somewhat simpler, like -%D \type {#2-(#2/#1)*#1}. This works just as well, but a bit -%D more complex. +%D The expression inside the \type {\numexpr} itself is somewhat bizarre because +%D \ETEX\ uses a rounding division instead of truncation. If \ETEX's division would +%D have behaved like \TEX's normal\type {\divide}, then the expression could have +%D been somewhat simpler, like \type {#2-(#2/#1)*#1}. This works just as well, but a +%D bit more complex. -\def\modulonumber#1#2% - {\the\numexpr#2-((((#2+(#1/2))/#1)-1)*#1)\relax} +\def\modulonumber#1#2{\the\numexpr#2-((((#2+(#1/2))/#1)-1)*#1)\relax} %D \macros{modulatednumber} %D -%D Modulo numbers run from zero to one less than the limit, -%D but for conversion sets, we need a value between 1 and the -%D limit. The \type{\modulatednumber} arranges that. This -%D macro also needs to be fully expandable, resulting in -%D two \type{\numexpr}s. +%D Modulo numbers run from zero to one less than the limit, but for conversion sets, +%D we need a value between 1 and the limit. The \type {\modulatednumber} arranges +%D that. This macro also needs to be fully expandable, resulting in two \type +%D {\numexpr}s. \def\modulatednumber#1#2% {\ifnum\the\numexpr\modulonumber{#1}{#2}\relax=0 #1% \else \the\numexpr\modulonumber{#1}{#2}\relax \fi} -%D \macros -%D {realnumber} % used? +%D \macros{setcalculatedsin,setcalculatedcos,setcalculatedtan} -\def\realnumber#1{\withoutpt\the\dimexpr#1\s!pt\relax} % brrr +\unexpanded\def\setcalculatedsin#1#2{\edef#1{\clf_sind#2}} +\unexpanded\def\setcalculatedcos#1#2{\edef#1{\clf_cosd#2}} +\unexpanded\def\setcalculatedtan#1#2{\edef#1{\clf_tand#2}} -%D \macros -%D {setcalculatedsin,setcalculatedcos,setcalculatedtan} - -\def\setcalculatedsin#1#2{\edef#1{\clf_sind#2}} -\def\setcalculatedcos#1#2{\edef#1{\clf_cosd#2}} -\def\setcalculatedtan#1#2{\edef#1{\clf_tand#2}} +%D \macros{formatted,format} \def\formatted#1{\ctxcommand{format(#1)}} % not clf \unexpanded\def\format #1{\ctxcommand{format(#1)}} % not clf +%D The \type {\modulatednumber} and \type {\realnumber} macros have been removed. + \protect \endinput diff --git a/tex/context/base/mkiv/syst-con.mkxl b/tex/context/base/mkiv/syst-con.mkxl new file mode 100644 index 000000000..c3293b221 --- /dev/null +++ b/tex/context/base/mkiv/syst-con.mkxl @@ -0,0 +1,93 @@ +%D \module +%D [ file=syst-con, +%D version=2006.09.16, % real old stuff ... 2000.12.10 +%D title=\CONTEXT\ System Macros, +%D subtitle=Conversions, +%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. + +\registerctxluafile{syst-con}{} + +\unprotect + +%D \macros{lchexnumber,uchexnumber,lchexnumbers,uchexnumbers} +%D +%D In addition to the uppercase hex conversion, as needed in math families, we +%D occasionally need a lowercase one. + +\def\lchexnumber #1{\clf_lchexnumber \numexpr#1\relax} +\def\uchexnumber #1{\clf_uchexnumber \numexpr#1\relax} +\def\lchexnumbers#1{\clf_lchexnumbers\numexpr#1\relax} +\def\uchexnumbers#1{\clf_uchexnumbers\numexpr#1\relax} + +\let\hexnumber\uchexnumber + +%D \macros{octnumber} +%D +%D For \UNICODE\ remapping purposes, we need octal numbers. + +\def\octnumber#1{\clf_octnumber\numexpr#1\relax} + +%D \macros{hexstringtonumber,octstringtonumber} +%D +%D This macro converts a two character hexadecimal number into a decimal number, +%D thereby taking care of lowercase characters as well. + +\def\hexstringtonumber#1{\clf_hexstringtonumber\numexpr#1\relax} +\def\octstringtonumber#1{\clf_octstringtonumber\numexpr#1\relax} + +%D \macros{rawcharacter} +%D +%D This macro can be used to produce proper 8 bit characters that we sometimes need +%D in backends and round||trips. + +\def\rawcharacter#1{\clf_rawcharacter\numexpr#1\relax} + +%D \macros{twodigits, threedigits} +%D +%D These macros provides two or three digits always: + +\def\twodigits #1{\ifnum #1<10 0\fi\number#1} +\def\threedigits#1{\ifnum#1<100 \ifnum#1<10 0\fi0\fi\number#1} + +%D \macros{modulonumber} +%D +%D In the conversion macros described in \type {core-con} we need a wrap||around +%D method. The following solution is provided by Taco. +%D +%D The \type {modulonumber} macro expands to the mathematical modulo of a positive +%D integer. It is crucial for it's application that this macro is fully exandable. +%D +%D The expression inside the \type {\numexpr} itself is somewhat bizarre because +%D \ETEX\ uses a rounding division instead of truncation. If \ETEX's division would +%D have behaved like \TEX's normal\type {\divide}, then the expression could have +%D been somewhat simpler, like \type {#2-(#2/#1)*#1}. This works just as well, but a +%D bit more complex. +%D +%D \starttyping +%D \def\modulonumber#1#2{\the\numexpr#2-((((#2+(#1/2))/#1)-1)*#1)\relax} +%D \stoptyping +%D +%D But \unknown\ now we can also do this: + +\def\modulonumber#1#2{\the\numexpr#2-(#2:#1)*#1\relax} + +%D \macros{setcalculatedsin,setcalculatedcos,setcalculatedtan} + +\unexpanded\def\setcalculatedsin#1#2{\edef#1{\clf_sind#2}} +\unexpanded\def\setcalculatedcos#1#2{\edef#1{\clf_cosd#2}} +\unexpanded\def\setcalculatedtan#1#2{\edef#1{\clf_tand#2}} + +%D \macros{formatted,format} + + \def\formatted#1{\ctxcommand{format(#1)}} % not clf +\unexpanded\def\format #1{\ctxcommand{format(#1)}} % not clf + +%D The \type {\modulatednumber} and \type {\realnumber} macros have been removed. + +\protect \endinput diff --git a/tex/context/base/mkiv/syst-lua.mkiv b/tex/context/base/mkiv/syst-lua.mkiv index a9905c7cc..3683f9ed8 100644 --- a/tex/context/base/mkiv/syst-lua.mkiv +++ b/tex/context/base/mkiv/syst-lua.mkiv @@ -24,31 +24,31 @@ %D {\expanded} primitive were mentioned in talks.} trip. For now I don't really see %D other useful applications. -\def\expandeddoif#1#2% +\def\expandeddoifelse#1#2% {\immediateassignment\edef\m_syst_string_one{#1}% \immediateassignment\edef\m_syst_string_two{#2}% \ifx\m_syst_string_one\m_syst_string_two - \expandafter\firstofoneargument + \expandafter\firstoftwoarguments \else - \expandafter\gobbleoneargument + \expandafter\secondoftwoarguments \fi} -\def\expandeddoifnot#1#2% +\def\expandeddoif#1#2% {\immediateassignment\edef\m_syst_string_one{#1}% \immediateassignment\edef\m_syst_string_two{#2}% \ifx\m_syst_string_one\m_syst_string_two - \expandafter\gobbleoneargument - \else \expandafter\firstofoneargument + \else + \expandafter\gobbleoneargument \fi} -\def\expandeddoifelse#1#2% +\def\expandeddoifnot#1#2% {\immediateassignment\edef\m_syst_string_one{#1}% \immediateassignment\edef\m_syst_string_two{#2}% \ifx\m_syst_string_one\m_syst_string_two - \expandafter\firstoftwoarguments + \expandafter\gobbleoneargument \else - \expandafter\secondoftwoarguments + \expandafter\firstofoneargument \fi} % \testfeatureonce{100000}{\doifelse{hello world}{here i am}{}} % 0.3 @@ -60,35 +60,24 @@ \def\expdoifcommonelse\expdoifelsecommon \def\expdoifinsetelse \expdoifelseinset -% we define these here, just in case ... +%D We define these here, just in case. This permits \typefile {self} otherwise +%D nested b|/|e sep problems. -\def\luastringsep{===} % this permits \typefile{self} otherwise nested b/e sep problems +\def\luastringsep{===} \edef\!!bs{[\luastringsep[} \edef\!!es{]\luastringsep]} \unexpanded\def\writestatus#1#2{\clf_writestatus{#1}{#2}} -% A handy helper: - -% \def\luaexpr#1{\ctxlua{context(tostring(#1))}} % more efficient: - -% We can omit the tex.ctxcatcodes here as nowadays we seldom -% change the regime at the \TEX\ end: +%D We can omit the tex.ctxcatcodes here as nowadays we seldom change the regime at +%D the \TEX\ end: +%def\luaexpr#1{\ctxlua{context (tostring(#1))}} % more efficient: \def\luaexpr#1{\ctxlua{tex.print(tostring(#1))}} % no use is shortcutting has to be compiled -% helpers: - -\def\ui_fo #1{#1} -\def\ui_go #1{} -\def\ui_ft#1#2{#1} -\def\ui_st#1#2{#2} - - -%D But as we only use write 16 we could as well do all in \LUA\ -%D and ignore the rest. Okay, we still can do writes here but only -%D when not blocked. +%D But as we only use write 16 we could as well do all in \LUA\ and ignore the rest. +%D Okay, we still can do writes here but only when not blocked. \let\syst_write_execute\clf_execute % always {...} diff --git a/tex/context/base/mkiv/syst-lua.mkxl b/tex/context/base/mkiv/syst-lua.mkxl new file mode 100644 index 000000000..b6f1e8eaa --- /dev/null +++ b/tex/context/base/mkiv/syst-lua.mkxl @@ -0,0 +1,61 @@ +%D \module +%D [ file=syst-lua, +%D version=2008.01.25, +%D title=\CONTEXT\ System Macros, +%D subtitle=Helper macros based on \LUA, +%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. + +\registerctxluafile{syst-lua}{} + +\unprotect + +\def\expdoifelse#1#2{\clf_doifelsesame{#1}{#2}} +\def\expdoif #1#2{\clf_doifsame {#1}{#2}} +\def\expdoifnot #1#2{\clf_doifnotsame {#1}{#2}} + +%D Here is variant using a brainwave of the 12\high{+} hour \quotation {Long Road +%D Out of Eden}\footnote {Eden being Backo\TeX\ 2018, where the virtues of the \type +%D {\expanded} primitive were mentioned in talks.} trip. For now I don't really see +%D other useful applications. + +\def\expandeddoifelse#1#2{\iftok{#1}{#2}\expandafter\firstoftwoarguments\else\expandafter\secondoftwoarguments\fi} +\def\expandeddoif #1#2{\iftok{#1}{#2}\expandafter\firstofoneargument \else\expandafter\gobbleoneargument \fi} +\def\expandeddoifnot #1#2{\iftok{#1}{#2}\expandafter\gobbleoneargument \else\expandafter\firstofoneargument \fi} + +% \testfeatureonce{100000}{\doifelse{hello world}{here i am}{}} % 0.3 +% \testfeatureonce{100000}{\expandabledoifelse{hello world}{here i am}{}} % 1.5 + +\def\expdoifelsecommon#1#2{\clf_doifelsecommon{#1}{#2}} +\def\expdoifelseinset #1#2{\clf_doifelseinset {#1}{#2}} + +\def\expdoifcommonelse\expdoifelsecommon +\def\expdoifinsetelse \expdoifelseinset + +%D We define these here, just in case. This permits \typefile {self} otherwise +%D nested b|/|e sep problems. + +\def\luastringsep{===} + +\edef\!!bs{[\luastringsep[} +\edef\!!es{]\luastringsep]} + +\unexpanded\def\writestatus#1#2{\clf_writestatus{#1}{#2}} + +%D We can omit the tex.ctxcatcodes here as nowadays we seldom change the regime at +%D the \TEX\ end: + +%def\luaexpr#1{\ctxlua{context (tostring(#1))}} % more efficient: +\def\luaexpr#1{\ctxlua{tex.print(tostring(#1))}} % no use is shortcutting has to be compiled + +%D But as we only use write 16 we could as well do all in \LUA\ and ignore the rest. +%D Okay, we still can do writes here but only when not blocked. + +\let\syst_write_execute\clf_execute % always {...} + +\protect \endinput diff --git a/tex/context/base/mkiv/tabl-tsp.mkiv b/tex/context/base/mkiv/tabl-tsp.mkiv index 9395f4039..9e30975cd 100644 --- a/tex/context/base/mkiv/tabl-tsp.mkiv +++ b/tex/context/base/mkiv/tabl-tsp.mkiv @@ -187,9 +187,9 @@ \bgroup \forcelocalfloats \setuplocalfloats[\c!before=,\c!after=,\c!inbetween=]% - \settrialtypesetting % this controls samepage resetting too +% \settrialtypesetting % this controls samepage resetting too but it also messes up the numbering \splitfloatcommand{\hbox to #1{\strut}}% dummy line - \resettrialtypesetting +% \resettrialtypesetting \setbox\scratchbox\vbox{\flushlocalfloats}% \vpack ? \getnoflines{\ht\scratchbox}% \resetlocalfloats diff --git a/tex/context/filenames.pdf b/tex/context/filenames.pdf new file mode 100644 index 000000000..6e1f07bf0 Binary files /dev/null and b/tex/context/filenames.pdf differ diff --git a/tex/context/filenames.tex b/tex/context/filenames.tex new file mode 100644 index 000000000..bf40b6445 --- /dev/null +++ b/tex/context/filenames.tex @@ -0,0 +1,119 @@ +% language=uk + +\usemodule[article-basic] +\usemodule[abbreviations-logos] + +\setupheader[state=high] + +\starttext + +\starttitle[title=Filenames] + +The \CONTEXT\ distribution follows a rather strict organisation. Originally +all files that implemented macros had names using the pattern: + +\starttabulate[|Tw(10em)||] +\FL +\NC xxxx-xxx.tex \NC \TEX\ file \NC \NR +\NC mp-xxxx.mp \NC \METAPOST\ file \NC \NR +\LL +\stoptabulate + +You can still find files that conform to these patterns but the organization +evolved. The \type {tex} suffix is now normally used just for documents. + +Styles and modules can have names of any length, and can be recognized by their +prefix: + +\starttabulate[|Tw(10em)||] +\FL +\NC s-aaaa.tex \NC style (rendering related) \NC \NR +\NC m-aaaaaa.tex \NC module (functionality related) \NC \NR +\NC x-aaaaa.tex \NC xml module (functionality related) \NC \NR +\LL +\stoptabulate + +\CONTEXT\ \MKII, the frozen version for \PDFTEX\ and \XETEX, uses names like: + +\starttabulate[|Tw(10em)||] +\FL +\NC context.mkii \NC the main \TEX\ file \NC \NR +\NC cont-xx.mkii \NC an interface specific \TEX\ file \NC \NR +\NC xxxx-xxx.mkii \NC \TEX\ file \NC \NR +\ML +\NC mp-xxxx.mpii \NC \METAPOST\ file \NC \NR +\NC metafun.mpii \NC the main \METAFUN\ file \NC \NR +\LL +\stoptabulate + +\CONTEXT\ \MKIV, the current version, has files with names like: + +\starttabulate[|Tw(10em)||] +\FL +\NC context.mkiv \NC the main \TEX\ file \NC \NR +\NC cont-xx.mkiv \NC an interface specific \TEX\ file \NC \NR +\NC xxxx-xxx.mkiv \NC \TEX\ file \NC \NR +\NC xxxx-xxx.mkvi \NC \TEX\ file with named parameters \NC \NR +\NC xxxx-xxx.mkix \NC file with \LMX\ template \NC \NR +\NC xxxx-xxx.mkxi \NC file with \LMX\ template with named parameters \NC \NR +\NC xxxx-xxx.lua \NC a file with \LUA\ code \NC \NR +\NC xxxx-xxx.lfg \NC so called font goodie \LUA\ files \NC \NR +\ML +\NC metafun.mpiv \NC the main \METAFUN\ file \NC \NR +\NC minifun.mpiv \NC a subset of \METAFUN\ \NC \NR +\NC mp-xxxx.mpiv \NC \METAPOST\ file \NC \NR +\LL +\stoptabulate + +There are more suffixes used, like \type {tua} and \type {tuc} for multipass +jobdata, and \type {log} for log files. In the cache tree you can run into \type +{luv}, \type {lui}, \type {luj} and \type {lum} for startup data, +\type {tma} for \LUA\ cache files, \type {tmb} for \LUAJITTEX\ bytecode, \type +{tmc} for \LUATEX {bytecode} and \type {tmd} for \LUAMETATEX\ bytecode, but you +can forget about them. + +There can be files with \type {-imp-} in the name: these relate to other files with +a similar name. + +The follow up on \MKIV\ is called \LMTX\ (or MkXL?) and is compatible with \MKIV: it uses, +at least now, mostly the same code. But, as it depends on \LUAMETATEX\ it also +has some different internals. Therefore you will find some additional files: + +\starttabulate[|Tw(10em)||] +\FL +\NC context.mkxl \NC the main \TEX\ file \NC \NR +\NC cont-xx.mkxl \NC an interface specific \TEX\ file \NC \NR +\NC xxxx-xxx.mkxl \NC \TEX\ file \NC \NR +\NC xxxx-xxx.mklx \NC \TEX\ file with named parameters \NC \NR +\ML +\NC metafun.mpxl \NC the main \METAFUN\ file \NC \NR +\NC minifun.mpxl \NC a subset of \METAFUN\ \NC \NR +\NC mp-xxxx.mpxl \NC \METAPOST\ file \NC \NR +\LL +\stoptabulate + +This means that a file \type {xxxx-xxx} can be present with any of the \type +{mk..} suffixes. In the standard distribution the \MKII\ and \MKIV\ files have +their own path (directory), and \LMTX\ only ships what it needs. + +This somewhat complicated setup is needed in order to support both \LUATEX\ and +\LUAMETATEX\ system. The more \LUAMETATEX\ diverges from \LUATEX, the more the +codebase will be split so eventually we might end up with \MKII, \MKIV\ and \LMTX\ +as more or less independent versions. We try to share the \LUA\ code as much as +possible, also because some components are generic. + +The name pattern \type {xxxx-} groups the files in categories. These are also +referred to from the interface definitions. Examples of categories are \type +{syst} for system modules that define various low level support macros and +mechanisms. The user interface is handled by modules in the \type {mult} +namespace. The \type {supp} modules layer on top of that and provide more +helpers. The \type {font} and \type {type} modules deal with fonts, \type {lang} +handles language support. The \type {strc} modules implement structural +components, \type {tabl} does tables and \type {page} handles the layout. +Specialized categories like \type {mlib}, \type {meta} and \type {grph} are for +graphics, and \type {publ} is used for the publication (bibliography) subsystem. +Just to give you an idea. + +\stoptitle + +\stoptext diff --git a/tex/context/interface/mkii/keys-ro.xml b/tex/context/interface/mkii/keys-ro.xml index 9a2154718..77404fcff 100644 --- a/tex/context/interface/mkii/keys-ro.xml +++ b/tex/context/interface/mkii/keys-ro.xml @@ -643,6 +643,7 @@ + @@ -872,6 +873,7 @@ + @@ -1292,6 +1294,7 @@ + @@ -1302,6 +1305,7 @@ + @@ -1309,6 +1313,7 @@ + diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf index e1c0e85ae..20ca3b4a7 100644 Binary files a/tex/context/interface/mkiv/i-context.pdf and b/tex/context/interface/mkiv/i-context.pdf differ diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf index 9fa13268b..41bca13ac 100644 Binary files a/tex/context/interface/mkiv/i-readme.pdf and b/tex/context/interface/mkiv/i-readme.pdf differ diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index c43b1d8da..7b3dbccbd 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 : 07/31/19 18:05:38 +-- merge date : 08/02/19 19:40:08 do -- begin closure to overcome local limits and interference -- cgit v1.2.3