summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luamplib/luamplib.sty')
-rw-r--r--Master/texmf-dist/tex/luatex/luamplib/luamplib.sty7
1 files changed, 4 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
index 8d91224481f..5de8c9c6b36 100644
--- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
+++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
@@ -14,7 +14,7 @@
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luamplib}
- [2021/11/23 v2.21.1 mplib package for LuaTeX]
+ [2022/01/09 v2.22.0 mplib package for LuaTeX]
\ifx\newluafunction\@undefined
\input ltluatex
\fi
@@ -62,7 +62,8 @@
\endgroup
}
\else
-\newenvironment{mplibcode}{%
+\newenvironment{mplibcode}[1][]{%
+ \global\def\currentmpinstancename{#1}%
\mplibtmptoks{}\ltxdomplibcode
}{}
\def\ltxdomplibcode{%
@@ -76,7 +77,7 @@
\mplibtmptoks\expandafter{\the\mplibtmptoks#1}%
\def\mplibtemp@a{#2}%
\ifx\mplib@mplibcode\mplibtemp@a
- \directlua{luamplib.process_mplibcode([===[\the\mplibtmptoks]===])}%
+ \directlua{luamplib.process_mplibcode([===[\the\mplibtmptoks]===],"\currentmpinstancename")}%
\end{mplibcode}%
\else
\mplibtmptoks\expandafter{\the\mplibtmptoks\end{#2}}%