[NTG-context] Working with variables in Lua(TeX)

Taco Hoekwater taco at elvenkind.com
Fri Mar 19 14:57:31 CET 2010


Jaroslav Hajtmar wrote:
> Hello,
> I am sorry, I am novice in this maillist and in Lua(TeX) too. I dont 
> know if my problem isn't off topic.
> My inquiry is here: Is it make possible with variables in Lua(TeX) do 
> for similar "hara-kiri" like in Perl or PHP by this example?:
> 
> $a="b";
> $$a="456";
> print $b; # result 456

There is no symbol dereferencing in lua. This is a good thing(tm),
in my opinion. If you want trickery like this, you have to resort
to loadstring (which is the lua equivalent of eval)

Best wishes,
Taco


More information about the ntg-context mailing list