% 30 sept 96 copyright page modified

% 2 Oct title page compressed to make room for longer titles


% wthesis.sty modified by M hadley from utthesis.sty  Sept 96
% is used for all my comments and changes.
% more modifications made in december 1996
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% File: utthesis.sty, version 2.0, January 1995
%%% =============================================
%%% Copyright (c) 1995 by Dinesh Das.  All rights reserved.
%%% This file is free and can be modified or distributed as long as
%%% you meet the following conditions:
%%%
%%% (1) This copyright notice is kept intact on all modified 
% wthesis.sty modified by M hadley from utthesis.sty  Sept 96
%! %! is used for all my comments and changes.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% File: utthesis.sty, version 2.0, January 1995
%%% =============================================
%%% Copyright (c) 1995 by Dinesh Das.  All rights reserved.
%%% This file is free and can be modified or distributed as long as
%%% you meet the following conditions:
%%%
%%% (1) This copyright notice is kept intact on all modified copies.
%%% (2) If you modify this file, you MUST NOT use the original file name.
%%%
%%% This file defines macros used for preparing theses for
%%% The University of Texas at Austin.  It has been tested with LaTeX2e.
%%% I do NOT guarantee that it will meet all requirements of the
%%% Graduate School; however, 
%! neither do I, but I am fairly confident because the university
%regulations are almost minimal.
%! if you find that something violates the
%! specifications, please send me email at <m.j.hadley@warwick.ac.uk>
%! I will try to fix it.
%%%
%%% Usage:
%%% ======
%%%
%%% To use this file with LaTeX2e, make sure your TEXINPUTS environment
%%% variable contains the directory in which this file is located.
%%% Include this file as a package in the preamble:
%%%
%%% \documentclass[...]{report}
%!   \usepackage{wnewthesis}
%%%
%%% On non-UNIX systems, there might be different environment variables
%%% that might need to be set.  I know nothing about such machines,
%%% however; consult your local guru for details.
%%%
%%% A template for a thesis is provided in the file 
%!   wthesis.tex, available
%%% from the same place where you obtained this file.
%%%
%%% Command Names:
%%% ==============
%%%
%%% ALL command names used in this file that are used to format the
%%% thesis begin with "thesis" (e.g., \thesisauthor).  All of these
%%% commands can be changed by the user using \renewcommand, e.g.,
%%%
%%% \renewcommand{\thesisauthor}{First M. Last}
%%%
%%% after loading the package in LaTeX2e.
%%%
%%% The following is a list of all thesis-related variables used together
%%% with their default values:
%! some are not used by Univ Warwick but I have left them in anyway.
%%%
%%% \thesisauthor    %% Name of the author; defaults to "Ima Student".
%!  \thesisdepartmentname  %! Department name; defaults to "mydepartemnt"
%%% \thesismonth     %% Month of graduation; defaults to "May".
%%% \thesisyear      %% Year of graduation; defaults to "1994".
%%% \thesistitle     %% Full title of dissertation; defaults to "Title".
%%% \thesistitletypesize
%%%                  %% Typesize used to typeset \thesistitle; defaults
%%%                  %% to \Large.
%%% \thesisauthorpreviousdegrees
%%%                  %% Previous degrees of author; defaults to "Degree"
%%% \thesissupervisor%% Name of thesis supervisor; defaults to "Supervisor"
%%% \thesisauthoraddress
%%%                  %% Permanent address of author; defaults to "USA"
%%% \thesistypist    %% Name of thesis typist; defaults to "the author".
%%% \thesistype      %% Type of thesis; defaults to "Dissertation".
%%% \thesistypetypesize
%%%                  %% Typesize used to typeset \thesistype; defaults to
%%%                  %% \large.
%%% \thesisdegree    %% Degree for which thesis is submitted; defaults to
%%%                  %% "Doctor of Philosophy".
%%% \thesisdegreetypesize
%%%                  %% Typesize used to typeset \thesisdegree; defaults to
%%%                  %% \large.
%%% \thesisdegreeabbreviation
%%%                  %% Abbreviation of \thesisdegree; defaults to "Ph.D.".
%!   \thesissubmission  %! The wording on the frontpage.
%!                      %! Defaults to: 
%!                       Submitted to the University of Warwick\\ 
%!                                   for the degree of
%!
%%% \thesisvitahead  %% Title of the vita page; defaults to "Vita".
%%% \thesisvitaheadtypesize
%%%                  %% Typesize used to typeset \thesisvitahead;
%%%                  unused.
%%% \thesisdeclarationhead
%%%                  %% Title of the declaration page; defaults to
%%%                  %% "Declaration".
%%% \thesisabstracthead
%%%                  %% Title of the abstract page; defaults to
%%%                  %% "Abstract".
%%% \thesisabbreviationhead
%%%                  %% Title of the abbreviations page; defaults to
%%%                  %% "Abbreviations".
%%% \thesisacknowledgmenthead
%%%                  %% Title of the acknowledgments page; defaults to
%%%                  %% "Acknowledgments".
%%% \thesisacknowledgmentheadtypesize
%%%                  %% Typesize used to typeset \thesisacknowledgmenthead;
%%%                  %% unused.
%%% \thesisstudent   %% Name of author with previous degrees; defaults to
%%%                  %% "\thesisauthor, \thesisauthorpreviousdegrees".
%%% \thesisstudenttypesize
%%%                  %% Typesize used to typeset \thesisstudent; defaults
%%%                  %% to \large.
%!  \thesiscopyrightagree
%!                   %! agreement for copying the theisis; defaults to
%!                   %! agree
%!!!!!!!!!!!!!!!!!!!! The following are not used by Univ. of Warwick !!!!
%%% \thesisdedication%% Person or thing dedicated to; defaults to
%%%                  %% "To myself". :-)
%%%
%%% \thesisapprovedby%% Approval of dissertation committee; defaults to
%%%                  %% "Approved by".
%%% \thesisapprovedbytypesize
%%%                  %% Typesize used to typeset \thesisapprovedby; defaults
%%%                  %% to \large.
%%% \thesiscopyrightholder
%%%                  %% Name of copyright holder; defaults to \thesisauthor.
%%% \thesiscommitteesize
%%%                  %% Number of members in thesis committee; defaults to 5.
%%% \thesiscommittee %% Name of thesis committee; defaults to
%%%                  %% "Dissertation Committee:".
%%% \thesiscommitteetypesize
%%%                  %% Typesize used to typeset \thesiscommittee; defaults
%%%                  %% to \large.
%%% \thesisacknowledgmentsigname
%%%                  %% Signature on the acknowledgments page; defaults to
%%%                  %% \thesisauthor.
%%% \thesisacknowledgmentsignametypesize
%%%                  %% Typesize used to typeset \thesisacknowledgmentsigname;
%%%                  %% defaults to \large.
%%% \thesisacknowledgmentsigplace
%%%                  %% Address used on the acknowledgments page; defaults
%%%                  %! to "The University of Warwick \\ \thesismonth
%%%                  %% \thesisyear".

