[luatex] Accessing external Lua libraries
Faheem Mitha
faheem at faheem.info
Wed Mar 24 17:52:36 CET 2021
Hi Luigi,
See below.
On Wed, 24 Mar 2021, luigi scarso wrote:
> On Wed, Mar 24, 2021 at 12:45 PM Andreas Matthias <andreas.matthias at gmail.com> wrote:
> To access external Lua libraries I have the following settings in texmf.cnf:
>
> LUAROCKS_PATH = ~/.luarocks/share/lua/5.3
> LUAROCKS_CPATH= ~/.luarocks/lib/lua/5.3
>
> LUAINPUTS = <default_path_here>//;$LUAROCKS_PATH//
> CLUAINPUTS = <default_path_here>//;$LUAROCKS_CPATH//
>
> Now I have access to files like:
>
> ~/.luarocks/share/lua/5.3/?.lua
> ~/.luarocks/lib/lua/5.3/?.so
>
> But unfortunately I do not get access to `init.lua` files, i.e.:
>
> ~/.luarocks/share/lua/5.3/?/init.lua
>
> What should I do to access these files?
>
> In addition I have a sneaking suspicion that
>
> \directlua{
> print(package.path)
> }
>
> displays the content of the environment variable $LUA_PATH, but not the
> path that is actually accessible to luatex when using kpse settings.
I'm not completely sure I understand what your issue is, but you might
find https://ctan.org/pkg/luapackageloader of interest if you aren't
familiar with it already. The strategy it uses is described somewhere in
the LuaTeX manual I think, though right now I can't remember exactly
where.
Regards, Faheem Mitha
> You can run luatex --kpathsea-debug=-1
> to check what kpse is doing.
> --
> luigi
>
>
More information about the luatex
mailing list.