summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luamplib/luamplib.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-08 03:00:52 +0000
committerNorbert Preining <norbert@preining.info>2023-08-08 03:00:52 +0000
commit313a3ccce8935aa26c29f2e430042cffee435454 (patch)
tree4538a4d48be5143222aea6ad75a473938e243c55 /macros/luatex/generic/luamplib/luamplib.dtx
parentaebf6a3b57eda6e22a8e5fb93958edbf6ad1b551 (diff)
CTAN sync 202308080300
Diffstat (limited to 'macros/luatex/generic/luamplib/luamplib.dtx')
-rw-r--r--macros/luatex/generic/luamplib/luamplib.dtx24
1 files changed, 13 insertions, 11 deletions
diff --git a/macros/luatex/generic/luamplib/luamplib.dtx b/macros/luatex/generic/luamplib/luamplib.dtx
index 35615062d2..61e3878a17 100644
--- a/macros/luatex/generic/luamplib/luamplib.dtx
+++ b/macros/luatex/generic/luamplib/luamplib.dtx
@@ -85,7 +85,7 @@ See source file '\inFileName' for licencing and contact information.
%<*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 @@ See source file '\inFileName' for licencing and contact information.
% \author{Hans Hagen, Taco Hoekwater, Elie Roux, Philipp Gesang and Kim Dohyun\\
% Maintainer: LuaLaTeX Maintainers ---
% Support: \email{lualatex-dev@tug.org}}
-% \date{2023/04/04 v2.24.0}
+% \date{2023/08/07 v2.25.0}
%
% \maketitle
%
@@ -446,8 +446,8 @@ See source file '\inFileName' for licencing and contact information.
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 file = file or { }
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 @@ local function luamplibload (name)
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 @@ local function process_mplibcode (data, instancename)
% 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 @@ local function process_mplibcode (data, instancename)
% 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 pdf_objs = {}
local token, getpageres, setpageres = newtoken or token
local pgf = { bye = "pgfutil@everybye", extgs = "pgf@sys@addpdfresource@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 @@ luamplib.colorconverter = colorconverter
\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