%
% Options
%
\RequirePackage{etoolbox}
%************************************%
\usepackage{ifthen}
% Paper size
% Allows to use A4 or Letter paper sizes.
\newboolean{paperafour}
\newboolean{paperletter}
\DeclareOption{dpaperafour}{
\setboolean{paperafour}{true}
}
\DeclareOption{dpaperletter}{
\setboolean{paperletter}{true}
}
%************************************%
% Line spacing: dsingle/ddouble
% Whether to use single- or doublespacing.
\newtoggle{DissertateSingleSpace}
\togglefalse{DissertateSingleSpace}
\DeclareOption{dsingle}{
\toggletrue{DissertateSingleSpace}
\ClassWarning{Dissertate}{Single-spaced mode on.}
}
\DeclareOption{ddouble}{\togglefalse{DissertateSingleSpace}}
%************************************%
% Process the options before reading them
\ProcessOptions\relax
% Paper size
\ifthenelse{\boolean{paperafour}}{
\LoadClass[12pt, oneside,a4paper]{book}
\ClassWarning{Dissertate}{Paper size set to A4.}
}{}
\ifthenelse{\boolean{paperletter}}{
\LoadClass[12pt, oneside,letterpaper]{book}
\ClassWarning{Dissertate}{Paper size set to US Letter.}
}{}
%************************************%
% Line Spacing
% Define two line spacings: one for the body, and one that is more compressed.
\iftoggle{DissertateSingleSpace}{
\newcommand{\dnormalspacing}{1.2}
\newcommand{\dcompressedspacing}{1.0}
}{
\newcommand{\dnormalspacing}{2.0}
\newcommand{\dcompressedspacing}{1.2}
}
% Block quote with compressed spacing
\let\oldquote\quote
\let\endoldquote\endquote
\renewenvironment{quote}
{\begin{spacing}{\dcompressedspacing}\oldquote}
{\endoldquote\end{spacing}}
% Itemize with compressed spacing
\let\olditemize\itemize
\let\endolditemize\enditemize
\renewenvironment{itemize}
{\begin{spacing}{\dcompressedspacing}\olditemize}
{\endolditemize\end{spacing}}
% Enumerate with compressed spacing
\let\oldenumerate\enumerate
\let\endoldenumerate\endenumerate
\renewenvironment{enumerate}
{\begin{spacing}{\dcompressedspacing}\oldenumerate}
{\endoldenumerate\end{spacing}}
%************************************%
% Text layout.
\ifthenelse{\boolean{paperafour}}{
\RequirePackage[width=5.75in, a4paper]{geometry}
}{}
\ifthenelse{\boolean{paperletter}}{
\RequirePackage[width=5.75in,letterpaper]{geometry}
}{}
%************************************%
\usepackage{ragged2e}
\RaggedRight
\RequirePackage{graphicx}
\usepackage{fixltx2e}
\parindent 12pt
\RequirePackage{lettrine}
\RequirePackage{setspace}
\RequirePackage{verbatim}
Hi check this new options for Dissertate.cls
It allows to choose between A4 and US Letter with:
dpaperafour OR dpaperletter
\NeedsTeXFormat{LaTeX2e} \ProvidesClass{Dissertate}[2014/03/25 v2.0 Dissertate Class]