Difference between revisions of "Command/doif..."
< Command
Jump to navigation
Jump to search
(Add doifdocumentargument) |
|||
Line 13: | Line 13: | ||
* <tt>\doifrightpageelse</tt> (precede by {{cmd|signalrightpage}}) | * <tt>\doifrightpageelse</tt> (precede by {{cmd|signalrightpage}}) | ||
* {{cmd|doifdocumentargument}} | * {{cmd|doifdocumentargument}} | ||
+ | * <tt>{{cmd|doifelseindented}}</tt> (LMTX only) | ||
== Example == | == Example == |
Revision as of 19:20, 12 June 2020
\doif...
- \doifnextcharelse
- \doifundefined, \doifdefined, etc.
- \doif, \doifnot, \doifelse
- \doifempty, \doifnotempty, \doifemptyelse
- \doifinset, \doifnotinset, \doifnotinsetelse
- \doifcommon, \doifnotcommon, \doifcommonelse
- \doifsamestringselse,\doifsamestring,\doifnotsamestring
- \doifinstringelse,\doifincsnameelse
- \doifnumberelse
- \doifassignmentelse
- \doifrightpageelse (precede by \signalrightpage)
- \doifdocumentargument
- \doifelseindented (LMTX only)
Example
We can also write tests using Lua. (Example by WS, 3/2011.)
\starttext \ctxlua{test = true} Test is \ctxlua{commands.doifelse(test)}{True}{False}. \ctxlua{test = false} Test is \ctxlua{commands.doifelse(test)}{True}{False}. \stoptext
See also
Help from ConTeXt-Mailinglist/Forum
All issues with: