[NTG-context] Using Lua files in project structure
Thomas A. Schmitz
thomas.schmitz at uni-bonn.de
Sun Apr 5 15:10:02 CEST 2020
On 05.04.20 15:00, Jairo A. del Rio wrote:
> I'm writing a project in ConTeXt MKIV and I want to load some (pure) Lua
> libraries and bindings (defining \ctxlua and the like). For instance, I
> have the file foo.lua with some macros and I want to use them in my
> project. Something like this:
>
> \startproject project
> %\component foo.lua %This does not work
> %\environment foo.lua %This does not work
> %\input foo.lua %This does not work
> %\directlua{dofile("foo.lua")} %This does not work even when the project
> file and foo.lua are in the same folder.
> \stopproject
>
> What should I do? Thank you in advance.
Have you tried
\registerctxluafile{foo}{} ?
That's the way context loads its lua files.
Thomas
More information about the ntg-context
mailing list