diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-07-24 12:35:49 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-07-24 12:35:49 +0200 |
commit | 352517495e32813d30d0080f2a0c8dd1afea794a (patch) | |
tree | 346f33901602d6bd6db1c5913ff092fcf821fa10 /tex/context/base/mkiv | |
parent | 82c674fdcf5bcff4ad0dc0936d638fc729145616 (diff) | |
download | context-352517495e32813d30d0080f2a0c8dd1afea794a.tar.gz |
2022-07-24 12:18:00
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r-- | tex/context/base/mkiv/char-def.lua | 4 | ||||
-rw-r--r-- | tex/context/base/mkiv/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/mlib-pps.lua | 1 | ||||
-rw-r--r-- | tex/context/base/mkiv/mult-fun.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/mult-low.lua | 11 | ||||
-rw-r--r-- | tex/context/base/mkiv/mult-prm.lua | 8 | ||||
-rw-r--r-- | tex/context/base/mkiv/status-files.pdf | bin | 24614 -> 24590 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/status-lua.pdf | bin | 258249 -> 258691 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/util-prs.lua | 27 | ||||
-rw-r--r-- | tex/context/base/mkiv/util-tab.lua | 18 |
11 files changed, 54 insertions, 21 deletions
diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua index 3b057b674..967a11d07 100644 --- a/tex/context/base/mkiv/char-def.lua +++ b/tex/context/base/mkiv/char-def.lua @@ -27,8 +27,8 @@ Todo: get rid of specials = { "font", ... } in math ... we have already vectors. ]]-- local variants_emoji={ - [0xFE0E]="text style", - [0xFE0F]="emoji style", + [0xFE0E]="text style", + [0xFE0F]="emoji style", } local variants_forms={ diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 34002f06d..70c83cf67 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2022.07.06 21:34} +\newcontextversion{2022.07.24 12:17} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 40b49d386..6a1e2c95e 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -49,7 +49,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2022.07.06 21:34} +\edef\contextversion{2022.07.24 12:17} %D Kind of special: diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua index 303c02fe6..c3635d517 100644 --- a/tex/context/base/mkiv/mlib-pps.lua +++ b/tex/context/base/mkiv/mlib-pps.lua @@ -13,7 +13,6 @@ local insert, remove, concat = table.insert, table.remove, table.concat local Cs, Cf, C, Cg, Ct, P, S, V, Carg = lpeg.Cs, lpeg.Cf, lpeg.C, lpeg.Cg, lpeg.Ct, lpeg.P, lpeg.S, lpeg.V, lpeg.Carg local lpegmatch, tsplitat, tsplitter = lpeg.match, lpeg.tsplitat, lpeg.tsplitter local formatters = string.formatters -local exists, savedata = io.exists, io.savedata local mplib = mplib local metapost = metapost diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua index 5a3725b32..0926b5d12 100644 --- a/tex/context/base/mkiv/mult-fun.lua +++ b/tex/context/base/mkiv/mult-fun.lua @@ -34,6 +34,7 @@ return { "getparametertext", -- "getparameteroption", "applyparameters", + "mergeparameters", "pushparameters", "popparameters", "setluaparameter", @@ -60,6 +61,7 @@ return { "zmod", "paired", "tripled", "unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle", + "unitoctagon", "fulloctagon", "unithexagon", "fullhexagon", -- "halfcircle", "quartercircle", "llcircle", "lrcircle", "urcircle", "ulcircle", "tcircle", "bcircle", "lcircle", "rcircle", diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index ae31c547e..ace2b0e9b 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -105,11 +105,11 @@ return { "mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode", "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", -- - "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode", - "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "checkligatureandkernmathcontrolcode", + "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode", + "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "applyordinarykernpairmathcontrolcode", "applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode", "reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode", - "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "italicshapekernmathcontrolcode", + "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", -- "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", @@ -171,7 +171,7 @@ return { "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode", -- "mathtopaccentcode", "mathbottomaccentcode", "mathdelimitercode", "mathrootcode", "mathprintcode", -- "mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode", - "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", + "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", "mathunarycode", -- "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", -- @@ -211,7 +211,8 @@ return { "lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode", "lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions", -- "openfenceclassoptioncode", "closefenceclassoptioncode", "middlefenceclassoptioncode", - "checkligatureclassoptioncode", "flattenclassoptioncode", "omitpenaltyclassoptioncode", + "checkligatureclassoptioncode", "checkitaliccorrectionclassoptioncode", "checkkernpairclassoptioncode", + "flattenclassoptioncode", "omitpenaltyclassoptioncode", "unpackclassoptioncode", "raiseprimeclassoptioncode", -- "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode", "noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode", diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua index 43e9515db..ac7f7511e 100644 --- a/tex/context/base/mkiv/mult-prm.lua +++ b/tex/context/base/mkiv/mult-prm.lua @@ -276,6 +276,7 @@ return { "boxfreeze", "boxgeometry", "boxorientation", + "boxrepack", "boxshift", "boxsource", "boxtarget", @@ -298,6 +299,7 @@ return { "currentloopnesting", "currentmarks", "defcsname", + "detokenized", "dimensiondef", "dimexpression", "directlua", @@ -402,6 +404,8 @@ return { "ignorepars", "immediate", "immutable", + "indexofcharacter", + "indexofregister", "inherited", "initcatcodetable", "insertbox", @@ -473,7 +477,7 @@ return { "mathatomskip", "mathbackwardpenalties", "mathbeginclass", - "mathdelimitersmode", + "mathcheckfencesmode", "mathdirection", "mathdisplaymode", "mathdisplayskipmode", @@ -481,7 +485,6 @@ return { "mathendclass", "matheqnogapstep", "mathfenced", - "mathfencesmode", "mathfontcontrol", "mathforwardpenalties", "mathfrac", @@ -566,6 +569,7 @@ return { "scaledinterwordstretch", "scaledslantperpoint", "scantextokens", + "semiexpand", "semiexpanded", "semiprotected", "setdefaultmathcodes", diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 42bb6d94a..543b25c19 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 983543d0f..78fefb060 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/util-prs.lua b/tex/context/base/mkiv/util-prs.lua index 6c2a15adf..635b610e0 100644 --- a/tex/context/base/mkiv/util-prs.lua +++ b/tex/context/base/mkiv/util-prs.lua @@ -622,12 +622,6 @@ end -- local list, names = mycsvsplitter(crap,true) inspect(list) inspect(names) -- local list, names = mycsvsplitter(crap) inspect(list) inspect(names) --- parsers.stepper("1,7-",9,function(i) print(">>>",i) end) --- parsers.stepper("1-3,7,8,9") --- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end) --- parsers.stepper(" 1 : 3, ,7 ") --- parsers.stepper("1:4,9:13,24:*",30) - local function ranger(first,last,n,action) if not first then -- forget about it @@ -655,14 +649,29 @@ local stepper = spacers * ( cardinal * ( spacers * S(":-") * spacers * ( cardin * Carg(1) * Carg(2) / ranger * S(", ")^0 )^1 * endofstring -- we're sort of strict (could do without endofstring) function parsers.stepper(str,n,action) + local ts = type(str) if type(n) == "function" then - lpegmatch(stepper,str,1,false,n or print) - else + if ts == "number" then + n(str) + elseif ts == "table" then + for i=1,#str do + n(str[i]) + end + else + lpegmatch(stepper,str,1,false,n or print) + end + elseif ts == "string" then lpegmatch(stepper,str,1,n,action or print) end end --- +-- parsers.stepper("1,7-",9,function(i) print(">>>",i) end) +-- parsers.stepper("1-3,7,8,9") +-- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end) +-- parsers.stepper(" 1 : 3, ,7 ") +-- parsers.stepper("1:4,9:13,24:*",30) +-- parsers.stepper(1,print) +-- parsers.stepper({1,3,4},print) local pattern_math = Cs((P("%")/"\\percent " + P("^") * Cc("{") * lpegpatterns.integer * Cc("}") + anything)^0) local pattern_text = Cs((P("%")/"\\percent " + (P("^")/"\\high") * Cc("{") * lpegpatterns.integer * Cc("}") + anything)^0) diff --git a/tex/context/base/mkiv/util-tab.lua b/tex/context/base/mkiv/util-tab.lua index a92b47b3f..7f372b6b5 100644 --- a/tex/context/base/mkiv/util-tab.lua +++ b/tex/context/base/mkiv/util-tab.lua @@ -978,3 +978,21 @@ end -- return remove(t,random(1,n)) -- end -- end + +function combine(target,source) + -- no copy so if that is needed one needs to deepcopy source first + if target then + for k, v in next, source do + if type(v) == "table" then + target[k] = combine(target[k],source[k]) + else + target[k] = v + end + end + return target + else + return source + end +end + +table.combine = combine |