From 57cb4d86632ca8ec2a5f5aba4d75bc0e8c46c55c Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Mon, 19 Jan 2015 12:15:05 +0100 Subject: 2015-01-19 11:22:00 --- .../lexers/data/scite-context-data-context.lua | 2 +- .../lexers/data/scite-context-data-metafun.lua | 2 +- .../lexers/data/scite-context-data-metapost.lua | 2 + .../context/scite-context-data-context.properties | 46 +-- .../context/scite-context-data-metafun.properties | 60 ++-- .../context/scite-context-data-metapost.properties | 24 ++ metapost/context/base/mp-base.mpiv | 2 +- metapost/context/base/mp-func.mpiv | 16 +- metapost/context/base/mp-mlib.mpiv | 363 +++++++++++++-------- metapost/context/base/mp-tool.mpiv | 55 +++- tex/context/base/attr-col.lua | 31 ++ tex/context/base/colo-ini.lua | 149 +++++---- tex/context/base/colo-ini.mkiv | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4386 -> 4385 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/lpdf-col.lua | 11 +- tex/context/base/math-stc.mkvi | 2 +- tex/context/base/mlib-pps.lua | 164 ++++++---- tex/context/base/mult-fun.lua | 20 +- tex/context/base/mult-low.lua | 1 + tex/context/base/mult-mps.lua | 28 ++ tex/context/base/publ-imp-apa.mkvi | 7 +- tex/context/base/status-files.pdf | Bin 24940 -> 24940 bytes tex/context/base/status-lua.pdf | Bin 333195 -> 333149 bytes tex/context/base/syst-ini.mkiv | 2 + tex/context/base/tabl-ntb.mkiv | 8 +- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 28 files changed, 643 insertions(+), 360 deletions(-) diff --git a/context/data/scite/context/lexers/data/scite-context-data-context.lua b/context/data/scite/context/lexers/data/scite-context-data-context.lua index 6242ba3b2..c117428b3 100644 --- a/context/data/scite/context/lexers/data/scite-context-data-context.lua +++ b/context/data/scite/context/lexers/data/scite-context-data-context.lua @@ -1,4 +1,4 @@ return { - ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "etexversion", "pdftexversion", "xetexversion", "xetexrevision", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "setupdocument", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "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", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar" }, + ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "etexversion", "pdftexversion", "xetexversion", "xetexrevision", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "spaceasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vcentergroupcode", "mathchoicegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "vadjustgroupcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "charifcode", "catifcode", "numifcode", "dimifcode", "oddifcode", "vmodeifcode", "hmodeifcode", "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "setupdocument", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "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", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar" }, ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "doifelsecommandhandler", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "strippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthsargumenttrue", "sixthargumentfalse", "sixtsargumenttrue", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "reqno", "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", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "scratchdimen", "globalscratchdimen", "scratchskip", "globalscratchskip", "scratchmuskip", "globalscratchmuskip", "scratchtoks", "globalscratchtoks", "scratchbox", "globalscratchbox", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "doifinset", "doifnotinset", "doifinsetelse", "doifnextcharelse", "doifnextoptionalelse", "doifnextoptionalcselse", "doiffastoptionalcheckelse", "doifnextbgroupelse", "doifnextbgroupcselse", "doifnextparenthesiselse", "doifundefinedelse", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifdimensionelse", "doifnumberelse", "doifnumber", "doifnotnumber", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifinstringelse", "doifassignmentelse", "docheckassignment", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "nbsp", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "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", "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", "dowith", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "newmacro", "setnewmacro", "newfraction", "newsignal", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "begstrut", "endstrut", "lineheight", "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", "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", "expdoifelse", "expdoif", "expdoifnot", "expdoifcommonelse", "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", "carryoverpar", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "lefttoright", "righttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath" }, } \ No newline at end of file diff --git a/context/data/scite/context/lexers/data/scite-context-data-metafun.lua b/context/data/scite/context/lexers/data/scite-context-data-metafun.lua index 1eca861f9..ea7db4376 100644 --- a/context/data/scite/context/lexers/data/scite-context-data-metafun.lua +++ b/context/data/scite/context/lexers/data/scite-context-data-metafun.lua @@ -1,4 +1,4 @@ return { - ["commands"]={ "transparency", "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshading", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", "shadedinto", "withshade", "withcircularshade", "withlinearshade", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "figure", "register", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", "infont", "set_linear_vector", "set_circular_vector", "linear_shade", "circular_shade", "define_linear_shade", "define_circular_shade", "define_circular_linear_shade", "define_circular_linear_shade", "define_sampled_linear_shade", "define_sampled_circular_shade", "space", "crlf", "dquote", "SPACE", "CRLF", "DQUOTE", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedpath", "constructedpairs", "punkedfunction", "straightfunction", "curvedfunction", "tightfunction", "punkedpath", "straightpath", "curvedpath", "tightpath", "punkedpairs", "straightpairs", "curvedpairs", "tightpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "basiccolors", "normalfill", "normaldraw", "visualizepaths", "naturalizepaths", "drawboundary", "drawwholepath", "visualizeddraw", "visualizedfill", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "format", "formatted", "startpassingvariable", "stoppassingvariable", "eofill", "eoclip", "area" }, + ["commands"]={ "transparency", "sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian", "tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos", "invsin", "invcos", "invtan", "acosh", "asinh", "sinh", "cosh", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", "lltriangle", "lrtriangle", "urtriangle", "ultriangle", "uptriangle", "downtriangle", "lefttriangle", "righttriangle", "triangle", "smoothed", "cornered", "superellipsed", "randomized", "squeezed", "enlonged", "shortened", "punked", "curved", "unspiked", "simplified", "blownup", "stretched", "enlarged", "leftenlarged", "topenlarged", "rightenlarged", "bottomenlarged", "crossed", "laddered", "randomshifted", "interpolated", "paralleled", "cutends", "peepholed", "llenlarged", "lrenlarged", "urenlarged", "ulenlarged", "llmoved", "lrmoved", "urmoved", "ulmoved", "rightarrow", "leftarrow", "centerarrow", "boundingbox", "innerboundingbox", "outerboundingbox", "pushboundingbox", "popboundingbox", "bottomboundary", "leftboundary", "topboundary", "rightboundary", "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", "withshade", "withcircularshade", "withlinearshade", "defineshade", "shaded", "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", "onlayer", "along", "graphictext", "loadfigure", "externalfigure", "figure", "register", "withmask", "bitmapimage", "colordecimals", "ddecimal", "dddecimal", "ddddecimal", "textext", "thetextext", "rawtextext", "textextoffset", "verbatim", "thelabel", "label", "autoalign", "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", "infont", "space", "crlf", "dquote", "SPACE", "CRLF", "DQUOTE", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", "readfile", "clearxy", "unitvector", "center", "epsed", "anchored", "originpath", "infinite", "break", "xstretched", "ystretched", "snapped", "pathconnectors", "function", "constructedpath", "constructedpairs", "punkedfunction", "straightfunction", "curvedfunction", "tightfunction", "punkedpath", "straightpath", "curvedpath", "tightpath", "punkedpairs", "straightpairs", "curvedpairs", "tightpairs", "evenly", "oddly", "condition", "pushcurrentpicture", "popcurrentpicture", "arrowpath", "tensecircle", "roundedsquare", "colortype", "whitecolor", "blackcolor", "basiccolors", "normalfill", "normaldraw", "visualizepaths", "naturalizepaths", "drawboundary", "drawwholepath", "visualizeddraw", "visualizedfill", "draworigin", "drawboundingbox", "drawpath", "drawpoint", "drawpoints", "drawcontrolpoints", "drawcontrollines", "drawpointlabels", "drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions", "draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions", "undashed", "decorated", "redecorated", "undecorated", "passvariable", "passarrayvariable", "tostring", "format", "formatted", "startpassingvariable", "stoppassingvariable", "eofill", "eoclip", "area" }, ["internals"]={ "nocolormodel", "greycolormodel", "graycolormodel", "rgbcolormodel", "cmykcolormodel", "shadefactor", "textextoffset", "normaltransparent", "multiplytransparent", "screentransparent", "overlaytransparent", "softlighttransparent", "hardlighttransparent", "colordodgetransparent", "colorburntransparent", "darkentransparent", "lightentransparent", "differencetransparent", "exclusiontransparent", "huetransparent", "saturationtransparent", "colortransparent", "luminositytransparent", "metapostversion", "maxdimensions" }, } \ 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 203fef685..cc53b0c30 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 @@ -1,6 +1,8 @@ return { ["commands"]={ "upto", "downto", "beginfig", "endfig", "beginglyph", "endglyph", "charscale", "rotatedaround", "reflectedabout", "arrowhead", "currentpen", "currentpicture", "cuttings", "defaultfont", "extra_beginfig", "extra_endfig", "ditto", "EOF", "down", "evenly", "fullcircle", "halfcircle", "identity", "in", "left", "pensquare", "penrazor", "penspec", "origin", "quartercircle", "right", "unitsquare", "up", "withdots", "abs", "bbox", "ceiling", "center", "cutafter", "cutbefore", "dir", "directionpoint", "div", "dotprod", "intersectionpoint", "inverse", "mod", "round", "unitvector", "whatever", "cutdraw", "draw", "drawarrow", "drawdblarrow", "fill", "filldraw", "drawdot", "loggingall", "interact", "tracingall", "tracingnone", "pickup", "undraw", "unfill", "unfilldraw", "buildcycle", "dashpattern", "decr", "dotlabel", "dotlabels", "drawoptions", "incr", "label", "labels", "max", "min", "thelabel", "z", "beginchar", "blacker", "capsule_end", "change_width", "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", "endchar", "extra_beginchar", "extra_endchar", "extra_setup", "font_coding_scheme", "clearxy", "clearit", "clearpen", "shipit", "font_extra_space", "exitunless", "relax", "hide", "gobble", "gobbled", "stop", "blankpicture", "counterclockwise", "tensepath", "takepower", "direction", "softjoin", "makelabel", "rotatedabout", "flex", "superellipse", "image", "nullpen", "savepen", "clearpen", "penpos", "penlabels", "range", "thru", "z", "laboff", "bye", "red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "background", "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in", "triplet", "quadruplet" }, + ["disabled"]={ "verbatimtex" }, ["internals"]={ "mitered", "rounded", "beveled", "butt", "squared", "eps", "epsilon", "infinity", "bboxmargin", "ahlength", "ahangle", "labeloffset", "dotlabeldiam", "defaultpen", "defaultscale", "join_radius", "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", "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", "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", "proofing", "proofoffset", "proofrule", "proofrulethickness", "rulepen", "screenchars", "screenrule", "screenstrokes", "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", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "hex", "infont", "intersectiontimes", "known", "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", "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", "readstring", "scantokens", "end", "outer", "inner", "write", "to", "readfrom", "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" }, ["shortcuts"]={ "..", "...", "--", "---", "&" }, ["tex"]={ "btex", "etex", "verbatimtex" }, diff --git a/context/data/scite/context/scite-context-data-context.properties b/context/data/scite/context/scite-context-data-context.properties index 91affd6fc..ab2d9f2cd 100644 --- a/context/data/scite/context/scite-context-data-context.properties +++ b/context/data/scite/context/scite-context-data-context.properties @@ -42,29 +42,29 @@ fontcharifcode fontslantperpoint fontinterwordspace fontinterwordstretch fontint fontexheight fontemwidth fontextraspace slantperpoint interwordspace \ interwordstretch interwordshrink exheight emwidth extraspace \ mathsupdisplay mathsupnormal mathsupcramped mathsubnormal mathsubcombined \ -mathaxisheight startmode stopmode startnotmode stopnotmode \ -startmodeset stopmodeset doifmode doifmodeelse doifnotmode \ -startmodeset stopmodeset startallmodes stopallmodes startnotallmodes \ -stopnotallmodes doifallmodes doifallmodeselse doifnotallmodes startenvironment \ -stopenvironment environment startcomponent stopcomponent component \ -startproduct stopproduct product startproject stopproject \ -project starttext stoptext startnotext stopnotext \ -startdocument stopdocument documentvariable setupdocument startmodule \ -stopmodule usemodule usetexmodule useluamodule setupmodule \ -currentmoduleparameter moduleparameter everystarttext 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 \ -breakablethinspace nobreakspace nonbreakablespace narrownobreakspace zerowidthnobreakspace \ -ideographicspace ideographichalffillspace twoperemspace threeperemspace fourperemspace \ -fiveperemspace sixperemspace figurespace punctuationspace hairspace \ -zerowidthspace zerowidthnonjoiner zerowidthjoiner zwnj zwj \ -optionalspace asciispacechar +mathaxisheight muquad startmode stopmode startnotmode \ +stopnotmode startmodeset stopmodeset doifmode doifmodeelse \ +doifnotmode startmodeset stopmodeset startallmodes stopallmodes \ +startnotallmodes stopnotallmodes doifallmodes doifallmodeselse doifnotallmodes \ +startenvironment stopenvironment environment startcomponent stopcomponent \ +component startproduct stopproduct product startproject \ +stopproject project starttext stoptext startnotext \ +stopnotext startdocument stopdocument documentvariable setupdocument \ +startmodule stopmodule usemodule usetexmodule useluamodule \ +setupmodule currentmoduleparameter moduleparameter everystarttext 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 breakablethinspace nobreakspace nonbreakablespace narrownobreakspace \ +zerowidthnobreakspace ideographicspace ideographichalffillspace twoperemspace threeperemspace \ +fourperemspace fiveperemspace sixperemspace figurespace punctuationspace \ +hairspace zerowidthspace zerowidthnonjoiner zerowidthjoiner zwnj \ +zwj optionalspace asciispacechar keywordclass.context.helpers=\ startsetups stopsetups startxmlsetups stopxmlsetups \ diff --git a/context/data/scite/context/scite-context-data-metafun.properties b/context/data/scite/context/scite-context-data-metafun.properties index 836d634e2..522a5c5da 100644 --- a/context/data/scite/context/scite-context-data-metafun.properties +++ b/context/data/scite/context/scite-context-data-metafun.properties @@ -19,37 +19,35 @@ urmoved ulmoved rightarrow leftarrow centerarrow \ boundingbox innerboundingbox outerboundingbox pushboundingbox popboundingbox \ bottomboundary leftboundary topboundary rightboundary xsized \ ysized xysized sized xyscaled intersection_point \ -intersection_found penpoint bbwidth bbheight withshading \ -withlinearshading withcircularshading withfromshadecolor withtoshadecolor shadedinto \ -withshade withcircularshade withlinearshade cmyk spotcolor \ -multitonecolor namedcolor drawfill undrawfill inverted \ -uncolored softened grayed greyed onlayer \ -along graphictext loadfigure externalfigure figure \ -register withmask bitmapimage colordecimals ddecimal \ -dddecimal ddddecimal textext thetextext rawtextext \ -textextoffset verbatim thelabel label autoalign \ -transparent withtransparency property properties withproperties \ -asgroup infont set_linear_vector set_circular_vector linear_shade \ -circular_shade define_linear_shade define_circular_shade define_circular_linear_shade define_circular_linear_shade \ -define_sampled_linear_shade define_sampled_circular_shade space crlf dquote \ -SPACE CRLF DQUOTE grayscale greyscale \ -withgray withgrey colorpart readfile clearxy \ -unitvector center epsed anchored originpath \ -infinite break xstretched ystretched snapped \ -pathconnectors function constructedpath constructedpairs punkedfunction \ -straightfunction curvedfunction tightfunction punkedpath straightpath \ -curvedpath tightpath punkedpairs straightpairs curvedpairs \ -tightpairs evenly oddly condition pushcurrentpicture \ -popcurrentpicture arrowpath tensecircle roundedsquare colortype \ -whitecolor blackcolor basiccolors normalfill normaldraw \ -visualizepaths naturalizepaths drawboundary drawwholepath visualizeddraw \ -visualizedfill draworigin drawboundingbox drawpath drawpoint \ -drawpoints drawcontrolpoints drawcontrollines drawpointlabels drawlineoptions \ -drawpointoptions drawcontroloptions drawlabeloptions draworiginoptions drawboundoptions \ -drawpathoptions resetdrawoptions undashed decorated redecorated \ -undecorated passvariable passarrayvariable tostring format \ -formatted startpassingvariable stoppassingvariable eofill eoclip \ -area +intersection_found penpoint bbwidth bbheight withshade \ +withcircularshade withlinearshade defineshade shaded shadedinto \ +withshadecolors withshadedomain withshademethod withshadefactor withshadevector \ +withshadecenter cmyk spotcolor multitonecolor namedcolor \ +drawfill undrawfill inverted uncolored softened \ +grayed greyed onlayer along graphictext \ +loadfigure externalfigure figure register withmask \ +bitmapimage colordecimals ddecimal dddecimal ddddecimal \ +textext thetextext rawtextext textextoffset verbatim \ +thelabel label autoalign transparent withtransparency \ +property properties withproperties asgroup infont \ +space crlf dquote SPACE CRLF \ +DQUOTE grayscale greyscale withgray withgrey \ +colorpart readfile clearxy unitvector center \ +epsed anchored originpath infinite break \ +xstretched ystretched snapped pathconnectors function \ +constructedpath constructedpairs punkedfunction straightfunction curvedfunction \ +tightfunction punkedpath straightpath curvedpath tightpath \ +punkedpairs straightpairs curvedpairs tightpairs evenly \ +oddly condition pushcurrentpicture popcurrentpicture arrowpath \ +tensecircle roundedsquare colortype whitecolor blackcolor \ +basiccolors normalfill normaldraw visualizepaths naturalizepaths \ +drawboundary drawwholepath visualizeddraw visualizedfill draworigin \ +drawboundingbox drawpath drawpoint drawpoints drawcontrolpoints \ +drawcontrollines drawpointlabels drawlineoptions drawpointoptions drawcontroloptions \ +drawlabeloptions draworiginoptions drawboundoptions drawpathoptions resetdrawoptions \ +undashed decorated redecorated undecorated passvariable \ +passarrayvariable tostring format formatted startpassingvariable \ +stoppassingvariable eofill eoclip area keywordclass.metafun.internals=\ nocolormodel greycolormodel graycolormodel rgbcolormodel \ diff --git a/context/data/scite/context/scite-context-data-metapost.properties b/context/data/scite/context/scite-context-data-metapost.properties index 57292e592..55bb457a8 100644 --- a/context/data/scite/context/scite-context-data-metapost.properties +++ b/context/data/scite/context/scite-context-data-metapost.properties @@ -30,6 +30,9 @@ yellow black white background mm \ pt dd bp cm pc \ cc in triplet quadruplet +keywordclass.metapost.disabled=\ +verbatimtex + keywordclass.metapost.internals=\ mitered rounded beveled butt \ squared eps epsilon infinity bboxmargin \ @@ -37,6 +40,27 @@ ahlength ahangle labeloffset dotlabeldiam defaultpen \ defaultscale join_radius pen_lft pen_rt pen_top \ pen_bot +keywordclass.metapost.metafont=\ +autorounding beginchar blacker boundarychar \ +capsule_def capsule_end change_width chardp chardx \ +chardy charexists charext charht charic \ +charlist charwd cull cullit currenttransform \ +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 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 proofing proofoffset \ +proofrule proofrulethickness rulepen screenchars screenrule \ +screenstrokes showit slantfont smode smoothing \ +titlefont totalweight tracingedges tracingpens turningcheck \ +unitpixel vppp vround xoffset yoffset + keywordclass.metapost.primitives=\ charcode day linecap linejoin \ miterlimit month pausing prologues showstopping \ diff --git a/metapost/context/base/mp-base.mpiv b/metapost/context/base/mp-base.mpiv index 20f62d6bf..28eb57fb8 100644 --- a/metapost/context/base/mp-base.mpiv +++ b/metapost/context/base/mp-base.mpiv @@ -866,7 +866,7 @@ vardef labels@#(text t) = endfor enddef ; -% til lhere +% till lhere vardef dotlabels@#(text t) = forsuffixes $=t: diff --git a/metapost/context/base/mp-func.mpiv b/metapost/context/base/mp-func.mpiv index 1ff330038..81b37fd1c 100644 --- a/metapost/context/base/mp-func.mpiv +++ b/metapost/context/base/mp-func.mpiv @@ -23,6 +23,7 @@ mfun_pathconnectors[0] := "," ; mfun_pathconnectors[1] := "--" ; mfun_pathconnectors[2] := ".." ; mfun_pathconnectors[3] := "..." ; +mfun_pathconnectors[4] := "---" ; def pathconnectors = mfun_pathconnectors enddef ; @@ -39,9 +40,10 @@ enddef ; def function = mfun_function enddef ; % let doesn't work here def straightfunction = mfun_function (1) enddef ; -def punkedfunction = mfun_function (1) enddef ; def curvedfunction = mfun_function (2) enddef ; -def tightfunction = mfun_function (3) enddef ; + +% def punkedfunction = mfun_function (1) enddef ; % same as straightfunction +% def tightfunction = mfun_function (3) enddef ; % same as curvedfunction vardef mfun_constructedpath (expr f) (text t) = save ok ; boolean ok ; ok := false ; @@ -57,9 +59,10 @@ enddef ; def constructedpath = mfun_constructedpath enddef ; % let doesn't work here def straightpath = mfun_constructedpath (1) enddef ; -def punkedpath = mfun_constructedpath (1) enddef ; def curvedpath = mfun_constructedpath (2) enddef ; -def tightpath = mfun_constructedpath (3) enddef ; + +def punkedpath = mfun_constructedpath (1) enddef ; % same as straightpath +def tightpath = mfun_constructedpath (3) enddef ; % same as curvedpath vardef mfun_constructedpairs (expr f) (text p) = save i ; i := -1 ; @@ -74,6 +77,7 @@ enddef ; def constructedpairs = mfun_constructedpairs enddef ; % let doesn't work here def straightpairs = mfun_constructedpairs (1) enddef ; -def punkedpairs = mfun_constructedpairs (1) enddef ; def curvedpairs = mfun_constructedpairs (2) enddef ; -def tightpairs = mfun_constructedpairs (3) enddef ; + +def punkedpairs = mfun_constructedpairs (1) enddef ; % same as straightpairs +def tightpairs = mfun_constructedpairs (3) enddef ; % same as curvedpairs diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv index 6dffd6cdb..ac1bf7437 100644 --- a/metapost/context/base/mp-mlib.mpiv +++ b/metapost/context/base/mp-mlib.mpiv @@ -60,23 +60,37 @@ def namedcolor (expr n) = withprescript "sp_name=" & n enddef ; +% def spotcolor(expr n, v) = +% 1 +% withprescript "sp_type=spot" +% withprescript "sp_name=" & n +% withprescript "sp_value=" & (if numeric v : decimal v else : v fi) +% enddef ; +% +% def multitonecolor(expr name, fractions, components, value) = +% 1 +% withprescript "sp_type=multitone" +% withprescript "sp_name=" & name +% withprescript "sp_fractions=" & decimal fractions +% withprescript "sp_components=" & components +% withprescript "sp_value=" & value +% enddef ; + def spotcolor(expr n, v) = 1 withprescript "sp_type=spot" withprescript "sp_name=" & n - withprescript "sp_value=" & v + withprescript "sp_value=" & colordecimals v enddef ; -def multitonecolor(expr name, fractions, components, value) = +def multitonecolor(expr name)(text t) = 1 withprescript "sp_type=multitone" - withprescript "sp_name=" & name - withprescript "sp_fractions=" & decimal fractions - withprescript "sp_components=" & components - withprescript "sp_value=" & value + withprescript "sp_name=" & name + withprescript "sp_value=" & colordecimalslist(t) enddef ; -def transparent(expr a, t)(text c) = +def transparent(expr a, t)(text c) = % use withtransparency instead 1 % this permits withcolor x intoshade y withprescript "tr_alternative=" & decimal transparency_alternative_to_number(a) withprescript "tr_transparency=" & decimal t @@ -369,11 +383,163 @@ primarydef str infont name = % nasty hack fi enddef ; +% Helper + +string mfun_prescript_separator ; mfun_prescript_separator := char(13) ; + % Shades -newinternal shadefactor ; shadefactor := 1 ; -pair shadeoffset ; shadeoffset := origin ; -boolean trace_shades ; trace_shades := false ; +% for while we had this: +% +% newinternal shadefactor ; shadefactor := 1 ; +% pair shadeoffset ; shadeoffset := origin ; +% boolean trace_shades ; trace_shades := false ; +% +% def withlinearshading (expr a, b) = +% withprescript "sh_type=linear" +% withprescript "sh_domain=0 1" +% withprescript "sh_factor=" & decimal shadefactor +% withprescript "sh_center_a=" & ddecimal (a shifted shadeoffset) +% withprescript "sh_center_b=" & ddecimal (b shifted shadeoffset) +% enddef ; +% +% def withcircularshading (expr a, b, ra, rb) = +% withprescript "sh_type=circular" +% withprescript "sh_domain=0 1" +% withprescript "sh_factor=" & decimal shadefactor +% withprescript "sh_center_a=" & ddecimal (a shifted shadeoffset) +% withprescript "sh_center_b=" & ddecimal (b shifted shadeoffset) +% withprescript "sh_radius_a=" & decimal ra +% withprescript "sh_radius_b=" & decimal rb +% enddef ; +% +% def withshading (expr how)(text rest) = +% if how = "linear" : +% withlinearshading(rest) +% elseif how = "circular" : +% withcircularshading(rest) +% else : +% % nothing +% fi +% enddef ; +% +% def withfromshadecolor expr t = +% withprescript "sh_color=into" +% withprescript "sh_color_a=" & colordecimals t +% enddef ; + +% def withtoshadecolor expr t = +% withprescript "sh_color=into" +% withprescript "sh_color_b=" & colordecimals t +% enddef ; + +% but this is nicer + +path mfun_shade_path ; + +primarydef p withshademethod m = + hide(mfun_shade_path := p ;) + p + withprescript "sh_domain=0 1" + withprescript "sh_color=into" + withprescript "sh_color_a=" & colordecimals white + withprescript "sh_color_b=" & colordecimals black + if m = "linear" : + withprescript "sh_type=linear" + withprescript "sh_factor=1" + withprescript "sh_center_a=" & ddecimal llcorner p + withprescript "sh_center_b=" & ddecimal urcorner p + else : + withprescript "sh_type=circular" + withprescript "sh_factor=1.2" + withprescript "sh_center_a=" & ddecimal center p + withprescript "sh_center_b=" & ddecimal center p + withprescript "sh_radius_a=" & decimal 0 + withprescript "sh_radius_b=" & decimal ( max ( + (xpart center p - xpart llcorner p) ++ (ypart center p - ypart llcorner p), + (xpart center p - xpart ulcorner p) ++ (ypart ulcorner p - ypart center p), + (xpart lrcorner p - xpart center p) ++ (ypart center p - ypart lrcorner p), + (xpart urcorner p - xpart center p) ++ (ypart urcorner p - ypart center p) + ) ) + fi +enddef ; + +def withshadevector expr a = + withprescript "sh_center_a=" & ddecimal (point xpart a of mfun_shade_path) + withprescript "sh_center_b=" & ddecimal (point ypart a of mfun_shade_path) +enddef ; + +def withshadecenter expr a = + withprescript "sh_center_a=" & ddecimal ( + center mfun_shade_path shifted ( + xpart a * bbwidth (mfun_shade_path)/2, + ypart a * bbheight(mfun_shade_path)/2 + ) + ) +enddef ; + +def withshadedomain expr d = + withprescript "sh_domain=" & ddecimal d +enddef ; + +def withshadefactor expr f = + withprescript "sh_factor=" & decimal f +enddef ; + +def withshadecolors (expr a, b) = + withprescript "sh_color=into" + withprescript "sh_color_a=" & colordecimals a + withprescript "sh_color_b=" & colordecimals b +enddef ; + +primarydef a shadedinto b = % withcolor red shadedinto green + 1 % does not work with transparency + withprescript "sh_color=into" + withprescript "sh_color_a=" & colordecimals a + withprescript "sh_color_b=" & colordecimals b +enddef ; + +primarydef p withshade sc = + p withprescript mfun_defined_cs_pre[sc] +enddef ; + +def defineshade suffix s = + mfun_defineshade(str s) +enddef ; + +def mfun_defineshade (expr s) text t = + expandafter def scantokens s = t enddef ; +enddef ; + +def shaded text s = + s +enddef ; + +% Old macros: + +def withcircularshade (expr a, b, ra, rb, ca, cb) = + withprescript "sh_type=circular" + withprescript "sh_domain=0 1" + withprescript "sh_factor=1" + withprescript "sh_color_a=" & colordecimals ca + withprescript "sh_color_b=" & colordecimals cb + withprescript "sh_center_a=" & ddecimal (a shifted shadeoffset) + withprescript "sh_center_b=" & ddecimal (b shifted shadeoffset) + withprescript "sh_radius_a=" & decimal ra + withprescript "sh_radius_b=" & decimal rb +enddef ; + +def withlinearshade (expr a, b, ca, cb) = + withprescript "sh_type=linear" + withprescript "sh_domain=0 1" + withprescript "sh_factor=1" + withprescript "sh_color_a=" & colordecimals ca + withprescript "sh_color_b=" & colordecimals cb + withprescript "sh_center_a=" & ddecimal (a shifted shadeoffset) + withprescript "sh_center_b=" & ddecimal (b shifted shadeoffset) +enddef ; + +% replaced (obsolete): def set_linear_vector (suffix a,b)(expr p,n) = if (n=1) : a := llcorner p ; b := urcorner p ; @@ -388,7 +554,7 @@ def set_linear_vector (suffix a,b)(expr p,n) = fi ; enddef ; -def set_circular_vector (suffix ab, r)(expr p,n) = +def set_circular_vector (suffix ab,r)(expr p,n) = if (n=1) : ab := llcorner p ; elseif (n=2) : ab := lrcorner p ; elseif (n=3) : ab := urcorner p ; @@ -411,7 +577,7 @@ enddef ; def linear_shade (expr p, n, ca, cb) = begingroup ; - save a, b, sh ; pair a, b ; + save a, b ; pair a, b ; set_linear_vector(a,b)(p,n) ; fill p withlinearshade(a,b,ca,cb) ; if trace_shades : @@ -420,43 +586,19 @@ def linear_shade (expr p, n, ca, cb) = endgroup ; enddef ; -def withcircularshade (expr a, b, ra, rb, ca, cb) = - withprescript "sh_type=circular" - withprescript "sh_domain=0 1" - withprescript "sh_factor=" & decimal shadefactor - withprescript "sh_color_a=" & colordecimals ca - withprescript "sh_color_b=" & colordecimals cb - withprescript "sh_center_a=" & ddecimal (a shifted shadeoffset) - withprescript "sh_center_b=" & ddecimal (b shifted shadeoffset) - withprescript "sh_radius_a=" & decimal ra - withprescript "sh_radius_b=" & decimal rb -enddef ; - -def withlinearshade (expr a, b, ca, cb) = - withprescript "sh_type=linear" - withprescript "sh_domain=0 1" - withprescript "sh_factor=" & decimal shadefactor - withprescript "sh_color_a=" & colordecimals ca - withprescript "sh_color_b=" & colordecimals cb - withprescript "sh_center_a=" & ddecimal (a shifted shadeoffset) - withprescript "sh_center_b=" & ddecimal (b shifted shadeoffset) -enddef ; - string mfun_defined_cs_pre[] ; numeric mfun_defined_cs ; mfun_defined_cs := 0 ; -string mfun_prescript_separator ; mfun_prescript_separator := char(13) ; - vardef define_circular_shade (expr a, b, ra, rb, ca, cb) = mfun_defined_cs := mfun_defined_cs + 1 ; mfun_defined_cs_pre[mfun_defined_cs] := "sh_type=circular" - & mfun_prescript_separator & "sh_domain=0 1" - & mfun_prescript_separator & "sh_factor=" & decimal shadefactor - & mfun_prescript_separator & "sh_color_a=" & colordecimals ca - & mfun_prescript_separator & "sh_color_b=" & colordecimals cb - & mfun_prescript_separator & "sh_center_a=" & ddecimal (a shifted shadeoffset) - & mfun_prescript_separator & "sh_center_b=" & ddecimal (b shifted shadeoffset) - & mfun_prescript_separator & "sh_radius_a=" & decimal ra - & mfun_prescript_separator & "sh_radius_b=" & decimal rb + & mfun_prescript_separator & "sh_domain=0 1" + & mfun_prescript_separator & "sh_factor=1" + & mfun_prescript_separator & "sh_color_a=" & colordecimals ca + & mfun_prescript_separator & "sh_color_b=" & colordecimals cb + & mfun_prescript_separator & "sh_center_a=" & ddecimal (a shifted shadeoffset) + & mfun_prescript_separator & "sh_center_b=" & ddecimal (b shifted shadeoffset) + & mfun_prescript_separator & "sh_radius_a=" & decimal ra + & mfun_prescript_separator & "sh_radius_b=" & decimal rb ; mfun_defined_cs enddef ; @@ -464,52 +606,49 @@ enddef ; vardef define_linear_shade (expr a, b, ca, cb) = mfun_defined_cs := mfun_defined_cs + 1 ; mfun_defined_cs_pre[mfun_defined_cs] := "sh_type=linear" - & mfun_prescript_separator & "sh_domain=0 1" - & mfun_prescript_separator & "sh_factor=" & decimal shadefactor - & mfun_prescript_separator & "sh_color_a=" & colordecimals ca - & mfun_prescript_separator & "sh_color_b=" & colordecimals cb - & mfun_prescript_separator & "sh_center_a=" & ddecimal (a shifted shadeoffset) - & mfun_prescript_separator & "sh_center_b=" & ddecimal (b shifted shadeoffset) + & mfun_prescript_separator & "sh_domain=0 1" + & mfun_prescript_separator & "sh_factor=1" + & mfun_prescript_separator & "sh_color_a=" & colordecimals ca + & mfun_prescript_separator & "sh_color_b=" & colordecimals cb + & mfun_prescript_separator & "sh_center_a=" & ddecimal (a shifted shadeoffset) + & mfun_prescript_separator & "sh_center_b=" & ddecimal (b shifted shadeoffset) ; mfun_defined_cs enddef ; -primarydef p withshade sc = - p withprescript mfun_defined_cs_pre[sc] -enddef ; - - -vardef define_sampled_linear_shade(expr a,b,n)(text t) = - mfun_defined_cs := mfun_defined_cs + 1 ; - mfun_defined_cs_pre[mfun_defined_cs] := "ssh_type=linear" - & mfun_prescript_separator & "ssh_center_a=" & ddecimal (a shifted shadeoffset) - & mfun_prescript_separator & "ssh_center_b=" & ddecimal (b shifted shadeoffset) - & mfun_prescript_separator & "ssh_nofcolors=" & decimal n - & mfun_prescript_separator & "ssh_domain=" & domstr - & mfun_prescript_separator & "ssh_extend=" & extstr - & mfun_prescript_separator & "ssh_colors=" & colstr - & mfun_prescript_separator & "ssh_bounds=" & bndstr - & mfun_prescript_separator & "ssh_ranges=" & ranstr - ; - mfun_defined_cs -enddef ; - -vardef define_sampled_circular_shade(expr a,b,ra,rb,n)(text t) = - mfun_defined_cs := mfun_defined_cs + 1 ; - mfun_defined_cs_pre[mfun_defined_cs] := "ssh_type=circular" - & mfun_prescript_separator & "ssh_center_a=" & ddecimal (a shifted shadeoffset) - & mfun_prescript_separator & "ssh_radius_a=" & decimal ra - & mfun_prescript_separator & "ssh_center_b=" & ddecimal (b shifted shadeoffset) - & mfun_prescript_separator & "ssh_radius_b=" & decimal rb - & mfun_prescript_separator & "ssh_nofcolors=" & decimal n - & mfun_prescript_separator & "ssh_domain=" & domstr - & mfun_prescript_separator & "ssh_extend=" & extstr - & mfun_prescript_separator & "ssh_colors=" & colstr - & mfun_prescript_separator & "ssh_bounds=" & bndstr - & mfun_prescript_separator & "ssh_ranges=" & ranstr - ; - mfun_defined_cs -enddef ; +% I lost the example code that uses this: +% +% vardef define_sampled_linear_shade(expr a,b,n)(text t) = +% mfun_defined_cs := mfun_defined_cs + 1 ; +% mfun_defined_cs_pre[mfun_defined_cs] := "ssh_type=linear" +% & mfun_prescript_separator & "ssh_center_a=" & ddecimal (a shifted shadeoffset) +% & mfun_prescript_separator & "ssh_center_b=" & ddecimal (b shifted shadeoffset) +% & mfun_prescript_separator & "ssh_nofcolors=" & decimal n +% & mfun_prescript_separator & "ssh_domain=" & domstr +% & mfun_prescript_separator & "ssh_extend=" & extstr +% & mfun_prescript_separator & "ssh_colors=" & colstr +% & mfun_prescript_separator & "ssh_bounds=" & bndstr +% & mfun_prescript_separator & "ssh_ranges=" & ranstr +% ; +% mfun_defined_cs +% enddef ; +% +% vardef define_sampled_circular_shade(expr a,b,ra,rb,n)(text t) = +% mfun_defined_cs := mfun_defined_cs + 1 ; +% mfun_defined_cs_pre[mfun_defined_cs] := "ssh_type=circular" +% & mfun_prescript_separator & "ssh_center_a=" & ddecimal (a shifted shadeoffset) +% & mfun_prescript_separator & "ssh_radius_a=" & decimal ra +% & mfun_prescript_separator & "ssh_center_b=" & ddecimal (b shifted shadeoffset) +% & mfun_prescript_separator & "ssh_radius_b=" & decimal rb +% & mfun_prescript_separator & "ssh_nofcolors=" & decimal n +% & mfun_prescript_separator & "ssh_domain=" & domstr +% & mfun_prescript_separator & "ssh_extend=" & extstr +% & mfun_prescript_separator & "ssh_colors=" & colstr +% & mfun_prescript_separator & "ssh_bounds=" & bndstr +% & mfun_prescript_separator & "ssh_ranges=" & ranstr +% ; +% mfun_defined_cs +% enddef ; % vardef predefined_linear_shade (expr p, n, ca, cb) = % save a, b, sh ; pair a, b ; @@ -524,53 +663,6 @@ enddef ; % define_circular_shade(ab,ab,0,r,ca,cb) % enddef ; -% NEW EXPERIMENTAL CODE - -def withlinearshading (expr a, b) = - withprescript "sh_type=linear" - withprescript "sh_domain=0 1" - withprescript "sh_factor=" & decimal shadefactor - withprescript "sh_center_a=" & ddecimal (a shifted shadeoffset) - withprescript "sh_center_b=" & ddecimal (b shifted shadeoffset) -enddef ; - -def withcircularshading (expr a, b, ra, rb) = - withprescript "sh_type=circular" - withprescript "sh_domain=0 1" - withprescript "sh_factor=" & decimal shadefactor - withprescript "sh_center_a=" & ddecimal (a shifted shadeoffset) - withprescript "sh_center_b=" & ddecimal (b shifted shadeoffset) - withprescript "sh_radius_a=" & decimal ra - withprescript "sh_radius_b=" & decimal rb -enddef ; - -def withfromshadecolor expr t = - withprescript "sh_color=into" - withprescript "sh_color_a=" & colordecimals t -enddef ; - -def withtoshadecolor expr t = - withprescript "sh_color=into" - withprescript "sh_color_b=" & colordecimals t -enddef ; - -def withshading (expr how)(text rest) = - if how = "linear" : - withlinearshading(rest) - elseif how = "circular" : - withcircularshading(rest) - else : - % nothing - fi -enddef ; - -primarydef a shadedinto b = - 1 % does not work with transparency - withprescript "sh_color=into" - withprescript "sh_color_a=" & colordecimals a - withprescript "sh_color_b=" & colordecimals b -enddef ; - % Layers def onlayer primary name = @@ -784,6 +876,10 @@ vardef mfun_cmykcolor_to_string(expr c) = decimal blackpart c enddef ; +vardef mfun_greycolor_to_string(expr n) = + decimal n +enddef ; + vardef mfun_path_to_string(expr p) = mfun_point_to_string(p,0) for i=1 upto length(p) : & " " & mfun_point_to_string(p,i) endfor enddef ; @@ -810,6 +906,7 @@ vardef tostring(expr value) = elseif pair value : mfun_pair_to_string(value) elseif rgbcolor value : mfun_rgbcolor_to_string(value) elseif cmykcolor value : mfun_cmykcolor_to_string(value) + elseif greycolor value : mfun_greycolor_to_string(value) elseif boolean value : mfun_boolean_to_string(value) elseif path value : mfun_path_to_string(value) elseif transform value : mfun_transform_to_string(value) diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mp-tool.mpiv index bf7f2bccb..8af2693cd 100644 --- a/metapost/context/base/mp-tool.mpiv +++ b/metapost/context/base/mp-tool.mpiv @@ -146,6 +146,39 @@ vardef colordecimals primary c = fi enddef ; +vardef colordecimalslist(text t) = + save b ; boolean b ; b := false ; + for s=t : + if b : & " " & fi + colordecimals(s) + hide(b := true ;) + endfor +enddef ; + +% vardef _ctx_color_spec_ primary c = +% if cmykcolor c : +% "c=" & decimal cyanpart c & +% ",m=" & decimal magentapart c & +% ",y=" & decimal yellowpart c & +% ",k=" & decimal blackpart c +% elseif rgbcolor c : +% "r=" & decimal redpart c & +% ",g=" & decimal greenpart c & +% ",b=" & decimal bluepart c +% else : +% "s=" & decimal c +% fi +% enddef ; +% +% vardef _ctx_color_spec_list_(text t) = +% save b ; boolean b ; b := false ; +% for s=t : +% if b : & " " & fi +% _ctx_color_spec_(s) +% hide(b := true ;) +% endfor +% enddef ; + %D We have standardized data file names: def job_name = @@ -1550,9 +1583,13 @@ primarydef p softened c = enddef ; vardef grayed primary p = - if color p : + if rgbcolor p : tripled(.30redpart p+.59greenpart p+.11bluepart p) - else : + elseif cmykcolor p : + tripled(.30*(1-cyanpart i)+.59*(1-magentapart i)+.11*(1-yellowpart i)+blackpart i) + elseif greycolor p : + p + elseif picture p : image ( for i within p : addto currentpicture @@ -1568,10 +1605,20 @@ vardef grayed primary p = else : also i fi - withcolor tripled(.30redpart i+.59greenpart i+.11bluepart i) ; + if unknown colorpart i : + % nothing + elseif rgbcolor colorpart i : + withcolor tripled(.30redpart i+.59greenpart i+.11bluepart i) ; + elseif cmykcolor colorpart i : + withcolor tripled(.30*(1-cyanpart i)+.59*(1-magentapart i)+.11*(1-yellowpart i)+blackpart i) ; + else : + withcolor colorpart i ; + fi endfor ; ) - fi + else : + p + fi enddef ; let greyed = grayed ; diff --git a/tex/context/base/attr-col.lua b/tex/context/base/attr-col.lua index 7c6b7909b..9dcc991ac 100644 --- a/tex/context/base/attr-col.lua +++ b/tex/context/base/attr-col.lua @@ -246,7 +246,11 @@ end --~ return { 5, .5, .5, .5, .5, 0, 0, 0, .5, parent, f, d, p } --~ end +local p_split = lpeg.tsplitat(",") +local lpegmatch = lpeg.match + function colors.spot(parent,f,d,p) + -- inspect(parent) inspect(f) inspect(d) inspect(p) if type(p) == "number" then local n = list[numbers.color][parent] -- hard coded ref to color number if n then @@ -261,6 +265,33 @@ function colors.spot(parent,f,d,p) end else -- todo, multitone (maybe p should be a table) + local ps = lpegmatch(p_split,p) + local ds = lpegmatch(p_split,d) + local c, m, y, k = 0, 0, 0, 0 + local done = false + for i=1,#ps do + local p = tonumber(ps[i]) + local d = ds[i] + if p and d then + local n = list[numbers.color][d] -- hard coded ref to color number + if n then + local v = values[n] + if v then + c = c + p*v[6] + m = m + p*v[7] + y = y + p*v[8] + k = k + p*v[8] + done = true + end + end + end + end + if done then + local r, g, b = cmyktorgb(c,m,y,k) + local s = cmyktogray(c,m,y,k) + local f = tonumber(f) + return { 5, s, r, g, b, c, m, y, k, parent, f, d, p } + end end return { 5, .5, .5, .5, .5, 0, 0, 0, .5, parent, f, d, p } end diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua index 174ee9546..9ccbc6cb3 100644 --- a/tex/context/base/colo-ini.lua +++ b/tex/context/base/colo-ini.lua @@ -248,12 +248,14 @@ end local registered = { } -local function do_registerspotcolor(parent,name,parentnumber,e,f,d,p) +local function do_registerspotcolor(parent,parentnumber,e,f,d,p) if not registered[parent] then local v = colorvalues[parentnumber] if v then local model = colors.default -- else problems with shading etc - if model == 1 then model = v[1] end + if model == 1 then + model = v[1] + end if e and e ~= "" then registrations.spotcolorname(parent,e) -- before registration of the color end @@ -269,23 +271,25 @@ local function do_registerspotcolor(parent,name,parentnumber,e,f,d,p) end end -local function do_registermultitonecolor(parent,name,parentnumber,e,f,d,p) -- same as spot but different template - if not registered[parent] then - local v = colorvalues[parentnumber] - if v then - local model = colors.default -- else problems with shading etc - if model == 1 then model = v[1] end - if model == 2 then - registrations.grayindexcolor(parent,f,d,p,v[2]) - elseif model == 3 then - registrations.rgbindexcolor (parent,f,d,p,v[3],v[4],v[5]) - elseif model == 4 then - registrations.cmykindexcolor(parent,f,d,p,v[6],v[7],v[8],v[9]) - end - end - registered[parent] = true - end -end +-- local function do_registermultitonecolor(parent,name,parentnumber,e,f,d,p) -- same as spot but different template +-- if not registered[parent] then +-- local v = colorvalues[parentnumber] +-- if v then +-- local model = colors.default -- else problems with shading etc +-- if model == 1 then +-- model = v[1] +-- end +-- if model == 2 then +-- registrations.grayindexcolor(parent,f,d,p,v[2]) +-- elseif model == 3 then +-- registrations.rgbindexcolor (parent,f,d,p,v[3],v[4],v[5]) +-- elseif model == 4 then +-- registrations.cmykindexcolor(parent,f,d,p,v[6],v[7],v[8],v[9]) +-- end +-- end +-- registered[parent] = true +-- end +-- end function colors.definesimplegray(name,s) return register_color(name,'gray',s) -- we still need to get rid of 'color' @@ -396,16 +400,16 @@ end function colors.definespotcolor(name,parent,str,global) if parent == "" or find(parent,"=",1,true) then - colors.registerspotcolor(name, parent) + colors.registerspotcolor(name, parent) -- does that work? no attr elseif name ~= parent then local cp = attributes_list[a_color][parent] if cp then local t = settings_to_hash_strict(str) if t then local tp = tonumber(t.p) or 1 - do_registerspotcolor(parent, name, cp, t.e, 1, "", tp) -- p not really needed, only diagnostics + do_registerspotcolor(parent,cp,t.e,1,"",tp) -- p not really needed, only diagnostics if name and name ~= "" then - definecolor(name, register_color(name,'spot', parent, 1, "", tp), true) + definecolor(name,register_color(name,'spot',parent,1,"",tp),true) local ta, tt = t.a, t.t if ta and tt then definetransparent(name, transparencies.register(name,transparent[ta] or tonumber(ta) or 1,tonumber(tt) or 1), global) @@ -428,13 +432,56 @@ function colors.registerspotcolor(parent, str) local t = settings_to_hash_strict(str) e = (t and t.e) or "" end - do_registerspotcolor(parent, "dummy", cp, e, 1, "", 1) -- p not really needed, only diagnostics + do_registerspotcolor(parent, cp, e, 1, "", 1) -- p not really needed, only diagnostics + end +end + +local function f(i,colors,fraction) + local otf = 0 + for c=1,#colors do + otf = otf + (tonumber(fraction[c]) or 1) * colors[c][i] + end + if otf > 1 then + otf = 1 + end + return otf +end + +local function definemixcolor(makename,name,fractions,cs,global,freeze) + local values = { } + for i=1,#cs do -- do fraction in here + local v = colorvalues[cs[i]] + if not v then + return + end + values[i] = v + end + if #values > 0 then + csone = values[1][1] + local ca + if csone == 2 then + ca = register_color(name,'gray',f(2,values,fractions)) + elseif csone == 3 then + ca = register_color(name,'rgb', f(3,values,fractions), + f(4,values,fractions), + f(5,values,fractions)) + elseif csone == 4 then + ca = register_color(name,'cmyk',f(6,values,fractions), + f(7,values,fractions), + f(8,values,fractions), + f(9,values,fractions)) + else + ca = register_color(name,'gray',f(2,values,fractions)) + end + definecolor(name,ca,global,freeze) + else + report_colors("invalid specification of components for color %a",makename) end end function colors.definemultitonecolor(name,multispec,colorspec,selfspec) local dd, pp, nn, max = { }, { }, { }, 0 - for k,v in gmatch(multispec,"(%a+)=([^%,]*)") do -- use settings_to_array + for k,v in gmatch(multispec,"([^=,]+)=([^%,]*)") do -- use settings_to_array max = max + 1 dd[max] = k pp[max] = v @@ -445,7 +492,7 @@ function colors.definemultitonecolor(name,multispec,colorspec,selfspec) local parent = gsub(lower(nn),"[^%d%a%.]+","_") if not colorspec or colorspec == "" then local cc = { } for i=1,max do cc[i] = l_color[dd[i]] end - colors.definemixcolor(parent,pp,cc,global,freeze) -- can become local + definemixcolor(name,parent,pp,cc,global,freeze) -- can become local else if selfspec ~= "" then colorspec = colorspec .. "," .. selfspec @@ -455,7 +502,7 @@ function colors.definemultitonecolor(name,multispec,colorspec,selfspec) local cp = attributes_list[a_color][parent] dd, pp = concat(dd,','), concat(pp,',') if cp then - do_registerspotcolor(parent, name, cp, "", max, dd, pp) + do_registerspotcolor(parent, cp, "", max, dd, pp) definecolor(name, register_color(name, 'spot', parent, max, dd, pp), true) local t = settings_to_hash_strict(selfspec) if t and t.a and t.t then @@ -469,8 +516,9 @@ function colors.definemultitonecolor(name,multispec,colorspec,selfspec) colorset[name] = true-- maybe we can store more end --- will move to mlib-col as colors in m,p are somewhat messy due to the fact --- that we cannot cast +-- will move to mlib-col as colors in mp are somewhat messy due to the fact +-- that we cannot cast .. so we really need to use (s,s,s) for gray in order +-- to be able to map onto 'color' local function mpcolor(model,ca,ta,default) local cv = colorvalues[ca] @@ -488,7 +536,8 @@ local function mpcolor(model,ca,ta,default) elseif model == 4 then return formatters["transparent(%s,%s,cmyk(%s,%s,%s,%s))"](tv[1],tv[2],cv[6],cv[7],cv[8],cv[9]) elseif model == 5 then - return formatters['transparent(%s,%s,multitonecolor("%s",%s,"%s","%s"))'](tv[1],tv[2],cv[10],cv[11],cv[12],cv[13]) + -- return formatters['transparent(%s,%s,multitonecolor("%s",%s,"%s","%s"))'](tv[1],tv[2],cv[10],cv[11],cv[12],cv[13]) + return formatters['transparent(%s,%s,namedcolor("%s"))'](tv[1],tv[2],cv[10]) else -- see ** in meta-ini.mkiv: return formatters["transparent(%s,%s,(%s))"](tv[1],tv[2],cv[2]) return formatters["transparent(%s,%s,(%s,%s,%s))"](tv[1],tv[2],cv[3],cv[4],cv[5]) end @@ -500,7 +549,8 @@ local function mpcolor(model,ca,ta,default) elseif model == 4 then return formatters["cmyk(%s,%s,%s,%s)"](cv[6],cv[7],cv[8],cv[9]) elseif model == 5 then - return formatters['multitonecolor("%s",%s,"%s","%s")'](cv[10],cv[11],cv[12],cv[13]) + -- return formatters['multitonecolor("%s",%s,"%s","%s")'](cv[10],cv[11],cv[12],cv[13]) + return formatters['namedcolor("%s")'](cv[10]) else -- see ** in meta-ini.mkiv: return formatters["%s"]((cv[2])) return formatters["(%s,%s,%s)"](cv[3],cv[4],cv[5]) end @@ -738,45 +788,6 @@ function colors.defineintermediatecolor(name,fraction,c_one,c_two,a_one,a_two,sp end end -local function f(i,colors,fraction) - local otf = 0 - for c=1,#colors do - otf = otf + (tonumber(fraction[c]) or 1) * colors[c][i] - end - if otf > 1 then - otf = 1 - end - return otf -end - -function colors.definemixcolor(name,fractions,cs,global,freeze) - local values = { } - for i=1,#cs do -- do fraction in here - local v = colorvalues[cs[i]] - if not v then - return - end - values[i] = v - end - local csone = values[1][1] - local ca - if csone == 2 then - ca = register_color(name,'gray',f(2,values,fractions)) - elseif csone == 3 then - ca = register_color(name,'rgb', f(3,values,fractions), - f(4,values,fractions), - f(5,values,fractions)) - elseif csone == 4 then - ca = register_color(name,'cmyk',f(6,values,fractions), - f(7,values,fractions), - f(8,values,fractions), - f(9,values,fractions)) - else - ca = register_color(name,'gray',f(2,values,fractions)) - end - definecolor(name,ca,global,freeze) -end - -- for the moment downward compatible local patterns = { "colo-imp-%s.mkiv", "colo-imp-%s.tex", "colo-%s.mkiv", "colo-%s.tex" } diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv index 375c2c502..c713d8803 100644 --- a/tex/context/base/colo-ini.mkiv +++ b/tex/context/base/colo-ini.mkiv @@ -1055,7 +1055,7 @@ \let\colorformatseparator\space -\def\MPcolor #1{\ctxcommand{mpcolor(\number\attribute\colormodelattribute,\number\colo_helpers_inherited_current_ca{#1},\number\colo_helpers_inherited_current_ta{#1})}} +\def\MPcolor #1{\ctxcommand {mpcolor(\number\attribute\colormodelattribute,\number\colo_helpers_inherited_current_ca{#1},\number\colo_helpers_inherited_current_ta{#1})}} \def\MPoptions #1{\ctxcommand{mpoptions(\number\attribute\colormodelattribute,\number\colo_helpers_inherited_current_ca{#1},\number\colo_helpers_inherited_current_ta{#1})}} \def\thecolorattribute #1{\number\csname\??colorattribute \ifcsname\??colorattribute \currentcolorprefix#1\endcsname\currentcolorprefix#1\else\ifcsname\??colorattribute #1\endcsname#1\fi\fi\endcsname} diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 11606f012..e6f9bc78b 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2015.01.13 15:54} +\newcontextversion{2015.01.19 11:20} %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/context-version.pdf b/tex/context/base/context-version.pdf index 94f3b95b8..49608c313 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 83adbddb2..32280f374 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -28,7 +28,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2015.01.13 15:54} +\edef\contextversion{2015.01.19 11:20} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/lpdf-col.lua b/tex/context/base/lpdf-col.lua index 924414d40..030291c29 100644 --- a/tex/context/base/lpdf-col.lua +++ b/tex/context/base/lpdf-col.lua @@ -184,7 +184,7 @@ local f_gray_function = formatters["%s mul"] local documentcolorspaces = pdfdictionary() -local spotcolorhash = { } -- not needed +local spotcolorhash = { } -- not needed local spotcolornames = { } local indexcolorhash = { } local delayedindexcolors = { } @@ -202,7 +202,7 @@ end -- This should become delayed i.e. only flush when used; in that case we need -- need to store the specification and then flush them when accesssomespotcolor -- is called. At this moment we assume that splotcolors that get defined are --- also used which keeps the overhad small anyway. +-- also used which keeps the overhad small anyway. Tricky for mp ... local processcolors @@ -240,6 +240,7 @@ local function registersomespotcolor(name,noffractions,names,p,colorspace,range, local colorants = pdfdictionary() for n in gmatch(names,"[^,]+") do local name = spotcolornames[n] or n + -- the cmyk names assume that they are indeed these colors if n == "cyan" then name = "Cyan" elseif n == "magenta" then @@ -250,9 +251,15 @@ local function registersomespotcolor(name,noffractions,names,p,colorspace,range, name = "Black" else local sn = spotcolorhash[name] or spotcolorhash[n] + if not sn then + report_color("defining %a as colorant",name) + colors.definespotcolor("",name,"p=1",true) + sn = spotcolorhash[name] or spotcolorhash[n] + end if sn then colorants[name] = pdfreference(sn) else + -- maybe some day generate colorants (spot colors for multi) automatically report_color("unknown colorant %a, using black instead",name or n) name = "Black" end diff --git a/tex/context/base/math-stc.mkvi b/tex/context/base/math-stc.mkvi index 54824c58b..e7c775ae4 100644 --- a/tex/context/base/math-stc.mkvi +++ b/tex/context/base/math-stc.mkvi @@ -160,7 +160,7 @@ \c!distance=\mathstackersparameter\c!voffset, % distance between symbol and base (can be different from voffset) \c!minheight=\exheight, \c!mindepth=\zeropoint, - \c!minwidth=\emwidth, + \c!minwidth=.5\emwidth, \c!order=\v!normal, \c!strut=, \c!color=, % todo: when I need it diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua index fea1225ad..c144a2501 100644 --- a/tex/context/base/mlib-pps.lua +++ b/tex/context/base/mlib-pps.lua @@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['mlib-pps'] = { } local format, gmatch, match, split = string.format, string.gmatch, string.match, string.split -local tonumber, type = tonumber, type +local tonumber, type, unpack = tonumber, type, unpack local round = math.round local insert, remove, concat = table.insert, table.remove, table.concat local Cs, Cf, C, Cg, Ct, P, S, V, Carg = lpeg.Cs, lpeg.Cf, lpeg.C, lpeg.Cg, lpeg.Ct, lpeg.P, lpeg.S, lpeg.V, lpeg.Carg @@ -39,11 +39,19 @@ local report_textexts = logs.reporter("metapost","textexts") local report_scripts = logs.reporter("metapost","scripts") local colors = attributes.colors +local defineprocesscolor = colors.defineprocesscolor +local definespotcolor = colors.definespotcolor +local definemultitonecolor = colors.definemultitonecolor +local colorvalue = colors.value -local rgbtocmyk = colors.rgbtocmyk or function() return 0,0,0,1 end -local cmyktorgb = colors.cmyktorgb or function() return 0,0,0 end -local rgbtogray = colors.rgbtogray or function() return 0 end -local cmyktogray = colors.cmyktogray or function() return 0 end +local transparencies = attributes.transparencies +local registertransparency = transparencies.register +local transparencyvalue = transparencies.value + +local rgbtocmyk = colors.rgbtocmyk -- or function() return 0,0,0,1 end +local cmyktorgb = colors.cmyktorgb -- or function() return 0,0,0 end +local rgbtogray = colors.rgbtogray -- or function() return 0 end +local cmyktogray = colors.cmyktogray -- or function() return 0 end metapost.makempy = metapost.makempy or { nofconverted = 0 } local makempy = metapost.makempy @@ -58,11 +66,6 @@ local innertransparency = nooutertransparency local pdfcolor = lpdf.color local pdftransparency = lpdf.transparency -local registercolor = colors.register -local registerspotcolor = colors.registerspotcolor - -local transparencies = attributes.transparencies -local registertransparency = transparencies.register function metapost.setoutercolor(mode,colormodel,colorattribute,transparencyattribute) -- has always to be called before conversion @@ -84,6 +87,8 @@ function metapost.setoutercolor(mode,colormodel,colorattribute,transparencyattri innertransparency = outertransparency -- not yet used end +-- todo: get this from the lpdf module + local f_f = formatters["%F"] local f_f3 = formatters["%.3F"] @@ -93,6 +98,8 @@ local f_cmyk = formatters["%.3F %.3F %.3F %.3F k %.3F %.3F %.3F %.3F K"] local f_cm = formatters["q %F %F %F %F %F %F cm"] local f_shade = formatters["MpSh%s"] +local f_spot = formatters["/%s cs /%s CS %s SCN %s scn"] + local function checked_color_pair(color,...) if not color then return innercolor, outercolor @@ -142,15 +149,6 @@ local function normalize(ca,cb) end end --- todo: check for the same colorspace (actually a backend issue), now we can --- have several similar resources --- --- normalize(ca,cb) fails for spotcolors - -local function spotcolorconverter(parent, n, d, p) - registerspotcolor(parent) - return pdfcolor(colors.model,registercolor(nil,'spot',parent,n,d,p)), outercolor -end local commasplitter = tsplitat(",") @@ -1045,9 +1043,9 @@ local function sh_process(object,prescript,before,after) local sh_type = prescript.sh_type if sh_type then nofshades = nofshades + 1 - local domain = lpegmatch(domainsplitter,prescript.sh_domain) - local centera = lpegmatch(centersplitter,prescript.sh_center_a) - local centerb = lpegmatch(centersplitter,prescript.sh_center_b) + local domain = lpegmatch(domainsplitter,prescript.sh_domain or "0 1") + local centera = lpegmatch(centersplitter,prescript.sh_center_a or "0 0") + local centerb = lpegmatch(centersplitter,prescript.sh_center_b or "0 0") -- local sh_color_a = prescript.sh_color_a or "1" local sh_color_b = prescript.sh_color_b or "1" @@ -1096,8 +1094,9 @@ local function sh_process(object,prescript,before,after) local coordinates = { centera[1], centera[2], centerb[1], centerb[2] } lpdf.linearshade(name,domain,ca,cb,1,colorspace,coordinates,separation) -- backend specific (will be renamed) elseif sh_type == "circular" then - local radiusa = tonumber(prescript.sh_radius_a) - local radiusb = tonumber(prescript.sh_radius_b) + local factor = tonumber(prescript.sh_factor) or 1 + local radiusa = factor * tonumber(prescript.sh_radius_a) + local radiusb = factor * tonumber(prescript.sh_radius_b) local coordinates = { centera[1], centera[2], radiusa, centerb[1], centerb[2], radiusb } lpdf.circularshade(name,domain,ca,cb,1,colorspace,coordinates,separation) -- backend specific (will be renamed) else @@ -1179,6 +1178,12 @@ local value = Cs ( ( local t_list = attributes.list[attributes.private('transparency')] local c_list = attributes.list[attributes.private('color')] +local remappers = { + [1] = formatters["s=%s"], + [3] = formatters["r=%s,g=%s,b=%s"], + [4] = formatters["c=%s,m=%s,y=%s,k=%s"], +} + local function tr_process(object,prescript,before,after) -- before can be shortcut to t local tr_alternative = prescript.tr_alternative @@ -1194,56 +1199,83 @@ local function tr_process(object,prescript,before,after) local sp_type = prescript.sp_type if not sp_type then c_b, c_a = colorconverter(cs) - elseif sp_type == "spot" or sp_type == "multitone" then - local sp_name = prescript.sp_name or "black" - local sp_fractions = prescript.sp_fractions or 1 - local sp_components = prescript.sp_components or "" - local sp_value = prescript.sp_value or "1" - local cf = cs[1] - if cf ~= 1 then - -- beware, we do scale the spotcolors but not the alternative representation - sp_value = lpegmatch(value,sp_value,1,cf) or sp_value - end - c_b, c_a = spotcolorconverter(sp_name,sp_fractions,sp_components,sp_value) - elseif sp_type == "named" then - -- we might move this to another namespace .. also, named can be a spotcolor - -- so we need to check for that too ... also we need to resolve indirect - -- colors so we might need the second pass for this (draw dots with \MPcolor) + else local sp_name = prescript.sp_name or "black" - if not tr_alternative then - -- todo: sp_name is not yet registered at this time - local t = t_list[sp_name] -- string or attribute - local v = t and attributes.transparencies.value(t) - if v then - before[#before+1] = formatters["/Tr%s gs"](registertransparency(nil,v[1],v[2],true)) - after[#after+1] = "/Tr0 gs" -- outertransparency + if sp_type == "spot" then + local sp_value = prescript.sp_value or "s:1" + local sp_temp = formatters["mp:%s"](sp_value) + local s = split(sp_value,":") + local r = remappers[#s] + defineprocesscolor(sp_temp,r and r(unpack(s)) or "s=0",true,true) + definespotcolor(sp_name,sp_temp,"p=1",true) + sp_type = "named" + elseif sp_type == "multitone" then + local sp_value = prescript.sp_value or "s:1" + local sp_spec = { } + local sp_list = split(sp_value," ") + for i=1,#sp_list do + local v = sp_list[i] + local t = formatters["mp:%s"](v) + local s = split(v,":") + local r = remappers[#s] + defineprocesscolor(t,r and r(unpack(s)) or "s=0",true,true) + local tt = formatters["ms:%s"](v) + definespotcolor(tt,t,"p=1",true) + sp_spec[#sp_spec+1] = formatters["%s=1"](t) end + sp_spec = concat(sp_spec,",") + definemultitonecolor(sp_name,sp_spec,"","",true) + sp_type = "named" end - local c = c_list[sp_name] -- string or attribute - local v = c and attributes.colors.value(c) - if v then - -- all=1 gray=2 rgb=3 cmyk=4 - local colorspace = v[1] - local f = cs[1] - if colorspace == 2 then - local s = f*v[2] - c_b, c_a = checked_color_pair(f_gray,s,s) - elseif colorspace == 3 then - local r, g, b = f*v[3], f*v[4], f*v[5] - c_b, c_a = checked_color_pair(f_rgb,r,g,b,r,g,b) - elseif colorspace == 4 or colorspace == 1 then - local c, m, y, k = f*v[6], f*v[7], f*v[8], f*v[9] - c_b, c_a = checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k) - else - local s = f*v[2] - c_b, c_a = checked_color_pair(f_gray,s,s) + if sp_type == "named" then + -- we might move this to another namespace .. also, named can be a spotcolor + -- so we need to check for that too ... also we need to resolve indirect + -- colors so we might need the second pass for this (draw dots with \MPcolor) + if not tr_alternative then + -- todo: sp_name is not yet registered at this time + local t = t_list[sp_name] -- string or attribute + local v = t and transparencyvalue(t) + if v then + before[#before+1] = formatters["/Tr%s gs"](registertransparency(nil,v[1],v[2],true)) + after[#after+1] = "/Tr0 gs" -- outertransparency + end + end + local c = c_list[sp_name] -- string or attribute + local v = c and colorvalue(c) + if v then + -- all=1 gray=2 rgb=3 cmyk=4 + local colorspace = v[1] + local f = cs[1] + if colorspace == 2 then + local s = f*v[2] + c_b, c_a = checked_color_pair(f_gray,s,s) + elseif colorspace == 3 then + local r, g, b = f*v[3], f*v[4], f*v[5] + c_b, c_a = checked_color_pair(f_rgb,r,g,b,r,g,b) + elseif colorspace == 4 or colorspace == 1 then + local c, m, y, k = f*v[6], f*v[7], f*v[8], f*v[9] + c_b, c_a = checked_color_pair(f_cmyk,c,m,y,k,c,m,y,k) + elseif colorspace == 5 then + -- not all viewers show the fractions ok + local name = v[10] + local value = split(v[13],",") + if f ~= 1 then + for i=1,#value do + value[i] = f * (tonumber(value[i]) or 1) + end + end + value = concat(value," ") + c_b, c_a = checked_color_pair(f_spot,name,name,value,value) + else + local s = f*v[2] + c_b, c_a = checked_color_pair(f_gray,s,s) + end end end - -- end if c_a and c_b then before[#before+1] = c_b - after[#after+1] = c_a + after [#after +1] = c_a end end end diff --git a/tex/context/base/mult-fun.lua b/tex/context/base/mult-fun.lua index 4e8b9fc88..4ba583dfe 100644 --- a/tex/context/base/mult-fun.lua +++ b/tex/context/base/mult-fun.lua @@ -39,9 +39,10 @@ return { "xsized", "ysized", "xysized", "sized", "xyscaled", "intersection_point", "intersection_found", "penpoint", "bbwidth", "bbheight", - "withshading", "withlinearshading", "withcircularshading", - "withfromshadecolor", "withtoshadecolor", "shadedinto", - "withshade", "withcircularshade", "withlinearshade", + "withshade", "withcircularshade", "withlinearshade", -- old but kept + "defineshade", "shaded", + -- "withshading", "withlinearshading", "withcircularshading", "withfromshadecolor", "withtoshadecolor", + "shadedinto", "withshadecolors", "withshadedomain", "withshademethod", "withshadefactor", "withshadevector", "withshadecenter", "cmyk", "spotcolor", "multitonecolor", "namedcolor", "drawfill", "undrawfill", "inverted", "uncolored", "softened", "grayed", "greyed", @@ -57,13 +58,12 @@ return { "transparent", "withtransparency", "property", "properties", "withproperties", "asgroup", - "infont", -- redefined usign textext - -- "property", "withproperties", "properties", -- not yet - "set_linear_vector", "set_circular_vector", - "linear_shade", "circular_shade", - "define_linear_shade", "define_circular_shade", - "define_circular_linear_shade", "define_circular_linear_shade", - "define_sampled_linear_shade", "define_sampled_circular_shade", + "infont", -- redefined using textext + -- "set_linear_vector", "set_circular_vector", + -- "linear_shade", "circular_shade", + -- "define_linear_shade", "define_circular_shade", + -- "define_circular_linear_shade", "define_circular_linear_shade", + -- "define_sampled_linear_shade", "define_sampled_circular_shade", "space", "crlf", "dquote", "SPACE", "CRLF", "DQUOTE", "grayscale", "greyscale", "withgray", "withgrey", "colorpart", diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua index cbabec353..460128d96 100644 --- a/tex/context/base/mult-low.lua +++ b/tex/context/base/mult-low.lua @@ -85,6 +85,7 @@ return { "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathsupdisplay", "mathsupnormal", "mathsupcramped", "mathsubnormal", "mathsubcombined", "mathaxisheight", + "muquad", -- -- maybe a different class -- diff --git a/tex/context/base/mult-mps.lua b/tex/context/base/mult-mps.lua index 0f893f895..c5e4b04ac 100644 --- a/tex/context/base/mult-mps.lua +++ b/tex/context/base/mult-mps.lua @@ -130,4 +130,32 @@ return { -- "pen_lft", "pen_rt", "pen_top", "pen_bot", -- "pen_count_", }, + metafont = { + -- :: =: =:| =:|> |=: |=:> |=:| |=:|> |=:|>> ||: + "autorounding", "beginchar", "blacker", "boundarychar", "capsule_def", + "capsule_end", "change_width", "chardp", "chardx", "chardy", "charexists", + "charext", "charht", "charic", "charlist", "charwd", "cull", "cullit", + "currenttransform", "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", "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", + "proofing", "proofoffset", "proofrule", "proofrulethickness", "rulepen", + "screenchars", "screenrule", "screenstrokes", "showit", "slantfont", + "smode", "smoothing", "titlefont", "totalweight", "tracingedges", + "tracingpens", "turningcheck", "unitpixel", "vppp", "vround", "xoffset", + "yoffset", + }, + disabled = { + "verbatimtex" + } } diff --git a/tex/context/base/publ-imp-apa.mkvi b/tex/context/base/publ-imp-apa.mkvi index 5e6cc20db..d7dc4db9a 100644 --- a/tex/context/base/publ-imp-apa.mkvi +++ b/tex/context/base/publ-imp-apa.mkvi @@ -29,6 +29,10 @@ % set all APA compliant values (may be redundant but we do not count on defaults.) +\setupbtxlist + [alternative=hanging, + margin=3em] + \setupbtxlistvariant [\c!namesep={,\space}, \c!lastnamesep={,\nobreakspace\textampersand\space}, @@ -127,8 +131,7 @@ \setupbtxrendering [sorttype=authoryear, - numbering=no, - hang=20] % how to get hanging to work? ... answer: it's descriptions ... + numbering=no] % Should the following be loaded by default? diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index e1ff4721b..bf1ab3f94 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index 7a39ff91d..80ba54d56 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/context/base/syst-ini.mkiv b/tex/context/base/syst-ini.mkiv index 29a97b6bd..af3a0310c 100644 --- a/tex/context/base/syst-ini.mkiv +++ b/tex/context/base/syst-ini.mkiv @@ -386,6 +386,8 @@ \newmuskip\zeromuskip \zeromuskip = 0mu \newmuskip\onemuskip \onemuskip = 1mu +\newmuskip\muquad \muquad = 18mu + \let\points \onepoint \let\halfpoint\halfapoint diff --git a/tex/context/base/tabl-ntb.mkiv b/tex/context/base/tabl-ntb.mkiv index 973992ff1..2f37961ea 100644 --- a/tex/context/base/tabl-ntb.mkiv +++ b/tex/context/base/tabl-ntb.mkiv @@ -1305,12 +1305,8 @@ \normalexpanded {\t_tabl_ntb_row {\the\t_tabl_ntb_row - \ifnum\scratchcounter=\plusone - \tabl_ntb_plus - \else - % span - \tabl_ntb_span{\the\scratchcounter}% - \fi}}% + \tabl_ntb_span{\the\scratchcounter}% + \tabl_ntb_plus}}% \fi} \setvalue{\??naturaltablecell\the\c_tabl_ntb_cell}#1#2% diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index f0d5ff50e..3aceddaa1 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 : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 01/13/15 15:54:38 +-- merge date : 01/19/15 11:20:20 do -- begin closure to overcome local limits and interference -- cgit v1.2.3