Next / Previous / Contents / NM Tech homepage

7. Options to this package

There is one option to the \usepackage{nmtthesis2015} command. The [double] option sets up double-spacing for the body of the document; the default is single-spacing, which has been the requirement for the final copy since December 2013.

We use the boolean switch double@option to record whether the input requests this option. It is initially false. Booleans are a feature of the ifthen package.

The \DeclareOption command sets that boolean to true if the [double] option is present. The \ExecuteOptions command specifies which options are default (none are). Then the \ProcessOptions command processes the options.

nmtthesis2015.sty
%================================================================
% Options to this package:
%   [double]   Request double-spacing.
%----------------------------------------------------------------
\newboolean{double@option}%
\setboolean{double@option}{false}%
\DeclareOption{double}%
{% [double] option asserted
  \setboolean{double@option}{true}%
}% [double] option asserted
\DeclareOption{single}%
{% [single] option asserted
  \setboolean{double@option}{false}%
}% [single] option asserted
\ExecuteOptions{single}%
\ProcessOptions