%
%   Stylefile LaTeX2e for
%   Mitteilungen der Mathematischen Gesellschaft in Hamburg
%   mathges.sty
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Created 17.12.1998, Hubert Kiechle, 
%     kiechle@math.uni-hamburg.de
%  Update 11. 7. 2000
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  You can do what ever you want to this file, but, if so, you 
%   MUST  give it another name!!
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Please use `\maketitle' in the usual way.
% The command `\address' should be used for the addresses of the
% authors, once per address. Please use newlines in your address as it
% is customary in your country, and denote it by `\\'. To avoid underfull
% \hbox-es, do not put `\\' at the end of an address.
% The addresses will show up at the end of the paper. 
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Here's a sample skeleton that works:
%
%\documentclass{article}
%\usepackage{...}
%  ...
%\usepackage{mathges}
%
%%\markboth{Author names  or  \relax}{Short title if distinct from title}
%       % To be used only if Authors or Title deviate from below
%
%\begin{document}
%
%\title{ ... } % if you have to do a linebreak within the title,
%   % please, do it by hand at an appropriate place using \\[1mm]
%   % In such case the use of  \markboth  is recommended
%
%\author{First A.~Author, Second B.~Otherauthor and Third Xtra}
%\address{First A.~Author\\ 
%  Mathematisches Seminar\\
%  Universit\"at Hamburg\\
%  Bundesstra\ss{}e~55\\
%  20146~Hamburg, Germany}
%\address{Second B.~Author\\ 
%  ... }
%\address{Third Xtra\\
%  ... }
%
%\maketitle
%
%%\begin{abstract}
%% ... ( your abstract )
%%\end{abstract}  % notice that \abstact{ ... } gives bad results.
%                 %  optional !!
%
%\section{ ... }
% ...
%
%\end{document}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Beginning of stylefile
%
\def\section{\@startsection{section}{1}{\z@}%
               {-3.5ex \@plus -1ex \@minus -.2ex}%
               {2.3ex \@plus.2ex}%
               {\normalfont\normalsize\bfseries}}
\def\subsection{\@startsection{subsection}{2}{\z@}%
                  {-3.25ex\@plus -1ex \@minus -.2ex}%
                  {1.5ex \@plus .2ex}%
                  {\normalfont\normalsize\bfseries}}

\@twosidetrue  \@mparswitchtrue

\let\m@rkboth=\markboth%  auto-\markboth
\let\h@ed@uthor\relax  %  Nicht in ver"offentlichte Version
\let\h@ed@title\relax  %
\def\markboth#1#2{\gdef\h@ed@uthor{#1}\gdef\h@ed@title{#2}}

\let\dedic@tion\relax
\def\dedication#1{\gdef\dedic@tion{#1}}

\renewcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \global\@topnum\z@   % Prevents figures from going at top of page.
      \@maketitle
    \fi
    \if\h@ed@uthor\relax{\global\let\h@ed@uthor=\@author}\fi
    \if\h@ed@title\relax{\gdef\thanks##1{}\global\let\h@ed@title=\@title}\fi
    \m@rkboth{\h@ed@uthor}{\h@ed@title}
    \thispagestyle{empty}\@thanks % evt. auch {plain}
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
\def\@maketitle{%
  \null
  \begin{center}%
    \let \footnote \thanks
    \textbf{\large\@title} \par%
    \vskip.3cm
  \if\dedic@tion\relax\vskip.2truecm
        \else{\it \dedic@tion }\vskip.4truecm
  \fi%
    {\sc\@author}%
  \end{center}%
  \par
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Mitt. Math. Ges. ...
%
\def\MM@thGesHH{\vspace*{-31pt}{\small
    \centerline{Mitt.~Math.~Ges.~Hamburg
       {\bf \b@ndnr} (\b@ndj@hr), \thepage--\l@stp@genr}}%
}

\gdef\b@ndnr{??}\gdef\b@ndj@hr{????}
\def\band#1#2{\gdef\b@ndnr{#1}\gdef\b@ndj@hr{#2}}
\gdef\l@stp@genr{0}
\def\setlastpagenr#1{\if0\l@stp@genr\gdef\l@stp@genr{#1}\fi}

\AtBeginDocument{\MM@thGesHH}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  myheadings 
%
\def\ps@myheadings{%
    \let\@oddfoot\@empty\let\@evenfoot\@empty
    \def\@evenfoot{\small\thepage\hfil\hbox{}}%
    \def\@oddfoot{\small\hbox{}\hfil\thepage}%
    \def\@evenhead{\hbox{}\hfil{\leftmark}\hfil\hbox{}}%
    \def\@oddhead{\small\hbox{}\hfil{\rightmark}\hfil\hbox{}}%
    \let\@mkboth\@gobbletwo
    \let\sectionmark\@gobble
    \let\subsectionmark\@gobble
    }

\pagestyle{myheadings}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  AtEndDocument-stuff, Addresses etc.
%
\let\received@=\relax
\let\revised@=\relax
\def\received#1{\gdef\received@{Eingegangen am #1}}
\def\revised#1{\gdef\revised@{; in revidierter Fassung am #1}}

\newif\ifw@ible\w@iblefalse
\def\weiblich{\w@ibletrue}

\newcount\@drlfn  \@drlfn=0

\gdef\@ddressA{\relax}\gdef\@ddressB{\relax}

\def\address#1{\global\advance\@drlfn by1
  \ifcase\@drlfn\or\gdef\@ddressA{#1}\or\gdef\@ddressB{#1 }
     \or\gdef\@ddressC{#1 }\or\gdef\@ddressD{#1 }
     \or\gdef\@ddressE{#1 }\or\gdef\@ddressF{#1 }
     \else{\message{Error in `address', to many addresses}}
  \fi}% read in addresses, not more that 6

\def\@uthor@ddress#1#2{{\noindent\lineskip=2pc%
   \hbox{\vtop{\hsize=.5\hsize #1}}\hbox{\vtop{\hsize=.5\hsize #2}}
   \par
}}

\def\enddoc@text{\vskip12pt minus10pt%
  \noindent\small%
  \centerline{\received@\revised@}% Eingang ...
  \vskip20pt minus10pt
%   \ifnum\@drlfn>1
%     \ifw@ible{\it Adresse der Autorinnen:\\[5pt]}
%      \else{\it Adresse der Autoren:\\[5pt]}
%     \fi\else
%     \ifw@ible{\it Adresse der Autorin:\\[5pt]}
%      \else{\it Adresse des Autors:\\[5pt]}
%     \fi
%   \fi
  \ifodd\@drlfn\address\relax\fi % \@drlfn is now even
  \divide\@drlfn by2                 % how many \@thor@ddress
  \@uthor@ddress\@ddressA\@ddressB   % one is always there
  \ifnum\@drlfn>1{%\vskip2pt% minus10pt
    \@uthor@ddress\@ddressC\@ddressD
    \ifnum\@drlfn>2{\@uthor@ddress\@ddressE\@ddressF}\fi}
  \fi
  \write1{\string\setlastpagenr{\thepage}}% into ``.aux'', quick & dirty
}% put everything together

\AtEndDocument{\enddoc@text}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  formating
%
\textheight18.5cm
\textwidth12cm
\headsep 10pt%
\hoffset1in%
\voffset.5in%
\evensidemargin 0pt%
\oddsidemargin 0pt%
\parskip0.5ex
\parindent0pt
\flushbottom

