\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mathinfo}
[%$Date: 2007-06-28 15:48:27 +0200 (Do, 28 Jun 2007) $
2007/06/07 v0.1
sty-File fuer Zeitschrift Mathematikinformation
]

\RequirePackage{parskip}
\RequirePackage{mathptmx}
\RequirePackage{a4}

\newif\ifdebug
\debugfalse

\DeclareOption{debug}{\debugtrue}
\ProcessOptions

\hoffset=-13mm%  -39mm ist linker Rand
\voffset=-13mm%  -39mm ist oberer Rand
\textwidth=158mm%  210 - 2*26
\textheight=248mm%  297 - 26 - 23

\parskip=0.7\baselineskip

\pagestyle{empty}
\def\@oddhead{{\reset@font\hfil\thepage\hfil}}

\global\let\MI@author\@empty
\global\let\MI@address\@empty
\global\let\MI@title\@empty
\global\let\MI@abstract\@empty

\def\MIauthor#1{%
  \def\MI@author{#1}%
}

\def\MIaddress#1{%
  \def\MI@address{#1}%
}

\def\MItitle#1{%
  \def\MI@title{#1}%
}

\def\MIabstract#1{%
  \def\MI@abstract{#1}%
}

\def\MIseite#1{%
  \count0=#1%
}

\def\MI@leerzeile{{%
    \fontsize{10}{10}\selectfont%
    \noindent%
    \ifdebug%
    Leerzeile%
    \fi
    \,\par%
  }}


\AtBeginDocument{%
  %\thispagestyle{empty}
  \newskip\orig@MI@@parskip
  \orig@MI@@parskip=\parskip
  \parskip=0pt plus 1pt minus 1pt
  {\fontsize{10}{10}\selectfont%
    \noindent
    \MI@author\,\par
    \MI@leerzeile
    \MI@leerzeile
    \MI@leerzeile 
    \noindent
    {\fontsize{18}{18}\selectfont \MI@title\,\par}
    \MI@leerzeile
    \MI@leerzeile
    \noindent
    {\fontsize{10}{10}\selectfont \MI@abstract\,\par}
    \vspace{-10pt}
%    \MI@leerzeile
%    \MI@leerzeile
  }
  \parskip=\orig@MI@@parskip
}

\AtEndDocument{%
  {\fontsize{10}{10}\selectfont%
    \par%
    \noindent
    \MI@address%
    }%
}


\newlength\MI@leerzeile@skip
%\MI@leerzeile@skip=\baselineskip 
%\advance\MI@leerzeile@skip by 0pt plus .2\MI@leerzeile@skip minus .2\MI@leerzeile@skip

\renewcommand{\thesection}{\@arabic\c@section.} 
\renewcommand{\thesubsection}{\thesection\@arabic\c@subsection}
\renewcommand\section{%
  \@startsection {section}{1}{\z@}%
  {22pt plus 2pt minus 1pt}%
  {.1pt}%
  {\normalfont\fontsize{16}{16}\selectfont}%
}

\renewcommand\subsection{%
  \@startsection{subsection}{2}{\z@}%
  {12pt plus 2pt minus 1pt}%}%
  {.1pt}%
  {\normalfont\fontsize{14}{14}\selectfont}%
}

\renewcommand\subsubsection{%
  \@startsection{subsubsection}{3}{\z@}%
  {10pt plus 2pt minus 1pt}%}%
  {.1pt}%
  {\normalfont\fontsize{12}{12}\selectfont}%
}

