On Thu, Mar 26, 2026 at 01:25:27PM +0100, Torsten Schnitter wrote:
> Is it possible to build an if/else block within tex code and check on
> special content of a variable so you can do different things depending on
> the content of the variable?
> All I could find so far is just to check if the variable is not empty
> (\edef\tmp{\the\copyrights}\ifx\tmp\empty\else...\fi).

Sounds like you want `\if`:

https://en.wikibooks.org/wiki/TeX/if

> \def\thcontentA{a}
> \def\thcontentB{b}
> ...
> % if content is "a":
> \ifx\thvariable\thcontentA .... \fi
> % if content is "b":
> \ifx\thvariable\thcontentB .... \fi

Untested, but I think you can just replace `\ifx` with `\if` in the
above and it'll work.

Cheers,
    Olly
_______________________________________________
Therion mailing list
[email protected]
https://mailman.speleo.sk/listinfo/therion

Reply via email to