> 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
___________________________________________________________________________________

Reply via email to