% Lehigh University thesis style.

% Based on Stanford University PhD thesis style -- modifications to

% the report/book styles.

% For LaTeX version 2.09

%

% Stanford University Editors:

%   Last edit Tue Sep 13 14:40:26 1988

%   Last edit by Joseph Pallas

%

% Lehigh University Editors:

%   Last edit Wed Feb 13 13:15:42 EST 1991

%   Last edit by Binod Taterway

%	7/10/92 - Fixed pagestyles among other corrections/enhancements.

%



%\typeout{Document Style Option `luthesis' <July 92>.}            



\long\def\comment#1{}        

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Single sided vs. double sided:

%	\doublesidedfalse - single sided

% \doublesidedtrue - double sided



\newif\ifdoublesided

\doublesidedtrue



% We need 1" margins except on the binding edge, where it is 1 1/2"

% Theses are single-sided, so we don't care about \evensidemargin



\def\doublesidedmargins{%

 \oddsidemargin 0.375in \evensidemargin -0.125in

 \marginparwidth 40pt \marginparsep 10pt

 \topmargin 0pt \headsep .4in

 \textheight 8.0in \textwidth 5.9in%

}



\def\singlesidedmargins{%

 \oddsidemargin 0.5in \evensidemargin 0.5in

 \marginparwidth 40pt \marginparsep 10pt

 \topmargin 0pt \headsep .4in

 \textheight 8.0in \textwidth 5.9in%

}



\ifdoublesided

 \doublesidedmargins

\else

 \singlesidedmargins

\fi



% Disallow page breaks at hyphens (this will give some underfull vbox's,

% so an alternative is to use \brokenpenalty=100 and manually search

% for and fix such page breaks).



\brokenpenalty=10000



% Use 1.3 times the normal baseline-to-baseline skip.



\renewcommand{\baselinestretch}{1.3}



% Redefine the macro used for floats (including figures and tables)

% so that single spacing is used.

% (Note \def\figure{\@float{figure}set single spacing} doesn't work

% because figure has an optional argument.)



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



\def\footnoterule{\kern-3\p@   
  \hrule width .4\columnwidth 
  \kern 2.6\p@}                 % The \hrule has default height of .4pt .

% \newcounter{footnote}
\@addtoreset{footnote}{chapter}  % Numbers footnotes within chapters

\long\def\@makefntext#1{\parindent 1em\noindent 
            \hbox to 1.8em{\hss$^{\@thefnmark}$}#1}
%\end{comment}
% Commands \author, \title are defined in book; here are the rest of the

% front matter defining macros.

\def\dept#1{\gdef\@dept{#1}}

\def\degree#1{\gdef\@degree{#1}}

\def\doctype#1{\gdef\@doctype{#1}}

\def\principaladviser#1{\gdef\@principaladviser{#1}}

\def\advis@r{Adviser} % default spelling

\def\principaladvisor#1{\gdef\@principaladviser{#1}\gdef\advis@r{Advisor}}

\def\firstreader#1{\gdef\@firstreader{#1}}

\def\secondreader#1{\gdef\@secondreader{#1}}

\def\thirdreader#1{\gdef\@thirdreader{#1}}


\def\submitdate#1{\gdef\@submitdate{#1}}

%\def\copyrightyear#1{\gdef\@copyrightyear{#1}} % \author, \title in report

%\def\@title{}\def\@author{}

%\def\@dept{Computer Engineering}

%\def\@degree{Master of Science}



\def\@principaladviser{}
\def\@firstreader{}
\def\@secondreader{}
\def\@thirdreader{}



% Lehigh does not require month to be reported on the title page.

%\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}



\def\@submitdate{\space \number\the\year}



% Stanford says that December theses should have the next year as the

% copyright year.

% Don't know what Lehigh says, but leave it for now.




\newif\ifdissertation

\dissertationfalse



\def\titlep{%

	\thispagestyle{empty}%

	\vskip0.5in%

	\begin{center}

		\huge\normal\expandafter{\@title}

	\end{center}

	\vfill

	\begin{center}

		\rm by \\
		
                         \vfill
                 
		\@author \\

	\end{center}

	\vfill

	\begin{center}

		\rm A \expandafter{\@doctype} \\

		Presented to the Graduate Committee \\

		of Lehigh University \\

		in Candidacy for the Degree of \\

		\expandafter{\@degree} \\

		in \\

		\expandafter{\@dept}

	\end{center}

	\vfill

	\begin{center}

		\bf Lehigh University \\

		\expandafter{\@submitdate} \\

	\end{center}\vskip.5in\newpage}


\pagebreak


\long\def\signature#1{%

\begin{center}

\begin{minipage}{4.0in}

\vspace{.5in}

\hbox to \textwidth{\hfill\shortstack{\vrule width 3in height 0.4pt\\#1}}

\end{minipage}

\end{center}}



\def\signaturepage{%

{\parindent=0pt

This \lowercase\expandafter{\@doctype} is accepted in partial

fulfillment of the requirements for the degree of

\expandafter{\@degree}}.

\par

	\begin{minipage}{3in}

	\vspace{1.0in}

	{\parindent=0pt

	 \shortstack{\vrule width 2.5in height 0.4pt\\(Date)}}

	\end{minipage} \hfill

	\vspace{.3in}

	\signature{\@principaladviser}

	\vfill

	\signature\@firstreader

	\vfill

	\ifdissertation

		\signature\@secondreader

		\vfill

		\signature\@thirdreader

		\vfill

	\fi

	\vspace{1in}}





\def\beforepreface{

	\pagenumbering{roman}

	\pagestyle{plain}

           % \def\@doctype{Thesis}		% set default to be `thesis'

	\ifdissertation

		\typeout{(dissertation)}

		\def\@doctype{Dissertation}

		\def\@degree{Doctor of Philosophy}

	\else

		\typeout{(thesis)}

		\def\@doctype{Thesis}

		\def\@degree{Master of Science}

	\fi

	\titlep

         \ifcopyright\copyrightpage\fi
         
	\signaturepage}



