I am using the astronomy and astrophysics class aa.cls. I use it with either of the two options: structabstract or referee.

The first produces 2-column text, the second one-column text.

I have some figures that change appearance when I switch options.

I would like to know if it is possible to do something like this:

IF (optional argument equals structabstract) THEN

 {...commands to have the figure of a certain size}

ELSE (if optional argument equals)

 {...commands to have the figure of another size}


Could you help me please?


The referee option in your class is set up as


So you can test is with

  \if@referee TRUE CODE \else FALSE CODE \fi

structabstract is set up as


So you could use \if@oldversion ...\else ...\fi. The options oldversion and traditabstract change this switch too. I didn't check the default of the switches.


I prefer an alternate method that I have been using and is adapted from this answer to setting class options after documentclass, which has a few advantages:

  • does not rely on the internals of the class, so will work with any document class
  • allows you to change the options on the command line via latex '\def\MyClassOptions{referee}\input{doc}'


\expandafter\ifx\csname MyClassOptions\endcsname\relax
        DRAFT option was used.%
        DRAFT option was not used.%
  • This is suited to personal use only. Please don't create a package for users in this way. – Ahmed Musa Mar 11 '12 at 2:42
  • @AhmedMusa: I don't see anything in the question indicating that the question is for creating a package. – Peter Grill Mar 11 '12 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.