I'm trying to tweak some .cls
to fit my needs, and I'd really appreciate it if someone could explain me these statements:
\if@radseminar%
...
\else
...
\fi
If I understand correctly, it will match @radseminartrue
, right? How can I use OR statement? For example, I tried
\if{@radtehnicka% or @radseminar%}
but it didn't match either.
Best Answer
There is no macro
\if@
… the macro you’re seeing is called\if@radseminar
(yes, the@
and all that follows is part of the macro name).TeX doesn’t know boolean evaluation. You cannot just join several conditions together like in other programming languages. You need to test the conditions separately by nesting them:
However, there are LaTeX packages to allow this, e.g.
etoolbox
orifthen
(the latter shouldn’t be used any more I’ve been told).Using
etoolbox
, it should look approximately like this: