[luatex] [EXT] Re: Accessing external Lua libraries

Andreas Matthias andreas.matthias at gmail.com
Wed Mar 24 23:22:52 CET 2021


On Wed, Mar 24, 2021 at 10:50 PM Philip Taylor <P.Taylor at rhul.ac.uk> wrote:
>
> Andreas Matthias wrote:
>
> Setting LUAINPUTS and CLUAINPUTS in texmf.cnf is not enough
> to load _all_ kind of modules/libraries. It suffice[s] to
> load files like 'foobar.lua' or 'foobar.so'. But to load files
> like 'foobar/init.lua' one needs luapackageloader.
>
> For the benefit of those (such as myself) who are less familiar with Lua conventions than yourself, Andreas, could you explain which of the two possible criteria is the crucial one ?  Is it (a) that the file lives in a sub-directory such as "foobar", or (b) that the file is called "init.lua" and not (e.g.,) "foobar.lua" ?  Or I suppose (c), both of the preceding.

I think both are common. At least both are mentioned in

   Programming in Lua (3. edition)
   §15.4 Submodules and Packages

I don't know why kpathsea doesn't handle both. Hmm... maybe:
This section didn't exist in the first edition of the book. Don't
know about the second. Maybe the adjustments for lua in kpathsea
date back earlier?

Andreas



More information about the luatex mailing list.