%%% Most of the default values will satisfy the Graduate School's
%%% requirements; however, at a minimum, the user SHOULD redefine the
%%% following commands:
%%%
%%% \thesisauthor
%!  \thesisdepartmentname
%%% \thesismonth
%%% \thesisyear
%%% \thesistitle
%%% \thesisauthorpreviousdegrees
%%% \thesissupervisor   %! not really used.
%%% \thesisauthoraddress
%%%
%%% In addition to the above variables, the following commands are
%%% provided to generate the optional sections of the thesis:
%%%
%%% \thesiscopyrightpage
%%%                  %% Generates the copyright page.
%%% \thesistitlepage %% Generates the title page. %! ESSENTIAL
%%% \thesissignaturepage
%%%                  %% Generates the signature page. %! NOT USED
%%% \thesisdedicationpage
%%%                  %% Generates the dedication page. %! NOT USED
%%%
%%% There are also a few environments to generate paragraph-like text:
%%%
%%% thesisacknowledgments
%%%                  %% Text of acknowledgments.
%!  thesisdeclaration
%!                   %! Text of declaration of original work: ESSENTIAL
%!  thesisabbreviations
%!                   %! List of abbreviations
%%% thesisabstract   %% Text of abstract. %! ESSENTIAL
%%% thesisauthorvita %% Text of author's vita.
%%%
%%% Bells and Whistles:
%%% ===================
%%%
%%% The following commands are provided purely for playing around with.
%%% They should be used in the document preamble (before \begin{document}).
%%%
%%% \thesisdraft     %% Prints a timestamp at the top of each page.  This
%%%                  %% must be invoked in the document preamble (before
%%%                  %% \begin{document}).
%%% \leftchapter, \centerchapter, \rightchapter
%%%                  %% These commands generate left-justified, centered,
%%%                  %% and right-justified chapter headings, respectively.
%%% \singlespace, \oneandhalfspace, \doublespace
%%%                  %% These define the line spacing to single-space,
%%%                  %% one-and-one-half space, and double-space
%%%                  %% respectively.  Note that the minimum spacing
%%%                  %% required by the Graduate School is \oneandhalfspace,
%%%                  %% but \singlespace is useful, e.g., when using
%%%                  %% \thesisdraft.
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        
\typeout{*************************************************************} 
\typeout{** Warwick Thesis Style File Sept 1996                       }
\typeout{*************************************************************}

%%%
%%% Set up page layout parameters.
%%%
\setlength{\textheight}{8in}
\setlength{\oddsidemargin}{0.7in}
\setlength{\evensidemargin}{0.7in}
\setlength{\textwidth}{5.50in}
\setlength{\topmargin}{0.5in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\parindent}{12mm}

