% \iffalse meta comment
%
% bgteubner class bundle
%
% bgteucls.dtx
% Copyright 2003--2015 Harald Harders
%
% This program may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your opinion) any later version.
% The latest version of this license is in
%    http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 1999/12/01 or later.
%
% Additional conditions to the license:
%
% If you modify a renamed copy of the files `bgteubner.cls' or
% `bgteucls.dtx', you have to preserve some information in the
% PDF /Creator entry. The following data have to remain:
% - The name `bgteubner.cls',
% - a hint that this class has been developed for the `Springer
%   Vieweg Verlag, Wiesbaden, Germany (now Springer Vieweg Verlag)'.
%
% This program consists of all files listed in manifest.txt.
%
% \section{Gemeinsame Daten}
%
%    \begin{macrocode}
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{bgteubner}
%<version>\ProvidesFile{bgteuversion.tex}
%<cdcover>\ProvidesFile{cdcover.tex}
%<driver>\ProvidesFile{bgteucls.dtx}
%<class|version|cdcover|driver>  [2015/05/17  v2.11  Springer Vieweg Verlag]
%    \end{macrocode}
%
%<*driver>
\documentclass[english,ngerman,a4paper]{ltxdoc}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{numprint}
\usepackage[num]{isodate}
\usepackage{longtable}
\newlength{\tempdima}%
\makeatletter
\renewenvironment{table}[1][]{%
  \@float{table}[#1]%
  \centering%
  \setlength{\tempdima}{\abovecaptionskip}%
  \setlength{\abovecaptionskip}{\belowcaptionskip}%
  \setlength{\belowcaptionskip}{\tempdima}%
  }{%
\end@float
}
\makeatother
\EnableCrossrefs
\CodelineIndex
\DoNotIndex{\',\.,\@M,\@@input,\@Alph,\@alph,\@addtoreset,\@arabic}
\DoNotIndex{\@badmath,\@centercr,\@cite}
\DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
\DoNotIndex{\@input,\@ixpt,\@m,\@minus,\@mkboth}
\DoNotIndex{\@ne,\@nil,\@nomath,\@plus,\roman,\@set@topoint}
\DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb}
\DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt}
\DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt}
\DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace}
\DoNotIndex{\advance,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
\DoNotIndex{\bullet,\MessageBreak}
\DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption}
\DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass}
\DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist}
\DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
\DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter}
\DoNotIndex{\fbox,\csname,\endcsname,\def,\edef,\empty,\ ,\@tempa}
\DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef}
\DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
\DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi}
\DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi}
\DoNotIndex{\input,\@tempb,\n}
\DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark}
\DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright}
\DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
\DoNotIndex{\NeedsTeXFormat,\newdimen}
\DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number}
\DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@}
\DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip}
\DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
\DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
\DoNotIndex{\refstepcounter,\relax,\renewcommand}
\DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily}
\DoNotIndex{\secdef,\selectfont,\setbox,\setcounter,\setlength}
\DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space}
\DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase}
\DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt}
\DoNotIndex{\viipt,\vipt,\vskip,\vspace}
\DoNotIndex{\wd,\xiipt,\year,\z@}
\DoNotIndex{\string,\",\def,\newcommand,\renewcommand,\DeclareRobustCommand}
\DoNotIndex{\DeclareMathOperator,\multiput,\put,\value,\thispagestyle}
\DoNotIndex{\tiny,\footnotesize,\small,\normalfont,\large,\Large,\LARGE}
\DoNotIndex{\huge,\Huge,\RequirePackageWithOptions,\write}
\DoNotIndex{\textheight,\textwidth}
\CodelineNumbered
\RecordChanges
\CheckSum{4924}
\input{bgteuversion}
\GetFileInfo{bgteuversion.tex}
\begin{document}
  \title{Die \texttt{bgteubner}"=Dokumentklasse\thanks{Diese Datei hat die
      Versionsnummer \fileversion\ mit der letzten �nderung am
      \filedate.}}
  \author{Harald Harders\\\texttt{harald.harders@gmx.de}}
  \date{Dateidatum \filedate, �bersetzt am \today}
  \DocInput{bgteucls.dtx}
\end{document}
%</driver>
% \fi
% 
% \maketitle
% \begin{abstract}
% \noindent
% Diese Dokumentklasse bietet die notwendige Umgebung f�r B�cher des
% Springer Vieweg Verlags (vormals Vieweg+Teubner Verlags bzw. B.\,G.\
% Teubner Verlag).
% Ihre Verwendung wird in einem gesonderten Dokument, das unter den
% Namen \verb|bgteubner.pdf| bzw.\
% \verb|bgteubner-cm.pdf| verf�gbar ist, beschrieben. 
% Hier wird nur die Implementierung erl�utert.
% \end{abstract}
%
% \tableofcontents
%
% \section*{Copyright (in der englischen Originalformulierung)}
%
% Copyright 2003--2015 Harald Harders.
%
% This program may be distributed and/or modified under the
% conditions of the \LaTeX\ Project Public License, either version~1.3
% of this license or (at your opinion) any later version.
% The latest version of this license is in
% \begin{verbatim}
%http://www.latex-project.org/lppl.txt\end{verbatim}
% and version~1.3 or later is part of all distributions of \LaTeX\
% version 1999/12/01 or later.
%
% Additional conditions to the license:
%
% If you modify a renamed copy of the files ``|bgteubner.cls|'' or
% ``|bgteucls.dtx|'', you have to preserve some information in the
% PDF |/Creator| entry. The following data have to remain:
% \begin{itemize}
% \item The name ``|bgteubner.cls|'',
% \item a hint that this class has been developed for the ``Springer
%   Vieweg Verlag, Wiesbaden, Germany''.
% \end{itemize}
%
% This program consists of all files listed in |manifest.txt|.
%
% \StopEventually{\PrintChanges \PrintIndex}
%
% \changes{2.11}{2015/05/17}{Make sure that \LaTeX\ also compiles if
%   recent changes in scrbook are present.}%
% \changes{2.10}{2015/05/15}{Adapt class to support hyperref and imakeidx}%
% \changes{2.10}{2015/05/15}{Fix PDF string issue if hyperref is loaded}%
% \changes{2.10}{2015/05/15}{Adapt class to current scrbook version}%
% \changes{2.10}{2015/05/15}{Fix bug in title page which made footnotes to
%   disappear}%
% \changes{2.02}{2012/04/07}{Use autolanguage feature of numprint.sty}%
% \changes{2.02}{2012/04/07}{Adapted to Springer Vieweg Verlag}%
% \changes{2.01}{2011/12/29}{Added macro \cs{emphindex} for important index
%   entryies}%
% \changes{2.00}{2008/05/04}{Adapted to Vieweg+Teubner Verlag}%
% \changes{1.40}{2008/04/27}{Adapted \cs{signature} for multiline texts}%
% \changes{1.39}{2008/04/15}{Indentation after the preface title fixed}%
% \changes{1.38}{2006/04/20}{Bug in Bib\TeX\ styles
%   (format.crossref.editor) fixed}%
% \changes{1.37}{2005/10/31}{Typeset abbreviated forenames with small
%   space between them}%
% \changes{1.37}{2005/10/31}{Add new BiB\TeX\ style with abbreviated
%   forenames and long keywords}%
% \changes{1.36}{2005/10/28}{Fix bug using crossref with books in
%   biliography}%
% \changes{1.36}{2005/10/28}{Fix sorting problem in the biliography}%
% \changes{1.36}{2005/10/28}{Introduce \cs{btxlastname} for formatting
%   lastnames}%
% \changes{1.35}{2005/04/16}{Allow to number \cs{paragraph} and
%   \cs{subparagraph}}%
% \changes{1.33}{2004/11/19}{Avoiod to use the \texttt{calc} package
%   since it causes problems with many other packages}%
% \changes{1.14}{2003/12/17}{Avoid usage of \cs{bgteubnerfileversion}
%   and \cs{bgteubnerfiledate}}%
% \changes{1.10}{2003/10/30}{Einige Meldungen in englisch}%
% \changes{1.10}{2003/10/30}{Alle einger�ckten Umgebungen mit
%   geringerem Einzug}%
%
% \section{Bekannte Probleme}
%
% \begin{itemize}
% \item Vertikal spacings in |important|, |important*|,
%   |longimportant|, and |longimportant*| environments is not
%   optimal. When using environments as |align|, |example|,
%   |subexercise| at the begin or end of the environment, unwanted,
%   additional space is added. I don't know how to solve this
%   problem.
% \end{itemize}
%
% \section{Dateikopf}
%
%    \begin{macrocode}
%<*class>
\typeout{^^J^^JDokumentklasse zum Erstellen von Buechern fuer den
  Springer Vieweg Verlag, Wiesbaden}%
\typeout{(vormals Vieweg+Teubner Verlag, B. G. Teubner Verlag).}%
\typeout{Erstellt im Auftrag des B. G. Teubner Verlags von}%
\typeout{Harald Harders (harald.harders@gmx.de).^^J}%
\typeout{Beachten Sie die Dokumentation in den unterschiedlichen
  Versionen:}%
\typeout{\space\space bgteubner.pdf (Times, 17cm x 24cm)}%
\typeout{\space\space
  bgteubner-cm.pdf (European Computer Modern, 17cm x 24cm).}%
\typeout{^^JDocument class to produce books for the Springer Vieweg
  Verlag, Wiesbaden, Germany}%
