On 28-9-2012 23:56, Andre Caldas wrote:
My mistake: I tested the code I gave you in \startluacode, but then for the e-mail I wrapped it in \cldcontext.
I had tested it using startluacode, also. :-(
These two versions both work, and I actually tested them this time:
\startluacode context(environment.runpath .. '/' .. file.pathpart(resolvers.inputstack[#resolvers.inputstack]) ) \stopluacode
I get this: ! LuaTeX error <main ctx instance>:3: attempt to get length of field 'inputstack' (a nil value)
are you sure that you use the same version? btw, keep in mind that you can never really be sure in what file you are because of (1) caching and (2) delayed expansion (e.g. macros) or (3) info can come from elsewhere Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------