%%
%% This is file `cmpreprt.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cmpreprt.dtx 
%%  cmpreprt.dtx
%%  Copyright 2007 Nicola Talbot
%% 
%%  This work may be distributed and/or modified under the
%%  conditions of the LaTeX Project Public License, either version 1.3
%%  of this license of (at your option) any later version.
%%  The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%%  and version 1.3 or later is part of all distributions of LaTeX
%%  version 2005/12/01 or later.
%% 
%%  This work has the LPPL maintenance status `maintained'.
%% 
%%  The Current Maintainer of this work is Nicola Talbot.
%% 
%%  This work consists of the files cmpreprt.dtx and cmpreprt.ins
%%  and the derived file cmpreprt.cls
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cmpreprt}[2010/10/21 (1.02) CMP project reports]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}

\ExecuteOptions{titlepage}
\ProcessOptions*
\LoadClass[a4paper]{article}

\RequirePackage{mathptmx}
\RequirePackage[scaled=0.92]{helvet}
\RequirePackage{courier}
\RequirePackage[left=3.17cm,right=3.17cm,top=2.54cm,bottom=2.54cm]{geometry}
\RequirePackage{caption}
\captionsetup{format=hang,font=bf,tableposition=top,figureposition=bottom}
\captionsetup{font+=it}
\newcommand{\ps@cmpreprttitle}{%
\def\@oddhead{\textbf{\@ccode}}
\def\@evenhead{}
\def\@oddfoot{\bfseries For:
\@supervisor\hfill\makebox[1.2in][l]{Reg:\@regnum}}
\def\@evenfoot{}}

\newcommand{\ps@cmpreprt}{%
\def\@oddhead{}
\def\@evenhead{}
\def\@oddfoot{\parbox[c][\headheight]{\textwidth}{\mbox{}\hrule\mbox{}\\Reg:\@regnum,
Supervisor: \@supervisor\hfill\thepage}}
}

\renewcommand{\maketitle}{%
\begin{titlepage}%
  \thispagestyle{cmpreprttitle}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \null\vskip 20\p@
  \begin{center}%
    {\LARGE\bfseries \@title \par}%
    \vskip 1in%
    {\large\bfseries
     \lineskip .75em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
      \vskip 1.5em%
    {\normalsize\bfseries \begin{tabular}{r}\@regnum\end{tabular}\par}%
  \end{center}\par
  \@thanks
  \vfil\null
  \end{titlepage}%
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\and\relax
}

\iffalse

\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{\bfseries\itshape #1: #2}%
  \ifdim \wd\@tempboxa >\hsize
    \bfseries\itshape #1: #2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}
\fi

\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\scshape}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {-3.25ex \@plus1ex \@minus.2ex}%
                                    {1em}%
                                    {\normalfont\normalsize\bfseries\itshape}}

\def\@ccode{????\typeout{^^JMissing Course Code}}
\newcommand{\ccode}[1]{\renewcommand{\@ccode}{#1}}

\newcommand{\@supervisor}{????\typeout{^^JMissing Supervisor}}
\newcommand{\supervisor}[1]{\renewcommand{\@supervisor}{#1}}

\newcommand{\@numwords}{????}
\newcommand{\numwords}[1]{\renewcommand{\@numwords}{#1}}

\newcommand{\@regnum}{????????\typeout{^^JRegistration number(s) missing}}
\newcommand{\regnum}[1]{\renewcommand{\@regnum}{#1}}

\pagestyle{cmpreprt}


\endinput
%%
%% End of file `cmpreprt.cls'.
