Dear Lua Gurus, what's the preferred way of including files in Lua? When trying my module on a different machine I noticed that it fails because Lua's dofile() does not extend to files in the texmf tree. Thus I attempted to include the file with context.ctxlualoadfile() but it doesn't work either. Have a relaxed weekend, Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
Am 13.03.10 15:54, schrieb Philipp Gesang:
Dear Lua Gurus,
what's the preferred way of including files in Lua?
When trying my module on a different machine I noticed that it fails because Lua's dofile() does not extend to files in the texmf tree. Thus I attempted to include the file with context.ctxlualoadfile() but it doesn't work either.
environment.loadluafile(...)? Wolfgang
On 2010-03-13 <17:24:27>, Wolfgang Schuster wrote:
Am 13.03.10 15:54, schrieb Philipp Gesang:
Dear Lua Gurus,
what's the preferred way of including files in Lua?
When trying my module on a different machine I noticed that it fails because Lua's dofile() does not extend to files in the texmf tree. Thus I attempted to include the file with context.ctxlualoadfile() but it doesn't work either. environment.loadluafile(...)? What a relief, finally I managed it: could somebody with access to the context source please add a note luat-env.lua, that filenames passed to environment.loadluafile() must have their .lua suffix stripped? This might save somebody a minor headache someday.
Thanks for the help, Philipp
Wolfgang
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
On 13-3-2010 17:24, Wolfgang Schuster wrote:
Am 13.03.10 15:54, schrieb Philipp Gesang:
Dear Lua Gurus,
what's the preferred way of including files in Lua?
When trying my module on a different machine I noticed that it fails because Lua's dofile() does not extend to files in the texmf tree. Thus I attempted to include the file with context.ctxlualoadfile() but it doesn't work either. environment.loadluafile(...)?
or require "whatever.lua" ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Philipp Gesang
-
Wolfgang Schuster