[NTG-context] Failing \doifemptyelse
Wolfgang Schuster
wolfgang.schuster.lists at gmail.com
Thu Jun 23 21:54:02 CEST 2022
Willi Egger via ntg-context schrieb am 23.06.2022 um 21:16:
> Good evening gurus!
>
> Why is the minimal example failing? i.e. executing always the else-branch?
\doifempty(else) doesn't expand the argument and any argument counts as
not empty. To satisfy the command you can expand the first argument
(\normalexpanded) or you use \doifnothing(else) which expands the argument.
\starttext
\startbuffer
\doifemptyelse{}{YES}{NO}
\doifemptyelse{\empty}{YES}{NO}
\normalexpanded{\doifemptyelse{}}{YES}{NO}
\normalexpanded{\doifemptyelse{\empty}}{YES}{NO}
\doifnothingelse{}{YES}{NO}
\doifnothingelse{\empty}{YES}{NO}
\stopbuffer
\typebuffer \getbuffer
\stoptext
Wolfgang
More information about the ntg-context
mailing list