summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-08-07 19:47:57 +0000
committerKarl Berry <karl@freefriends.org>2023-08-07 19:47:57 +0000
commit255381979a56f1f9095e3cb72cca4f16fdc49a6d (patch)
tree73f5c937f9f028772075a65375127ea4092ef520 /Master/texmf-dist/source/luatex
parent57dfa5f3c5caadee1c2ec570f8316911123fa977 (diff)
luamplib (7aug23)
git-svn-id: svn://tug.org/texlive/trunk@67836 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/luatex')
-rw-r--r--Master/texmf-dist/source/luatex/luamplib/luamplib.dtx24
1 files changed, 13 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
index 35615062d22..61e3878a17f 100644
--- a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
+++ b/Master/texmf-dist/source/luatex/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