%%%
%%% Set up default values.
%%%
\newcommand{\@universityname}{The University of Warwick}
\newcommand{\thesisdepartmentname}{mydepartment}
\newcommand{\@publicationno}{Publication No.\ \line(1,0){40} \\[10mm]}
\newcommand{\thesisauthor}{Ima Student} \newcommand{\thesismonth}{May}
\newcommand{\thesisyear}{1994} \newcommand{\thesistitle}{Title}
\newcommand{\thesistitletypesize}{\Large}
\newcommand{\thesisauthorpreviousdegrees}{Degree}
\newcommand{\thesissupervisor}{Supervisor}
\newcommand{\thesisauthoraddress}{USA}
\newcommand{\thesisapprovedby}{Approved by}
\newcommand{\thesisapprovedbytypesize}{\large}
\newcommand{\thesiscopyrightholder}{\thesisauthor}
\newcommand{\thesiscopyrightagree}{agree}
\newcommand{\thesistypist}{the author}
\newcommand{\thesistype}{Thesis}
\newcommand{\thesistypetypesize}{\large}
\newcommand{\thesistypesize}{\large} \newcommand{\thesisdegree}{Doctor
of Philosophy} 
\newcommand{\thesisdegreetypesize}{\large}
\newcommand{\thesisdegreeabbreviation}{Ph.D.}
\newcommand{\thesissubmission}{Submitted to \@universityname \\for
the degree of } 
\newcommand{\thesiscommitteesize}{5}
\newcommand{\thesiscommittee}{Dissertation Committee:}
\newcommand{\thesiscommitteetypesize}{\large}
\newcommand{\thesisvitahead}{Vita}
\newcommand{\thesisvitaheadtypesize}{\Large}
\newcommand{\thesisacknowledgmenthead}{Acknowledgments}
\newcommand{\thesisacknowledgmentheadtypesize}{\Large}
\newcommand{\thesisacknowledgmentsigname}{\thesisauthor}
\newcommand{\thesisacknowledgmentsignametypesize}{\large}
%! notused
%!  \newcommand{\thesisacknowledgmentsigplace}%
%!    {{\slshape
%!       \renewcommand{\arraystretch}{1.0}
%!       \begin{tabular}{l}
%!         \@universityname \\
%!         \thesismonth\ \thesisyear
%!       \end{tabular}}}

\newcommand{\thesisabbreviationhead}{Abbreviations}

\newcommand{\thesisdeclarationhead}{Declarations}

\newcommand{\thesisabstracthead}{Abstract}

\newcommand{\thesisstudent}{\thesisauthor, \thesisauthorpreviousdegrees}
\newcommand{\thesisstudenttypesize}{\large}
\newcommand{\thesisdedication}{}
 
%%%
%%% Command for masters theses.  \phdthesis is provided for symmetry.
%%%
\newcommand{\mastersthesis}{
    \renewcommand{\thesistype}{Thesis}
    \renewcommand{\@publicationno}{}
    \renewcommand{\thesisdegree}{Master of Arts}
    \renewcommand{\thesisdegreeabbreviation}{M.A.}
    \renewcommand{\thesiscommitteesize}{2}
    \renewcommand{\thesiscommittee}{Supervising Committee:}}
\newcommand{\phdthesis}{}

