diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luamplib/luamplib.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.lua | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua index 5030c708e47..3944df1502d 100644 --- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua +++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua @@ -18,8 +18,8 @@ luamplib.lastlog = "" luatexbase.provides_module { name = "luamplib", - version = "2.11.3", - date = "2016/03/31", + version = "2.12.1", + date = "2017/06/02", description = "Lua package to typeset Metapost with LuaTeX's MPLib.", } @@ -641,9 +641,12 @@ enddef; luamplib.textextlabelpreamble = textextlabelpreamble local TeX_code_t = {} +local texboxnum = { 2047 } local function domakeTEXboxes (data) - local num = 255 -- output box + local num = texboxnum[1] + texboxnum[2] = num + local global = luamplib.globaltextext and "\\global" or "" if data and data.fig then local figures = data.fig for f=1, #figures do @@ -658,7 +661,7 @@ local function domakeTEXboxes (data) local str = prescript and prescript.MPlibmkTEXbox if str then num = num + 1 - texsprint(format("\\setbox%i\\hbox{%s}",num,str)) + texsprint(format("%s\\setbox%i\\hbox{%s}", global, num, str)) end local texcode = prescript and prescript.MPlibVerbTeX if texcode and texcode ~= "" then @@ -668,6 +671,9 @@ local function domakeTEXboxes (data) end end end + if luamplib.globaltextext then + texboxnum[1] = num + end end local function protect_tex_text_common (data) @@ -754,7 +760,7 @@ local factor = 65536*(7227/7200) local function processwithTEXboxes (data) if not data then return end - local num = 255 -- output box + local num = texboxnum[2] local prepreamble = format("TEXBOX_:=%i;\n",num) while true do num = num + 1 |