%%
%% This is file `mpshead.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% mpshead.dtx  (with options: `package')
%% =============================================
%% IMPORTANT NOTICE:
%% This is a generated file.
%% 
%% It is subject to the same copyright conditions (see below)
%% as in the original file: mpshead.dtx.
%% It may not be distributed without mpshead.dtx.
%% 
%% Full documentation can be obtained by LaTeXing that original file.
%% Only a few abbreviated comments remain here to describe the usage.
%% =============================================
%% Copyright 2004 Patrick W Daly
%% Max-Planck-Institut f\"ur Sonnensystemforschung
%% Max-Planck-Str. 2
%% D-37191 Katlenburg-Lindau
%% Germany
%% E-mail: daly@mps.mpg.de
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{mpshead}
            [2004/07/06 1.0 (PWD)]
 % Use just as usual. Works with and without titlepage option
 % For twocolumn, no titlepage, the abstract is written wide over
 % the two columns.
 % Takes options:
 %  color colour   for coloured logo and institute name (default)
 %  bw  sw         for black&white logo and name
 % Additional commands:
 % \reportno{MPS-xxxx} adds report number at top.
 % \pagestyle{mpshead} or better \thispagestyle{mpshead} puts a head
 %   on pages for documents without title pages
 % Makes use of authblk package to enter authors and affiliations either in
 % the standard manner with
 %     \author{ ...  \and ... \and ...}
 % or with alternative
 %     \author{..} \author{..} \affil{..}
 %     \author{..} \author{..} \affil{..}
 % where each \author contains a single name, and \affil applies to all
 % previous authors. Explicit footnote markers can be given with optional
 % arguments \author[1]{..} .. \affil[1]{..}
 %-----------------------------------------------------------
\newif\if@kolor \@kolortrue
\DeclareOption{bw}{\@kolorfalse}
\DeclareOption{sw}{\@kolorfalse}
\DeclareOption{color}{\@kolortrue}
\DeclareOption{colour}{\@kolortrue}
\ProcessOptions
\if@kolor
  \RequirePackage{color}
  \definecolor{mpg}{rgb}{.187,.613,.594}
  \newcommand*\mpgcol{\leavevmode\color{mpg}}
  \newcommand*\mpslogo{mps_color}
\else
  \let\mpgcol=\relax
  \newcommand*\mpslogo{mps_grau}
\fi
\RequirePackage{graphicx}
\newcommand{\headfnt}{\rmfamily\fontsize{17}{24pt}\selectfont\mpgcol}
\newcommand{\addfnt}{\slshape\fontsize{12}{14pt}\selectfont\mpgcol}
\newcommand{\makehead}{%
  \raisebox{60\p@}[\z@]{\makebox[\textwidth][r]{\small\@reportno}}
     \vspace{10\p@}
     \mpsline
     \vspace{30\p@}}
