% Style-option file for Auburn University Master's Thesis. 
% See the file ausample.tex for an example of its use.
% Initial version 22-Dec-1989 by Darrel Hankerson.
% Use with:
%     \documentclass[11pt]{report}
%     \usepackage{aums,ulem}
%  or
%     \documentstyle[11pt,aums,ulem]{report}
%
% Note: This version was tested with LaTeX2e.
%
% Updates:
% 12-Oct-94
%   Changes for LaTeX2e.
% 14-Mar-94
%   Correct top spacing on list-of-figures page.
% 29-Sep-93
%   Correct grouping problem in \chapter.
% 14-May-92
%   Add extra space on style-page to get correct top space.
% 24-Apr-92
%   Fix for bad top-margin on titlepage (rubber length problem?).
%  9-Feb-92
%   The \clearpage in \enddocument does not always write the last \label.
%   Changed \label{totalpages} to an immediate write. 
%  8-Jan-92
%   LaTeX Version <14 January 1991> required insert of \par on Approval Page.
%  7-Nov-91
%   Set \parindent=2em
%   Add code for Grad school style page.
%  4-Oct-91
%   Doublespace between entries in lof, lot; singlespace within an item.
%   Make \listoffigures and \listoftables do the toc entry.
%   Headings for these are in \listfigurename and \listtablename, resp.
% 11-Jul-91 Grad school complains again
%   Grad school wants extra par indent on vita only, I have no idea why.
%   Removed 7-Nov-91.
% 24-May-91
%   Second line of chapter in toc is indented (Grad school complained).
%   Hacks to allow this to run under the new font-handling scheme.
%   doublespace.sty has lfont.tex dependent code
% 13-Jul-90
%   Set \widowpenalty, \clubpenalty, \brokenpenalty to prevent breaks
% 12-Jul-90     Graduate School requirements:
%   Adjusted the top vspace on titlepages.
%   Give larger box for chapter numbers on TOC so that `Bibliography' and
%     `List of ...' are out-dented. Removed Aug-90.
%   Change \l@chapter so that only text is in \sc, not page number (in case
%     of roman-numbered entries).
% 31-Jan-90 Graduate School requirements:
%   Move Date down on titlepage.
%   Force paragraph in Vita, Abstract, Acknowledgment.
%   Dots on chapter lines in toc. Deleted Aug-90
%   Chapter number must be flushright in box in toc. Removed Aug-90.
% 10-Jan-90 
%   Delete extra space at bottom of Approval Page when even number of profs
% 5-Jan-90  Darrel Hankerson
%   Change chapters, etc., to small-caps \sc
%   Chapter number given more room in l@chapter and l@section. Removed Aug-90

\typeout{Document Style Option 'aums' <12 Oct 94>}

\oddsidemargin.6in  \textwidth5.8in  \topmargin.1in  \textheight7.9in
\def\@topvspace{0pt}

\clubpenalty=10000 % penalty for creating club line at bottom of page
\widowpenalty=10000 % penalty for creating widow line at top of page
\brokenpenalty=10000 % penalty for page break after a hyphenated line 
\parindent=2em

\pagestyle{myheadings} \def\@oddhead{\hfil\thepage\hfil}

\newcounter{totalpages}
\newenvironment{romanpages}{\pagestyle{plain}\def\thepage{\roman{page}}}{
 \newpage\setcounter{totalpages}{\arabic{page}}\addtocounter{totalpages}{-1}
 \setcounter{page}{1}}


%\def\@ul#1{\def\@cr{\def\@cr{\\}}\@@ul#1\\\relax\\}
%\def\@@ul#1\\{\ifx\relax#1\let\next=\relax
%\else\let\next=\@@ul\@cr\underline{#1} \fi\next}


\newcounter{professor}
\def\professor#1{ % Save the professors; swap first 2 names.
 \ifcase \arabic{professor} \setcounter{professor}{2}
  \or \setcounter{professor}{3} \or \setcounter{professor}{1} 
 \else \stepcounter{professor}\fi
 \expandafter\gdef\csname professor\arabic{professor}\endcsname{#1}}

\def\previousdegree#1{\xdef\@previousdegree{\@previousdegree\par(#1)}}
\def\@previousdegree{}

\def\adviser#1{\def\@adviser{#1}}    \def\@adviser{\@Need{adviser}}
\def\style#1{\def\@style{#1}}        \def\@style{\@Need{style}}
\def\software#1{\def\@software{#1}}  \def\@software{\@Need{software}}

\def\@author{\@Need{author}}
\def\@title{\@Need{title}}
\def\@date{\@Need{date}}
\def\@Need#1{Put the {$\scriptstyle\backslash$\tt#1} command in your file!}

\def\@degree{Master of Science}
\def\@ThesisDissertation{Thesis}

\def\@makechapterhead#1{{\parindent 0pt
 \begin{center}\vspace*{\@topvspace}\sc
 \ifnum \c@secnumdepth >\m@ne \@chapapp{} \thechapter\par\fi #1 
 \end{center}} }

