summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/NEWS6
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/luamplib.pdfbin148905 -> 149263 bytes
-rw-r--r--Master/texmf-dist/source/luatex/luamplib/luamplib.dtx36
-rw-r--r--Master/texmf-dist/tex/luatex/luamplib/luamplib.lua4
-rw-r--r--Master/texmf-dist/tex/luatex/luamplib/luamplib.sty11
5 files changed, 38 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/luatex/luamplib/NEWS b/Master/texmf-dist/doc/luatex/luamplib/NEWS
index 109cb4ffcb9..7155c5a4b8c 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/NEWS
+++ b/Master/texmf-dist/doc/luatex/luamplib/NEWS
@@ -1,5 +1,11 @@
History of the luamplib package
+2020/02/24 2.20.5
+ * Extra check for \pdfliteral (PR #89)
+ * allow expansion of \mpdim and \mpcolor when they are used in
+ another macro
+ * step copyright year
+
2019/12/11 2.20.4
* remove unnecessary setting of endlinechar
* \prependtomplibbox instead of \mplibhmodeornot
diff --git a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
index 7ddfb315051..881e643e258 100644
--- a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
+++ b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
index e683a7a2f4e..af3229da7a0 100644
--- a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
+++ b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment -- by the way, this file contains UTF-8
%
-% Copyright (C) 2008-2019 by Hans Hagen, Taco Hoekwater, Elie Roux,
+% Copyright (C) 2008-2020 by Hans Hagen, Taco Hoekwater, Elie Roux,
% Manuel Pégourié-Gonnard, Philipp Gesang and Kim Dohyun.
% Currently maintained by the LuaLaTeX development team.
% Support: <lualatex-dev@tug.org>
@@ -85,7 +85,7 @@ See source file '\inFileName' for licencing and contact information.
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luamplib.drv}%
- [2019/12/11 v2.20.4 Interface for using the mplib library]%
+ [2020/02/24 v2.20.5 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{2019/12/11 v2.20.4}
+% \date{2020/02/24 v2.20.5}
%
% \maketitle
%
@@ -407,8 +407,8 @@ See source file '\inFileName' for licencing and contact information.
luatexbase.provides_module {
name = "luamplib",
- version = "2.20.4",
- date = "2019/12/11",
+ version = "2.20.5",
+ date = "2020/02/24",
description = "Lua package to typeset Metapost with LuaTeX's MPLib.",
}
@@ -1960,7 +1960,7 @@ luamplib.colorconverter = colorconverter
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luamplib}
- [2019/12/11 v2.20.4 mplib package for LuaTeX]
+ [2020/02/24 v2.20.5 mplib package for LuaTeX]
\ifx\newluafunction\@undefined
\input ltluatex
\fi
@@ -1974,15 +1974,21 @@ luamplib.colorconverter = colorconverter
%
% Support older engine. Seems we don't need it, but no harm.
% \begin{macrocode}
-\ifx\scantextokens\undefined
- \let\scantextokens\luatexscantextokens
-\fi
\ifx\pdfoutput\undefined
\let\pdfoutput\outputmode
\protected\def\pdfliteral{\pdfextension literal}
\fi
% \end{macrocode}
%
+% Unfortuantely there are still packages out there that think it is a good
+% idea to manually set \cs{pdfoutput} which defeats the above branch that
+% defines \cs{pdfliteral}. To cover that case we need an extra check.
+% \begin{macrocode}
+\ifx\pdfliteral\undefined
+ \protected\def\pdfliteral{\pdfextension literal}
+\fi
+% \end{macrocode}
+%
% Set the format for metapost.
% \begin{macrocode}
\def\mplibsetformat#1{\directlua{luamplib.setformat("#1")}}
@@ -2118,10 +2124,14 @@ luamplib.colorconverter = colorconverter
}
% \end{macrocode}
%
-% Allow \TeX\ dimen macros in |mplibcode|. But now |runscript| does the job.
-% \begin{verbatim}
-% \def\mpdim#1{ begingroup \the\dimexpr #1\relax\space endgroup }% gmp.sty
-% \end{verbatim}
+% Allow \TeX\ dimen/color macros. Now |runscript| does the job,
+% so the following lines are not needed for most cases.
+% But the macros will be expanded when they are used in another macro.
+% \begin{macrocode}
+\def\mpdim#1{ mplibdimen("#1") }
+\def\mpcolor#1#{\domplibcolor{#1}}
+\def\domplibcolor#1#2{ mplibcolor("#1{#2}") }
+% \end{macrocode}
%
% MPLib's number system. Now |binary| has gone away.
% \begin{macrocode}
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
index 2b2ac290b4c..44f44d5cf10 100644
--- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
+++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
@@ -11,8 +11,8 @@
luatexbase.provides_module {
name = "luamplib",
- version = "2.20.4",
- date = "2019/12/11",
+ version = "2.20.5",
+ date = "2020/02/24",
description = "Lua package to typeset Metapost with LuaTeX's MPLib.",
}
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
index aae75fd9632..21f508a2ee2 100644
--- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
+++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
@@ -14,19 +14,19 @@
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luamplib}
- [2019/12/11 v2.20.4 mplib package for LuaTeX]
+ [2020/02/24 v2.20.5 mplib package for LuaTeX]
\ifx\newluafunction\@undefined
\input ltluatex
\fi
\fi
\directlua{require("luamplib")}
-\ifx\scantextokens\undefined
- \let\scantextokens\luatexscantextokens
-\fi
\ifx\pdfoutput\undefined
\let\pdfoutput\outputmode
\protected\def\pdfliteral{\pdfextension literal}
\fi
+\ifx\pdfliteral\undefined
+ \protected\def\pdfliteral{\pdfextension literal}
+\fi
\def\mplibsetformat#1{\directlua{luamplib.setformat("#1")}}
\ifnum\pdfoutput>0
\let\mplibtoPDF\pdfliteral
@@ -122,6 +122,9 @@
\endgroup
\everyendmplibtoks{#1}%
}
+\def\mpdim#1{ mplibdimen("#1") }
+\def\mpcolor#1#{\domplibcolor{#1}}
+\def\domplibcolor#1#2{ mplibcolor("#1{#2}") }
\def\mplibnumbersystem#1{\directlua{
local t = "#1"
if t == "binary" then t = "decimal" end