summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-11 22:52:16 +0000
committerKarl Berry <karl@freefriends.org>2021-03-11 22:52:16 +0000
commitc59c766ac61971815ebca125dcac7b3291a7389d (patch)
treec8d317bcdd0490c98242383fcc8feccae94d3088 /Master/texmf-dist/source/luatex
parent50803bd6469f50a1d82162fdf241d3443b493dae (diff)
luamplib (11mar21)
git-svn-id: svn://tug.org/texlive/trunk@58279 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/luatex')
-rw-r--r--Master/texmf-dist/source/luatex/luamplib/luamplib.dtx35
1 files changed, 27 insertions, 8 deletions
diff --git a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
index 12a9519dc82..dec028813fb 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-2020 by Hans Hagen, Taco Hoekwater, Elie Roux,
+% Copyright (C) 2008-2021 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}%
- [2020/12/30 v2.20.6 Interface for using the mplib library]%
+ [2021/03/11 v2.20.7 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{2020/12/30 v2.20.6}
+% \date{2021/03/11 v2.20.7}
%
% \maketitle
%
@@ -407,8 +407,8 @@ See source file '\inFileName' for licencing and contact information.
luatexbase.provides_module {
name = "luamplib",
- version = "2.20.6",
- date = "2020/12/30",
+ version = "2.20.7",
+ date = "2021/03/11",
description = "Lua package to typeset Metapost with LuaTeX's MPLib.",
}
@@ -999,6 +999,21 @@ mp.mf_finish_saving_data = mp.mf_finish_saving_data or function() end
% \end{macrocode}
%
+% metafun 2021-03-09 changes crashes luamplib.
+% \begin{macrocode}
+catcodes = catcodes or {}
+local catcodes = catcodes
+catcodes.numbers = catcodes.numbers or {}
+catcodes.numbers.ctxcatcodes = catcodes.numbers.ctxcatcodes or "0"
+catcodes.numbers.texcatcodes = catcodes.numbers.texcatcodes or "0"
+catcodes.numbers.luacatcodes = catcodes.numbers.luacatcodes or "0"
+catcodes.numbers.notcatcodes = catcodes.numbers.notcatcodes or "0"
+catcodes.numbers.vrbcatcodes = catcodes.numbers.vrbcatcodes or "0"
+catcodes.numbers.prtcatcodes = catcodes.numbers.prtcatcodes or "0"
+catcodes.numbers.txtcatcodes = catcodes.numbers.txtcatcodes or "0"
+
+% \end{macrocode}
+%
% A function from \ConTeXt\ general.
% \begin{macrocode}
local function mpprint(buffer,...)
@@ -1034,8 +1049,12 @@ function luamplib.runscript (code)
function mp.print(...)
mpprint(buffer,...)
end
- f()
- return tableconcat(buffer,"")
+ local result = f()
+ buffer = tableconcat(buffer,"")
+ if buffer and buffer ~= "" then
+ return buffer
+ end
+ return result or ""
end
return ""
end
@@ -1959,7 +1978,7 @@ luamplib.colorconverter = colorconverter
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luamplib}
- [2020/12/30 v2.20.6 mplib package for LuaTeX]
+ [2021/03/11 v2.20.7 mplib package for LuaTeX]
\ifx\newluafunction\@undefined
\input ltluatex
\fi