texlive[67836] Master/texmf-dist: luamplib (7aug23)
commits+karl at tug.org
commits+karl at tug.org
Mon Aug 7 21:47:57 CEST 2023
Revision: 67836
http://tug.org/svn/texlive?view=revision&revision=67836
Author: karl
Date: 2023-08-07 21:47:57 +0200 (Mon, 07 Aug 2023)
Log Message:
-----------
luamplib (7aug23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/luatex/luamplib/NEWS
trunk/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
trunk/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
Modified: trunk/Master/texmf-dist/doc/luatex/luamplib/NEWS
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luamplib/NEWS 2023-08-07 19:47:48 UTC (rev 67835)
+++ trunk/Master/texmf-dist/doc/luatex/luamplib/NEWS 2023-08-07 19:47:57 UTC (rev 67836)
@@ -1,6 +1,10 @@
History of the luamplib package
-2024/04/04 2.24.0
+2023/08/07 2.25.0
+ * propagate tex's jobname varible into mplib process as well.
+ * protect "..." if and only if textextlabel is enabled.
+
+2023/04/04 2.24.0
respect '-recorder' command-line option
2022/01/12 2.23.0
Modified: trunk/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
===================================================================
--- trunk/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx 2023-08-07 19:47:48 UTC (rev 67835)
+++ trunk/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx 2023-08-07 19:47:57 UTC (rev 67836)
@@ -85,7 +85,7 @@
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luamplib.drv}%
- [2023/04/04 v2.24.0 Interface for using the mplib library]%
+ [2023/08/07 v2.25.0 Interface for using the mplib library]%
\documentclass{ltxdoc}
\usepackage{metalogo,multicol,mdwlist,fancyvrb,xspace}
\usepackage[x11names]{xcolor}
@@ -153,7 +153,7 @@
% \author{Hans Hagen, Taco Hoekwater, Elie Roux, Philipp Gesang and Kim Dohyun\\
% Maintainer: LuaLaTeX Maintainers ---
% Support: \email{lualatex-dev at tug.org}}
-% \date{2023/04/04 v2.24.0}
+% \date{2023/08/07 v2.25.0}
%
% \maketitle
%
@@ -446,8 +446,8 @@
luatexbase.provides_module {
name = "luamplib",
- version = "2.24.0",
- date = "2023/04/04",
+ version = "2.25.0",
+ date = "2023/08/07",
description = "Lua package to typeset Metapost with LuaTeX's MPLib.",
}
@@ -517,9 +517,6 @@
local replacesuffix = file.replacesuffix or function(filename, suffix)
return (filename:gsub("%.[%a%d]+$","")) .. "." .. suffix
end
-local stripsuffix = file.stripsuffix or function(filename)
- return (filename:gsub("%.[%a%d]+$",""))
-end
local is_writable = file.is_writable or function(name)
if lfsisdir(name) then
@@ -820,6 +817,7 @@
make_text = luamplib.maketext,
run_script = luamplib.runscript,
math_mode = luamplib.numbersystem,
+ job_name = tex.jobname,
random_seed = math.random(4095),
extensions = 1,
}
@@ -1313,7 +1311,9 @@
% It has turned out that no comment sign is allowed.
% \begin{macrocode}
if not luamplib.verbatiminput then
- data = data:gsub("\".-\"", protect_expansion)
+ if luamplib.textextlabel then
+ data = data:gsub("\".-\"", protect_expansion)
+ end
data = data:gsub("\\%%", "\0PerCent\0")
data = data:gsub("%%.-\n","")
@@ -1326,7 +1326,9 @@
% Next line to address issue \#55
% \begin{macrocode}
data = data:gsub("##", "#")
- data = data:gsub("\".-\"", unprotect_expansion)
+ if luamplib.textextlabel then
+ data = data:gsub("\".-\"", unprotect_expansion)
+ end
data = data:gsub(btex_etex, function(str)
return format("btex %s etex", unprotect_expansion(str))
end)
@@ -1546,7 +1548,7 @@
local token, getpageres, setpageres = newtoken or token
local pgf = { bye = "pgfutil at everybye", extgs = "pgf at sys@addpdfresource at extgs@plain" }
-if pdfmode then -- repect luaotfload-colors
+if pdfmode then -- respect luaotfload-colors
getpageres = pdf.getpageresources or function() return pdf.pageresources end
setpageres = pdf.setpageresources or function(s) pdf.pageresources = s end
else
@@ -2063,7 +2065,7 @@
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luamplib}
- [2023/04/04 v2.24.0 mplib package for LuaTeX]
+ [2023/08/07 v2.25.0 mplib package for LuaTeX]
\ifx\newluafunction\@undefined
\input ltluatex
\fi
Modified: trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua 2023-08-07 19:47:48 UTC (rev 67835)
+++ trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua 2023-08-07 19:47:57 UTC (rev 67836)
@@ -11,8 +11,8 @@
luatexbase.provides_module {
name = "luamplib",
- version = "2.24.0",
- date = "2023/04/04",
+ version = "2.25.0",
+ date = "2023/08/07",
description = "Lua package to typeset Metapost with LuaTeX's MPLib.",
}
@@ -60,9 +60,6 @@
local replacesuffix = file.replacesuffix or function(filename, suffix)
return (filename:gsub("%.[%a%d]+$","")) .. "." .. suffix
end
-local stripsuffix = file.stripsuffix or function(filename)
- return (filename:gsub("%.[%a%d]+$",""))
-end
local is_writable = file.is_writable or function(name)
if lfsisdir(name) then
@@ -305,6 +302,7 @@
make_text = luamplib.maketext,
run_script = luamplib.runscript,
math_mode = luamplib.numbersystem,
+ job_name = tex.jobname,
random_seed = math.random(4095),
extensions = 1,
}
@@ -676,7 +674,9 @@
end)
if not luamplib.verbatiminput then
- data = data:gsub("\".-\"", protect_expansion)
+ if luamplib.textextlabel then
+ data = data:gsub("\".-\"", protect_expansion)
+ end
data = data:gsub("\\%%", "\0PerCent\0")
data = data:gsub("%%.-\n","")
@@ -685,7 +685,9 @@
run_tex_code(format("\\mplibtmptoks\\expanded{{%s}}",data))
data = texgettoks"mplibtmptoks"
data = data:gsub("##", "#")
- data = data:gsub("\".-\"", unprotect_expansion)
+ if luamplib.textextlabel then
+ data = data:gsub("\".-\"", unprotect_expansion)
+ end
data = data:gsub(btex_etex, function(str)
return format("btex %s etex", unprotect_expansion(str))
end)
@@ -878,7 +880,7 @@
local token, getpageres, setpageres = newtoken or token
local pgf = { bye = "pgfutil at everybye", extgs = "pgf at sys@addpdfresource at extgs@plain" }
-if pdfmode then -- repect luaotfload-colors
+if pdfmode then -- respect luaotfload-colors
getpageres = pdf.getpageresources or function() return pdf.pageresources end
setpageres = pdf.setpageresources or function(s) pdf.pageresources = s end
else
Modified: trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty 2023-08-07 19:47:48 UTC (rev 67835)
+++ trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty 2023-08-07 19:47:57 UTC (rev 67836)
@@ -14,7 +14,7 @@
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luamplib}
- [2023/04/04 v2.24.0 mplib package for LuaTeX]
+ [2023/08/07 v2.25.0 mplib package for LuaTeX]
\ifx\newluafunction\@undefined
\input ltluatex
\fi
More information about the tex-live-commits
mailing list.