%
% Copyright (C) 2000 Sergio Mendoza <sergio@mrao.cam.ac.uk>
% Astrophysics Group
% Cavendish Laboratory
% Cambridge UK
% Last modified: Tue Jun 27 15:08:43 BST 2000
% 
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
% 
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
% 
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
%
%
% Latex style modifications for a Thesis (or a book).
% Written by 
% Sergio Mendoza
% Churchill College
% Cambridge UK
% Summer 1998

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%DO NOT MODIFY THIS FILE UNLESS YOU REALLY KNOW WHAT YOU ARE DOING%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage[small,bf]{caption}

% We want to use fancy pages, don't we?
\pagestyle{fancy}

% This puts a fancy line on the headings.     
\fancyhf{}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}

% This redefines how a plain page looks like
\fancypagestyle{plain}{
			\fancyhead{}
			\renewcommand{\headrulewidth}{0pt}
}

% Set length of headers & footers = width of text:
\setlength{\headwidth}{\textwidth}

% Make height of head a bit bigger than 15pt in case we 
% use 11pt size letter:
\setlength{\headheight}{14pt}

% Make captions look beautiful:
\setlength{\captionmargin}{20pt}
% This puts the \S before any section (and hence any subsection)
\renewcommand{\thesection}{\ensuremath{\S}\thechapter.\arabic{section}}   

% Delete the word Chapter in the \chaptermark:
\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase
             {\thechapter. #1}}{}}

% Define a new command for clearing pages before starting a new chapter:
\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}
            \cleardoublepage}}
