diff options
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/NEWS | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf | bin | 159306 -> 160247 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex | 16 | ||||
-rw-r--r-- | Master/texmf-dist/source/luatex/luamplib/luamplib.dtx | 56 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.lua | 16 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.sty | 12 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-langarabic.tlpsrc | 1 |
9 files changed, 97 insertions, 26 deletions
diff --git a/Master/texmf-dist/doc/luatex/luamplib/NEWS b/Master/texmf-dist/doc/luatex/luamplib/NEWS index 4df1e017121..bb0748f463d 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/NEWS +++ b/Master/texmf-dist/doc/luatex/luamplib/NEWS @@ -1,5 +1,10 @@ History of the luamplib package +2017/06/02 2.12.1 + * when \mplibglobaltextext{enable} is declared, metapost variables + containing btex ... etex labels can be inherited across code chunks. + Of course, \mplibcodeinherit should also be switched on. + 2016/03/31 2.11.3 * fix a bug regarding nested mplibcode environments (issue #63) diff --git a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf Binary files differindex 737c4fc9b10..63d5616d1e4 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf +++ b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf diff --git a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex index 016ac80c846..a500e2181dd 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex +++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-latex.tex @@ -62,7 +62,21 @@ for i = 1 upto 3: endfor; endfig; \end{mplibcode}% -B\par +B\par\leavevmode +\mplibcodeinherit{enable}% +\mplibglobaltextext{enable}% +\everymplib{ beginfig(0);}\everyendmplib{ endfig;}% +\begin{mplibcode} + label(btex $\sqrt{2}$ etex, origin); + draw fullcircle scaled 20; + picture pic; pic := currentpicture; +\end{mplibcode}% +\begin{mplibcode} + currentpicture := pic scaled 2; +\end{mplibcode}% +\everymplib{}\everyendmplib{}% +\mplibcodeinherit{disable}% +\mplibglobaltextext{disable}\par \mplibsetformat{metafun}% \begin{mplibcode} verbatimtex \moveright 0.4\hsize etex diff --git a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex index 1a76f1e857f..d7a8ed90bcc 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex +++ b/Master/texmf-dist/doc/luatex/luamplib/test-luamplib-plain.tex @@ -60,7 +60,21 @@ for i = 1 upto 3: endfor; endfig; \endmplibcode -B\par +B\par\leavevmode +\mplibcodeinherit{enable}% +\mplibglobaltextext{enable}% +\everymplib{ beginfig(0);}\everyendmplib{ endfig;}% +\mplibcode + label(btex $\sqrt{2}$ etex, origin); + draw fullcircle scaled 20; + picture pic; pic := currentpicture; +\endmplibcode +\mplibcode + currentpicture := pic scaled 2; +\endmplibcode +\everymplib{}\everyendmplib{}% +\mplibcodeinherit{disable}% +\mplibglobaltextext{disable}\par \mplibsetformat{metafun}% \mplibcode verbatimtex \moveright 0.4\hsize etex diff --git a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx index 3b03b6935fe..b044a7f6c0a 100644 --- a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx +++ b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment -- by the way, this file contains UTF-8 % -% Copyright (C) 2008-2016 by Hans Hagen, Taco Hoekwater, Elie Roux, +% Copyright (C) 2008-2017 by Hans Hagen, Taco Hoekwater, Elie Roux, % Manuel Pégourié-Gonnard, Philipp Gesang and Kim Dohyun. % Currently maintained by the LuaLaTeX development team. % Support: <lualatex-dev@tug.org> @@ -85,7 +85,7 @@ See source file '\inFileName' for licencing and contact information. %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{luamplib.drv}% - [2016/03/31 v2.11.3 Interface for using the mplib library]% + [2017/06/02 v2.12.1 Interface for using the mplib library]% \documentclass{ltxdoc} \usepackage{metalogo,multicol,mdwlist,fancyvrb,xspace} \usepackage[x11names]{xcolor} @@ -153,7 +153,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{2016/03/31 v2.11.3} +% \date{2017/06/02 v2.12.1} % % \maketitle % @@ -310,21 +310,25 @@ See source file '\inFileName' for licencing and contact information. % each code chunks being treated as an independent instance, and never % affected by previous code chunks. % -% \textsc{n.b.} It does not work to pass across code chunks those variables -% containing |btex ... etex| pictures, as these are not METAPOST, but \TeX\ -% elements from the standpoint of \textsf{luamplib}. Likewise, |graph.mp| -% does not work properly with the inheritance functionality. +% \textsc{n.b.} +% To inherit |btex ... etex| labels as well as metapost variables, +% it is necessary to declare \cs{mplibglobaltextext\{enable\}} in advance. +% On this case, be careful that normal \TeX\ boxes can conflict with +% |btex ... etex| boxes, though this would occur very rarely. +% Notwithstanding the danger, it is a `must' option to activate +% \cs{mplibglobaltextext} if you want to use |graph.mp| +% with \cs{mplibcodeinherit} functionality. % \begin{verbatim} % \mplibcodeinherit{enable} +% \mplibglobaltextext{enable} % \everymplib{ beginfig(0);} \everyendmplib{ endfig;} -% A circle % \mplibcode -% u := 10; -% draw fullcircle scaled u; +% label(btex $\sqrt{2}$ etex, origin); +% draw fullcircle scaled 20; +% picture pic; pic := currentpicture; % \endmplibcode -% and twice the size % \mplibcode -% draw fullcircle scaled 2u; +% currentpicture := pic scaled 2; % \endmplibcode % \end{verbatim} % \item Starting with v2.11, users can issue |\mplibverbatim{enable}|, after which @@ -369,8 +373,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.", } @@ -1069,9 +1073,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 @@ -1086,7 +1093,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 % \end{macrocode} % |verbatimtex ... etex| before |beginfig()| is not ignored, @@ -1100,6 +1107,9 @@ local function domakeTEXboxes (data) end end end + if luamplib.globaltextext then + texboxnum[1] = num + end end local function protect_tex_text_common (data) @@ -1189,7 +1199,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 @@ -1708,7 +1718,7 @@ luamplib.colorconverter = colorconverter \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 @@ -1939,6 +1949,16 @@ luamplib.colorconverter = colorconverter \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 +} % \end{macrocode} % % We use a dedicated scratchbox. 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 diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index f96040cb3a6..0654343f00d 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -2970,6 +2970,7 @@ $standardclean = '\.head|\.tmp|\.dvi|\.log|\.out|\.aux|\.toc|\.lof|\.lot' # that the files were removed. These are checked after runins. %moreclean = ( 'akktex' => 'still to do', + 'alkalami' => 'Alkalami-.*pdf', # InDesign source 'ametsoc' => '.*\.pdf', # no source 'ascii-font' => '.*\.pdf', # no source 'bbcard' => 'bbcard.tpm', # old TL infra diff --git a/Master/tlpkg/tlpsrc/collection-langarabic.tlpsrc b/Master/tlpkg/tlpsrc/collection-langarabic.tlpsrc index 6d6330ac3ae..c2461b72655 100644 --- a/Master/tlpkg/tlpsrc/collection-langarabic.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-langarabic.tlpsrc @@ -4,6 +4,7 @@ longdesc Support for Arabic and Persian. # depend collection-basic # +depend alkalami depend amiri depend arabi depend arabi-add |