%%%
%%% Set up other commands.
%%%
\newcommand{\@defaultbaselinestretch}{1.5}
\newcommand{\@base}[1]{\renewcommand{\baselinestretch}{#1}}
\newcommand{\singlespace}{\renewcommand{\@defaultbaselinestretch}{1.1}}
\newcommand{\oneandhalfspace}{\renewcommand{\@defaultbaselinestretch}{1.5}}
\newcommand{\doublespace}{\renewcommand{\@defaultbaselinestretch}{1.7}}
\newcommand{\@thesistitle}{\textbf{\thesistitletypesize \thesistitle}}
\newcommand{\@thesisapprovedby}%
    {\textbf{\thesisapprovedbytypesize \thesisapprovedby}}
\newcommand{\@thesistype}{\textbf{\thesistypetypesize \thesistype}}
\newcommand{\@thesisdegree}{\textbf{\thesisdegreetypesize \thesisdegree}}
\newcommand{\@thesisdegreeabbreviation}{\thesisdegreeabbreviation}
\newcommand{\@thesiscommittee}%
    {\textbf{\thesiscommitteetypesize \thesiscommittee}}
\newcommand{\@thesisvitahead}{\thesisvitahead}
\newcommand{\@thesisacknowledgmenthead}%
    {\thesisacknowledgmenthead}
\newcommand{\@thesisdeclarationhead}%
    {\thesisdeclarationhead}
\newcommand{\@thesisabstracthead}%
    {\thesisabstracthead}
\newcommand{\@thesisabbreviationhead}%
    {\thesisabbreviationhead}
%! \newcommand{\@thesisacknowledgmentsigname}%
%!    {\textsc{\thesisacknowledgmentsignametypesize \thesisacknowledgmentsigname}}
%!\newcommand{\@thesisacknowledgmentsigplace}{\thesisacknowledgmentsigplace}
\newcommand{\@thesisstudent}{\textbf{\thesisstudenttypesize \thesisstudent}}

%%%
%%% Indent the first paragraph after a sectioning command.
%%%
%\let\@afterindentfalse\@afterindenttrue
%\@afterindenttrue

%%%
%%% Set up default page numbering and line spacing.
%%%
\newcommand{\@textpagenumbering}{arabic}
\newcommand{\@preamblepagenumbering}{roman}
\newcommand{\@textpagestyle}{plain}
\newcommand{\@preamblepagestyle}{plain}
\pagenumbering{\@preamblepagenumbering}
\@base{\@defaultbaselinestretch}

\newcommand{\@chaptertype}{\chaptername}
\newcommand{\@appendix}{0}

%%%
%%% Command to generate copyright page.
%%%

\newcommand{\thesiscopyrightpage}{
     \thispagestyle{empty}

 \setlength{\parindent}{0mm}
 \setlength{\oddsidemargin}{15mm}
 \setlength{\evensidemargin}{15mm}
 \setlength{\textwidth}{6.5in}
 \addtolength{\textheight}{50mm}
 \setlength{\footskip}{0mm}
 \setlength{\parskip}{1ex}
\fontsize{12}{15}                       % set to 12pt
\selectfont

%!-------------------------------------------------------------------------
%! Produce Warwick letterhead     uses epsf.tex epsf.sty black_white.eps
%!         For the LIBRARY    

%!-------------------------------------------------------------------------
\begin{spacing}{1}
\setlength{\unitlength}{1pt}
%\input epsf  
      
\begin{picture}(0,20)(20,-30)
%\put(0,-40){\makebox{\epsfbox{The_Warwick_Uni_black.eps}} }
\put(365,30){\makebox(0,0){\includegraphics[width=6cm]{The_Warwick_Uni_black.eps}}}
%\put(180,-5){\rule{120mm}{.5pt}} 
%\fontfamily{phv}                        % set font to Adobe Helvetica
%\fontsize{8}{14}                        % set to 8pt with 10pt leading
%\selectfont
%\put(180,20){\textsf{THE LIBRARY}}
%\put(180,10){\textsf{Tel: +44 24 76523523}}
%\put(180,0){\textsf{Fax:  +44 24 76524211}}

%!!!! the footer
%\put(180,-700){\rule{120mm}{.5pt}}
\put(300,-716){\textsf{www.warwick.ac.uk}}
\end{picture}

\end{spacing}
\vspace{7mm}
%!-------------------------------------------------------------------------
%! End of Warwick letterhead 
%!-------------------------------------------------------------------------
\begin{spacing}{1}
{\tt AUTHOR:} {\bf \thesisauthor}\hspace{10mm}
{\tt DEGREE:} {\bf \thesisdegreeabbreviation}\\[4mm]
{\tt TITLE:} {\bf \thesistitle}\\[4mm]
{\tt DATE OF DEPOSIT:} \dotfill \hfill \hfill \\

I agree that this thesis shall be available in accordance with the
regulations governing the University of Warwick theses.

I agree that the summary of this thesis may be submitted for
publication.

I {\bf \thesiscopyrightagree} that the thesis may be photocopied (single
copies for study purposes only).

{\small Theses with no restriction on photocopying will also be made
available to the British Library for microfilming. The British Library
may supply copies to individuals or libraries. subject to a statement
from them that the copy is supplied for non-publishing purposes. All
copies supplied by the British Library will carry the following
statement:

\begin{quotation}
``Attention is drawn to the fact that the copyright of this thesis
rests with its author. This copy of the thesis has been supplied on
the condition that anyone who consults it is understood to recognise
that its copyright rests with its author and that no quotation from
the thesis and no information derived from it may be published without
the author's written consent.''
\end{quotation}
}
{\tt AUTHOR'S SIGNATURE:} \dotfill\\
\vspace{-2mm}
\hspace{-10mm}\rule{200mm}{.1mm}
\begin{center}
\underline{USER'S DECLARATION}
\end{center}
\begin{enumerate}
\item I undertake not to quote or make use of any information from
this thesis without making acknowledgement to the author.
\item I further undertake to allow no-one else to use this thesis while
it is in my care.
\end{enumerate}

%\rule{150mm}{.1mm}\\
\setlength{\unitlength}{1mm}
\begin{picture}(0,20)(0,5)
\put(0,21){\parbox[b]{100mm}{DATE\hspace{10mm}SIGNATURE\hspace{30mm}ADDRESS}}
\put(0,12){\parbox{140mm}{\dotfill}}
\put(0,3){\parbox{140mm}{\dotfill}}
\put(0,-4){\parbox{140mm}{\dotfill}}
\put(0,-13){\parbox{140mm}{\dotfill}}
\put(0,-22){\parbox{140mm}{\dotfill}}
\end{picture}
\end{spacing}
\setlength{\unitlength}{1pt}
\newpage}
        
%%%
%%% Command to generate a Colour title page.
%%%
\newcommand{\thesistitlecolourpage}{
%!-------------------------------------------------------------------------
%! March 2003 
%! Includes Crest and New Warwick letterhead        uses epsf.tex epsf.sty 
%! Crest_fullcolour.ps 
%! The_Warwick_Uni_blue.eps
%! 
%!-------------------------------------------------------------------------
%! Changed Dec96. the whole front page is now done as a picture. This
%!  is thought to be more robust and easier to maintain. Long titles will
%!  no longer affect the rest of the page.

\thispagestyle{empty}
 \input epsf        
 \begin{center}
 \begin{picture}(0,110)(56,50)
 \includegraphics[width=5cm]{Crest_fullcolour.ps} 
\end{picture}
\end{center}

\begin{spacing}{2}

\setlength{\unitlength}{1mm}
\begin{center}
\begin{picture}(150,100)(0,120)
\put(75,175){\makebox(0,0){\begin{minipage}{130mm}\begin{center}\@thesistitle
\end{center}\end{minipage}}}
\put(75,155){\makebox(0,0){by}}
\put(75,145){\makebox(0,0){\Large \bf \thesisauthor}}
\put(75,115){\makebox(0,0){\begin{minipage}{100mm}\begin{center} 
                \textbf{\thesistypetypesize \thesistype}\\ 
                       \thesissubmission\\ 
                       \textbf{\thesisdegreetypesize \thesisdegree} 
                          \end{center}\end{minipage}}}
\put(75,65){\makebox(0,0){\textbf{\Large \thesisdepartmentname}}}
\put(75,55){\makebox(0,0){\thesismonth \ \thesisyear}}
\put(75,30){\makebox(0,0){\includegraphics[width=6cm]{The_Warwick_Uni_blue.eps}}}


\end{picture}
\end{center}
\setlength{\unitlength}{1pt}
\end{spacing}
\newpage
}

%%%
%%% Command to generate a title page 
%%%
\newcommand{\thesistitlepage}{
%!-------------------------------------------------------------------------
%! March 2003 
%! Includes Crest and New Warwick letterhead         
%! Crest_black.ps 
%! The_Warwick_Uni_black.eps
%!-------------------------------------------------------------------------
%! Changed Dec96. the whole front page is now done as a picture. This
%!  is thought to be more robust and easier to maintain. Long titles will
%!  no longer affect the rest of the page.

\thispagestyle{empty}
% \input epsf        
 
\begin{center}
\begin{picture}(0,110)(56,50)        
\includegraphics[width=5cm]{Crest_black.ps} 
\end{picture}
\end{center}

\begin{spacing}{2}

\setlength{\unitlength}{1mm}
\begin{center}
\begin{picture}(150,100)(0,120)
\put(75,175){\makebox(0,0){\begin{minipage}{130mm}\begin{center}\@thesistitle
\end{center}\end{minipage}}}
\put(75,155){\makebox(0,0){by}}
\put(75,145){\makebox(0,0){\Large \bf \thesisauthor}}
\put(75,115){\makebox(0,0){\begin{minipage}{100mm}\begin{center} 
                \textbf{\thesistypetypesize \thesistype}\\ 
                       \thesissubmission\\ 
                       \textbf{\thesisdegreetypesize \thesisdegree} 
                          \end{center}\end{minipage}}}
\put(75,65){\makebox(0,0){\textbf{\Large \thesisdepartmentname}}}
\put(75,55){\makebox(0,0){\thesismonth \ \thesisyear}}
\put(75,30){\makebox(0,0){\includegraphics[width=6cm]{The_Warwick_Uni_black.eps}}}

\end{picture}
\end{center}

\setlength{\unitlength}{1pt}
\end{spacing}
\newpage
}

%%%
%%% Command to generate signature page.
%%%
%!\newcommand{\thesissignaturepage}{
%!    \thispagestyle{empty}
%!    \begin{spacing}{2}
%!    \strut \vfill
%!    \begin{center}
%!      \@thesistitle
%!    \end{center}
%!    \vspace{50mm}
%!    \mbox{} \hfill \begin{minipage}{67mm}
%!                     \begin{spacing}{1}
%!                     \@thesisapprovedby\hfill\mbox{} \\
%!                     \@thesiscommittee \\[15mm]
%!                     \end{spacing}
%!                     \setlength{\unitlength}{1mm}
%!                     \begin{picture}(67,70)(0,0)
%!                       \multiput(0,70)(0,-10)
%!                         {\thesiscommitteesize}{\line(1,0){67}}
%!                     \end{picture}
%!                   \end{minipage}
%!    \vfill \strut
%!    \end{spacing}
%!    \newpage}

%%%
%%% Command to generate dedication page.
%%%
%!!!!!!!!!!! Warwick does this in the acknowledgements page 
%!\newcommand{\thesisdedicationpage}{
%!    \thispagestyle{empty}
%!    \strut \vfill
%!    \begin{spacing}{\@defaultbaselinestretch}
%!    \begin{center}
%!      \thesisdedication
%!    \end{center}
%!    \end{spacing}
%!    \vfill \strut
%!    \newpage}

%%%
%%% Environment to generate acknowledgments page.
%%%
\newenvironment{thesisacknowledgments}
    {%\doublespace\small\normalsize
     \chapter*{\@thesisacknowledgmenthead
         \@mkboth{\uppercase{\@thesisacknowledgmenthead}}
                 {\uppercase{\@thesisacknowledgmenthead}}}
     \addcontentsline{toc}{chapter}{\@thesisacknowledgmenthead}
     \begin{spacing}{\@defaultbaselinestretch}}
    {\end{spacing}
%!                \par \vspace{20mm}
%!                \raggedleft \@thesisacknowledgmentsigname \\[10mm]
%!                \raggedright \@thesisacknowledgmentsigplace 
            \newpage}
%%%
%%% Environment to generate declarations page.
%%%
\newenvironment{thesisdeclaration}
    {%\doublespace\small\normalsize
     \chapter*{\@thesisdeclarationhead
         \@mkboth{\uppercase{\@thesisdeclarationhead}}
                 {\uppercase{\@thesisdeclarationhead}}}
     \addcontentsline{toc}{chapter}{\@thesisdeclarationhead}
     \begin{spacing}{\@defaultbaselinestretch}}
    {\end{spacing}
%!                \par \vspace{20mm}
%!                \raggedleft \@thesisacknowledgmentsigname \\[10mm]
%!                \raggedright \@thesisacknowledgmentsigplace 
            \newpage}
%%%
%%% Environment to generate abstract page.
%%%
\newenvironment{thesisabstract}
    {%\doublespace\small\normalsize
     \chapter*{\@thesisabstracthead                 %!picked up from above
         \@mkboth{\uppercase{\@thesisabstracthead}}  %!picked up from above
                 {\uppercase{\@thesisabstracthead}}} %!picked up from above
       \addcontentsline{toc}{chapter}{\@thesisabstracthead}
%!     \vspace*{0mm}
%!     \begin{center}
%!       \setlength{\unitlength}{1mm}
%!      \begin{spacing}{2}
%!       \@thesistitle \\[10mm]
%!       \end{spacing}  
%!       \begin{spacing}{\@defaultbaselinestretch}
%!       \@publicationno
%!       \thesisauthor, \thesisdegreeabbreviation \\
%!       \@universityname, \thesisyear \\[10mm]
%!       \end{spacing}
%!       Supervisor: \thesissupervisor \\
%!     \end{center}
%!     \vspace{5mm}
     \begin{spacing}{\@defaultbaselinestretch} \noindent}
    {\end{spacing}\newpage}           

%%%
%%% Environment to generate abbreviations page.
%%%
\newenvironment{thesisabbreviations}
    {%\doublespace\small\normalsize
     \chapter*{\@thesisabbreviationhead
         \@mkboth{\uppercase{\@thesisabbreviationhead}}
                 {\uppercase{\@thesisabbreviationhead}}}
     \addcontentsline{toc}{chapter}{\@thesisabbreviationhead}
     \begin{spacing}{\@defaultbaselinestretch}}
    {\end{spacing}
%!                \par \vspace{20mm}
%!                \raggedleft \@thesisacknowledgmentsigname \\[10mm]
%!                \raggedright \@thesisacknowledgmentsigplace 
            \newpage}
%%%
%%% Environment to generate vita page.
%%%
\newenvironment{thesisauthorvita}
    {\clearpage
     \chapter*{\@thesisvitahead
         \@mkboth{\uppercase{\@thesisvitahead}}
                 {\uppercase{\@thesisvitahead}}}
    \addcontentsline{toc}{chapter}{\@thesisvitahead}
    \begin{spacing}{\@defaultbaselinestretch}}
    {\end{spacing} \par \vspace{20mm}
     \noindent Permanent Address:
       \begin{minipage}[t]{90mm}
         \thesisauthoraddress
       \end{minipage}
     \par \vspace{15mm}
     \noindent This \lowercase\expandafter{\thesistype} was
       typeset with \LaTeXe\footnote{\LaTeXe{} is an extension of \LaTeX.
       \LaTeX{} is a collection of macros for \TeX.  \TeX{} is a
       trademark of the American Mathematical Society. The style
    package {\em wthesis} was used.         %! replaces texas ack.
    } by \thesistypist.}

\newcommand{\@chapteralignment}{\centering}
\renewcommand{\chapter}{\clearpage
   \ifnum\@appendix=1
     \renewcommand{\@chaptertype}{\appendixname}
   \else
     \renewcommand{\@chaptertype}{\chaptername}
   \fi
   \thispagestyle{plain}%
   \global\@topnum\z@
   \@afterindentfalse
   \secdef\@chapter\@schapter
   }
\renewcommand\appendix{\par
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \renewcommand{\@chapapp}{\appendixname}%
  \renewcommand{\thechapter}{\Alph{chapter}}
  \renewcommand{\@appendix}{1}}

%%%
%%% Define chapter heading placement commands.
%%%
\newcommand{\leftchapter}{
    \renewcommand{\@chapteralignment}{\raggedright}}
\newcommand{\centerchapter}{
    \renewcommand{\@chapteralignment}{\centering}}
\newcommand{\rightchapter}{
    \renewcommand{\@chapteralignment}{\raggedleft}}

%%%
%%% Command from report.cls, (c) LaTeX3 Project.
%%%
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                      \refstepcounter{chapter}%
                      \typeout{\@chapapp\space\thechapter.}%
                      \addcontentsline{toc}{chapter}%
                          {\@chaptertype{} \protect\numberline{\thechapter}#1}%
                    \else
                      \addcontentsline{toc}{chapter}{\@chaptertype{} #1}
                    \fi
                    \ifnum\value{chapter}=1
                      \ifnum\@appendix=0
                        \pagestyle{\@textpagestyle}
                        \pagenumbering{\@textpagenumbering}
                      \fi
                    \fi
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi
                    }

%%%
%%% Command from report.cls, (c) LaTeX3 Project.
%%%
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \@chapteralignment \reset@font
    \ifnum \c@secnumdepth >\m@ne
      \huge\bfseries \@chapapp{} \thechapter
      \par
      \vskip 20\p@
    \fi
    \Huge \bfseries #1\par
    \nobreak
    \vskip 40\p@
  }}
\def\@makeschapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \@chapteralignment
    \reset@font
    \Huge \bfseries  #1\par
    \nobreak
    \vskip 40\p@
  }}

%%%
%%% Command from report.cls, (c) LaTeX3 Project.
%%%


%\renewenvironment{thebibliography}[1]
%     {\chapter*{\bibname
%         \@mkboth{\uppercase{\bibname}}{\uppercase{\bibname}}}%
%      \addcontentsline{toc}{chapter}{\bibname}
%      \list{\@biblabel{\arabic{enumiv}}}%
%           {\settowidth\labelwidth{\@biblabel{#1}}%
%            \leftmargin\labelwidth
%            \advance\leftmargin\labelsep
%            \if@openbib
%              \advance\leftmargin\bibindent
%              \itemindent -\bibindent
%              \listparindent \itemindent
%              \parsep \z@
%            \fi
%            \usecounter{enumiv}%
%            \let\p@enumiv\@empty
%            \renewcommand\theenumiv{\arabic{enumiv}}}%
%      \if@openbib
%        \renewcommand\newblock{\par}
%      \else
%        \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
%      \fi
%      \sloppy\clubpenalty4000\widowpenalty4000%
%      \sfcode`\.=\@m}
%     {\def\@noitemerr{\@warning{Empty `thebibliography' environment}}%
%      \endlist}

%%%
%%% Command from report.cls, (c) LaTeX3 Project.
%%%
\renewcommand\listoftables{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listtablename
      \@mkboth{\uppercase{\listtablename}}{\uppercase{\listtablename}}}%
    \addcontentsline{toc}{chapter}{\listtablename}
    \@starttoc{lot}%
    \if@restonecol\twocolumn\fi
    }
\renewcommand\listoffigures{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listfigurename
      \@mkboth{\uppercase{\listfigurename}}%
              {\uppercase{\listfigurename}}}%
    \addcontentsline{toc}{chapter}{\listfigurename}
    \@starttoc{lof}%
    \if@restonecol\twocolumn\fi
    }
\renewcommand\tableofcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\contentsname
        \@mkboth{\uppercase{\contentsname}}{\uppercase{\contentsname}}}%
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
    }