\def\prefacesection#1{%

	\chapter*{#1}

	\addcontentsline{toc}{chapter}{#1}}


\def\afterpreface{\newpage

	\tableofcontents

               \newpage

	        \iftablespage
	        
		\listoftables
		
		\newpage

	\fi

	\iffigurespage

		\listoffigures
		
		\newpage

		%\listofequations
		%\newpage

	\fi

	\pagenumbering{arabic}

	\pagestyle{headings}}



% Redefine \thebibliography to go to a new page and put an entry in the

% table of contents

\let\@ldthebibliography\thebibliography

\renewcommand{\thebibliography}[1]{\newpage

	\addcontentsline{toc}{chapter}{Bibliography}

	\@ldthebibliography{#1}}



% Fix pagestyles. Keep pagenumbers at the bottom.



\mark{{}{}}


\def\ps@headings{\let\@mkboth\markboth

\def\@oddfoot{\hfil \rm \thepage \hfil}

\def\@evenfoot{\hfil \rm \thepage \hfil}

%\def\@evenhead{\hfil \sl \leftmark}

\def\@oddhead{\hbox{}\sl \rightmark \hfil}

\def\chaptermark##1{\markboth {\normalsize{\ifnum \c@secnumdepth
>\m@ne
\@chapapp\ \thechapter. \ \fi ##1}}{}}
 
 \def\sectionmark##1{\markright
{\normalsize{\ifnum \c@secnumdepth >\z@
 \thesection. \ \fi ##1}}}}



\def\ps@myheadings{\let\@mkboth\@gobbletwo

\def\@oddhead{\hbox{}\sl\rightmark \hfil}

\def\@oddfoot{\hfil \rm \thepage \hfil}

%\def\@evenhead{\hfil\sl\leftmark\hbox{}}

\def\@evenfoot{\hfil \rm \thepage \hfil}

\def\chaptermark##1{}

\def\sectionmark##1{}%

\def\subsectionmark##1{}}


\def\beforepostface{
\pagestyle{plain}}

\def\postfacesection#1{%
\renewcommand{\baselinestretch}{ } \small \normalsize
\chapter*{#1}
\addcontentsline{toc}{chapter}{#1}}

\def\afterpostface{
}

% Start out normal

\pagestyle{headings}

\doublesidedmargins
