The following commands deal with the declaration and handling of options to document classes and packages. Every option name must be a `LATEX name'.
There are some commands designed especially for use within the <code> argument of these commands (see below).
\DeclareOption
{<option-name>} {<code>}
This makes <option-name> a `declared option' of the class or package in which it is put.
The <code> argument contains the code to be executed if that option is specified for the class or package; it can contain any valid LATEX2e construct.
Example:
\DeclareOption{twoside}{\@twosidetrue}
\DeclareOption*
{<code>}
This declares the <code> to be executed for every option which is specified for, but otherwise not explicitly declared by, the class or package; this code is called the `default option code' and it can contain any valid LATEX2e construct.
If a class file contains no \DeclareOption*
then, by default, all
specified but undeclared options for that class will be silently
passed to all packages (as will the specified and declared options for
that class).
If a package file contains no \DeclareOption*
then, by default, each
specified but undeclared option for that package will produce an error.