Command/doif...

From Wiki
< Command
Revision as of 09:29, 31 March 2011 by LuP (talk | contribs)
Jump to navigation Jump to search

See branches and decisions

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