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/char-def.lua6
-rw-r--r--tex/context/base/mkiv/cldf-ini.lua2
-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/data-ini.lua53
-rw-r--r--tex/context/base/mkiv/grph-con.lua12
-rw-r--r--tex/context/base/mkiv/l-dir.lua21
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24647 -> 24650 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin266011 -> 266630 bytes
-rw-r--r--tex/context/base/mkiv/toks-scn.lua5
-rw-r--r--tex/context/base/mkiv/typo-prc.lua2
11 files changed, 59 insertions, 46 deletions
diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua
index 1aea51318..5e9d7d05a 100644
--- a/tex/context/base/mkiv/char-def.lua
+++ b/tex/context/base/mkiv/char-def.lua
@@ -64034,6 +64034,8 @@ characters.data={
combining=0xE6,
description="COMBINING LEFT ARROW ABOVE",
direction="nsm",
+ mathclass="topaccent",
+ mathstretch="h",
linebreak="cm",
unicodeslot=0x20D6,
},
@@ -64248,6 +64250,8 @@ characters.data={
description="COMBINING LEFT ARROW BELOW",
direction="nsm",
linebreak="cm",
+ mathclass="bottomaccent",
+ mathstretch="h",
unicodeslot=0x20EE,
},
[0x20EF]={
@@ -64256,6 +64260,8 @@ characters.data={
description="COMBINING RIGHT ARROW BELOW",
direction="nsm",
linebreak="cm",
+ mathclass="bottomaccent",
+ mathstretch="h",
unicodeslot=0x20EF,
},
[0x20F0]={
diff --git a/tex/context/base/mkiv/cldf-ini.lua b/tex/context/base/mkiv/cldf-ini.lua
index 0bdc60379..9b5e705ca 100644
--- a/tex/context/base/mkiv/cldf-ini.lua
+++ b/tex/context/base/mkiv/cldf-ini.lua
@@ -99,7 +99,7 @@ local tonut = node.direct.todirect
local tonode = node.direct.tonode
local newtoken = token.new
-local createtoken = token.create
+----- createtoken = token.create
local istoken = token.istoken or token.is_token
local setluatoken = token.setlua or token.set_lua
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index b62b775ad..22e4d4bae 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{2023.03.06 23:15}
+\newcontextversion{2023.03.10 12:15}
%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 860d411a5..1c9effa6a 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{2023.03.06 23:15}
+\edef\contextversion{2023.03.10 12:15}
%D Kind of special:
diff --git a/tex/context/base/mkiv/data-ini.lua b/tex/context/base/mkiv/data-ini.lua
index c36e0bb9c..57a800d83 100644
--- a/tex/context/base/mkiv/data-ini.lua
+++ b/tex/context/base/mkiv/data-ini.lua
@@ -8,9 +8,11 @@ if not modules then modules = { } end modules ['data-ini'] = {
local next, type, getmetatable, rawset = next, type, getmetatable, rawset
local gsub, find, gmatch, char = string.gsub, string.find, string.gmatch, string.char
-local filedirname, filebasename, filejoin = file.dirname, file.basename, file.join
+local filedirname, filebasename, filejoin, replacesuffix = file.dirname, file.basename, file.join, file.replacesuffix
local ostype, osname, osuname, ossetenv, osgetenv = os.type, os.name, os.uname, os.setenv, os.getenv
local sortedpairs = table.sortedpairs
+local isfile, currentdir = lfs.isfile, lfs.currentdir
+local expandlink = dir.expandlink
local P, S, R, C, Cs, Cc, lpegmatch = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.match
@@ -103,31 +105,19 @@ do
environment.ownmain = status and string.match(string.lower(status.banner),"this is ([%a]+)") or "luatex"
end
- local ownbin = environment.ownbin or args[-2] or arg[-2] or args[-1] or arg[-1] or arg[0] or "luatex"
+ local ownbin = environment.ownbin or os.selfbin or args[-2] or arg[-2] or args[-1] or arg[-1] or arg[0] or "luametatex"
local ownpath = environment.ownpath or os.selfdir
- ownbin = file.collapsepath(ownbin)
+ ownbin = file.collapsepath(ownbin) -- This one an actually also contain the path!
ownpath = file.collapsepath(ownpath)
-- We need to follow the symlink on osx - texlive. This only works luametatex and
- -- lmtx so we might as wel forget abnotu luatex/mkiv there. The regular context
- -- installation doesn't have this link issue.
+ -- lmtx so we might as wel forget about luatex/mkiv there. The regular context
+ -- installation doesn't have this link issue. I tried several variants but in the
+ -- end the chdir variants was most reliable. Everything else is ugly. (Experimtal
+ -- code is in data-osx.lua).
- local symlinktarget = lfs.symlinktarget
-
- if symlinktarget then
- while true do
- local new = symlinktarget(ownpath) or ownpath
- if new == ownpath then
- break
- else
- ownpath = new
- end
- end
- ownpath = file.collapsepath(ownpath)
- else
- lfs.symlinktarget = function() return nil end -- forget about it, luatex is frozen
- end
+ ownpath = expandlink(ownpath,trace_locating and report_initialization)
if not ownpath or ownpath == "" or ownpath == "unset" then
ownpath = args[-1] or arg[-1]
@@ -142,31 +132,14 @@ do
end
if not ownpath or ownpath == "" then
if os.binsuffix ~= "" then
- binary = file.replacesuffix(binary,os.binsuffix)
+ binary = replacesuffix(binary,os.binsuffix)
end
local path = osgetenv("PATH")
if path then
for p in gmatch(path,"[^"..io.pathseparator.."]+") do
local b = filejoin(p,binary)
- if lfs.isfile(b) then
- -- we assume that after changing to the path the currentdir function
- -- resolves to the real location and use this side effect here; this
- -- trick is needed because on the mac installations use symlinks in the
- -- path instead of real locations
- local olddir = lfs.currentdir()
- if lfs.chdir(p) then
- local pp = lfs.currentdir()
- if trace_locating and p ~= pp then
- report_initialization("following symlink %a to %a",p,pp)
- end
- ownpath = pp
- lfs.chdir(olddir)
- else
- if trace_locating then
- report_initialization("unable to check path %a",p)
- end
- ownpath = p
- end
+ if isfile(b) then
+ ownpath = expandlink(p,trace_locating and report_initialization)
break
end
end
diff --git a/tex/context/base/mkiv/grph-con.lua b/tex/context/base/mkiv/grph-con.lua
index fdae2223b..fcc8c931d 100644
--- a/tex/context/base/mkiv/grph-con.lua
+++ b/tex/context/base/mkiv/grph-con.lua
@@ -312,7 +312,7 @@ do -- png | jpg | profiles
-- [[convert %?colorspace: -colorspace "%colorspace%" ?%]]
local rgbprofile = "srgb_v4_icc_preference.icc" -- srgb.icc
- local cmykprofile = "isocoated_v2_300_eci.icc" -- isocoated_v2_eci.icc
+ local cmykprofile = "isocoated_v2_eci.icc" -- isocoated_v2_300_eci.icc
directives.register("graphics.conversion.rgbprofile", function(v) rgbprofile = type(v) == "string" and v or rgbprofile end)
directives.register("graphics.conversion.cmykprofile",function(v) cmykprofile = type(v) == "string" and v or cmykprofile end)
@@ -320,9 +320,14 @@ do -- png | jpg | profiles
local jpgconverters = converters.jpg
local pngconverters = converters.png
+ local findfile = resolvers.findfile
+
local function profiles()
if not isfile(rgbprofile) then
- local found = resolvers.findfile(rgbprofile)
+ local found = findfile(rgbprofile)
+ if not found or found == "" then
+ found = findfile("colo-imp-"..rgbprofile)
+ end
if found and found ~= "" then
rgbprofile = found
else
@@ -331,6 +336,9 @@ do -- png | jpg | profiles
end
if not isfile(cmykprofile) then
local found = resolvers.findfile(cmykprofile)
+ if not found or found == "" then
+ found = findfile("colo-imp-"..cmykprofile)
+ end
if found and found ~= "" then
cmykprofile = found
else
diff --git a/tex/context/base/mkiv/l-dir.lua b/tex/context/base/mkiv/l-dir.lua
index c8543f025..3e24e4e2a 100644
--- a/tex/context/base/mkiv/l-dir.lua
+++ b/tex/context/base/mkiv/l-dir.lua
@@ -596,6 +596,27 @@ do
end
+ -- This go there anc check works okay in tricky situation as we encounter
+ -- on osx, where tex installations use rather complex chains of links.
+
+ function dir.expandlink(dir,report)
+ local curdir = currentdir()
+ local trace = type(report) == "function"
+ if chdir(dir) then
+ local newdir = currentdir()
+ if newdir ~= dir and trace then
+ report("following symlink %a to %a",dir,newdir)
+ end
+ chdir(curdir)
+ return newdir
+ else
+ if trace then
+ report("unable to check path %a",dir)
+ end
+ return dir
+ end
+ end
+
end
file.expandname = dir.expandname -- for convenience
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 66f1aba27..c073662c5 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 f78a5e548..5bced88ec 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/toks-scn.lua b/tex/context/base/mkiv/toks-scn.lua
index 98d2f66c0..c51377941 100644
--- a/tex/context/base/mkiv/toks-scn.lua
+++ b/tex/context/base/mkiv/toks-scn.lua
@@ -347,6 +347,11 @@ local presets = {
["2 arguments"] = { "argument", "argument" },
["3 arguments"] = { "argument", "argument", "argument" },
["4 arguments"] = { "argument", "argument", "argument", "argument" },
+
+ ["1 integer"] = { "integer" },
+ ["2 integers"] = { "integer", "integer" },
+ ["3 integers"] = { "integer", "integer", "integer" },
+ ["4 integers"] = { "integer", "integer", "integer", "integer" },
}
tokens.presets = presets
diff --git a/tex/context/base/mkiv/typo-prc.lua b/tex/context/base/mkiv/typo-prc.lua
index 2704149db..72b159e9c 100644
--- a/tex/context/base/mkiv/typo-prc.lua
+++ b/tex/context/base/mkiv/typo-prc.lua
@@ -15,7 +15,7 @@ local implement = interfaces.implement
local formatters = string.formatters
-typesetters.processors = typesetters.processors or { }
+typesetters.processors = typesetters.processors or { }
local processors = typesetters.processors
local trace_processors = false