[NTG-context] Finding lua file for module using \registerctxluafile

Stanislav Sokolenko stanislav at sokolenko.net
Wed Jul 18 19:07:27 CEST 2018


Dear list,

I've recently written a small module p-mymod.tex which uses lua code in 
p-mymod.lua. In order to load this lua code, I use 
\registerctxluafile{p-mymod}{1.001} (copying the example of 
m-database.mkiv). However, it seems like the search path for lua files 
isn't the same as for context module files.

When a context file that uses p-mymod through \usemodule[mymod] is 
placed in a subdirectory, it finds p-mymod, but not the lua portion:

p-mymod.tex
p-mymod.lua
subdir/test.tex

Placing the lua file inside the subdirectory resolves this problem:

p-mymod.tex
subdir/p-mymod.lua
subdir/test.tex

What is the suggested method to change the lua search path? Ideally, I'd 
like to avoid placing the files in 
$TEXMF/tex/context/third/<modulename>/<files> as this module is quite 
intimately tied to the specific project and it doesn't make much sense 
to separate the files too much.

Thanks,

Stan





More information about the ntg-context mailing list