summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-24 23:00:54 +0000
committerKarl Berry <karl@freefriends.org>2014-01-24 23:00:54 +0000
commit6034647346107856b306760d565d1f788296630b (patch)
tree92e118807825988ea1e7aa9323a4caad8cc3fff8
parent483ec72d28bea720650818b50a67552496e756fe (diff)
luamplib (24jan14)
git-svn-id: svn://tug.org/texlive/trunk@32780 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/luatex/luamplib/luamplib.pdfbin114244 -> 114460 bytes
-rw-r--r--Master/texmf-dist/source/luatex/luamplib/luamplib.dtx31
-rw-r--r--Master/texmf-dist/tex/luatex/luamplib/luamplib.lua3
-rw-r--r--Master/texmf-dist/tex/luatex/luamplib/luamplib.sty24
4 files changed, 34 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf
index 0ef953f2d82..7f1fd6d5328 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 f6c95a77d21..01de897bbe6 100644
--- a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
+++ b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx
@@ -85,7 +85,7 @@ See source file '\inFileName' for licencing and contact information.
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luamplib.drv}%
- [2014/01/20 v2.3 Interface for using the mplib library]%
+ [2014/01/23 v2.3 Interface for using the mplib library]%
\documentclass{ltxdoc}
\usepackage{metalogo,multicol,mdwlist,fancyvrb,xspace}
\usepackage[x11names]{xcolor}
@@ -154,7 +154,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{2014/01/20 v2.3}
+% \date{2014/01/23 v2.3}
%
% \maketitle
%
@@ -270,7 +270,7 @@ luamplib.lastlog = ""
local err, warn, info, log = luatexbase.provides_module({
name = "luamplib",
version = 2.3,
- date = "2014/01/20",
+ date = "2014/01/23",
description = "Lua package to typeset Metapost with LuaTeX's MPLib.",
})
@@ -777,6 +777,7 @@ local function domakeTEXboxes (data)
end
local function makeTEXboxes (data)
+ data = stringgsub(data, "##", "#") -- restore # doubled in input string
local mpx = luamplib.load(currentformat)
if mpx and data then
local result = mpx:execute(mplibcodepreamble .. data)
@@ -1154,7 +1155,7 @@ luamplib.colorconverter = colorconverter
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luamplib}
- [2014/01/20 v2.3 mplib package for LuaTeX]
+ [2014/01/23 v2.3 mplib package for LuaTeX]
\RequirePackage{luatexbase-modutils}
\RequirePackage{pdftexcmds}
\fi
@@ -1218,9 +1219,8 @@ luamplib.colorconverter = colorconverter
}
\long\def\mplibdocode#1\endmplibcode{%
\egroup
- \expandafter\def\expandafter\mplibtmp\expandafter
- {\directlua{luamplib.protecttextext([===[\unexpanded{#1}]===])}}%
- \directlua{luamplib.tempdata = luamplib.makeTEXboxes([===[\mplibtmp]===])}%
+ \def\mplibtemp{\directlua{luamplib.protecttextext([===[\unexpanded{#1}]===])}}%
+ \directlua{luamplib.tempdata = luamplib.makeTEXboxes([===[\mplibtemp]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata)}%
\endgroup
}
@@ -1241,8 +1241,7 @@ luamplib.colorconverter = colorconverter
\endgroup
\toks@\expandafter{\the\toks@#1}%
\ifnum\pdf@strcmp{#2}{mplibcode}=\z@
- \expandafter\def\expandafter\reserved@a\expandafter
- {\directlua{luamplib.protecttextext([===[\the\toks@]===])}}%
+ \def\reserved@a{\directlua{luamplib.protecttextext([===[\the\toks@]===])}}%
\directlua{luamplib.tempdata=luamplib.makeTEXboxes([===[\reserved@a]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata)}%
\end{mplibcode}%
@@ -1262,14 +1261,20 @@ luamplib.colorconverter = colorconverter
\protected\def\everymplib{%
\begingroup
\mplibsetupcatcodes
- \expandafter\endgroup
- \everymplibtoks
+ \mplibdoeverymplib
+}
+\def\mplibdoeverymplib#1{%
+ \endgroup
+ \everymplibtoks{#1}%
}
\protected\def\everyendmplib{%
\begingroup
\mplibsetupcatcodes
- \expandafter\endgroup
- \everyendmplibtoks
+ \mplibdoeveryendmplib
+}
+\def\mplibdoeveryendmplib#1{%
+ \endgroup
+ \everyendmplibtoks{#1}%
}
\def\mpdim#1{ begingroup \the\dimexpr #1\relax\space endgroup } % gmp.sty
% \end{macrocode}
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
index e0db6e0c767..b5a8b776862 100644
--- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
+++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua
@@ -19,7 +19,7 @@ luamplib.lastlog = ""
local err, warn, info, log = luatexbase.provides_module({
name = "luamplib",
version = 2.3,
- date = "2014/01/20",
+ date = "2014/01/23",
description = "Lua package to typeset Metapost with LuaTeX's MPLib.",
})
@@ -468,6 +468,7 @@ local function domakeTEXboxes (data)
end
local function makeTEXboxes (data)
+ data = stringgsub(data, "##", "#") -- restore # doubled in input string
local mpx = luamplib.load(currentformat)
if mpx and data then
local result = mpx:execute(mplibcodepreamble .. data)
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty
index 548bf58dda4..5b3374fefcf 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}
- [2014/01/20 v2.3 mplib package for LuaTeX]
+ [2014/01/23 v2.3 mplib package for LuaTeX]
\RequirePackage{luatexbase-modutils}
\RequirePackage{pdftexcmds}
\fi
@@ -52,9 +52,8 @@
}
\long\def\mplibdocode#1\endmplibcode{%
\egroup
- \expandafter\def\expandafter\mplibtmp\expandafter
- {\directlua{luamplib.protecttextext([===[\unexpanded{#1}]===])}}%
- \directlua{luamplib.tempdata = luamplib.makeTEXboxes([===[\mplibtmp]===])}%
+ \def\mplibtemp{\directlua{luamplib.protecttextext([===[\unexpanded{#1}]===])}}%
+ \directlua{luamplib.tempdata = luamplib.makeTEXboxes([===[\mplibtemp]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata)}%
\endgroup
}
@@ -69,8 +68,7 @@
\endgroup
\toks@\expandafter{\the\toks@#1}%
\ifnum\pdf@strcmp{#2}{mplibcode}=\z@
- \expandafter\def\expandafter\reserved@a\expandafter
- {\directlua{luamplib.protecttextext([===[\the\toks@]===])}}%
+ \def\reserved@a{\directlua{luamplib.protecttextext([===[\the\toks@]===])}}%
\directlua{luamplib.tempdata=luamplib.makeTEXboxes([===[\reserved@a]===])}%
\directlua{luamplib.processwithTEXboxes(luamplib.tempdata)}%
\end{mplibcode}%
@@ -84,14 +82,20 @@
\protected\def\everymplib{%
\begingroup
\mplibsetupcatcodes
- \expandafter\endgroup
- \everymplibtoks
+ \mplibdoeverymplib
+}
+\def\mplibdoeverymplib#1{%
+ \endgroup
+ \everymplibtoks{#1}%
}
\protected\def\everyendmplib{%
\begingroup
\mplibsetupcatcodes
- \expandafter\endgroup
- \everyendmplibtoks
+ \mplibdoeveryendmplib
+}
+\def\mplibdoeveryendmplib#1{%
+ \endgroup
+ \everyendmplibtoks{#1}%
}
\def\mpdim#1{ begingroup \the\dimexpr #1\relax\space endgroup } % gmp.sty
\ifx\mplibscratchbox\undefined \newbox\mplibscratchbox \fi