[luatex] require and load_Lua

Hans Hagen pragma at wxs.nl
Tue Mar 24 23:10:48 CET 2009


Manuel Pégourié-Gonnard wrote:
> Hi,
> 
> I apologize in advance if this is an FAQ, but I couldn't find any reference in
> the manual nor using google.
> 
> Did you ever consider changing package.loaders so that the function looking for
> lua modules uses something like kpse.find_file(name, 'lua') in order to find the
> file rather that searching it along package.path?

you can just do that yourself as any function can be redefined, so you 
can overload the loader or add an extra loader ...

package.loaders[#package.loaders+1] = function(name)
   -- return location of name depending on your preferences
end


> Or is something like this already done, and I missed it? Or do you think it
> belongs to the macro packages, not in the engine?

indeed, it's a macro package issue as each package might have its own 
strategy

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list