[Dev-luatex] [luatex] lua module search behaviour

Taco Hoekwater taco at elvenkind.com
Sat Apr 13 14:38:59 CEST 2013

On 04/13/2013 12:56 PM, Élie Roux wrote:
>> Yes. But package.searchers[2] is quite trivial. In lua code, it would
>> look like this:
>> function search (name)
>> altname = string.gsub(file,'.','/')
>> filename = kpse.find_file(altname, 'lua')
>> if not filename then
>> filename = kpse.find_file(name, 'lua')
>> end
>> if not filename then
>> return string.format("[kpse lua searcher] file not found: %s", name)
>> else
>> return loadfile(filename)
>> end
>> end
> Ok, I see. Just out of curiosity, what would the package.searchers[3]
> look like? Well, a pointer to the source file would be enough (I have to
> say I'm a bit lost in LuaTeX sources)...


Best wishes,

More information about the dev-luatex mailing list