\newcommand{\mpsline}{%
      \parbox[c]{45em}{\centering
         \parbox[c][\z@][b]{\z@}{%
         \makebox[\z@][c]{%
        \includegraphics[width=11em,clip]{\mpslogo}}}\\[1em]
        {\headfnt Max-Planck-Institut f\"ur Sonnensystemforschung}\\[.5em]
        \normalfont
        \addfnt Katlenburg-Lindau, \BRD\vspace{.5em}}%
}
\newcommand{\BRD}{\ifnum\language=\l@english
       Germany \else
  \ifnum\language=\l@german
       Deutschland \else
  \ifnum\language=\l@french
       Allemagne
       \fi\fi\fi}

\@ifundefined{l@english}{\chardef\l@english=0}{}
\@ifundefined{l@german}{\chardef\l@german=1}{}
\@ifundefined{l@french}{\chardef\l@german=2}{}
\newcommand{\reportno}[1]{\renewcommand{\@reportno}{#1}}
\newcommand{\@reportno}{}
\providecommand{\abstractname}{Abstract}
\renewcommand{\maketitle}{\if@titlepage
 \gdef\xmaketitle{\begin{titlepage}%
 \let\footnotesize\small
 \let\footnoterule\relax
 \def\thefootnote{\fnsymbol{footnote}}%
 \setcounter{page}{0}%
 \null
 \begin{center}%
 \reset@font\makehead
 \vfil
 \vskip 60\p@
   {\LARGE \@title \par}%
   \vskip 3em
   {\lineskip .75em
    \reset@font\normalsize
    \begin{center}
       \@author
    \end{center}\par}%
    \vskip 1.5em
   {\reset@font\large \@date \par}%
\end{center}\par
\@thanks
\vfil
\null
\end{titlepage}%
\setcounter{footnote}{0}%
\global\let\xmaketitle\relax
\global\let\@maketitle\relax
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax
\ifdim\wd\@abstract=0pt\else
 \titlepage\null\vfil
 \begin{center}\reset@font\bfseries\abstractname\end{center}%
 \unhbox\@abstract
 \par\vfil\null\endtitlepage
\fi}
\else \gdef\xmaketitle{\par
 \begingroup
   \def\thefootnote{\fnsymbol{footnote}}%
   \def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}}
    \long\def\@makefntext####1{\parindent 1em\noindent
            \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}####1}%
   \if@twocolumn
     \twocolumn[\@maketitle]%
     \else \newpage
     \global\@topnum\z@
     \@maketitle \fi\thispagestyle{plain}\@thanks
 \endgroup
 \setcounter{footnote}{0}%
 \global\let\xmaketitle\relax
 \global\let\@maketitle\relax
 \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}
  \fi \global\let\maketitle\relax}
\providecommand{\@maketitle}{}
\renewcommand{\@maketitle}{%
 \newpage
 \begin{center}%
 \reset@font\makehead
 \vskip 2em
  {\reset@font\LARGE \@title \par}%
  \vskip 1.5em
   {\lineskip .75em
    \reset@font\normalsize
    \begin{center}
        \@author
    \end{center}\par}%
  \vskip 1em
  {\large \@date}%
 \end{center}%
 \par
 \vskip 1.5em
 \ifdim\wd\@abstract=0pt\else
  \begin{center}%
   {\reset@font\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
  \end{center}%
  \begin{quotation}\reset@font\small\unhbox\@abstract\end{quotation}
 \fi}
\newcommand{\xmaketitle}{}
\renewcommand{\and}
  {\end{center}\hskip 1em plus .17fil\begin{center}}
\RequirePackage[auth-sc-lg,affil-it]{authblk}
\setlength{\affilsep}{0.5ex}
\renewcommand{\Authand}{\ifnum\language=\l@english\ and \else
                        \ifnum\language=\l@german\ und \else
                        \ifnum\language=\l@french\ et \fi\fi\fi}
\renewcommand{\Authands}{\ifnum\language=\l@english, and \else
                        \ifnum\language=\l@german\ und \else
                        \ifnum\language=\l@french\ et \fi\fi\fi}
\newbox\@abstract
\setbox\@abstract\hbox{}

\renewenvironment{abstract}{\global\setbox\@abstract\hbox\bgroup
  \if@titlepage\else\reset@font\small\fi}
  {\egroup\maketitle\xmaketitle}
\@ifundefined{part}{}
  {\newcommand{\xpart}{}\let\xpart\part
   \renewcommand{\part}{\xmaketitle\xpart}}
\@ifundefined{chapter}{}
  {\newcommand{\xchapter}{}\let\xchapter\chapter
   \renewcommand{\chapter}{\xmaketitle\xchapter}}
\@ifundefined{section}{}
  {\newcommand{\xsection}{}\let\xsection\section
   \renewcommand{\section}{\xmaketitle\xsection}}
\newcommand{\noabstract}{\xmaketitle}
\def\ps@mpshead{%\def\@oddfoot{}\def\@evenfoot{}
  \def\@oddhead{\hbox to \hsize{\vbox to \headheight{\centering\vss\mpsline}}}
  \let\@evenhead=\@oddhead}

%% 
%% <<<<< End of generated file <<<<<<
%%
%% End of file `mpshead.sty'.
