From e55e56ce482cc9d01a0b83f22dac4851eb4c0357 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 25 Feb 2020 03:01:07 +0000 Subject: CTAN sync 202002250301 --- macros/luatex/generic/luamplib/luamplib.dtx | 36 ++++++++++++++++++----------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'macros/luatex/generic/luamplib/luamplib.dtx') diff --git a/macros/luatex/generic/luamplib/luamplib.dtx b/macros/luatex/generic/luamplib/luamplib.dtx index e683a7a2f4..af3229da7a 100644 --- a/macros/luatex/generic/luamplib/luamplib.dtx +++ b/macros/luatex/generic/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: @@ -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} -- cgit v1.2.3