%%%
%%% Command to print draft version of the thesis.
%%%
\newcommand{\thesisdraft}{
    \setlength{\topmargin}{0in}
    \setlength{\headheight}{0.2in}
    \setlength{\headsep}{0.25in}
    \renewcommand{\@textpagestyle}{myheadings}
    \def\ps@myheadings{%
     \let\@oddfoot\@empty\let\@evenfoot\@empty
     \def\@oddhead{\textsl{Draft of \timestamp}\hfil\thepage}%
     \let\@mkboth\@gobbletwo
     \let\chaptermark\@gobble
     \let\sectionmark\@gobble}
    }

%%%
%%% Code to compute current timestamp.  Some parts by Martin Minow.
%%%
\newcount\hour \newcount\minute
\hour=\time  \divide \hour by 60
\minute=\time
\loop \ifnum \minute > 59 \advance \minute by -60 \repeat
\def\thesistime{\ifnum \hour<13 \number\hour:%
                      \ifnum \minute<10 0\fi
                      \number\minute
                      \ifnum \hour<12 \ am\else \ pm\fi
         \else \advance \hour by -12 \number\hour:%
                      \ifnum \minute<10 0\fi
                      \number\minute \ pm\fi}

\def\thesisdate{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year}

\newcount\dow
\newcount\leap
\newcount\x
\newcount\y

