summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-07-05 13:37:27 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-07-05 13:37:27 +0200
commita596680c20618232e248aa4e45bed22749a30e1b (patch)
tree4a23eacbf1cccac6d60fc01b762afc369845f196
parentda9149010f4d34eef23a504682d82cdcf4fac8f5 (diff)
downloadcontext-a596680c20618232e248aa4e45bed22749a30e1b.tar.gz
2016-07-05 13:06:00
-rw-r--r--context/data/scite/context/lexers/data/scite-context-data-context.lua2
-rw-r--r--context/data/scite/context/scite-context-data-context.properties34
-rw-r--r--doc/context/documents/general/manuals/steps-mkiv.pdfbin0 -> 297225 bytes
-rw-r--r--doc/context/sources/general/manuals/manuals-xml-environment.tex385
-rw-r--r--doc/context/sources/general/manuals/steps/steps-mkiv.tex655
-rw-r--r--metapost/context/base/mpiv/mp-page.mpiv2
-rw-r--r--tex/context/base/context-version.pdfbin4249 -> 4251 bytes
-rw-r--r--tex/context/base/mkiv/anch-bck.mkvi4
-rw-r--r--tex/context/base/mkiv/anch-pgr.lua69
-rw-r--r--tex/context/base/mkiv/anch-pos.lua65
-rw-r--r--tex/context/base/mkiv/attr-col.lua64
-rw-r--r--tex/context/base/mkiv/colo-ini.lua99
-rw-r--r--tex/context/base/mkiv/colo-ini.mkiv13
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/file-job.mkvi3
-rw-r--r--tex/context/base/mkiv/font-sol.lua14
-rw-r--r--tex/context/base/mkiv/good-ini.lua79
-rw-r--r--tex/context/base/mkiv/grph-rul.lua12
-rw-r--r--tex/context/base/mkiv/math-ali.mkiv18
-rw-r--r--tex/context/base/mkiv/meta-pdf.lua4
-rw-r--r--tex/context/base/mkiv/mlib-pps.lua15
-rw-r--r--tex/context/base/mkiv/mult-low.lua2
-rw-r--r--tex/context/base/mkiv/node-bck.lua10
-rw-r--r--tex/context/base/mkiv/node-rul.lua6
-rw-r--r--tex/context/base/mkiv/spac-ali.mkiv8
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9085 -> 9195 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin366777 -> 366666 bytes
-rw-r--r--tex/context/base/mkiv/strc-mat.mkiv14
-rw-r--r--tex/context/base/mkiv/typo-drp.lua4
-rw-r--r--tex/context/base/mkiv/typo-fln.lua6
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin821326 -> 821456 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60787 -> 60789 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
34 files changed, 1347 insertions, 246 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 ef55508e4..3b79bbc13 100644
--- a/context/data/scite/context/lexers/data/scite-context-data-context.lua
+++ b/context/data/scite/context/lexers/data/scite-context-data-context.lua
@@ -1,4 +1,4 @@
return {
- ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred", "plustwohundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "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", "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", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "setupdocument", "presetdocument", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip" },
+ ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "plussixteen", "plushundred", "plustwohundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "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", "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", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "continueifinputfile", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "Ux", "eUx", "Umathaccents", "parfillleftskip", "parfillrightskip" },
["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "then", "begcsname", "strippedcsname", "checkedstrippedcsname", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthsargumenttrue", "sixthargumentfalse", "sixtsargumenttrue", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "dontcomplain", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "reqno", "mathortext", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchcounter", "globalscratchcounter", "scratchdimen", "globalscratchdimen", "scratchskip", "globalscratchskip", "scratchmuskip", "globalscratchmuskip", "scratchtoks", "globalscratchtoks", "scratchbox", "globalscratchbox", "normalbaselineskip", "normallineskip", "normallineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "tracingall", "tracingnone", "loggingall", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "everyendpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "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", "doifelsefirstchar", "doiffirstcharelse", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "uncramped", "cramped", "triggermathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "cldprocessfile", "cldloadfile", "cldcontext", "cldcommand", "carryoverpar", "assumelongusagecs", "Umathbotaccent", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalhpack", "naturalvpack", "frule" },
} \ No newline at end of file
diff --git a/context/data/scite/context/scite-context-data-context.properties b/context/data/scite/context/scite-context-data-context.properties
index ef3549e6d..4189d1e1a 100644
--- a/context/data/scite/context/scite-context-data-context.properties
+++ b/context/data/scite/context/scite-context-data-context.properties
@@ -49,23 +49,23 @@ doifallmodes doifelseallmodes doifallmodeselse doifnotallmodes startenvironment
stopenvironment environment startcomponent stopcomponent component \
startproduct stopproduct product startproject stopproject \
project starttext stoptext startnotext stopnotext \
-startdocument stopdocument documentvariable setupdocument presetdocument \
-startmodule stopmodule usemodule usetexmodule useluamodule \
-setupmodule currentmoduleparameter moduleparameter everystarttext everystoptext \
-startTEXpage stopTEXpage enablemode disablemode preventmode \
-definemode globalenablemode globaldisablemode globalpreventmode pushmode \
-popmode typescriptone typescripttwo typescriptthree mathsizesuffix \
-mathordcode mathopcode mathbincode mathrelcode mathopencode \
-mathclosecode mathpunctcode mathalphacode mathinnercode mathnothingcode \
-mathlimopcode mathnolopcode mathboxcode mathchoicecode mathaccentcode \
-mathradicalcode constantnumber constantnumberargument constantdimen constantdimenargument \
-constantemptyargument continueifinputfile luastringsep !!bs !!es \
-lefttorightmark righttoleftmark breakablethinspace nobreakspace nonbreakablespace \
-narrownobreakspace zerowidthnobreakspace ideographicspace ideographichalffillspace twoperemspace \
-threeperemspace fourperemspace fiveperemspace sixperemspace figurespace \
-punctuationspace hairspace zerowidthspace zerowidthnonjoiner zerowidthjoiner \
-zwnj zwj optionalspace asciispacechar Ux \
-eUx Umathaccents parfillleftskip parfillrightskip
+startdocument stopdocument documentvariable unexpandeddocumentvariable setupdocument \
+presetdocument startmodule stopmodule usemodule usetexmodule \
+useluamodule setupmodule currentmoduleparameter moduleparameter everystarttext \
+everystoptext startTEXpage stopTEXpage enablemode disablemode \
+preventmode definemode globalenablemode globaldisablemode globalpreventmode \
+pushmode popmode typescriptone typescripttwo typescriptthree \
+mathsizesuffix mathordcode mathopcode mathbincode mathrelcode \
+mathopencode mathclosecode mathpunctcode mathalphacode mathinnercode \
+mathnothingcode mathlimopcode mathnolopcode mathboxcode mathchoicecode \
+mathaccentcode mathradicalcode constantnumber constantnumberargument constantdimen \
+constantdimenargument constantemptyargument continueifinputfile luastringsep !!bs \
+!!es lefttorightmark righttoleftmark breakablethinspace nobreakspace \
+nonbreakablespace narrownobreakspace zerowidthnobreakspace ideographicspace ideographichalffillspace \
+twoperemspace threeperemspace fourperemspace fiveperemspace sixperemspace \
+figurespace punctuationspace hairspace zerowidthspace zerowidthnonjoiner \
+zerowidthjoiner zwnj zwj optionalspace asciispacechar \
+Ux eUx Umathaccents parfillleftskip parfillrightskip
keywordclass.context.helpers=\
startsetups stopsetups startxmlsetups stopxmlsetups \
diff --git a/doc/context/documents/general/manuals/steps-mkiv.pdf b/doc/context/documents/general/manuals/steps-mkiv.pdf
new file mode 100644
index 000000000..fabdff6b2
--- /dev/null
+++ b/doc/context/documents/general/manuals/steps-mkiv.pdf
Binary files differ
diff --git a/doc/context/sources/general/manuals/manuals-xml-environment.tex b/doc/context/sources/general/manuals/manuals-xml-environment.tex
new file mode 100644
index 000000000..5a5d9a92d
--- /dev/null
+++ b/doc/context/sources/general/manuals/manuals-xml-environment.tex
@@ -0,0 +1,385 @@
+% language=uk
+%
+% author : Hans Hagen, PRAGMA ADE, NL
+% license : Creative Commons, Attribution-NonCommercial-ShareAlike 3.0 Unported
+
+\usemodule[abr-01]
+
+\startmode[booklet]
+
+ \setuppapersize [A4][oversized]
+
+\stopmode
+
+% \setuppapersize[A4][doubleoversized,landscape]
+% \setuparranging[2UP]
+% \setuppagenumbering[alternative={singlesided,doublesided}]
+
+\setuplayout
+ [location=middle,
+ marking=on]
+
+% \logo [EXAMPLE] {eXaMpLe}
+
+\setuptabulate
+ [rulethickness=1pt,
+ rulecolor=darkgreen]
+
+\setuptables
+ [rulethickness=1pt,
+ rulecolor=darkgreen]
+
+% \usesymbols
+% [cc]
+
+\setuplayout
+ [width=middle,
+ topspace=2cm,
+ top=1cm,
+ cutspace=1.5cm, % 2.0cm
+ backspace=3.5cm,
+ header=1cm,
+ footer=1.5cm,
+ bottom=1cm,
+ leftmargin=2.5cm,
+ rightmargin=1cm,
+ margindistance=.5cm,
+ height=middle]
+
+\definelayout
+ [titlepage]
+ [topspace=2cm,
+ backspace=1.5cm,
+ bottomspace=1.5cm]
+
+\startmode[screen]
+
+ \setuppapersize
+ [S6][S6]
+
+ \setuplayout
+ [topspace=1cm,
+ bottomspace=1.5cm,
+ top=1cm,
+ header=0cm,
+ footer=.5cm,
+ bottom=1cm]
+
+ \setupinteraction
+ [state=start,
+ color=,
+ contrastcolor=,
+ style=,
+ menu=on]
+
+ \setupinteractionmenu
+ [bottom]
+ [left=\hfill,
+ middle=\hskip.25cm,
+ background=color,
+ backgroundcolor=darkgray,
+ color=lightgray,
+ contrastcolor=lightgray,
+ style=\bfb\setstrut\strut,
+ offset=2pt,
+ height=fit,
+ frame=off]
+
+ \startinteractionmenu[bottom]
+ \startbut [PreviousJump] GoBack \stopbut
+ \startbut [previouspage] Previous \stopbut
+ \startbut [nextpage] Next \stopbut
+ \startbut [CloseDocument] Exit \stopbut
+ \stopinteractionmenu
+
+\stopmode
+
+\setupbodyfont[dejavu,11pt]
+
+\definecolor [cyan] [g=.4,b=.4]
+\definecolor [magenta] [r=.4,b=.4]
+\definecolor [yellow] [r=.4,g=.4]
+\definecolor [red] [r=.4]
+\definecolor [green] [g=.4]
+\definecolor [blue] [b=.4]
+\definecolor [gray] [s=.4]
+
+\definecolor [lightgray] [s=.8]
+
+\definecolor [FillColor] [gray]
+
+\definecolor [NumberColor] [red]
+\definecolor [BannerColor] [green]
+\definecolor [AspectColor] [blue]
+
+% *rgb *rgy *rby *gby *rgc *rbc *gbc rgm rbm gbm
+% *cmy cmr cyr myr cmg cyr myg cmb cyb myb
+
+\definepalet[steps] [NumberColor=red, BannerColor=green, AspectColor=blue]
+\definepalet[mathml] [NumberColor=cyan, BannerColor=magenta,AspectColor=yellow]
+\definepalet[chemml] [NumberColor=red, BannerColor=green, AspectColor=yellow]
+\definepalet[physml] [NumberColor=red, BannerColor=blue, AspectColor=yellow]
+\definepalet[figures][NumberColor=green,BannerColor=blue, AspectColor=yellow]
+\definepalet[charts] [NumberColor=red, BannerColor=green, AspectColor=cyan]
+\definepalet[examns] [NumberColor=red, BannerColor=green, AspectColor=cyan]
+\definepalet[general][NumberColor=red, BannerColor=blue, AspectColor=cyan]
+\definepalet[tables] [NumberColor=green,BannerColor=blue, AspectColor=cyan]
+
+\setupindenting
+ [medium]
+
+\indenting
+ [yes]
+
+\defineoverlay
+ [nextpage]
+ [\overlaybutton{nextpage}]
+
+\startusableMPgraphic{cover}
+ path p, q ; color maincolor[], fillcolor ; numeric r, w, h ;
+ numeric cellwidth, cellspread, linewidth ;
+ maincolor[0] := \MPcolor{BannerColor} ;
+ maincolor[1] := \MPcolor{AspectColor} ;
+ maincolor[2] := \MPcolor{NumberColor} ;
+ fillcolor := \MPcolor{FillColor} ;
+ cellwidth := 75pt ;
+ cellspread := 50pt ;
+ linewidth := 1/10pt ;
+ w := OverlayWidth + cellwidth ;
+ h := OverlayHeight + cellwidth ;
+ q := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
+ fill unitsquare xyscaled (w,h) withcolor fillcolor ;
+ set_grid (w,h,cellwidth-cellspread,cellwidth-cellspread) ;
+ forever :
+ if new_on_grid(uniformdeviate w, uniformdeviate h) :
+ draw image (
+ p := unitsquare ;
+ r := floor(uniformdeviate 3) ;
+ fill p enlarged linewidth withcolor fillcolor ;
+ fill p withcolor maincolor[r] ;
+ draw
+ if r = 0 :
+ urcorner p -- .5[llcorner p,ulcorner p] -- lrcorner p
+ elseif r = 1 :
+ ulcorner p -- .5[lrcorner p,urcorner p] -- llcorner p
+ else :
+ urcorner p -- llcorner p
+ fi
+ withpen pencircle scaled linewidth withcolor fillcolor ;
+ )
+ scaled (cellwidth randomized cellspread)
+ shifted (dx,dy) ;
+ fi ;
+ exitif grid_full ;
+ endfor ;
+ % currentpicture := currentpicture shifted -(cellwidth,cellwidth) ;
+ % clip currentpicture to q ;
+\stopusableMPgraphic
+
+\defineoverlay
+ [cover]
+ [\useMPgraphic{cover}]
+
+\setupbackgrounds
+ [page]
+ [offset=3mm]
+
+\defineoverlay
+ [page]
+ [\reuseMPgraphic{page}]
+
+\startreusableMPgraphic{page}
+ StartPage ;
+ path p ; p :=
+ ulcorner Page --
+ llcorner Page --
+ llcorner Page shifted (BackSpace-LeftMarginDistance,0) --
+ ulcorner Page shifted (BackSpace-LeftMarginDistance,0) -- cycle ;
+ fill
+ (p enlarged PageOffset) rightenlarged -PageOffset
+ withcolor \MPcolor{FillColor} ;
+ picture t ; t := textext("\bfb \lightgray \ConTeXt\ XML") rotated 90 ;
+ setbounds t to boundingbox t enlarged ExHeight ;
+ t := image ( label.llft(t,urcorner Page )) ;
+ fill boundingbox t topenlarged PageOffset rightenlarged PageOffset withcolor \MPcolor{FillColor} ;
+ draw t ;
+ StopPage ;
+ setbounds currentpicture to boundingbox currentpicture enlarged PageOffset ;
+\stopreusableMPgraphic
+
+\setuphead
+ [section]
+ [command=\texdefinition{document:head:section},
+ color=lightgray,
+ style=\bfb,
+ before={\blank[2*big]},
+ after={\blank[2*big]},]
+
+\starttexdefinition document:head:section #1#2
+ \hbox {
+ \hskip-\marginwidth
+ \hskip-\margindistance
+ \framed [
+ width=.5\textwidth,
+ offset=2pt,
+ frame=off,
+ background=color,
+ backgroundcolor=AspectColor
+ ] {
+ \hskip.25cm
+ #2
+ \hfill
+ }
+ }
+\stoptexdefinition
+
+\setupheadertexts
+ []
+
+\setupbottom
+ [margin]
+ [color=lightgray,
+ style=\bfb]
+
+\setuptyping
+ [color=green]
+
+\setuptype
+ [color=green]
+
+\doifmodeelse {booklet} {
+
+ \setupbottomtexts
+ [margin]
+ [\setup{document:pagenumber}] []
+ [\setup{document:pagenumber}] []
+
+} {
+
+ \setupbottomtexts
+ [margin]
+ [\setup{document:pagenumber}] []
+
+}
+
+\setvariables
+ [document]
+ [title=No Title,
+ author=No Author]
+
+\startmode[atpragma]
+
+ \setvariables
+ [document]
+ [line:1=Con\TeX t XML,
+ line:2=Pragma ADE / Hasselt NL,
+ line:3=MkIV]
+
+\stopmode
+
+\startsetups document:pagenumber
+ \hbox to \marginwidth {
+ \framed [
+ width=.25\textwidth,
+ offset=2pt,
+ frame=off,
+ background=color,
+ backgroundcolor=NumberColor
+ ] {
+ \hskip.25cm
+ \documentvariable{title}
+ \hfill
+ \pagenumber
+ \hskip.25cm
+ }
+ }
+\stopsetups
+
+\startsetups document:start
+
+ \doifsomething {\documentvariable{palet}} {
+ \setuppalet[\documentvariable{palet}]
+ }
+
+ \setupbackgrounds
+ [page]
+ [background={cover,nextpage}]
+
+ \setuplayout
+ [titlepage]
+
+ \startstandardmakeup[bottomstate=stop]
+ \raggedcenter
+ \lightgray
+ \start
+ \definedfont[SansBold at 100pt]
+ \setupinterlinespace
+ \WORD{\documentvariable{title}}
+ \par
+ \stop
+ \vfilll
+ \doifsomething {\documentvariable{line:1}} {
+ \dontleavehmode\hbox{\definedfont[SansBold at 50pt]\setstrut\strut\documentvariable{line:1}}
+ }
+ \doifsomething {\documentvariable{line:2}} {
+ \vskip25pt
+ \dontleavehmode\hbox{\definedfont[SansBold at 25pt]\setstrut\strut\documentvariable{line:2}}
+ }
+ \doifsomething {\documentvariable{line:3}} {
+ \vskip25pt
+ \dontleavehmode\hbox{\definedfont[SansBold at 25pt]\setstrut\strut\documentvariable{line:3}}
+ }
+ \stopstandardmakeup
+
+ \setuplayout
+
+ \setupbackgrounds
+ [page]
+ [background={page,banner}]
+
+\stopsetups
+
+\startsetups document:stop
+
+ \definecolor[AspectColor][green]
+
+ \startsubject[title=Colofon]
+
+ This manual is part of the \CONTEXT\ distribution, and is authored and maintained by \space
+ \documentvariable{author}. \CONTEXT\ is developed at \PRAGMA, Hasselt, The Netherlands.\space
+ This manual is produced on \currentdate.
+
+ \stopsubject
+
+\stopsetups
+
+% \usemodule[set-11]
+
+% \setupframedtexts
+% [setuptext]
+% [rulethickness=1pt,
+% framecolor=green,
+% background=color,
+% backgroundcolor=lightgray]
+
+% titles:
+
+% Description
+% Structure
+% Usage
+% XML example
+% \TeX\ example
+% Configuring
+% Documentation
+
+\continueifinputfile{s-man-10.mkiv}
+
+\startdocument[title=Title,author=Author,palet=steps]
+
+ \startsection[title=Test]
+
+ \input knuth
+
+ \stopsection
+
+\stopdocument
diff --git a/doc/context/sources/general/manuals/steps/steps-mkiv.tex b/doc/context/sources/general/manuals/steps/steps-mkiv.tex
new file mode 100644
index 000000000..947f08fbb
--- /dev/null
+++ b/doc/context/sources/general/manuals/steps/steps-mkiv.tex
@@ -0,0 +1,655 @@
+\environment manuals-xml-environment.tex
+
+\useMPlibrary [ove]
+
+\usemodule[x][mathml]
+\usemodule[m][steps]
+
+\startdocument[title=Steps,author=Hans Hagen,palet=steps]
+
+\startbuffer
+\startSTEPchart
+\cell {A}
+\cell {one} \text{+2}
+\cell {two} \text{+3}
+\cell {three} \text{+4}
+\cell {four} \text{+5}
+\cell {five}
+\stopSTEPchart
+\stopbuffer
+
+\startsection[title=Description]
+
+This module is written in the process of defining a couple of styles for an
+educational math book. The macros provide you a way to visualize steps in for
+instance solving equations.
+
+The horizontal visualization is called stepchart, while the vertical alternative
+carries the name steptable. The vertical alternative has a special case that
+permits alignment on a mid symbol (in most cases a relation).
+
+The implementation uses a combination of \TEX\ and \METAPOST, and is set up in
+such a way that hyperlinks and alike will work okay.
+
+\stopsection
+
+\startsection[title=Structure]
+
+The horizontal stepcharts have at most four rows: two rows of cells with each an
+associated row of texts. The plural elements \type {cells} and \type {texts} each
+have two subelements. The \type {texts} elements are put between \type {cells}.
+
+\startbuffer
+<stepchart>
+ <cells> <top> some text </top> <bot> some text </bot> </cells>
+ <texts> <top> text </top> <bot> text </bot> </texts>
+ <cells> <top> some text </top> <bot> some text </bot> </cells>
+</stepchart>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+When a singular \type {cell} element is used in combination with the plural \type
+{texts}, we get one row of step cells with both top and bottom texts.
+
+\startbuffer
+<stepchart>
+ <cell> some text </cell>
+ <texts> <top> text </top> <bot> text </bot> </texts>
+ <cell> some text </cell>
+</stepchart>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+The third horizontal alternative only has singular elements, and as a result the
+texts are put above the step cells.
+
+\startbuffer
+<stepchart>
+ <cell> some cell </cell>
+ <cell> another cell </cell> <text> a bit of text </text>
+ <cell> third cell </cell> <text> more text </text>
+ <cell> last cell </cell>
+</stepchart>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+Normally, the lines go from cell to cell via a text. When you let the \type
+{cell} element follow by more than one \type {text} element (or their plural
+forms), all lines will start at the same point.
+
+\startbuffer
+<stepchart>
+ <cell> some text </cell>
+ <cell> some text </cell> <text> text 1 </text> <text> text 2 </text>
+ <cell> some text </cell>
+ <cell> some text </cell> <text> text 3 </text>
+ <cell> some text </cell>
+</stepchart>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+The vertical alternative (of course) looks different and permits pretty long
+explanations.
+
+\startbuffer
+<steptable>
+ <cell> cell 1 </cell>
+ <text> text 1 </text>
+ <cell> cell 2 </cell>
+ <text> text 2 </text>
+ <cell> cell 3 </cell>
+</steptable>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+When the plural element \type {cells} is used, three sub||elements are expected.
+These align around the mid element \type {c2}.
+
+\startbuffer
+<stepaligntable>
+ <cells> <c1> left </c1> <c2> center </c2> <c3> right </c3> </cells>
+ <text> text </text>
+ <cells> <c1> lft </c1> <c2> ctr </c2> <c3> rgt </c3> </cells>
+ <text> text </text>
+ <cells> <c1> l </c1> <c2> c </c2> <c3> r </c3> </cells>
+</stepaligntable>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\stopsection
+
+\startsection[title=Usage]
+
+The step chart module is loaded with:
+
+\starttyping
+\usemodule[cell] % was step
+\stoptyping
+
+\noindentation but in the case of embedded math, you should also load the \MATHML\ module:
+
+\starttyping
+\usemodule[cell,mathml]
+\stoptyping
+
+\stopsection
+
+\startsection[title=\XML\ example]
+
+Because we don't want to clutter the examples with \MATHML\ we stick to a simple
+mapping:
+
+\startbuffer
+\startxmlsetups xml:math:simple
+ \xmlsetsetup {#1} {m} {xml:math:simple:tex}
+\stopxmlsetups
+
+\startxmlsetups xml:math:simple:tex
+ \mathematics{\xmlflush{#1}}
+\stopxmlsetups
+
+\xmlregistersetup{xml:math:simple}
+\stopbuffer
+
+\typebuffer \getbuffer
+
+So, in the next examples the \type {m} element contains \TEX\ math.
+
+\startbuffer
+<stepchart>
+ <cells> <top> A </top> <bot> B </bot> </cells>
+ <cells> <top> one </top> <bot> five </bot> </cells>
+ <texts> <top> <m> +2 </m> </top> <bot> <m> -2 </m> </bot> </texts>
+ <cells> <top> two </top> <bot> four </bot> </cells>
+ <texts> <top> <m> +3 </m> </top> <bot> <m> -3 </m> </bot> </texts>
+ <cells> <top> three </top> <bot> three </bot> </cells>
+ <texts> <top> <m> +4 </m> </top> <bot> <m> -4 </m> </bot> </texts>
+ <cells> <top> four </top> <bot> two </bot> </cells>
+ <texts> <top> <m> +5 </m> </top> <bot> <m> -5 </m> </bot> </texts>
+ <cells> <top> five </top> <bot> one </bot> </cells>
+</stepchart>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\startbuffer
+<stepchart>
+ <cell> A </cell>
+ <cell> one </cell> <text> <m> +2 </m> </text>
+ <cell> two </cell> <text> <m> +3 </m> </text>
+ <cell> three </cell> <text> <m> +4 </m> </text>
+ <cell> four </cell> <text> <m> +5 </m> </text>
+ <cell> five </cell>
+</stepchart>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\startbuffer
+<steptable>
+ <cell>
+ <math xmlns="mathml">
+ <apply> <eq/> <ci> c </ci>
+ <apply> <plus/>
+ <apply> <times/> <cn> 2 </cn> <ci> a </ci> </apply>
+ <apply> <times/> <cn> 3 </cn> <ci> b </ci> </apply>
+ </apply>
+ </apply>
+ </math>
+ </cell>
+ <text> with
+ <math xmlns="mathml">
+ <apply> <eq/> <ci> a </ci> <cn> 5 </cn> </apply>
+ </math>
+ </text>
+ <cell>
+ <math xmlns="mathml">
+ <apply> <eq/> <ci> c </ci>
+ <apply> <plus/> <cn> 10 </cn>
+ <apply> <times/> <cn> 3 </cn> <ci> b </ci> </apply>
+ </apply>
+ </apply>
+ </math>
+ </cell>
+ <text> and
+ <math xmlns="mathml">
+ <apply> <eq/> <ci> b </ci> <cn> 6 </cn> </apply>
+ </math>
+ </text>
+ <cell>
+ <math xmlns="mathml">
+ <apply> <eq/> <ci> c </ci>
+ <apply> <plus/> <cn> 10 </cn> <cn> 18 </cn> </apply>
+ </apply>
+ </math>
+ </cell>
+ <text>
+ we get
+ </text>
+ <cell>
+ <math xmlns="mathml">
+ <apply> <eq/> <ci> c </ci> <cn> 28 </cn> </apply>
+ </math>
+ </cell>
+</steptable>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\startbuffer
+<stepaligntable>
+ <cells>
+ <c1> <m>c</m> </c1> <c2> <m>=</m> </c2> <c3> <m>2a+3b</m> </c3>
+ </cells>
+ <text>
+ with <m>a=5</m>
+ </text>
+ <cells>
+ <c1> <m>c</m> </c1> <c2> <m>=</m> </c2> <c3> <m>10+3b</m> </c3>
+ </cells>
+ <text>
+ and <m>b=6</m>
+ </text>
+ <cells>
+ <c1> <m>c</m> </c1> <c2> <m>=</m> </c2> <c3> <m>10+18</m> </c3>
+ </cells>
+ <text>
+ we get
+ </text>
+ <cells>
+ <c1> <m>c</m> </c1> <c2> <m>=</m> </c2> <c3> <m>28</m> </c3>
+ </cells>
+</stepaligntable>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\stopsection
+
+\startsection[title=\TEX\ example]
+
+\startbuffer
+\startSTEPchart
+\cells {A} {B}
+\cells {one} {five or more} \texts{$+2$}{$-2$}
+\cells {two} {four} \texts{$+3$}{$-3$}
+\cells {three} {three} \texts{$+4$}{$-4$}
+\cells {four} {two} \texts{$+5$}{$-5$}
+\cells {five or more} {one}
+\stopSTEPchart
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startSTEPchart
+\cell {A}
+\cell {one} \texts{$+2$}{$-2$}
+\cell {two} \texts{$+3$}{$-3$}
+\cell {three} \texts{$+4$}{$-4$}
+\cell {four} \texts{$+5$}{$-5$}
+\cell {five or more}
+\stopSTEPchart
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startSTEPchart
+\cells {A} {B}
+\cells {one} {five or more} \texts{$+2$}{}
+\cells {two} {four} \texts{}{$-3$}
+\cells {three} {three} \texts{$+4$}{}
+\cells {four} {two} \texts{}{$-5$}
+\cells {five or more} {one}
+\stopSTEPchart
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startSTEPchart
+\cell {A}
+\cell {one} \text{+2} \text{+3} \text{+4} \text{+5}
+\cell {two}
+\cell {three}
+\cell {four}
+\cell {five}
+\stopSTEPchart
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startSTEPchart
+\cell {A}
+\cell {one} \texts{}{+2} \texts{}{+3}
+\cell {two}
+\cell {three} \texts{+4}{} \texts{+5}{}
+\cell {four}
+\cell {five}
+\stopSTEPchart
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startSTEPchart
+\cell {A}
+\cell {one} \text{+2}
+\cell {two} \text{+3}
+\cell {three} \text{+4}
+\cell {four} \text{+5}
+\cell {five}
+\stopSTEPchart
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startSTEPtable
+\cell {$c=2a+3b$}
+\text {with $a=5$}
+\cell {$c=10+3b$}
+\text {and $b=6$}
+\cell {$c=10+18$}
+\text {we get}
+\cell {$c=28$}
+\stopSTEPtable
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startSTEPaligntable
+\cells {$2c$} {$=$} {$2a+3b$}
+\text {with $a=5$}
+\cells {$2c$}{$=$} {$10+3b$}
+\text {and $b=6$}
+\cells {$2c$} {$=$} {$10+18$}
+\text {we get}
+\cells {$2c$} {$=$} {$28$}
+\text {and therefore}
+\cells {$c$} {$=$} {$28/2$}
+\text {which reduces to}
+\cells {$c$} {$=$} {$14$}
+\stopSTEPaligntable
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startSTEPchart
+ \cells {A} {B}
+ \cells {one} {five} \texts{$+2$}{$-2$}
+ \cells {two} {four} \texts{$+3$}{$-3$}
+ \cells {three} {three} \texts{$+4$}{$-4$}
+ \cells {four} {two} \texts{$+5$}{$-5$}
+ \cells {five} {one}
+\stopSTEPchart
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stopsection
+
+\startsection[title=Configuring]
+
+The charts and tables can have their own spacing set. Quite certainly the
+distances between cells will differ.
+
+\starttabulate[|Tl|l|]
+\HL
+\NC \rlap{\tex{setupSTEPcharts} \tex{setupSTEPtables}} \NC \NC \NR
+\HL
+\NC after \NC hook for commands to execute after the table \NC \NR
+\NC before \NC hook for commands to execute before the table \NC \NR
+% \NC method \NC line drawing method\NC \NR
+% \NC height \NC height of the connecting line \NC \NR
+% \NC offset \NC the distance between lines and cells and texts \NC \NR
+% \NC hoffset \NC the horizontal distance between cells \NC \NR
+% \NC voffset \NC the vertical distance between cells \NC \NR
+\HL
+\stoptabulate
+
+Both charts and tables have common settings with respect to the cells, texts and
+lines.
+
+\starttabulate[|Tl|l|]
+\HL
+\NC \rlap{\tex{setupSTEPcells} \tex{setupSTEPtexts}} \NC \NC \NR
+\HL
+\NC alternative \NC the kind of shape to be drawn \NC \NR
+\NC backgroundcolor \NC the background color identified by name \NC \NR
+\NC rulethickness \NC the width of frame around cells \NC \NR
+\NC framecolor \NC the frame color identified by name \NC \NR
+\NC offset \NC the space between content and frame \NC \NR
+\NC style \NC a (preferable named) style \NC \NR
+\NC color \NC the color of the content \NC \NR
+\HL
+\stoptabulate
+
+\starttabulate[|Tl|l|]
+\HL
+\NC \rlap{\tex{setupSTEPlines}} \NC \NC \NR
+\HL
+\NC alternative \NC the kind of line to draw between cells \NC \NR
+\NC distance \NC the distance between lines and text \NC \NR
+\NC offset \NC the shift to the right of the start of the line \NC \NR
+\NC height \NC the height of the (curved) line \NC \NR
+\NC rulethickness \NC the width of the lines between cells \NC \NR
+\NC color \NC the line color identified by name \NC \NR
+\HL
+\stoptabulate
+
+In \TEX, some of the settings, like \type {style} and \type {color} can be set
+between elements. In \XML, the settings are passed as processing instructions.
+
+\startbuffer
+\startSTEPchart
+\cell {A}
+\cell {one} \text{+2}
+\cell {two} \text{+3}
+\start
+ \setupSTEPcells[color=darkred,style=bold]
+ \cell {three} \text{+4}
+ \cell {four} \text{+5}
+\stop
+\cell {five}
+\stopSTEPchart
+\stopbuffer
+
+\typebuffer \getbuffer
+
+There are a couple of alternative shapes available. The most relevant ones are:
+\removeunwantedspaces \dostepwiserecurse {5} {9} {1} { \TestShape {\recurselevel}}
+\removeunwantedspaces \dostepwiserecurse {12} {19} {1} { \TestShape {\recurselevel}}
+\removeunwantedspaces \dostepwiserecurse {22} {29} {1} { \TestShape {\recurselevel}}.
+
+Although it is not too wise to set up the layout in the middle of a document, for
+graphics one can seldom get by some local fine||tuning. Here we encounter a
+rather fundamental difference between \TEX\ and \XML. In \TEX, you can easily
+change settings on a temporary basis by using groups. In \XML\ on the other hand,
+settings are bound to a category. So, in \TEX\ you can do this:
+
+\startbuffer
+\setupSTEPcells
+ [important]
+ [color=darkgreen,
+ style=bold]
+
+\startSTEPchart
+\cell {A}
+\cell {one} \text{+2}
+\cell {two} \text{+3}
+\cell [important] {three} \text{+4}
+\cell [important] {four} \text{+5}
+\cell {five}
+\stopSTEPchart
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\noindentation An \XML\ example is:
+
+\startbuffer
+\setupSTEPcells[demo-1][alternative=5]
+\setupSTEPcells[demo-1][framecolor=darkred]
+\setupSTEPtexts[demo-1][framecolor=darkgreen]
+\setupSTEPlines[demo-1][alternative=4]
+\setupSTEPtexts[demo-2][style=bold]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\noindentation This will be applied to:
+
+\startbuffer
+<steptable class="demo-1">
+ <cell> type 5 </cell>
+ <text> type 6 </text>
+ <cell> type 7 </cell>
+ <text class="demo-2"> type 8 </text>
+ <cell> type 9 </cell>
+</steptable>
+\stopbuffer
+
+\typebuffer
+
+\noindentation so that we get:
+
+\processxmlbuffer
+
+You can also use processing instructions:
+
+\startbuffer
+<stepchart>
+ <cells> <top> some text 1 </top> <bot> some text 2 </bot> </cells>
+ <?context-stepchart-directive text color darkred ?>
+ <texts> <top> text 3 </top> <bot> text 4 </bot> </texts>
+ <cells> <top> some text 5 </top> <bot> some text 6 </bot> </cells>
+ <?context-stepchart-directive text color darkblue ?>
+ <texts> <top> text 7t </top> </texts>
+ <cells> <top> some text 8 </top> </cells>
+</stepchart>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\startbuffer
+<steptable>
+ <?context-stepchart-directive cell alternative 12 ?>
+ <cell> cell 12 </cell> <text> 12 to 13 </text>
+ <?context-stepchart-directive cell alternative 13 ?>
+ <cell> cell 13 </cell> <text> 13 to 14 </text>
+ <?context-stepchart-directive cell alternative 14 ?>
+ <cell> cell 14 </cell> <text> 14 to 15 </text>
+ <?context-stepchart-directive cell alternative 15 ?>
+ <cell> cell 15 </cell>
+</steptable>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+Some settings apply to the whole chart. In \TEX\ this is easy since we
+can group the whole chart including settings but in \XML\ this is somewhat
+problematic. We can however fall back on basic tex commands but it's
+probably better to use as category (class), like:
+
+\startbuffer
+\setupSTEPtexts[demo-5][distance=3em]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\noindentation So, the following works as expected:
+
+\startbuffer
+<document>
+ <?context-tex-directive start ?>
+ <?context-stepchart-directive text distance 1em ?>
+ <stepaligntable>
+ <cells> <c1>a</c1> <c2>b</c2> <c3>c</c3> </cells>
+ <text> test 1 </text>
+ <cells> <c1>aa</c1> <c2>b</c2> <c3>ccc</c3> </cells>
+ </stepaligntable>
+ <?context-tex-directive stop ?>
+ <stepaligntable>
+ <cells> <c1>a</c1> <c2>b</c2> <c3>c</c3> </cells>
+ <text> test 2 </text>
+ <cells> <c1>aa</c1> <c2>b</c2> <c3>ccc</c3> </cells>
+ </stepaligntable>
+ <stepaligntable class="demo-5">
+ <cells> <c1>a</c1> <c2>b</c2> <c3>c</c3> </cells>
+ <text> test 3 </text>
+ <cells> <c1>aa</c1> <c2>b</c2> <c3>ccc</c3> </cells>
+ </stepaligntable>
+</document>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\startbuffer
+<document>
+ <?context-tex-directive start ?>
+ <?context-stepchart-directive cell dx 10ex ?>
+ <stepchart>
+ <cells> <top> from here </top> <bot> there </bot> </cells>
+ <texts> <top> to </top> <bot> to </bot> </texts>
+ <cells> <top> and here </top> <bot> there </bot> </cells>
+ </stepchart>
+ <?context-tex-directive stop ?>
+</document>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\startbuffer
+<document>
+ <?context-tex-directive start ?>
+ <?context-stepchart-directive line height 30pt ?>
+ <?context-stepchart-directive line offset 5pt ?>
+ <steptable>
+ <cell> some cell </cell>
+ <cell> another cell </cell> <text> a bit of text </text>
+ <cell> third cell </cell> <text> more text </text>
+ <cell> last cell </cell>
+ </steptable>
+ <?context-tex-directive stop ?>
+</document>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\startbuffer
+<document>
+ <?context-tex-directive start ?>
+ <?context-stepchart-directive line height 30pt ?>
+ <?context-stepchart-directive line offset 15pt ?>
+ <stepchart>
+ <cell> some cell </cell>
+ <cell> another cell </cell> <text> a bit of text </text>
+ <cell> third cell </cell> <text> more text </text>
+ <cell> last cell </cell>
+ </stepchart>
+ <?context-tex-directive stop ?>
+</document>
+\stopbuffer
+
+\typebuffer \processxmlbuffer
+
+\stopsection
+
+\startsection[title=Documentation]
+
+There is no additional documentation on this module.
+
+\stopsection
+
+\stopdocument
diff --git a/metapost/context/base/mpiv/mp-page.mpiv b/metapost/context/base/mpiv/mp-page.mpiv
index 2e4a2b437..2f87413b1 100644
--- a/metapost/context/base/mpiv/mp-page.mpiv
+++ b/metapost/context/base/mpiv/mp-page.mpiv
@@ -670,6 +670,8 @@ string RuleOption ; RuleOption := "" ;
numeric RuleWidth ; RuleWidth := 0 ;
numeric RuleHeight ; RuleHeight := 0 ;
numeric RuleDepth ; RuleDepth := 0 ;
+numeric RuleH ; RuleH := 0 ;
+numeric RuleV ; RuleV := 0 ;
numeric RuleThickness ; RuleThickness := 0 ;
numeric RuleFactor ; RuleFactor := 0 ;
numeric RuleOffset ; RuleOffset := 0 ;
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 51bce134d..f2a17f470 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/anch-bck.mkvi b/tex/context/base/mkiv/anch-bck.mkvi
index ee392f114..953c3440f 100644
--- a/tex/context/base/mkiv/anch-bck.mkvi
+++ b/tex/context/base/mkiv/anch-bck.mkvi
@@ -228,7 +228,7 @@
\ifgridsnapping
\spac_helpers_assign_skip\textbackgroundskip{\textbackgroundparameter\c!topoffset}%
\ifdim\textbackgroundskip>\zeropoint
- \struttedbox{\hbox{\raise\textbackgroundskip\hbox{\bpos\v_anch_backgrounds_text_current}}}%
+ \struttedbox{\hpack{\raise\textbackgroundskip\hpack{\bpos\v_anch_backgrounds_text_current}}}%
\else
\bpos\v_anch_backgrounds_text_current
\fi
@@ -281,7 +281,7 @@
\spac_helpers_assign_skip\textbackgroundskip{\textbackgroundparameter\c!bottomoffset}%
\ifgridsnapping % experimental, pascal (todo: topoffset in same way)
\ifdim\textbackgroundskip>\zeropoint
- \struttedbox\plusone{\hbox{\lower\textbackgroundskip\hbox{\epos\v_anch_backgrounds_text_current}}}%
+ \struttedbox\plusone{\hpack{\lower\textbackgroundskip\hpack{\epos\v_anch_backgrounds_text_current}}}%
\else
\epos\v_anch_backgrounds_text_current
\fi
diff --git a/tex/context/base/mkiv/anch-pgr.lua b/tex/context/base/mkiv/anch-pgr.lua
index b5c2ae628..dc26499bf 100644
--- a/tex/context/base/mkiv/anch-pgr.lua
+++ b/tex/context/base/mkiv/anch-pgr.lua
@@ -35,7 +35,8 @@ local f_pair = formatters["(%p,%p)"]
local f_path = formatters["%--t--cycle"]
local function regionarea(r)
- local rx, ry = r.x, r.y
+ local rx = r.x
+ local ry = r.y
local rw = rx + r.w
local rh = ry + r.h
local rd = ry - r.d
@@ -103,7 +104,8 @@ local function finish(t)
end
local function clip(t,ytop,ybot)
- local first, last = 1, #t
+ local first = 1
+ local last = #t
for i=first,last do
local y = t[i][2]
if ytop < y then
@@ -125,15 +127,15 @@ end
-- todo: mark regions and free paragraphs in collected
-local function shapes(r,rx,ry,rw,rh,rd,lytop,lybot,rytop,rybot,obeyhang)
+local function shapes(r,rx,ry,rw,rh,rd,lytop,lybot,rytop,rybot,obeyhang,r2l)
-- we assume that we only hang per page and not cross pages
-- which makes sense as hanging is only uses in special cases
--
-- we can remove data as soon as a page is done so we could
-- remember per page and discard areas after each shipout
- local leftshape, rightshape
- leftshape = { { rx, rh } } -- spikes get removed so we can start at the edge
- rightshape = { { rw, rh } } -- even if we hang next
+ local delta = r2l and (rw - rx) or 0
+ local leftshape = { { rx + delta, rh } } -- spikes get removed so we can start at the edge
+ local rightshape = { { rw - delta, rh } } -- even if we hang next
local paragraphs = r.paragraphs
local extending = false
if paragraphs then
@@ -151,16 +153,16 @@ local function shapes(r,rx,ry,rw,rh,rd,lytop,lybot,rytop,rybot,obeyhang)
-- ha < 0 hi > 0 : left top
if ha < 0 then
if hi < 0 then -- right
- add(rightshape,rw, py_ph,"up")
- add(rightshape,rw + hi,py_ph,"up")
- add(rightshape,rw + hi,py_ph + hang,"up")
- add(rightshape,rw, py_ph + hang,"up")
+ add(rightshape,rw - delta, py_ph,"up")
+ add(rightshape,rw - delta + hi,py_ph,"up")
+ add(rightshape,rw - delta + hi,py_ph + hang,"up")
+ add(rightshape,rw - delta, py_ph + hang,"up")
else
-- left
- add(leftshape,rx,py_ph,"down")
- add(leftshape,rx + hi,py_ph,"down")
- add(leftshape,rx + hi,py_ph + hang,"down")
- add(leftshape,rx,py_ph + hang,"down")
+ add(leftshape,rx + delta,py_ph,"down")
+ add(leftshape,rx + delta + hi,py_ph,"down")
+ add(leftshape,rx + delta + hi,py_ph + hang,"down")
+ add(leftshape,rx + delta,py_ph + hang,"down")
end
else
-- maybe some day
@@ -181,11 +183,11 @@ local function shapes(r,rx,ry,rw,rh,rd,lytop,lybot,rytop,rybot,obeyhang)
local p = ps[i]
local l = p[1]
local w = p[2]
- add(leftshape,rx + l, py_ph,"up")
- add(rightshape,rx + l + w, py_ph,"down")
+ add(leftshape, rx + delta + l, py_ph,"up")
+ add(rightshape,rx - delta + l + w, py_ph,"down")
py_ph = py_ph - step
- add(leftshape,rx + l, py_ph,"up")
- add(rightshape,rx + l + w, py_ph,"down")
+ add(leftshape, rx + delta + l, py_ph,"up")
+ add(rightshape,rx - delta + l + w, py_ph,"down")
end
extending = true
elseif extending then
@@ -194,10 +196,10 @@ local function shapes(r,rx,ry,rw,rh,rd,lytop,lybot,rytop,rybot,obeyhang)
local pd = p.d
local py_ph = py + ph
local py_pd = py - pd
- add(leftshape,leftshape[#leftshape][1],py_ph,"up")
+ add(leftshape, leftshape [#leftshape ][1],py_ph,"up")
add(rightshape,rightshape[#rightshape][1],py_ph,"down")
- add(leftshape,rx,py_ph,"up") -- shouldn't this be py_pd
- add(rightshape,rw,py_ph,"down") -- shouldn't this be py_pd
+ add(leftshape, rx + delta,py_ph,"up") -- shouldn't this be py_pd
+ add(rightshape,rw - delta,py_ph,"down") -- shouldn't this be py_pd
extending = false
end
end
@@ -206,11 +208,11 @@ local function shapes(r,rx,ry,rw,rh,rd,lytop,lybot,rytop,rybot,obeyhang)
-- we can have a simple variant when no paragraphs
if extending then
-- not ok
- leftshape[#leftshape][2] = rd
- rightshape[#rightshape][2] = rw
+ leftshape [#leftshape] [2] = rd
+ rightshape[#rightshape][2] = rd
else
- add(leftshape,rx,rd,"up")
- add(rightshape,rw,rd,"down")
+ add(leftshape, rx + delta,rd,"up")
+ add(rightshape,rw - delta,rd,"down")
end
return clip(leftshape,lytop,lybot), clip(rightshape,rytop,rybot)
end
@@ -242,6 +244,14 @@ local function singlepart(b,e,r,left,right,obeyhang)
-- (at least visually) injected then it's best to stress the issue.
ex = rw
end
+-- if b.r2l then
+-- print("BEGIN r2l")
+-- bx = b.w - bx
+-- end
+-- if e.r2l then
+-- print("END r2l")
+-- ex = e.w - ex
+-- end
local area
if by == ey then
area = {
@@ -252,7 +262,7 @@ local function singlepart(b,e,r,left,right,obeyhang)
}
else
area = { }
- local leftshapes, rightshapes = shapes(r,rx,ry,rw,rh,rd,bd,ed,bh,eh,obeyhang)
+ local leftshapes, rightshapes = shapes(r,rx,ry,rw,rh,rd,bd,ed,bh,eh,obeyhang,b.r2l)
add(area,bx,bh-ry)
for i=1,#rightshapes do
local ri = rightshapes[i]
@@ -292,7 +302,7 @@ local function firstpart(b,r,left,right,obeyhang)
local bh = by + b.h
local bd = by - b.d
local area = { }
- local leftshapes, rightshapes = shapes(r,rx,ry,rw,rh,rd,bd,rd,bh,rd,obeyhang)
+ local leftshapes, rightshapes = shapes(r,rx,ry,rw,rh,rd,bd,rd,bh,rd,obeyhang,b.r2l)
add(area,bx,bh-ry)
for i=1,#rightshapes do
local ri = rightshapes[i]
@@ -317,7 +327,8 @@ local function firstpart(b,r,left,right,obeyhang)
end
local function middlepart(r,left,right,obeyhang)
- local rx, ry = r.x, r.y
+ local rx = r.x
+ local ry = r.y
local rw = rx + r.w
local rh = ry + r.h
local rd = ry - r.d
@@ -361,7 +372,7 @@ local function lastpart(e,r,left,right,obeyhang)
local ed = ey - e.d
local area = { }
-- two cases: till end and halfway e line
- local leftshapes, rightshapes = shapes(r,rx,ry,rw,rh,rd,rh,ed,rh,eh,obeyhang)
+ local leftshapes, rightshapes = shapes(r,rx,ry,rw,rh,rd,rh,ed,rh,eh,obeyhang,e.r2l)
for i=1,#rightshapes do
local ri = rightshapes[i]
add(area,ri[1],ri[2]-ry)
diff --git a/tex/context/base/mkiv/anch-pos.lua b/tex/context/base/mkiv/anch-pos.lua
index 2cb2e70ee..7d814677a 100644
--- a/tex/context/base/mkiv/anch-pos.lua
+++ b/tex/context/base/mkiv/anch-pos.lua
@@ -84,20 +84,21 @@ _plib_ = jobpositions -- might go
local default = { -- not r and paragraphs etc
__index = {
- x = 0, -- x position baseline
- y = 0, -- y position baseline
- w = 0, -- width
- h = 0, -- height
- d = 0, -- depth
- p = 0, -- page
- n = 0, -- paragraph
- ls = 0, -- leftskip
- rs = 0, -- rightskip
- hi = 0, -- hangindent
- ha = 0, -- hangafter
- hs = 0, -- hsize
- pi = 0, -- parindent
- ps = false, -- parshape
+ x = 0, -- x position baseline
+ y = 0, -- y position baseline
+ w = 0, -- width
+ h = 0, -- height
+ d = 0, -- depth
+ p = 0, -- page
+ n = 0, -- paragraph
+ ls = 0, -- leftskip
+ rs = 0, -- rightskip
+ hi = 0, -- hangindent
+ ha = 0, -- hangafter
+ hs = 0, -- hsize
+ pi = 0, -- parindent
+ ps = false, -- parshape
+ dir = 0,
}
}
@@ -209,20 +210,20 @@ local getpos = function() getpos = backends.codeinjections.getpos return getp
local gethpos = function() gethpos = backends.codeinjections.gethpos return gethpos() end
local getvpos = function() getvpos = backends.codeinjections.getvpos return getvpos() end
-local function setdim(name,w,h,d,extra) -- will be used when we move to sp allover
- local x, y = getpos()
- tobesaved[name] = {
- p = texgetcount("realpageno"),
- x = x ~= 0 and x or nil,
- y = y ~= 0 and y or nil,
- w = w ~= 0 and w or nil,
- h = h ~= 0 and h or nil,
- d = d ~= 0 and d or nil,
- e = extra ~= "" and extra or nil,
- r = region,
- c = column,
- }
-end
+-- local function setdim(name,w,h,d,extra) -- not used
+-- local x, y = getpos()
+-- tobesaved[name] = {
+-- p = texgetcount("realpageno"),
+-- x = x ~= 0 and x or nil,
+-- y = y ~= 0 and y or nil,
+-- w = w ~= 0 and w or nil,
+-- h = h ~= 0 and h or nil,
+-- d = d ~= 0 and d or nil,
+-- e = extra ~= "" and extra or nil,
+-- r = region,
+-- c = column,
+-- }
+-- end
local function setall(name,p,x,y,w,h,d,extra)
tobesaved[name] = {
@@ -235,6 +236,7 @@ local function setall(name,p,x,y,w,h,d,extra)
e = extra ~= "" and extra or nil,
r = region,
c = column,
+r2l = texgetcount("inlinelefttoright") == 1 and true or nil,
}
end
@@ -310,7 +312,7 @@ local function get(id,index)
end
end
-jobpositions.setdim = setdim
+------------.setdim = setdim
jobpositions.setall = setall
jobpositions.set = set
jobpositions.get = get
@@ -538,6 +540,7 @@ scanners.dosetposition = function() -- name
x = true,
y = true,
n = nofparagraphs > 0 and nofparagraphs or nil,
+r2l = texgetcount("inlinelefttoright") == 1 or nil,
}
-- context(new_latelua_node(f_enhance(name)))
context(new_latelua_node(function() enhance(tobesaved[name]) end))
@@ -558,6 +561,7 @@ scanners.dosetpositionwhd = function() -- name w h d extra
h = h ~= 0 and h or nil,
d = d ~= 0 and d or nil,
n = nofparagraphs > 0 and nofparagraphs or nil,
+r2l = texgetcount("inlinelefttoright") == 1 or nil,
}
-- context(new_latelua_node(f_enhance(name)))
context(new_latelua_node(function() enhance(tobesaved[name]) end))
@@ -579,6 +583,7 @@ scanners.dosetpositionbox = function() -- name box
h = h ~= 0 and h or nil,
d = d ~= 0 and d or nil,
n = nofparagraphs > 0 and nofparagraphs or nil,
+r2l = texgetcount("inlinelefttoright") == 1 or nil,
}
-- context(new_latelua_node(f_enhance(name)))
context(new_latelua_node(function() enhance(tobesaved[name]) end))
@@ -600,6 +605,7 @@ scanners.dosetpositionplus = function() -- name w h d extra
d = d ~= 0 and d or nil,
n = nofparagraphs > 0 and nofparagraphs or nil,
e = scanstring(),
+r2l = texgetcount("inlinelefttoright") == 1 or nil,
}
-- context(new_latelua_node(f_enhance(name)))
context(new_latelua_node(function() enhance(tobesaved[name]) end))
@@ -619,6 +625,7 @@ scanners.dosetpositionstrut = function() -- name
h = h ~= 0 and h or nil,
d = d ~= 0 and d or nil,
n = nofparagraphs > 0 and nofparagraphs or nil,
+r2l = texgetcount("inlinelefttoright") == 1 or nil,
}
-- context(new_latelua_node(f_enhance(name)))
context(new_latelua_node(function() enhance(tobesaved[name]) end))
diff --git a/tex/context/base/mkiv/attr-col.lua b/tex/context/base/mkiv/attr-col.lua
index 6b11333a7..4a32884cb 100644
--- a/tex/context/base/mkiv/attr-col.lua
+++ b/tex/context/base/mkiv/attr-col.lua
@@ -12,8 +12,7 @@ if not modules then modules = { } end modules ['attr-col'] = {
-- list could as well refer to the tables (instead of numbers that
-- index into another table) .. depends on what we need
-local type = type
-local format = string.format
+local type, tonumber = type, tonumber
local concat = table.concat
local min, max, floor = math.min, math.max, math.floor
@@ -26,6 +25,14 @@ local storage = storage
local context = context
local tex = tex
+local variables = interfaces.variables
+local v_yes = variables.yes
+local v_no = variables.no
+
+local p_split_comma = lpeg.tsplitat(",")
+local p_split_colon = lpeg.splitat(":")
+local lpegmatch = lpeg.match
+
local allocate = utilities.storage.allocate
local setmetatableindex = table.setmetatableindex
@@ -145,10 +152,14 @@ end
local function rgbtogray(r,g,b)
if not r then
return 0
- elseif colors.weightgray then
+ end
+ local w = colors.weightgray
+ if w == true then
return .30*r + .59*g + .11*b
- else
+ elseif not w then
return r/3 + g/3 + b/3
+ else
+ return w[1]*r + w[2]*g + w[3]*b
end
end
@@ -156,17 +167,6 @@ local function cmyktogray(c,m,y,k)
return rgbtogray(cmyktorgb(c,m,y,k))
end
--- not critical so not needed:
---
--- local function cmyktogray(c,m,y,k)
--- local r, g, b = 1.0 - min(1.0,c+k), 1.0 - min(1.0,m+k), 1.0 - min(1.0,y+k)
--- if colors.weightgray then
--- return .30*r + .59*g + .11*b
--- else
--- return r/3 + g/3 + b/3
--- end
--- end
-
-- http://en.wikipedia.org/wiki/HSI_color_space
-- http://nl.wikipedia.org/wiki/HSV_(kleurruimte)
@@ -264,9 +264,6 @@ 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
@@ -283,8 +280,8 @@ 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 ps = lpegmatch(p_split_comma,p)
+ local ds = lpegmatch(p_split_comma,d)
local c, m, y, k = 0, 0, 0, 0
local done = false
for i=1,#ps do
@@ -364,10 +361,31 @@ function colors.filter(n)
return concat(data[n],":",5)
end
+-- unweighted (flat) gray could be another model but a bit work as we need to check:
+--
+-- attr-col colo-ini colo-run
+-- grph-inc grph-wnd
+-- lpdf-col lpdf-fmt lpdf-fld lpdf-grp
+-- meta-pdf meta-pdh mlib-pps
+--
+-- but as we never needed it we happily delay that.
+
function colors.setmodel(name,weightgray)
- colors.model = name
- colors.default = models[name] or 1
- colors.weightgray = weightgray ~= false
+ if weightgray == true or weightgray == v_yes then
+ weightgray = true
+ elseif weightgray == false or weightgray == v_no then
+ weightgray = false
+ else
+ local r, g, b = lpegmatch(p_split_colon,weightgray)
+ if r and g and b then
+ weightgray = { r, g, b }
+ else
+ weightgray = true
+ end
+ end
+ colors.model = name -- global, not useful that way
+ colors.default = models[name] or 1 -- global
+ colors.weightgray = weightgray -- global
return colors.default
end
diff --git a/tex/context/base/mkiv/colo-ini.lua b/tex/context/base/mkiv/colo-ini.lua
index a2e761eae..655176f7e 100644
--- a/tex/context/base/mkiv/colo-ini.lua
+++ b/tex/context/base/mkiv/colo-ini.lua
@@ -44,7 +44,7 @@ local texgettoks = tex.gettoks
local a_color = attributes.private('color')
local a_transparency = attributes.private('transparency')
-local a_colorspace = attributes.private('colormodel')
+local a_colormodel = attributes.private('colormodel')
local register_color = colors.register
local attributes_list = attributes.list
@@ -610,74 +610,18 @@ local function mpcolor(model,ca,ta,default)
end
-- local function mpnamedcolor(name)
--- return mpcolor(texgetattribute(a_colorspace),l_color[name] or l_color.black,l_transparency[name] or false)
+-- return mpcolor(texgetattribute(a_colormodel),l_color[name] or l_color.black,l_transparency[name] or false)
-- end
local colornamespace = getnamespace("colornumber")
local paletnamespace = getnamespace("colorpalet")
--- local function mpnamedcolor(name)
--- local prefix = texgettoks("t_colo_prefix")
--- local cn
--- if prefix ~= "" then
--- local v = valid[prefix..name]
--- if not v then
--- local n = paletnamespace .. prefix .. name
--- local p = valid[n]
--- if p == true then
--- cn = colornamespace .. n
--- elseif p then
--- cn = colornamespace .. p
--- else
--- cn = colornamespace .. name
--- end
--- elseif v == true then
--- cn = colornamespace .. paletnamespace .. prefix .. name
--- else
--- cn = colornamespace .. v
--- end
--- elseif valid[name] then
--- cn = colornamespace .. name
--- else
--- return mpcolor(texgetattribute(a_colorspace),l_color.black)
--- end
--- -- return mpcolor(texgetattribute(a_colorspace),l_color[name] or l_color.black)
--- return mpcolor(texgetattribute(a_colorspace),texgetcount(cn),l_transparency[name])
--- end
-
--- local function mpnamedcolor(name)
--- local colorspace = texgetattribute(a_colorspace)
--- local prefix = texgettoks("t_colo_prefix")
--- local cn
--- if prefix ~= "" then
--- local v = valid[prefix..name]
--- if not v then
--- local n = paletnamespace .. prefix .. name
--- local p = valid[n]
--- if p == true then
--- cn = n
--- elseif p then
--- cn = p
--- else
--- cn = name
--- end
--- elseif v == true then
--- cn = paletnamespace .. prefix .. name
--- else
--- cn = v
--- end
--- elseif valid[name] then
--- cn = name
--- else
--- return mpcolor(colorspace,l_color.black)
--- end
--- cn = counts[cn]
--- cn = cn and texgetcount(cn) or l_color[name] or l_color.black -- fall back to old method
--- return mpcolor(colorspace,cn,l_transparency[name])
--- end
+function colors.currentmodel()
+ return texgetattribute(a_colormodel)
+end
-local function mpnamedcolor(name)
- local space = texgetattribute(a_colorspace)
+local function namedcolorattributes(name)
+ local space = texgetattribute(a_colormodel)
local prefix = texgettoks("t_colo_prefix")
local color
if prefix ~= "" then
@@ -696,7 +640,7 @@ local function mpnamedcolor(name)
elseif valid[name] then
color = name
else
- return mpcolor(space,l_color.black)
+ return space, l_color.black
end
color = counts[color]
if color then
@@ -705,17 +649,19 @@ local function mpnamedcolor(name)
color = l_color[name] -- fall back on old method
end
if color then
- return mpcolor(space,color,l_transparency[name])
+ return space, color, l_transparency[name]
else
- return mpcolor(space,l_color.black)
+ return space, l_color.black
end
end
--- mp.NamedColor = function(str)
--- mpprint(mpnamedcolor(str))
--- end
+colors.namedcolorattributes = namedcolorattributes -- can be used local
+
+local function mpnamedcolor(name)
+ return mpcolor(namedcolorattributes(name))
+end
-local function mpoptions(model,ca,ta,default) -- will move to mlib-col
+local function mpoptions(model,ca,ta,default) -- will move to mlib-col .. not really needed
return formatters["withcolor %s"](mpcolor(model,ca,ta,default))
end
@@ -723,6 +669,13 @@ colors.mpcolor = mpcolor
colors.mpnamedcolor = mpnamedcolor
colors.mpoptions = mpoptions
+-- elsewhere:
+--
+-- mp.NamedColor = function(str)
+-- mpprint(mpnamedcolor(str))
+-- end
+
+
-- local function formatcolor(ca,separator)
-- local cv = colorvalues[ca]
-- if cv then
@@ -1014,9 +967,9 @@ implement {
implement {
name = "setcolormodel",
- arguments = { "string", "boolean" },
+ arguments = { "string", "string" },
actions = function(model,weight)
- texsetattribute(a_colorspace,setcolormodel(model,weight))
+ texsetattribute(a_colormodel,setcolormodel(model,weight))
end
}
@@ -1144,7 +1097,7 @@ do
if model and model ~= 0 then
model = model
else
- model = forcedmodel(texgetattribute(a_colorspace))
+ model = forcedmodel(texgetattribute(a_colormodel))
if model == 1 then
model = cv[1]
end
diff --git a/tex/context/base/mkiv/colo-ini.mkiv b/tex/context/base/mkiv/colo-ini.mkiv
index f85f74c3a..e984128d9 100644
--- a/tex/context/base/mkiv/colo-ini.mkiv
+++ b/tex/context/base/mkiv/colo-ini.mkiv
@@ -59,11 +59,12 @@
\newconditional\c_colo_rgb_supported
\newconditional\c_colo_cmyk_supported
\newconditional\c_colo_spot_supported % backend driven
-\newconditional\c_colo_weight_gray \settrue\c_colo_weight_gray
\newconditional\c_colo_convert_gray \settrue\c_colo_convert_gray
\newconditional\c_colo_enabled
\newconditional\c_colo_expanded
+\let\m_colo_weight_gray\v!yes
+
\let\currentcolormodel \empty
\let\currentcolorname \empty
\let\currentcolorpalet \empty
@@ -219,7 +220,6 @@
% \newtoks\everysetupcolors
\let\v_colo_freeze_state\s!false
-\let\v_colo_weight_state\s!false
\setvalue{\??colorconversions\v!yes}%
{\settrue \c_colo_convert_gray}
@@ -233,16 +233,11 @@
%
\doifelse{\directcolorsparameter\c!spot }\v!yes \settrue \setfalse\c_colo_spot_supported
\doifelse{\directcolorsparameter\c!expansion}\v!yes \settrue \setfalse\c_colo_expanded
- \doifelse{\directcolorsparameter\c!factor }\v!no \setfalse\settrue \c_colo_weight_gray
\doifelse{\directcolorsparameter\c!rgb }\v!yes \settrue \setfalse\c_colo_rgb_supported
\doifelse{\directcolorsparameter\c!cmyk }\v!yes \settrue \setfalse\c_colo_cmyk_supported
\doifelse{\directcolorsparameter\c!state }\v!start\settrue \setfalse\c_colo_enabled
%
- \ifconditional\c_colo_weight_gray
- \let\v_colo_weight_state\s!true
- \else
- \let\v_colo_weight_state\s!false
- \fi
+ \edef\m_colo_weight_gray{\directcolorsparameter\c!factor}%
%
\ifconditional\c_colo_expanded
\let\v_colo_freeze_state\s!true
@@ -626,7 +621,7 @@
\def\colo_helpers_set_model#1% direct
{\edef\currentcolormodel{#1}%
- \clf_setcolormodel{\currentcolormodel}\v_colo_weight_state\relax} % sets attribute at lua end
+ \clf_setcolormodel{\currentcolormodel}{\m_colo_weight_gray}} % sets attribute at lua end
\colo_helpers_set_model\s!all
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index c81429b13..7d7ae8d8c 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2016.07.01 16:28}
+\newcontextversion{2016.07.05 13:02}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 9264d48ae..d19702d21 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.07.01 16:28}
+\edef\contextversion{2016.07.05 13:02}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/file-job.mkvi b/tex/context/base/mkiv/file-job.mkvi
index 0958d8433..78ec0d9a4 100644
--- a/tex/context/base/mkiv/file-job.mkvi
+++ b/tex/context/base/mkiv/file-job.mkvi
@@ -315,6 +315,9 @@
\def\documentvariable#name%
{\getvariable\s!document{#name}}
+\unexpanded\def\unexpandeddocumentvariable#name%
+ {\getvariable\s!document{#name}}
+
\unexpanded\def\setupdocument[#settings]%
{\setvariables[\s!document][#settings]%
\the\everysetupdocument\relax}
diff --git a/tex/context/base/mkiv/font-sol.lua b/tex/context/base/mkiv/font-sol.lua
index 858dc5e82..c1cac4fcf 100644
--- a/tex/context/base/mkiv/font-sol.lua
+++ b/tex/context/base/mkiv/font-sol.lua
@@ -6,6 +6,8 @@ if not modules then modules = { } end modules ['font-sol'] = { -- this was: node
license = "see context related readme files"
}
+-- We can speed this up.
+
-- This module is dedicated to the oriental tex project and for
-- the moment is too experimental to be publicly supported.
--
@@ -163,9 +165,10 @@ local dummy = {
local function checksettings(r,settings)
local s = r.settings
- local method = settings_to_hash(settings.method or "")
+ local method = settings_to_array(settings.method or "")
local optimize, preroll, splitwords
- for k, v in next, method do
+ for i=1,#method do
+ local k = method[i]
if k == v_preroll then
preroll = true
elseif k == v_split then
@@ -232,6 +235,7 @@ local function convert(featuresets,name,list)
fs = contextsetups[feature]
fn = fs and fs.number
end
+-- inspect(fs)
if fn then
nofnumbers = nofnumbers + 1
numbers[nofnumbers] = fn
@@ -619,7 +623,7 @@ first = tonut(first)
local temp, b = repack_hlist(list,width,'exactly',listdir)
if b > badness then
if trace_optimize then
- report_optimizers("line %a, badness before %a, after %a, criterium %a, verdict %a",line,badness,b,criterium,"quit")
+ report_optimizers("line %a, set %a, badness before %a, after %a, criterium %a, verdict %a",line,set or "?",badness,b,criterium,"quit")
end
-- remove last insert
setlink(prev,h)
@@ -632,11 +636,11 @@ first = tonut(first)
free_nodelist(first)
else
if trace_optimize then
- report_optimizers("line %a, badness before: %a, after %a, criterium %a, verdict %a",line,badness,b,criterium,"continue")
+ report_optimizers("line %a, set %a, badness before: %a, after %a, criterium %a, verdict %a",line,set or "?",badness,b,criterium,"continue")
end
-- free old h->t
setnext(t)
- free_nodelist(h) -- somhow fails
+ free_nodelist(h) -- somehow fails
if not encapsulate then
word[2] = first
word[3] = last
diff --git a/tex/context/base/mkiv/good-ini.lua b/tex/context/base/mkiv/good-ini.lua
index 66f0e29d0..22ca12d28 100644
--- a/tex/context/base/mkiv/good-ini.lua
+++ b/tex/context/base/mkiv/good-ini.lua
@@ -10,6 +10,7 @@ if not modules then modules = { } end modules ['good-ini'] = {
local type, next = type, next
local gmatch = string.gmatch
+local sortedhash, insert = table.sortedhash, table.insert
local fonts = fonts
@@ -42,6 +43,8 @@ fontgoodies.list = list -- no allocate as we want to see what is there
fontgoodies.suffixes = { "lfg", "lua" } -- lfg is context specific and should not be used elsewhere
+local contextsetups = fonts.specifiers.contextsetups
+
function fontgoodies.report(what,trace,goodies)
if trace_goodies or trace then
local whatever = goodies[what]
@@ -80,11 +83,12 @@ local function loadgoodies(filename) -- maybe a merge is better
report_goodies("goodie file %a is loaded",fullname)
end
goodies.name = goodies.name or "no name"
- for name, fnc in next, list do
+ for i=1,#list do
+ local g = list[i]
if trace_goodies then
- report_goodies("handling goodie %a",name)
+ report_goodies("handling goodie %a",g[1])
end
- fnc(goodies)
+ g[2](goodies)
end
goodies.initialized = true
data[filename] = goodies
@@ -93,8 +97,20 @@ local function loadgoodies(filename) -- maybe a merge is better
return goodies
end
-function fontgoodies.register(name,fnc) -- will be a proper sequencer
- list[name] = fnc
+function fontgoodies.register(name,fnc,prepend) -- will be a proper sequencer
+ for i=1,#list do
+ local g = list[i]
+ if g[1] == name then
+ g[2] = fnc --overload
+ return
+ end
+ end
+ local g = { name, fnc }
+ if prepend then
+ insert(list,g,prepend == true and 1 or prepend)
+ else
+ insert(list,g)
+ end
end
fontgoodies.load = loadgoodies
@@ -137,8 +153,20 @@ local function flattenedfeatures(t,tt)
local tt = tt or { }
for i=1,#t do
local ti = t[i]
- if type(ti) == "table" then
+ local ty = type(ti)
+ if ty == "table" then
flattenedfeatures(ti,tt)
+ elseif ty == "string" then
+ local set = contextsetups[ti]
+ if set then
+ for k, v in next, set do
+ if k ~= "number" then
+ tt[k] = v or nil
+ end
+ end
+ else
+ -- bad
+ end
elseif tt[ti] == nil then
tt[ti] = true
end
@@ -214,9 +242,9 @@ function fontgoodies.registerpostprocessor(tfmdata,f,prepend)
if not postprocessors then
tfmdata.postprocessors = { f }
elseif prepend then
- table.insert(postprocessors,f,1)
+ insert(postprocessors,f,prepend == true and 1 or prepend)
else
- table.insert(postprocessors,f)
+ insert(postprocessors,f)
end
end
@@ -259,15 +287,32 @@ local function setextrafeatures(tfmdata)
local g = goodies[i]
local f = g.features
if f then
- for feature, specification in next, f do
- -- not needed but nicer:
- specification.name = specification.name or feature
- --
- addotffeature(tfmdata.shared.rawdata,feature,specification)
- registerotffeature {
- name = feature,
- description = formatters["extra: %s"](feature)
- }
+ local rawdata = tfmdata.shared.rawdata
+ local done = { }
+ -- indexed
+ for i=1,#f do
+ local specification = f[i]
+ local feature = specification.name
+ if feature then
+ addotffeature(rawdata,feature,specification)
+ registerotffeature {
+ name = feature,
+ description = formatters["extra: %s"](feature)
+ }
+ end
+ done[i] = true
+ end
+ -- hashed
+ for feature, specification in sortedhash(f) do
+ if not done[feature] then
+ feature = specification.name or feature
+ specification.name = feature
+ addotffeature(rawdata,feature,specification)
+ registerotffeature {
+ name = feature,
+ description = formatters["extra: %s"](feature)
+ }
+ end
end
end
end
diff --git a/tex/context/base/mkiv/grph-rul.lua b/tex/context/base/mkiv/grph-rul.lua
index 556763812..f3d0bb95c 100644
--- a/tex/context/base/mkiv/grph-rul.lua
+++ b/tex/context/base/mkiv/grph-rul.lua
@@ -19,7 +19,7 @@ local getattribute = tex.getattribute
local a_color = attributes.private('color')
local a_transparency = attributes.private('transparency')
-local a_colorspace = attributes.private('colormodel')
+local a_colormodel = attributes.private('colormodel')
local mpcolor = attributes.colors.mpcolor
@@ -77,6 +77,8 @@ RuleOption := "%option%" ;
RuleWidth := %width% ;
RuleHeight := %height% ;
RuleDepth := %depth% ;
+RuleH := %h% ;
+RuleV := %v% ;
RuleThickness := %line% ;
RuleFactor := %factor% ;
RuleOffset := %offset% ;
@@ -100,6 +102,8 @@ def RuleColor = %color% enddef ;
color = mpcolor(p.ma,p.ca,p.ta),
option = p.option or "",
direction = p.direction or "TLT",
+ h = h * bpfactor,
+ v = v * bpfactor,
}
if not initialized then
@@ -169,7 +173,7 @@ interfaces.implement {
} } ,
actions = function(t)
local r = userrule(t)
- local ma = getattribute(a_colorspace) or 1
+ local ma = getattribute(a_colormodel) or 1
local ca = getattribute(a_color)
local ta = getattribute(a_transparency)
if t.type == "mp" then
@@ -177,7 +181,7 @@ interfaces.implement {
t.ca = ca
t.ta = ta
else
- r[a_colorspace] = ma
+ r[a_colormodel] = ma
r[a_color] = ca
r[a_transparency] = ta
end
@@ -201,7 +205,7 @@ interfaces.implement {
depth = 0.25*factor,
width = floor(random(t.min,t.max)/10000) * 10000,
line = 0.10*factor,
- ma = getattribute(a_colorspace) or 1,
+ ma = getattribute(a_colormodel) or 1,
ca = getattribute(a_color),
ta = getattribute(a_transparency),
type = "mp",
diff --git a/tex/context/base/mkiv/math-ali.mkiv b/tex/context/base/mkiv/math-ali.mkiv
index 209d7a0fd..cd47b95c0 100644
--- a/tex/context/base/mkiv/math-ali.mkiv
+++ b/tex/context/base/mkiv/math-ali.mkiv
@@ -316,17 +316,21 @@
\dostarttagged\t!mathtablecell\empty}
\def\math_left_of_equalign
- {\ifcsname\??mathalignmentvariant\number\c_math_eqalign_column\endcsname
- \ifcase\csname\??mathalignmentvariant\number\c_math_eqalign_column\endcsname\or
- \relax \or \hfill \or \hfill
- \fi
+ {\edef\p_location{\formulaparameter\c!location}%
+ \ifx\p_location\v!left
+ \box\b_strc_formulas_number
+ \fi
+ \ifcsname\??mathalignmentvariant\number\c_math_eqalign_column\endcsname
+ \ifcase\lastnamedcs \or \relax \or \hfill \or \hfill \fi
\fi}
\def\math_right_of_eqalign
{\ifcsname\??mathalignmentvariant\number\c_math_eqalign_column\endcsname
- \ifcase\csname\??mathalignmentvariant\number\c_math_eqalign_column\endcsname\or
- \hfill \or \relax \or \hfill
- \fi
+ \ifcase\lastnamedcs \or \hfill \or \relax \or \hfill \fi
+ \fi
+ \edef\p_location{\formulaparameter\c!location}%
+ \ifx\p_location\v!left\else
+ \box\b_strc_formulas_number
\fi}
\def\math_eqalign_set_column#1% we could just add to the preamble (as with other alignments)
diff --git a/tex/context/base/mkiv/meta-pdf.lua b/tex/context/base/mkiv/meta-pdf.lua
index 3cbff63b1..c17a2a4c7 100644
--- a/tex/context/base/mkiv/meta-pdf.lua
+++ b/tex/context/base/mkiv/meta-pdf.lua
@@ -541,13 +541,13 @@ end
-- main converter
-local a_colorspace = attributes.private('colormodel')
+local a_colormodel = attributes.private('colormodel')
function mptopdf.convertmpstopdf(name)
resetall()
local ok, m_data, n = resolvers.loadbinfile(name, 'tex') -- we need a binary load !
if ok then
- mps.colormodel = texgetattribute(a_colorspace)
+ mps.colormodel = texgetattribute(a_colormodel)
statistics.starttiming(mptopdf)
mptopdf.nofconverted = mptopdf.nofconverted + 1
pdfcode(formatters["\\letterpercent\\space mptopdf begin: n=%s, file=%s"](mptopdf.nofconverted,file.basename(name)))
diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua
index 42a2cf12a..74df758d1 100644
--- a/tex/context/base/mkiv/mlib-pps.lua
+++ b/tex/context/base/mkiv/mlib-pps.lua
@@ -61,6 +61,7 @@ local makempy = metapost.makempy
local nooutercolor = "0 g 0 G"
local nooutertransparency = "/Tr0 gs" -- only when set
local outercolormode = 0
+local outercolormodel = 1
local outercolor = nooutercolor
local outertransparency = nooutertransparency
local innercolor = nooutercolor
@@ -72,7 +73,8 @@ local pdftransparency = lpdf.transparency
function metapost.setoutercolor(mode,colormodel,colorattribute,transparencyattribute)
-- has always to be called before conversion
-- todo: transparency (not in the mood now)
- outercolormode = mode
+ outercolormode = mode
+ outercolormodel = colormodel
if mode == 1 or mode == 3 then
-- inherit from outer (registered color)
outercolor = pdfcolor(colormodel,colorattribute) or nooutercolor
@@ -446,6 +448,11 @@ function models.gray(cr)
return checked_color_pair(f_gray,s,s)
end
+models[1] = models.all
+models[2] = models.gray
+models[3] = models.rgb
+models[4] = models.cmyk
+
setmetatableindex(models, function(t,k)
local v = models.gray
t[k] = v
@@ -453,7 +460,8 @@ setmetatableindex(models, function(t,k)
end)
local function colorconverter(cs)
- return models[colors.model](cs)
+ -- return models[colors.model](cs)
+ return models[outercolormodel](cs)
end
local btex = P("btex")
@@ -868,6 +876,9 @@ end
function metapost.resetplugins(t) -- intialize plugins, before figure
if top.plugmode then
+
+ outercolormodel = colors.currentmodel() -- currently overloads the one set at the tex end
+
-- plugins can have been added
resetter = resetteractions.runner
analyzer = analyzeractions.runner
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index 07d6ce70b..ed0e672d4 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -100,7 +100,7 @@ return {
"startcomponent", "stopcomponent", "component",
"startproduct", "stopproduct", "product",
"startproject", "stopproject", "project",
- "starttext", "stoptext", "startnotext", "stopnotext","startdocument", "stopdocument", "documentvariable", "setupdocument", "presetdocument",
+ "starttext", "stoptext", "startnotext", "stopnotext","startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument",
"startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule","setupmodule","currentmoduleparameter","moduleparameter",
"everystarttext", "everystoptext",
--
diff --git a/tex/context/base/mkiv/node-bck.lua b/tex/context/base/mkiv/node-bck.lua
index 326987586..2ee08a80e 100644
--- a/tex/context/base/mkiv/node-bck.lua
+++ b/tex/context/base/mkiv/node-bck.lua
@@ -47,7 +47,7 @@ local new_glue = nodepool.glue
local a_color = attributes.private('color')
local a_transparency = attributes.private('transparency')
-local a_colorspace = attributes.private('colormodel')
+local a_colormodel = attributes.private('colormodel')
local a_background = attributes.private('background')
local a_alignbackground = attributes.private('alignbackground')
@@ -70,7 +70,7 @@ local function add_backgrounds(head) -- rather old code .. to be redone
if background then
-- direct to hbox
-- colorspace is already set so we can omit that and stick to color
- local mode = getattr(current,a_colorspace)
+ local mode = getattr(current,a_colormodel)
if mode then
local height = getfield(current,"height")
local depth = getfield(current,"depth")
@@ -79,7 +79,7 @@ local function add_backgrounds(head) -- rather old code .. to be redone
local rule = new_rule(width,height,depth)
local color = getattr(current,a_color)
local transparency = getattr(current,a_transparency)
- setattr(rule,a_colorspace,mode)
+ setattr(rule,a_colormodel,mode)
if color then
setattr(rule,a_color,color)
end
@@ -132,13 +132,13 @@ local function add_alignbackgrounds(head)
-- current has subtype 5 (cell)
local width = getfield(current,"width")
if width > 0 then
- local mode = getattr(found,a_colorspace)
+ local mode = getattr(found,a_colormodel)
if mode then
local glue = new_glue(-width)
local rule = new_rule(width,getfield(current,"height"),getfield(current,"depth"))
local color = getattr(found,a_color)
local transparency = getattr(found,a_transparency)
- setattr(rule,a_colorspace,mode)
+ setattr(rule,a_colormodel,mode)
if color then
setattr(rule,a_color,color)
end
diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua
index 63d5da853..216dc0967 100644
--- a/tex/context/base/mkiv/node-rul.lua
+++ b/tex/context/base/mkiv/node-rul.lua
@@ -102,7 +102,7 @@ local a_ruled = attributes.private('ruled')
local a_runningtext = attributes.private('runningtext')
local a_color = attributes.private('color')
local a_transparency = attributes.private('transparency')
-local a_colorspace = attributes.private('colormodel')
+local a_colormodel = attributes.private('colormodel')
local insert_node_before = nuts.insert_before
local insert_node_after = nuts.insert_after
@@ -368,7 +368,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
local ma = d.ma
local ca = d.ca
local ta = d.ta
- local colorspace = ma > 0 and ma or getattr(f,a_colorspace) or 1
+ local colorspace = ma > 0 and ma or getattr(f,a_colormodel) or 1
local color = ca > 0 and ca or getattr(f,a_color)
local transparency = ta > 0 and ta or getattr(f,a_transparency)
local foreground = order == v_foreground
@@ -436,7 +436,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
local dp = -(offset+(i-1)*dy)*e + rulethickness + m
local r = new_rule(w,ht,dp)
if color then
- setattr(r,a_colorspace,colorspace)
+ setattr(r,a_colormodel,colorspace)
setattr(r,a_color,color)
end
if transparency then
diff --git a/tex/context/base/mkiv/spac-ali.mkiv b/tex/context/base/mkiv/spac-ali.mkiv
index fef4c0f19..bfd4d5426 100644
--- a/tex/context/base/mkiv/spac-ali.mkiv
+++ b/tex/context/base/mkiv/spac-ali.mkiv
@@ -130,11 +130,11 @@
\unexpanded\def\spac_directions_lefttoright_hmode
{\ifconditional\c_spac_auto_line_dir
\ifzeropt\lastskip
- \linedir TLT\relax
+ \textdir TLT\relax
\else
\scratchskip\lastskip
\unskip
- \linedir TLT\relax
+ \textdir TLT\relax
\hskip\scratchskip
\fi
\else
@@ -145,11 +145,11 @@
\unexpanded\def\spac_directions_righttoleft_hmode
{\ifconditional\c_spac_auto_line_dir
\ifzeropt\lastskip
- \linedir TRT\relax
+ \textdir TRT\relax
\else
\scratchskip\lastskip
\unskip
- \linedir TRT\relax
+ \textdir TRT\relax
\hskip\scratchskip
\fi
\else
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 75e1b5aff..c0cf6d6ee 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 0526d8fe5..9e254b013 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-mat.mkiv b/tex/context/base/mkiv/strc-mat.mkiv
index 272b5d9b5..8bf04e511 100644
--- a/tex/context/base/mkiv/strc-mat.mkiv
+++ b/tex/context/base/mkiv/strc-mat.mkiv
@@ -462,7 +462,7 @@
\strc_formulas_handle_sub_numbering
\fi
\fi
- \strc_formulas_reference_trace
+ \strc_formulas_reference_trace
\egroup
\fi}
@@ -1035,7 +1035,8 @@
\unexpanded\def\strc_formulas_number_again[#1]%
{\def\currentformulareference{#1}%
- \strc_formulas_number_indeed}
+ %\glet\strc_formulas_place_number\relax
+ \strc_formulas_place_number_in_box}
\unexpanded\def\placeformula
{\global\settrue\c_strc_formulas_inside_place
@@ -1135,16 +1136,19 @@
\ifcase\c_strc_formulas_nested_number_mode
% nothing
\or
- \strc_formulas_number % hm, looks ahead for []
+ \expandafter\strc_formulas_number % hm, looks ahead for []
\or
% nothing
\or
- \strc_formulas_number % hm, looks ahead for []
+ \expandafter\strc_formulas_number % hm, looks ahead for []
\fi}
\def\strc_formulas_place_number_indeed
+ {\glet\strc_formulas_place_number\relax
+ \strc_formulas_place_number_in_box}
+
+\def\strc_formulas_place_number_in_box
{\dostarttagged\t!formulacaption\empty
- \glet\strc_formulas_place_number\relax
\global\setbox\b_strc_formulas_number\hbox{\strc_formulas_number_indeed}%
\dostoptagged}
diff --git a/tex/context/base/mkiv/typo-drp.lua b/tex/context/base/mkiv/typo-drp.lua
index fa3081485..f31bb6a4e 100644
--- a/tex/context/base/mkiv/typo-drp.lua
+++ b/tex/context/base/mkiv/typo-drp.lua
@@ -79,7 +79,7 @@ initials.actions = actions
local a_initial = attributes.private("initial")
local a_color = attributes.private('color')
local a_transparency = attributes.private('transparency')
-local a_colorspace = attributes.private('colormodel')
+local a_colormodel = attributes.private('colormodel')
local category = characters.category
@@ -267,7 +267,7 @@ actions[v_default] = function(head,setting)
-- can be a helper
if ca and ca > 0 then
- setattr(current,a_colorspace,ma == 0 and 1 or ma)
+ setattr(current,a_colormodel,ma == 0 and 1 or ma)
setattr(current,a_color,ca)
end
if ta and ta > 0 then
diff --git a/tex/context/base/mkiv/typo-fln.lua b/tex/context/base/mkiv/typo-fln.lua
index c45836437..711d095bb 100644
--- a/tex/context/base/mkiv/typo-fln.lua
+++ b/tex/context/base/mkiv/typo-fln.lua
@@ -70,7 +70,7 @@ firstlines.actions = actions
local a_firstline = attributes.private('firstline')
local a_color = attributes.private('color')
local a_transparency = attributes.private('transparency')
-local a_colorspace = attributes.private('colormodel')
+local a_colormodel = attributes.private('colormodel')
local texsetattribute = tex.setattribute
local unsetvalue = attributes.unsetvalue
@@ -209,7 +209,7 @@ actions[v_line] = function(head,setting)
end
setfield(start,"font",font)
if ca and ca > 0 then
- setattr(start,a_colorspace,ma == 0 and 1 or ma)
+ setattr(start,a_colormodel,ma == 0 and 1 or ma)
setattr(start,a_color,ca)
end
if ta and ta > 0 then
@@ -302,7 +302,7 @@ actions[v_word] = function(head,setting)
ok = true
end
if ca and ca > 0 then
- setattr(start,a_colorspace,ma == 0 and 1 or ma)
+ setattr(start,a_colormodel,ma == 0 and 1 or ma)
setattr(start,a_color,ca)
end
if ta and ta > 0 then
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index f6fe251b0..43e672cda 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 437fc541c..754c377b4 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 59e985d64..48b828e01 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 07/01/16 16:28:20
+-- merge date : 07/05/16 13:02:59
do -- begin closure to overcome local limits and interference