\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                               %
%    Thesis and Dissertation Style              %
%    Colorado State University                  %
%    Thad Mauney     Fall l984                  %
%    Revised Summer 1985 - Scott Douglas            %
%    Greatly revised June 1985 - Gary Herron            %
%    Customized for me, by me Jun'85 - P. Fitzhorn              %
%    Customized more and better Dec'85 - Gary Herron, Tom Wood  %
%                               %
%%%%%   NOT GUARANTEED TO PASS GRADUATE SCHOOL STANDARDS    %%%%%
%    BUT CLOSE ENOUGH NOT TO BE A WASTE OF TIME         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create a main file thesis.tex which inputs the thesis style file,
% defines the appropriate parameters, and includes each thesis part
% in the correct order and under the correct format modes.  For
% example:
%
%   \input{thesis.sty}       % Run lrep12 with this line
%
%   \author{Some Name}
%   \title{Some Title}
%   \department{Department of Computer Science}
%   \dissertation{dissertation}
%   \semester{Some Semester}
%
%   \begin{document}
%       \preliminaries
%           \include{head}
%       \body
%           \include{chapter1}
%           \include{chapter2}
%       \references{thesis} %i.e., references are found in file thesis.bib
%   \end{document}
%
% The preliminaries in head.tex can contain any of the following in any order,
% but the following order is recommended:
%
%   \maketitle      % Makes the title page.
%   \makesignature      % Makes the signature page.
%
%   \begin{abstract} Text for abstract ...  \end{abstract}
%   \begin{acknowledgements} Acknowledgement text ... \end{acknowledgements}
%   \begin{dedication} Text for dedication ...  \end{dedication}
%
%   \tableofcontents    % Makes the table of contents.
%   \listoffigures      % Makes the list of figures.
%
% The body section should include one file for each chapter.  They should look:
%
%   \chapter{...title...}
%     ...text...
%   \section{...title...}
%     ...text...
%   \subsection{...title...}
%     ...text...
%   \subsubsection{...title...}
%     ...text...
%
% The reference section is built by bibtex.  Cites are specified by \cite{ref}.
% The data base of possible references is maintained in a file thesis.bib.
% See the bibtex manual for details.
%
% To run:
%    Command 'lrep12 thesis' takes thesis.tex and produces thesis.dvi and many
%    auxiliary files.  Command 'bibtex thesis' takes thesis.bib and produces
%    thesis.bbl which is included by lrep12 to build the page(s) of references.
%
%
%
%
%hoffset was actually 0 and it was changed to -22mm
\hoffset=-28mm \voffset=-25mm
%
%\font\twelvrm=amr10 scaled\magstep1
%\font\elvrm=amr10 scaled\magstephalf
%\font\ninerm=amr9
%\font\eightrm=amr8
%\font\sevenrm=amr7
%\font\sixrm=amr6
%\font\fiverm=amr5
%
%\font\twelvmi=ammi10 scaled\magstep1
%\font\elvmi=ammi10 scaled\magstephalf
%\font\ninemi=ammi9
%\font\eightmi=ammi8
%\font\sevenmi=ammi7
%\font\sixmi=ammi6
%\font\fivemi=ammi5
%
%\font\twelvsy=amsy10 scaled\magstep1
%\font\elvsy=amsy10 scaled\magstephalf%\font\ninesy=amsy9
%\font\eightsy=amsy10 at 8pt
%\font\sevensy=amsy10 at 7pt
%\font\sixsy=amsy6
%\font\fivesy=amsy6
%
%\font\elvit=amti10 scaled\magstephalf
%\font\elvbf=ambx10 scaled\magstephalf
%\font\elvss=amss10 scaled\magstephalf
%
%
%
%
\typeout{!! Thesis style !!}
%
% Set up title page macros and defaults.
\def\dissertation#1{\gdef\dissertation{#1}}
\def\title#1{\gdef\title{#1}}
\def\author#1{\gdef\author{#1}}
\def\degree#1{\gdef\degree{#1}}
\def\semester#1{\gdef\semester{#1}}
\def\department#1{\gdef\department{#1}}
%
\def\preliminaries{\doublespace\pagestyle{plain}\pagenumbering{roman}
%   \setcounter{page}{0}}
    \setcounter{page}{1}}
\def\body{\eject\pagestyle{topnumber}\pagenumbering{arabic}
    \setcounter{page}{1}\eject}
\def\appendix{\global\def\@chapapp{Appendix}\setcounter{chapter}{0}%
    \renewcommand{\thechapter}{\Alph{chapter}}}