%leap = year + (month - 14)/12
\leap=\month \advance\leap by -14 \divide\leap by 12
  \advance\leap by \year

%dow = (13 * (month + 10 - (month + 10)/13*12) - 1)/5
\dow=\month \advance\dow by 10
  \y=\dow \divide\y by 13 \multiply\y by 12
  \advance\dow by -\y \multiply\dow by 13 \advance\dow by -1 \divide\dow by 5

%dow += day + 77 + 5 * (leap % 100)/4
\advance\dow by \day \advance\dow by 77
  \x=\leap \y=\x \divide\y by 100 \multiply\y by 100 \advance\x by -\y
  \multiply\x by 5 \divide\x by 4 \advance\dow by \x

%dow += leap / 400
\x=\leap \divide\x by 400 \advance\dow by \x

%dow -= leap / 100 * 2;
%dow = (dow % 7)
\x=\leap \divide\x by 100 \multiply\x by 2 \advance\dow by -\x
  \x=\dow \divide\x by 7 \multiply\x by 7 \advance\dow by -\x

\def\thesisdayofweek{\ifcase\dow
Sunday\or Monday\or Tuesday\or
Wednesday\or Thursday\or Friday\or Saturday\fi}

\def\timestamp{\thesistime, \thesisdayofweek, \thesisdate}

