diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-06 21:48:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-06 21:48:32 +0000 |
commit | b2a99323e6605b0822417671e97c8f5ba8ca845a (patch) | |
tree | 8b75ba8bdb36b1ae755f5b9e756cf284e4bbd27b /Master/texmf-dist/tex/luatex | |
parent | b9a2d960ad053d5f69cd566296f5573f8f554380 (diff) |
luamplib (6jun17)
git-svn-id: svn://tug.org/texlive/trunk@44496 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.lua | 16 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.sty | 12 |
2 files changed, 22 insertions, 6 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 diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty index e9eb69dbd00..be9b9507ee9 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} - [2016/03/31 v2.11.3 mplib package for LuaTeX] + [2017/06/02 v2.12.1 mplib package for LuaTeX] \ifx\newluafunction\@undefined \input ltluatex \fi @@ -197,6 +197,16 @@ \fi \endgroup } +\def\mplibglobaltextext#1{% + \begingroup + \def\tempa{enable}\def\tempb{#1}% + \ifx\tempa\tempb + \directlua{luamplib.globaltextext = true}% + \else + \directlua{luamplib.globaltextext = false}% + \fi + \endgroup +} \ifx\mplibscratchbox\undefined \newbox\mplibscratchbox \fi \def\mplibstarttoPDF#1#2#3#4{% \hbox\bgroup |