<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//en">

<!–Converted with LaTeX2HTML 2022 (Released January 1, 2022) –> <HTML lang="en"> <HEAD> <TITLE>Contents of Option declaration</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0"> <META NAME="Generator" CONTENT="LaTeX2HTML v2022">

<LINK REL="STYLESHEET" HREF="clsguide.css">

<LINK REL="next" HREF="node33_mn.html"> <LINK REL="previous" HREF="node31_mn.html"> <LINK REL="up" HREF="node29_mn.html"> <LINK REL="next" HREF="node33_mn.html"> </HEAD>

<BODY bgcolor="#ffffff" text="#000000" link="#9944EE" vlink="#0000ff" alink="#00ff00">

<H2><A ID="SECTION00353000000000000000"></A> <A ID="Sec:commands.options.dec"></A> <BR> Option declaration </H2>

<P> The following commands deal with the declaration and handling of options to document classes and packages.

<P> There are some commands designed especially for use within the code argument of these commands (see below).

<P> <BR> <IMG STYLE="" SRC="img6.png" ALT="
\begin{decl}
\vert\DeclareOption\vert \arg{option-name} \arg{code}
\end{decl}
"> <BR> This makes option-name a `declared option' of the class or package in which it is put.

<P> The code argument contains the code to be executed if that option is specified for the class or package; it can contain any valid L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X2<SUB>e</SUB> construct.

<P> Example: <PRE> twosidetwosidetrue </PRE>

<P> <BR> <IMG STYLE="" SRC="img7.png" ALT="
\begin{decl}
\vert\DeclareOption*\vert \arg{code}
\end{decl}
"> <BR> 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 L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X2<SUB>e</SUB> construct.

<P> If a class file contains no || 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).

<P> If a package file contains no || then, by default, each specified but undeclared option for that package will produce an error.

<P>

<HR>

</BODY> </HTML>