% $Id: m1a.cls,v 1.1.1.1 2004/10/04 17:25:17 nthiery Exp $

\LoadClass[twoside,
           openany,
           cleardoublestandard,
           a4paper,
           parindent,
           headsepline,
           titlepage,
           12pt,% Helvetica used scaled down as main font
           smallheadings,
           BCOR5mm,
           ]{scrreprt}

\usepackage{amssymb}
\usepackage{amsmath}

\usepackage[automark]{scrpage2}
\pagestyle{scrheadings}

\clearscrheadfoot
\ohead{\pagemark}
\chead{\headmark}

\renewcommand*{\chapterpagestyle}{scrheadings}

\newcommand*{\frontmatter}{%
  \pagenumbering{roman}%
  \pagestyle{empty}%
  \renewcommand*{\chapterpagestyle}{empty}%
}

\newcommand*{\mainmatter}{%
  \pagenumbering{arabic}%
  \pagestyle{scrheadings}%
  \setheadsepline{.4pt}%
  \renewcommand*{\chapterpagestyle}{scrheadings}%
}

\newcommand*{\HUGE}{\@setfontsize\HUGE{40pt}{50}}
% broken
% \setkomafont{title}{\raggedright\HUGE}
\let\M@orig@title\title
\renewcommand*{\title}[1]{\M@orig@title{\raggedright \HUGE #1\endgraf}}
\renewcommand*{\author}[1]{\titlehead{\Large\raggedright #1}}
\date{}

\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

\usepackage{courier}
\usepackage[scaled]{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[activate]{pdfcprot}

\typearea[9mm]{13}

\publishers{\parbox{\linewidth}{%
\raggedright
\ifcase\value{iMlang}
 Mathematics Made Anew:\\Tools and Texts for Computer Aided Learning
\or 
 Mathematik 1 $\times$ anders: Materialien und Werkzeuge
 für computerunterstütztes Lernen
\fi
\\[2em]
SciFace Software}}

\usepackage{ragged2e}
\usepackage{nicefrac}

\usepackage{color}
\definecolor{darkred}{rgb}{0.8,0.0,0.0}

\usepackage[nclayout]{Mhelp} % loads babel
\Mdefaultprompt{$\bullet$}
\let\saved@iMtt\iMtt
\def\iMtt#1{{\color{darkred}\saved@iMtt{#1}}}

\setkeys{Mvin}{color}

\AtBeginDocument{\Mlanggerman}

\hypersetup{colorlinks=true,
  plainpages=false,
  pdfpagelabels,
  bookmarks,
  hypertexnames=false}

\newfont{\hands}{wingding at 20pt}
\newbox\M@righthandbox
\setbox\M@righthandbox=\hbox{\raise-1ex\hbox{{\hands\char'046}}}
\dp\M@righthandbox=0pt\relax
\newcommand*{\righthand}{\copy\M@righthandbox}
\newcommand*{\pen}{{\hands\char'040}}

\newenvironment{Tipps}{%
  \de{\minisec{Tipps}}%
  \eng{\minisec{Hints}}%
  \nobreak
  \list{\righthand}{}\relax
}{\endlist}

\newenvironment{Uebungen}{%
  \de{\minisec{Übungen}}%
  \eng{\minisec{Exercises}}%
  \nobreak
  \list{\pen}{}\relax
}{\endlist}

\newenvironment{NeueFunktionen}{%
  \vbox\bgroup
  \addmargin{1cm}
  \de{\minisec{Neue \mupad-Funktionen}}%
  \eng{\minisec{New \mupad\ functions}}%
  \nobreak
  \tabularx{\linewidth}{>{\ttfamily\color{darkred}\raggedright}l>{\RaggedRight}X@{}p{0cm}}%
}{\endtabularx\endaddmargin\egroup}

\emergencystretch3em\relax

\raggedbottom

\hyphenation{Un-glei-chun-gen}