%
% re-defining the plain headings style
% means that the headings work on the contents page.
%

\def\ps@plain{ 
  \let\@mkboth\markboth 
  \def\@oddfoot{
    \footnotesize{ 
      \centerline{\thepage} \hspace*{-\textwidth} \hspace{-5mm} \today \hfill
      \@shortauthor:~\@foottitle}} 
  \def\@oddhead{} 
  \def\@evenfoot{\@oddfoot}
  \def\@evenhead{}
  }

% CHANGE THIS BACK TO cleardoublepage
\def\part{\clearpage \thispagestyle{myheadings} \if@twocolumn \onecolumn
\@tempswatrue \else \@tempswafalse \fi \hbox{}\vfil \secdef\@part\@spart} 

%
% DEFINE HEADERS
%
\if@twoside 
 \def\ps@headings{
  \let\@mkboth\markboth
  \def\@oddfoot{\@rfootmessage}
  \def\@evenfoot{\@lfootmessage}
% in my thesis this was slant upper case (See later for the upper case bit)
%  \def\@evenhead{\rm \thepage\hfil \sl	\leftmark}
%  \def\@oddhead{\hbox{}\sl \rightmark \hfil 	\rm\thepage}
% the 1996 style is 
%  \def\@evenhead{\hbox{}{\sl \leftmark} \hfil \thepage\hspace*{-\margindistance}}
%  \def\@oddhead{\thepage \hfil\hbox{}\sl \rightmark\hspace*{-\margindistance}}
  \def\@evenhead{{\sf \thepage} \hfil {\sl \leftmark}\hspace*{-\margindistance}}
  \def\@oddhead{{\sl \rightmark}  \hfil {\sf \thepage}\hspace*{-\margindistance}}
% jan 2000 added the margindistance feature. see also chapternotes
% for the corresponding footer effect.
% added \thepage too
%  \def\@oddhead{\@foottitle} % booktitle
%
% this next bit was changed Dec 97
%
% this is where the oddhead and evenhead's leftmark and rightmark are defined
%   \def\chaptermark##1{\markboth 
% 	{{\@title}}
% 	{{\ifnum \c@secnumdepth >\m@ne \@chapapp\ \thechapter\ --- \ \fi ##1}}}
% %		This makes it say CHAPTER (thechapter). Introduction to ...
% % for my thesis it was: 
% %	{\uppercase{\@title}}
% %	{\uppercase{\ifnum \c@secnumdepth >\m@ne \@chapapp\ \thechapter. \ \fi ##1}}}
% %%		This makes it say CHAPTER (thechapter). Introduction to ...
% jan 2000 I switched off the ``Chapter''
%     \def\chaptermark##1{\markboth{\@chapapp\ \thechapter\ --- ##1}{\thechapter\ --- ##1}}%
     \def\chaptermark##1{\markboth{\thechapter\ --- ##1}{\thechapter\ --- ##1}}%
     \def\sectionmark##1{\markright{\thesection: ##1}}%
     \def\subsectionmark##1{}
 }
\else \def\ps@headings{\let\@mkboth\markboth
	\def\@oddfoot{\@rfootmessage}\def\@evenfoot{\@rfootmessage}\def\@oddhead{\hbox {}\sl \rightmark \hfil
	\rm\thepage}\def\chaptermark##1{\markright {\uppercase{\ifnum \c@secnumdepth
	>\m@ne
%	 \@chapapp\ \thechapter. \ \fi ##1}}}}
	  \thechapter. \ \fi ##1}}}}
\fi
%
\def\ps@myheadings{  % used for new chapter pages
 \let\@mkboth\@gobbletwo
%
% in 1997, I put the title on new chapters
% \def\@oddhead{\hfill {\sc \@title} \hfill}
% \def\@evenhead{{\sc \@title}\hfill}
% but now this is revoked.
 \def\@oddhead{}
 \def\@evenhead{}
% \def\@evenfoot{{\sc \@foottitle}\hfill}
 \def\chaptermark##1{}%
 \def\sectionmark##1{}
 \def\subsectionmark##1{}
}


%
% added 99 07 27, to make section numbers sit in the left margin
\renewcommand{\@seccntformat}[1]{%
\protect\makebox[0in][r]{%
%\mbox{%
{\csname the#1\endcsname}\hspace{1em}}}
%
