diff options
author | Norbert Preining <norbert@preining.info> | 2024-03-02 03:04:21 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-03-02 03:04:21 +0000 |
commit | b7323fe884f378851ee661babaa5bd644271f348 (patch) | |
tree | 8891732393826e5c5893d00fa39cf9a5eb0a3a90 /macros/luatex/generic/luamplib | |
parent | 19a826b6e3a0d2ea6bbd1bf733a8e590463275ed (diff) |
CTAN sync 202403020304
Diffstat (limited to 'macros/luatex/generic/luamplib')
-rw-r--r-- | macros/luatex/generic/luamplib/NEWS | 9 | ||||
-rw-r--r-- | macros/luatex/generic/luamplib/luamplib.dtx | 58 | ||||
-rw-r--r-- | macros/luatex/generic/luamplib/luamplib.pdf | bin | 153451 -> 153704 bytes |
3 files changed, 37 insertions, 30 deletions
diff --git a/macros/luatex/generic/luamplib/NEWS b/macros/luatex/generic/luamplib/NEWS index d56d4df857..3e91c9cc67 100644 --- a/macros/luatex/generic/luamplib/NEWS +++ b/macros/luatex/generic/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/macros/luatex/generic/luamplib/luamplib.dtx b/macros/luatex/generic/luamplib/luamplib.dtx index 3b6aad6e35..8bdbf884e4 100644 --- a/macros/luatex/generic/luamplib/luamplib.dtx +++ b/macros/luatex/generic/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/macros/luatex/generic/luamplib/luamplib.pdf b/macros/luatex/generic/luamplib/luamplib.pdf Binary files differindex e46210d999..506ec49715 100644 --- a/macros/luatex/generic/luamplib/luamplib.pdf +++ b/macros/luatex/generic/luamplib/luamplib.pdf |