[NTG-context] \doif... and Lua

Procházka Lukáš Ing. - Pontex s. r. o. LPr at pontex.cz
Fri Mar 25 13:04:33 CET 2011


is it possible to use a block of context code depending on a value of a Lua variable?

I tried something like:

   \directlua{test = true}
   %\directlua{test = 5}
   %\directlua{test = "a"}

   \doifempty{\directlua{return test}}

But this gives me always "No".

- I'm not sure if this is a good way, and whether attempt to use \doif(...) macro is a good idea at all.

Any (better) solution?

Best regards,


Ing. Lukáš Procházka [mailto:LPr at pontex.cz]
Pontex s. r. o.      [mailto:pontex at pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

More information about the ntg-context mailing list