\def\@makeschapterhead#1{{\parindent 0pt
 \begin{center}\vspace*{\@topvspace}\sc#1\end{center}} }


\def\chapter{\clearpage \thispagestyle{plain} \global\@topnum\z@
\@afterindenttrue \secdef\@chapter\@schapter} 
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
 \refstepcounter{chapter}
 \typeout{\@chapapp\space\thechapter.}
 {\def\\{}
 \addcontentsline{toc}{chapter}{\protect
 \numberline{\thechapter}#1}}\else {\def\\{}
 \addcontentsline{toc}{chapter}{#1}}\fi
 \chaptermark{#1}
 \addtocontents{lof}{\protect\addvspace{10pt}}
\addtocontents{lot}{\protect\addvspace{10pt}} \if@twocolumn
\@topnewpage[\@makechapterhead{#2}] 
 \else \@makechapterhead{#2}
 \@afterheading \fi} 
\def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
 \else \@makeschapterhead{#1} 
 \@afterheading\fi}

\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
 -.2ex}{2.3ex plus .2ex}{\normalsize\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
 -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}

\def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
   \par \@tempskipa #4\relax
   \@afterindenttrue
   \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \relax\fi
   \if@nobreak \everypar{}\else
     \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar
     {\@ssect{#3}{#4}{#5}{#6}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}

\def\ApprovalPage{\newpage\thispagestyle{empty}{\def\thanks##1{}
\def\@ApprovalPage{%
\parbox[t]{.45\textwidth}{\underline{\hspace*{.45\textwidth}}\\
\csname professor\arabic{enumi}\endcsname}}
\begin{center}\vspace*{\@topvspace}
{\sc\@title \par} \addvspace{36pt} {\lineskip .75em
\begin{tabular}[t]{c}Except where reference is made to the work of others, 
the work in this\\
dissertation is my own or was done in collaboration with my advisory 
committee.\\[2ex]
{\underline{\hspace*{.45\textwidth}}}\\
\@author 
\end{tabular}\par} 
\vfill\singlespace\setcounter{enumii}{\arabic{professor}}
\ifodd\c@professor \else\stepcounter{enumii}\fi
\begin{tabular}{@{}l@{\hspace{.09\textwidth}}l}\setcounter{enumi}{1}%
%Certificate of Approval: \\[48pt]
\@whilenum \c@enumi<\c@enumii\do{\def\@and{&}%
\@ApprovalPage
\ifnum\c@enumi < \c@professor 
 \ifodd\c@enumi \@and \else \\ \mbox{}\\[24pt] \fi
\fi
\stepcounter{enumi}}
\end{tabular}\par
\ifodd\c@professor \@ApprovalPage \fi
\end{center}\newpage}\gdef\ApprovalPage{}}



\def\TitlePage{\newpage\thispagestyle{empty}{
\let\footnotesize\small \let\footnoterule\relax
%\vspace*{1ex}% 12-Jul-90 Problem with rubber lengths on this page?
\begin{center}\vspace*{\@topvspace}
{\sc\@title \par} \addvspace{36pt} {\lineskip .75em
\begin{tabular}[t]{c}\@author 
\end{tabular}\par} 
\end{center} \par
\@thanks
\begin{center}
    \vfill
    A \@ThesisDissertation \\
    Submitted to \\
    the Graduate Faculty of \\
    Auburn University \\
    in Partial Fulfillment of the \\
    Requirements for the \\
    Degree of \\
    \@degree \\
    \vfill
    \raisebox{-2ex}[0pt][0pt]{
        \begin{tabular}[t]{c}Auburn, Alabama\\ \@date\end{tabular}}
\end{center}
\setcounter{footnote}{0} 
\gdef\@thanks{}\newpage}\gdef\TitlePage{}}

\def\vita{\newpage\begin{center}\vspace*{\@topvspace}\sc Vita \end{center}
\par}
\def\endvita{\newpage}

\def\acknowledgments{\newpage\begin{center}\vspace*{\@topvspace}
\sc Acknowledgments \end{center}\par}
\def\endacknowledgments{\newpage}

\def\CopyrightPage{\newpage{\def\thanks##1{}
\begin{center}\vspace*{\@topvspace}
{\sc\@title \par} \addvspace{36pt} {\lineskip .75em
\begin{tabular}[t]{c}\@author 
\end{tabular}\par} 
\end{center}
\singlespace
\noindent Permission is granted to Auburn University to make copies of this
thesis at its discretion, upon the request of individuals or institutions and
at their expense. The author reserves all publication rights.\par
\addvspace{48pt}
\begin{flushright}
\parbox{.4\textwidth}{\underline{\hspace*{.4\textwidth}}\\Signature of
Author}\\[48pt]
\parbox{.4\textwidth}{\underline{\hspace*{.4\textwidth}}\\Date}
\end{flushright}
\addvspace{24pt}\noindent Copy sent to:
\begin{center}
\underline{Name} \hspace{.7\textwidth} \underline{Date}
\end{center}\newpage}\gdef\CopyrightPage{}}

\def\abstract{\newpage
\begin{center}\vspace*{\@topvspace}
{\sc \@ThesisDissertation{} Abstract\\
\@title}\par\addvspace{12pt}
\@author\\
\begin{singlespace}
\@degree, \@date\par
\@previousdegree\par
\end{singlespace}
\ref{totalpages} Typed Pages\par
Directed by \@adviser
\end{center}\par}
\def\endabstract{\newpage}


\def\StylePage{\newpage\thispagestyle{empty}
\vspace*{\bigskipamount}\vspace*{\@topvspace}\sloppy
Style manual or journal used {\expandafter\em\@style\hspace*{\fill}}
\par\addvspace{\bigskipamount}
Computer software used {\expandafter\em\@software\hspace*{\fill}}\par
\newpage\addtocounter{page}{-1} % No page number for style-page
\gdef\StylePage{}}


\def\contentsname{Table of Contents}
\def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \fi\chapter*{\contentsname
  \@mkboth{\uppercase{\contentsname}}{\uppercase{\contentsname}}}
 {\singlespace\@starttoc{toc}}\if@restonecol\twocolumn\fi}

\def\listfigurename{List of Figures}
\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \fi\chapter*{\listfigurename\@mkboth
 {\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}
 \addcontentsline{toc}{chapter}{\listfigurename}
 {\vspace{-\bigskipamount}\singlespace\@starttoc{lof}}\if@restonecol
 \twocolumn\fi}
\def\l@figure{\par\addvspace{\bigskipamount}\pagebreak[2]
 \@dottedtocline{1}{1.5em}{2.3em}}
\def\listtablename{List of Tables}
\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \fi\chapter*{\listtablename\@mkboth
 {\uppercase{\listtablename}}{\uppercase{\listtablename}}}
 \addcontentsline{toc}{chapter}{\listtablename}
 {\vspace{-\bigskipamount}\singlespace\@starttoc{lot}}\if@restonecol
 \twocolumn\fi}
\let\l@table\l@figure

\def\l@chapter#1#2{\pagebreak[3] 
   \vskip 1.0em plus 1pt  % space above chapter line
   \@tempdima 1.5em       % width of box holding chapter number
   \begingroup
     \parindent \z@ \rightskip \@pnumwidth 
     \addtolength{\leftskip}{\@tempdima}% 24-May-91
     \parfillskip -\@pnumwidth   
%     \bf                  % Boldface.
     \leavevmode          % TeX command to enter horizontal mode.       
     {\hspace*{-\@tempdima}\sc#1}\hfil \hbox to\@pnumwidth{\hss #2}\par
   \endgroup}

\def\thebibliography#1{\chapter*{Bibliography\@mkboth
 {BIBLIOGRAPHY}{BIBLIOGRAPHY}\addcontentsline{toc}{chapter}{\sc Bibliography}}
 \list
 {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
 \advance\leftmargin\labelsep
 \usecounter{enumi}} 
 \def\newblock{\hskip .11em plus .33em minus .07em}
 \sloppy\clubpenalty4000\widowpenalty4000
 \sfcode`\.=1000\relax\singlespace}
\let\endthebibliography=\endlist


\let\sav@enddocument\enddocument
\def\enddocument{\clearpage\addtocounter{totalpages}{\arabic{page}}
\addtocounter{totalpages}{-1}
\if@filesw \immediate\write\@mainaux{%
\string\newlabel{totalpages}{{\arabic{totalpages}}{\thepage}}}\fi
\sav@enddocument}


% We need to doublespace.  At a minimum, we must 
%   * Set doublespace as the default, and
%   * make a singlespace environment.

\input doublespace.sty
\renewcommand{\baselinestretch}{1.8}
\endinput
