[luatex] Loading of lua files/modules (was: Luatex 0.74.0 announcement)

Heiko Oberdiek heiko.oberdiek at googlemail.com
Fri Jan 11 01:46:52 CET 2013


On Thu, Jan 03, 2013 at 10:18:15AM +0100, Herbert Voss wrote:

> Am 03.01.2013 09:50, schrieb Taco Hoekwater:
> >On 01/02/2013 07:53 PM, Herbert Voss wrote:
> >>Am 02.01.2013 19:41, schrieb Herbert Voss:
> >>
> >>>there will be a problem with Heikos Package which is called
> >>>by unicode-math
> >>
> >>it looks like a problem with the missing require('...');
> >>lines, as mentioned in Tacos announcement.
> >
> >No, the problem is this line:
> >
> >     table.insert(package.loaders, kpse_module_loader)
> >
> >package.loaders does not exist any more in lua52.
> Oh, I love renaming of functions ...
> Using
>       table.insert(package.searchers, kpse_module_loader)

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)
    table.insert(package.loaders, kpse_module_loader)

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

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?
* I do not want to put the Lua code in TeX files using
  \directlua, adding an unnecessary TeX interpretation
* And I prefer having a hierarchy, for example:
  instead of a flat file/module structure with ackward
  long names
What is the state of the art?

Yours sincerely
  Heiko Oberdiek

More information about the luatex mailing list