% Style file for umu physics.
% Redefines \maketitle 
% and provides the commands \course, \email, and \bottomtext.
% Options: swedish

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{umuphys}[2004/09/02 v2 Umu physics style file]

\DeclareOption{american}{       % Default settings
\def\@univ{UME\AA\ UNIVERSITY}%
\def\@dept{Department of Physics}}%

\DeclareOption{swedish}{        %  For swedish
\def\@univ{UME\AA\ UNIVERSITET}%
\def\@dept{Institutionen f\"or fysik}}%

\ExecuteOptions{american}       % Set up defaults
\ProcessOptions                 % Possibly swedish

% This is a change of "\newcommand\maketitle" in article.cls
\renewcommand\maketitle{\begin{titlepage}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \begin{flushleft}
    \textbf\@univ \hfill \textbf\@date\\
    \textbf\@dept\\
    \textbf\@course
  \end{flushleft}
  \null\vfil
  \vskip 60\p@
  \begin{center}%
    {\LARGE \textbf\@title \par}
    \vskip 2em%
    {\large \lineskip .75em
      \@author \par
      \ifx\@email\undefined\else\texttt{\@email}\par\fi
      \vfill
      \ifx\@bottomtext\undefined
      \else{\normalsize\@bottomtext}
      \fi
    }
  \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\@date\@empty
  \global\let\@title\@empty
  \global\let\@course\@empty
  \global\let\@email\@empty
  \global\let\@bottomtext\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\course\relax
  \global\let\email\relax
  \global\let\bottomtext\relax
  \global\let\date\relax
  \global\let\and\relax
}
\def\course#1{\gdef\@course{#1}}
\def\@course{\@latex@error{No \noexpand\course given}\@ehc}
\def\email#1{\gdef\@email{#1}}
\def\bottomtext#1{\gdef\@bottomtext{#1}}
%\def\@email{\@latex@error{No \noexpand\email given}\@ehc}