%toto\def\references#1{{\singlespace\bibliographystyle{alpha}\bibliography{#1}}}
\def\references#1{{\singlespace\bibliographystyle{apa}\bibliography{#1}}}
%
\def\@refchapter#1{\ifnum \c@secnumdepth>\m@ne \refstepcounter{chapter}
  \typeout{\@chapapp\space\thechapter.}
  \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}
  \else
  \addcontentsline{toc}{chapter}{#1}\fi
  \chaptermark{#1}
  \addtocontents{lof}{\protect\addvspace{10pt}}
  \addtocontents{lot}{\protect\addvspace{10pt}}
  \if@twocolumn \@topnewpage[\@makechapterhead{#1}]\else
  \@makeschapterhead{#1}\@afterheading\fi}

\def\thebibliography#1{%
  {\let\@schapter=\@refchapter \chapter*{References}}
  \singlespace
  \list{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
    \leftmargin\labelwidth \advance\leftmargin\labelsep \usecounter{enumi}}
  \def\newblock{\hskip .11em plus .33em minus -.07em}
  \sloppy
  \sfcode`\.=1000\relax}
%
\def\tableofcontents{{\singlespace\newpage\null\vskip54pt
  \begin{center}CONTENTS\end{center}
  \vskip20pt
  \@starttoc{toc}}}
%
\def\listoffigures{{\doublespace\newpage\null\vskip54pt
  \begin{center}LIST OF FIGURES\end{center}
  \vskip20pt
  \@starttoc{lof}}}
%
\def\listoftables{{\doublespace\newpage\null\vskip54pt
  \begin{center}LIST OF TABLES\end{center}
  \vskip20pt
  \@starttoc{lot}}}
%
\long\def\@makefntext#1{\parindent=18pt$^{\@thefnmark}$#1\par}
%
\def\abstract{\newpage\null %\vskip 45pt
   \begin{center}
      ABSTRACT OF DISSERTATION\\[\baselineskip]
      \uppercase\expandafter{\title}
   \end{center}
   \vskip 15pt plus 2pt minus 2pt}
%
\def\endabstract{\vskip 15pt
   \rightline{\vbox{\baselineskip 14pt
    \hbox{\author}
        \hbox{\department}
        \hbox{Colorado State University}
        \hbox{Fort Collins, Colorado 80523}
        \hbox{\semester}}}
   \newpage}
%
\def\dedication{\newpage\null\vskip 54pt
  \begin{center}DEDICATION \end{center}
  \vskip 20pt\par}
%
\def\enddedication{\newpage}
%
\def\acknowledgements{\newpage\null\vskip 54pt
  \begin{center}ACKNOWLEDGEMENTS \end{center}
  \vskip 20pt\par}
%
\def\endacknowledgements{\newpage}
%
\def\ps@topnumber{\def\@oddhead{\hfil\rm\thepage\hfil}\let\@evenhead=\@oddhead\def\@oddfoot{}\let\@evenfoot=\@oddfoot}
%
\def\maketitle{\thispagestyle{empty}
    \begin{center}
          \null\vskip 75pt
          \uppercase\expandafter{\dissertation}\\[\baselineskip]
          {\uppercase\expandafter{\title}}\\[5\baselineskip]
          Submitted by\\
          \author\\
          \department\\[5\baselineskip]
          In partial fulfillment of the requirements\\
          for the Degree of \degree\\
          Colorado State University\\
          Fort Collins, Colorado\\
          \semester\\
          \null
       \end{center} \newpage}
%
\def\makesignature{\newpage\null\vskip 54pt
    \begin{center} COLORADO STATE UNIVERSITY \\[2\baselineskip] \end{center}
    \begin{flushright} \today \end{flushright}
    \par\noindent WE HEREBY RECOMMEND THAT THE
        \uppercase\expandafter{\dissertation}\
        PREPARED UNDER OUR SUPERVISION BY
        \uppercase\expandafter{\author}
        ENTITLED
        \uppercase\expandafter{\title}\
        BE ACCEPTED AS FULFILLING IN PART REQUIREMENTS FOR THE DEGREE OF
        \uppercase\expandafter{\degree}.\sloppy\par
    \begin{center}
          \vskip 1\baselineskip
          \underline{Committee on Graduate Work} \\[1\baselineskip]
          \rule{3.5in}{1pt}\\[-8pt]
        \makebox[3.5in][l]{Peter J. Brockwell (Adviser)}
        \rule{3.5in}{1pt}\\[-8pt]
          \makebox[3.5in][l]{Richard A. Davis (Co-adviser)}
          \rule{3.5in}{1pt}\\[-8pt]
          \makebox[3.5in][l]{F. Jay Breidt (Committee Member)}
          \rule{3.5in}{1pt}\\[-8pt]
          \makebox[3.5in][l]{Louis L. Scharf (Committee Member)}
          \rule{3.5in}{1pt}\\[-8pt]
          \makebox[3.5in][l]{F. Jay Breidt (Department Head)}
     \end{center}
     \newpage}
%
\def\singlespace{\@normalsize}
%
\def\doublespace{\@normalsize \let\@currsize\doublespace
    \baselineskip 1.65\baselineskip plus .9pt minus .9pt
    \normalbaselineskip\baselineskip}
%
\def\chapzzz{\vspace*{21pt}}
\def\chapszzz{\vspace*{13pt}}
%
% \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
\def\@makechapterhead#1{             % Heading for \chapter command
  \vspace*{24pt}                     % Space at top of text page.
  \chapzzz               % Space corrects for headsep
  { \parindent 0pt \leftskip=0pt plus 1filll \rightskip=\leftskip
    \bf \@chapapp{} \thechapter      % 'Chapter' and number.
    \par
    \vskip 20pt plus 2pt minus 2pt   % Space between number and title.
    \bf                              % Title.
    \uppercase{#1}\par           % follows returns in title
    \nobreak                         % TeX penalty to prevent page break.
    \vskip 20pt plus 2pt minus 2pt   % Space between title and text.
  } }
\def\@makeappendixhead#1{             % Heading for \chapter command
  \vspace*{24pt}                     % Space at top of text page.
  \chapzzz               % Space corrects for headsep
  { \parindent 0pt \leftskip=0pt plus 1filll \rightskip=\leftskip
    \bf Appendix \thechapter      % 'Chapter' and number.
    \par
    \vskip 20pt plus 2pt minus 2pt   % Space between number and title.
    \bf                              % Title.
    \uppercase{#1}\par           % follows returns in title
    \nobreak                         % TeX penalty to prevent page break.
    \vskip 20pt plus 2pt minus 2pt   % Space between title and text.
  } }
%
% \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
\def\@makeschapterhead#1{               % Heading for \chapter* command
  \vspace*{22pt}                        % Space at top of page.
  \chapszzz             % Space corrects for headheight
  \chapzzz              % Space corrects for headsep
  { \parindent 0pt \leftskip=0pt plus 1filll \rightskip=\leftskip
    \bf                                 % Title.
    #1\par
    \nobreak                         % TeX penalty to prevent page break.
    \vskip 20pt                      % Space between title and text.
%    \markright{#1}         % insert chapter* title in heading
  } }
%
\def\@afterheading{} % Allow indenting after headings.
%
% \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
%            optional * [ALTHEADING]{HEADING}
%    Generic command to start a section.
%    NAME       : e.g., 'subsection'
%    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
%                 section = 2, etc.  A section number will be printed if
%                 and only if LEVEL < or = the value of the secnumdepth
%                 counter.
%    INDENT     : Indentation of heading from left margin
%    BEFORESKIP : skip to leave above the heading
%    AFTERSKIP  : if positive, then skip to leave below heading,
%                       else - skip to leave to right of run-in heading.
%    STYLE      : commands to set style
%  If '*' missing, then increments the counter.  If it is present, then
%  there should be no [ALTHEADING] argument.  A sectioning command
%  is normally defined to \@startsection + its first six arguments.
\setcounter{secnumdepth}{10}
\setcounter{tocdepth}{10}
\def\chapter
  {\clearpage\thispagestyle{empty}\global\@topnum\z@\@afterindentfalse\secdef\@chapter\@schapter}
\def\section{\@startsection
  {section}{1}{\z@}{3.50ex 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\subsubsection{\@startsection
  {subsubsection}{3}{\z@}{3.25ex plus 1ex minus .2ex}{1.2ex plus .2ex}{\normalsize\bf}}
\def\paragraph{\@startsection
  {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize}}
\def\subparagraph{\@startsection
  {subparagraph}{5}{\parindent}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize}}
\setcounter{secnumdepth}{10}

% Set up margins, and other page parameters.
\tabskip 0.1em plus 10em minus 0.1em
\topmargin 36pt
\headheight 12pt
%\headsep 30pt
\headsep 28pt
%\textheight 9in
\textheight 8.8in
%\footheight 0pt
\footskip 0.4in
% 1.425

\oddsidemargin 1.425in

\textwidth 5.9in
\topskip 10pt plus 5pt minus 3pt
\parindent 2em
\clubpenalty 10000
\widowpenalty 10000
\def\footnoterule{\kern-1pt\hrule width1.5in\kern .6pt}
\skip\footins=24pt
\footnotesep=24pt
%
% Definition to include postcript graphs
% Jaime Delgado 03.08.94
%
\def\figx#1#2#3#4#5#6#7{
    \noindent
    \begin{figure}[htbp]
    \vspace*{#1}
    \centering
    \special{psfile="#6" hoffset=#2 hsize=#3
    voffset=#4 vsize=#5}
    \caption{#7}
    \end{figure}
    }
    \def\dima{-85}
    \def\dimb{612}
    \def\dimc{-242}
    \def\dimd{792}
