texlive[53904] Master/texmf-dist: luamplib (25feb20)

commits+karl at tug.org commits+karl at tug.org
Tue Feb 25 02:22:23 CET 2020


Revision: 53904
          http://tug.org/svn/texlive?view=revision&revision=53904
Author:   karl
Date:     2020-02-25 02:22:23 +0100 (Tue, 25 Feb 2020)
Log Message:
-----------
luamplib (25feb20)

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	2020-02-25 01:22:11 UTC (rev 53903)
+++ trunk/Master/texmf-dist/doc/luatex/luamplib/NEWS	2020-02-25 01:22:23 UTC (rev 53904)
@@ -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

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	2020-02-25 01:22:11 UTC (rev 53903)
+++ trunk/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx	2020-02-25 01:22:23 UTC (rev 53904)
@@ -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 at tug.org>
@@ -85,7 +85,7 @@
 %<*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 @@
 % \author{Hans Hagen, Taco Hoekwater, Elie Roux, Philipp Gesang and Kim Dohyun\\
 % Maintainer: LuaLaTeX Maintainers ---
 % Support: \email{lualatex-dev at tug.org}}
-% \date{2019/12/11 v2.20.4}
+% \date{2020/02/24 v2.20.5}
 %
 % \maketitle
 %
@@ -407,8 +407,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.",
 }
 
@@ -1960,7 +1960,7 @@
 \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,9 +1974,6 @@
 %
 %    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}
@@ -1983,6 +1980,15 @@
 \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 @@
 }
 %    \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}

Modified: trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua	2020-02-25 01:22:11 UTC (rev 53903)
+++ trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua	2020-02-25 01:22:23 UTC (rev 53904)
@@ -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.",
 }
 

Modified: trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty	2020-02-25 01:22:11 UTC (rev 53903)
+++ trunk/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty	2020-02-25 01:22:23 UTC (rev 53904)
@@ -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



More information about the tex-live-commits mailing list.