[luatex] Accessing external Lua libraries

Andreas Matthias andreas.matthias at gmail.com
Wed Mar 24 22:31:27 CET 2021

On Wed, Mar 24, 2021 at 9:33 PM Michal Vlasák <lahcim8 at gmail.com> wrote:
> Andreas, what Faheem suggests should work for you: use luapackage and
> set package.path/packge.cpath to what you want. You should see section
> 6.3 "Modules" of https://www.lua.org/manual/5.3/manual.html and also the
> source code of luapackageloader (luapackageloader.lua) to understand how
> this works. Also you may have to disable some security precautions
> (--shell-escape and no --safer).

Oh, this is embarrassing... You are right. It's actually working with
I just forgot to use --shell-escape.

To sum up (and I hope this is correct): Setting LUAINPUTS and CLUAINPUTS in
texmf.cnf is not enough to load _all_ kind of modules/libraries. It
suffice to load
files like 'foobar.lua' or 'foobar.so'. But to load files like
'foobar/init.lua' one needs


More information about the luatex mailing list.