diff options
author | Karl Berry <karl@freefriends.org> | 2024-03-01 21:45:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-03-01 21:45:25 +0000 |
commit | 0eaa5c8aa577036e91ec287c5797a3e96bcffb8c (patch) | |
tree | 3dfd8d61f8e75ac5f4a1495811f6e946f6ad1e88 /Master | |
parent | 268ab64930166e650aaf4c3bf3ef95198a1cfb4e (diff) |
luamplib (1mar24)
git-svn-id: svn://tug.org/texlive/trunk@70309 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/NEWS | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf | bin | 153451 -> 153704 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/luatex/luamplib/luamplib.dtx | 58 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.lua | 43 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.sty | 2 |
5 files changed, 56 insertions, 56 deletions
diff --git a/Master/texmf-dist/doc/luatex/luamplib/NEWS b/Master/texmf-dist/doc/luatex/luamplib/NEWS index d56d4df8579..3e91c9cc67b 100644 --- a/Master/texmf-dist/doc/luatex/luamplib/NEWS +++ b/Master/texmf-dist/doc/luatex/luamplib/NEWS @@ -1,5 +1,14 @@ History of the luamplib package +2024/03/01 2.26.0 + * when \mplibcachedir{<dir>} is not set, default cache directory will + be in the following order: + $TEXMFVAR/luamplib_cache + $TEXMF_OUTPUT_DIRECTORY/luamplib_cache + ./luamplib_cache + $TEXMFOUTPUT/luamplib_cache + . + 2024/01/25 2.25.3 * protect "..." even if textextlabel is disabled (revert part of v2.25.0) diff --git a/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf b/Master/texmf-dist/doc/luatex/luamplib/luamplib.pdf Binary files differindex e46210d999b..506ec49715c 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/source/luatex/luamplib/luamplib.dtx b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx index 3b6aad6e359..8bdbf884e4d 100644 --- a/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx +++ b/Master/texmf-dist/source/luatex/luamplib/luamplib.dtx @@ -85,7 +85,7 @@ See source file '\inFileName' for licencing and contact information. %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{luamplib.drv}% - [2024/01/25 v2.25.3 Interface for using the mplib library]% + [2024/03/01 v2.26.0 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{2024/01/25 v2.25.3} +% \date{2024/03/01 v2.26.0} % % \maketitle % @@ -328,8 +328,13 @@ See source file '\inFileName' for licencing and contact information. % |$TEXMFMAIN/metapost/context/base| are already registered by default. % % By default, cache files will be stored in |$TEXMFVAR/luamplib_cache| or, -% if it's not available, in the same directory as where pdf/dvi output file -% is saved. This however can be changed by the command +% if it's not available (mostly not writable), +% in the directory where output files are saved: +% to be specific, |$TEXMF_OUTPUT_DIRECTORY/luamplib_cache|, +% |./luamplib_cache|, |$TEXMFOUTPUT/luamplib_cache|, and |.| in this order. +% (|$TEXMF_OUTPUT_DIRECTORY| is normally the value of |--output-directory| +% command-line option.) +% This behavior however can be changed by the command % |\mplibcachedir{<directory path>}|, where tilde (|~|) is interpreted % as the user's home directory (on a windows machine as well). % As backslashes (|\|) should be escaped by users, it would be easier to use @@ -446,8 +451,8 @@ See source file '\inFileName' for licencing and contact information. luatexbase.provides_module { name = "luamplib", - version = "2.25.3", - date = "2024/01/25", + version = "2.26.0", + date = "2024/03/01", description = "Lua package to typeset Metapost with LuaTeX's MPLib.", } @@ -528,7 +533,7 @@ local is_writable = file.is_writable or function(name) end end end -local mk_full_path = lfs.mkdirs or function(path) +local mk_full_path = lfs.mkdirp or lfs.mkdirs or function(path) local full = "" for sub in path:gmatch("(/*[^\\/]+)") do full = full .. sub @@ -549,31 +554,24 @@ local currenttime = os.time() local outputdir if lfstouch then - local texmfvar = kpse.expand_var('$TEXMFVAR') - if texmfvar and texmfvar ~= "" and texmfvar ~= '$TEXMFVAR' then - for _,dir in next, texmfvar:explode(os.type == "windows" and ";" or ":") do - if not lfsisdir(dir) then - mk_full_path(dir) - end - if is_writable(dir) then - local cached = format("%s/luamplib_cache",dir) - lfsmkdir(cached) - outputdir = cached - break + for i,v in ipairs{'TEXMFVAR','TEXMF_OUTPUT_DIRECTORY','.','TEXMFOUTPUT'} do + local var = i == 3 and v or kpse.var_value(v) + if var and var ~= "" then + for _,vv in next, var:explode(os.type == "unix" and ":" or ";") do + local dir = format("%s/%s",vv,"luamplib_cache") + if not lfsisdir(dir) then + mk_full_path(dir) + end + if is_writable(dir) then + outputdir = dir + break + end end + if outputdir then break end end end end -if not outputdir then - outputdir = "." - for _,v in ipairs(arg) do - local t = v:match("%-output%-directory=(.+)") - if t then - outputdir = t - break - end - end -end +outputdir = outputdir or '.' function luamplib.getcachedir(dir) dir = dir:gsub("##","#") @@ -610,7 +608,7 @@ local noneedtoreplace = { ["mp-grph.mpiv"] = true, ["mp-idea.mpiv"] = true, ["mp-luas.mpiv"] = true, ["mp-mlib.mpiv"] = true, ["mp-node.mpiv"] = true, ["mp-page.mpiv"] = true, ["mp-shap.mpiv"] = true, ["mp-step.mpiv"] = true, ["mp-text.mpiv"] = true, - ["mp-tool.mpiv"] = true, + ["mp-tool.mpiv"] = true, ["mp-cont.mpiv"] = true, } luamplib.noneedtoreplace = noneedtoreplace @@ -2061,7 +2059,7 @@ luamplib.colorconverter = colorconverter \else \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luamplib} - [2024/01/25 v2.25.3 mplib package for LuaTeX] + [2024/03/01 v2.26.0 mplib package for LuaTeX] \ifx\newluafunction\@undefined \input ltluatex \fi diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua index 2654bd28e33..0d2cc763dad 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.25.3", - date = "2024/01/25", + version = "2.26.0", + date = "2024/03/01", description = "Lua package to typeset Metapost with LuaTeX's MPLib.", } @@ -71,7 +71,7 @@ local is_writable = file.is_writable or function(name) end end end -local mk_full_path = lfs.mkdirs or function(path) +local mk_full_path = lfs.mkdirp or lfs.mkdirs or function(path) local full = "" for sub in path:gmatch("(/*[^\\/]+)") do full = full .. sub @@ -86,31 +86,24 @@ local currenttime = os.time() local outputdir if lfstouch then - local texmfvar = kpse.expand_var('$TEXMFVAR') - if texmfvar and texmfvar ~= "" and texmfvar ~= '$TEXMFVAR' then - for _,dir in next, texmfvar:explode(os.type == "windows" and ";" or ":") do - if not lfsisdir(dir) then - mk_full_path(dir) - end - if is_writable(dir) then - local cached = format("%s/luamplib_cache",dir) - lfsmkdir(cached) - outputdir = cached - break + for i,v in ipairs{'TEXMFVAR','TEXMF_OUTPUT_DIRECTORY','.','TEXMFOUTPUT'} do + local var = i == 3 and v or kpse.var_value(v) + if var and var ~= "" then + for _,vv in next, var:explode(os.type == "unix" and ":" or ";") do + local dir = format("%s/%s",vv,"luamplib_cache") + if not lfsisdir(dir) then + mk_full_path(dir) + end + if is_writable(dir) then + outputdir = dir + break + end end + if outputdir then break end end end end -if not outputdir then - outputdir = "." - for _,v in ipairs(arg) do - local t = v:match("%-output%-directory=(.+)") - if t then - outputdir = t - break - end - end -end +outputdir = outputdir or '.' function luamplib.getcachedir(dir) dir = dir:gsub("##","#") @@ -143,7 +136,7 @@ local noneedtoreplace = { ["mp-grph.mpiv"] = true, ["mp-idea.mpiv"] = true, ["mp-luas.mpiv"] = true, ["mp-mlib.mpiv"] = true, ["mp-node.mpiv"] = true, ["mp-page.mpiv"] = true, ["mp-shap.mpiv"] = true, ["mp-step.mpiv"] = true, ["mp-text.mpiv"] = true, - ["mp-tool.mpiv"] = true, + ["mp-tool.mpiv"] = true, ["mp-cont.mpiv"] = true, } luamplib.noneedtoreplace = noneedtoreplace diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty index 06a8f321ef8..d2810d80e9c 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} - [2024/01/25 v2.25.3 mplib package for LuaTeX] + [2024/03/01 v2.26.0 mplib package for LuaTeX] \ifx\newluafunction\@undefined \input ltluatex \fi |