[Dev-luatex] dofile, require and kpathsea

Jonathan Sauer Jonathan.Sauer at silverstroke.com
Tue Aug 21 09:55:46 CEST 2007


Hello,

during the weekend, I wrote a little bit of code using external
Lua files (since \directlua requires matching braces in the
Lua code). I loaded this code using dofile or require.

This worked perfectly when the .lua file was in the same
directory as the .tex file, otherwise it was not found
(even though kpsewhich could find it).

I know that Lua's require uses its own search path, and I
assume from my results that LuaTeX does not change this
behaviour to use kpathsea.

I now wonder if there are plans to change that. IMO this
should be done, since LuaTeX embeds Lua in a very specific
environment which searches for files using kpathsea, not
a simple path set as an environment variable.

What do you think?


Jonathan



More information about the dev-luatex mailing list