\typeout{(formerly Vieweg+Teubner Verlag, B. G. Teubner Verlag).}%
\typeout{Made by Harald Harders (harald.harders@gmx.de).}%
\typeout{Documentation is available in German only.^^J^^J}%
%    \end{macrocode}
%
% \section{Fehler statt Warnung bei alten Paketen}
% 
% Weil fast alle Nutzer Warnungen nicht beachten, soll bei alten
% Paketen ein Fehler statt einer Warnung ausgegeben werden.
% Diese Warnung wird im Befehl \cs{@onefilewithoptions} erzeugt.
% Bei Paketen, die der Autor selbst l�dt, soll wieder nur eine Warnung
% erzeugt werden.
%
% \begin{macro}{\@onefilewithoptions}
% Den Originalbefehl sichern und am Ende der Klasse wieder
% restaurieren.
%    \begin{macrocode}
\newcommand\hhcls@onefilewithoptions{}
\let\hhcls@onefilewithoptions\@onefilewithoptions
\AtEndOfClass{\let\@onefilewithoptions\hhcls@onefilewithoptions}
%    \end{macrocode}
% Die Definition von \cs{@onefilewithoptions} aus |latex.ltx|, nur mit
% einem Fehler statt einer Warnung.
%    \begin{macrocode}
\def\@onefilewithoptions#1[#2][#3]#4{%
  \@pushfilename
  \xdef\@currname{#1}%
  \global\let\@currext#4%
  \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
  \let\CurrentOption\@empty
  \@reset@ptions
  \makeatletter
  \def\reserved@a{%
    \@ifl@aded\@currext{#1}%
      {\@if@ptions\@currext{#1}{#2}{}%
        {\@latex@error
            {Option clash for \@cls@pkg\space #1}%
            {The package #1 has already been loaded
             with options:\MessageBreak
             \space\space[\@ptionlist{#1.\@currext}]\MessageBreak
             There has now been an attempt to load it
              with options\MessageBreak
             \space\space[#2]\MessageBreak
             Adding the global options:\MessageBreak
             \space\space
                  \@ptionlist{#1.\@currext},#2\MessageBreak
             to your \noexpand\documentclass declaration may fix this.%
             \MessageBreak
             Try typing \space <return> \space to proceed.}}}%
      {\@pass@ptions\@currext{#2}{#1}%
       \global\expandafter
       \let\csname ver@\@currname.\@currext\endcsname\@empty
       \InputIfFileExists
         {\@currname.\@currext}%
         {}%
         {\@missingfileerror\@currname\@currext}%
    \let\@unprocessedoptions\@@unprocessedoptions
    \csname\@currname.\@currext-h@@k\endcsname
    \expandafter\let\csname\@currname.\@currext-h@@k\endcsname
              \@undefined
    \@unprocessedoptions}
    \@ifl@ter\@currext{#1}{#3}{}%
      {\@latex@error
         {You have requested,\on@line,
          version\MessageBreak
            `#3' of \@cls@pkg\space #1,\MessageBreak
          but only version\MessageBreak
           `\csname ver@#1.\@currext\endcsname'\MessageBreak
          is available}{%
          The bgteubner class is more restrictive with old packages than^^J%
          standard LaTeX. Please update the specified package. New^^J%
          packages may be downloaded from CTAN, e.g., ftp://ftp.dante.de.}}%
    \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi
    \@popfilename
    \@reset@ptions}%
  \reserved@a}
%    \end{macrocode}
% \end{macro}
%
% \section{Global festgelegte Klassenoptionen}
% 
% Weiterreichen der notwendigen Optionen an die Dokumentklasse
% |scrbook|, die als Basis f�r die |bgteubner|"=Klasse dient.
% 
% Einstellen der Gr��en f�r Kapitel"= und Abschnitts�berschriften:
%    \begin{macrocode}
\PassOptionsToClass{headings=small}{scrbook}
%    \end{macrocode}
% Literaturverzeichnis, Stichwortverzeichnis, Abbildungs"= und
% Tabellenverzeichnis erscheinen im Inhaltsverzeichnis:
%    \begin{macrocode}
\PassOptionsToClass{bibliography=totoc,index=totoc,listof=totoc}{scrbook}
%    \end{macrocode}
% Formeln linksb�ndig mit Einzug:
%    \begin{macrocode}
\PassOptionsToClass{fleqn}{scrbook}
\PassOptionsToPackage{fleqn}{amsmath}
%    \end{macrocode}
% \changes{1.10}{2003/10/30}{Integralgrenzen ober- und unterhalb des
%   Symbols}%
% Grenzen an Integralen in abgesetzten Formeln ober- und unterhalb des
% Symbols.
%    \begin{macrocode}
\PassOptionsToPackage{intlimits}{amsmath}
%    \end{macrocode}
% Kapitel"= und Abschnittsnummern ohne Punkt am Ende:
%    \begin{macrocode}
\PassOptionsToClass{numbers=noenddot}{scrbook}
%    \end{macrocode}
% Leere Seiten sollen ganz leer sein, auch keine Seitenzahl:
%    \begin{macrocode}
\PassOptionsToClass{cleardoublepage=empty}{scrbook}
%    \end{macrocode}
% Keine Linie unter dem Kolumnentitel:
%    \begin{macrocode}
\PassOptionsToClass{headsepline=false}{scrbook}
%    \end{macrocode}
% Kein Pr�fix vor Kapitelnummern im Anhang:
%    \begin{macrocode}
\PassOptionsToClass{appendixprefix=false}{scrbook}
%    \end{macrocode}
% Tabellen erhalten �ber"= anstatt Unterschriften:
%    \begin{macrocode}
\PassOptionsToClass{captions=tableheading}{scrbook}
%    \end{macrocode}
% Optionen an Typearea weiterreichen. Kolumnentitel ist in Satzspiegel
% enthalten.
%    \begin{macrocode}
\PassOptionsToPackage{pagesize,headinclude}{typearea}
%    \end{macrocode}
%
% \section{Optionale Parameter beim Aufruf der \texttt{bgteubner}"=Klasse}
%
% Definition von m�glichen Optionen, die vom Benutzer angegeben werden
% k�nnen.
%
% \subsection{Globale Einstellungen des Buchlayouts}
%
% Wahl der Seitengr��e:
%    \begin{macrocode}
\newif\ifhhcls@dinafuenf
\DeclareOption{a5paper}{\hhcls@dinafuenftrue}
\DeclareOption{a5}{\hhcls@dinafuenftrue}
\DeclareOption{17x24paper}{\hhcls@dinafuenffalse}
\DeclareOption{17x24}{\hhcls@dinafuenffalse}
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Allow Y\,\&\,Y MathTime to be used}%
% Schriftfamilie w�hlen:
%    \begin{macrocode}
\newif\ifhhcls@times
\newif\ifhhcls@mathtime
\DeclareOption{times}{\hhcls@timestrue}
\DeclareOption{mathtime}{\hhcls@timestrue\hhcls@mathtimetrue}
\DeclareOption{cm}{\hhcls@timesfalse}
%    \end{macrocode}
% Kolumnentitel au�en oder innen auf den Seiten?
%    \begin{macrocode}
\newif\ifhhcls@headingoutside
\DeclareOption{headingoutside}{\hhcls@headingoutsidetrue}
\DeclareOption{headinginside}{\hhcls@headingoutsidefalse}
%    \end{macrocode}
% Inhaltsverzeichnis einr�cken?
%    \begin{macrocode}
\newif\ifhhcls@tocindent
\DeclareOption{tocindent}{\hhcls@tocindenttrue}
\DeclareOption{tocleft}{\hhcls@tocindentfalse}
%    \end{macrocode}
% Vektoren normal, fett oder unterstrichen?
%    \begin{macrocode}
\DeclareOption{arrowvec}{\PassOptionsToPackage{arrow}{hhtensor}}
\DeclareOption{boldvec}{\PassOptionsToPackage{bold}{hhtensor}}
\DeclareOption{ulinevec}{\PassOptionsToPackage{uline}{hhtensor}}
%    \end{macrocode}
% Soll es grau hinterlegte Boxen f�r wichtige Formeln geben?
%    \begin{macrocode}
\newif\ifhhcls@greybox
\DeclareOption{greybox}{\hhcls@greyboxtrue}
\DeclareOption{graybox}{\hhcls@greyboxtrue}
%    \end{macrocode}
% \changes{1.10}{2003/10/30}{Schriftgr��e in theoremartigen Umgebungen
%   einstellbar}%
% Schriftgr��e in theoremartigen Umgebungen:
%    \begin{macrocode}
\newif\ifhhcls@theoremsmall
\DeclareOption{smalltheorem}{\hhcls@theoremsmalltrue}
\DeclareOption{normaltheorem}{\hhcls@theoremsmallfalse}
%    \end{macrocode}
%
% \subsection{Entwurfsstadium}
%
% \changes{1.10}{2003/10/30}{Layoutraster entfernt}%
% Angabe des �bersetzungsdatums in der Fu�zeile und Markierung von
% �berf�llten Zeilen f�r Entwurfskontrollen:
%    \begin{macrocode}
\newif\ifhhcls@entwurf
\newif\ifhhcls@titlepage
\DeclareOption{draft}{\hhcls@entwurftrue\hhcls@titlepagetrue}
\DeclareOption{titlepage}{\hhcls@titlepagetrue}
%    \end{macrocode}
% \changes{1.30}{2004/04/10}{Ignore class option `epsfigures'}%
% The option |epsfigures| that enabled to include eps figures for dvi
% output is not necessary anymore.
%    \begin{macrocode}
%\newif\ifhhcls@epsfigures
%\hhcls@epsfiguresfalse
%\DeclareOption{epsfigures}{\hhcls@epsfigurestrue}
\DeclareOption{epsfigures}{%
  \ifpdf
    \ClassWarning{bgteubner}{Class option `epsfigures' ignored
      for pdf output}%
  \else
    \ClassWarning{bgteubner}{Class option `epsfigures' ignored for dvi
      output. eps figures are now included without this option}%
  \fi
}
%    \end{macrocode}
%
% \subsection{Aufgaben und L�sungen}
%
% F�gt die Aufgaben, die mit der Umgebung |aufgabe| erzeugt wurden, in
% das Inhaltsverzeichnis ein:
%    \begin{macrocode}
\newif\if@exercisetotoc
\DeclareOption{exercisetotoc}{\@exercisetotoctrue}
%    \end{macrocode}
% F�gt die Aufgaben und L�sungen, die mit den Umgebungen |exercise|,
% bzw.\ |answer| erzeugt wurden, in das Inhaltsverzeichnis ein:
%    \begin{macrocode}
\newif\if@answertotoc
\DeclareOption{answertotoc}{\@exercisetotoctrue\@answertotoctrue}
%    \end{macrocode}
% Which publisher?
%    \begin{macrocode}
\newcommand\hhcls@publisher{}
\DeclareOption{springervieweg}{\def\hhcls@publisher{%
    Springer Vieweg Verlag\quad Wiesbaden%
}}
\DeclareOption{viewegteubner}{\def\hhcls@publisher{%
    Vieweg+Teubner\quad Stuttgart $\cdot$ Leipzig $\cdot$ Wiesbaden%
}}
\DeclareOption{bgteubner}{\def\hhcls@publisher{%
    B.~G.\ Teubner\quad Stuttgart $\cdot$ Leipzig $\cdot$ Wiesbaden%
}}
%    \end{macrocode}
%
% \subsection{Defaulteinstellungen und Ausf�hren der Klassenoptionen}
%
% Defaulteinstellungen:
%    \begin{macrocode}
\ExecuteOptions{times,headingoutside,17x24,tocindent,%
  normaltheorem,springervieweg}
%    \end{macrocode}
% Optionen ausf�hren:
%    \begin{macrocode}
\ProcessOptions\relax
%    \end{macrocode}
% Schriftgr��e 10\,pt:
%    \begin{macrocode}
\PassOptionsToClass{fontsize=10pt}{scrbook}
%    \end{macrocode}
%
% \section{Laden der Klasse und der Pakete}
%
% Die |scrbook|"=Klasse laden.
% Es muss eine Version vom angegebenen Datum oder neuer sein, da
% �ltere Versionen noch nicht alle notwendigen Funktionen unterst�tzen.
%    \begin{macrocode}
\LoadClass{scrbook}[2011/06/16]
%    \end{macrocode}
% Warnung bei der �nderung der Schrift f�r die Kopf- und Fu�zeile
% ausschalten.
%    \begin{macrocode}
\let\scr@fnt@wrn@pagehead=\@undefined
\let\scr@fnt@wrn@pagefoot=\@undefined
%    \end{macrocode}
% Bugs in \LaTeXe\ beheben:
%    \begin{macrocode}
\RequirePackage{fixltx2e}[2000/09/24]
%    \end{macrocode}
% Weitere Zeichen im Mathe"= und im Textmodus:
%    \begin{macrocode}
\RequirePackage{wasysym}[2003/05/31]
%    \end{macrocode}
% Die Integralzeichen von wasysym wieder l�schen, damit
% \verb|amsmath.sty| sie wieder vern�nftig definieren kann.
% This has to be done before the first call of the |amsmath| package since
% it will be loaded only once.
% \changes{1.34}{2005/01/07}{Remove \texttt{wasysym} integrals before
%   \texttt{amsmath} is loaded}%
%    \begin{macrocode}
\let\iint=\@undefined
\let\iiint=\@undefined
\let\iiiint=\@undefined
%    \end{macrocode}
% Erweiterte Mathematikbefehle:
%    \begin{macrocode}
\RequirePackage{amsmath}[2000/07/18]
\RequirePackage{amsfonts}[2001/10/25]
\RequirePackage{amssymb}[2002/01/22]
%    \end{macrocode}
% Pakete, die gutes Tabellenlayout erlauben:
%    \begin{macrocode}
\RequirePackage{booktabs}[2003/03/28]
\RequirePackage{array}[1998/05/13]
\RequirePackage{longtable}[2000/10/22]
%    \end{macrocode}
% T1"=Schriftkodierung. F�hrt zu besserer Silbentrennung und erlaubt
% die Verwendung einiger zus�tzlicher Schriftschnitte und "~gr��en.
%    \begin{macrocode}
\RequirePackage[T1]{fontenc}[2001/06/05]
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Allow Y\,\&\,Y MathTime to be used}%
% \changes{1.30}{2004/04/10}{Use bold instead of bold extended with Times}%
% Times ist als Schrift gew�hlt:
%    \begin{macrocode}
\ifhhcls@times
  \ifhhcls@mathtime
    \RequirePackage[slantedgreek,mtbold]{mathtime}[1999/03/29]
  \else
    \RequirePackage[slantedGreek]{mathptmx}[2003/03/02]
  \fi
  \RequirePackage[scaled=0.92]{helvet}[2003/03/02]
  \RequirePackage{courier}[2003/03/02]
  \renewcommand\bfdefault{b}
%    \end{macrocode}
% Dummybefehl definieren, um �bersetzungsfehler zu vermeiden.
%    \begin{macrocode}
  \newcommand\newstylenums{}
%    \end{macrocode}
% \cs{,} im Mathemodus restaurieren.
%    \begin{macrocode}
  \thinmuskip=3mu
%    \end{macrocode}
% Computer Modern ist gew�hlt:
%    \begin{macrocode}
\else
%    \end{macrocode}
% \changes{1.06}{2003/10/12}{Paket \texttt{hfoldsty} statt
%   \texttt{hfo} laden}%
% Minuskelziffern (\oldstylenums{0123456789}) im Textmodus. Verwendung
% des Pakets |hfoldsty.sty|, das ein besseres Kerning als |eco.sty|
% f�r die franz�sischen Anf�hrungszeichen hat.
%    \begin{macrocode}
  \RequirePackage[origtt]{hfoldsty}[2003/10/12]
%    \end{macrocode}
% \changes{1.04}{2003/09/23}{R�cksetzen der Schreibmaschinenschrift
%   auf Original nicht mehr n�tig}%
% Bei Schreibmaschinenschrift (Monospaced) dennoch keine
% Minuskelziffern und keine Ligaturen (nicht mehr n�tig mit der neuen
% |hfoldsty|"=Version).
%    \begin{macrocode}
\fi
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Generate warning in case of using
%   \cs{oldstylenums}}% 
% Der Befehl \cs{oldstylenums} ist in jedem Fall Quatsch:
%    \begin{macrocode}
\renewcommand*\oldstylenums{%
  \ClassWarning{bgteubner}{\string\oldstylenums\space is ignored}%
}
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Rearrange \texttt{textcomp} and
%   \texttt{mathcomp}}%
% \changes{1.20}{2004/03/07}{Switch \texttt{mathcomp} glyphs to the
%   same font as text is}%
% Additional glyphs in math and in text mode.
% |mathcomp| has to be loaded after switching to the text fonts, i.e.,
% |mathptmx| etc.
%    \begin{macrocode}
\RequirePackage{textcomp}[2001/06/05]
\RequirePackage[rmdefault]{mathcomp}[2001/01/07]
\ifhhcls@times
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Substitute Text and Math Companion
%   symbols by using \texttt{ptmxcomp.sty}}%
% Many Text and Math Companion symbols have to be replaced or
% corrected. 
%    \begin{macrocode}
  \RequirePackage{ptmxcomp}[2004/03/07]
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Warning for not existing bold math}%
% \changes{1.30}{2004/04/10}{Error rather than a warning for using not
%   existing bold math}%
% If using Times without MathTime, bold math is undefined. Redefine
% \cs{boldmath} to generate a warning.
%    \begin{macrocode}
  \ifhhcls@mathtime
  \else
    \renewcommand*\boldmath{%
      \ClassError{bgteubner}{With the base font Times, bold math is
        undefined\MessageBreak
        (when not using MathTime math extensions)}{% 
        Avoid using bold math or buy the MathTime and MathTimePlus
        fonts by Y\&Y.}%
    }
  \fi
\fi
%    \end{macrocode}
% Teilbilder mit Nummerierung a, b, c\dots:
%    \begin{macrocode}
\RequirePackage[hang,RaggedRight]{hhsubfigure}[2003/09/14]
%    \end{macrocode}
% Trennungen teilweise auch im Flattersatz erm�glichen:
%    \begin{macrocode}
\RequirePackage{ragged2e}[2003/01/26]
%    \end{macrocode}
% Integralzeichen usw.\ in mehr Gr��en, ist bei der Verwendung von
% \verb|mathptmx| nicht n�tig:
%    \begin{macrocode}
\ifhhcls@times
\else
  \RequirePackage{exscale}[1997/06/16]
\fi
%    \end{macrocode}
% Befehle zum Einbinden von Grafiken:
%    \begin{macrocode}
\RequirePackage{graphicx}[1999/02/16]
%    \end{macrocode}
% Falls graue K�sten zugelassen sind, muss auch Farbe ins Spiel
% kommen. Aus Konsistenzgr�nden wird das Paket immer geladen.
%    \begin{macrocode}
\RequirePackage{color}[1999/02/16]
%    \end{macrocode}
% Ebenso f�r lange Kisten.
%    \begin{macrocode}
\RequirePackage{framed}[2003/07/19]
%    \end{macrocode}
% Tensorbefehle:
%    \begin{macrocode}
\RequirePackage{hhtensor}[2003/10/09]
%    \end{macrocode}
% Befehle zur Erzeugung eines Stichwortverzeichnisses:
%    \begin{macrocode}
\RequirePackage{makeidx}[2000/03/29]
%    \end{macrocode}
% Kompakte Aufz�hlungen:
%    \begin{macrocode}
\RequirePackage{mdwlist}[1996/05/02]
\RequirePackage{paralist}[2002/03/18]
%    \end{macrocode}
% \changes{1.03}{2003/09/18}{\texttt{ifthen}-Paket explizit laden}%
% Das \verb|ifthen|"=Paket explizit laden.
%    \begin{macrocode}
\RequirePackage{ifthen}[2001/05/26]
%    \end{macrocode}
% Herausfinden, ob PDF oder DVI erzeugt wird:
%    \begin{macrocode}
\RequirePackage{ifpdf}[2001/06/14]
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Redeclare uppercase Greek letters for
%   MathTime font}%
% Normalerweise schreibt \LaTeX\ gro�e griechische Buchstaben im
% mathematischen Modus aufrecht, was aber im mathematischen Satz
% inkonsistent ist.
% Das Paket |fixmath| behebt dieses Problem.
% Dadurch wird aber auch das gro�e Delta $\Delta$ kursiv
% gedruckt.
% Wenn es als Differenz verwendet wird, soll es aufrecht sein.
% Dies wird durch Verwendung von \cs{D} ($\Delta$) erreicht.
%
% With |mathptmx|, |fixmath| is not necessary.
% With |mathtime|, the letters have to be redefined ``by hand''.
%    \begin{macrocode}
\ifhhcls@times
  \ifhhcls@mathtime
    \DeclareMathSymbol\Gamma    {\mathalpha}{letters}{0}
    \DeclareMathSymbol\Delta    {\mathalpha}{letters}{1}
    \DeclareMathSymbol\Theta    {\mathalpha}{letters}{2}
    \DeclareMathSymbol\Lambda   {\mathalpha}{letters}{3}
    \DeclareMathSymbol\Xi       {\mathalpha}{letters}{4}
    \DeclareMathSymbol\Pi       {\mathalpha}{letters}{5}
    \DeclareMathSymbol\Sigma    {\mathalpha}{letters}{6}
    \DeclareMathSymbol\Upsilon  {\mathalpha}{letters}{7}
    \DeclareMathSymbol\Phi      {\mathalpha}{letters}{8}
    \DeclareMathSymbol\Psi      {\mathalpha}{letters}{9}
    \DeclareMathSymbol\Omega    {\mathalpha}{letters}{10}
    \DeclareMathSymbol\upGamma  {\mathord}{letters}{48}
    \DeclareMathSymbol\upDelta  {\mathord}{letters}{49}
    \DeclareMathSymbol\upTheta  {\mathord}{letters}{50}
    \DeclareMathSymbol\upLambda {\mathord}{letters}{51}
    \DeclareMathSymbol\upXi     {\mathord}{letters}{52}
    \DeclareMathSymbol\upPi     {\mathord}{letters}{53}
    \DeclareMathSymbol\upSigma  {\mathord}{letters}{54}
    \DeclareMathSymbol\upUpsilon{\mathord}{letters}{55}
    \DeclareMathSymbol\upPhi    {\mathord}{letters}{56}
    \DeclareMathSymbol\upPsi    {\mathord}{letters}{57}
    \DeclareMathSymbol\upOmega  {\mathord}{letters}{127}
  \fi
\else
  \RequirePackage{fixmath}[2000/04/11]
\fi
%    \end{macrocode}
% Internationale Unterst�tzung laden.
% Es muss eine Version vom angegebenen Datum oder neuer sein,
% da �ltere Versionen |\frenchspacing| noch nicht im deutschen Text
% eingeschaltet haben.
%    \begin{macrocode}
\RequirePackage{babel}[2001/03/01]
%    \end{macrocode}
% Zeilenabstand in der |advanced|"=Umgebung erh�hen:
%    \begin{macrocode}
\RequirePackage{setspace}[2000/12/01]
%    \end{macrocode}
% Paket f�r relative Schriftgr��enver�nderungen laden.
%    \begin{macrocode}
\RequirePackage{relsize}[1999/11/01]
%    \end{macrocode}
% \changes{1.03}{2003/09/18}{\texttt{slantsc} bei Times nicht laden}%
% Paket f�r kursive Kapit�lchen.
% Allerdings nur, wenn European Computer Modern verwendet wird, weil
% f�r Times keine kursiven Kapit�lchen zur Verf�gung stehen, sonst
% einen Ersatzbefehl f�r \cs{noscshape} definieren.
% Dieser schaltet allerdings von Kapit�lchen immer auf aufrechte
% Schrift um, da es ja nur aufrechte Kapit�lchen gibt.
%    \begin{macrocode}
\ifhhcls@times
  \DeclareRobustCommand\noscshape{%
    \not@math@alphabet\noscshape\relax
    \ifthenelse{\equal{\f@shape}{\scdefault}}{%
      \fontshape\updefault
    }{%
    }%
    \selectfont
  }
\else
  \RequirePackage{slantsc}[2003/09/17]
\fi
%    \end{macrocode}
% \changes{1.06}{2003/10/12}{Paket \texttt{ginpenc} statt
%   \texttt{hhinputenc} laden}%
% Einen Befehl definieren, der den Eingabezeichensatz bestimmt.
% Das wird gemacht, da Babel ansonsten die Standarddefinitionen f�r
% Umlaute (|\"a| usw.) verwendet.
% Das Paket setzt diese f�r deutsche Sprache auf |"a| usw.,
% wodurch Makeindex eine korrekte Sortierung erreicht:
%    \begin{macrocode}
\RequirePackage{ginpenc}[2003/09/29]
%    \end{macrocode}
% Warnungen ganz am Ende der Logdatei ausgeben:
%    \begin{macrocode}
\RequirePackage{warning}[2001/08/17]
%    \end{macrocode}
% Verbieten, die Umgebungen |eqnarray|, |eqnarray*| und |$$| zu
% verwenden:
%    \begin{macrocode}
\RequirePackage[all]{onlyamsmath}[2001/10/04]
%    \end{macrocode}
% Zahlen automatisch nach jeweils drei Stellen sperren und automatisch
% Exponentialteile sowie korrekte Dezimalzeichen erzeugen:
%    \begin{macrocode}
\RequirePackage[sepfour,autolanguage]{numprint}[2003/11/09]
%    \end{macrocode}
% Kolumnentitel umstellen k�nnen:
%    \begin{macrocode}
\RequirePackage{scrpage2}[2002/11/01]
%    \end{macrocode}
% Internationale Unterst�tzung f�r Literaturverzeichnisse:
%    \begin{macrocode}
\RequirePackage[fixlanguage]{babelbib}[2003/07/28]
%    \end{macrocode}
% Warnung f�r Fu�noten, die umbrochen werden, ausgeben:
%    \begin{macrocode}
\RequirePackage{fnbreak}[2003/04/03]
%    \end{macrocode}
% \changes{1.05}{2003/09/25}{�ltere \texttt{subfloat}"=Version
%   erlaubt, die Unterschiede sind nur marginal}%
% Mehrere Flie�umgebungen mit der gleichen Nummer erlauben:
%    \begin{macrocode}
\RequirePackage[countmax]{subfloat}[2002/12/16]
%    \end{macrocode}
% F�r die Verzeichnisse wird |multicol| ben�tigt.
%    \begin{macrocode}
\RequirePackage{multicol}[2000/07/10]
%    \end{macrocode}
% Optischen Randausgleich aktivieren.
%
% \changes{2.11}{2015/05/17}{Remove \cs{ifpdfoutput} before loading
%   pdfcprot}%
% Since both \verb|scrbook| and \verb|pdfcprot| define \cs{ifpdfoutput} remove
% this macro first (according to hint in log file).
%    \begin{macrocode}
\let\ifpdfoutput\relax
\RequirePackage[activate]{pdfcprot}[2002/02/27]
%    \end{macrocode}
%
% \section{Pr�fen, ob \textsc{pdf}\LaTeX\ verwendet wird}
%
% \changes{1.30}{2004/04/10}{Test if \textsc{pdf}\LaTeX\ is used}%
% Test if \textsc{pdf}\LaTeX\ is used.
%    \begin{macrocode}
\ifpdftex{}{%
  \ClassError{bgteubner}{Ordinary latex used to compile this
    document.\MessageBreak
    Please use pdflatex. If you need dvi output\MessageBreak
    use pdflatex and include `\string\pdfoutput=0' as first
    line\MessageBreak
    of your document}{The execution of latex is stopped immediately.}%
  \stop
}
%    \end{macrocode}
% \changes{1.30}{2004/04/10}{Do not redefine \cs{includegraphics}}%
% Print a warning if dvi output is used.
%    \begin{macrocode}
\ifpdf
\else
  \addglobalwarning{%
    \ClassWarningNoLine{bgteubner}{%
      Output format is DVI, not PDF.\MessageBreak
      If possible, use PDF output}%
  }%
\fi
%    \end{macrocode}
% \begin{macro}{\iftimes}
% \begin{macro}{\ifmathtime}
% \changes{1.20}{2004/03/07}{Command to test on MathTime}%
% Befehl definieren, der sagt, ob Times oder MathTime verwendet wird.
% If MathTime is used, both, \cs{iftimes} and \cs{ifmathtime} are
% true.
%    \begin{macrocode}
\newcommand\iftimes[2]{\ifhhcls@times #1\else #2\fi}
\newcommand\ifmathtime[2]{%
  \ifhhcls@times
    \ifhhcls@mathtime
      #1%
    \else%
      #2%
    \fi
  \else
    #2%
  \fi
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \changes{1.12}{2003/11/13}{Problem with \texttt{float.sty} solved}%
% Da das |float|"=Paket erwartet, dass der Befehl
% \cs{float@addtolists} noch nicht definiert ist. 
% Mit diesem Trick wird der Befehl vor dem Laden des Pakets gel�scht
% und danach wieder vervollst�ndigt.
%    \begin{macrocode}
\BeforePackage{float}{%
  \newcommand*\hhcls@float@addtolists{}%
  \let\hhcls@float@addtolists=\float@addtolists
  \let\float@addtolists=\undefined}
\AfterPackage{float}{%
  \let\hhclsflt@float@addtolists=\float@addtolists
  \renewcommand\float@addtolists[1]{%
    \hhclsflt@float@addtolists{#1}%
    \hhcls@float@addtolists{#1}%
  }%
%    \end{macrocode}
% \begin{macro}{\listof}
% \changes{1.12}{2003/11/13}{Lists for new floats get the same layout
%   as other lists, using \texttt{float.sty}}%
% Redefine the \cs{listof} command in order to get the same layout as
% other lists.
%    \begin{macrocode}
  \renewcommand*\listof[2]{%
    \begingroup%
      \@ifundefined{ext@#1}{%
        \float@error{#1}%
      }{%
        \@namedef{l@#1}{\@dottedtocline{1}{0em}{2.9em}}%
        \if@twocolumn
          \@restonecoltrue\onecolumn
        \else
          \@restonecolfalse
        \fi
        \float@listhead{#2}%
        \small
        \setlength{\parskip}{\z@}%
        \@starttoc{\@nameuse{ext@#1}}%
        \if@restonecol\twocolumn\fi
      }%
    \endgroup
  }%
%    \end{macrocode}
% \end{macro}
% \changes{1.12}{2003/11/13}{Redeclare captions of user-defined floats
%   when using \texttt{float.sty}}%
% Use the same style for the captions of user-defined floats.
%    \begin{macrocode}
  \floatstyle{komabelow}
}
%    \end{macrocode}
%
% \section{Das Aussehen des Dokuments gestalten}
%
% \subsection{Papiergr��e einstellen}
%
% \begin{macro}{\paperwidth}
% \begin{macro}{\paperheight}
% Papiergr��e, Satzspiegel und Bindungskorrektur einstellen:
%    \begin{macrocode}
\ifhhcls@dinafuenf
  \setlength{\paperwidth}{148mm}
  \setlength{\paperheight}{210mm}
  \areaset[7mm]{115mm}{174mm}
\else
  \setlength{\paperwidth}{170mm}
  \setlength{\paperheight}{240mm}
  \areaset[7mm]{135mm}{200mm}
\fi
%    \end{macrocode}
% Befehl definieren, der sagt, ob DIN-A\,5 verwendet wird:
%    \begin{macrocode}
\newcommand\ifafive[2]{\ifhhcls@dinafuenf #1\else #2\fi}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% Der \cs{areaset}"=Befehl erzeugt Texth�hen, die nicht unbedingt
% einem Vielfachen des Zeilenabstandes betragen.
% Das wird hier korrigiert.
% Die Zeilenzahl wird gerundet, wobei die Grenze zum Aufrunden bei 0,4
% statt normalerweise 0,5 liegt.
% Es funktioniert so, dass solange \cs{baselineskip} zu
% \cs{textheight} addiert wird, bis es gr��er als der alte Wert minus
% 0,6\cs{baselineskip} ist.
%    \begin{macrocode}
\begingroup
\newdimen\gammel
\gammel=\textheight
\advance\gammel by -0.6\baselineskip
\textheight0mm
\@whiledim\textheight<\gammel
  \do{\global\advance\textheight by \baselineskip}
\endgroup
%    \end{macrocode}
% Daten nochmal ausgeben (kopiert aus typearea.sty).
%    \begin{macrocode}
\ClassInfo{bgteubner}{%
    These are the values describing the layout:\MessageBreak
    BCOR\space=\space\the\ta@bcor\MessageBreak
    \string\paperwidth\space\space\space\space\space\space=%
                         \space\the\paperwidth\MessageBreak
    \space\string\textwidth\space\space\space\space\space\space=%
                         \space\the\textwidth\MessageBreak
    \space\string\evensidemargin\space=%
                         \space\the\evensidemargin\MessageBreak
    \space\string\oddsidemargin\space\space=%
                         \space\the\oddsidemargin\MessageBreak
    \string\paperheight\space\space\space\space\space=%
                         \space\the\paperheight\MessageBreak
    \space\string\textheight\space\space\space\space\space=%
                         \space\the\textheight\MessageBreak
    \space\string\topmargin\space\space\space\space\space\space=%
                         \space\the\topmargin\MessageBreak
    \space\string\headheight\space\space\space\space\space=%
                         \space\the\headheight\MessageBreak
    \space\string\headsep\space\space\space\space\space\space\space\space=%
                         \space\the\headsep\MessageBreak
    \space\string\topskip\space\space\space\space\space\space\space\space=%
                         \space\the\topskip\MessageBreak
    \space\string\footskip\space\space\space\space\space\space\space=%
                         \space\the\footskip\MessageBreak
    \space\string\baselineskip\space\space\space=%
                         \space\the\baselineskip\MessageBreak
  }
%    \end{macrocode}
%
% \subsection{Umbrucheinstellungen und Abst�nde}
%
% Schusterjungen und Hurens�hne:
%    \begin{macrocode}
\clubpenalty=100
\widowpenalty=400
%    \end{macrocode}
% Nur eine Zeile �ber abgesetzten Formeln (Standard: 50)
%    \begin{macrocode}
\displaywidowpenalty=50
%    \end{macrocode}
% Seitenumbruch in Trennung (Standard: 100)
%    \begin{macrocode}
\brokenpenalty=400
%    \end{macrocode}
% Strafe in Textformeln nach Relation (Standard: 500)
%    \begin{macrocode}
\relpenalty=700
%    \end{macrocode}
% Strafe in Textformeln nach bin�ren Operatoren (+,-,...) (Standard: 700)
%    \begin{macrocode}
\binoppenalty=2000
%    \end{macrocode}
% \begin{macro}{\parindent}
% Absatzeinzug auf den Zeilenabstand setzen:
%    \begin{macrocode}
\setlength{\parindent}{\baselineskip}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\frenchspacing}
% \changes{1.02}{2003/09/17}{In allen englischen Dialekten
% \cs{frenchspacing} verwenden}%
% Auch in englischen Texten kein zus�tzlicher Abstand nach
% Satzendezeichen.
%    \begin{macrocode}
\addto\extrasamerican{\frenchspacing}%
\addto\noextrasamerican{\nonfrenchspacing}%
\addto\extrasbritish{\frenchspacing}%
\addto\noextrasbritish{\nonfrenchspacing}%
\addto\extrasbritish{\frenchspacing}%
\addto\noextrasbritish{\nonfrenchspacing}%
\addto\extrascanadian{\frenchspacing}%
\addto\noextrascanadian{\nonfrenchspacing}%
\addto\extrasUKenglish{\frenchspacing}%
\addto\noextrasUKenglish{\nonfrenchspacing}%
\addto\extrasUSenglish{\frenchspacing}%
\addto\noextrasUSenglish{\nonfrenchspacing}%
%    \end{macrocode}
% \end{macro}
%
% \subsection{Kapitel- und Abschnitts�berschriften formatieren}
%
% F�r jede Ebene eine L�nge definieren:
%    \begin{macrocode}
\newlength{\hhcls@chapterindent}%
\newlength{\hhcls@sectionindent}%
\newlength{\hhcls@subsectionindent}%
\newlength{\hhcls@subsubsectionindent}%
\newlength{\hhcls@paragraphindent}%
\newlength{\hhcls@subparagraphindent}%
%    \end{macrocode}
% F�r die Kapitel�berschrift den Einzug festlegen.
% Vor |\begin{document}| kann das durch den Nutzer noch ver�ndert
% werden (sollte aber nicht).
%    \begin{macrocode}
\setlength{\hhcls@chapterindent}{3.9199em}%
%    \end{macrocode}
% Am |\begin{document}| den Einzug f�r die anderen Ebenen kopieren:
%    \begin{macrocode}
\AtBeginDocument{%
  \setlength{\hhcls@sectionindent}{\hhcls@chapterindent}%
  \setlength{\hhcls@subsectionindent}{\hhcls@chapterindent}%
  \setlength{\hhcls@subsubsectionindent}{\hhcls@chapterindent}%
  \setlength{\hhcls@paragraphindent}{\hhcls@chapterindent}%
  \setlength{\hhcls@subparagraphindent}{\hhcls@chapterindent}%
}
%    \end{macrocode}
% Schriftart der Kapitel- und Abschnitts�berschriften, mathematische
% Zeichen werden passend fett gedruckt, falls nicht Vektoren und
% Matrizen fett ausgezeichnet werden.
%    \begin{macrocode}
\setkomafont{sectioning}{\normalcolor\normalfont\bfseries
  \iftensor@bold\else\mathversion{bold}\fi}
%    \end{macrocode}
% \begin{macro}{\chapterformat}
% Formatierung der Kapitel�berschriften mit dem oben angegebenen
% Einzug. Die Zahl wird in eine Box fester breite linksb�ndig
% geschrieben:
%    \begin{macrocode}
\renewcommand*\chapterformat{%
  \makebox[\hhcls@chapterindent][l]{%
    \chapappifchapterprefix{\ }\thechapter\autodot}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\othersectionlevelsformat}
% Formatierung der Abschnitts�berschriften mit dem oben angegebenen
% Einzug sowie mit definierbaren Pre"= und Postfixen f�r die
% Abschnittsnummer.
% Die Pre- und Postfixe werden normalerweise nur f�r andere
% �berschriften wie z.\,B.\ f�r Beispiele, Aufgaben oder L�sungen
% ben�tigt.
% Die allgemeine Deklaration ist aber am einfachsten und praktischsten:
%    \begin{macrocode}
\DeclareRobustCommand*\othersectionlevelsformat[1]{%
  \makebox[\csname hhcls@#1indent\endcsname][l]{%
    \csname prefix#1\endcsname\csname the#1\endcsname\autodot
    \csname postfix#1\endcsname}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\prefixsection}
% \begin{macro}{\prefixsubsection}
% \begin{macro}{\prefixsubsubsection}
% \begin{macro}{\prefixparagraph}
% \begin{macro}{\prefixsubparagraph}
% Definition leerer Prefixe zu den �berschriften.
% Das w�re nicht notwendig, da das Konstrukt mit |\csname| und
% |\endcsname| unbekannte Befehle ignoriert.
% Die Definition macht den Code aber sauberer.
%    \begin{macrocode}
\def\prefixsection{}%
\def\prefixsubsection{}%
\def\prefixsubsubsection{}%
\def\prefixparagraph{}%
\def\prefixsubparagraph{}%
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Inhaltsverzeichnis}
%
% Einz�ge im Inhaltsverzeichnis festlegen:
%    \begin{macrocode}
\ifhhcls@tocindent
  \newlength{\hhcls@tocindentlength}
  \settowidth{\hhcls@tocindentlength}{0.}
  \renewcommand*\l@section{%
    \@dottedtocline{1}{1\hhcls@tocindentlength}{2.3em}}
  \renewcommand*\l@subsection{%
    \@dottedtocline{2}{2\hhcls@tocindentlength}{3.2em}}
  \renewcommand*\l@subsubsection{%
    \@dottedtocline{3}{3\hhcls@tocindentlength}{4.1em}}
  \renewcommand*\l@paragraph{%
    \@dottedtocline{4}{4\hhcls@tocindentlength}{5.0em}}
  \renewcommand*\l@subparagraph{%
    \@dottedtocline{5}{5\hhcls@tocindentlength}{5.9em}}
\else
  \renewcommand*\l@section{\@dottedtocline{1}{0em}{2.3em}}
  \renewcommand*\l@subsection{\@dottedtocline{2}{0em}{3.2em}}
  \renewcommand*\l@subsubsection{\@dottedtocline{3}{0em}{4.1em}}
  \renewcommand*\l@paragraph{\@dottedtocline{4}{0em}{5.0em}}
  \renewcommand*\l@subparagraph{\@dottedtocline{5}{0em}{5.9em}}
\fi
%    \end{macrocode}
%
% \subsection{Anhang}
%
% \begin{macro}{\appendixmore}
% Falls Medi�valziffern verwendet werden, sollen die Anhangsbuchstaben
% etwas kleiner gedruckt werden.
% Au�erdem automatische Erzeugung der �berschrift \emph{Anhang} am
% Anfang des Anhangs.
% \changes{1.32}{2004/08/19}{Move \cs{ifhhcls@times} outside
%   definition of \cs{appendixmore}}%
%    \begin{macrocode}
\ifhhcls@times
  \def\appendixmore{%
    \addpart{\appendixname}%
  }
\else
  \def\appendixmore{%
    \renewcommand*\thechapter{\textsc{\@alph\c@chapter}}%
    \addpart{\appendixname}%
  }
\fi
%    \end{macrocode}
% \end{macro}
%
% \subsection{Description-Umgebung}
%
% Schriftart f�r description-Umgebung:
%    \begin{macrocode}
\setkomafont{descriptionlabel}{\normalcolor\normalfont\rmfamily\bfseries
  \iftensor@bold\else\mathversion{bold}\fi}
%    \end{macrocode}
% \begin{macro}{\headfont}
%
% \subsection{Kolumnentitel}
% 
% Schriftart f�r die Kolumnentitel festlegen (nicht kursiv):
% \changes{1.32}{2004/08/19}{Remove \cs{rmfamily} from pagehead since
%   \cs{normalfont} does that already}%
%    \begin{macrocode}
\setkomafont{pagehead}{\normalfont\normalcolor\small}
%    \end{macrocode}
% \end{macro}
% Kolumnentitel formatieren:
%    \begin{macrocode}
\pagestyle{scrheadings}
\renewcommand*\partpagestyle{empty}
\renewcommand*\chapterpagestyle{empty}
\renewcommand*\indexpagestyle{empty}
\clearscrheadfoot
\ifhhcls@headingoutside
  \rohead[\pagemark]{\headmark\makebox[\hhcls@chapterindent][r]{\pagemark}}
  \lehead[\pagemark]{\makebox[\hhcls@chapterindent][l]{\pagemark}\headmark}
\else
  \ohead[\pagemark]{\pagemark}
  \ihead{\headmark}
\fi
%    \end{macrocode}
%
% \subsection{Guillemets als Anf�hrungszeichen}
%
% \begin{macro}{\flqq}
% \begin{macro}{\frqq}
% \begin{macro}{\flq}
% \begin{macro}{\frq}
% \changes{1.30}{2004/04/10}{Redefine quotation marks to allow math
%   mode and kerning}%
% Redefine quotation marks in order to allow kerning (fix bug in
% babel.sty).
%    \begin{macrocode}
\ProvideTextCommand{\flqq}{T1}{%
  \textormath{\guillemotleft}{\mbox{\guillemotleft}}}
\ProvideTextCommand{\flqq}{OT1}{%
  \textormath{\guillemotleft}{\mbox{\guillemotleft}}}
\ProvideTextCommandDefault{\flqq}{\UseTextSymbol{OT1}\flqq}
\ProvideTextCommand{\frqq}{T1}{%
  \textormath{\guillemotright}{\mbox{\guillemotright}}}
\ProvideTextCommand{\frqq}{OT1}{%
  \textormath{\guillemotright}{\mbox{\guillemotright}}}
\ProvideTextCommandDefault{\frqq}{\UseTextSymbol{OT1}\frqq}
\ProvideTextCommand{\flq}{T1}{%
  \textormath{\guilsinglleft}{\mbox{\guilsinglleft}}}
\ProvideTextCommand{\flq}{OT1}{%
  \textormath{\guilsinglleft}{\mbox{\guilsinglleft}}}
\ProvideTextCommandDefault{\flq}{\UseTextSymbol{OT1}\flq}
\ProvideTextCommand{\frq}{T1}{%
  \textormath{\guilsinglright}{\mbox{\guilsinglright}}}
\ProvideTextCommand{\frq}{OT1}{%
  \textormath{\guilsinglright}{\mbox{\guilsinglright}}}
\ProvideTextCommandDefault{\frq}{\UseTextSymbol{OT1}\frq}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\glqq}
% \begin{macro}{\grqq}
% \begin{macro}{\glq}
% \begin{macro}{\grq}
% Franz�sische Anf�hrungsstriche als Anf�hrungszeichen verwenden.
%    \begin{macrocode}
  \let\glqq=\frqq
  \let\grqq=\flqq
  \let\glq=\frq
  \let\grq=\flq
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \section{Literaturverweise}
%
% \begin{environment}{thebibliography}
% Flattersatz im Literaturverzeichnis und kleine Schrift:
%    \begin{macrocode}
\renewenvironment{thebibliography}[1]{%
  \setchapterpreamble{\bibpreamble}%
  \bib@heading%
  \list{\@biblabel{\@arabic\c@enumiv}}{%
    \settowidth\labelwidth{\@biblabel{#1}}%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \@openbib@code
    \usecounter{enumiv}%
    \let\p@enumiv\@empty
    \renewcommand*\theenumiv{\@arabic\c@enumiv}%
  }%
  \sloppy\clubpenalty4000\widowpenalty4000%
  \setlength\RaggedRightRightskip{\z@\@plus 6em}%
  \small\RaggedRight
  \sfcode`\.=\@m
}{
  \def\@noitemerr
  {\@latex@warning{Empty `thebibliography' environment}}%
  \endlist
}
%    \end{macrocode}
% \end{environment}
% Im Literaturverzeichnis die Bl�cke nur durch ein einfaches
% Leerzeichen trennen.
% Dadurch wird das weite Auseinanderziehen verhindert.
%    \begin{macrocode}
\renewcommand*\newblock{\ }
%    \end{macrocode}
% \begin{macro}{\@bibitem}
% \begin{macro}{\@lbibitem}
% Literaturangaben sollen in Majuskelziffern geschrieben werden:
%    \begin{macrocode}
\def\@bibitem#1{\stepcounter{\@listctr}%
\item[{[\newstylenums{\the\value{\@listctr}}]}]\if@filesw
  \immediate\write\@auxout
  {\string\bibcite{#1}{%
      \string\newstylenums{\the\value{\@listctr}}}}\fi\ignorespaces}
\def\@lbibitem[#1]#2{\item[\@biblabel{\newstylenums{#1}}\hfill]\if@filesw
  {\let\protect\noexpand
    \immediate\write\@auxout{%
      \string\bibcite{#2}{\protect\newstylenums{#1}}}}\fi\ignorespaces}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% Literaturverweise nicht umbrechbar:
%    \begin{macrocode}
\def\@citex[#1]#2{%
  \let\@citea\@empty
  \@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{,\,}%
     \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
     \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
     \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
       \G@refundefinedtrue
       \@latex@warning
         {Citation `\@citeb' on page \thepage \space undefined}}%
       {\hbox{\csname b@\@citeb\endcsname}}}}{#1}%
}
%    \end{macrocode}
% \begin{macro}{\btxISBN}
% \begin{macro}{\btxISSN}
% Die Zeichenketten ISBN und ISSN etwas kleiner schreiben:
%    \begin{macrocode}
\renewcommand\btxISBN{\acro{ISBN}}
\renewcommand\btxISSN{\acro{ISSN}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\printISBN}
% \changes{1.10}{2003/10/30}{Umbruch in ISBN verhindern}%
%    \begin{macrocode}
\ifhhcls@times
%    \end{macrocode}
% Umbruch verhindern f�r Times:
%    \begin{macrocode}
  \newcommand\printISBN[1]{\mbox{#1}}
\else
%    \end{macrocode}
% Falls Medi�valziffern verwendet werden, Ausgabe der ISBN mit
% verkleinertem X und verhindertem Umbruch:
%    \begin{macrocode}
  \newcommand\printISBN[1]{%
    \mbox{\expandafter\hhcls@printISBN#1\@empty\@empty}%
  }
%    \end{macrocode}
% \end{macro}
% Drucken eines "`X"' in einer ISBN, in Kapit�lchen.
%    \begin{macrocode}
  \newcommand\hhcls@printISBNx[1]{\acro{#1}}
%    \end{macrocode}
% Dieser Befehl durchsucht die ISBN nach ``x'' oder ``X'' und druckt
% diese gesondert:
%    \begin{macrocode}
  \def\hhcls@printISBN#1#2\@empty{%
    \begingroup
    \edef\hhcls@argeins{#1}%
    \edef\hhcls@argzwei{#2}%
    \def\hhcls@argX{X}%
    \def\hhcls@argx{x}%
    \ifx\hhcls@argeins\hhcls@argX
      \hhcls@printISBNx{#1}%
    \else
      \ifx\hhcls@argeins\hhcls@argx
        \hhcls@printISBNx{#1}%
      \else
        #1%
      \fi
    \fi
    \ifx\hhcls@argzwei\@empty
    \else
      \hhcls@printISBN#2\@empty
    \fi
    \endgroup
  }
\fi
%    \end{macrocode}
% \changes{1.10}{2003/10/30}{ISSN formatieren}%
% In der Bibliographie umschalten:
%    \begin{macrocode}
\setbibliographyfont{ISBN}{\printISBN}
\setbibliographyfont{ISSN}{\printISBN}
%    \end{macrocode}
%
% \section{Tabellen}
%
% Irgendein Spaltentyp mit Ausrichtung am Dezimalzeichen:
%    \begin{macrocode}
\newcolumntype{d}[1]{D{.}{,}{#1}}
%    \end{macrocode}
% 
% \section{Flie�umgebungen}
%
% \subsection{Platzierung}
%
% Bilder und Tabellen nur oben auf der Seite oder auf gesonderten Seiten:
%    \begin{macrocode}
\renewcommand\fps@figure{tp}
\renewcommand\fps@table{tp}
%    \end{macrocode}
%
% \begin{macro}{\floatpagefraction}
% Flie�umgebungen erst auf eine eigene Seite packen, wenn sie
% mindestens 75\,\%\ der Seite in Anspruch nehmen:
%    \begin{macrocode}
\renewcommand{\floatpagefraction}{0.75}  % Default: 0.5
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\topfraction}
% Bildplatzierung oben bis 75\,\%\ der Seite zulassen:
%    \begin{macrocode}
\renewcommand{\topfraction}{0.75}        % Default: 0.7
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\bottomfraction}
% Bildplatzierung unten bis 35\,\%\ der Seite zulassen:
%    \begin{macrocode}
\renewcommand{\bottomfraction}{0.35}     % Default: 0.3
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\textfraction}
% Textanteil muss mindestens 20\,\%\ betragen:
%    \begin{macrocode}
\renewcommand{\textfraction}{0.2}       % Default: 0.2
%    \end{macrocode}
% \end{macro}
% H�chstens zwei Bilder oben:
%    \begin{macrocode}
\setcounter{topnumber}{2}               % Default: 2
%    \end{macrocode}
% H�chstens ein Bild unten:
%    \begin{macrocode}
\setcounter{bottomnumber}{1}            % Default: 1
%    \end{macrocode}
% H�chstens drei Bilder insgesamt:
%    \begin{macrocode}
\setcounter{totalnumber}{3}             % Default: 3
%    \end{macrocode}
%
% \subsection{Bugfix f�r Platzierung im Text}
%
% Flie�umgebungen verhindern eine Silbentrennung im folgenden Wort.
% Diese Definition behebt das Problem
% (von Heiko Oberdiek, oberdiek@uni-freiburg.de):
%    \begin{macrocode}
\g@addto@macro\end@float{%
  \ifnum\@floatpenalty<\z@
    \ifnum\@floatpenalty<-\@Mii
    \else
      \ifhmode
        \if@ignore
          \penalty\@M
          \hskip\z@skip
        \fi
      \fi
    \fi
  \fi
}
%    \end{macrocode}
%
% \subsection{Abst�nde}
%
% Abstand zwischen zwei Flie�umgebungen:
%    \begin{macrocode}
\setlength\floatsep{18\p@ \@plus 10\p@ \@minus 2\p@}
%    \end{macrocode}
%  Abstand zwischen einer Flie�umgebung und dem Text:
%    \begin{macrocode}
\setlength\textfloatsep{14\p@ \@plus 20\p@ \@minus 4\p@}
%    \end{macrocode}
% Abst�nde auf Flie�umgebungsseiten:
%    \begin{macrocode}
\setlength\@fptop{0\p@ \@plus 1fil}
\setlength\@fpsep{18\p@ \@plus 1fil}
\setlength\@fpbot{0\p@ \@plus 2fil}
%    \end{macrocode}
%
% \subsection{Bildunter"= und Tabellen�berschriften}
%
% H�ngender Einzug:
%    \begin{macrocode}
\setcaphanging
%    \end{macrocode}
% Schriftart f�r Bildunterschriften:
%    \begin{macrocode}
\setkomafont{caption}{\normalfont\normalcolor\small\RaggedRight}
%    \end{macrocode}
% \begin{macro}{\germanfigurename}
% Definition eines Befehls, der den Namen der Bildunterschriften �ndert:
%    \begin{macrocode}
\newcommand*\germanfigurename[1]{\gdef\hhcls@germanfigurename{#1}}
%    \end{macrocode}
% \end{macro}
% Setzen der Bildunterschriften auf "`Bild"':
%    \begin{macrocode}
\germanfigurename{Bild}
%    \end{macrocode}
% Dem Paket |babel.sty| erz�hlen, dass f�r die deutsche Sprache immer
% |\hhcls@germanfigurename| als Bildunterschrift dienen soll:
%    \begin{macrocode}
\addto\captionsgerman{\renewcommand*\figurename{\hhcls@germanfigurename}}%
\addto\captionsngerman{\renewcommand*\figurename{\hhcls@germanfigurename}}%
\addto\captionsaustrian{\renewcommand*\figurename{\hhcls@germanfigurename}}%
\addto\captionsnaustrian{\renewcommand*\figurename{\hhcls@germanfigurename}}%
%    \end{macrocode}
%
% \subsection{Schriftart in Bildern}
%
% Schriftbefehle einrichten, die in der Art von KOMA"=Script mit
% \cs{setkomafont} ver�ndert werden k�nnen.
%    \begin{macrocode}
\newcommand*\@floatfont{\normalfont\normalcolor\normalsize}
\newcommand*\scr@fnt@float{\@floatfont}
%    \end{macrocode}
% Einen Befehl umdefinieren, der am Anfang jeder Flie�umgebung
% ausgef�hrt wird. Leider definiert schon |setspace| daran herum.
%    \begin{macrocode}
\@ifpackageloaded{setspace}{%
  \def\@xfloat #1[#2]{%
    \latex@xfloat #1[#2]%
    \def\baselinestretch{\setspace@singlespace}%
    \scr@fnt@float
  }%
}{%
  \def\@floatboxreset{%
    \reset@font
    \scr@fnt@float
    \@setminipage
  }%
}%
%    \end{macrocode}
% Schriftgr��e in Flie�umgebungen verringern.
%    \begin{macrocode}
\setkomafont{float}{\normalfont\normalcolor\small}%
%    \end{macrocode}
% Auch in |longtable|"=Umgebungen kleinere Schrift:
%    \begin{macrocode}
\newcommand\hhcls@longtable{}
\let\hhcls@longtable\longtable
\renewcommand\longtable{\small\hhcls@longtable}
%    \end{macrocode}
%
% \subsection{Verzeichnisse}
%
%    \begin{macrocode}
\renewcommand*\l@figure{\@dottedtocline{1}{0em}{2.9em}}
%    \end{macrocode}
%    \begin{macrocode}
\let\l@table\l@figure
%    \end{macrocode}
%
%
% \subsection{Subfigures}
%
% \begin{macro}{\subfigtopskip}
% \begin{macro}{\subfigbottomskip}
% \begin{macro}{\subfigcapmargin}
% Keine Abst�nde um Subfigures. Die m�ssen dann von Hand gemacht werden:
%    \begin{macrocode}
\renewcommand{\subfigtopskip}{0pt}
\renewcommand{\subfigbottomskip}{0pt}
\renewcommand{\subfigcapmargin}{0pt}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\subcapsize}
% Bei Subfigures die gleiche Schriftgr��e wie bei normalen
% Bildunterschriften:
%    \begin{macrocode}
\renewcommand{\subcapsize}{\small}
%    \end{macrocode}
% \end{macro}
% Abstand zwischen Bild und Bildunterschrift:
%    \begin{macrocode}
\setlength{\subfigcapskip}{8pt}
%    \end{macrocode}
% \begin{macro}{\subcapfont}
% Schriftart der Bildunterunterschriften. Zus�tzlich Flattersatz.
%    \begin{macrocode}
\renewcommand{\subcapfont}{\rmfamily\RaggedRight}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\subcaplabelfont}
% Schriftart f�r die Labels:
%    \begin{macrocode}
\renewcommand{\subcaplabelfont}{\rmfamily}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thesubfigure}
% Formatierung der Subfigure"=Nummer in Verweisen:
%    \begin{macrocode}
\renewcommand*{\thesubfigure}{\,\alph{subfigure}}
\renewcommand*{\@@thesubfigure}{\alph{subfigure}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@thesubfigure}
% Formatierung der Subfigure"=Nummer in Bildunterschriften:
%    \begin{macrocode}
\renewcommand{\@thesubfigure}{%
  {\subcapsize\subcaplabelfont\alph{subfigure}:}\space}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Subfloats}
%
% Nummerierung bei wiederholten Bildern und Tabellen:
%    \begin{macrocode}
\renewcommand*\thesubfloatfigure{%
  \themainfigure\,(\arabic{subfloatfigure}/\arabic{subfloatfiguremax})}
\renewcommand*\thesubfloattable{%
  \themaintable\,(\arabic{subfloattable}/\arabic{subfloattablemax})}
%    \end{macrocode}
%
% \subsection{Bilder und Tabellen z�hlen}
%
% Bilder z�hlen:
%    \begin{macrocode}
\newcounter{bilderzahl}%
\g@addto@macro\endfigure{%
  \stepcounter{bilderzahl}%
}%
%    \end{macrocode}
% Tabellen z�hlen:
%    \begin{macrocode}
\newcounter{tabellenzahl}%
\g@addto@macro\endtable{%
  \stepcounter{tabellenzahl}%
}%
%    \end{macrocode}
% Ausgabe der Werte:
%    \begin{macrocode}
\AtEndDocument{%
  \immediate\write\@auxout{%
    \string\gdef\string\hhclsbilderzahl{\thebilderzahl}^^J%
    \string\gdef\string\hhclstabellenzahl{\thetabellenzahl}^^J%
    \string\gdef\string\hhclsaufgabenzahl{\theaufgabenzahl}}%
}
\addglobalwarning{%
  \typeout{^^JNumber of figures: \thebilderzahl}%
  \typeout{Number of tables: \thetabellenzahl}%
  \typeout{Number of exercises: \theaufgabenzahl^^J}%
}%
%    \end{macrocode}
%
% \subsection{Verzeichnisse}
%
% \begin{macro}{\listoffigures}
% Verzeichnis der Bilder (kleinere Schrift):
%    \begin{macrocode}
\@ifundefined{BeforeStartingTOC}{%
  \ClassWarningNoLine{bgteubner}{Koma-Script macro
    \string\BeforeStartingTOC\space not defined.\MessageBreak
    Using workaround for \string\listoffigures. \MessageBreak
    You should consider updating Koma-Script.}%
  \renewcommand*\listoffigures{%
    \begingroup%
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse
      \fi
      \lof@heading%
      \small
      \@parskipfalse\@parskip@indent%
      \@starttoc{lof}%
      \if@restonecol\twocolumn\fi
    \endgroup
  }
}{%
  \BeforeStartingTOC[lof]{\small}
}%
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\listoftables}
% Verzeichnis der Tabellen (kleinere Schrift):
%    \begin{macrocode}
\@ifundefined{BeforeStartingTOC}{%
  \ClassWarningNoLine{bgteubner}{Koma-Script macro
    \string\BeforeStartingTOC\space not defined.\MessageBreak
    Using workaround for \string\listoftables.\MessageBreak
    You should consider updating Koma-Script.}%
  \renewcommand*\listoftables{%
    \begingroup
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse
      \fi
      \lot@heading%
      \small
      \@parskipfalse\@parskip@indent%
      \@starttoc{lot}%
      \if@restonecol\twocolumn\fi
    \endgroup
  }
}{%
  \BeforeStartingTOC[lot]{\small}
}%
%    \end{macrocode}
% \end{macro}
%
% \section{Index}
%
% Schreiben, wie Index erzeugt wird.
%    \begin{macrocode}
\newcommand\hhcls@makeindex{}
\let\hhcls@makeindex=\makeindex
\renewcommand\makeindex{%
  \hhcls@makeindex
  \addglobalwarning{%
    \typeout{^^JGenerate index by using^^J%
      \space\space`makeindex -c -g -s bgteubner.ist \jobname'.^^J%
      Have a look to the log file `\jobname.ilg'.^^J}%
  }%
}
%    \end{macrocode}
% \begin{macro}{\hhcls@germanindexname}
% Name des Index:
%    \begin{macrocode}
\newcommand*\hhcls@germanindexname{Stichwortverzeichnis}
%    \end{macrocode}
% \end{macro}
% Dem Paket |babel.sty| erz�hlen, dass f�r die deutsche Sprache immer
% |\hhcls@germanindexname| als Titel f�r das Sachwortverzeichnis dienen soll:
%    \begin{macrocode}
\addto\captionsgerman{\renewcommand*\indexname{\hhcls@germanindexname}}%
\addto\captionsngerman{\renewcommand*\indexname{\hhcls@germanindexname}}%
\addto\captionsaustrian{\renewcommand*\indexname{\hhcls@germanindexname}}%
\addto\captionsnaustrian{\renewcommand*\indexname{\hhcls@germanindexname}}%
%    \end{macrocode}
% Am Ende ein Sachwortverzeichnis erstellen:
%    \begin{macrocode}
\AtEndDocument{\printindex}
%    \end{macrocode}
% Set size for lists.
%    \begin{macrocode}
\newcommand\listsfont{\footnotesize}
%    \end{macrocode}
% \begin{environment}{theindex}
% Indexumgebung redefinieren, damit Flattersatz und kleinere Schrift
% verwendet werden. Au�erdem gegen�ber |\RaggedRight| eine gr��ere
% "`Flatterung"' zulassen, um Overful hboxes zu vermeiden:
%    \begin{macrocode}
\renewenvironment{theindex}
  {\if@twocolumn
      \@restonecolfalse
    \else
      \@restonecoltrue
    \fi
    \columnseprule \z@
    \columnsep 20\p@
    \setchapterpreamble{\index@preamble}%
    \idx@heading%
    \thispagestyle{\indexpagestyle}%
    \par
    \parindent\z@
    \setlength{\parskip}{\z@ \@plus .3\p@}%
    \setlength{\parfillskip}{\z@ \@plus 1fil}%
    \let\item\@idxitem
    \setlength\RaggedRightRightskip{\z@\@plus 4em}%
%    \end{macrocode}
% Boolean einf�hren, der pr�fen hilft, ob der richtige Indexstil
% verwendet wurde.
%    \begin{macrocode}
    \newif\ifhhclsiscorrectindex
    \RaggedRight\listsfont}
  {\ifhhclsiscorrectindex
    \else
%    \end{macrocode}
% Der Autor hat einen nicht zul�ssigen Indexstil verwendet:
%    \begin{macrocode}
      \ClassError{bgteubner}{You have not used the correct index
        style\MessageBreak
        `bgteubner.ist' for the class `bgteubner.cls'}{%
        You have to use the style bgteubner.ist:^^J%
        Generate index by using^^J%
        \space\space`makeindex -c -g -s bgteubner.ist \jobname'.^^J%
        Have a look to the log file `\jobname.ilg'.}%
    \fi
    \if@restonecol\onecolumn\else\clearpage\fi}
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\@idxitem}
% H�ngender Einzug mit 30\,pt:
%    \begin{macrocode}
\renewcommand*\@idxitem{\par\hangindent 24\p@}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\subitem}
% Ein "`--"' vor Untereintr�gen:
%    \begin{macrocode}
\renewcommand*\subitem{\@idxitem \quad --\;}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\subsubitem}
% Zwei "`--"' vor Unter"=Untereintr�gen:
%    \begin{macrocode}
\renewcommand*\subsubitem{\@idxitem \quad --\;--\;}
%    \end{macrocode}
% \end{macro}
%
% Befehle f�r Seitenbereiche, Verwendung z.\,B.\ \verb_\index{Moin|ff}_.
%
% \begin{macro}{\f}
% Ein einfaches "`f"' angeh�ngt:
%    \begin{macrocode}
\newcommand*\f[1]{#1\,f}%
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\ff}
% Ein einfaches "`ff"' angeh�ngt:
%    \begin{macrocode}
\newcommand*\ff[1]{#1\,ff}%
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\textbff}
% \begin{macro}{\textbfff}
% Die beiden Befehle in fett:
%    \begin{macrocode}
\newcommand*\textbff[1]{\textbf{#1\,f}}%
\newcommand*\textbfff[1]{\textbf{#1\,ff}}%
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\subind}
% Wenn mit \verb_|see_ auf andere Indexeintr�ge mit Unterpunkten
% verwiesen wird, soll \cs{subind} statt einem Komma verwendet werden:
%    \begin{macrocode}
\newcommand\subind{\,--\,\hskip\z@skip}%
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\emphindex}
% \changes{2.01}{2011/12/25}{Added macro \cs{emphindex} for important index
%   entryies}%
% Macro for generating bold page references in the index. May be
% redefined if hyperref is used.
%    \begin{macrocode}
\newcommand*\emphindex[1]{\textbf{#1}}%
%    \end{macrocode}
% \end{macro}
% In case the package \verb|imakeidx.sty| is loaded, prevent it from changing
% the theindex environment.
%    \begin{macrocode}
\BeforePackage{imakeidx}{%
  \PassOptionsToPackage{original}{imakeidx}
}
%    \end{macrocode}
%
% \section{Fu�noten}
%
% Formatierung der Fu�noten. H�ngender Einzug, Fu�notenmarkierung
% nicht hochgestellt, Versalziffern:
%    \begin{macrocode}
\deffootnote{1.5em}{1.5em}{\normalfont\newstylenums{\thefootnotemark}\enspace}
%    \end{macrocode}
% \changes{1.02}{2003/09/17}{\cs{normalfont} in Fu�noten aufrufen}%
% Fu�noten im Flattersatz:
%    \begin{macrocode}
\addtokomafont{footnote}{\normalfont\RaggedRight}
%    \end{macrocode}
% Fu�notenmarkierung im Text in Versalziffern:
%    \begin{macrocode}
\deffootnotemark{\textsuperscript{\newstylenums{\thefootnotemark}}}
%    \end{macrocode}
% Abstand der Fu�noten vom Text?
%    \begin{macrocode}
\setlength{\skip\footins}{10\p@ \@plus 4\p@ \@minus 2\p@}
%    \end{macrocode}
%
% \section{Zus�tzliche Textbefehle}
%
% \begin{macro}{\acro}
% \changes{1.01}{2003/09/16}{\cs{acro} f�r European Computer Modern
%   serifenlos sowie kursive Schreibmaschinenschrift mit
%   \cs{textsmaller} statt \cs{textsc}}%
% Gro�buchstabige Abk�rzungen in Kapit�lchen setzen:
%    \begin{macrocode}
\ifhhcls@times
  \DeclareRobustCommand\acro[1]{\textsmaller{\MakeUppercase{#1}}}
\else
  \DeclareRobustCommand\acro[1]{%
    \ifthenelse{\equal{\f@family}{hfor}\or\equal{\f@family}{cmr}}{%
      \textsc{\MakeLowercase{#1}}%
    }{%
      \ifthenelse{\(\equal{\f@family}{hfott}\or\equal{\f@family}{cmtt}\)%
        \and\equal{\f@shape}{n}}{%
        \textsc{\MakeLowercase{#1}}%
      }{%
        \textsmaller{\MakeUppercase{#1}}%
      }%
    }%
  }
\fi
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\person}
% Personennamen:
%    \begin{macrocode}
\newcommand\person{}%
\let\person=\emph
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\new}
% Neu eingef�hrte Begriffe:
%    \begin{macrocode}
\newcommand\new{}%
\let\new=\emph
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\engl}
% Englische Begriffe:
%    \begin{macrocode}
\newcommand\engl{}%
\let\engl=\emph
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\qed}
% \changes{1.10}{2003/10/30}{Befehl \cs{qed} eingef�hrt}%
% Ende eines Beweises:
%    \begin{macrocode}
\newcommand*\qed{%
  \hskip 1em plus 1fill\rule{0pt}{1ex}\hskip\z@skip
  \hglue 0pt plus 1fill\mbox{\qedname}}
%  \hskip 1em plus 1fill\rule{0.05mm}{1ex}\hskip\z@skip
%  \rule{0.05mm}{1ex}\hglue 0pt plus 1fill\qedname}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\qedname}
% Text, der von \cs{qed} gesetzt wird:
%    \begin{macrocode}
\newcommand*\qedname{\rule{1ex}{1ex}}
%    \end{macrocode}
% \end{macro}
%
%
% \section{Mathematik}
%
% \subsection{Zus�tzliche mathematische Befehle}
%
% \begin{macro}{\tr}
% Spur (tr):
%    \begin{macrocode}
\newcommand*\tr{\mathop{\operator@font tr}\nolimits}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\e}
% Eulerkonstante:
%    \begin{macrocode}
\newcommand*\e{\mathop{\operator@font e}\nolimits}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\d}
% Differentialoperator:
%
% For some reason, since texlive 2011, the original \cs{d} macro is
% redefined later again. This can be overcome by redefining \cs{d} at
% \cs{begin{document}}.
% \changes{2.01}{2011/12/29}{Fix later redefinition of \cs{d} for
% usage in math mode}%
%    \begin{macrocode}
\let\origd=\d
\AtBeginDocument{
  \renewcommand*\d{%
%    \end{macrocode}
% Das |\relax| ist notwendig, weil |\ifmmode| sonst nicht in der
% |align|"=Umgebung funktionieren w�rde.
%    \begin{macrocode}
    \relax\ifmmode
      \mathrm{d}%
    \else
      \expandafter\origd
    \fi
  }%
}%
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\D}
% Differenzenoperator:
%    \begin{macrocode}
\newcommand*\D{\ensuremath{\upDelta}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\grad}
% Gradient:
%    \begin{macrocode}
\newcommand*\grad{\mathop{\operator@font grad}\nolimits}
%    \end{macrocode}
% \end{macro}
% \begin{environment}{cases*}
% Fallunterscheidung mit schlie�ender Klammer:
%    \begin{macrocode}
\newenvironment{cases*}{%
  \matrix@check\cases\env@cases
}{%
  \endarray\right\rbrace%
}
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\equivalent}
% Entspricht-Zeichen:
%    \begin{macrocode}
\newcommand*\equivalent{\ensuremath{\mathrel{\widehat{=}}}}
%    \end{macrocode}
% \end{macro}
% \begin{environment}{nomathindent}
% Innerhalb dieser Umgebung ist der mathematische Einzug verringert
% oder gel�scht.
%    \begin{macrocode}
%\newcommand*\nomathindent[1][1.0]{\rule{-#1\mathindent}{0mm}}
\newenvironment{nomathindent}[1][1.0]{%
  \addtolength{\mathindent}{-#1\mathindent}%
  \ignorespaces
}{\ignorespacesafterend}
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\vec}
% \begin{macro}{\matr}
% \begin{macro}{\tens}
% \changes{1.06}{2003/10/12}{Befehl \cs{tensor} in \cs{tens} umbenannt}%
% \changes{1.20}{2004/03/07}{MathTime font has original bold math. Use
%   if available}%
% Befehl f�r Matrizen und Vektoren.
% Falls Fettdruck bei Times, gibt es keine richtige fette Schrift. 
% "`Poor Man's Bold als Ersatz"'.
%    \begin{macrocode}
\iftensor@bold
  \ifhhcls@times
    \ifhhcls@mathtime
    \else
      \addglobalwarning{%
        \ClassWarningNoLine{bgteubner}{The combination of the main font
          Times\MessageBreak 
          with bold vectors (option <boldvec>)\MessageBreak
          leads to ugly results in some cases}}%
      \renewcommand*\vec[1]{\ensuremath{\pmb{#1}}}
      \renewcommand*\matr[1]{\ensuremath{\pmb{#1}}}
      \renewcommand*\tens[2]{\ensuremath{\pmb{#1}}}
    \fi
  \fi
\fi
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{macro}{\tensor}
% Einen Befehl \cs{tensor} erzeugen, der dem Nutzer sagt, dass der
% Befehl in \cs{tens} umbenannt wurde.
%    \begin{macrocode}
\AtBeginDocument{%
  \providecommand*\tensor{%
    \ClassError{bgteubner}{\string\tensor\space command used instead
      of \string\tens\space command (see help by pressing h)}{%
      Because of some name clashes, the \string\tensor\space command
      had to be renamed to \string\tens. Please change all calls
      inside your document.}%
    \tens
  }%
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Formatierung}
%
% Zeilenumbr�che zwischen Zeilen in abgesetzten Formeln erlauben:
%    \begin{macrocode}
\allowdisplaybreaks
%    \end{macrocode}
% Bug von |amsmath| beheben, der Labels auf Normalschrift zwingt:
%    \begin{macrocode}
\def\maketag@@@#1{\hbox{\m@th#1}}
%    \end{macrocode}
%
% Komma im Mathemodus als Dezimalzeichen verwenden, von 
% Donald Arseneau (asnd@triumf.ca):
%    \begin{macrocode}
\mathchardef\mathcomma\mathcode`\,
\mathcode`\,=32768 % "8000
%
\begingroup
\catcode`\_=12
\catcode`\,=\active
\@firstofone{%
\endgroup
%
 \edef\DC@char{\meaning_}
 \def\DC@parse#1 _{\def\DC@parse##1#1 ##2##3\delimiter{##2}}
 \expandafter\DC@parse\DC@char
 \toks@={\expandafter\DC@parse\meaning\DC@char}
 \edef\DC@test{9<2\the\toks@ \DC@char.\delimiter}
%
 \DeclareRobustCommand\ActiveComma{\futurelet\DC@char\DC@docomma}
 \def\DC@docomma{%
   \ifnum\DC@test \mathord \fi
   \mathcomma
 }
 \let,\ActiveComma
}
%    \end{macrocode}
%
% \section{Glossar, Abk�rzungs- und Formelverzeichnisse}%
%
% Die Behandlung von solchen Verzeichnissen wurde aus dem
% |nomencl|"=Paket, Version~v3.1a vom 13.\,12.~2000,
% weiterentwickelt.
%
% Zun�chst werden Befehle definiert, die das At"=Zeichen (@) in
% Argumenten finden und verarbeiten k�nnen. 
% Da in der Klassendatei das @ eine besondere Bedeutung hat, muss dies
% zun�chst auf den Standardwert wie im Text umgeschaltet werden.
%    \begin{macrocode}
\makeatother
%    \end{macrocode}
% \begin{macro}{\ifhasat}
% Dieser Befehl hat drei Argumente, wenn das erste ein @ enth�lt, wird
% das zweite Argument ausgef�hrt, andernfalls das dritte.
%    \begin{macrocode}
\newcommand*\ifhasat[1]{%
  \expandafter\csname @ifhasat\expandafter\endcsname#1@\end
}
%    \end{macrocode}
% Routine, die die Arbeit f�r \cs{ifhasat} erledigt.
%    \begin{macrocode}
\expandafter\def\csname @ifhasat\endcsname#1@#2\end{%
  \ifx\relax#2\relax
    \expandafter\csname @secondoftwo\expandafter\endcsname
  \else
    \expandafter\csname @firstoftwo\expandafter\endcsname
  \fi
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\beforeat}
% �hnlich wie \cs{ifhasat}, �bernimmt aber nur ein Argument und gibt
% den Teil vor dem @ zur�ck.
%    \begin{macrocode}
\newcommand*\beforeat[1]{%
  \expandafter\csname @beforeat\expandafter\endcsname#1@\end
}
\expandafter\def\csname @beforeat\endcsname#1@#2\end{#1}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\afterat}
% �hnlich wie \cs{ifhasat}, �bernimmt aber nur ein Argument und gibt
% den Teil nach dem @ zur�ck.
%    \begin{macrocode}
\newcommand*\afterat[1]{%
  \ifhasat{#1}{\expandafter\csname hh@afterat\expandafter\endcsname#1\end}{}%
}
\expandafter\def\csname hh@afterat\endcsname#1@#2\end{#2}
%    \end{macrocode}
% \end{macro}
% Zur�ckschalten des @ auf den Wert innerhalb der Klassendefinition.
%    \begin{macrocode}
\makeatletter
%    \end{macrocode}
% Prefix vor Eintr�ge, um die Sortierung korrekt zu gestalten. Siehe
% dazu die Dokumentation zu |nomencl.sty|. Standardm��ig
% ausgeschaltet, um |makeindex| zu erm�glichen, Zeichen einzuf�gen.
%    \begin{macrocode}
\def\hhcls@gloprefix{}
%    \end{macrocode}
% L�sche die von der Formatdatei erzeugten Glossar"=Befehle.
%    \begin{macrocode}
\let\glossary=\@undefined
\let\makeglossary=\@undefined
%    \end{macrocode}
% \begin{macro}{\makeglossary}
% Definiere einen Befehl \cs{makeglossary}, der einen neuen Typ
% Glossar einrichtet.\sloppypar
% Standardm��ig wird ein Glossar erzeugt, f�r den neue Eintr�ge mit
% \cs{glossary\{\meta{Eintrag}\}\{\meta{Erkl�rung}\}} generiert
% werden. Dann werden die Dateien \cs{\meta{\cs{jobname}}.glo} und
% \cs{jobname.gls} verwendet.
% Wird ein optionales Argument mit \cs{makeglossary[\meta{Name}]}
% �bergeben, wird ein neuer Glossartyp eingerichtet, f�r den Eintr�ge
% mit dem Befehl
% \cs{glossary\meta{Name}\{\meta{Eintrag}\}\{\meta{Erkl�rung}\}}
% generiert werden. Es werden die Dateien 
% \cs{jobname.\meta{Name}} und
% \cs{jobname.\meta{Name}s} verwendet.
%    \begin{macrocode}
\newcommand*\makeglossary[1][\@empty]{%
%    \end{macrocode}
% Speicher die Dateiendungen f�r die von \LaTeX und die von makeindex
% erzeugten Dateien in den Makros \cs{hhcls@gloname} und
% \cs{hhcls@\meta{Name}glsname}.
%    \begin{macrocode}
  \edef\hhcls@gloname{glo#1}%
  \expandafter\edef\csname hhcls@#1glsname\endcsname{gls#1}%
%    \end{macrocode}
% Ein paar Ausgaben zur Information.
%    \begin{macrocode}
  \typeout{^^JNew glossary type \string\glossary#1 with file
    extensions `\hhcls@gloname' and `\csname hhcls@#1glsname\endcsname'.}%
  \typeout{Writing glossary file `\jobname.\hhcls@gloname'.^^J}%
%    \end{macrocode}
% Am Ende des �bersetzungslaufs wird dem Anwender mitgeteilt, wie er
% die Glossare erzeugen kann.
%    \begin{macrocode}
  \addglobalwarning{%
    \typeout{^^JGenerate glossary type \string\glossary#1 by using^^J%
      \space\space`makeindex -c -g -s bgteuglo.ist -o
      \jobname.\csname hhcls@#1glsname\endcsname\space
      -t \jobname.\hhcls@gloname lg \jobname.\hhcls@gloname'^^J%
      or^^J%
      \space\space`makeindex -c -g -s bgteuglochar.ist -o
      \jobname.\csname hhcls@#1glsname\endcsname\space
      -t \jobname.\hhcls@gloname lg \jobname.\hhcls@gloname'.^^J%
      Have a look to the log file `\jobname.\hhcls@gloname lg'^^J.}%
  }%
%    \end{macrocode}
% �berpr�fen, ob es den Befehl schon gibt, damit nicht doppelt
% definiert wird.
%    \begin{macrocode}
  \@ifundefined{glossary#1}{%
%    \end{macrocode}
% \begin{macro}{\glossary}
% Definition des Befehls, der im Text verwendet wird, also
% \cs{glossary} oder \cs{glossary\meta{Name}}. Dieser Befehl ist
% zerbrechlich, darf also nicht in Bildunterschriften etc.\ verwendet
% werden. Dies ist aber keine Einschr�nkung, da ja im Glossar keine
% Verweise auf Seiten oder andere Dinge gemacht werden.
% Wird als erstes Argument ein zus�tzliches optionales Arguemnt
% angegeben, wird der Inhalt dem Eintrag statt des normalerweise
% verwendeten "`a"' vorangestellt, um die Sortierung zu
% beeinflussen. Ebenso ist aber auch die Verwendung von |blah@fasel|
% wie beim Index m�glich.
%    \begin{macrocode}
    \expandafter\def\csname glossary#1\endcsname{%
%    \end{macrocode}
% Den Ausgabekanal an \cs{@hhcls@glossary} weiterreichen.
%    \begin{macrocode}
      \def\hhcls@tmpoutputfile{\csname hhcls@glossaryfile#1\endcsname}%
%    \end{macrocode}
% Die eigentliche Arbeit wird von \cs{@hhcls@glossary} �bernommen.
%    \begin{macrocode}
      \protect\@hhcls@glossary
    }%
%    \end{macrocode}
% \end{macro}
% Festlegen und �ffnen der Ausgabedatei.
%    \begin{macrocode}
    \expandafter\newwrite\csname hhcls@glossaryfile#1\endcsname
    \immediate\openout\csname hhcls@glossaryfile#1\endcsname=%
      \jobname.\hhcls@gloname% 
%    \end{macrocode}
% \begin{macro}{\glossarypreamble}
% Definieren der Pr�ambel des Glossars. Per Default wird ein neues,
% unnummeriertes Kapitel mit der �berschrift
% \cs{glossary\meta{Name}name} angefangen. F�r den normalen Glossar
% \cs{glossary} ist diese durch |babel.sty| definiert. Bei anderen
% Glossartypen \cs{glossary\meta{Name}} muss der Anwender dies selbst
% erledigen, indem er mit
% \cs{newcommand}\cs{glossary\meta{Name}name\{\meta{Titel}\}} einen
% Befehl erzeugt.
% Der Anwender kann auch den Befehl \cs{glossary\meta{Name}preamble}
% umdefinieren, um beispielsweise nur einen Abschnitt zu beginnen oder
% zus�tzlichen Text zu platzieren.
%    \begin{macrocode}
    \expandafter\def\csname glossary#1preamble\endcsname{%
      \@ifundefined{glossary#1name}{%
%    \end{macrocode}
% Wenn \cs{glossary\meta{Name}name} nicht definiert ist, einen Fehler
% ausgeben und \emph{\bfseries ????} als Titel verwenden.
%    \begin{macrocode}
        \ClassError{bgteubner}{No title for glossary type `#1'
          defined}{You have to define a title for the glossary type by
          doing^^J%
          \space\space\space\space%
          \string\newcommand\string\glossary #1name{<Name>}.}%
        \addchap{\itshape ????}%
      }{%
%    \end{macrocode}
% Titel als Kapitelnamen ausgeben.
%    \begin{macrocode}
        \addchap{\csname glossary#1name\endcsname}}%
      }%
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\printglossary}
% Befehl \cs{printglossary\meta{Name}}, der ein automatisch erzeugtes
% Glossar ausgibt. Wird ein optionales Argument angegeben, ver�ndert
% sich die Spaltenbreite der Eintr�ge.
%    \begin{macrocode}
    \expandafter\def\csname printglossary#1\endcsname{%
      \@ifnextchar[%
      {\csname @printglossary#1\endcsname}%
      {\csname @printglossary#1\endcsname[\glossarylabelwidth]}%
    }%
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@printglossary}
% Der interne Befehl, der von \cs{printglossary\meta{Name}} aufgerufen
% wird.
%    \begin{macrocode}
    \expandafter\def\csname @printglossary#1\endcsname[##1]{%
      \begingroup
%    \end{macrocode}
% Breite aus dem Argument setzen.
%    \begin{macrocode}
      \setlength{\glossarylabelwidth}{##1}%
%    \end{macrocode}
% Preambel umkopieren.
%    \begin{macrocode}
      \def\hhcls@glossarypreamble{\csname glossary#1preamble\endcsname}%
%    \end{macrocode}
% Die erzeugte Datei mit der enthaltenen |theglossary|"=Umgebung laden.
%    \begin{macrocode}
      \@input@{\jobname.\csname hhcls@#1glsname\endcsname}%
      \endgroup
    }%
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
  }{%
%    \end{macrocode}
% Ist der Glossartyp schon definiert, eine Fehlermeldung ausgeben.
%    \begin{macrocode}
    \ClassError{bgteubner}{Glossary type `#1' already defined}{You
      have tried to define the glossary type `#1' twice}}%
}
\@onlypreamble\makeglossary
%    \end{macrocode}
% \end{macro}
% Defaulteinstellung f�r diejenigen, die nicht mit automatisch
% erzeugten Verzeichnissen arbeiten und direkt in den Quelltext eine
% |theglossary|"=Umgebung schreiben.
%    \begin{macrocode}
\def\hhcls@glossarypreamble{\addchap{\glossaryname}}%
%    \end{macrocode}
% Ein Befehl aus dem |nomencl|"=Paket, bei dem ich nicht wei�, was er
% genau tut. Behalte ich lieber, wie es ist.
%    \begin{macrocode}
\def\hhcls@glo@verb{\expandafter\strip@prefix\meaning}
%    \end{macrocode}
% Dieser Befehl stellt fest, ob ein Pr�fix zur Sortierung angegeben
% wurde oder nicht.
%    \begin{macrocode}
\def\@hhcls@glossary{%
  \@bsphack
  \begingroup
  \@sanitize
  \@ifnextchar[%
  {\@@@hhcls@glossary}{\@@@hhcls@glossary[\hhcls@gloprefix]}%
}%
%    \end{macrocode}
% \begin{macro}{\@@@hhcls@glossary}
% Das eigentliche Schreiben des Eintrags in die Ausgabedatei.
%    \begin{macrocode}
\def\@@@hhcls@glossary[#1]#2#3{%
 \def\@tempa{#2}\def\@tempb{#3}%
%    \end{macrocode}
% Wenn das Argument ein @ enth�lt, eine andere Behandlung verwenden.
%    \begin{macrocode}
 \ifhasat{#2}{%
%    \end{macrocode}
% Ist ein @ enthalten, den Eintrag fast unver�ndert in die Ausgabedatei
% schreiben. Es wird nur der Pr�fix vorgeschaltet und der Teil nach
% dem @ in geschweifte Klammern gesetzt, um Probleme zu verhindern,
% wenn eine eckige Klammer enthalten ist.
%    \begin{macrocode}
   \protected@write\hhcls@tmpoutputfile{}%
   {\string\glossaryentry{#1\beforeat{#2}@{\afterat{#2}}]
%       \hhcls@glo@verb\@tempb
       \@tempb
       |glossarypage}{\thepage}%
   }%
 }{%
%    \end{macrocode}
% Ist kein @ enthalten, wird der Eintrag verdoppelt und mit @ in die
% Datei geschrieben.
%    \begin{macrocode}
   \protected@write\hhcls@tmpoutputfile{}%
   {\string\glossaryentry{%
       #1\@tempa @{\@tempa}]
       \@tempb
%       #1\hhcls@glo@verb\@tempa @{\hhcls@glo@verb\@tempa}]
%       \hhcls@glo@verb\@tempb
       |glossarypage}{\thepage}%
   }%
 }%
 \endgroup
 \@esphack}
%    \end{macrocode}
% \end{macro}
% Breite der Eintr�ge in den Verzeichnissen definieren.
%    \begin{macrocode}
\newlength{\glossarylabelwidth}
\setlength{\glossarylabelwidth}{3em}
%    \end{macrocode}
% Eintr�ge linksb�ndig.
%    \begin{macrocode}
\def\glossarylabel#1{#1\hfil}
%    \end{macrocode}
% \begin{environment}{theglossary}
% Die Umgebung, die die Ausgabe der Verzeichnisse vornimmt.
% Im optionalen Argument kann der Defaultwert der Pr�ambel
% �berschrieben werden. Das ist n�tzlich, wenn man |theglossary|
% direkt verwendet.
%    \begin{macrocode}
\newenvironment{theglossary}[1][\@empty]{%
  \def\tuetel{#1}%
  \def\tueteluet{\@empty}%
%    \end{macrocode}
% Verzeichnisse zweispaltig setzen.
%    \begin{macrocode}
  \begin{multicols}{2}[%
%    \end{macrocode}
% Schriftgr��en umstellen.
%    \begin{macrocode}
    \let\size@section\normalsize
    \let\size@subsection\small
    \let\size@subsubsection\small
    \small
%    \end{macrocode}
% Pr�ambel ausgeben.
%    \begin{macrocode}
    \ifx\tuetel\tueteluet
      \hhcls@glossarypreamble
    \else
      #1%
    \fi
    ]%
%    \end{macrocode}
% Layout innerhalb der Liste.
%    \begin{macrocode}
    \setlength{\columnsep}{20pt}%
    \listsfont
%    \end{macrocode}
% Liste beginnen. Falls ein \cs{item} ohne Argument in eckigen
% Klammern verwendet wird, einen Fehler ausgeben, denn das macht hier
% wirklich keinen Sinn.
%    \begin{macrocode}
    \begin{list}{\ClassError{bgteubner}{No symbol given for
          \string\item}{In the `theglossary' environment, you have to
          specify a symbol^^J%
          for each \string\item\space using \string\item[<symbol>], e.g.^^J%
          \space\space\space\space
          \string\item[{$\string\sigma_{\string\mathrm{max}}$}] Maximal
          stress^^J%
          \space\space\space\space
          \string\item[DIN] Deutsches Institut f"ur Normung}}{%
        \setlength{\labelwidth}{\glossarylabelwidth}%
        \leftmargin\labelwidth
        \advance\leftmargin by \labelsep
        \let\makelabel\glossarylabel%
%    \end{macrocode}
% Absatzabstand nicht dehnbar, um nicht die Zeilen zu weit auseinander
% zu ziehen.
%    \begin{macrocode}
        \parsep\z@%
        \parskip\z@%
%        \parsep\z@ \@plus\p@%
%        \parskip\z@ \@plus\p@%
        \setlength{\itemsep}{0pt}%
        \newif\ifhhclsiscorrectglossary
        \RaggedRight
      }%
    }{%
%    \end{macrocode}
% Ende der Liste.
%    \begin{macrocode}
%      \ifhhclsiscorrectglossary
%      \else
%        \ClassError{bgteubner}{You have not used the correct glossary
%          style\MessageBreak
%          `bgteuglo.ist' or `bgteuglochar.ist' for the class
%          `bgteubner.cls'}{%
%          You have to use one of the style `bgteuglo.ist' or
%          `bgteuglochar.ist'.^^J%
%          Have a look to the file \jobname.log to learn which command
%          line to use.}%
%      \fi
    \end{list}%
  \end{multicols}%
  \ignorespacesafterend
  \noindentnextpar\par
}
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\glossarypage}
% Befehl, der die Seitenzahlen in den theoremartigen Verzeichnissen
% ignoriert.
%    \begin{macrocode}
\def\glossarypage#1{}
\def\glossarypagedelim{}
\def\glossarypagerange{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\glossarynewchar}
% Zeichen f�r einen neuen Buchstaben im Glossar:
%    \begin{macrocode}
\newcommand\glossarynewchar[1]{%
  \indexspace
  \item [\textbf{#1}]\strut
    \@nobreaktrue\nopagebreak
}
%    \end{macrocode}
% \end{macro}
%
% \section{Anderer Kram}
%
% Testen, ob beidseitig (zu Debug"=Zwecken):
%    \begin{macrocode}
\if@twoside
\else
  \ClassError{bgteubner}{One-side format chosen}{You may not print a
    book with one-side format.}
\fi
%    \end{macrocode}
% \changes{1.14}{2003/12/17}{New command \cs{GetFileInfo} (from
% \texttt{url.sty})}%
% \begin{macro}{\GetFileInfo}
% Get file version and date (from |doc.sty|).
%    \begin{macrocode}
\providecommand*\GetFileInfo[1]{%
  \def\filename{#1}%
  \def\@tempb##1 ##2 ##3\relax##4\relax{%
    \def\filedate{##1}%
    \def\fileversion{##2}%
    \def\fileinfo{##3}}%
  \edef\@tempa{\csname ver@#1\endcsname}%
  \expandafter\@tempb\@tempa\relax? ? \relax\relax}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\version}
% �berpr�fung, ob das Dokument mit der geforderten Version �bersetzt wird:
%    \begin{macrocode}
\newcommand*\version[1]{%
  \begingroup
  \GetFileInfo{bgteubner.cls}%
  \ifx\hhcls@tmp\fileversion
    \typeout{^^JVersion of the class `bgteubner.cls'
      (\fileversion) is identical^^J%
      with the wanted version.^^J}%
  \else
    \typeout{^^JVersion of the class `bgteubner.cls'
      (\fileversion) differs from wanted version (#1).^^J}%
    \addglobalwarning{\ClassWarningNoLine{bgteubner}{The version, wanted in
        the document (#1),\MessageBreak
        differs from the used version of the
        `bgteubner.cls'\MessageBreak
        class (\fileversion)}}% 
  \fi
  \endgroup
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\frontmatter}
% \changes{1.01}{2003/09/16}{R�mische Seitenzahlen f�r European
%   Computer Modern in Kapit�lchen statt Versalien}%
% Buch f�ngt mit Seite~5 an:
%    \begin{macrocode}
\newcommand\hhcls@frontmatter{}
\let\hhcls@frontmatter=\frontmatter
\renewcommand\frontmatter[1][5]{%
  \hhcls@frontmatter
  \ifhhcls@times
    \pagenumbering{Roman}%
  \else
    \renewcommand\thepage{\textsc{\roman{page}}}%
  \fi
  \setcounter{page}{5}%
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\backmatter}
% \cs{backmatter} ignorieren.
%    \begin{macrocode}
\renewcommand*\backmatter{\ClassWarning{bgteubner}{The 
    \string\backmatter\space command is ignored}}
%    \end{macrocode}
% \end{macro}
% Dinge, die im Entwurfsmodus getan werden:
%    \begin{macrocode}
\ifhhcls@entwurf
%    \end{macrocode}
% Warnung am Ende, dass man nicht vergisst, den Entwurfsmodus
% auszuschalten:
%    \begin{macrocode}
  \addglobalwarning{%
    \ClassWarningNoLine{bgteubner}{Leave out the class option
      <draft>\MessageBreak
      for the final version}%
  }
%    \end{macrocode}
% \begin{macro}{\now}
% Zeit berechnen (aus time.sty):
%    \begin{macrocode}
  \newcommand*\now{{%
      \def\Time{3}%
      \def\Hour{4}%
      \def\Minute{5}%
      \count\Time=\time\relax
      \count\Hour=\count\Time\relax
      \divide\count\Hour by 60\relax%%hours past midnight
      \count\Minute=\count\Hour\relax
      \multiply\count\Minute by -60\relax
      \advance\count\Minute by \count\Time\relax %%minutes past hour
      \the\count\Hour\relax:%
      \ifnum\count\Minute<10
        0%
      \fi
      \the\count\Minute\relax
  }}
%    \end{macrocode}
% \end{macro}
% Fu�zeilen anpassen:
%    \begin{macrocode}
  \ifoot[{\rmfamily \"Ubersetzt: \today, \now}]{%
    {\rmfamily \"Ubersetzt: \today, \now}}
%    \end{macrocode}
% Warnung bei �bervollen Zeilen anschalten:
%    \begin{macrocode}
  \overfullrule5mm
\fi
%    \end{macrocode}
%
% \begin{macro}{\noindentnextpar}
% Dieser Befehl l�scht im n�chsten Absatz den Absatzeinzug:
%    \begin{macrocode}
\newcommand*\noindentnextpar{%
  \global\everypar{%
%    \end{macrocode}
% Einzug auf Null setzen:
%    \begin{macrocode}
    \setbox0\lastbox
%    \end{macrocode}
% F�r die folgenden Abs�tze diese Einstellung wieder l�schen:
%    \begin{macrocode}
    \global\everypar{}%
  }%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\bigskip}
% Befehl |\bigskip| f�r Abschnittswechsel so �ndern, dass danach kein
% Einzug gesetzt wird. Au�erdem den Abstand anpassen:
%    \begin{macrocode}
\newcommand\hhcls@bigskip{}
\let\hhcls@bigskip=\bigskip
\renewcommand\bigskip{\par\hhcls@bigskip\noindentnextpar}
\setlength{\bigskipamount}{18.0pt plus 6.0pt minus 6.0pt}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\medskip}
% Befehl |\medskip| f�r Abschnittswechsel so �ndern, dass danach kein
% Einzug gesetzt wird. Au�erdem den Abstand anpassen:
%    \begin{macrocode}
\newcommand*\hhcls@medskip{}
\let\hhcls@medskip\medskip
\renewcommand{\medskip}{\par\hhcls@medskip\noindentnextpar}
\setlength{\medskipamount}{9.0pt plus 3.0pt minus 3.0pt}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\smallskip}
% Befehl |\smallskip| f�r Abschnittswechsel so �ndern, dass danach kein
% Einzug gesetzt wird. Au�erdem den Abstand anpassen:
%    \begin{macrocode}
\newcommand*\hhcls@smallskip{}
\let\hhcls@smallskip\smallskip
\renewcommand{\smallskip}{\par\hhcls@smallskip\noindentnextpar}
\setlength{\smallskipamount}{4.5pt plus 1.5pt minus 1.5pt}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\gliederungsfehler}
% Fehlerausgaben in den Umgebungen, wenn Gliederungsbefehle verboten sind:
%    \begin{macrocode}
\newcommand*\gliederungsfehler[1]{%
  \renewcommand{\part}{\ClassError{bgteubner}{\string\part\space
      used inside #1 environment}{%
      Inside the #1 environment,^^J\string\part,
      \string\addpart, \string\chapter, \string\addchap,
      \string\section\space, and \string\subsection\space
      ^^Jmay not be used.
      ^^J\string\subsubsection\space and \string\paragraph\space
      are allowed.}}%
  \renewcommand{\addpart}{\ClassError{bgteubner}{\string\addpart\space
      used inside #1 environment}{%
      Inside the #1 environment,^^J\string\part,
      \string\addpart, \string\chapter, \string\addchap,
      \string\section\space, and \string\subsection\space
      ^^Jmay not be used.
      ^^J\string\subsubsection\space and \string\paragraph\space
      are allowed.}}%
  \renewcommand{\chapter}{\ClassError{bgteubner}{\string\chapter\space
      used inside #1 environment}{%
      Inside the #1 environment,^^J\string\part,
      \string\addpart, \string\chapter, \string\addchap,
      \string\section\space, and \string\subsection\space
      ^^Jmay not be used.
      ^^J\string\subsubsection\space and \string\paragraph\space
      are allowed.}}%
  \renewcommand{\addchap}{\ClassError{bgteubner}{\string\addchap\space
      used inside #1 environment}{%
      Inside the #1 environment,^^J\string\part,
      \string\addpart, \string\chapter, \string\addchap,
      \string\section\space, and \string\subsection\space
      ^^Jmay not be used.
      ^^J\string\subsubsection\space and \string\paragraph\space
      are allowed.}}%
  \renewcommand{\section}{\ClassError{bgteubner}{\string\section\space
      used inside #1 environment}{%
      Inside the #1 environment,^^J\string\part,
      \string\addpart, \string\chapter, \string\addchap,
      \string\section\space, and \string\subsection\space
      ^^Jmay not be used.
      ^^J\string\subsubsection\space and \string\paragraph\space
      are allowed.}}%
  \renewcommand{\subsection}{\ClassError{bgteubner}{\string\subsection\space
      used inside #1 environment}{%
      Inside the #1 environment,^^J\string\part,
      \string\addpart, \string\chapter, \string\addchap,
      \string\section\space, and \string\subsection\space
      ^^Jmay not be used.
      ^^J\string\subsubsection\space and \string\paragraph\space
      are allowed.}}%
}
%    \end{macrocode}
% \end{macro}
% \begin{environment}{hhcls@quotation}
% Eine eigene quotation-Umgebung f�r interne Belange:
%    \begin{macrocode}
\newlength{\hhcls@leftmargin}%
\newlength{\hhcls@rightmargin}%
\newenvironment{hhcls@quotation}[3][\@empty]{%
  \edef\hhcls@tmpa{#1}%
  \ifx\hhcls@tmpa\@empty
    \setlength{\hhcls@rightmargin}{#2}%
  \else
    \setlength{\hhcls@rightmargin}{#1}%
  \fi
  \setlength{\hhcls@leftmargin}{#2}%
  \begin{list}{}{%
      \listparindent\parindent%
      \itemindent0em%
      \leftmargin\hhcls@leftmargin%
      \rightmargin\hhcls@rightmargin
      \parsep\z@ \@plus\p@}%
    \begin{spacing}{#3}%
    \item\relax
  }{%
%    \end{macrocode}
% \changes{1.10}{2003/10/30}{Abst�nde am Ende der Umgebung korrigiert}%
%    \begin{macrocode}
    \end{spacing}%
    \removelastskip
    \end{list}%
  }%
%    \end{macrocode}
% \end{environment}
% \begin{environment}{quotation}
% \changes{1.10}{2003/10/30}{\texttt{quotation}"=Umgebung angepasst}%
% \changes{1.20}{2004/03/07}{\texttt{quotation} environment with
%   correct margins}%
% |quotation|"=Umgebung ohne Einr�ckung im ersten Absatz, gr��erer
% Absatzeinzug.
%    \begin{macrocode}
\renewenvironment{quotation}{%
  \list{}{%
    \listparindent \parindent
    \itemindent    \z@
    \leftmargin    \hhcls@leftmargin
    \rightmargin   \hhcls@rightmargin
    \parsep        \z@ \@plus\p@}%
  \item\relax
}{%
  \endlist
}
%    \end{macrocode}
% \end{environment}
% \begin{environment}{quote}
% \changes{1.20}{2004/03/07}{\texttt{quote} environment with
%   correct margins}%
% |quote| environment with correct margins in |important| environment.
%    \begin{macrocode}
\renewenvironment{quote}{%
  \list{}{%
    \leftmargin    \hhcls@leftmargin
    \rightmargin   \hhcls@rightmargin
  }%
  \item\relax
}{%
  \endlist
}
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\setmargin}
% Befehl zum Setzen von Einr�cken bei den vielen Umgebungen:
%    \begin{macrocode}
\newcommand*\setmargin[1]{%
  \edef\@setmarginname{#1}%
  \@setmargin}
\newcommand*\@setmargin[2][\@empty]{%
  \edef\hhcls@tmp{#1}%
  \ifx\hhcls@tmp\@empty
    \setlength{%
      \expandafter\csname\@setmarginname @lmargin\endcsname}{#2}%
  \else
    \setlength{%
      \expandafter\csname\@setmarginname @lmargin\endcsname}{#1}%
  \fi
  \setlength{%
    \expandafter\csname\@setmarginname @rmargin\endcsname}{#2}%
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\leftmargin}
% Einr�ckung aller einger�ckten Umgebungen.
% \changes{1.10}{2003/10/30}{Einr�ckung aller Umgebungen angepasst}%
% \changes{1.09}{2003/10/28}{Einr�ckung aller Umgebungen erneut
%   angepasst}%
%    \begin{macrocode}
\setlength{\leftmargini}{1.75\parindent}
\setlength{\leftmargin}{\leftmargini}
\setlength{\hhcls@leftmargin}{\leftmargini}
\setlength{\labelwidth}{\leftmargini}
%    \end{macrocode}
% \end{macro}
%
% \section{Advanced"=Umgebung}
%
% Einz�ge, standardm��ig links und rechts auf |\leftmargin|:
%    \begin{macrocode}
\newlength{\advanced@lmargin}
\newlength{\advanced@rmargin}
\setmargin{advanced}{\leftmargini}
%    \end{macrocode}
% \begin{macro}{\advancedfont}
% Schriftart innerhalb der advanced"=Umgebung:
%    \begin{macrocode}
\newcommand\advancedfont{\footnotesize}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\advancedspacing}
% Zeilenabstand innerhalb advanced"=Umgebung:
%    \begin{macrocode}
\ifhhcls@times
  \newcommand\advancedspacing{1.18}
\else
  \newcommand\advancedspacing{1.12}
\fi
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\advancednamefont}
% \begin{macro}{\noadvancedname}
% \begin{macro}{\advancedname}
% Name der Umgebung, falls nicht definiert, wird nichts angezeigt:
%    \begin{macrocode}
\newcommand*\advancednamefont{\bfseries%
  \iftensor@bold\else\mathversion{bold}\fi}
\newcommand*\noadvancedname{\gdef\advancedname{}}
\noadvancedname
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \begin{environment}{advanced}
% Definition der Advanced"=Umgebung:
%    \begin{macrocode}
\newenvironment{advanced}{%
%    \end{macrocode}
% Kapitel"= und Abschnitts�berschriften bis |\subsection| verbieten:
%    \begin{macrocode}
  \gliederungsfehler{advanced}%
%    \end{macrocode}
% Schriftarten f�r kleine Abschnitts�berschriften festlegen:
%    \begin{macrocode}
  \let\size@subsubsection\advancedfont
  \let\size@paragraph\advancedfont
  \let\size@subparagraph\advancedfont
%    \end{macrocode}
% Die eigentliche Umgebung starten:
%    \begin{macrocode}
%  \bigskip
  \begin{hhcls@quotation}[\advanced@rmargin]{\advanced@lmargin}{%
      \advancedspacing}%
%    \end{macrocode}
% Schriftart in der Advanced"=Umgebung
%    \begin{macrocode}
  \advancedfont
%    \end{macrocode}
% Falls vorhanden, die Inline"=�berschrift anzeigen:
%    \begin{macrocode}
      \ifx\advancedname\empty
      \else
        {\advancednamefont\advancedname}~%
      \fi
%    \end{macrocode}
% Leerzeichen am Anfang ignorieren:
%    \begin{macrocode}
    \ignorespaces
  }{%
%    \end{macrocode}
% Ende der Umgebung:
%    \begin{macrocode}
  \end{hhcls@quotation}%
%  \bigskip
%    \end{macrocode}
% Leerzeichen ignorieren:
%    \begin{macrocode}
  \ignorespacesafterend
%    \end{macrocode}
% N�chsten Absatz nicht einr�cken. Damit das funktioniert, muss die
% |hhcls@quotation|"=Umgebung zwingend mit
% \cs{begin\{hhcls@quotation\}}\ldots\cs{end\{hhcls@quotation\}}
% aufgerufen werden, da sonst die �nderung lokal bleibt.
%    \begin{macrocode}
  \noindentnextpar\par
}
%    \end{macrocode}
% \end{environment}
%
% \section{Beliebige theoremartige Umgebungen}
%
% \changes{1.10}{2003/10/30}{Schriftgr��e in theoremartigen Umgebungen
%   einstellbar}%
% Sollen Theoreme kleine oder normale Schrift haben?
%    \begin{macrocode}
\ifhhcls@theoremsmall
%    \end{macrocode}
% \begin{macro}{\theoremfont}
% Schriftgr��e in Theoremen, einheitlich:
%    \begin{macrocode}
  \def\theoremfont{\small}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\theoremspacing}
% Zeilenabstand innerhalb der Theoreme, einheitlich:
%    \begin{macrocode}
  \ifhhcls@times
    \newcommand\theoremspacing{1.12}
  \else
     \newcommand\theoremspacing{1.06}
  \fi
\else
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\theoremfont}
% Schriftgr��e in Theoremen, einheitlich:
%    \begin{macrocode}
  \def\theoremfont{\normalsize}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\theoremspacing}
% Zeilenabstand innerhalb der Theoreme, einheitlich:
%    \begin{macrocode}
  \newcommand\theoremspacing{1.0}
\fi
%    \end{macrocode}
% \end{macro}
% Einzug der Theoreme links und rechts, einheitlich:
% \changes{1.13}{2003/12/16}{Use variable margins for theorem-like
%   environments}%
%    \begin{macrocode}
\newlength{\theorem@lmargin}
\newlength{\theorem@rmargin}
%    \end{macrocode}
% \changes{1.10}{2003/10/30}{Einr�ckung der Theorem�berschriften
%   automatisch erh�hen, fall n�tig}%
% Einr�ckung der Theorems�berschrift.
% Die unterschiedlichen Ma�e sind n�tig, um die Einr�ckung automatisch
% erh�hen zu k�nnen, falls eine �berschrift zu lang ist.
% \cs{theorem@indent@min} ist das Minimalma� und der Default,
% \cs{theorem@indent} ist die aktuell verwendete L�nge, und
% \cs{theorem@indent@max} ist die maximal auftretende Breite.
%    \begin{macrocode}
\newlength{\theorem@indent@min}
\setlength{\theorem@indent@min}{7.8398em}
\newlength{\theorem@indent}
\setlength{\theorem@indent}{\theorem@indent@min}
\newlength{\theorem@indent@max}
%    \end{macrocode}
% Nach dem �bersetzungslauf wird kontrolliert, ob eine
% Theorems�berschrift zu lang war, so dass beim n�chsten Lauf die
% korrekte L�nge verwendet werden kann.
%    \begin{macrocode}
\AtEndDocument{%
%    \end{macrocode}
% Die maximal auftretende Breite ist gr��er als das definierte
% Minimum.
%    \begin{macrocode}
  \ifdim\theorem@indent@max>\theorem@indent@min
%    \end{macrocode}
% Im n�chsten Lauf muss dann die aktuell gr��te Breite verwendet
% werden.
%    \begin{macrocode}
    \immediate\write\@auxout{%
      \string\global\string\theorem@indent=\the\theorem@indent@max}%
%    \end{macrocode}
% Die gr��te Breite ist gr��er als der aktuell verwendete Wert.
% Die Breite hat sich also erh�ht $\longrightarrow$ Warnung.
%    \begin{macrocode}
    \ifdim\theorem@indent@max>\theorem@indent
      \addglobalwarning{%
        \ClassWarningNoLine{bgteubner}{Indentation for theorem
          titles has been increased.\MessageBreak
          Rerun to adjust the indentation}%
      }%
    \else
%    \end{macrocode}
% Die gr��te Breite ist kleiner als der aktuell verwendete Wert.
% Die Breite hat sich also verringert $\longrightarrow$ Warnung.
%    \begin{macrocode}
      \ifdim\theorem@indent@max<\theorem@indent
        \addglobalwarning{%
          \ClassWarningNoLine{bgteubner}{Indentation for theorem
            titles has been decreased.\MessageBreak
            Rerun to adjust the indentation}%
        }%
      \fi
    \fi
  \else
%    \end{macrocode}
% Die gr��te Breite ist kleiner als das Minimum.
% Zus�tzlich ist der aktuell verwendete Wert aber noch gr��er.
% Die Breite hat sich also verringert $\longrightarrow$ Warnung.
%    \begin{macrocode}
    \ifdim\theorem@indent>\theorem@indent@min
      \addglobalwarning{%
        \ClassWarningNoLine{bgteubner}{Indentation for theorem
          titles has been decreased.\MessageBreak
          Rerun to adjust the indentation}%
      }%
    \fi
  \fi
}
%    \end{macrocode}
% \begin{macro}{\float@addtolists}
% \begin{macro}{\hhcls@theoremlist}
% Dieser Befehl wird vom \cs{chapter}"=Befehl aufgerufen, wenn
% ein neues Kapitel begonnen wird. 
% Dadurch soll in allen Verzeichnissen der Theoremumgebungen ein
% Zwischenraum eingef�gt werden.
% Der Umweg mit \cs{hhcls@theoremskip} wird gew�hlt, weil
% \cs{float@addtolists} ein Argument besitzt, die Definition der Liste
% \cs{hhcls@theoremlist} nur ohne Argumente funktioniert.
%    \begin{macrocode}
\newcommand\float@addtolists[1]{%
  \def\hhcls@theoremskip{#1}%
  \hhcls@theoremlist}
\newcommand\hhcls@theoremlist{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\hhcls@theoremzahl}
% Funktion, die am Ende die Anzahl des Auftretens der einzelnen
% Theorem"=Umgebungen in die PDF"=Datei schreibt:
%    \begin{macrocode}
\newcommand\hhcls@theoremanzahl{}
\newsavebox{\hhcls@@@theoremtitlewidth}
%    \end{macrocode}
% \end{macro}
% Boolean, ob Theoremumgebung mit Sternvariante aufgerufen wird.
%    \begin{macrocode}
\newif\iftheorem@starvariant
%    \end{macrocode}
% \begin{macro}{\newtheorem}
% Befehl zum Einrichten beliebiger Theoreme, z.\,B.\ von Beispielen,
% S�tzen usw. Erster Parameter: Name der Umgebung; zweiter Parameter:
% Gedruckter Pr�fix zur Nummer.
%    \begin{macrocode}
\def\newtheorem#1#2{%
% Name des Theorems in der �berschrift:
%    \begin{macrocode}
  \expandafter\def\csname theorem@#1name\endcsname{#2}%
%    \end{macrocode}
% \changes{1.13}{2003/12/16}{Make delimiter for theorems configurable}%
% Postfix (colon) after theorem name and number:
%    \begin{macrocode}
  \expandafter\def\csname theorem@#1postfix\endcsname{:}%
%    \end{macrocode}
% Set margins.
%    \begin{macrocode}
  \expandafter\newlength\expandafter{\csname theorem@#1@lmargin\endcsname}%
  \expandafter\newlength\expandafter{\csname theorem@#1@rmargin\endcsname}%
  \setmargin{theorem@#1}{\leftmargini}%
%    \end{macrocode}
% Z�hler dieser Theoremart:
%    \begin{macrocode}
  \newcounter{theorem@#1}[chapter]%
%    \end{macrocode}
% Z�hlen der Anzahl des Auftretens:
%    \begin{macrocode}
  \newcounter{theorem@#1zahl}%
%    \end{macrocode}
% Z�hlen der Anzahl des Auftretens:
%    \begin{macrocode}
  \g@addto@macro\hhcls@theoremanzahl{%
    ; #2: \csname thetheorem@#1zahl\endcsname}%
%    \end{macrocode}
% Labelformat: "`Kapitel.Theorem"':
%    \begin{macrocode}
  \expandafter\def\csname thetheorem@#1\endcsname{%
    \thechapter.\@arabic\csname c@theorem@#1\endcsname}%
%    \end{macrocode}
% Befehl f�r die Theorem�berschrift:
%    \begin{macrocode}
  \expandafter\def\csname theorem@#1title\endcsname##1{%
%    \end{macrocode}
% Z�hler anpassen.
%    \begin{macrocode}
    \iftheorem@starvariant
    \else
      \refstepcounter{theorem@#1}%
    \fi
%    \end{macrocode}
% �berschrift erzeugen.
%    \begin{macrocode}
    {%
      \raggedsection\normalfont\normalsize\sectfont\nobreak
%    \end{macrocode}
% \changes{1.13}{2003/12/16}{Make delimiter for theorems configurable}%
% Den Anfang der �berschrift in eine Box speichern.
%    \begin{macrocode}
      \savebox{\hhcls@@@theoremtitlewidth}{%
        \csname theorem@#1name\endcsname%
        \iftheorem@starvariant
        \else
        ~\csname thetheorem@#1\endcsname
        \fi
        \csname theorem@#1postfix\endcsname~}%
%    \end{macrocode}
% Pr�fen, ob die aktuelle �berschrift breiter als alle vorherigen ist.
%    \begin{macrocode}
      \settowidth{\@tempdima}{\usebox{\hhcls@@@theoremtitlewidth}}%
      \ifdim\@tempdima>\theorem@indent@max
        \global\theorem@indent@max=\@tempdima
      \fi
%    \end{macrocode}
% �berschrift ausgeben.
% \changes{1.20}{2004/03/07}{Avoid page break after title in
%   theorem-like enverionment}%
% \changes{1.30}{2004/04/10}{Improve spacing after title of
%   theorem-like environment}%
%    \begin{macrocode}
      \normalfont\normalsize\sectfont
      \makebox[\theorem@indent][l]{\usebox{\hhcls@@@theoremtitlewidth}}%
      \setlength\@tempdima{1pt}%
      \settoheight\@tempdimb{D}%
      \addtolength\@tempdima{\@tempdimb}%
      \settoheight\@tempdimb{\theoremfont D}%
      \addtolength\@tempdima{-\@tempdimb}%
      ##1\nobreak\par\nobreak\vspace{\@tempdima}\nobreak}\nobreak
    \@afterheading}%
%    \end{macrocode}
% Dieser Befehl wird von \cs{chapter} aufgerufen, um in der
% Liste der Theoreme einen Platz einzuf�gen.
%    \begin{macrocode}
  \g@addto@macro\hhcls@theoremlist{%
    \addtocontents{#1}{\hhcls@theoremskip}%
  }%
%    \end{macrocode}
% Den Startbefehl der Sternvariante (unnummeriert) definieren:
%    \begin{macrocode}
  \expandafter\def\csname #1*\endcsname{%
%    \end{macrocode}
% Schalter anschalten.
%    \begin{macrocode}
    \theorem@starvarianttrue
%    \end{macrocode}
% Jetzt die Theorem"=Umgebung aufrufen:
%    \begin{macrocode}
    \csname #1\endcsname
  }%
%    \end{macrocode}
% Ende der Sternvariante:
%    \begin{macrocode}
  \expandafter\def\csname end#1*\endcsname{\csname end#1\endcsname}%
%    \end{macrocode}
% Den Startbefehl der eigentlichen Umgebung definieren:
%    \begin{macrocode}
  \expandafter\def\csname #1\endcsname{%
    \@ifnextchar[{%
      \csname hhcls@@#1\endcsname
    }{%
      \csname hhcls@@#1\endcsname[\empty]%
    }}%
%    \end{macrocode}
% Initialisierung durchf�hren:
%    \begin{macrocode}
  \expandafter\def\csname hhcls@@#1\endcsname[##1]{%
%    \end{macrocode}
% \changes{1.13}{2003/12/16}{Use variable margins for theorem-like
%   environments}%
% Set margins.
%    \begin{macrocode}
  \setlength{\theorem@lmargin}{\csname theorem@#1@lmargin\endcsname}%
  \setlength{\theorem@rmargin}{\csname theorem@#1@rmargin\endcsname}%
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Reintroduce lost adaption of margins for
%   theorem-like environments inside important environment}%
% Set margins.
%    \begin{macrocode}
  \ifhhcls@inimportant
    \addtolengthminzero{\theorem@lmargin}{-\fboxsep}%
    \addtolengthminzero{\theorem@rmargin}{-\fboxsep}%
    \addtolengthminzero{\theorem@indent}{-\fboxsep}%
  \fi
%    \end{macrocode}
% Zur Sicherheit einen Absatz (z.\,B.\ damit im vorherigen Absatz die
% Zeilenabst�nde korrekt bleiben).
%    \begin{macrocode}
    \par
%    \end{macrocode}
% Die eigentliche Umgebung starten:
%    \begin{macrocode}
    \begin{list}{}{%
%    \end{macrocode}
% \changes{1.10}{2003/10/30}{Linker Abstand eingestellt}%
% Abst�nde einstellen.
%    \begin{macrocode}
        \topsep 8\p@ \@plus2\p@ \@minus4\p@
        \itemindent-\theorem@lmargin
        \listparindent\parindent
        \leftmargin\theorem@lmargin
        \rightmargin\theorem@rmargin
        \parsep\z@ \@plus\p@
%    \end{macrocode}
% Anzahl z�hlen:
%    \begin{macrocode}
        \stepcounter{theorem@#1zahl}%
%    \end{macrocode}
% Gliederungsbefehle ausschalten
%    \begin{macrocode}
        \gliederungsfehler{#1}%
%    \end{macrocode}
% Schriftart einstellen:
%    \begin{macrocode}
        \let\size@subsubsection\theoremfont
        \let\size@paragraph\theoremfont
        \let\size@subparagraph\theoremfont
%    \end{macrocode}
% Schriftart:
%    \begin{macrocode}
        \theoremfont
      }%
%    \end{macrocode}
% Zeilenabstand anpassen.
%    \begin{macrocode}
      \begin{spacing}{\theoremspacing}%
%    \end{macrocode}
% Eine List"=Umgebung f�ngt immer mit \cs{item} an.
%    \begin{macrocode}
    \item\relax
%    \end{macrocode}
% �berschrift.
%    \begin{macrocode}
        \csname theorem@#1title\endcsname{##1}\nobreak%
%    \end{macrocode}
% Eintrag in das Verzeichnis der S�tze schreiben (aber nur, wenn
% das Theorem benannt ist):
%    \begin{macrocode}
    \edef\hhtmp{##1}%
    \ifx\hhtmp\empty
    \else
      \iftheorem@starvariant
        \addcontentsline{#1}{#1}{##1}%
      \else
        \addcontentsline{#1}{#1}{%
          \protect\numberline {\csname thetheorem@#1\endcsname}##1}%
      \fi
    \fi
%    \end{macrocode}
% Leerzeichen am Anfang ignorieren:
%    \begin{macrocode}
    \nobreak\ignorespaces
  }%
%    \end{macrocode}
% Ende der Umgebung:
%    \begin{macrocode}
  \expandafter\def\csname end#1\endcsname{%
%    \end{macrocode}
% Ende der Umgebung:
% \changes{1.10}{2003/10/30}{Abst�nde am Ende der Umgebung korrigiert}%
%    \begin{macrocode}
    \end{spacing}%
    \removelastskip
    \end{list}%
%    \end{macrocode}
% Leerzeichen ignorieren:
%    \begin{macrocode}
    \ignorespacesafterend
%    \end{macrocode}
% N�chsten Absatz nicht einr�cken:
%    \begin{macrocode}
    \noindentnextpar
    \par
  }%
%    \end{macrocode}
% Erzeugen einer Liste der Satze:
%    \begin{macrocode}
  \expandafter\def\csname l@#1\endcsname{\@dottedtocline{1}{0em}{2.9em}}%
%    \end{macrocode}
%    \begin{macrocode}
  \addglobalwarning{%
    \typeout{#2: \csname thetheorem@#1zahl\endcsname\space times used}%
  }
%    \end{macrocode}
%    \begin{macrocode}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\listoftheorems}
%    \begin{macrocode}
\@ifundefined{BeforeStartingTOC}{%
  \ClassWarningNoLine{bgteubner}{Koma-Script macro
    \string\BeforeStartingTOC\space not defined.\MessageBreak
    Using workaround for \string\listoftheorems.\MessageBreak
    You should consider updating Koma-Script}%
  \newcommand*\listoftheorems[2]{%
    \begingroup%
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse
      \fi
      \float@listhead{#2}%
      \small
      \setlength{\parskip}{\z@}%
      \@starttoc{#1}%
      \if@restonecol\twocolumn\fi
    \endgroup
  }
}{%
  \newcommand*\listoftheorems[2]{%
    \expandafter\def\csname listof#1name\endcsname{#2}%
    \BeforeStartingTOC[#1]{\small}%
    \listoftoc{#1}%
  }
}
%    \end{macrocode}
% \end{macro}
% \begin{environment}{theoremdelimiter}
% \changes{1.13}{2003/12/16}{Make delimiter for theorems configurable}%
% This environment takes two arguments, the first is the name of the
% theorem-like environment that shall get another delimiter after the
% number.
% The second argument is the new delimiter that is valid inside the
% environment.
%    \begin{macrocode}
\newenvironment{theoremdelimiter}[2]{%
  \expandafter\def\csname theorem@#1postfix\endcsname{#2}%
  \ignorespaces
}{%
  \ignorespacesafterend
}%
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\settheoremmargin}
% \changes{1.13}{2003/12/16}{Use variable margins for theorem-like
%   environments}%
% Befehl zum Setzen von Einr�cken theoremartiger Umgebungen:
%    \begin{macrocode}
\newcommand*\settheoremmargin[1]{%
  \edef\@setmarginname{#1}%
  \@settheoremmargin}
\newcommand*\@settheoremmargin[2][\@empty]{%
  \edef\hhcls@tmp{#1}%
  \ifx\hhcls@tmp\@empty
    \setlength{%
      \expandafter\csname theorem@\@setmarginname @lmargin\endcsname}{#2}%
  \else
    \setlength{%
      \expandafter\csname theorem@\@setmarginname @lmargin\endcsname}{#1}%
  \fi
  \setlength{%
    \expandafter\csname theorem@\@setmarginname @rmargin\endcsname}{#2}%
}
%    \end{macrocode}
% \end{macro}
%
%
% \subsection{Beispiele}
%
% \begin{environment}{example}
% Beispiel"=Umgebung einrichten:
%    \begin{macrocode}
\newtheorem{example}{\examplename}
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\listofexamples}
% Verzeichnis der Beispiele:
%    \begin{macrocode}
\newcommand*\listofexamples{\listoftheorems{example}{\listexamplename}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\examplename}
% \begin{macro}{\listexamplename}
% �berschriften f�r Beispiele und deren Verzeichnisse:
%    \begin{macrocode}
\newcommand*\examplename{}
\newcommand*\listexamplename{}
\addto\captionsgerman{%
  \renewcommand*\examplename{Beispiel}%
  \renewcommand*\listexamplename{Verzeichnis der Beispiele}%
}
\addto\captionsngerman{%
  \renewcommand*\examplename{Beispiel}%
  \renewcommand*\listexamplename{Verzeichnis der Beispiele}%
}
\addto\captionsaustrian{%
  \renewcommand*\examplename{Beispiel}%
  \renewcommand*\listexamplename{Verzeichnis der Beispiele}%
}
\addto\captionsnaustrian{%
  \renewcommand*\examplename{Beispiel}%
  \renewcommand*\listexamplename{Verzeichnis der Beispiele}%
}
\addto\captionsenglish{%
  \renewcommand*\examplename{Example}%
  \renewcommand*\listexamplename{List of Examples}%
}
\addto\captionsamerican{%
  \renewcommand*\examplename{Example}%
  \renewcommand*\listexamplename{List of Examples}%
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Definitionen}
%
% \begin{environment}{definition}
% Definition"=Umgebung einrichten:
%    \begin{macrocode}
\newtheorem{definition}{\definitionname}
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\listofdefinitions}
% Verzeichnis der Definitionen:
%    \begin{macrocode}
\newcommand*\listofdefinitions{%
  \listoftheorems{definition}{\listdefinitionname}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\definitionname}
% \begin{macro}{\listdefinitionname}
% �berschriften f�r Definitionen und deren Verzeichnisse:
%    \begin{macrocode}
\newcommand*\definitionname{}
\newcommand*\listdefinitionname{}
\addto\captionsgerman{%
  \renewcommand*\definitionname{Definition}%
  \renewcommand*\listdefinitionname{Verzeichnis der Definitionen}%
}
\addto\captionsngerman{%
  \renewcommand*\definitionname{Definition}%
  \renewcommand*\listdefinitionname{Verzeichnis der Definitionen}%
}
\addto\captionsaustrian{%
  \renewcommand*\definitionname{Definition}%
  \renewcommand*\listdefinitionname{Verzeichnis der Definitionen}%
}
\addto\captionsnaustrian{%
  \renewcommand*\definitionname{Definition}%
  \renewcommand*\listdefinitionname{Verzeichnis der Definitionen}%
}
\addto\captionsenglish{%
  \renewcommand*\definitionname{Definition}%
  \renewcommand*\listdefinitionname{List of Definitions}%
}
\addto\captionsamerican{%
  \renewcommand*\definitionname{Definition}%
  \renewcommand*\listdefinitionname{List of Definitions}%
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Beweise}
%
% \begin{environment}{proof}
% Beweis"=Umgebung einrichten:
%    \begin{macrocode}
\newtheorem{proof}{\proofname}
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\listofproofs}
% Verzeichnis der Beweise:
%    \begin{macrocode}
\newcommand*\listofproofs{\listoftheorems{proof}{\listproofname}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\proofname}
% \begin{macro}{\listproofname}
% �berschriften f�r Beweise und deren Verzeichnisse:
%    \begin{macrocode}
\newcommand*\proofname{}
\newcommand*\listproofname{}
\addto\captionsgerman{%
  \renewcommand*\proofname{Beweis}%
  \renewcommand*\listproofname{Verzeichnis der Beweise}%
}
\addto\captionsngerman{%
  \renewcommand*\proofname{Beweis}%
  \renewcommand*\listproofname{Verzeichnis der Beweise}%
}
\addto\captionsaustrian{%
  \renewcommand*\proofname{Beweis}%
  \renewcommand*\listproofname{Verzeichnis der Beweise}%
}
\addto\captionsnaustrian{%
  \renewcommand*\proofname{Beweis}%
  \renewcommand*\listproofname{Verzeichnis der Beweise}%
}
\addto\captionsenglish{%
  \renewcommand*\proofname{Proof}%
  \renewcommand*\listproofname{List of Proofs}%
}
\addto\captionsamerican{%
  \renewcommand*\proofname{Proof}%
  \renewcommand*\listproofname{List of Proofs}%
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \section{Grau schattierte Kiste f�r Formeln}
%
% \changes{1.13}{2003/12/16}{Avoid negative margins of theorems}%
% \begin{macro}{\addtolengthminzero}
% This command acts like \cs{addtolength} but don't set a length
% smaller than zero.
%    \begin{macrocode}
\newcommand*\addtolengthminzero[2]{%
  \addtolength{#1}{#2}%
  \ifdim#1<0pt
    \setlength{#1}{0pt}%
  \fi
}
%    \end{macrocode}
% \end{macro}
%
% Boolean zur Entscheidung, ob die |important|- oder die
% |important*|"=Umgebung verwendet wird.
%    \begin{macrocode}
\newif\ifhhcls@importantmath
\newif\ifhhcls@inimportant
%    \end{macrocode}
% Graue K�sten an?
%    \begin{macrocode}
\ifhhcls@greybox
%    \end{macrocode}
% Savebox, in die der Inhalt der |important|- und
% |important*|"=Umgebungen zwischengespeichert wird.
%    \begin{macrocode}
  \newsavebox{\hhcls@@@important}
%    \end{macrocode}
% L�nge, um den Absatzeinzug in die K�sten r�berretten zu k�nnen.
%    \begin{macrocode}
  \newlength{\hhcls@important@parindent}
%    \end{macrocode}
% Farbe des Hintergrunds.
%    \begin{macrocode}
  \definecolor{importantcolor}{gray}{0.9}
%    \end{macrocode}
% Fu�notenkram, um innerhalb der |important|- und der
% |important*|"=Umgebung Fu�noten verwenden zu k�nnen.
% Innerhalb der Umgebung wird beim Auftreten des
% \cs{footnote}"=Befehls der Inhalt in einen Befehl gespeichert und
% nach der Minipage ausgegeben.
% Lokal wird ein \cs{footnotemark} gesetzt.
%    \begin{macrocode}
  \newcounter{hhcls@savefootnote}
%    \end{macrocode}
% \begin{macro}{\addfnmark}
% Befehl, der den Fu�notentext in eine Liste im Befehl
% \cs{hhcls@fnlist} speichert, die am Ende der Umgebungen ausgegeben
% wird.
%    \begin{macrocode}
  \newcommand\addfnmark[2][\@empty]{%
    \begingroup
    \edef\hhcls@temp{#1}%
    \ifx\hhcls@temp\@empty
      \g@addto@macro\hhcls@fnlist{%
        \stepcounter{hhcls@savefootnote}%
        \footnotetext[\thehhcls@savefootnote]{#2}%
      }%
    \else
      \g@addto@macro\hhcls@fnlist{\footnotetext[#1]{#2}}%
    \fi
    \endgroup
    }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\hhcls@important@footnote}
% Fu�notenbefehl, der in den Umgebungen auf \cs{footnote} umkopiert
% werden wird.
%    \begin{macrocode}
  \newcommand\hhcls@important@footnote[2][\@empty]{%
    \begingroup
    \edef\hhcls@temp{#1}%
    \ifx\hhcls@temp\@empty
      \footnotemark
    \else
      \footnotemark[#1]%
    \fi
    \addfnmark[#1]{#2}%
    \endgroup
    }%
%    \end{macrocode}
% \end{macro}
% \begin{environment}{important}
% Graue Kiste, die mit Text anf�ngt:
%    \begin{macrocode}
  \newenvironment{important}{%
%    \end{macrocode}
% Set boolean that we are inside important now.
%    \begin{macrocode}
    \hhcls@inimportanttrue
%    \end{macrocode}
% L�ngen setzen.
% \changes{1.10}{2003/10/30}{Theoremeinz�ge in grauen K�sten
%   reduzieren}%
% \changes{1.13}{2003/12/16}{Avoid negative margins of theorems in
%   grey boxes}%
% \changes{1.13}{2003/12/16}{Reduce margins of advanced and
%   execercises in grey boxes}%
% \changes{1.20}{2004/03/07}{Add some margin adjustments to important
%   environment}%
%    \begin{macrocode}
    \setlength{\fboxsep}{0.5\parindent}%
    \addtolengthminzero{\mathindent}{-\fboxsep}%
    \addtolengthminzero{\theorem@lmargin}{-\fboxsep}%
    \addtolengthminzero{\theorem@rmargin}{-\fboxsep}%
    \addtolengthminzero{\advanced@lmargin}{-\fboxsep}%
    \addtolengthminzero{\advanced@rmargin}{-\fboxsep}%
    \addtolengthminzero{\subexercise@lmargin}{-\fboxsep}%
    \addtolengthminzero{\subexercise@rmargin}{-\fboxsep}%
    \addtolengthminzero{\hhcls@@subexerciseindent}{-\fboxsep}%
    \addtolengthminzero{\answer@lmargin}{-\fboxsep}%
    \addtolengthminzero{\answer@rmargin}{-\fboxsep}%
    \addtolengthminzero{\hhcls@@answerindent}{-\fboxsep}%
    \addtolengthminzero{\subanswer@lmargin}{-\fboxsep}%
    \addtolengthminzero{\subanswer@rmargin}{-\fboxsep}%
    \addtolengthminzero{\hhcls@@subanswerindent}{-\fboxsep}%
    \addtolengthminzero{\leftmargin}{-\fboxsep}%
    \addtolengthminzero{\hhcls@leftmargin}{-\fboxsep}%
    \setlength{\hhcls@important@parindent}{\parindent}%
%    \end{macrocode}
% Zun�chst einen Absatz und entsprechenden Abstand einf�gen.
% \changes{1.10}{2003/10/30}{Abst�nde am Anfang der Umgebung korrigiert}%
%    \begin{macrocode}
    \removelastskip
    \par
    \vskip\topsep
%    \end{macrocode}
% Fu�noten initialisieren.
%    \begin{macrocode}
    \gdef\hhcls@fnlist{}%
    \setcounter{hhcls@savefootnote}{\value{footnote}}%
    \let\mpfootnote=\footnote
    \let\footnote\hhcls@important@footnote%
%    \end{macrocode}
% |figure|- und |table|"=Umgebung sowie \cs{marginpar}"=Befehl
% abfangen, da sie nicht funktionieren.
%    \begin{macrocode}
    \let\hhcls@important@figure=\figure
    \renewcommand\figure{%
      \ClassError{bgteubner}{%
        figure environment used inside 
        important\ifhhcls@importantmath *\fi\space environment}{% 
        Inside the important\ifhhcls@importantmath *\fi\space
        environment, floats cannot be used.}%
      \hhcls@important@figure}%
    \let\hhcls@important@table=\table
    \renewcommand\table{%
      \ClassError{bgteubner}{%
        table environment used inside 
        important\ifhhcls@importantmath *\fi\space environment}{% 
        Inside the important\ifhhcls@importantmath *\fi\space
        environment, floats cannot be used.}%
      \hhcls@important@table}%
    \let\hhcls@important@marginpar=\marginpar
    \renewcommand\marginpar{%
      \ClassError{bgteubner}{%
        \string\marginpar\space used inside 
        important\ifhhcls@importantmath *\fi\space environment}{% 
        Inside the important\ifhhcls@importantmath *\fi\space
        environment, floats cannot be used.}%
      \hhcls@important@marginpar}%
%    \end{macrocode}
% Den Inhalt der Umgebung erstmal in die Box \cs{hhcls@@@important}
% zwischenspeichern.
%    \begin{macrocode}
    \begin{lrbox}{\hhcls@@@important}%
      \setlength\@tempdima{\linewidth}%
      \addtolength\@tempdima{-2\fboxsep}%
      \begin{minipage}{\@tempdima}%
%    \end{macrocode}
% Falls die Sternvariante gew�hlt wurde, den oberen Abstand verringern.
%    \begin{macrocode}
        \ifhhcls@importantmath
          \vspace{-\abovedisplayskip}%
        \fi
%    \end{macrocode}
% Absatzeinzug restaurieren, erster Absatz ohne Einzug.
% \changes{1.21}{2004/03/25}{Reduce skip when \texttt{important}
%   environment starts with a theorem-like environment}%
%    \begin{macrocode}
        \setlength{\parindent}{\hhcls@important@parindent}%
        \noindent
        \@setminipage
        \ignorespaces
      }{%
%    \end{macrocode}
% Ende der Umgebung.
%    \begin{macrocode}
        \par\unskip
      \end{minipage}%
    \end{lrbox}%
%    \end{macrocode}
% Jetzt wird der Inhalt der Umgebung in eine Kiste gesetzt.
% Die graue Kiste soll nicht einger�ckt werden.
%    \begin{macrocode}
    \noindent
%    \end{macrocode}
% Jetzt wird der Inhalt wirklich gesetzt.
% \changes{1.10}{2003/10/30}{Breite korrigiert, wenn nur eine
%   theoremartige Umgebung gesetzt wird}%
%    \begin{macrocode}
    \colorbox{importantcolor}{%
      \setlength\@tempdima{\linewidth}%
      \addtolength\@tempdima{-2\fboxsep}%
      \begin{minipage}{\@tempdima}%
        \usebox{\hhcls@@@important}%
      \end{minipage}%
    }%
%    \end{macrocode}
% Jetzt die Fu�noten setzen, falls welche aufgetreten sind.
%    \begin{macrocode}
    \hhcls@fnlist
%    \end{macrocode}
% Unterer Abstand und Absatzeinzug verhindern, falls kein weiterer
% Absatz im Quelltext folgt.
%    \begin{macrocode}
    \vskip\topsep
    \noindentnextpar
    \par
    \ignorespacesafterend
  }
%    \end{macrocode}
% \end{environment}
% \begin{environment}{important*}
% Sternvariante f�r K�sten, die mit einer abgesetzten Formel beginnen.
% Der normalen Variante wird �bergeben, dass sie oben Platz klauen
% soll, und dann aufgerufen.
%    \begin{macrocode}
  \newenvironment{important*}{%
    \hhcls@importantmathtrue
    \begin{important}%
    }{%
    \end{important}%
    \ignorespacesafterend}
%    \end{macrocode}
% \end{environment}
% \begin{environment}{longimportant}
% Variante f�r lange K�sten, die �ber Seiten umbrochen werden k�nnen.
% Sollte m�glichst wenig verwendet werden.
%    \begin{macrocode}
  \newenvironment{longimportant}{%
%    \end{macrocode}
% Set boolean that we are inside important now.
%    \begin{macrocode}
    \hhcls@inimportanttrue
%    \end{macrocode}
% \changes{1.10}{2003/10/30}{Theoremeinz�ge in grauen K�sten
%   reduzieren}%
% L�ngen setzen.
% \changes{1.13}{2003/12/16}{Avoid negative margins of theorems in
%   grey boxes}%
% \changes{1.13}{2003/12/16}{Reduce margins of advanced and
%   execercises in grey boxes}%
% \changes{1.20}{2004/03/07}{Add some margin adjustments to longimportant
%   environment}%
%    \begin{macrocode}
    \setlength{\fboxsep}{0.5\parindent}%
    \addtolengthminzero{\mathindent}{-\fboxsep}%
    \addtolengthminzero{\theorem@lmargin}{-\fboxsep}%
    \addtolengthminzero{\theorem@rmargin}{-\fboxsep}%
    \addtolengthminzero{\advanced@lmargin}{-\fboxsep}%
    \addtolengthminzero{\advanced@rmargin}{-\fboxsep}%
    \addtolengthminzero{\subexercise@lmargin}{-\fboxsep}%
    \addtolengthminzero{\subexercise@rmargin}{-\fboxsep}%
    \addtolengthminzero{\hhcls@@subexerciseindent}{-\fboxsep}%
    \addtolengthminzero{\answer@lmargin}{-\fboxsep}%
    \addtolengthminzero{\answer@rmargin}{-\fboxsep}%
    \addtolengthminzero{\hhcls@@answerindent}{-\fboxsep}%
    \addtolengthminzero{\subanswer@lmargin}{-\fboxsep}%
    \addtolengthminzero{\subanswer@rmargin}{-\fboxsep}%
    \addtolengthminzero{\hhcls@@subanswerindent}{-\fboxsep}%
    \addtolengthminzero{\leftmargin}{-\fboxsep}%
    \addtolengthminzero{\hhcls@leftmargin}{-\fboxsep}%
%    \end{macrocode}
% Befehl zum Erzeugen des Hintergrunds festlegen.
%    \begin{macrocode}
    \def\FrameCommand{\colorbox{importantcolor}}%
%    \end{macrocode}
% |figure|- und |table|"=Umgebung sowie die Befehle \cs{footnote} und
% \cs{marginpar} abfangen, da sie nicht funktionieren.
%    \begin{macrocode}
    \renewcommand\footnote[2][]{%
      \ClassError{bgteubner}{%
        \footnote\space used inside longimportant environment}{% 
        Inside the longimportant environment, footnotes cannot be
        used.\MessageBreak
        You may use the short version, the important or important*
        environment if you\MessageBreak
        really need a footnote. Be aware that these environments
        don't\MessageBreak 
        break across pages.}%
    }%
    \let\hhcls@important@figure=\figure
    \renewcommand\figure{%
      \ClassError{bgteubner}{%
        figure environment used inside longimportant environment}{% 
        Inside the longimportant environment, floats cannot be used.}%
      \hhcls@important@figure}%
    \let\hhcls@important@table=\table
    \renewcommand\table{%
      \ClassError{bgteubner}{%
        table environment used inside longimportant environment}{% 
        Inside the longimportant environment, floats cannot be used.}%
      \hhcls@important@table}%
    \let\hhcls@important@marginpar=\marginpar
    \renewcommand\marginpar{%
      \ClassError{bgteubner}{%
        \string\marginpar\space used inside longimportant environment}{% 
        Inside the longimportant environment, floats cannot be used.}%
      \hhcls@important@marginpar}%
%    \end{macrocode}
% Internen Befehl aufrufen.
% \changes{1.21}{2004/03/25}{Reduce skip when \texttt{longimportant}
%   environment starts with a theorem-like environment}%
%    \begin{macrocode}
    \MakeFramed {\advance\hsize-\width \FrameRestore
      \noindent\@setminipage}%
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Workaround for bug in \texttt{framed.sty}
%   which causes wrong width in some cases}%
% This \cs{vspace} is a work around for a bug in |framed.sty| which
% causes |longimportant| environments with only a theorem-like
% environment to be too narrow.
%    \begin{macrocode}
    \hhcls@important@workaround
    \ignorespaces
  }{%
    \par\unskip
    \endMakeFramed
    \noindentnextpar
    \par
    \ignorespacesafterend
  }
%    \end{macrocode}
% \end{environment}
% \begin{environment}{longimportant*}
% \changes{1.20}{2004/03/07}{New \texttt{longimportant*} environment}%
% Define a |longimportant*| environment in analogy to the |important*|
% environment.
% With an optional argument, the vertical adjustment can be changed.
%    \begin{macrocode}
  \newenvironment{longimportant*}[1][\abovedisplayskip]{%
    \begin{longimportant}\vspace{-#1}\ignorespaces
  }{%
    \end{longimportant}%
  }
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\hhcls@important@workaround}
% \changes{1.21}{2004/03/25}{Use \texttt{framed} workaround for
%   longimportant only for old versions of that package}%
% From 2004-03-07 on, the bug in the |framed| package has been fixed,
% that caused the box to be too narrow sometimes.
%    \begin{macrocode}
  \@ifpackagelater{framed}{2004/03/07}{%
    \newcommand*\hhcls@important@workaround{}
  }{%
    \newcommand*\hhcls@important@workaround{\vspace{0mm}}
    \ClassWarningNoLine{bgteubner}{Outdated version of framed.sty
      used. A workaround\MessageBreak
      for a bug has been installed. Future versions of\MessageBreak
      bgteubner.cls will need a version of framed.sty\MessageBreak
      that is dated 2004/03/07 or newer}
  }
%    \end{macrocode}
% \end{macro}
% Kisten aus?
%    \begin{macrocode}
\else
%    \end{macrocode}
% \begin{environment}{important}
% \begin{environment}{important*}
% \begin{environment}{longimportant}
% \begin{environment}{longimportant*}
% Dummy"=Befehle, falls graue K�sten ausgeschaltet sind.
%    \begin{macrocode}
  \newenvironment{important}{\par}{\par}
  \newenvironment{important*}{\par}{\par}
  \newenvironment{longimportant}{\par}{\par}
  \newenvironment{longimportant*}[1][]{\par}{\par}
\fi
%    \end{macrocode}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
%
% \section{Aufgaben und L�sungen}
%
% \subsection{Aufgaben f�r globale Aufgabensammlung}
%
% Aufgaben z�hlen:
%    \begin{macrocode}
\newcounter{aufgabenzahl}%
%    \end{macrocode}
% Berechnung der Einrueckung der Aufgaben�berschriften:
%    \begin{macrocode}
\newlength{\hhcls@@exerciseindent}%
\setlength{\hhcls@@exerciseindent}{7.8398em}%
%    \end{macrocode}
% Z�hler definieren. F�r die |aufgabe|"=Umgebung Format "`Aufgabe"':
%    \begin{macrocode}
\newcounter{@exercise}
\renewcommand*\the@exercise{\@arabic\c@@exercise}
%    \end{macrocode}
% �berschrift der |exercise|"=Umgebung:
%    \begin{macrocode}
\newcommand*{\scr@fnt@@exercise}{\size@section}
\@ifundefined{DeclareSectionCommand}{%
  \ClassWarningNoLine{bgteubner}{Koma-Script macro
    \string\DeclareSectionCommand\space not defined.\MessageBreak
    Using workaround for exercise environment.\MessageBreak
    You should consider updating Koma-Script}%
  \newcommand\@exercise{\@startsection{@exercise}{1}{\z@}%
    {-3.5ex \@plus -1ex \@minus -.2ex}%
    {2.3ex \@plus.2ex}%
    {\raggedsection\normalfont\sectfont\nobreak\size@section\nobreak}}
  \if@exercisetotoc
    \newcommand*\l@@exercise[2]{\@dottedtocline{1}{1.5em}{2.3em}{%
        \def\numberline##1{%
          \hb@xt@\@tempdima{\lprefix@exercise##1\hfil}}#1}{#2}}
  \else
    \newcommand*\l@@exercise[2]{}
  \fi
}{%
  \DeclareSectionCommand[%
    style=section,%
    level=1,%
    indent=\z@,%
    beforeskip=-3.5ex \@plus -1ex \@minus -.2ex,%
    afterskip=2.3ex \@plus.2ex,%
    tocindent=1.5em,%
    tocnumwidth=2.3em%
  ]{@exercise}
}%
%    \end{macrocode}
% \begin{macro}{\exercisename}
% Name der Aufgaben:
%    \begin{macrocode}
\newcommand*\exercisename{Aufgabe}
%    \end{macrocode}
% \end{macro}
% Format der �berschrift:
%    \begin{macrocode}
\def\prefix@exercise{\exercisename~}%
%    \end{macrocode}
% Doppelpunkt nach der Zahl:
%    \begin{macrocode}
\def\postfix@exercise{:}%
%    \end{macrocode}
% �berschrift f�r unnummerierte Aufgaben:
%    \begin{macrocode}
\def\prefix@exercisestar{\exercisename}%
%    \end{macrocode}
% Unnummeriert mit Doppelpunkt:
%    \begin{macrocode}
\def\postfix@exercisestar{:}%
%    \end{macrocode}
% Prefix im Inhaltsverzeichnis:
%    \begin{macrocode}
\def\lprefix@exercise{}%
%    \end{macrocode}
% Aufgaben z�hlen:
%    \begin{macrocode}
  \g@addto@macro\hhcls@theoremlist{%
    \addtocontents{exercise}{\hhcls@theoremskip}%
  }%
%    \end{macrocode}
% Kein Kolumnentitel:
%    \begin{macrocode}
\let\@exercisemark\@gobble
%    \end{macrocode}
% \begin{macro}{\exercisefont}
% \changes{1.30}{2004/04/10}{Make font in exercises adjustable}%
% Font for exercises.
%    \begin{macrocode}
\newcommand*\exercisefont{\normalsize}
%    \end{macrocode}
% \end{macro}
% \begin{environment}{exercise}
% Nummerierte |exercise|"=Umgebung:
%    \begin{macrocode}
\newenvironment{exercise}[1]{%
%    \end{macrocode}
% Teilaufgabennummerierung auf Null setzen:
%    \begin{macrocode}
  \setcounter{subtaskoffset}{0}%
%    \end{macrocode}
% Aufgaben z�hlen:
%    \begin{macrocode}
  \stepcounter{aufgabenzahl}%
%    \end{macrocode}
% �berschrift
%    \begin{macrocode}
  \@exercise{#1}%
%    \end{macrocode}
% Eintrag in das Verzeichnis der Aufgaben schreiben:
%    \begin{macrocode}
  \addcontentsline{exercise}{exercise}{\protect\numberline {\the@exercise}#1}%
%    \end{macrocode}
% Gliederungsbefehle ausschalten
%    \begin{macrocode}
  \gliederungsfehler{exercise}%
%    \end{macrocode}
% Switch to chosen font.
%    \begin{macrocode}
  \exercisefont
}{%
%    \end{macrocode}
% Leerzeichen ignorieren:
%    \begin{macrocode}
  \ignorespacesafterend
%    \end{macrocode}
% N�chsten Absatz nicht einr�cken:
%    \begin{macrocode}
  \noindentnextpar
  \par
}
%    \end{macrocode}
% \end{environment}
% \begin{environment}{exercise*}
% Unnummerierte |exercise*|"=Umgebung:
%    \begin{macrocode}
\newenvironment{exercise*}[1]{%
%    \end{macrocode}
% Teilaufgabennummerierung auf Null setzen
%    \begin{macrocode}
  \setcounter{subtaskoffset}{0}%
%    \end{macrocode}
% Aufgaben z�hlen:
%    \begin{macrocode}
  \stepcounter{aufgabenzahl}%
%    \end{macrocode}
% �berschrift. Die Sternvariante l�sst die Nummer usw. weg. Daher muss
% der Teil von Hand eingef�gt werden.
%    \begin{macrocode}
  \@exercise*{\makebox[\hhcls@@exerciseindent][l]{%
    \prefix@exercisestar\postfix@exercisestar}#1}%
%    \end{macrocode}
% Eintrag in das Verzeichnis der Aufgaben schreiben:
%    \begin{macrocode}
  \addcontentsline{exercise}{exercise}{#1}%
%    \end{macrocode}
% Gliederungsbefehle ausschalten
%    \begin{macrocode}
  \gliederungsfehler{exercise}%
%    \end{macrocode}
% Switch to chosen font.
%    \begin{macrocode}
  \exercisefont
%    \begin{macrocode}
}{%
%    \end{macrocode}
% Leerzeichen ignorieren:
%    \begin{macrocode}
  \ignorespacesafterend
%    \end{macrocode}
% N�chsten Absatz nicht einr�cken:
%    \begin{macrocode}
  \noindentnextpar
  \par
}
%    \end{macrocode}
% \end{environment}
%
% \subsection{L�sungen f�r globale Aufgabensammlung}
%
% Berechnung der Einr�ckung der L�sungs�berschrift.
%    \begin{macrocode}
\newlength{\hhcls@@answerindent}%
\AtBeginDocument{%
  \setlength{\hhcls@@answerindent}{\hhcls@@exerciseindent}%
}
%    \end{macrocode}
% Z�hler, alle haben keine Ausgabe, weil sie eigentlich nicht ben�tigt
% werden.
%    \begin{macrocode}
\newcounter{@answer}
\renewcommand*\the@answer{}
%    \end{macrocode}
% Befehle f�r die �berschriften:
%    \begin{macrocode}
\newcommand\@answer{\@startsection{@answer}{2}{\z@}%
  {-3.25ex \@plus -1ex \@minus -.2ex}%
  {1.5ex \@plus .2ex}%
  {\raggedsection\normalfont\sectfont\nobreak\size@subsection\nobreak}}
%    \end{macrocode}
% Befehle f�r das Inhaltsverzeichnis, falls gew�nscht:
%    \begin{macrocode}
\if@answertotoc
  \newcommand*\l@@answer[2]{\@dottedtocline{1}{0em}{6.2em}{%
      \def\numberline##1{%
        \hb@xt@\@tempdima{\lprefix@answer##1\hfil}}#1}{#2}}
\else
  \newcommand*\l@@answer[2]{}
\fi
%    \end{macrocode}
% \begin{macro}{\answerspacing}
% Zeilenabstand innerhalb der L�sungen:
%    \begin{macrocode}
\ifhhcls@times
  \newcommand\answerspacing{1.12}
\else
  \newcommand\answerspacing{1.06}
\fi
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\answername}
% Name f�r L�sungen:
%    \begin{macrocode}
\newcommand*\answername{L\"osung}
%    \end{macrocode}
% \end{macro}
% Prefixe f�r nummerierte �berschriften:
%    \begin{macrocode}
\def\prefix@answer{\answername~}%
%    \end{macrocode}
% Doppelpunkte nach der Nummer:
%    \begin{macrocode}
\def\postfix@answer{:}%
%    \end{macrocode}
% Unnummerierte Namen:
%    \begin{macrocode}
\def\prefix@answerstar{\answername}%
%    \end{macrocode}
% Doppelpunkt nach unnummeriert:
%    \begin{macrocode}
\def\postfix@answerstar{:}%
%    \end{macrocode}
% Prefix im Inhaltsverzeichnis:
%    \begin{macrocode}
\def\lprefix@answer{\answername~}%
%    \end{macrocode}
% Keine Kolumnentitel:
%    \begin{macrocode}
\let\@answermark\@gobble
%    \end{macrocode}
% \begin{macro}{\answerfont}
% Schriftgr��en f�r die L�sungen:
%    \begin{macrocode}
\newcommand\answerfont{\footnotesize}
%    \end{macrocode}
% \end{macro}
% Einz�ge f�r die L�sungen:
%    \begin{macrocode}
\newlength{\answer@lmargin}
\newlength{\answer@rmargin}
\setmargin{answer}{0em}
%    \end{macrocode}
%
% \begin{environment}{answer}
% Nummerierte |answer|"=Umgebung:
%    \begin{macrocode}
\newcommand\answer[2][\@empty]{%
%    \end{macrocode}
% Nummer auf das Label kopieren:
%    \begin{macrocode}
  \def\the@answer{\ref{#2}}%
%    \end{macrocode}
% Die eigentliche Umgebung starten:
%    \begin{macrocode}
  \@@answer{#1}%
}
%    \end{macrocode}
% \end{environment}
% \begin{environment}{answer*}
% Unnummerierte |answer|"=Umgebung:
%    \begin{macrocode}
\expandafter\newcommand\csname answer*\endcsname[1][\@empty]{%
%    \end{macrocode}
% Label l�schen:
%    \begin{macrocode}
  \def\the@answer{}%
%    \end{macrocode}
% Pre"= und Postfix kopieren:
%    \begin{macrocode}
  \def\prefix@answer{\prefix@answerstar}%
  \def\postfix@answer{\postfix@answerstar}%
%    \end{macrocode}
% Die eigentliche Umgebung starten:
%    \begin{macrocode}
  \@@answer{#1}%
}
%    \end{macrocode}
% \end{environment}
% Die Umgebung, die wirklich eine L�sung setzt.
%    \begin{macrocode}
\def\@@answer#1{%
%    \end{macrocode}
% �berschrift
%    \begin{macrocode}
  \@answer{#1}%
%    \end{macrocode}
% Teilloesungsnummerierung auf Null setzen
%    \begin{macrocode}
  \setcounter{subtaskoffset}{0}%
%    \end{macrocode}
% Gliederungsbefehle ausschalten
%    \begin{macrocode}
  \gliederungsfehler{answer}%
%    \end{macrocode}
% \changes{1.02}{2003/09/17}{\cs{normalfont} in Bildunterschriften
%   aufrufen}%
% Schriftarten und L�ngen setzen:
%    \begin{macrocode}
  \answerfont
  \let\size@subsubsection\answerfont
  \let\size@paragraph\answerfont
  \let\size@subparagraph\answerfont
  \setlength{\mathindent}{0.5\leftmargini}%
  \setlength{\abovecaptionskip}{0.89\abovecaptionskip}%
  \setkomafont{caption}{\normalfont\rmfamily\footnotesize\RaggedRight}%
  \setkomafont{float}{\normalfont\normalcolor\footnotesize}%
  \renewcommand{\subcapsize}{\footnotesize}%
%    \end{macrocode}
% \changes{1.30}{2004/04/09}{Remove \cs{begingroup} and \cs{endgroup}
%   because they removed the correct linespacing}%
% Abstand erh�hen:
%    \begin{macrocode}
    \setstretch{\answerspacing}%
}
%    \end{macrocode}
% Ende der Umgebung:
%    \begin{macrocode}
\def\endanswer{%
  \par
%    \end{macrocode}
% Leerzeichen ignorieren:
%    \begin{macrocode}
  \ignorespacesafterend
%    \end{macrocode}
% N�chsten Absatz nicht einr�cken:
%    \begin{macrocode}
  \noindentnextpar
}
%    \end{macrocode}
% Ende unnummeriert
%    \begin{macrocode}
\expandafter\def\csname endanswer*\endcsname{\endanswer}
%    \end{macrocode}
%
% \subsection{Aufgaben innerhalb von Kapiteln}
%
% Berechnung der Einrueckung der �berschriften:
%    \begin{macrocode}
\newlength{\hhcls@@subexerciseindent}%
\AtBeginDocument{%
  \setlength{\hhcls@@subexerciseindent}{\hhcls@@exerciseindent}%
}
%    \end{macrocode}
% F�r die |subexercise|"=Umgebung Format "`Kapitel.Subexercise"':
%    \begin{macrocode}
\newcounter{@subexercise}[chapter]
\renewcommand*\the@subexercise{\thechapter.\@arabic\c@@subexercise}
%    \end{macrocode}
% \changes{1.13}{2003/12/16}{Make delimiter for subexercise configurable}%
% \changes{1.20}{2004/03/07}{Avoid page break after title in subexercise}%
% \changes{1.30}{2004/04/10}{Improve spacing after title of
%   subexercise}%
% �berschrift der |subexercise|"=Umgebung:
%    \begin{macrocode}
\newcommand\subexercise@title[1]{%
  \iftheorem@starvariant
  \else
    \refstepcounter{@subexercise}%
  \fi
  {%
    \raggedsection\normalfont\normalsize\sectfont\nobreak
    \makebox[\hhcls@@subexerciseindent][l]{\exercisename
      \iftheorem@starvariant
      \else
        ~\the@subexercise
      \fi
    \postfix@exercise}%
    \setlength\@tempdima{1pt}%
    \settoheight\@tempdimb{D}%
    \addtolength\@tempdima{\@tempdimb}%
    \settoheight\@tempdimb{\subexercisefont D}%
    \addtolength\@tempdima{-\@tempdimb}%
    #1\nobreak\par\nobreak\vspace{\@tempdima}\nobreak}\nobreak
  \@afterheading}
%    \end{macrocode}
% \begin{macro}{\subexercisefont}
% Schriftgr��e in Aufgaben:
%    \begin{macrocode}
\newcommand\subexercisefont{\normalfont\small}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\subexercisespacing}
% Zeilenabstand innerhalb der Subaufgabee:
%    \begin{macrocode}
\ifhhcls@times
  \newcommand\subexercisespacing{1.12}
\else
  \newcommand\subexercisespacing{1.06}
\fi
%    \end{macrocode}
% \end{macro}
% Einr�ckung:
%    \begin{macrocode}
\newlength{\subexercise@lmargin}
\newlength{\subexercise@rmargin}
\setmargin{subexercise}{\leftmargini}
%    \end{macrocode}
% \begin{environment}{subexercise*}
% Unnummerierte Umgebung:
%    \begin{macrocode}
\expandafter\def\csname subexercise*\endcsname{%
  \theorem@starvarianttrue
  \subexercise
}%
%    \end{macrocode}
% Ende der Sternvariante:
%    \begin{macrocode}
\expandafter\def\csname endsubexercise*\endcsname{\endsubexercise}
%    \end{macrocode}
% \end{environment}
% \begin{environment}{subexercise}
% Nummerierte |subexercise|"=Umgebung:
%    \begin{macrocode}
\newenvironment{subexercise}[1]{%
%    \end{macrocode}
% Zur Sicherheit einen Absatz.
%    \begin{macrocode}
  \par
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Fix left margin in subexercise environment}%
% Die eigentliche Umgebung beginnen:
%    \begin{macrocode}
  \begin{list}{}{%
      \itemindent-\subexercise@lmargin
      \listparindent\parindent
      \leftmargin\subexercise@lmargin
      \rightmargin\subexercise@rmargin
      \parsep\z@ \@plus\p@
%    \end{macrocode}
% Aufgaben z�hlen:
%    \begin{macrocode}
      \stepcounter{aufgabenzahl}%
%    \end{macrocode}
% Gliederungsbefehle ausschalten:
%    \begin{macrocode}
      \gliederungsfehler{subexercise}%
%    \end{macrocode}
% Teilaufgabennummerierung auf Null setzen
%    \begin{macrocode}
      \setcounter{subtaskoffset}{0}%
    }%
%    \end{macrocode}
% Zeilenabstand anpassen:
%    \begin{macrocode}
    \begin{spacing}{\subexercisespacing}%
%    \end{macrocode}
% List"=Umgebung f�ngt mit \cs{item} an:
%    \begin{macrocode}
    \item\relax
%    \end{macrocode}
% �berschrift
%    \begin{macrocode}
      \subexercise@title{#1}%
%    \end{macrocode}
% Eintrag in das Verzeichnis der Aufgaben schreiben:
%    \begin{macrocode}
      \edef\hhtmp{#1}%
      \ifx\hhtmp\empty
      \else
        \iftheorem@starvariant
          \addcontentsline{exercise}{exercise}{#1}%
        \else
          \addcontentsline{exercise}{exercise}{%
            \protect\numberline{\the@subexercise}#1}%
        \fi
      \fi
%    \end{macrocode}
% Schriftart setzen:
%    \begin{macrocode}
      \subexercisefont
      \let\size@subsubsection\subexercisefont
      \let\size@paragraph\subexercisefont
      \let\size@subparagraph\subexercisefont
%    \end{macrocode}
% Leerzeichen ignorieren:
%    \begin{macrocode}
      \ignorespaces
    }{%
%    \end{macrocode}
% Ende der Umgebung:
% \changes{1.10}{2003/10/30}{Abst�nde am Ende der Umgebung korrigiert}%
%    \begin{macrocode}
    \end{spacing}%
    \removelastskip
  \end{list}%
%    \end{macrocode}
% Leerzeichen ignorieren:
%    \begin{macrocode}
  \ignorespacesafterend
%    \end{macrocode}
% N�chsten Absatz nicht einr�cken:
%    \begin{macrocode}
  \noindentnextpar
  \par
}
%    \end{macrocode}
% \end{environment}
%
% \subsection{L�sungen}
%
% Berechnung der Einr�ckung der L�sungs�berschrift.
%    \begin{macrocode}
\newlength{\hhcls@@subanswerindent}%
\AtBeginDocument{%
  \setlength{\hhcls@@subanswerindent}{\hhcls@@answerindent}%
}
%    \end{macrocode}
% Z�hler, alle haben keine Ausgabe, weil sie eigentlich nicht ben�tigt
% werden.
%    \begin{macrocode}
\newcounter{@subanswer}
\renewcommand*\the@subanswer{}
%    \end{macrocode}
% \changes{1.13}{2003/12/16}{Make delimiter for subanswer configurable}%
% \changes{1.20}{2004/03/07}{Avoid page break after title in subanswer}%
% \changes{1.30}{2004/04/10}{Improve spacing after title of
%   subanswer}%
% �berschrift der |subexercise|"=Umgebung:
%    \begin{macrocode}
\newcommand\subanswer@title[2]{%
  {%
    \raggedsection\normalfont\normalsize\sectfont\nobreak
    \makebox[\hhcls@@subanswerindent][l]{\answername
      \iftheorem@starvariant
      \else
        ~\ref{#1}%
      \fi
    \postfix@answer}%
    \setlength\@tempdima{1pt}%
    \settoheight\@tempdimb{D}%
    \addtolength\@tempdima{\@tempdimb}%
    \settoheight\@tempdimb{\subanswerfont D}%
    \addtolength\@tempdima{-\@tempdimb}%
    #2\nobreak\par\nobreak\vspace{\@tempdima}\nobreak}\nobreak
  \@afterheading}
%    \end{macrocode}
% \begin{macro}{\subanswerfont}
% Schriftgr��en f�r die L�sungen:
%    \begin{macrocode}
\newcommand\subanswerfont{\footnotesize}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\subanswerspacing}
% \changes{1.30}{2004/04/10}{Subanswers can have another linespacing
%   than answers}%
% Zeilenabstand innerhalb der L�sungen:
%    \begin{macrocode}
\ifhhcls@times
  \newcommand\subanswerspacing{1.12}
\else
  \newcommand\subanswerspacing{1.06}
\fi
%    \end{macrocode}
% \end{macro}
% Einz�ge f�r die L�sungen:
%    \begin{macrocode}
\newlength{\subanswer@lmargin}
\newlength{\subanswer@rmargin}
\setmargin{subanswer}{\leftmargini}
%    \end{macrocode}
% \begin{environment}{subanswer*}
% Unnummerierte Umgebung:
%    \begin{macrocode}
\expandafter\newcommand\csname subanswer*\endcsname[1][\@empty]{%
  \theorem@starvarianttrue
  \subanswer[#1]{}%
}%
%    \end{macrocode}
% Ende der Sternvariante:
%    \begin{macrocode}
\expandafter\def\csname endsubanswer*\endcsname{\endsubanswer}
%    \end{macrocode}
% \end{environment}
% \begin{environment}{subanswer}
% Nummerierte |subanswer|"=Umgebung:
%    \begin{macrocode}
\newenvironment{subanswer}[2][\@empty]{%
%    \end{macrocode}
% Zur Sicherheit einen Absatz.
%    \begin{macrocode}
  \par
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Fix left margin in subanswer environment}%
% Die eigentliche Umgebung beginnen:
%    \begin{macrocode}
  \begin{list}{}{%
      \itemindent-\subanswer@lmargin
      \listparindent\parindent
      \leftmargin\subanswer@lmargin
      \rightmargin\subanswer@rmargin
      \parsep\z@ \@plus\p@
%    \end{macrocode}
% Gliederungsbefehle ausschalten:
%    \begin{macrocode}
      \gliederungsfehler{subanswer}%
%    \end{macrocode}
% Teilaufgabennummerierung auf Null setzen
%    \begin{macrocode}
      \setcounter{subtaskoffset}{0}%
    }%
%    \end{macrocode}
% Zeilenabstand anpassen:
%    \begin{macrocode}
    \begin{spacing}{\subanswerspacing}%
%    \end{macrocode}
% List"=Umgebung f�ngt mit \cs{item} an:
%    \begin{macrocode}
    \item\relax
%    \end{macrocode}
% �berschrift
%    \begin{macrocode}
      \subanswer@title{#2}{#1}%
%    \end{macrocode}
% Schriftart setzen:
%    \begin{macrocode}
      \let\size@subsubsection\subanswerfont
      \let\size@paragraph\subanswerfont
      \let\size@subparagraph\subanswerfont
      \subanswerfont
%    \end{macrocode}
% Leerzeichen ignorieren:
%    \begin{macrocode}
      \ignorespaces
    }{%
%    \end{macrocode}
% Ende der Umgebung:
% \changes{1.10}{2003/10/30}{Abst�nde am Ende der Umgebung korrigiert}%
%    \begin{macrocode}
    \end{spacing}%
    \removelastskip
  \end{list}%
%    \end{macrocode}
% Leerzeichen ignorieren:
%    \begin{macrocode}
  \ignorespacesafterend
%    \end{macrocode}
% N�chsten Absatz nicht einr�cken:
%    \begin{macrocode}
  \noindentnextpar
  \par
}
%    \end{macrocode}
% \end{environment}
%
% \subsection{Aufgabenliste}
%
% \begin{macro}{\listofexercises}
% Erzeugen einer Liste der Aufgaben:
%    \begin{macrocode}
\@ifundefined{BeforeStartingTOC}{%
  \ClassWarningNoLine{bgteubner}{Koma-Script macro
    \string\BeforeStartingTOC\space not defined.\MessageBreak
    Using workaround for \string\listofexercises.\MessageBreak
    You should consider updating Koma-Script}%
  \newcommand*\exercise@heading{\float@listhead{\listexercisename}}
  \newcommand*\listofexercises{%
    \begingroup%
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse
      \fi
      \exercise@heading
      \small
      \setlength{\parskip}{\z@}%
      \@starttoc{exercise}%
      \if@restonecol\twocolumn\fi
    \endgroup
  }
}{%
  \newcommand*\listofexercises{\listoftoc{exercise}}
  \newcommand*\listofexercisename{\listexercisename}
  \BeforeStartingTOC[exercise]{\small}
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\listexercisename}
%    \begin{macrocode}
\newcommand*\listexercisename{List of Exercises}
\newcommand*\hhcls@germanlistexercisename{Aufgabenverzeichnis}
\addto\captionsgerman{%
  \renewcommand{\listexercisename}{\hhcls@germanlistexercisename}}%
\addto\captionsngerman{%
  \renewcommand{\listexercisename}{\hhcls@germanlistexercisename}}%
\addto\captionsaustrian{%
  \renewcommand{\listexercisename}{\hhcls@germanlistexercisename}}%
\addto\captionsnaustrian{%
  \renewcommand{\listexercisename}{\hhcls@germanlistexercisename}}%
\newcommand*\l@exercise{\@dottedtocline{1}{0em}{2.9em}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Changing the delimiter}
%
% \begin{environment}{exercisedelimiter}
% \changes{1.13}{2003/12/16}{Make delimiter for exercises configurable}%
% This environment takes one argument.
% It is the new delimiter after the exercise number that is valid
% inside the environment.
%    \begin{macrocode}
\newenvironment{exercisedelimiter}[1]{%
  \def\postfix@exercise{#1}%
  \def\postfix@exercisestar{#1}%
  \def\postfix@answer{#1}%
  \def\postfix@answerstar{#1}%
  \ignorespaces
}{%
  \ignorespacesafterend
}%
%    \end{macrocode}
% \end{environment}
%
% \subsection{Teilaufgaben}
%
% Z�hler innerhalb einer teilaufgabe-Umgebung
%    \begin{macrocode}
\newcounter{subtask}
%    \end{macrocode}
% Z�hler, der daf�r sorgt, dass in weiteren Umgebungen weitergez�hlt
% wird. Er wird bei einer neuen Aufgabe auf Null gesetzt.
%    \begin{macrocode}
\newcounter{subtaskoffset}[@exercise]%
\renewcommand\thesubtask{\alph{subtask}}%
%    \end{macrocode}
% \begin{environment}{subtask}
% Die Umgebung selbst:
%    \begin{macrocode}
\newenvironment{subtask}{%
%    \end{macrocode}
% Listenumgebung
%    \begin{macrocode}
  \begin{list}{\thesubtask)}{\usecounter{subtask}%
%    \end{macrocode}
% Kleine Abst�nde zwischen den Teilaufgaben (Platz sparen):
%    \begin{macrocode}
      \parskip\z@%
      \itemsep\z@%
%    \end{macrocode}
% Absatzeinzug statt Durchschuss: 
%    \begin{macrocode}
      \parsep\z@
      \listparindent\parindent
%    \end{macrocode}
% Offset zum Z�hler addieren, damit weitergez�hlt wird
%    \begin{macrocode}
      \setcounter{subtask}{\value{subtaskoffset}}}}{%
%    \end{macrocode}
% Am Ende Offset speichern f�r weiteren Gebrauch
%    \begin{macrocode}
    \setcounter{subtaskoffset}{\value{subtask}}%
  \end{list}%
%    \end{macrocode}
% Leerzeichen ignorieren:
%    \begin{macrocode}
  \ignorespacesafterend
%    \end{macrocode}
% N�chsten Absatz nicht einr�cken:
%    \begin{macrocode}
  \noindentnextpar\par}
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\subtaskref}
% Referenz auf eine Teilaufgabe:
%    \begin{macrocode}
\newcommand\subtaskref[1]{\ref{#1})}
%    \end{macrocode}
% \end{macro}
%
% \section{Listen und Aufz�hlungen}
%
% \begin{macro}{\labelenumii}
% Punkt statt Klammer in der zweiten Ebene:
%    \begin{macrocode}
\renewcommand*\labelenumii{\theenumii.}
%    \end{macrocode}
% \end{macro}
%
% \section{Vorwort}
%
% \begin{macro}{\preface}
% \changes{1.30}{2004/04/10}{Start prefaces on odd and even pages}%
% �berschrift des Vorworts:
%    \begin{macrocode}
\newcommand*\preface[1]{%
  \begingroup
  \@openrightfalse
  \chapter*{#1}%
  \markboth{}{}%
  \endgroup
  \noindentnextpar\par
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\signature}
% Unterschrift im Vorwort:
%    \begin{macrocode}
\newcommand*\signature[3]{%
  \par\bigskip
  \begin{minipage}[t]{0.45\linewidth}%
    #1,\\
    #2%
  \end{minipage}%
  \hfill
  \begin{minipage}[t]{0.5\linewidth}%
    \itshape\raggedleft
    #3%
  \end{minipage}%
}
%    \end{macrocode}
% \end{macro}
%
% \section{Preparation for hyperref}
%
% The package \verb|hyperref.sty| is not loaded by \verb|bgteubner.cls|.
% But if the user does, some settings should be ensured.
% This is done here.
%    \begin{macrocode}
\AfterPackage{hyperref}{%
  \hypersetup{%
    unicode
  }%
}%
%    \end{macrocode}
%
% \section{Titelseite}
%
% Interne Befehle f�r die Titelseite auf \cs{@empty} setzen:
%    \begin{macrocode}
\let\@author=\@empty
%    \end{macrocode}
% Titel leer vordefinieren:
%    \begin{macrocode}
\let\@title\@empty
%    \end{macrocode}
% \begin{macro}{\subtitle}
% Sub-title.
% Koma-Script has added the macro \cs{subtitle} in v2.97c. Only define
% it if it is not present already.
% \changes{2.01}{2011/12/29}{Only define \cs{subtitle} if not present already}%
%    \begin{macrocode}
\let\@subtitle\@empty
\@ifundefined{subtitle}{%
  \newcommand\subtitle[1]{\gdef\@subtitle{#1}}%
}{}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\edition}
% Auf"|lage:
%    \begin{macrocode}
\let\@edition\@empty
\newcommand*\edition[1]{\gdef\@edition{#1}}
\edition{1}
%    \end{macrocode}
% \end{macro}
%
% \changes{1.30}{2004/04/10}{Set PDF information only if PDF is
%   produced}%
% \changes{1.30}{2004/04/10}{Write info file containing the same
%   information as the PDF-info entries}%
% PDF-Datei mit Informationen versorgen:
%    \begin{macrocode}
\newwrite\hhcls@fileinfo
\immediate\openout\hhcls@fileinfo\jobname.info
\AtEndDocument{%
%    \end{macrocode}
% Depending on whether \verb|hyperref| is loaded or not, make sure that all
% types of title strings etc.\ can be written into the PDF meta
% information.
% If \verb|hyperref| is not loaded, \LaTeX\ macros can result in errors.
%    \begin{macrocode}
  \ifx\pdfstringdef\@undefined
     \def\hhcls@title{\@title}%
     \ifx\@subtitle\@empty
       \def\hhcls@subject{\@edition. Auflage}%
     \else
       \def\hhcls@subject{\@subtitle\space (\@edition. Auflage)}%
     \fi
     \def\hhcls@author{\@author}%
  \else
     \pdfstringdef\hhcls@title{\@title}%
     \ifx\@subtitle\@empty
       \pdfstringdef\hhcls@subject{\@edition. Auflage}%
     \else
       \pdfstringdef\hhcls@subject{\@subtitle\space (\@edition. Auflage)}%
     \fi
     \pdfstringdef\hhcls@author{\@author}%
  \fi
%    \end{macrocode}
% Actually write the information into the PDF file:
%    \begin{macrocode}
  \ifpdf
    \ifx\@title\@empty\else\pdfinfo{/Title (\hhcls@title)}\fi
    \ifx\hhcls@subject\@empty\else\pdfinfo{/Subject (\hhcls@subject)}\fi
    \ifx\@author\@empty\else\pdfinfo{/Author (\hhcls@author)}\fi
%    \end{macrocode}
% Der \texttt{/Creator}"=Eintrag, der in die PDF"=Datei geschrieben
% wird, muss in ver�nderten und umbenannten Kopien der Dateien
% "`|bgteubner.cls|"' und "`|bgteucls.dtx|"' folgende Informationen
% enthalten:
% \begin{itemize}
% \item Den Dateinamen "`|bgteubner.cls|"',
% \item einen Hinweis darauf, dass diese Dokumentklasse f�r den
% "`Springer Vieweg Verlag, Wiesbaden, Germany"' entwickelt wurde.
% \end{itemize}
%    \begin{macrocode}
    % If you modify a renamed copy of the files `bgteubner.cls' or
    % `bgteucls.dtx', you have to preserve some information in the
    % PDF /Creator entry. The following data have to remain:
    % - The name `bgteubner.cls',
    % - a hint that this class has been developed for the `Springer
    %   Vieweg Verlag, Wiesbaden, Germany'.
    \begingroup
    \GetFileInfo{bgteubner.cls}%
    \pdfinfo{/Creator (Document class bgteubner.cls for the
      Springer Vieweg Verlag, Wiesbaden, Germany, by Harald Harders,
      version \fileversion)}%
    \endgroup
    \pdfinfo{/Keywords (Bild: \thebilderzahl; Tabelle: \thetabellenzahl;
      Aufgabe: \theaufgabenzahl\hhcls@theoremanzahl)}%
  \fi
  \ifx\@title\@empty
  \else
    \protected@write\hhcls@fileinfo{}{Titel: \@title}%
  \fi
  \ifx\@subtitle\@empty
  \else
    \protected@write\hhcls@fileinfo{}{Untertitel: \@subtitle}%
  \fi
  \protected@write\hhcls@fileinfo{}{\@edition. Auflage}%
  \ifx\@author\@empty
  \else
    \protected@write\hhcls@fileinfo{}{Autor(en): \@author}%
  \fi
  \protected@write\hhcls@fileinfo{}{Bild: \thebilderzahl; Tabelle:
    \thetabellenzahl; Aufgabe: \theaufgabenzahl\hhcls@theoremanzahl}%
}
%    \end{macrocode}
% \begin{macro}{\maketitle}
% Titel ertellen. 
%    \begin{macrocode}
\ifhhcls@titlepage
\renewcommand*\maketitle{%
  \begingroup
  \edef\hhcls@tmppage{\arabic{page}}%
  \begin{titlepage}%
    \renewcommand{\sfdefault}{phv}%
%    \end{macrocode}
% Warnungen und Fehler f�r nicht angegebene Dinge:
%    \begin{macrocode}
    \ifx\@title\@empty
      \ClassError{bgteubner}{No title given}{Define a title using
        \string\title{Titel}}
    \fi
    \ifx\@author\@empty
      \ClassError{bgteubner}{No author given}{Define
        an author using \string\author{Name}.}
    \fi
%    \end{macrocode}
% Formatierungsangaben:
%    \begin{macrocode}
    \newlength{\hhcls@parindent}%
    \setlength{\hhcls@parindent}{2.5\parindent}%
    \setlength{\parindent}{0mm}%
    \let\footnotesize\small
    \let\footnoterule\relax
    \renewcommand*\thefootnote{\@fnsymbol\c@footnote}%
    \let\@oldmakefnmark\@makefnmark
    \def\@makefnmark{\rlap\@oldmakefnmark}
%    \end{macrocode}
% Titelseite ist zentriert:
%    \begin{macrocode}
    \begin{center}
      \sffamily\Large
%    \end{macrocode}
% Titel:
%    \begin{macrocode}
      {\bfseries\LARGE \@author}%
      \vskip 2.5em
      \par
      {\bfseries\iftensor@bold\else\mathversion{bold}\fi\Huge\@title\par}
      \ifx\@subtitle\@empty
      \else
        \vskip 2.5em
        {\bfseries\iftensor@bold\else\mathversion{bold}\fi
          \LARGE\@subtitle\par}
      \fi
      \vskip 2.5em
      \par
%    \end{macrocode}
% \changes{1.20}{2004/03/07}{Titelpage: Only type these items that
%   really are used}%
% \changes{1.30}{2004/05/09}{Titelpage: Minor bugfix testing on used items}%
% Only type these items that really are used.
% Singular cases are not handled.
%    \begin{macrocode}
      \@ifundefined{hhclsbilderzahl}{%
        Mit
        \textbf{??}~Abbildungen,
        \textbf{???}~Tabellen
        und 
        \textbf{???}~Aufgaben
      }{%
        \ifnum\hhclsbilderzahl=0\relax
          \ifnum\hhclstabellenzahl=0\relax
            \ifnum\hhclsaufgabenzahl=0\relax
            \else
              Mit \hhclsaufgabenzahl~Aufgaben
            \fi
          \else
            Mit \hhclstabellenzahl~Tabellen
            \ifnum\hhclsaufgabenzahl=0\relax
            \else
              und \hhclsaufgabenzahl~Aufgaben
            \fi
          \fi
        \else
          Mit \hhclsbilderzahl~Abbildungen%
          \ifnum\hhclstabellenzahl=0\relax
            \ifnum\hhclsaufgabenzahl=0\relax
            \else
              \space und \hhclsaufgabenzahl~Aufgaben
            \fi
          \else
            \ifnum\hhclsaufgabenzahl=0\relax
              \space und \hhclstabellenzahl~Tabellen
            \else
              , \hhclstabellenzahl~Tabellen
              und \hhclsaufgabenzahl~Aufgaben
            \fi
          \fi
        \fi
      }%
      \ifhhcls@entwurf
        \vskip 2.5em
        \par
        \strut\"Ubersetzt: \today, \now
      \fi
      \vfill
      \par
%    \end{macrocode}
% Testen, ob |\@edition| als Zahl angegeben wurde.
% Tipp von David Kastrup, der f�r vorzeichenlose Zahlen funktioniert.
%    \begin{macrocode}
      \ifx\@edition\@empty
      \else
%    \end{macrocode}
% Testen, ob |\@edition| als Zahl angegeben wurde.
% Tipp von David Kastrup, der f�r vorzeichenlose Zahlen funktioniert.
%    \begin{macrocode}
        \ifnum1<1\@edition
%    \end{macrocode}
% Wenn es eine Zahl ist, nur ausgeben, wenn die Auf"|lage gr��er 1
% ist.
%    \begin{macrocode}
          \ifnum1<0\@edition\relax
            \@edition.~Auf\/lage%
            \vskip 4em
          \fi
%    \end{macrocode}
% Wenn keine Zahl, nur den Text in \cs{@edition} ausgeben.
%    \begin{macrocode}
        \else
          \@edition
          \vskip 4em
        \fi
      \fi
      \par
      {\Large \hhcls@publisher\par}
    \end{center}
  \end{titlepage}
%    \end{macrocode}
% Impressum:
%    \begin{macrocode}
  \next@tpage\cleardoubleemptypage
  \setcounter{page}{\hhcls@tmppage}%
%    \end{macrocode}
% Widmung.
%    \begin{macrocode}
   \ifx\@dedication\@empty \else
     \next@tpage\null\vfill
     {\centering \Large \@dedication \par}
     \vskip \z@ \@plus3fill
     \if@twoside \next@tpage\cleardoublepage \fi
   \fi
%    \end{macrocode}
% Alles M�gliche l�schen, da nicht mehr gebraucht:
%    \begin{macrocode}
%    \setcounter{footnote}{0}%
  \global\let\maketitle\relax
  \endgroup
}
\else
  \renewcommand\maketitle{%
    \ClassWarningNoLine{bgteubner}{Titlepage switched off for final print}%
%    \end{macrocode}
% Widmung.
%    \begin{macrocode}
    \ifx\@dedication\@empty \else
      \begin{titlepage}
        \next@tpage\null\vfill
        {\centering \Large \@dedication \par}
        \vskip \z@ \@plus3fill
        \if@twoside \next@tpage\cleardoublepage \fi
      \end{titlepage}
    \fi
    \global\let\maketitle\relax
  }
\fi
%    \end{macrocode}
% \end{macro}
% Layoutparameter ausgeben:
%    \begin{macrocode}
\ifhhcls@entwurf
  \newlength{\hhtmplen}%
  \setlength{\hhtmplen}{0.35145980351\textwidth}%
  \typeout{^^JText width: \strip@pt\hhtmplen mm}%
  \setlength{\hhtmplen}{0.35145980351\textheight}%
  \typeout{Text block: \strip@pt\hhtmplen}%
  \setlength{\hhtmplen}{\headheight}%
  \addtolength{\hhtmplen}{\headsep}%
  \addtolength{\hhtmplen}{\textheight}%
  \setlength{\hhtmplen}{0.35145980351\hhtmplen}%
  \typeout{Total height: \strip@pt\hhtmplen mm}%
  \setlength{\hhtmplen}{0.35145980351\baselineskip}%
  \typeout{Baseline skip: \strip@pt\hhtmplen mm^^J}%
\fi
%    \end{macrocode}
% \begin{macro}{\verboten}
% Verbotene Pakete abfangen:
%    \begin{macrocode}
\newcommand\verboten[1]{%
  \BeforePackage{#1}{%
    \ClassError{bgteubner}{Forbidden package `#1' loaded}{%
      You are not allowed to load the package `#1' because it^^J%
      changes the layout. This error message occurs one line below^^J%
      the line.}}%
}
\verboten{a4wide}
\verboten{a4}
\verboten{a5comb}
\verboten{a5}
\verboten{aeguill}
\verboten{ae}
\verboten{appendix}
\verboten{avantgar}
\verboten{avant}
\verboten{bibgerm}
\verboten{bookman}
\verboten{caption2}
\verboten{caption}
\verboten{chancery}
\verboten{chappg}
\verboten{charter}
\verboten{cmbright}
\verboten{concmath}
\verboten{doublespace}
\verboten{dropcaps}
\verboten{eco}
\verboten{endfloat}
\verboten{epsfig}
\verboten{eulervm}
\verboten{extsizes}
\verboten{fandyhdr}
\verboten{figcaps}
\verboten{floatfig}
\verboten{floatflt}
\verboten{fltpage}
\verboten{french}
\verboten{geometry}
\verboten{geomsty}
\verboten{german}
\verboten{graphics}
\verboten{hangcaption}
\verboten{hangftn}
\verboten{hanging}
\verboten{helvetic}
\verboten{here}
\verboten{hvmath}
%\verboten{hyperref}
\verboten{indentfirst}
\verboten{initials}
\verboten{landscape}
\verboten{lmodern}
\verboten{lucidabr}
\verboten{lucidaso}
\verboten{mathptm}
\verboten{mathsans}
\verboten{mathtime}
\verboten{ncntrsbk}
\verboten{newcent}
\verboten{ngerman}
\verboten{palatcm}
\verboten{palatino}
\verboten{sansmath}
\verboten{sectsty}
\verboten{times}
\verboten{titlesec}
\verboten{utopia}
\verboten{zapfchan}
\verboten{zefonts}
%    \end{macrocode}
% \end{macro}
% \iffalse
%</class>
% \fi
%
% \section{Indexstil}
%
% \iffalse
%<*idxstyle>
% \fi
%
% Quote-Zeichen ge�ndert f�r deutsche Unterst�tzung
%    \begin{macrocode}
quote '>'
%    \end{macrocode}
% Umgebung aufrufen
%    \begin{macrocode}
preamble   "\\begin{theindex}\n\\hhclsiscorrectindextrue\n"
postamble  "\n\n\\end{theindex}\n"
%    \end{macrocode}
% Buchstaben einf�gen
%    \begin{macrocode}
heading_prefix "\\textbf{"
heading_suffix "}\\nopagebreak\n"
symhead_positive "Symbole"
numhead_positive "Zahlen"
headings_flag   1
%    \end{macrocode}
% \iffalse
%</idxstyle>
% \fi
%
% \section{Glossarystile}
%
% \iffalse
%<*glostyle1>
% \fi
%
% \subsection{Ohne trennende Buchstaben}
%
% Quote-Zeichen ge�ndert f�r deutsche Unterst�tzung.
%    \begin{macrocode}
quote '>'
%    \end{macrocode}
% Schl�sselw�rter in der Eingabedatei.
%    \begin{macrocode}
keyword    "\\glossaryentry"
%    \end{macrocode}
% |theglossary|"=Umgebung statt |theindex|"=Umgebung verwenden.
%    \begin{macrocode}
preamble   "\\begin{theglossary}\n\\hhclsiscorrectglossarytrue\n"
postamble  "\n\n\\end{theglossary}\n"
group_skip "\n"
%    \end{macrocode}
% Keine Kommata vor und zwischen den Zahlen.
%    \begin{macrocode}
delim_0    ""
delim_1    ""
delim_2    ""
delim_n    "\\glossarypagedelim"
delim_r    "\\glossarypagerange"
%    \end{macrocode}
% Die �ffnende Klammer anf�gen. Die schlie�ende wird von \LaTeX\ erzeugt.
%    \begin{macrocode}
item_0 "\n \\item ["
%    \end{macrocode}
%
% \iffalse
%</glostyle1>
% \fi
%
% \iffalse
%<*glostyle2>
% \fi
%
% \subsection{Ohne trennende Buchstaben}
%
% Quote-Zeichen ge�ndert f�r deutsche Unterst�tzung.
%    \begin{macrocode}
quote '>'
%    \end{macrocode}
% Buchstaben einf�gen
%    \begin{macrocode}
heading_prefix "\\glossarynewchar{"
heading_suffix "}\n"
symhead_positive "Symbole"
numhead_positive "Zahlen"
headings_flag   1
%    \end{macrocode}
% Schl�sselw�rter in der Eingabedatei.
%    \begin{macrocode}
keyword    "\\glossaryentry"
%    \end{macrocode}
% |theglossary|"=Umgebung statt |theindex|"=Umgebung verwenden.
%    \begin{macrocode}
preamble   "\\begin{theglossary}\n\\hhclsiscorrectglossarytrue\n"
postamble  "\n\n\\end{theglossary}\n"
group_skip "\n"
%    \end{macrocode}
% Keine Kommata vor und zwischen den Zahlen.
%    \begin{macrocode}
delim_0    ""
delim_1    ""
delim_2    ""
delim_n    "\\glossarypagedelim"
delim_r    "\\glossarypagerange"
%    \end{macrocode}
% Die �ffnende Klammer anf�gen. Die schlie�ende wird von \LaTeX\ erzeugt.
%    \begin{macrocode}
item_0 "\n \\item ["
%    \end{macrocode}
%
% \iffalse
%</glostyle2>
% \fi
%
%
% \section{Bib\TeX"=Stil}
%
% Eintr�ge.
%    \begin{macrocode}
%<*bibstyle>
ENTRY
  { address
    author
    booktitle
    chapter
    edition
    editor
    howpublished
    institution
    isbn
    issn
    journal
    key
    language
    month
    note
    number
    organization
    pages
    publisher
    school
    series
    title
    type
    url
    volume
    year
  }
  {}
  { label }

%    \end{macrocode}
% Variablen definieren.
%    \begin{macrocode}
INTEGERS
  { output.state
    before.all
    mid.sentence
    after.sentence
    after.block
    before.title
  }
STRINGS
  { s
    t
    language.state
    change.temp
  }
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {init.state.consts}
{ #0 'before.all :=
  #1 'mid.sentence :=
  #2 'after.sentence :=
  #3 'after.block :=
  #4 'before.title :=
  "nostate" 'language.state :=
}
%    \end{macrocode}
% Logische Nicht"=Funktion.
%    \begin{macrocode}
FUNCTION {not}
{   { #0 }
    { #1 }
  if$
}
%    \end{macrocode}
% Logische Und"=Funktion.
%    \begin{macrocode}
FUNCTION {and}
{   'skip$
    { pop$ #0 }
  if$
}
%    \end{macrocode}
% Logische Oder"=Funktion
%    \begin{macrocode}
FUNCTION {or}
{   { pop$ #1 }
    'skip$
  if$
}
%    \end{macrocode}
% Schreibt den zweiten Stackwert einmal mit ver�nderter Gro�"= und
% Kleinschreibung und einmal mit Originalschreibung hinter den Befehl
% \cs{btxifchangecase}.
% \LaTeX\ entscheiden dann, welche Version verwendet werden so..
%    \begin{macrocode}
FUNCTION {language.change.case}
{ 
  'change.temp :=
  't :=
  "\btxifchangecase {"
  t change.temp change.case$ *
  "}{" *
  t *
  "}" *
}
%    \end{macrocode}
% Ausgabefunktion.
%    \begin{macrocode}
FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
    { ", " * write$ }
    { output.state after.block =
        { add.period$ write$
          newline$
          "\newblock " write$
        }
        { output.state before.all =
            'write$
            {
              output.state before.title =
                { "\btxauthorcolon\ " * write$ }
                { add.period$ " " * write$ }
              if$
            }
          if$
        }
      if$
      mid.sentence 'output.state :=
    }
  if$
  s
}
%    \end{macrocode}
% Noch eine Ausgabefunktion.
%    \begin{macrocode}
FUNCTION {output}
{ duplicate$ empty$
    'pop$
    'output.nonnull
  if$
}
%    \end{macrocode}
% Gibt eine Warnung bei leerem Argument aus und schreibt den Inhalt
% sonst.
%    \begin{macrocode}
FUNCTION {output.check}
{ 't :=
  duplicate$ empty$
    { pop$ "empty " t * " in " * cite$ * warning$ }
    'output.nonnull
  if$
}
%    \end{macrocode}
% Ausgabe eines Literatuverweises.
% Zun�chst wird die Sprache auf die angegebene Sprache gesetzt, dann
% der \cs{bibitem} gesetzt.
%    \begin{macrocode}
FUNCTION {output.bibitem}
{ newline$
  language empty$
    { "empty language in " cite$ * warning$ }
    { language.state language =
        'skip$
        { "\btxselectlanguage {" language * "}" * write$
          newline$
        }
      if$
      language 'language.state :=
    }
  if$
  "\bibitem{" write$
  cite$ write$
  "}" write$
  newline$
  ""
  before.all 'output.state :=
}
%    \end{macrocode}
% Ende des Eintrags.
%    \begin{macrocode}
FUNCTION {fin.entry}
{ add.period$
  write$
  newline$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {new.block}
{ output.state before.all =
    'skip$
    { after.block 'output.state := }
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {new.sentence}
{ output.state after.block =
    'skip$
    { output.state before.all =
        'skip$
        { after.sentence 'output.state := }
      if$
    }
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {after.authors}
{ output.state before.all =
    'skip$
    { before.title 'output.state := }
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {new.block.checka}
{ empty$
    'skip$
    'new.block
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {new.block.checkb}
{ empty$
  swap$ empty$
  and
    'skip$
    'new.block
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {new.block.checkc}
{ empty$
  swap$ empty$
  and
    'skip$
    'after.authors
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {new.sentence.checka}
{ empty$
    'skip$
    'new.sentence
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {new.sentence.checkb}
{ empty$
  swap$ empty$
  and
    'skip$
    'new.sentence
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {field.or.null}
{ duplicate$ empty$
    { pop$ "" }
    'skip$
  if$
}
%    \end{macrocode}
% Formatier den Stackinhalt mit \cs{btxnamefont}.
%    \begin{macrocode}
FUNCTION {namefont}
{ duplicate$ empty$
    { pop$ "" }
    { "\btxnamefont {" swap$ * "}" * }
  if$
}
%    \end{macrocode}
% Formatier den Stackinhalt mit \cs{btxlastnamefont}.
%    \begin{macrocode}
FUNCTION {lastnamefont}
{ duplicate$ empty$
    { pop$ "" }
    { "\btxlastnamefont {" swap$ * "}" * }
  if$
}
%    \end{macrocode}
% Formatier den Stackinhalt mit \cs{btxtitlefont}.
%    \begin{macrocode}
FUNCTION {titlefont}
{ duplicate$ empty$
    { pop$ "" }
    { "\btxtitlefont {" swap$ * "}" * }
  if$
}
%    \end{macrocode}
% Formatier den Stackinhalt mit \cs{btxjournalfont}.
%    \begin{macrocode}
FUNCTION {journalfont}
{ duplicate$ empty$
    { pop$ "" }
    { "\btxjournalfont {" swap$ * "}" * }
  if$
}
%    \end{macrocode}
% Formatier den Stackinhalt mit \cs{btxvolumefont}.
%    \begin{macrocode}
FUNCTION {volumefont}
{ duplicate$ empty$
    { pop$ "" }
    { "\btxvolumefont {" swap$ * "}" * }
  if$
}
%    \end{macrocode}
% Formatier den Stackinhalt mit \cs{btxetalfont}.
%    \begin{macrocode}
FUNCTION {etalfont}
{ duplicate$ empty$
    { pop$ "" }
    { "\btxetalfont {" swap$ * "}" * }
  if$
}
%    \end{macrocode}
% Neue Variablen definieren.
%    \begin{macrocode}
INTEGERS { nameptr namesleft numnames }
%    \end{macrocode}
% Namen (Autoren, Herausgeber) formatieren.
%    \begin{macrocode}
FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { nameptr #1 >
      {
%</bibstyle>
%    \end{macrocode}
% \changes{1.13}{2003/12/16}{Second Bib style with different name format}%
% \changes{1.14}{2003/12/17}{New abbreviated Bib styles}%
%    \begin{macrocode}
%<*bibstyle&long&names1>
        s nameptr "{ff~}{vv~}" format.name$
        s nameptr "{ll}" format.name$ lastnamefont *
        s nameptr "{, jj}" format.name$ * 't :=
%</bibstyle&long&names1>
%<*bibstyle&long&names2>
        s nameptr "{ll}" format.name$ lastnamefont
        s nameptr "{, jj}{, ff}{~vv}" format.name$ * 't :=
%</bibstyle&long&names2>
%<*bibstyle&long&names3>
        s nameptr "{f{.\,}.~}{vv~}" format.name$
        s nameptr "{ll}" format.name$ lastnamefont *
        s nameptr "{, jj}" format.name$ * 't :=
%</bibstyle&long&names3>
%<*bibstyle&short&names1>
        s nameptr "{f{.\,}.~}{vv~}" format.name$
        s nameptr "{ll}" format.name$ lastnamefont * 
        s nameptr "{, jj}" format.name$ * 't :=
%</bibstyle&short&names1>
%<*bibstyle&short&names2>
        s nameptr "{ll}" format.name$ lastnamefont
        s nameptr "{,~jj}{,~f{.\,}.}{~vv}" format.name$ * 't :=
%</bibstyle&short&names2>
%<*bibstyle>
          namesleft #1 >
            { ", " * t namefont * }
            { numnames #2 >
                { "\btxandcomma {}" * }
                'skip$
              if$
              s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ "others" =
                { " " "\btxetalshort {.}" etalfont * * }
                { " \btxandlong {}\ " * t namefont * }
              if$
            }
          if$
        }
        {
%</bibstyle>
%<*bibstyle&long&names3>
          s nameptr "{f{.\,}.~}{vv~}" format.name$
          s nameptr "{ll}" format.name$ lastnamefont *
          s nameptr "{, jj}" format.name$ * namefont
%</bibstyle&long&names3>
%<*bibstyle&long&!names3>
          s nameptr "{ll}" format.name$ lastnamefont
          s nameptr "{,~jj}{, ff}{~vv}" format.name$ * namefont
%</bibstyle&long&!names3>
%<*bibstyle&short>
          s nameptr "{ll}" format.name$ lastnamefont
          s nameptr "{,~jj}{,~f{.\,}.}{~vv}" format.name$ * namefont
%</bibstyle&short>
%<*bibstyle>
        }
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}
%    \end{macrocode}
% Autoren formatieren.
%    \begin{macrocode}
FUNCTION {format.authors}
{ author empty$
    { "" }
    { author format.names }
  if$
}
%    \end{macrocode}
% Herausgeber formatieren.
%    \begin{macrocode}
FUNCTION {format.editors}
{ editor empty$
    { "" }
    { editor format.names
      editor num.names$ #1 >
%</bibstyle>
%<bibstyle&long>        { "\ (\btxeditorslong {})" * }
%<bibstyle&long>        { "\ (\btxeditorlong {})" * }
%<bibstyle&short>        { "\ (\btxeditorsshort {.})" * }
%<bibstyle&short>        { "\ (\btxeditorshort {.})" * }
%<*bibstyle>
      if$
    }
  if$
}
%    \end{macrocode}
% Titel formatieren.
%    \begin{macrocode}
FUNCTION {format.title}
{ title empty$
    { "" }
    { title "t" language.change.case titlefont }
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {n.dashify}
{ 't :=
  ""
    { t empty$ not }
    { t #1 #1 substring$ "-" =
        { t #1 #2 substring$ "--" = not
            { "--" *
              t #2 global.max$ substring$ 't :=
            }
            {   { t #1 #1 substring$ "-" = }
                { "-" *
                  t #2 global.max$ substring$ 't :=
                }
              while$
            }
          if$
        }
        { t #1 #1 substring$ *
          t #2 global.max$ substring$ 't :=
        }
      if$
    }
  while$
}
%    \end{macrocode}
% Datum formatieren.
%    \begin{macrocode}
FUNCTION {format.date}
{ year empty$
    { month empty$
        { "" }
        { "there's a month but no year in " cite$ * warning$
          month
        }
      if$
    }
    { month empty$
        'year
        { month "\ " * year * }
      if$
    }
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.btitle}
{ title titlefont
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {tie.or.space.connect}
{ duplicate$ text.length$ #3 <
    { "~" }
    { "\ " }
  if$
  swap$ * *
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {volume.tie.or.space.connect}
{ duplicate$ text.length$ #3 <
    { "~" }
    { "\ " }
  if$
  swap$ volumefont * *
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {either.or.check}
{ empty$
    'pop$
    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.bvolume}
{ volume empty$
    { "" }
    { output.state after.block =
%</bibstyle>
%<bibstyle&long>        { "\Btxvolumelong {}" }
%<bibstyle&long>        { "\btxvolumelong {}" }
%<bibstyle&short>        { "\Btxvolumeshort {.}" }
%<bibstyle&short>        { "\btxvolumeshort {.}" }
%<*bibstyle>
      if$
      volume volume.tie.or.space.connect
      series empty$
        'skip$
%</bibstyle>
%<bibstyle&long>        { " \btxofserieslong {}\ " * series titlefont * }
%<bibstyle&short>        { " \btxofseriesshort {.}\ " * series titlefont * }
%<*bibstyle>
      if$
      "volume and number" number either.or.check
    }
  if$
}
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.number.series}
{ volume empty$
    { number empty$
        { series field.or.null }
        { output.state mid.sentence =
%</bibstyle>
%<bibstyle&long>            { "\btxnumberlong {}" }
%<bibstyle&long>            { "\Btxnumberlong {}" }
%<bibstyle&short>            { "\btxnumbershort {.}" }
%<bibstyle&short>            { "\Btxnumbershort {.}" }
%<*bibstyle>
          if$
          number tie.or.space.connect
          series empty$
            { "there's a number but no series in " cite$ * warning$ }
%</bibstyle>
%<bibstyle&long>            { " \btxinserieslong {}\ " * series titlefont * }
%<bibstyle&short>            { " \btxinseriesshort {.}\ " * series titlefont * }
%<*bibstyle>
          if$
        }
      if$
    }
    { "" }
  if$
}
%    \end{macrocode}
% Auf"|lage formatieren.
%    \begin{macrocode}
FUNCTION {format.edition}
{ edition empty$
    { "" }
    { 
      output.state mid.sentence =
%</bibstyle>
%<bibstyle&long>        { edition "l" language.change.case "~\btxeditionlong {}" * }
%<bibstyle&long>        { edition "t" language.change.case "~\btxeditionlong {}" * }
%<bibstyle&short>        { edition "l" language.change.case "~\btxeditionshort {.}" * }
%<bibstyle&short>        { edition "t" language.change.case "~\btxeditionshort {.}" * }
%<*bibstyle>
      if$
    }
  if$
}
%    \end{macrocode}
% ISBN formatieren
%    \begin{macrocode}
FUNCTION {format.isbn}
{ isbn empty$
    { "" }
    { "\btxISBN~\btxISBNfont {" isbn * "}" * }
  if$
}
%    \end{macrocode}
% ISSN formatieren.
%    \begin{macrocode}
FUNCTION {format.issn}
{ issn empty$
    { "" }
    { "\btxISSN~\btxISSNfont {" issn * "}" * }
  if$
}
%    \end{macrocode}
% Url formatieren.
%    \begin{macrocode}
FUNCTION {format.url}
{ url empty$
    { "" }
    { "\btxurlfont {" url * "}" * }
  if$
}
%    \end{macrocode}
% Noch eine Variable.
%    \begin{macrocode}
INTEGERS { multiresult }
%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {multi.page.check}
{ 't :=
  #0 'multiresult :=
    { multiresult not
      t empty$ not
      and
    }
    { t #1 #1 substring$
      duplicate$ "-" =
      swap$ duplicate$ "," =
      swap$ "+" =
      or or
        { #1 'multiresult := }
        { t #2 global.max$ substring$ 't := }
      if$
    }
  while$
  multiresult
}
%    \end{macrocode}
% Seitenzahlen formatieren.
%    \begin{macrocode}
FUNCTION {format.pages}
{ pages empty$
    { "" }
    { pages multi.page.check
%</bibstyle>
%<bibstyle&long>        { "\btxpageslong {}" pages n.dashify tie.or.space.connect }
%<bibstyle&long>        { "\btxpagelong {}" pages tie.or.space.connect }
%<bibstyle&short>        { "\btxpagesshort {.}" pages n.dashify tie.or.space.connect }
%<bibstyle&short>        { "\btxpageshort {.}" pages tie.or.space.connect }
%<*bibstyle>
      if$
    }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.vol.num.pages}
{ volume field.or.null
  number empty$
    'skip$
    { "(" number * ")" * *
      volume empty$
        { "there's a number but no volume in " cite$ * warning$ }
        'skip$
      if$
    }
  if$
  pages empty$
    'skip$
    { duplicate$ empty$
        { pop$ format.pages }
        { ":" * pages n.dashify * }
      if$
    }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.chapter.pages}
{ chapter empty$
    'format.pages
    { type empty$
%</bibstyle>
%<bibstyle&long>        { "\btxchapterlong {}" }
%<bibstyle&short>        { "\btxchaptershort {.}" }
%<*bibstyle>
        { type "l" language.change.case }
      if$
      chapter tie.or.space.connect
      pages empty$
        'skip$
        { ", " * format.pages * }
      if$
    }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
    { "" }
    { editor empty$
%</bibstyle>
%<bibstyle&long>        { "\Btxinlong {}\ " booktitle titlefont * }
%<bibstyle&long>        { "\Btxinlong {}\ " format.editors * ": " * booktitle titlefont * }
%<bibstyle&short>        { "\Btxinshort {.}\ " booktitle titlefont * }
%<bibstyle&short>        { "\Btxinshort {.}\ " format.editors * ": " * booktitle titlefont * }
%<*bibstyle>
      if$
    }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {empty.misc.check}
{ author empty$ title empty$ howpublished empty$
  month empty$ year empty$ note empty$
  and and and and and
  key empty$ not and
    { "all relevant fields are empty in " cite$ * warning$ }
    'skip$
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.thesis.type}
{ type empty$
    'skip$
    { pop$
      type "t" language.change.case
    }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.tr.number}
{
  number empty$
  {
    type empty$
%</bibstyle>
%<bibstyle&long>      { "\btxtechreplong {}" }
%<bibstyle&short>      { "\btxtechrepshort {.}" }
%<*bibstyle>
      { type "t" language.change.case }
    if$
  }
  {
    type empty$
%</bibstyle>
%<bibstyle&long>      { "\Btxtechreplong {}" }
%<bibstyle&short>      { "\Btxtechrepshort {.}" }
%<*bibstyle>
      { type "t" language.change.case }
    if$
    number tie.or.space.connect
  }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.article.crossref}
{ key empty$
    { journal empty$
        { "need key or journal for " cite$ * " to crossref " * crossref *
          warning$
          ""
        }
%</bibstyle>
%<bibstyle&long>        { "\Btxinlong {}\ " journal titlefont * }
%<bibstyle&short>        { "\Btxinshort {.}\ " journal titlefont * }
%<*bibstyle>
      if$
    }
%</bibstyle>
%<bibstyle&long>    { "\Btxinlong {}\ " key titlefont * }
%<bibstyle&short>    { "\Btxinshort {.}\ " key titlefont * }
%<*bibstyle>
  if$
  " \cite{" * crossref * "}" *
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.crossref.editor}
%</bibstyle>
%<bibstyle&long&names1>{ editor #1 "{ff~}{vv~}{ll}{, jj}" format.name$ namefont
%<bibstyle&long&names2>{ editor #1 "{ll}{, jj}{, ff}{~vv}" format.name$ namefont
%<bibstyle&long&names3>{ editor #1 "{f{.\,}.~}{vv~}{ll}{, jj}" format.name$ namefont
%<bibstyle&short&names1>{ editor #1 "{f.~}{vv~}{ll}{, jj}" format.name$ namefont
%<bibstyle&short&names2>{ editor #1 "{ll}{, jj}{, f.}{~vv}" format.name$ namefont
%<*bibstyle>
  editor num.names$ duplicate$
  #2 >
    { pop$ " " "\btxetalshort {.}" etalfont * * }
    { #2 <
        'skip$
        { editor #2 "{ff }{vv~}{ll}{ jj}" format.name$ "others" =
            { " " "\btxetalshort {.}" etalfont * * }
            { " \btxandlong {}\ " * editor #2 
%</bibstyle>
%<bibstyle&long&names1>              "{ff~}{vv~}{ll}{, jj}" format.name$ 
%<bibstyle&long&names2>              "{ll}{, jj}{, ff}{~vv}" format.name$ 
%<bibstyle&long&names3>              "{f{.\,}.~}{vv~}{ll}{, jj}" format.name$ 
%<bibstyle&short&names1>              "{f.~}{vv~}{ll}{, jj}" format.name$ 
%<bibstyle&short&names2>              "{ll}{, jj}{, f.}{~vv}" format.name$ 
%<*bibstyle>
              namefont * }
          if$
        }
      if$
    }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.book.crossref}
{ volume empty$
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
%</bibstyle>
%<*bibstyle&long>
      "\Btxinlong {}\ "
    }
    { "\Btxvolumelong {}" volume volume.tie.or.space.connect
      " \btxofserieslong {}\ " *
%</bibstyle&long>
%<*bibstyle&short>
      "\Btxinshort {.}\ "
    }
    { "\Btxvolumeshort {.}" volume volume.tie.or.space.connect
      " \btxofseriesshort {.}\ " *
%</bibstyle&short>
%<*bibstyle>
    }
  if$
  editor empty$
  editor field.or.null author field.or.null =
  or
    { key empty$
        { series empty$
            { "need editor, key, or series for " cite$ * " to crossref " *
              crossref * warning$
              "" *
            }
            { series titlefont * }
          if$
        }
        { key titlefont * }
      if$
    }
    { format.crossref.editor * }
  if$
  " \cite{" * crossref * "}" *
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {format.incoll.inproc.crossref}
{ editor empty$
  editor field.or.null author field.or.null =
  or
    { key empty$
        { booktitle empty$
            { "need editor, key, or booktitle for " cite$ * " to crossref " *
              crossref * warning$
              ""
            }
%</bibstyle>
%<*bibstyle&long>
            { "\Btxinlong {}\ " booktitle titlefont * }
          if$
        }
        { "\Btxinlong {}\ " key titlefont * }
      if$
    }
    { "\Btxinlong {}\ " format.crossref.editor * }
%</bibstyle&long>
%<*bibstyle&short>
            { "\Btxinshort {.}\ " booktitle titlefont * }
          if$
        }
        { "\Btxinshort {.}\ " key titlefont * }
      if$
    }
    { "\Btxinshort {.}\ " format.crossref.editor * }
%</bibstyle&short>
%<*bibstyle>
  if$
  " \cite{" * crossref * "}" *
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  after.authors
  format.title "title" output.check
  new.block
  crossref missing$
    { journal 
      title missing$
        { titlefont }
        { journalfont }
      if$
      "journal" output.check 
      format.vol.num.pages output
      format.date "year" output.check
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  format.issn output
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {book}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  after.authors
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
      new.block
      format.number.series output
      new.sentence
      publisher "publisher" output.check
      address output
    }
    { new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.date "year" output.check
  format.isbn output
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {booklet}
{ output.bibitem
  format.authors output
  after.authors
  format.title "title" output.check
  howpublished address new.block.checkb
  howpublished output
  address output
  format.date output
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {inbook}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  after.authors
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
      format.chapter.pages "chapter and pages" output.check
      new.block
      format.number.series output
      new.sentence
      publisher "publisher" output.check
      address output
    }
    { format.chapter.pages "chapter and pages" output.check
      new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.date "year" output.check
  format.isbn output
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {incollection}
{ output.bibitem
  format.authors "author" output.check
  after.authors
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      format.chapter.pages output
      new.sentence
      publisher "publisher" output.check
      address output
      format.edition output
      format.date "year" output.check
    }
    { format.incoll.inproc.crossref output.nonnull
      format.chapter.pages output
    }
  if$
  format.isbn output
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  after.authors
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      format.pages output
      address empty$
        { organization publisher new.sentence.checkb
          organization output
          publisher output
          format.date "year" output.check
        }
        { address output.nonnull
          format.date "year" output.check
          new.sentence
          organization output
          publisher output
        }
      if$
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  format.isbn output
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {conference} { inproceedings }

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {manual}
{ output.bibitem
  author empty$
    { organization empty$
        'skip$
        { organization output.nonnull
          address output
        }
      if$
    }
    { format.authors output.nonnull }
  if$
  after.authors
  format.btitle "title" output.check
  author empty$
    { organization empty$
        { address new.block.checka
          address output
        }
        'skip$
      if$
    }
    { organization address new.block.checkb
      organization output
      address output
    }
  if$
  format.edition output
  format.date output
  format.isbn output
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {mastersthesis}
{ output.bibitem
  format.authors "author" output.check
  after.authors
  format.title "title" output.check
  new.block
  "\btxmastthesis {}" format.thesis.type output.nonnull
  school "school" output.check
  address output
  format.date "year" output.check
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {misc}
{ output.bibitem
  format.authors output
  title howpublished new.block.checkc
  format.title output
  howpublished new.block.checka
  howpublished output
  format.date output
  format.isbn output
  format.issn output
  new.block
  format.url output
  note output
  fin.entry
  empty.misc.check
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {phdthesis}
{ output.bibitem
  format.authors "author" output.check
  after.authors
  format.btitle "title" output.check
  new.block
  "\btxphdthesis {}" format.thesis.type output.nonnull
  school "school" output.check
  address output
  format.date "year" output.check
  format.isbn output
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {proceedings}
{ output.bibitem
  editor empty$
    { organization output }
    { format.editors output.nonnull }
  if$
  after.authors
  format.btitle "title" output.check
  format.bvolume output
  format.number.series output
  address empty$
    { editor empty$
        { publisher new.sentence.checka }
        { organization publisher new.sentence.checkb
          organization output
        }
      if$
      publisher output
      format.date "year" output.check
    }
    { address output.nonnull
      format.date "year" output.check
      new.sentence
      editor empty$
        'skip$
        { organization output }
      if$
      publisher output
    }
  if$
  format.isbn output
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {techreport}
{ output.bibitem
  format.authors "author" output.check
  after.authors
  format.title "title" output.check
  new.block
  format.tr.number output.nonnull
  institution "institution" output.check
  address output
  format.date "year" output.check
  format.isbn output
  new.block
  format.url output
  note output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {unpublished}
{ output.bibitem
  format.authors "author" output.check
  after.authors
  format.title "title" output.check
  new.block
  format.url output
  note "note" output.check
  format.date output
  fin.entry
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {default.type} { misc }

%    \end{macrocode}
% Monate sollen ausgeschrieben werden.
%    \begin{macrocode}
%</bibstyle>
%<*bibstyle&long>
MACRO {jan} {"\btxmonjanlong {}"}
MACRO {feb} {"\btxmonfeblong {}"}
MACRO {mar} {"\btxmonmarlong {}"}
MACRO {apr} {"\btxmonaprlong {}"}
MACRO {may} {"\btxmonmaylong {}"}
MACRO {jun} {"\btxmonjunlong {}"}
MACRO {jul} {"\btxmonjullong {}"}
MACRO {aug} {"\btxmonauglong {}"}
MACRO {sep} {"\btxmonseplong {}"}
MACRO {oct} {"\btxmonoctlong {}"}
MACRO {nov} {"\btxmonnovlong {}"}
MACRO {dec} {"\btxmondeclong {}"}
%</bibstyle&long>
%<*bibstyle&short>
MACRO {jan} {"\btxmonjanshort {.}"}
MACRO {feb} {"\btxmonfebshort {.}"}
MACRO {mar} {"\btxmonmarshort {.}"}
MACRO {apr} {"\btxmonaprshort {.}"}
MACRO {may} {"\btxmonmayshort {.}"}
MACRO {jun} {"\btxmonjunshort {.}"}
MACRO {jul} {"\btxmonjulshort {.}"}
MACRO {aug} {"\btxmonaugshort {.}"}
MACRO {sep} {"\btxmonsepshort {.}"}
MACRO {oct} {"\btxmonoctshort {.}"}
MACRO {nov} {"\btxmonnovshort {.}"}
MACRO {dec} {"\btxmondecshort {.}"}
%</bibstyle&short>
%<*bibstyle>
%    \end{macrocode}
% Zeitschriften.
%    \begin{macrocode}
MACRO {acmcs} {"ACM Computing Surveys"}
MACRO {acta} {"Acta Informatica"}
MACRO {cacm} {"Communications of the ACM"}
MACRO {ibmjrd} {"IBM Journal of Research and Development"}
MACRO {ibmsj} {"IBM Systems Journal"}
MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
MACRO {ieeetc} {"IEEE Transactions on Computers"}
MACRO {ieeetcad}
 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
MACRO {ipl} {"Information Processing Letters"}
MACRO {jacm} {"Journal of the ACM"}
MACRO {jcss} {"Journal of Computer and System Sciences"}
MACRO {scp} {"Science of Computer Programming"}
MACRO {sicomp} {"SIAM Journal on Computing"}
MACRO {tocs} {"ACM Transactions on Computer Systems"}
MACRO {tods} {"ACM Transactions on Database Systems"}
MACRO {tog} {"ACM Transactions on Graphics"}
MACRO {toms} {"ACM Transactions on Mathematical Software"}
MACRO {toois} {"ACM Transactions on Office Information Systems"}
MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
MACRO {tcs} {"Theoretical Computer Science"}

%    \end{macrocode}
%
%    \begin{macrocode}
READ

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {sortify}
{ purify$
  "l" change.case$
}

%    \end{macrocode}
%
%    \begin{macrocode}
INTEGERS { len }

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {chop.word}
{ 's :=
  'len :=
  s #1 len substring$ =
    { s len #1 + global.max$ substring$ }
    's
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {sort.format.names}
{ 's :=
  #1 'nameptr :=
  ""
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { nameptr #1 >
        { "   " * }
        'skip$
      if$
%</bibstyle>
%<bibstyle&long>      s nameptr "{ll{ }}{  ff{ }}{vv{ } }{  jj{ }}" format.name$ 't :=
%<bibstyle&short>      s nameptr "{ll{ }}{  f{ }}{vv{ } }{  jj{ }}" format.name$ 't :=
%<*bibstyle>
      nameptr numnames = t "others" = and
        { "et al" * }
        { t sortify * }
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {sort.format.title}
{ 't :=
  "A " #2
    "An " #3
      "The " #4 t chop.word
    chop.word
  chop.word
  sortify
  #1 global.max$ substring$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {author.sort}
{ author empty$
    { key empty$
        { "to sort, need author or key in " cite$ * warning$
          ""
        }
        { key sortify }
      if$
    }
    { author sort.format.names }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {author.editor.sort}
{ author empty$
    { editor empty$
        { key empty$
            { "to sort, need author, editor, or key in " cite$ * warning$
              ""
            }
            { key sortify }
          if$
        }
        { editor sort.format.names }
      if$
    }
    { author sort.format.names }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {author.organization.sort}
{ author empty$
    { organization empty$
        { key empty$
            { "to sort, need author, organization, or key in " cite$ * warning$
              ""
            }
            { key sortify }
          if$
        }
        { "The " #4 organization chop.word sortify }
      if$
    }
    { author sort.format.names }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {editor.organization.sort}
{ editor empty$
    { organization empty$
        { key empty$
            { "to sort, need editor, organization, or key in " cite$ * warning$
              ""
            }
            { key sortify }
          if$
        }
        { "The " #4 organization chop.word sortify }
      if$
    }
    { editor sort.format.names }
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {presort}
{ type$ "book" =
  type$ "inbook" =
  or
    'author.editor.sort
    { type$ "proceedings" =
        'editor.organization.sort
        { type$ "manual" =
            'author.organization.sort
            'author.sort
          if$
        }
      if$
    }
  if$
  "    "
  *
  year field.or.null sortify
  *
  "    "
  *
  title field.or.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}

%    \end{macrocode}
%
%    \begin{macrocode}
ITERATE {presort}

%    \end{macrocode}
%
%    \begin{macrocode}
SORT

%    \end{macrocode}
%
%    \begin{macrocode}
STRINGS { longest.label }

%    \end{macrocode}
%
%    \begin{macrocode}
INTEGERS { number.label longest.label.width }

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {initialize.longest.label}
{ "" 'longest.label :=
  #1 'number.label :=
  #0 'longest.label.width :=
}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {longest.label.pass}
{ number.label int.to.str$ 'label :=
  number.label #1 + 'number.label :=
  label width$ longest.label.width >
    { label 'longest.label :=
      label width$ 'longest.label.width :=
    }
    'skip$
  if$
}

%    \end{macrocode}
%
%    \begin{macrocode}
EXECUTE {initialize.longest.label}

%    \end{macrocode}
%
%    \begin{macrocode}
ITERATE {longest.label.pass}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {begin.bib}
{ preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  "  \providebibliographyfont{name}{}%" write$ newline$
  "  \providebibliographyfont{lastname}{}%" write$ newline$
  "  \providebibliographyfont{title}{\emph}%" write$ newline$
  "  \providebibliographyfont{etal}{\emph}%" write$ newline$
  "  \providebibliographyfont{journal}{}%" write$ newline$
  "  \providebibliographyfont{volume}{}%" write$ newline$
  "  \providebibliographyfont{ISBN}{\MakeUppercase}%" write$ newline$
  "  \providebibliographyfont{ISSN}{\MakeUppercase}%" write$ newline$
  "  \providebibliographyfont{url}{\url}%" write$ newline$
}

%    \end{macrocode}
%
%    \begin{macrocode}
EXECUTE {begin.bib}

EXECUTE {init.state.consts}

ITERATE {call.type$}

%    \end{macrocode}
%
%    \begin{macrocode}
FUNCTION {end.bib}
{ newline$
  "\end{thebibliography}" write$ newline$
}

EXECUTE {end.bib}
%</bibstyle>
%    \end{macrocode}
%
% \section{Cover der Installations"=CD}
% \changes{1.04}{2003/09/23}{CD"=H�lle in die Hauptdistribution
%   aufgenommen}%
%
%    \begin{macrocode}
%<*cdcover>
\documentclass[ngerman,a4paper,fleqn,10pt,landscape]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[scaled=0.92]{helvet}
\usepackage{courier}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{cd-cover}
\usepackage{relsize}
\usepackage{array}
\usepackage{url}
\usepackage{mdwlist}
\usepackage[textwidth=250mm,textheight=140mm]{geometry}
\usepackage{ragged2e}
\usepackage[num]{isodate}

\makeatletter
\def\GetFileInfo#1{%
  \def\filename{#1}%
  \def\@tempb##1 ##2 ##3\relax##4\relax{%
    \def\filedate{##1}%
    \def\fileversion{##2}%
    \def\fileinfo{##3}}%
  \edef\@tempa{\csname ver@#1\endcsname}%
  \expandafter\@tempb\@tempa\relax? ? \relax\relax}
\makeatother

\GetFileInfo{cdcover.tex}

\setlength{\parindent}{0mm}
\setlength{\parskip}{6pt plus 2pt minus 1pt}

\renewcommand*\familydefault{\sfdefault}

\begin{document}
%\begin{landscape}
\bookletsheet{%
  \RaggedRight
  {\bfseries\Large Zusammenfassung des \textsmaller{CD}"=Inhalts}
  \vspace{5mm}

  \begin{tabular}{@{}>{\ttfamily}l>{\RaggedRight}p{0.7\linewidth}}
    alt/ & Archiv alter Versionen der Dokumentklasse \\
    doc/ & Autorenrichtlinien inklusive Installationsanleitung
    \url{bgteubner.pdf} (Times),
    \url{bgteubner-cm.pdf} (European Computer Modern) und
    Beschreibung der Implementation \url{bgreucls.pdf} \\
    pakete/ & \textsmaller{ZIP}"=Archive der Installationsdateien \\
    source/ & Quelltext der \texttt{bgteubner}"=Dokumentklasse
  \end{tabular}
  \vspace{5mm}

  Lesen Sie vor der Installation und vor dem Schreiben des Buchs bitte
  aufmerksam die Autorenrichtlinien \url{bgteubner.pdf} oder
  \url{bgteubner-cm.pdf} durch.
  }{%
    \begin{center}
      \sffamily\Large
      {\bfseries\Large
        Harald Harders
        \par}%
      \vskip 2.0em
      \par
      {\bfseries\LARGE
        Erstellen von B�chern f�r den Springer Vieweg Verlag mit \LaTeX
        \par}
      \vskip 2.0em
      {\bfseries\Large
        Dokumentklasse, Autorenrichtlinien und Installationsanleitung,
        zus�tzliche Pakete
        \par}
      \vskip 5.0em
      Version \fileversion, \printdateTeX{\filedate}
      \par
      \vskip 2.0em
      Springer Vieweg\quad Stuttgart $\cdot$ Leipzig $\cdot$ Wiesbaden
    \end{center}
}

\backsheet{Erstellen von B�chern f�r den Springer Vieweg Verlag mit \LaTeX
  \qquad\qquad\qquad\quad\small v\fileversion}{%
  \RaggedRight
  {\bfseries
    Harald Harders
    \par}
  \vskip 1em
  {\Large\bfseries Erstellen von B�chern f�r den Springer Vieweg Verlag mit
    \LaTeX
    \par}
  \vskip 3em

  Diese \textsmaller{CD} enth�lt die Dokumentklasse
  \url{bgteubner.cls} sowie die Autorenrichtlinien inklusive
  Installationsanleitung in zwei Versionen:
  \begin{itemize*}
    \item \url{bgteubner.pdf}: Brotschrift Times,
    \item \url{bgteubner-cm.pdf}: Brotschrift European
      Computer Modern.
  \end{itemize*}
  Au�erdem sind Zusatzpakete enthalten, die in \TeX Live\,8 entweder
  nicht oder nur veraltet enthalten sind.

  Diese \textsmaller{CD} sollte zusammen mit einer 
  \TeX Live"=8"=Installation verwendet werden (daf�r ist eine
  Anleitung enthalten).
  Sie l�uft auch mit anderen Distributionen, wobei dann aber keine
  Anleitung enthalten ist.
  }
%\end{landscape}

\end{document}
%    \end{macrocode}
%
% \iffalse
%</cdcover>
% \fi
% \Finale