[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are three different builtin conditionals in T4.
The first is \ifelse
. It takes four arguments:
\ifelse{string-1}{string-2}{then}{else} |
If string-1 and string-2 are equal (character for character), it expands to then, otherwise it expands to else.
\ifelsex{string-1}{string-2}{then}{else} |
Unlike \ifelse
is not to expand string-1 even when it is a
macro, \ifelsex
first expands string-1, and then tests
with string-2.
\ifdef{macro-name}{then}{else} |
It checks whether there is a macro named macro-name, if so, it expands to then, otherwise it expands to else.