summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv')
-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/font-hsh.lua22
-rw-r--r--tex/context/base/mkiv/font-syn.lua21
-rw-r--r--tex/context/base/mkiv/grph-fil.lua5
-rw-r--r--tex/context/base/mkiv/l-file.lua2
-rw-r--r--tex/context/base/mkiv/math-fbk.lua20
-rw-r--r--tex/context/base/mkiv/mult-low.lua2
-rw-r--r--tex/context/base/mkiv/mult-prm.lua4
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24877 -> 24895 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin250465 -> 250909 bytes
-rw-r--r--tex/context/base/mkiv/strc-mar.lua2
12 files changed, 62 insertions, 20 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 07e1b0334..6f5333832 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{2021.08.24 22:14}
+\newcontextversion{2021.08.30 16:21}
%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 cb4cae649..7226ee7b2 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.08.24 22:14}
+\edef\contextversion{2021.08.30 16:21}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-hsh.lua b/tex/context/base/mkiv/font-hsh.lua
index 7e90e1502..89b0dc823 100644
--- a/tex/context/base/mkiv/font-hsh.lua
+++ b/tex/context/base/mkiv/font-hsh.lua
@@ -37,6 +37,7 @@ local italics = hashes.italics or allocate()
local lastmathids = hashes.lastmathids or allocate()
local dynamics = hashes.dynamics or allocate()
local unicodes = hashes.unicodes or allocate()
+local unislots = hashes.unislots or allocate()
local originals = hashes.originals or allocate()
local modes = hashes.modes or allocate()
local variants = hashes.variants or allocate()
@@ -59,12 +60,13 @@ hashes.italics = italics
hashes.lastmathids = lastmathids
hashes.dynamics = dynamics
hashes.unicodes = unicodes
+hashes.unislots = unislots
hashes.originals = originals
hashes.modes = modes
hashes.variants = variants
-local nodepool = nodes and nodes.pool
-local dummyglyph = nodepool and nodepool.register(nodepool.glyph())
+local nodepool = nodes and nodes.pool
+local dummyglyph = nodepool and nodepool.register(nodepool.glyph())
local nulldata = allocate {
name = "nullfont",
@@ -343,6 +345,22 @@ setmetatableindex(originals, function(t,k) -- always a unicode
end
end)
+setmetatableindex(unislots, function(t,k)
+ if k == true then
+ return unislots[currentfont()]
+ else
+ local characters = identifiers[k].characters
+ local resolved = setmetatableindex(function(t,k)
+ local c = characters[k]
+ local v = c and c.unicode or 0xFFFD
+ t[k] = v
+ return v -- can be a table !
+ end)
+ t[k] = resolved
+ return resolved
+ end
+end)
+
setmetatableindex(modes, function(t,k)
if k == true then
return modes[currentfont()]
diff --git a/tex/context/base/mkiv/font-syn.lua b/tex/context/base/mkiv/font-syn.lua
index 1d5e18032..e80d57f41 100644
--- a/tex/context/base/mkiv/font-syn.lua
+++ b/tex/context/base/mkiv/font-syn.lua
@@ -1408,13 +1408,30 @@ here is for testing purposes only (it deals with names prefixed by an
encoding name).</p>
--ldx]]--
-local function fuzzy(mapping,sorted,name,sub)
+local function fuzzy(mapping,sorted,name,sub) -- no need for reverse sorted here
local condensed = gsub(name,"[^%a%d]","")
+ local pattern = condensed .. "$"
+ local matches = false
for k=1,#sorted do
local v = sorted[k]
- if find(v,condensed) then
+ if v == condensed then
return mapping[v], v
+ elseif find(v,pattern) then
+ return mapping[v], v
+ elseif find(v,condensed) then
+ if matches then
+ matches[#matches+1] = v
+ else
+ matches = { v }
+ end
+ end
+ end
+ if matches then
+ if #matches > 1 then
+ sort(matches,function(a,b) return #a < #b end)
end
+ matches = matches[1]
+ return mapping[matches], matches
end
end
diff --git a/tex/context/base/mkiv/grph-fil.lua b/tex/context/base/mkiv/grph-fil.lua
index aad110e1c..4de30cd30 100644
--- a/tex/context/base/mkiv/grph-fil.lua
+++ b/tex/context/base/mkiv/grph-fil.lua
@@ -141,14 +141,13 @@ end
local done = { }
local function analyzed(name,options)
- local actiontype = type(action)
local usedname = addsuffix(name,inputsuffix) -- we assume tex if not set
local resultname = replacesuffix(name,resultsuffix) -- we assume tex if not set
local pathname = file.pathpart(usedname)
local runpath = environment.arguments.path -- sic, no runpath
if pathname ~= "" then
if runpath then
- runpath = file.join(action.path,pathname)
+ runpath = file.join(runpath,pathname)
else
runpath = pathname
end
@@ -156,7 +155,7 @@ local function analyzed(name,options)
end
return {
options = options,
- path = runpath,
+ path = runpath, -- or nil
filename = usedname,
result = resultname,
}
diff --git a/tex/context/base/mkiv/l-file.lua b/tex/context/base/mkiv/l-file.lua
index d0af94f09..9f8fd6548 100644
--- a/tex/context/base/mkiv/l-file.lua
+++ b/tex/context/base/mkiv/l-file.lua
@@ -456,7 +456,7 @@ function file.join(one, two, three, ...)
if not two then
return one == "" and one or lpegmatch(reslasher,one)
end
- if one == "" then
+ if not one or one == "" then
return lpegmatch(stripper,three and concat({ two, three, ... },"/") or two)
end
if lpegmatch(isnetwork,one) then
diff --git a/tex/context/base/mkiv/math-fbk.lua b/tex/context/base/mkiv/math-fbk.lua
index 6b43a901b..f1efadc45 100644
--- a/tex/context/base/mkiv/math-fbk.lua
+++ b/tex/context/base/mkiv/math-fbk.lua
@@ -601,9 +601,11 @@ local function actuarian(data)
return {
-- todo: add alttext
-- compromise: lm has large hooks e.g. \actuarial{a}
- width = basewidth + 4 * linewidth,
- unicode = 0x20E7,
- commands = {
+ width = basewidth + 4 * linewidth,
+ height = basechar.height,
+ depth = basechar.depth,
+ unicode = 0x20E7,
+ commands = {
rightcommand[2 * linewidth],
downcommand[- baseheight - 3 * linewidth],
{ "rule", linewidth, basewidth + 4 * linewidth },
@@ -623,13 +625,15 @@ local function equals(data,unicode,snippet,advance,n) -- mathpair needs them
local basechar = characters[snippet]
local advance = advance * parameters.quad
return {
- unicode = unicode,
- width = n*basechar.width + (n-1)*advance,
- commands = {
+ unicode = unicode,
+ width = n*basechar.width - (n-1)*advance,
+ height = basechar.height,
+ depth = basechar.depth,
+ commands = {
charcommand[snippet],
- rightcommand[advance],
+ leftcommand[advance],
charcommand[snippet],
- n > 2 and rightcommand[advance] or nil,
+ n > 2 and leftcommand[advance] or nil,
n > 2 and charcommand[snippet] or nil,
},
}
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index 5075ec579..4842a3571 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -450,6 +450,8 @@ return {
"strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight",
"leftboundary", "rightboundary", "signalcharacter",
--
+ "aligncontentleft", "aligncontentmiddle", "aligncontentright",
+ --
"shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox",
--
"ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing",
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 6b88ba3b2..81afd645b 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -371,6 +371,7 @@ return {
"ifdimval",
"ifempty",
"ifflags",
+ "ifhaschar",
"ifhastok",
"ifhastoks",
"ifhasxtoks",
@@ -497,6 +498,7 @@ return {
"snapshotpar",
"supmarkmode",
"swapcsvalues",
+ "tabsize",
"textdirection",
"thewithoutunit",
"tokenized",
@@ -651,6 +653,7 @@ return {
"advance",
"afterassignment",
"aftergroup",
+ "aligncontent",
"atop",
"atopwithdelims",
"badness",
@@ -837,7 +840,6 @@ return {
"nolimits",
"nonscript",
"nonstopmode",
- "nonzerowidthkern",
"nulldelimiterspace",
"nullfont",
"number",
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 20bdd73ba..833f69b1d 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 2a6018336..ded84acc1 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-mar.lua b/tex/context/base/mkiv/strc-mar.lua
index f7953c416..dd6c0a93d 100644
--- a/tex/context/base/mkiv/strc-mar.lua
+++ b/tex/context/base/mkiv/strc-mar.lua
@@ -43,7 +43,7 @@ local lateluawhatsit_code = whatsitcodes.latelua
local texsetattribute = tex.setattribute
-local a_marks = attributes.private("structure","marks")
+local a_marks = attributes.private("marks")
local trace_set = false trackers.register("marks.set", function(v) trace_set = v end)
local trace_get = false trackers.register("marks.get", function(v) trace_get = v end)