[luatex] Loading of lua files/modules

Taco Hoekwater taco at elvenkind.com
Fri Jan 11 09:58:11 CET 2013


Hi,

On 01/11/2013 01:46 AM, Heiko Oberdiek wrote:
>
> For now I would like to fix the issue in oberdiek.luatex.lua.
> It is enough to replace the line by the following code?
>
>    if package.searchers then
>      table.insert(package.searchers, kpse_module_loader)
>    else
>      table.insert(package.loaders, kpse_module_loader)
>    end

Sure.

> Are there better ways or something else need to be done?

Hans has:

if not package.loaders then
     package.loaders = package.searchers
end

which is a little different but works just as well.

> For later I want to fix the loading of lua files/modules
> in my packages (currently the lua files are duplicated
> with different names).
>    What is the recommended way to load lua files/modules
> without unnecessary name clashes?

kpathsea can find .lua files within TEXMF (via the LUAINPUTS
variable), so that should be fine. But I doubt kpathsea is
able to find lua files using lua sub-module notation. OTOH,
even if it does not work right now, support for that should be
fairly simple to program with some extra code in kpse_module_loader.

Best wishes,
Taco



More information about the luatex mailing list