I know that there are lots of similar question, but none of those have helped me so far – and I did google a lot. So my question is: I have a document class (emulateapj
) which accepts a few options.
In my document, I want to have a conditional test which checks if some option (for example onecolumn
) is set, and if so, to do a few things like changing font size or line separation.
Something like
\IfSubStr{@classoptionslist}{onecolumn}{true}{false}%
Just gives me always false.
Best Answer
The kernel provides
\@ifclasswith
:The output on the terminal is
The
\@ifclasswith
command is only available before\begin{document}
, so if you want to set up your own conditional you have to do it in the preamble: