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

\def\cl@chapter{\@elt{section}\@elt{footnote}}
\def\thefigure{\@arabic\c@figure}
\def\thetable{\@arabic\c@table}
\def\theequation{\arabic{equation}}

\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\dept#1{\gdef\@dept{#1}}
\def\principaladviser#1{\gdef\@principaladviser{#1}}
\def\advis@r{Adviser}
\def\principaladvisor#1{\gdef\@principaladviser{#1}\gdef\advis@r{Advisor}}
\def\submitdate#1{\gdef\@submitdate{#1}}
\def\copyrightyear#1{\gdef\@copyrightyear{#1}} % \author, \title in report
\def\@title{}\def\@author{}\def\@dept{computer science}
\def\@principaladviser{}\def\@firstreader{}\def\@secondreader{}
\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}
\ifnum\month=12
    \@tempcnta=\year \advance\@tempcnta by 1
    \edef\@copyrightyear{\number\the\@tempcnta}
\else
    \def\@copyrightyear{\number\the\year}
\fi
\newif\ifcopyright \newif\iffigurespage \newif\iftablespage
\newif\ifsignaturepage \newif\iftitlepage \newif\ifcontentspage
\copyrighttrue \figurespagetrue \tablespagetrue
\signaturepagetrue \titlepagetrue \contentspagetrue

\def\@sigtitle{\@title}
\def\sigtitle#1{\def\@sigtitle{#1}}

\def\titlep{%
	\thispagestyle{empty}%
	\null\vskip1in%
	\begin{center}
		{\Large\uppercase\expandafter{\@title}}
	\end{center}
	\vfill
	\begin{center}
		A Thesis\\
		Presented to the Faculty of the Graduate School\\
		of the College of Computer Science\\
		of Northeastern University\\
		in Partial Fulfillment of the Requirements for the Degree of\\
		\@degree
	\end{center}
	\vfill
	\begin{center}
		\rm by\\
		\@author\\
		\@submitdate\\
	\end{center}\vskip.5in\newpage}

\def\copyrightpage{%
	\null\vfill
	\begin{center}
		\copyright\ \@author, \@copyrightyear\\
		ALL RIGHTS RESERVED\\
	\end{center}
	\vfill\newpage}

\def\@siglen{3truein}
\def\@datelen{1truein}
\def\@ruleht{.1truemm}
\def\@sigline{\\\rule{\@siglen}{\@ruleht}\>\rule{\@datelen}{\@ruleht}\\}

\def\signaturepage{
	\thispagestyle{empty}%
	\begin{centering}
	Graduate School Approval Record\\[6pt]
	NORTHEASTERN UNIVERSITY\\[6pt]
	College of Computer Science\\[14pt]
	\end{centering}

	{\leftskip=1.38in\baselineskip=12pt \noindent\hskip -1.38in
		Dissertation Title: \@sigtitle\par}
	\noindent Author: \@author\\[6pt]
	Approved for Dissertation 
			Requirements for the Doctor of Philosophy Degree:%

	\begin{tabbing}
	\hskip 1truein\=\hskip \@siglen\quad\=\+\kill
	\@sigline
	\@sigline
	\@sigline
	Doctoral Committee\>Date\\
	\@sigline
	Ph.D. Advisor\>Date\\
	\@sigline
	Director of the Graduate School\>Date\\
	\\
	\<Copy Deposited in Library:\\
	\@sigline
	Reference Librarian\>Date
	\end{tabbing}
	\vfill\newpage
	\thispagestyle{empty}%
	\begin{centering}
	Graduate School Approval Record\\[6pt]
	NORTHEASTERN UNIVERSITY\\[6pt]
	College of Computer Science\\[14pt]
	\end{centering}

	{\leftskip=1.38in\baselineskip=12pt \noindent\hskip -1.38in
		Dissertation Title: \@sigtitle\par}
	\noindent Author: \@author\\[6pt]
	Approved for Dissertation Requirements for the Doctor of Philosophy Degree:%

	\begin{tabbing}
	\hskip 1truein\=\hskip \@siglen\quad\=\+\kill
	\@sigline
	\@sigline
	\@sigline
	Doctoral Committee\>Date\\
	\@sigline
	Ph.D. Advisor\>Date\\
	\end{tabbing}
	\vfill\newpage}

\def\@degree{Doctor of Philosophy}
\def\msthesis{\def\@degree{Master of Science}
    \def\signaturepage{
	\thispagestyle{empty}%
	\begin{centering}
	Graduate School Approval Record\\[6pt]
	NORTHEASTERN UNIVERSITY\\[6pt]
	College of Computer Science\\[14pt]
	\end{centering}

	{\leftskip=1in\baselineskip=12pt \noindent\hskip -1in
		Thesis Title: \@sigtitle\par}
	\noindent Author: \@author\\[6pt]

	Approved for Thesis Requirements for the Master of Science Degree:%

	\begin{tabbing}
	\hskip 1truein\=\hskip \@siglen\quad\=\+\kill
	\@sigline
	\@sigline
	Official Readers\>Date\\
	\@sigline
	Thesis Advisor\>Date\\
	\@sigline
	Director of the Graduate School\>Date\\
	\\
	\<Copy Deposited in Library:\\
	\@sigline
	Reference Librarian\>Date
	\end{tabbing}
	\vfill\newpage
	\thispagestyle{empty}%
	\begin{centering}
	Graduate School Approval Record\\[6pt]
	NORTHEASTERN UNIVERSITY\\[6pt]
	College of Computer Science\\[14pt]
	\end{centering}

	{\leftskip=1in\baselineskip=12pt \noindent\hskip -1in
		Thesis Title: \@sigtitle\par}
	\noindent Author: \@author\\[6pt]

	Approved for Thesis Requirements for the Master of Science Degree:%

	\begin{tabbing}
	\hskip 1truein\=\hskip \@siglen\quad\=\+\kill
	\@sigline
	\@sigline
	Official Readers\>Date\\
	\@sigline
	Thesis Advisor\>Date\\
	\end{tabbing}
	\vfill\newpage
	}}		%end of \def\msthesis

\def\beforepreface{
	\pagenumbering{roman}
	\pagestyle{plain}
	\ifsignaturepage\signaturepage\fi
	\setcounter{page}{1}
	\iftitlepage\titlep\fi
	\ifcopyright\copyrightpage\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}

\newenvironment{biography}{
\newpage
\thispagestyle{plain}
\addcontentsline{toc}{chapter}{Biographical Sketch}
\markright{BIOGRAPHICAL SKETCH}
\hfil{\bf Biographical Sketch}\hfil

\bigskip}{}

\newenvironment{abstract}{
\newpage
\thispagestyle{plain}
\addcontentsline{toc}{chapter}{Abstract}
\markright{ABSTRACT}
\hfil{\bf Abstract}\hfil

\bigskip}{}

\renewenvironment{appendix}{
\newpage
\thispagestyle{plain}
\addcontentsline{toc}{chapter}{Appendix}
\markright{APPENDIX}
{\Huge \bf Appendix}

\bigskip}{}
