\makeatletter
%\oddsidemargin 0.5in \evensidemargin 0.5in
%\marginparwidth 40pt \marginparsep 10pt
%\topmargin 0pt \headsep .5in
%\textheight 8.1in \textwidth 6in
\brokenpenalty=10000
\renewcommand{\baselinestretch}{1.3}

\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}\@normalsize
    \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}}}

\def\@degree{Doctor of Philosophy}
\def\degree#1{\gdef\@degree{#1}}

% \school is not used anywere at the moment
%\def\@school{School of Mathematical and Computer Sciences}
%\def\school#1{\gdef\@school{#1}}

\def\submitdate#1{\gdef\@submitdate{#1}}
\def\copyrightyear#1{\gdef\@copyrightyear{#1}} % \author, \title in report
\def\@title{}\def\@author{}
\def\@submitdate{\ifcase\the\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\the\year}
\newif\ifdeclarationpage
\newif\iffigurespage
\newif\iftablespage
\figurespagetrue \tablespagetrue

\def\titlep{%
	\thispagestyle{empty}%
	\null\vskip1in%
	\begin{center}
		\textsc{\Large\expandafter{\@title}}
	\end{center}
	\vfill
	\begin{center}
		\textrm{By\\
		\@author\\}
	\end{center}
	\vfill
	\begin{center}
		A thesis submitted for the degree of\\
                \textbf{\@degree}\\
		of The University of New England\\
		\textit{\@submitdate}\\
	\end{center}
	\vfill\newpage}

\long\def\declaration{%
\begin{center}
\begin{minipage}{\hsize}
\parindent=0pt
\textbf{DECLARATION}\par
\vspace{3cm}
\hbox to \hsize{\hfill{\vrule width \hsize height 0.4pt}}
\vspace{1cm}
{\slshape I certify that the substance of this thesis has not already been
submitted for any degree and is not currently being submitted for any
other degree.

\vspace{.25cm}

I certify that to the best of my knowledge, any help received in
preparing this thesis, and all sources used, have been acknowledged in
this thesis.

\vspace{1cm}

~\hspace{6cm}\dotfill\  ~}
\par\vspace{1cm}
\hbox to \hsize{\hfill{\vrule width \hsize height 0.4pt}}
\end{minipage}
\end{center}}

\def\beforepreface{
	\pagenumbering{roman}
	\pagestyle{plain}
	\titlep
	\ifdeclarationpage\declaration\fi}

\def\prefacesection#1{%
	\chapter*{#1}
	\addcontentsline{toc}{chapter}{#1}}

\def\afterpreface{\newpage
	\tableofcontents
	\newpage
	\iftablespage
		{\addvspace{10pt}
		\let\saveaddvspace=\addvspace
		\def\addvspace##1{}
		\listoftables
		\let\addvspace=\saveaddvspace}
		\newpage
	\fi
	\iffigurespage
		{\addvspace{10pt}
		\let\saveaddvspace=\addvspace
		\def\addvspace##1{}
		\listoffigures
		\let\addvspace=\saveaddvspace}
		\newpage
	\fi
	\pagenumbering{arabic}
	\pagestyle{headings}}

% Start with pagestyle{headings} in case front matter isn't processed
\pagestyle{headings}
\makeatother