%
% Mreprt.sty -- For documents using a non-book.cls using MuPAD style layout

%% Copyright 2002 SciFace Software GmbH
%
% This program may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of LaTeX 
% version 1999/12/01 or later.
%
% This program consists of the files Mhelp.sty, Mhyper.sty,
% Mcompat.sty, Mbook.sty, Mreprt.sty, Mfonts.sty, Mwrite.sty,
% and MuPAD.mf.

\splitcvs $Id: Mreprt.sty,v 1.1.1.2 2004/10/04 17:25:17 nthiery Exp $ to %
  \filename\fileversion\filedate\relax
%
\ProvidesPackage{\filename}[\filedate]
\immediate\typeout{Package: `\filename'
    \fileversion \space \filedate \space (roehrig, metzner, billing, ccr)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\@ifundefined{if@restonecol}{\newif\if@restonecol}{}
\ifiMlayout%
 \setcounter{secnumdepth}{3}
 \renewcommand\tableofcontents{\section*{\contentsname}%
   \sectionmark{\contentsname}%
%   \addcontentsline{toc}{section}{\contentsname}%
   \@starttoc {toc}}%
 \renewcommand*{\listoffigures}{%
   \section*{\listfigurename}%
   \sectionmark{\listfigurename}%
%  \addcontentsline{toc}{section}{\listfigurename}%
   \@starttoc{lof}%
   }%
 \renewcommand*{\listoftables}{%
   \section*{\listtablename}%
   \sectionmark{\listtablename}%
   \@starttoc{lot}%
   }
 \renewenvironment{theindex}
 {%
   \if@twocolumn
    \@restonecolfalse
   \else
    \@restonecoltrue
   \fi
   \columnseprule \z@
   \columnsep 35\p@
   \iMindextrue%
   \ifiMreallylarge\setlength{\textheight}{500mm}\fi%
   \twocolumn[\section*{\indexname}]%
%  \markboth{\textsc{\indexname}}%
%    {{\ifhypermode\iMindexhead\else\textsc{\indexname}\fi}}%
   \ifhypermode%
    \markright{\iMindexhead}%
% HyTeX-Label "index" setzen.
    \@ifundefined{nr@index}{\Mnode{index}}{}%
   \else%
    \thispagestyle{plain}%
   \fi%
   \parindent\z@
   \parskip\z@ \@plus .3\p@\relax
   \raggedright%
   \let\item\@idxitem}%
 {\if@restonecol\onecolumn\else\clearpage\fi}%
\fi% \ifiMlayout
% thebibliography wird nicht veraendert.
% Pagestyle muheadings
\def\ps@muheadings{\ps@headings\relax
  \let\@mkboth\markboth
  \def\@oddfoot{}\def\@evenfoot{}%       No feet.
  \def\@evenhead{\rmfamily \thepage \hfil {\leftmark}}%        Left heading.
  \def\@oddhead{{\rightmark} \hfil \rmfamily\thepage}% Right heading.
  \ifiM@springer%
   \def\chaptermark##1{\markboth{{\small\rm ##1}}{{\small\rm ##1}}}%
   \def\sectionmark##1{\markright{{\small\rm ##1}}}%
  \else%
   \def\chaptermark##1{\markboth{{\scshape ##1}}{{\scshape ##1}}}%
   \def\sectionmark##1{\markright{{\scshape ##1}}}%
  \fi%
  }
