Hi André,
Hans is right, it's a version problem.
You're using 2012.05.30 11:26 (from May)
I'm using 2012.09.25 21:44.
resolvers.inputstack is defined in my tex-data.lua.
I looked up your version among the commits on
http://repo.or.cz/w/context.git/shortlog,
and found that resolvers.inputstack is not yet defined in your data-tex.lua.
http://repo.or.cz/w/context.git/blob/ad5540007a2ac6504a47289ace109a76ec759a7...
So, you'll need to update I think. Which is a bit more work than usual
because minimals.contextgarden.net is down, but Johan Sandblom's
explains quite nicely what to do.
http://thread.gmane.org/gmane.comp.tex.context/78441/focus=78486
Cheers,
Sietse
On Fri, Sep 28, 2012 at 11:56 PM, Andre Caldas
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) stack traceback: <main ctx instance>:3: in main chunk.
system > tex > error on line 7 in file products/topologia_geral.tex: LuaTeX error ... [...] } )ted text> ...resolvers.inputstack])
\luat_start_lua_code_indeed ...ua \zerocount {#1}}
l.7 \stopluacode
\cldcontext{ environment.runpath .. '/' .. file.pathpart(resolvers.inputstack[table.getn(resolvers.inputstack)]) }
And this: ! LuaTeX error <main ctx instance>:1: bad argument #1 to 'getn' (table expected, got nil) stack traceback: [C]: in function 'getn' <main ctx instance>:1: in main chunk.
system > tex > error on line 6 in file products/topologia_geral.tex: LuaTeX error ...
[...]
\cldcontext ...\directlua \zerocount {context(#1)}
l.6 }
Sorry about that mistake.
No need to apologize! :-) It seems that resolvers.inputstack is not defined in my system. Where is it defined in yours? file-res.lua?
Thank you very very much, :-) André Caldas. ___________________________________________________________________________________ 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 ___________________________________________________________________________________