%%%
%%% Commands for spacing.  Some parts from spacing.sty by Stephen Page.
%%% 
\ifx\undefined\selectfont
\def\@setsize#1#2#3#4{\@nomath#1
   \let\@currsize#1\baselineskip
   #2\baselineskip\baselinestretch\baselineskip
   \parskip\baselinestretch\parskip
   \setbox\strutbox\hbox{\vrule height.7\baselineskip
      depth.3\baselineskip width\z@}
   \normalbaselineskip\baselineskip#3#4}
\else
\def\@newbaseline{%
    \ifx\undefined\setnew@baselineskip
      \baselineskip\f@baselineskip\relax
    \else
      \setnew@baselineskip
    \fi
    \baselineskip\baselinestretch\baselineskip
    \setbox\strutbox\hbox{\vrule\@height.7\baselineskip
    \@depth.3\baselineskip \@width\z@}%
    \normalbaselineskip\baselineskip}
\fi
%%%
%%% Reset baselinestretch within footnotes and floats. Originally stolen
%%% from Stanford thesis style.
%%%
\def\@xfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
   \@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner
      \@parmoderr\@floatpenalty\z@
    \else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
       \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
       \@tfor \@tempa :=#2\do
                        {\if\@tempa h\advance\@tempcnta \@ne\fi
                         \if\@tempa t\advance\@tempcnta \tw@\fi
                         \if\@tempa b\advance\@tempcnta 4\relax\fi
                         \if\@tempa p\advance\@tempcnta 8\relax\fi
         }\global\count\@currbox\@tempcnta}\@fltovf\fi
    \global\setbox\@currbox\vbox\bgroup 
    \def\baselinestretch{1}
    \ifx\undefined\selectfont
    \small\normalsize
    \else
    \@newbaseline
    \fi
    \boxmaxdepth\z@
    \hsize\columnwidth \@parboxrestore}
\long\def\@footnotetext#1{\insert\footins{\def\baselinestretch{1}\footnotesize
    \interlinepenalty\interfootnotelinepenalty 
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
    \hsize\columnwidth \@parboxrestore
   \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
    {\rule{\z@}{\footnotesep}\ignorespaces
      #1\strut}}}
%%%
%%% Stolen from MIT.
%%%
\def\spacing#1{\par%
 \begingroup
 \def\baselinestretch{#1}
 \ifx\undefined\selectfont
 \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi
 \else
 \@newbaseline
 \fi}
\def\endspacing{\par
 \vskip \parskip
 \vskip \baselineskip
 \endgroup
 \vskip -\parskip
 \vskip -\baselineskip}
