Difference between revisions of "Command/doif..."
< Command
Jump to navigation
Jump to search
m (internal link instead of external one) |
m |
||
Line 3: | Line 3: | ||
Block of code depending on a Lua value - example (by WS, 3/2011): | Block of code depending on a Lua value - example (by WS, 3/2011): | ||
− | < | + | <context source="yes" text="Gives:"> |
\starttext | \starttext | ||
\ctxlua{test = true} | \ctxlua{test = true} | ||
Line 13: | Line 13: | ||
Test is \ctxlua{commands.testcase(test)}{True}{False}. | Test is \ctxlua{commands.testcase(test)}{True}{False}. | ||
\stoptext | \stoptext | ||
− | </ | + | </context> |
== See also == | == See also == |
Revision as of 09:49, 4 May 2012
\doif...
Block of code depending on a Lua value - example (by WS, 3/2011):
\starttext \ctxlua{test = true} Test is \ctxlua{commands.testcase(test)}{True}{False}. \ctxlua{test = false} Test is \ctxlua{commands.testcase(test)}{True}{False}. \stoptext
Gives:
See also
Help from ConTeXt-Mailinglist/Forum
All issues with: