diff options
author | Karl Berry <karl@freefriends.org> | 2014-01-24 23:00:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-01-24 23:00:54 +0000 |
commit | 6034647346107856b306760d565d1f788296630b (patch) | |
tree | 92e118807825988ea1e7aa9323a4caad8cc3fff8 /Master/texmf-dist/tex/luatex/luamplib | |
parent | 483ec72d28bea720650818b50a67552496e756fe (diff) |
luamplib (24jan14)
git-svn-id: svn://tug.org/texlive/trunk@32780 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luamplib')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.lua | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.sty | 24 |
2 files changed, 16 insertions, 11 deletions
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 |