Am 15.01.2011 um 23:57 schrieb Aditya Mahajan:

> What is the best way to define the equivalent of
> 
>    \setvalue{\e!start\NAME}{...}
> 
> in lua.
> 
>    e_start = ??
>    context.setvalue(e_start .. name, "...")

\startluacode
context.setvalue("foo","\\framedtext")
context.setvalue(table.concat({"start","foo"}),"\\startframedtext")
context.setvalue(table.concat({"stop" ,"foo"}),"\\stopframedtext" )
\stopluacode

\starttext
\foo{foo}
\startfoo bar\stopfoo
\stoptext

You can also write “context.setvalue("start".."foo","…")” but table.concat
looks better but the question is why don’t you use just tex
to create the start/stop commands.

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
___________________________________________________________________________________

Reply via email to