Joey McCollum via ntg-context schrieb am 09.12.2021 um 15:08:
I believe \orelse might be what you want. It works with most \if... macros, and it avoids nesting of \doifelse constructs. Here's an example, which I use in conditionally removing preceding punctuation if any other keys are defined before a specific one in an assignment:
``` % If any of the preceding keys was specified, then replace any preceding punctuation with a space % and typeset the number with its CSL abbreviation, followed by a comma \ifdefined\btxsbllocvol \removeunwantedspaces\removepunctuation\btxspace \orelse\ifdefined\btxsbllocno \removeunwantedspaces\removepunctuation\btxspace \fi \orelse\ifdefined\btxsbllocpt [...] \fi ```
The \fi at the end of each \orelse branch is wrong. \ifdefined\btxsbllocvol ... \orelse\ifdefined\btxsbllocno ... \else ... \fi Wolfgang