[luatex] pathutl library in luatex
luigi scarso
luigi.scarso at gmail.com
Sun Jan 19 15:43:06 CET 2025
On Sun, 19 Jan 2025 at 15:24, Lukas Heindl via luatex <luatex at tug.org>
wrote:
> Hi,
>
> I'm currently working on an extraction script for the memoize package
> written in (tex)lua (see [1]).
> As I also worked on cluttex (a build system similar to latexmk, see[2],
> now working on the fork cluttealtex), I discovered there are some
> issues/functions that frequently come up, particularly regarding
> files/paths. Generally this is a common scheme with lua where the
> standard-library is quite small. Luatex already includes some libraries
> used for common tasks, like lfs/luafilesystem or md5. Looking for more
> information on already in luatex included lua libraries, I came across [3]
> which lists a library with functions like joinpath, replacesuffix or
> basename. Running the script [4] that generated this list, I can't find
> such functions in my environment.
>
> Does a pathlib library (handling all the quirks with different
> path-seperators etc) already exist in luatex (and I'm just not able to find
> a reference on it)?
> And if not are there any plans to write and include such a library?
>
> I see also some lua projects in the luatex context, like l3build, write
> their own "libraries" [5]. But path operations are needed quite frequently
> and it doesn't make sense that each luatex package needs to write such a
> library from scratch.
>
> TL;DR
> - does a pathutil library already exist for luatex?
> - is it planned to write and include one?
> - I'd vote for such a library (could also help writing one / including one
> in luatex)
>
> Best Wishes
> Lukas
>
>
> [1]: https://github.com/atticus-sullivan/memoize/tree/feat-texlua-script
> [2]: https://ctan.org/pkg/cluttex
> [3]: https://github.com/Josef-Friedrich/LuaTeX_Lua-API
> [4]:
> https://github.com/Josef-Friedrich/LuaTeX_Lua-API?tab=readme-ov-file#zlib
> (a bit below that anchor)
> [5]:
> https://github.com/latex3/l3build/blob/main/l3build-file-functions.lua
>
>
Perhaps the author has included some modules from here (see the svn repo)
trunk/Master/texmf-dist/tex/luatex
eg those under lualibs/*
At the moment there is no plan to include any lua library in the source
code,
we rely on external lua modules.
--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20250119/dc8088fb/attachment.htm>
More information about the luatex
mailing list.