diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luamplib/luamplib.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua index a204896d530..f7cc692f6fa 100644 --- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua +++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua @@ -11,8 +11,8 @@ luatexbase.provides_module { name = "luamplib", - version = "2.20.9", - date = "2021/08/03", + version = "2.21.0", + date = "2021/09/16", description = "Lua package to typeset Metapost with LuaTeX's MPLib.", } @@ -481,8 +481,8 @@ local function mpprint(buffer,...) end function luamplib.runscript (code) - local id, str = code:match("(.-){(.+)}") - if id and str and str ~= "" then + local id, str = code:match("(.-){(.*)}") + if id and str then local f = runscript_funcs[id] if f then local t = f(str) @@ -588,7 +588,8 @@ extra_beginfig := extra_beginfig & " let VerbatimTeX = normalVerbatimTeX;"& "runscript(" &ditto& "luamplib.in_the_fig=true" &ditto& ");"; extra_endfig := extra_endfig & " let VerbatimTeX = specialVerbatimTeX;"& "runscript(" &ditto& - "luamplib.in_the_fig=false luamplib.figid=luamplib.figid+1" &ditto& ");"; + "if luamplib.in_the_fig then luamplib.figid=luamplib.figid+1 end "& + "luamplib.in_the_fig=false" &ditto& ");"; ]] luamplib.legacyverbatimtexpreamble = legacyverbatimtexpreamble |