summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-06-25 00:42:45 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-06-25 00:42:45 +0200
commit2ea1b4f020b6bdc233f5db99847638997e36eb57 (patch)
tree83e33ac5e0185caa5847de082abcfe94c54fc5b2 /tex
parent820657bb1e9acfb36f24dfa8801526b0d5f2b464 (diff)
downloadcontext-2ea1b4f020b6bdc233f5db99847638997e36eb57.tar.gz
2021-06-24 23:41:00
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-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/l-os.lua37
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin23600 -> 23595 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin248139 -> 248138 bytes
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/font-chk.lmt2
-rw-r--r--tex/context/base/mkxl/font-ctx.lmt3
-rw-r--r--tex/context/base/mkxl/meta-ini.mkxl10
-rw-r--r--tex/context/base/mkxl/mlib-lmp.lmt42
-rw-r--r--tex/context/base/mkxl/mlib-lua.lmt2
-rw-r--r--tex/context/base/mkxl/supp-box.mkxl3
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
16 files changed, 72 insertions, 41 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index fcd325bb0..8d536ed0f 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2021.06.24 18:50}
+\newcontextversion{2021.06.24 23:39}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 9d1f707b6..90520a150 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.06.24 18:50}
+\edef\contextversion{2021.06.24 23:39}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 5ae1a881c..3323fde71 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.06.24 18:50}
+\newcontextversion{2021.06.24 23:39}
%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 20d33af39..853812de2 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.06.24 18:50}
+\edef\contextversion{2021.06.24 23:39}
%D Kind of special:
diff --git a/tex/context/base/mkiv/l-os.lua b/tex/context/base/mkiv/l-os.lua
index 06cc35a79..b46036757 100644
--- a/tex/context/base/mkiv/l-os.lua
+++ b/tex/context/base/mkiv/l-os.lua
@@ -183,11 +183,30 @@ end
-- end of environment hack
+if not io.fileseparator then
+ if find(os.getenv("PATH"),";",1,true) then
+ io.fileseparator, io.pathseparator, os.type = "\\", ";", os.type or "windows"
+ else
+ io.fileseparator, io.pathseparator, os.type = "/" , ":", os.type or "unix"
+ end
+end
+
+os.type = os.type or (io.pathseparator == ";" and "windows") or "unix"
+os.name = os.name or (os.type == "windows" and "mswin" ) or "linux"
+
+if os.type == "windows" then
+ os.libsuffix, os.binsuffix, os.binsuffixes = 'dll', 'exe', { 'exe', 'cmd', 'bat' }
+else
+ os.libsuffix, os.binsuffix, os.binsuffixes = 'so', '', { '' }
+end
+
local execute = os.execute
local iopopen = io.popen
+local ostype = os.type
local function resultof(command)
- local handle = iopopen(command,"rb") -- already has flush, b is new !
+ -- already has flush, b is new and we need it to pipe xz output
+ local handle = iopopen(command,ostype == "windows" and "rb" or "r")
if handle then
local result = handle:read("*all") or ""
handle:close()
@@ -203,22 +222,6 @@ function os.pipeto(command)
return iopopen(command,"w") -- already has flush
end
-if not io.fileseparator then
- if find(os.getenv("PATH"),";",1,true) then
- io.fileseparator, io.pathseparator, os.type = "\\", ";", os.type or "windows"
- else
- io.fileseparator, io.pathseparator, os.type = "/" , ":", os.type or "unix"
- end
-end
-
-os.type = os.type or (io.pathseparator == ";" and "windows") or "unix"
-os.name = os.name or (os.type == "windows" and "mswin" ) or "linux"
-
-if os.type == "windows" then
- os.libsuffix, os.binsuffix, os.binsuffixes = 'dll', 'exe', { 'exe', 'cmd', 'bat' }
-else
- os.libsuffix, os.binsuffix, os.binsuffixes = 'so', '', { '' }
-end
local launchers = {
windows = "start %s",
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 4c0c46993..3e3408ef5 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 ca29ed3a5..d8d7fbd47 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/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index caa9a866b..9e0a56317 100644
--- a/tex/context/base/mkxl/cont-new.mkxl
+++ b/tex/context/base/mkxl/cont-new.mkxl
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.06.24 18:50}
+\newcontextversion{2021.06.24 23:39}
%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/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl
index 17c5ec38d..f26dcc6cd 100644
--- a/tex/context/base/mkxl/context.mkxl
+++ b/tex/context/base/mkxl/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2021.06.24 18:50}
+\immutable\edef\contextversion{2021.06.24 23:39}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/font-chk.lmt b/tex/context/base/mkxl/font-chk.lmt
index b5a875261..1587919f0 100644
--- a/tex/context/base/mkxl/font-chk.lmt
+++ b/tex/context/base/mkxl/font-chk.lmt
@@ -540,7 +540,7 @@ do
function definers.registerfallbackfont(style,list)
local l = fallbacks[style]
if l then
- for s in gmatch(list,"%S+") do
+ for s in gmatch(list,"[^, ]+") do
if not contains(l,s) then
l[#l+1] = s
end
diff --git a/tex/context/base/mkxl/font-ctx.lmt b/tex/context/base/mkxl/font-ctx.lmt
index b735e3d2f..a6e962872 100644
--- a/tex/context/base/mkxl/font-ctx.lmt
+++ b/tex/context/base/mkxl/font-ctx.lmt
@@ -156,7 +156,8 @@ or
-- this will move elsewhere ...
local function getfontname(tfmdata)
- return basename(type(tfmdata) == "number" and properties[tfmdata].name or tfmdata.properties.name)
+ local p = type(tfmdata) == "number" and properties[tfmdata] or tfmdata.properties
+ return basename((p and (p.name or p.fullname or p.fontname)) or "unknown")
end
helpers.name = getfontname
diff --git a/tex/context/base/mkxl/meta-ini.mkxl b/tex/context/base/mkxl/meta-ini.mkxl
index 83cf86b35..cd8f74439 100644
--- a/tex/context/base/mkxl/meta-ini.mkxl
+++ b/tex/context/base/mkxl/meta-ini.mkxl
@@ -634,9 +634,9 @@
\def\meta_handle_unique_graphic#1#2#3% when there are too many, we can store data at the lua end, although,
{\begingroup % when there are that many they're probably not that unique anyway
- \edef\currentmpcategory{#1}%
- \extendMPoverlaystamp{#2}% incl prepare
- \ifcsname\??mpgraphic\overlaystamp:#1\endcsname
+ % \currentmpcategory already set
+ \extendMPoverlaystamp{#2}% incl prepare (maybe move to lua)
+ \ifcsname\??mpgraphic\overlaystamp:#1\endcsname % todo: is now per instance !
\lastnamedcs
\else
\meta_enable_include % redundant
@@ -670,7 +670,7 @@
\def\meta_handle_use_graphic#1#2#3%
{\begingroup
- \edef\currentmpcategory{#1}%
+ % \currentmpcategory already set
\meta_enable_include % redundant
\meta_process_graphic{#3}%
\endgroup}
@@ -699,7 +699,7 @@
\def\meta_handle_reusable_graphic#1#2#3%
{\begingroup
- \edef\currentmpcategory{#1}%
+ % \currentmpcategory already set
\meta_enable_include % redundant
\global\advance\c_meta_object_counter\plusone
\meta_use_box{\number\c_meta_object_counter}\hpack{\meta_process_graphic{#3}}% was vbox, graphic must end up as hbox
diff --git a/tex/context/base/mkxl/mlib-lmp.lmt b/tex/context/base/mkxl/mlib-lmp.lmt
index c493c55ae..c4a141eee 100644
--- a/tex/context/base/mkxl/mlib-lmp.lmt
+++ b/tex/context/base/mkxl/mlib-lmp.lmt
@@ -103,8 +103,12 @@ end)
-- registerscript("mpvar", function() return getmacro(mpgnamespace .. getmacro("currentmpcategory") .. ":" .. scanmpstring(), true) end) -- Isn't it already edef'd?
-- registerscript("mpvar", function() return getmacro(metapost.namespace .. scanmpstring(), true) end) -- Isn't it already edef'd?
-local scanstring = mp.scan.string
-local expandtex = mp.expandtex
+local scanstring = mp.scan.string
+local expandtex = mp.expandtex
+
+local injectnumeric = mp.inject.numeric
+local injectstring = mp.inject.string
+local injectboolean = mp.inject.boolean
local tokenvalues = tokens.values
local dimension_value = tokenvalues.dimension
@@ -113,8 +117,32 @@ local boolean_value = tokenvalues.boolean
local string_value = tokenvalues.string
local unknown_value = tokenvalues.none
-registerdirect("mpvard", function() expandtex(dimension_value,"mpcategoryparameter",true,scanstring()) end)
-registerdirect("mpvarn", function() expandtex(integer_value, "mpcategoryparameter",true,scanstring()) end)
-registerdirect("mpvars", function() expandtex(string_value, "mpcategoryparameter",true,scanstring()) end)
-registerdirect("mpvarb", function() expandtex(boolean_value, "mpcategoryparameter",true,scanstring()) end)
-registerdirect("mpvar", function() expandtex(unknown_value, "mpcategoryparameter",true,scanstring()) end)
+registerdirect("mpvard", function()
+ if not expandtex(dimension_value,"mpcategoryparameter",true,scanstring()) then
+ injectnumeric(0)
+ end
+end)
+
+registerdirect("mpvarn", function()
+ if not expandtex(integer_value, "mpcategoryparameter",true,scanstring(),0) then
+ injectnumeric(0)
+ end
+end)
+
+registerdirect("mpvars", function()
+ if not expandtex(string_value, "mpcategoryparameter",true,scanstring(),"") then
+ injectstring("")
+ end
+end)
+
+registerdirect("mpvarb", function()
+ if not expandtex(boolean_value, "mpcategoryparameter",true,scanstring(),false) then
+ injectboolean(false)
+ end
+end)
+
+registerdirect("mpvar", function()
+ if not expandtex(unknown_value, "mpcategoryparameter",true,scanstring(),0) then
+ injectnumeric(0)
+ end
+end)
diff --git a/tex/context/base/mkxl/mlib-lua.lmt b/tex/context/base/mkxl/mlib-lua.lmt
index 6acb159f6..ceca9668a 100644
--- a/tex/context/base/mkxl/mlib-lua.lmt
+++ b/tex/context/base/mkxl/mlib-lua.lmt
@@ -79,7 +79,7 @@ local getstatus = mplib.getstatus
local expandtex = mplib.expandtex
mp.solve = function(...) return solvepath(currentmpx,...) end
-mp.expandtex = function(...) expandtex(currentmpx,...) end
+mp.expandtex = function(...) return expandtex(currentmpx,...) end
local injectpath = mplib.injectpath
local injectnumeric = mplib.injectnumeric
diff --git a/tex/context/base/mkxl/supp-box.mkxl b/tex/context/base/mkxl/supp-box.mkxl
index fc880852b..52f54e327 100644
--- a/tex/context/base/mkxl/supp-box.mkxl
+++ b/tex/context/base/mkxl/supp-box.mkxl
@@ -2878,12 +2878,11 @@
%D
%D \starttyping
%D \setbox0\hbox{!!!!!}
-%D \permanent\protected\def\showboxhere{\showbox nolevels content online }
%D \showbox 0
%D \showboxhere 0 % always on console, less clutter
%D \stoptyping
-\permanent\protected\def\showboxhere{\showbox nolevels content online }
+\untraced\permanent\protected\def\showboxhere{\showbox nolevels content online }
\protect \endinput
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 36893a527..f112ba224 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 : 2021-06-24 18:50
+-- merge date : 2021-06-24 23:39
do -- begin closure to overcome local limits and interference