summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/bgteubner
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-04-09 17:06:36 +0000
committerKarl Berry <karl@freefriends.org>2012-04-09 17:06:36 +0000
commitd07c8d47209341d677012804bf39382e7201943f (patch)
tree0ed21174f68333bd643c464ab609546510e938fb /Master/texmf-dist/source/latex/bgteubner
parentb2d9bdf22108173c04fbf491122cb81daa8750af (diff)
bgteubner (8apr12)
git-svn-id: svn://tug.org/texlive/trunk@25892 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/bgteubner')
-rw-r--r--Master/texmf-dist/source/latex/bgteubner/bgteucls.dtx6908
-rw-r--r--Master/texmf-dist/source/latex/bgteubner/bgteucls.ins138
-rw-r--r--Master/texmf-dist/source/latex/bgteubner/hhsubfigure.dtx3913
-rw-r--r--Master/texmf-dist/source/latex/bgteubner/hhsubfigure.ins77
4 files changed, 11036 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/bgteubner/bgteucls.dtx b/Master/texmf-dist/source/latex/bgteubner/bgteucls.dtx
new file mode 100644
index 00000000000..fa473b79c1c
--- /dev/null
+++ b/Master/texmf-dist/source/latex/bgteubner/bgteucls.dtx
@@ -0,0 +1,6908 @@
+% \iffalse meta comment
+%
+% bgteubner class bundle
+%
+% bgteucls.dtx
+% Copyright 2003--2012 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 `Teubner
+% 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> [2012/04/07 v2.02 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{4836}
+\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-17x24-times.pdf| bzw.\
+% \verb|bgteubner-17x24-cm.pdf| verfügbar ist, beschrieben.
+% Hier wird nur die Implementierung erläutert.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section*{Copyright (in der englischen Originalformulierung)}
+%
+% Copyright 2003--2012 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 ``Teubner
+% Verlag, Wiesbaden, Germany''.
+% \end{itemize}
+%
+% This program consists of all files listed in |manifest.txt|.
+%
+% \StopEventually{\PrintChanges \PrintIndex}
+%
+% \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-17x24-times.pdf\space\space Times,
+ 17cm x 24cm,}%
+\typeout{\space\space
+ bgteubner-17x24-cm.pdf\space\space\space\space\space European
+ Computer Modern, 17cm x 24cm,}%
+\typeout{\space\space
+ bgteubner-a5-times.pdf\space\space\space\space\space Times, DIN-A 5,}%
+\typeout{\space\space
+ bgteubner-a5-cm.pdf\space\space\space\space\space \space\space\space
+ European Computer Modern, DIN-A 5.}%
+\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{smallheadings}{scrbook}
+% \end{macrocode}
+% Literaturverzeichnis, Stichwortverzeichnis, Abbildungs"= und
+% Tabellenverzeichnis erscheinen im Inhaltsverzeichnis:
+% \begin{macrocode}
+\PassOptionsToClass{bibtotoc,idxtotoc,liststotoc}{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{pointlessnumbers}{scrbook}
+% \end{macrocode}
+% Leere Seiten sollen ganz leer sein, auch keine Seitenzahl:
+% \begin{macrocode}
+\PassOptionsToClass{cleardoubleempty}{scrbook}
+% \end{macrocode}
+% Keine Linie unter dem Kolumnentitel:
+% \begin{macrocode}
+\PassOptionsToClass{headnosepline}{scrbook}
+% \end{macrocode}
+% Kein Präfix vor Kapitelnummern im Anhang:
+% \begin{macrocode}
+\PassOptionsToClass{noappendixprefix}{scrbook}
+% \end{macrocode}
+% Tabellen erhalten Über"= anstatt Unterschriften:
+% \begin{macrocode}
+\PassOptionsToClass{tablecaptionabove}{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{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}[2003/04/22]
+% \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.
+% \begin{macrocode}
+\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}
+\renewcommand*\listoffigures{%
+ \begingroup%
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \else
+ \@restonecolfalse
+ \fi
+ \lof@heading%
+ \small
+ \@parskipfalse\@parskip@indent%
+ \@starttoc{lof}%
+ \if@restonecol\twocolumn\fi
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\listoftables}
+% Verzeichnis der Tabellen (kleinere Schrift):
+% \begin{macrocode}
+\renewcommand*\listoftables{%
+ \begingroup
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \else
+ \@restonecolfalse
+ \fi
+ \lot@heading%
+ \small
+ \@parskipfalse\@parskip@indent%
+ \@starttoc{lot}%
+ \if@restonecol\twocolumn\fi
+ \endgroup
+}
+% \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}
+%
+% \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}{%
+ \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}
+\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
+}
+% \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}
+% Befehle selbst
+\newcommand\@exercise{\@startsection{@exercise}{1}{\z@}%
+ {-3.5ex \@plus -1ex \@minus -.2ex}%
+ {2.3ex \@plus.2ex}%
+ {\raggedsection\normalfont\sectfont\nobreak\size@section\nobreak}}
+% \end{macrocode}
+% Einträge ins Inhaltsverzeichnis definieren, falls gewünscht:
+% \begin{macrocode}
+\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
+% \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}{\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}{%
+ \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}
+\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
+}
+% \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{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{%
+ \ifpdf
+ \if\@title\@empty\else\pdfinfo{/Title (\@title)}\fi
+ \if\@subtitle\@empty
+ \pdfinfo{/Subject (\@edition. Auflage)}%
+ \else
+ \pdfinfo{/Subject (\@subtitle\space (\@edition. Auflage))}%
+ \fi
+ \ifx\@author\@empty
+ \else
+ \pdfinfo{/Author (\@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 `Teubner
+ % Verlag, Wiesbaden, Germany'.
+ \begingroup
+ \GetFileInfo{bgteubner.cls}%
+ \pdfinfo{/Creator (document class bgteubner.cls for the
+ Springer Vieweg Verlag, Wiesbaden, Germany, by Harald Harders
+ \fileversion)}%
+ \endgroup
+ \pdfinfo{/Keywords (Bild: \thebilderzahl; Tabelle: \thetabellenzahl;
+ Aufgabe: \theaufgabenzahl\hhcls@theoremanzahl)}%
+ \fi
+ \if\@title\@empty
+ \else
+ \immediate\write\hhcls@fileinfo{Titel: \@title}%
+ \fi
+ \if\@subtitle\@empty
+ \else
+ \immediate\write\hhcls@fileinfo{Untertitel: \@subtitle}%
+ \fi
+ \if\@subtitle\@empty
+ \fi
+ \immediate\write\hhcls@fileinfo{\@edition. Auflage}%
+ \ifx\@author\@empty
+ \else
+ \immediate\write\hhcls@fileinfo{Autor(en): \@author}%
+ \fi
+ \immediate\write\hhcls@fileinfo{Bild: \thebilderzahl; Tabelle:
+ \thetabellenzahl; Aufgabe: \theaufgabenzahl\hhcls@theoremanzahl}%
+}
+% \end{macrocode}
+% \begin{macro}{\maketitle}
+% Titel ertellen.
+% \begin{macrocode}
+\ifhhcls@titlepage
+\renewcommand*\maketitle{%
+ \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
+}
+\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-17x24-times.pdf} (Times),
+ \url{bgteubner-17x24-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-17x24-times.pdf} oder
+ \url{bgteubner-17x24-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 Vieweg+Teubner 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
+ Vieweg+Teubner\quad Stuttgart $\cdot$ Leipzig $\cdot$ Wiesbaden
+ \end{center}
+}
+
+\backsheet{Erstellen von Büchern für den Vieweg+Teubner 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 Vieweg+Teubner 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-17x24-times.pdf}: Brotschrift Times,
+ \item \url{bgteubner-17x24-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
diff --git a/Master/texmf-dist/source/latex/bgteubner/bgteucls.ins b/Master/texmf-dist/source/latex/bgteubner/bgteucls.ins
new file mode 100644
index 00000000000..6efdd2e7649
--- /dev/null
+++ b/Master/texmf-dist/source/latex/bgteubner/bgteucls.ins
@@ -0,0 +1,138 @@
+%% bgteubner class bundle
+%%
+%% bgteucls.ins
+%% Copyright 2003--2012 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.
+%
+% This program consists of all files listed in manifest.txt.
+\input docstrip.tex
+\preamble
+
+ bgteubner class bundle
+
+ Copyright 2003--2012 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.
+
+ This program consists of all files listed in manifest.txt.
+
+ harald.harders@gmx.de
+
+\endpreamble
+
+\declarepreamble\clspreamble
+
+ bgteubner class bundle
+
+ Copyright 2003--2012 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 `Teubner
+ Verlag, Wiesbaden, Germany'.
+
+ This program consists of all files listed in manifest.txt.
+
+ harald.harders@gmx.de
+
+\endpreamble
+
+
+\declarepreamble\bstpreamble
+
+ bgteubner class bundle
+
+ Copyright 2003--2012 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.
+
+ This program consists of all files listed in manifest.txt.
+
+ This BibTeX style is intended to be used with the bgteubner
+ document class and the babelbib package. It may work together with
+ other document classes but is unlikely to work without the
+ babelbib package.
+
+ harald.harders@gmx.de
+
+\endpreamble
+
+\declarepreamble\istpreamble
+
+ bgteubner class bundle
+
+ Copyright 2003--2012 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.
+
+ This program consists of all files listed in manifest.txt.
+
+ This Makeindex style file is intended to be used with the bgteubner
+ document class. It may or may not work together with other document
+ classes.
+
+ harald.harders@gmx.de
+
+\endpreamble
+
+
+\askforoverwritefalse
+
+% Files
+%%%%%%%%%%%%%%%%%%%%%%
+\generate{%
+ \file{bgteuversion.tex}{\from{bgteucls.dtx}{version}}%
+ \file{cdcover.tex}{\from{bgteucls.dtx}{cdcover}}%
+ \usepreamble\clspreamble
+ \file{bgteubner.cls}{\from{bgteucls.dtx}{class}}%
+ \usepostamble\empty
+ \usepreamble\istpreamble
+ \file{bgteubner.ist}{\from{bgteucls.dtx}{idxstyle}}%
+ \file{bgteuglo.ist}{\from{bgteucls.dtx}{glostyle1}}%
+ \file{bgteuglochar.ist}{\from{bgteucls.dtx}{glostyle2}}%
+ \usepostamble\empty
+ \usepreamble\bstpreamble
+ \file{bgteupln.bst}{\from{bgteucls.dtx}{bibstyle,long,names1}}%
+ \file{bgteupln2.bst}{\from{bgteucls.dtx}{bibstyle,long,names2}}%
+ \file{bgteupln3.bst}{\from{bgteucls.dtx}{bibstyle,long,names3}}%
+ \file{bgteuabbr.bst}{\from{bgteucls.dtx}{bibstyle,short,names1}}%
+ \file{bgteuabbr2.bst}{\from{bgteucls.dtx}{bibstyle,short,names2}}%
+}
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/bgteubner/hhsubfigure.dtx b/Master/texmf-dist/source/latex/bgteubner/hhsubfigure.dtx
new file mode 100644
index 00000000000..cd39eb59cc3
--- /dev/null
+++ b/Master/texmf-dist/source/latex/bgteubner/hhsubfigure.dtx
@@ -0,0 +1,3913 @@
+% \iffalse % hhsubfigure.dtx
+% Subfigure/subtable macros for use with the LaTeX figure/table environments.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Copyright (C) 2003 Harald Harders.
+%
+% This is a slightly modified version of the `subfigure' package by
+% Steven Douglas Cochran. The origianl package can be downloaded from
+% <ftp://ftp.dante.de/tex-archive/macros/latex/contrib/subfigure/>.
+%
+% The hhsubfigure package is free software; it may be distributed under
+% the conditions of the LaTeX Project Public License, either version 1.1
+% of this license or (at your option) any later version. The latest
+% version of this license is in:
+% http://www.latex-project.org/lppl.txt
+% and version 1.1 or later is part of all distributions of LaTeX version
+% 1999/06/01 or later.
+%
+% The captcont package is distributed in the hope that it will be
+% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% LaTeX Project Public License for more details.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% @LaTeX-style-file{
+%% author = "Steven Douglas Cochran (modified by Harald Harders)",
+%% version = "2.1.4",
+%% date = "2003/09/14",
+%% time = "09:34:13",
+%% filename = "hhsubfigure.sty",
+%% email = "h.harders@tu-bs.de",
+%% codetable = "ISO/ASCII",
+%% keywords = "LaTeX, float, figure, table, captcont",
+%% supported = "yes",
+%% abstract = "LaTeX package for providing support for the
+%% inclusion of small, `sub', figures and tables. It
+%% simplifies the positioning, captioning and
+%% labeling of them within a single figure or table
+%% environment. In addition, this package allows
+%% such subcaptions to be written to the List of
+%% Figures or List of tables if desired."
+%% }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesFile{hhsubfigure.dtx}
+\documentclass{ltxdoc}
+\usepackage[tight,TABTOPCAP]{hhsubfigure}[2002/03/15]
+\setlength\hfuzz{100pt}
+\setlength\vfuzz{100pt}
+\clubpenalty=10000
+\widowpenalty=10000
+\displaywidowpenalty=5000
+\brokenpenalty=5000
+\begin{document}
+ \DocInput{hhsubfigure.dtx}
+\end{document}
+%</driver>
+%
+%<*ltxdoc>
+\AtBeginDocument{
+% \OnlyDescription % comment out for implementation details
+ \EnableCrossrefs
+ \RecordChanges
+ \CodelineIndex}
+\AtEndDocument{
+ \PrintChanges
+ \PrintIndex}
+%</ltxdoc>
+%
+% \fi
+% \catcode`\^=14 ^^A We will use a ^ for a comment rather than ^^A.
+% \newcommand*{\Lopt}[1]{\textsf{#1}} ^ Package options
+% \newcommand*{\Lfile}[1]{\texttt{#1}} ^ File names
+% \newcommand*{\Lpack}[1]{\textsf{#1}} ^ Package names
+% \newcommand*{\Lenv}[1]{\texttt{#1}} ^ Environment names
+% \newcommand*{\Lcount}[1]{\textsl{\small#1}} ^ Counter names
+% \newcommand*{\Lif}[1]{\textsc{\bf#1}} ^ \if names
+% ^ NOTE: Hacks added to make the final format are marked ``^finalhack''.
+%
+% \changes{v1.0}{05 Mar 1986}{Created.}
+%
+% \changes{v1.1}{02 Nov 1988}{Initial revision.}
+%
+% \changes{v1.2}{30 Aug 1989}{Added a separate bottom margin and
+% expanded the comments.}
+%
+% \changes{v1.3}{22 Oct 1990}{Changed test for empty subcaption inside
+% of \cmd{\@subfigure} to compare tokens and not the subcaption vs.\
+% \cmd{\@empty}. The former (incorrect) test caused an error when the
+% first two letters of the subcaption were the same.}
+%
+% \changes{v1.4}{27 Jun 1992}{Added a hack to allow the \cmd{\label}
+% command to be used within the body of the subfigure giving a
+% reference label in the form \cmd{\arabic{thefigure}\thesubfigure}.
+% Added standard file header for style.}
+%
+% \changes{v1.5}{11 Aug 1992}{Fixed a bug which caused a problem with
+% subcaptions that contained expressions like \cmd{\sqrt}; This was
+% pointed out by Tom Scavo (scavo\@cie.uoregon.edu). A separate bug
+% was fixed which caused different sized subcaptions to be misaligned;
+% This problem was pointed out by Simon Marshall
+% (S.Marshal\@Hull.ac.uk). Also cleaned up the code a mite and
+% {\bf changed} the figure spacing so that if no optional section is
+% given, then the figure is only followed by \cmd{\subfigbottomskip}
+% and not that plus $(\cmd{\subfigcapskip}+\cmd{\strut}\hbox{height})$.
+% This should make it easier to adjust spacing as desired.}
+%
+% \changes{v1.6}{13 May 1993}{Changed to use the \cmd{\thefigure}
+% command in building the referenced label. The old form caused a
+% problem when used with the report.sty as pointed out by Andrew
+% Anselmo (anselmo\@cumesb.mech.columbia.edu). Also modified to
+% restrict the scope of the subfigure \cmd{\label} to the body of the
+% subfigure. Added \cmd{\@thesubfigure} to allow a separate labeling
+% of the subfigure in the figure and in the text. By default it is
+% the same as \cmd{\thesubfigure} with space appended. Added some
+% code to print the subfigure captions to the List-of-Figures file
+% if desired. Finally, added the corresponding support for subtables
+% as well as subfigures. NOTE: the optional subcaption is now a moving
+% argument and any fragile commands that appear in the subcaption must
+% be preceded by a \cmd{\protect} (just like that of the \cmd{\caption}
+% command).}
+%
+% \changes{v2.0}{06 Mar 1995}{This version of \cmd{\subfigure} is the
+% first to be ported to \LaTeXe\ (with backward compatibility to
+% \LaTeX2.09). \cmd{\subfigure} and \cmd{\subtable} are now identical
+% and the environment controls internal differences between them. Now,
+% the subcaption setting portion of \cmd{\@subfloat} is broken into the
+% separate commands \cmd{\@makesubfigurecaption} and
+% \cmd{\@makesubtablecaption} to allow a separate hook for the
+% modification of how the subcaption is constructed and to allow the
+% subtable and subfigure captions to be different. In addition, support
+% of the \Lopt{normal}, \Lopt{hang}, \Lopt{center}, \Lopt{centerlast},
+% \Lopt{nooneline}; \Lopt{scriptsize}, \ldots, \Lopt{Large}; \Lopt{up},
+% \Lopt{it}, \Lopt{sl}, \Lopt{sc}, \Lopt{md}, \Lopt{bf}, \Lopt{rm},
+% \Lopt{sf}, and \Lopt{tt} package options were added for compatibility
+% with the caption.sty by H.A. Sommerfeldt.}
+%
+% \changes{v2.1}{23 Jan 2002}{Upgraded to fix a \cmd{\protect} bug that
+% crept in due to changes in \LaTeXe\ and to enhance the interaction
+% with the ``List-of'' files. Backward compatibility with \LaTeX2.09 is
+% \textbf{not} supported. This version allows optional subcaption
+% strings for the ``List-of'' files and the companion captcont.sty
+% allows further extensions. Added check for \Lfile{subfigure.cfg} file
+% for automatic configuration. Added more options for adjustment of the
+% look-and-feel of the subcaption. Added the ability to independently
+% move the float caption and subcaption before or after the figure.
+% Removed extra space from the top of a figure at the top of a page and
+% some accidental whitespace. Reduced the default space around the
+% figure and made it actual skips. Updated the documentation to
+% describe the new changes and to make some points more clear.}
+%
+% \DoNotIndex{\@@@,\@auxout,\@bsphack,\@dottedtocline,\@empty,\@esphack}
+% \DoNotIndex{\@flushglue,\@for,\@gobble,\@ifnextchar,\@ifpackageloaded}
+% \DoNotIndex{\@ifstar,\@ifundefined,\@minipagefalse,\@nameuse,\@ne}
+% \DoNotIndex{\@rightskip,\@tempboxa,\@tempcnta,\@tempdima}
+% \DoNotIndex{\@tempdimb,\@tempskipb,\@xaddvskip,\addcontentsline}
+% \DoNotIndex{\addtolength,\advance,\alph,\arabic,\AtBeginDocument}
+% \DoNotIndex{\AtEndOfPackage,\begingroup,\bfseries,\bgroup,\box}
+% \DoNotIndex{\DeclareOption,\def,\do,\edef,\egroup,\else,\endgroup}
+% \DoNotIndex{\ExecuteOption,\ExecuteOptions,\ext@figure,\ext@table}
+% \DoNotIndex{\familydefault,\fi,\footnotesize,\fontfamily,\fontseries}
+% \DoNotIndex{\fontshape,\gdef,\global,\hbox,\hfil,\hskip,\hss,\if@minipage}
+% \DoNotIndex{\ifcase,\ifdim,\ifnum,\ifx,\ignorespaces,\InputIfFileExists}
+% \DoNotIndex{\itshape,\label,\lastskip,\leftskip,\Large,\large,\leavevmode}
+% \DoNotIndex{\let,\long,\m@ne,\mdseries,\multiply,\NeedsTeXFormat}
+% \DoNotIndex{\newcommand,\newcounter,\newdimen,\newif,\newlabel,\newskip}
+% \DoNotIndex{\noexpand,\normalsize,\numberline,\or,\p@,\par,\parbox}
+% \DoNotIndex{\parfillskip,\parindent,\ProcessOptions,\protect}
+% \DoNotIndex{\protected@write,\protected@edef,\providecommand}
+% \DoNotIndex{\ProvidesPackage,\ref,\refstepcounter,\relax,\renewcommand}
+% \DoNotIndex{\RequirePackage,\rightskip,\rmfamily,\sbox,\scriptsize}
+% \DoNotIndex{\scshape,\selectfont,\seriesdefault,\setbox,\setcounter}
+% \DoNotIndex{\setlength,\sffamily,\shapedefault,\slshape,\small,\space}
+% \DoNotIndex{\string,\strut,\thefigure,\thepage,\thetable,\ttfamily,\tw@}
+% \DoNotIndex{\typeout,\undefined,\upshape,\usebox,\vbox,\vskip,\vspace}
+% \DoNotIndex{\vtop,\wd,\xdef,\z@,\z@skip}
+%
+% \CheckSum{770}%
+% ^ Allow a little more freedom in typesetting floats.
+% \setcounter{topnumber}{8}
+% \def\topfraction{.8}
+% \setcounter{bottomnumber}{8}
+% \def\bottomfraction{.8}
+% \setcounter{totalnumber}{8}
+% \def\textfraction{.2}
+% \def\floatpagefraction{.8}
+% \setcounter{dbltopnumber}{8}
+% \def\dbltopfraction{.8}
+% \def\dblfloatpagefraction{.8}
+%
+% ^ Add some space above any footnotes.
+% \skip\footins=1.5\baselineskip
+%
+% \makeatletter
+%
+% ^ Remove some space above minipage footnotes.
+% \skip\@mpfootins=2.6\p@
+%
+% ^ Define a raggedright for use in tabular's.
+% \newcommand{\rr}{^
+% \@rightskip\@flushglue
+% \rightskip\@rightskip
+% \leftskip\z@
+% \parindent\z@}
+%
+% ^ Turn off any list entries by ``eating'' any \addcontentsline stuff.
+% \newcommand*{\eatthree}[3]{}^
+% \newcommand*{\turnofflistentry}{\let\addcontentsline=\eatthree}
+%
+% ^ Print text (#2) only if reference (r@#1) is defined.
+% \newcommand{\PrintIfDefined}[3]{^
+% \@bsphack
+% \@ifundefined{r@#1}{#3}{#2}^
+% \@esphack}
+%
+% \makeatother
+%
+% \def\docdate{2002/07/02}
+% \def\fileversion{v2.1.4a}
+% \def\filedate{2003/09/14}
+% \def\filename{hhsubfigure.dtx}
+%
+% \title{The \Lpack{hhsubfigure} Package\footnote{This paper documents
+% the \Lpack{hhsubfigure} package \fileversion, last revised \filedate.}}
+% \author{Steven Douglas Cochran\\[5pt]
+% Digital Mapping Laboratory, School of Computer Science \\
+% Carnegie-Mellon University, 5000 Forbes Avenue \\
+% Pittsburgh, PA 15213--3890, USA\\[5pt]
+% \texttt{sdc+@cs.cmu.edu}}
+% \date{\docdate}
+%
+% \maketitle
+%
+% \begin{abstract}
+% \noindent
+% This article documents the \LaTeX\ package `\Lpack{hhsubfigure}', which
+% provides support for the inclusion of small, `sub', figures and
+% tables. It simplifies the positioning, captioning and labeling of
+% such objects within a single \Lenv{figure} or \Lenv{table}
+% environment. In addition, this package allows such subcaptions to be
+% written to a List-of-Figures or List-of-Tables if desired. The
+% `\Lpack{hhsubfigure}' package also cooperates with the `\Lpack{caption}'
+% and `\Lpack{caption2}' packages by H.A. Sommerfeldt
+% \cite{Somm95a,Somm95b}, the `\Lpack{ccaption}' and `\Lpack{tocloft}'
+% packages \cite{Wils01,Wils01B} by Peter Wilson, the `\Lpack{hyperref}'
+% package by Sebastian Rahtz \cite{Raht02}, the `\Lpack{captcont}' package
+% \cite{Coch02}, and should be compatible with all other packages that
+% modify or extend the \Lenv{float} environment or the \cmd{\caption} or
+% \cmd{\label} commands.
+%
+% \end{abstract}
+%
+% \newpage
+% \tableofcontents
+%
+% \newpage
+% \setcounter{lotdepth}{2}^
+% \listoftables
+% \setcounter{lofdepth}{2}^
+% \listoffigures
+%
+% \newpage
+% \section{Introduction}
+% \enlargethispage{24pt}^finalhack
+%
+% This package provides support for the manipulation and reference of
+% small or `sub' figures and tables within a single \Lenv{figure} or
+% \Lenv{table} environment\@.\footnote{Section~\ref{sec:customfloat}
+% describes how to add support for additional \Lenv{float}
+% environments.} It is convenient to use this package when your
+% subfigures are to be separately captioned, referenced, or when such
+% subcaptions are to be included in the List-of-Figures.
+%
+% Before using the \Lpack{hhsubfigure} package, consider the following to
+% see if you really need it. If you simply want to center your figure,
+% then you can use |\centerline|, |\centering| or the \Lenv{center}
+% environment to do so. If your figure has a short width or if you wrap
+% your figure in a |\parbox| or a \Lenv{minipage} of a short width, then
+% you can place multiple figures or tables side-by-side. For example,
+% the following will put two images side-by-side in a single figure as
+% shown in figure~\ref{fig:1figs}:\footnote{You might have to use the
+% optional position arguments `[b]' or `[t]' if the figures are of
+% different heights.}
+%
+% \begin{verbatim}
+% \begin{figure}%
+% \centering
+% \parbox{1.2in}{...figure code...}%
+% \qquad
+% \begin{minipage}{1.2in}%
+% ...figure code...
+% \end{minipage}%
+% \caption{Here are two figures side-by-side.}%
+% \label{fig:1figs}%
+% \end{figure}
+% \end{verbatim}
+% \vspace{-1\baselineskip}
+% \begin{figure}^
+% \abovecaptionskip=6pt^
+% \centering
+% \parbox{1.2in}{^
+% \fboxsep=-\fboxrule
+% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}}^
+% \qquad
+% \begin{minipage}{1.2in}^
+% \fboxsep=-\fboxrule
+% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}^
+% \end{minipage}^
+% \caption{Here are two figures side-by-side.}^
+% \label{fig:1figs}^
+% \vspace{-10pt}
+% \end{figure}
+%
+% \noindent
+% Further, if you place the caption inside the |\parbox| or
+% \Lenv{minipage}, then the width of the caption will be limited to the
+% width of the parbox or minipage as shown in figures~\ref{fig:2figsA}
+% and \ref{fig:2figsB}:
+%
+% \begin{verbatim}
+% \begin{figure}%
+% \centering
+% \parbox{1.2in}{%
+% ...figure code...
+% \caption{First.}%
+% \label{fig:2figsA}}%
+% \qquad
+% \begin{minipage}{1.2in}%
+% ...figure code...
+% \caption{Second.}%
+% \label{fig:2figsB}%
+% \end{minipage}%
+% \end{figure}%
+% \end{verbatim}
+% \vspace{-\baselineskip}
+% \begin{figure}^
+% \abovecaptionskip=2pt^
+% \centering
+% \parbox{1.2in}{^
+% \fboxsep=-\fboxrule
+% \fbox{\hbox to 1.2in{\vbox to 15mm{\vfil\null}\hfil}}^
+% \caption{First.}^
+% \label{fig:2figsA}}^
+% \qquad
+% \begin{minipage}{1.2in}^
+% \fboxsep=-\fboxrule
+% \fbox{\hbox to 1.2in{\vbox to 15mm{\vfil\null}\hfil}}^
+% \caption{Second.}^
+% \label{fig:2figsB}^
+% \end{minipage}^
+% \vspace{-10pt}
+% \end{figure}
+%
+% For more information on typesetting figures and tables, see the
+% document ``Using Imported Graphics in \LaTeXe'' by Keith Reckdahl
+% \cite{Reck97}.
+%
+% \section{The User Interface}
+% \vspace{-5pt}^finalhack
+% \enlargethispage{12pt}^finalhack
+%
+% To use this package place
+% \begin{quote}
+% |\usepackage|\oarg{options}\marg{hhsubfigure}
+% \end{quote}
+% in the preamble of your document. The supported options are shown in
+% table~\ref{tab:options}.
+% \DescribeMacro{\subfigure}
+% \DescribeMacro{\subtable}
+% Within a \Lenv{figure} or \Lenv{table}
+% environment, you can use the following commands to create a subfigure
+% or subtable ``box'' with an optional subcaption underneath.
+% \vspace{-2pt}
+% \begin{quote}
+% |\subfigure|\oarg{list\_entry}\oarg{subcaption}\marg{figure}\\
+% |\subtable|\oarg{list\_entry}\oarg{subcaption}\marg{figure}
+% \end{quote}
+% \vspace{-2pt}
+%
+% \noindent
+% If a subcaption argument is given (including the null subcaption
+% `{\ttfamily [$\;$]}') then the subfigure is labeled with a counter
+% formatted by the command `|\thesubfigure|' which returns, by default,
+% `(a)', `(b)', etc. The counter used for labeling the subfigures is
+% \Lcount{hhsubfigure} and is incremented for each subfigure regardless of
+% whether a subcaption was printed. The internals of the |\subtable|
+% command are symmetric to those of the |\subfigure| command. Further,
+% if a List-of-Figures (or List-of-Tables) is generated, then the
+% \meta{list\_entry} argument controls how the caption text is used
+% there. Table~\ref{tab:calling} shows the possibilities.
+%
+% \changes{v2.1.4}{30 Apr 2002}{Changed the label and caption defaults
+% from \cmd{\rmfamily}\cmd{\mdseries}\cmd{\upshape} to
+% \cmd{\familydefault}\cmd{\seriesdefault} \cmd{\shapedefault}.}
+% \DeleteShortVerb{\|}
+% \begin{table}
+% \def\M#1{\vspace*{#1}}
+% \centering
+% \caption{\Lpack{hhsubfigure} package options.}
+% \label{tab:options}
+% \vspace{8pt}
+% \fbox{\begin{tabular}{|p{0.36\textwidth}|p{0.63\textwidth}|} \hline
+% \multicolumn{1}{|c|}{{\large\bf\strut Option}}
+% & \multicolumn{1}{c|}{{\large\bf Description}}
+% \\ \hline\hline
+% \Lopt{normal} & \rr Provides `normal' subcaptions, this is the
+% default. \\ \hline
+% \raisebox{-1.4ex}{\Lopt{hang}, \Lopt{isu}}
+% & \rr Causes the label to be a hanging
+% indentation to the subcaption paragraph.
+% (\Lopt{isu} is a synonym for \Lopt{hang}.)
+% \\ \hline
+% \raisebox{-1.4ex}{\Lopt{center}}
+% & \rr Causes each line of the paragraph to be
+% separately centered. Overrides
+% \Lopt{centerlast}.\\ \hline
+% \raisebox{-1.4ex}{\Lopt{centerlast}, \Lopt{anne}}
+% & \rr Causes the last line only to be centered.
+% Overrides \Lopt{nooneline}. (\Lopt{anne} is
+% a synonym for \Lopt{centerlast}.) \\ \hline
+% \raisebox{-2.6ex}{\Lopt{nooneline}}
+% & \rr If a subcaption fits on one line it will, by
+% default, be centered. This option
+% treats a single line like a mid-line of a
+% multi-line caption.\\ \hline
+% \raisebox{-1.4ex}{\Lopt{raggedright}}
+% & \rr Causes the subcaption text to be raggedright.
+% Overrides \Lopt{center} and \Lopt{centerlast}.
+% \\ \hline
+% \raisebox{-1.4ex}{\Lopt{RaggedRight}}
+% & \rr Causes the subcaption text to be
+% raggedright with hyphenation (using the
+% ragged2e package).
+% Overrides \Lopt{center} and \Lopt{centerlast}.
+% \\ \hline\hline
+% \Lopt{scriptsize{\rm,} footnotesize{\rm,} small{\rm,}\hfil\null\linebreak
+% normalsize{\rm,} large{\rm,} Large}
+% & \rr Sets the font size of the subcaptions (both
+% the label and the text), \Lopt{footnotesize}
+% is default. \\ \hline
+% \M{1.8ex}
+% \Lopt{rm{\rm,} sf{\rm,} tt{\rm,} md{\rm,} bf{\rm,}\efill
+% up{\rm,} it{\rm,} sl{\rm,} sc{\rm,}}\hfil\null\linebreak
+% \Lopt{RM{\rm,} SF{\rm,} TT{\rm,} MD{\rm,} BF{\rm,}\efill
+% UP{\rm,} IT{\rm,} SL{\rm,} SC}
+% & \rr The lowercase commands set the font attributes
+% of the subcaption label. The capitalized version
+% sets the font attributes of the text. Family,
+% shape and style attributes may be mixed.
+% The default is to set the document defaults for
+% the family, series and shape.\\ \hline\hline
+% \M{4ex}
+% \Lopt{figbotcap}{\rm,} \Lopt{tabbotcap}{\rm,}\hfil\null\linebreak
+% \Lopt{FIGBOTCAP}{\rm,} \Lopt{TABBOTCAP}
+% & \rr Sets the figure or table numbering based on
+% the assumption that the figure or table caption
+% comes after the subfigures or subtables. The
+% capitalized version also places the subcaption
+% after the figure (``\Lopt{FIGBOTCAP}'' and
+% ``\Lopt{TABBOTCAP}'' are the default settings).
+% \\ \hline
+% \M{3.9ex}
+% \Lopt{figtopcap}{\rm,} \Lopt{tabtopcap}{\rm,}\hfil\null\linebreak
+% \Lopt{FIGTOPCAP}{\rm,} \Lopt{TABTOPCAP}
+% & \rr Sets the figure or table numbering based on
+% the assumption that the figure or table caption
+% precedes the subfigures or subtables. The
+% capitalized version also places the subcaption
+% before the figure (``\Lopt{TABTOPCAP}'' is the
+% preferred table setting, see
+% section~\ref{sec:position} for details).
+% \\ \hline\hline
+% \M{2.6ex}
+% \Lopt{loose}{\rm,} \Lopt{tight}
+% & \rr The (default) \Lopt{loose} option sets the
+% historically normal whitespace around the subfloat.
+% The \Lopt{tight} option sets less space around the
+% subfigure (this is the preferred setting).
+% \\ \hline
+% \end{tabular}}%
+% \end{table}
+% \MakeShortVerb{\|}
+%
+% \begin{table}
+% \centering
+% \caption{\cmd{\subfigure} calling arguments.}
+% \label{tab:calling}
+% \begingroup\small
+% \begin{tabular}{llc} \\ \hline
+% {\normalsize Subfigure Command}
+% & {\normalsize LoF/LoT}
+% & \multicolumn{1}{r}{\hbox to .25in{%
+% \hss\normalsize
+% Subfigure Caption}}
+% \\ \hline
+% \cmd{\subfigure}\{\dots fig\dots\}
+% & & \\
+% \cmd{\subfigure}[~]\{\dots fig\dots\}
+% & (b)\ \ . . . . . . . . . .
+% & (b) \\
+% \cmd{\subfigure}[Subcaption.]\{\dots fig\dots\}
+% & (c) Subcaption. . . .
+% & (c) Subcaption. \\
+% \cmd{\subfigure}[\space][Subcaption.]\{\dots fig\dots\}
+% & & (d) Subcaption. \\
+% \cmd{\subfigure}[\space][\space]\{\dots fig\dots\}
+% & & (e) \\
+% \cmd{\subfigure}[List\_entry.][Subcaption.]\{\dots fig\dots\}
+% & (f) List\_entry. . . .
+% & (f) Subcaption. \\
+% \cmd{\subfigure}[List\_entry.][~]\{\dots fig\dots\}
+% & (g) List\_entry. . . .
+% & (g) \\ \hline
+% \end{tabular}
+% \endgroup
+% \vspace{-8pt}
+% \end{table}
+%
+% If you wish to reference a specific subfigure or subtable, you can
+% include a |\label| inside the body of either the \meta{subcaption} or
+% \meta{figure} argument to the command (but not the \meta{list\_entry}
+% argument). If supplied by itself, the \meta{subcaption} is a ``moving
+% argument''\footnote{See \cite[\textsection~4.7 and
+% \textsection~C.1.3]{Lamp94} for a more detailed description of
+% ``moving arguments'' and ``fragile'' commands.} and, therefore, any
+% ``fragile'' commands contained within it must be |\protect|'ed. If
+% the \meta{list\_entry} argument is supplied, then the
+% \meta{subcaption} is not a ``moving argument''; however, the
+% \meta{list\_entry} is.
+%
+% {\bf Note:} since the |\subfigure| and |\subtable| commands have optional
+% arguments, delimited with square brackets, before their required argument,
+% you cannot use the `]' character at the top level of either the
+% \meta{subcaption} or \meta{list\_entry} argument. To overcome this
+% problem, you must wrap the portion of the text containing the `]'
+% character (or the entire argument), in a pair of curly brackets (see
+% \cite[\textsection~C.1.1]{Lamp94} for more detail). For example:
+%
+% \begin{verbatim}
+% \subfigure[This does not $sqrt[3]{8}$ work.]{... figure text ...}
+% \subfigure[This works {$sqrt[3]{8}$} fine.]{... figure text ...}
+% \subfigure[{This also works $sqrt[3]{8}$ fine.}]{... figure text ...}
+% \end{verbatim}
+%
+% One final note, the |\subfigure| and |\subtable| commands are
+% actually identical and it is the surrounding environment that defines
+% actually identical and it is the surrounding environment that defines
+% whether a subtable or subfigure will be generated and not which command
+% is used. At the user level, the choice of names is purely cosmetic
+% (and historical). Therefore you can use |\subfigure| for any float
+% ({\it e.g.\/}, \Lenv{figure}, \Lenv{table}, or other) environment.
+%
+% \subsection{Format Options}
+% \label{sec:format}
+%
+% There are six options for formatting the layout of the caption label
+% and text. The first is \Lopt{normal}, which produces the style shown
+% in figure~\ref{fig:format-01}. The other options may be used in
+% various combinations to produce the layouts shown in
+% figures~\ref{fig:format-02} thru \ref{fig:format-14}. Note that some
+% combinations, like \Lopt{center} and \Lopt{centerlast} do not make
+% sense since \Lopt{center} overrides \Lopt{centerlast}. Also,
+% \Lopt{nooneline}, when combined with either \Lopt{center} or
+% \Lopt{centerlast} has no effect (unless the \Lopt{hang} option is
+% also set); and, \Lopt{raggedright} overrides both \Lopt{center} and
+% \Lopt{centerlast}.
+%
+% \begingroup
+% \def\sc{Short.}
+% \def\lc{This is a long caption of gibberish: Aafas d taed
+% gaihgghn adf irin sadf aets etsd na.}
+% \def\b{\fboxsep=-\fboxrule
+% \fbox{\hbox to 2.0in{\vbox to 2mm{\vfil\null}\hfil}}}
+% \def\g{\hspace{.5in}}
+% \subfigtopskip=20pt
+% \subfigcapskip=-3pt
+% \subfigbottomskip=0pt
+% \abovecaptionskip=5pt
+% \begin{figure}^
+% \centering
+% \turnofflistentry
+% \subcaphangfalse
+% \subcapcenterfalse
+% \subcapcenterlastfalse
+% \subcapnoonelinefalse
+% \subcapraggedrightfalse
+% \subfigure[\sc]{\b}\g\subfigure[\lc]{\b}\\
+% \caption{Format option [\Lopt{normal}].}^
+% \label{fig:format-01}^
+% \subcapnoonelinetrue
+% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format option [\Lopt{nooneline}].}^
+% \label{fig:format-02}^
+% \subcapcenterlasttrue
+% \subcapnoonelinefalse
+% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format option [\Lopt{centerlast}]; \Lopt{centerlast} overrides
+% \Lopt{nooneline}.\footnotemark}
+% \label{fig:format-03}^
+% \subcapcentertrue
+% \subcapcenterlastfalse
+% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format option [\Lopt{center}]; \Lopt{center} overrides
+% \Lopt{nooneline} and \Lopt{centerlast}.}^
+% \label{fig:format-04}^
+% \subcaphangtrue
+% \subcapcenterfalse
+% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format option [\Lopt{hang}].}
+% \label{fig:format-05}
+% \subcapnoonelinetrue
+% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format options [\Lopt{hang},\Lopt{nooneline}].}
+% \label{fig:format-06}
+% \subcapcenterlasttrue
+% \subcapnoonelinefalse
+% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\
+% \caption{\Lpack{Hhsubfigure}\ format options [\Lopt{hang},^
+% \Lopt{centerlast}].}
+% \label{fig:format-07}
+% \vspace{2\baselineskip}
+% \begin{minipage}{\linewidth}
+% \footnotetext{\raise1ex\hbox to 0pt{\hss\tiny\thefootnote}^
+% So this is the same as [\Lopt{centerlast},\Lopt{nooneline}]. Only
+% the shortest number of options to achieve an effect is shown.
+% Adding any combination of overridden options has no effect.}
+% \end{minipage}
+% \end{figure}
+%
+% \begin{figure}
+% \turnofflistentry
+% \centering
+% \subcaphangtrue
+% \subcapcenterfalse
+% \subcapcenterlasttrue
+% \subcapnoonelinetrue
+% \subcapraggedrightfalse
+% \subfigure[][\sc]{\label{fig:format-08A}\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format options [\Lopt{hang},\Lopt{centerlast},\Lopt{nooneline}].}
+% \label{fig:format-08}
+% \subcapcentertrue
+% \subcapcenterlastfalse
+% \subcapnoonelinefalse
+% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format options [\Lopt{hang},\Lopt{center}];
+% \Lopt{center} overrides \Lopt{centerlast}.}
+% \label{fig:format-09}
+% \subcapnoonelinetrue
+% \subfigure[][\sc]{\label{fig:format-10A}\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format options [\Lopt{hang},\Lopt{center},\Lopt{nooneline}];
+% \Lopt{center} overrides \Lopt{centerlast}.}
+% \label{fig:format-10}
+% \subcaphangfalse
+% \subcapcenterfalse
+% \subcapnoonelinefalse
+% \subcapraggedrighttrue
+% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format option [\Lopt{raggedright}];
+% \Lopt{raggedright} overrides \Lopt{center} and \Lopt{centerlast}.}
+% \label{fig:format-11}
+% \subcapnoonelinetrue
+% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format options [\Lopt{raggedright},\Lopt{noonelirne}];
+% \Lopt{raggedright} overrides \Lopt{center} and \Lopt{centerlast}.}
+% \label{fig:format-12}
+% \subcaphangtrue
+% \subcapnoonelinefalse
+% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\
+% \caption{Format options [\Lopt{hang},\Lopt{raggedright}];
+% \Lopt{raggedright} overrides \Lopt{center} and \Lopt{centerlast}.}
+% \label{fig:format-13}
+% \subcapnoonelinetrue
+% \subfigure[][\sc]{\label{fig:format-14A}\b}\g\subfigure[][\lc]{\b}\\
+% \caption{\Lpack{hhsubfigure}\ format options [\Lopt{hang},\Lopt{raggedright},
+% \Lopt{nooneline}]; \Lopt{raggedright} overrides \Lopt{center}
+% and \Lopt{centerlast}.}
+% \label{fig:format-14}
+% \end{figure}
+% \endgroup
+%
+% \addtocontents{lof}{^
+% \string\contentsline
+% {figure}
+% {\numberline{\ref{fig:format-01}--\ref{fig:format-14}}^
+% {\ignorespaces \Lpack{Hhsubfigure}\ format options.}}^
+% {\pageref{fig:format-01}--\pageref{fig:format-14}}}
+%
+% \subsection{Font Size and Style Options}
+% \label{sec:font}
+%
+% There are twenty-four options for setting the font of the subcaption.
+% The first six set the size of both the subcaption label and text.
+% They are: \Lopt{scriptsize}, \Lopt{footnotesize} (default),
+% \Lopt{small}, \Lopt{normalsize}, \Lopt{large}, and \Lopt{Large}.
+% Their effect is shown in figure~\ref{fig:font1}.
+%
+% The next nine, \Lopt{rm}: \Lopt{sf}, \Lopt{tt}, \Lopt{md}, \Lopt{bf},
+% \Lopt{up}, \Lopt{it}, \Lopt{sl}, and \Lopt{sc}, set the family, series
+% or shape of the subcaption label, as shown in
+% figures~\ref{fig:font2A}--~\ref{fig:font2I}. The last nine:
+% \Lopt{RM}, \Lopt{SF}, \Lopt{TT}, \Lopt{MD}, \Lopt{BF}, \Lopt{UP},
+% \Lopt{IT}, \Lopt{SL}, and \Lopt{SC}, do the same for the text of the
+% subcaption, as shown in figure~\ref{fig:font2J}--\ref{fig:font2R}.
+% These size and style options may be combined in 3456 ways to set the
+% label and text of the subcaption (as long as the selected font
+% combination exists\@!) The font family for the text and label may be
+% set as roman (\Lopt{rm}/\Lopt{RM}), sans serif (\Lopt{sf}/\Lopt{SF}),
+% and typewriter (\Lopt{tt}/\Lopt{TT}). These may be combined with
+% those for the font series, medium (\Lopt{md}/\Lopt{MD}) and bold
+% (\Lopt{bf}/\Lopt{BF}); and the font shape, upright
+% (\Lopt{up}/\Lopt{UP}), italic (\Lopt{it}/\Lopt{IT}), slanted
+% (\Lopt{sl}/\Lopt{SL}), and small caps (\Lopt{sc}/\Lopt{SC}).
+%
+% \begin{figure}^
+% \def\b{\fboxsep=-\fboxrule
+% \fbox{\hbox to 2.0in{\vbox to 2mm{\vfil\null}\hfil}}}^
+% \subfigtopskip=8pt^
+% \subfigcapskip=0pt^
+% \subfigbottomskip=4pt^
+% \centering
+% {\renewcommand{\subcapsize}{\scriptsize}^
+% \subfigure[][Font option {[scriptsize]}.]{\b}}\qquad
+% {\renewcommand{\subcapsize}{\footnotesize}^
+% \subfigure[][Font option {[footnotesize]}.]{\b}}\\
+% {\renewcommand{\subcapsize}{\small}^
+% \subfigure[][Font option {[small]}.]{\b}}\qquad
+% {\renewcommand{\subcapsize}{\normalsize}^
+% \subfigure[][Font option {[normalsize]}.]{\b}}\\
+% {\renewcommand{\subcapsize}{\large}^
+% \subfigure[][Font option {[large]}.]{\b}}\qquad
+% {\renewcommand{\subcapsize}{\Large}^
+% \subfigure[][Font option {[Large]}.]{\b}}%
+% \caption[\Lpack{Hhsubfigure} font size options.]{%
+% \Lpack{Hhsubfigure} font size options. (Default:
+% \Lopt{footnotesize}).}^
+% \label{fig:font1}^
+% \end{figure}
+%
+% \begin{figure}^
+% \def\b{\fboxsep=-\fboxrule
+% \fbox{\hbox to 2.0in{\vbox to 2mm{\vfil\null}\hfil}}}^
+% \subfigtopskip=8pt^
+% \subfigcapskip=0pt^
+% \subfigbottomskip=4pt^
+% \centering
+% \begin{minipage}{2.0in}^
+% {\renewcommand{\subcaplabelfont}{\rmfamily}^
+% \subfigure[][Subcaption label font option {[\Lopt{rm}]}.]{\b^
+% \label{fig:font2A}}}\\
+% {\renewcommand{\subcaplabelfont}{\sffamily}^
+% \subfigure[][Subcaption label font option {[\Lopt{sf}]}.]{\b}}\\
+% {\renewcommand{\subcaplabelfont}{\ttfamily}^
+% \subfigure[][Subcaption label font option {[\Lopt{tt}]}.]{\b}}\\
+% {\renewcommand{\subcaplabelfont}{\mdseries}^
+% \subfigure[][Subcaption label font option {[\Lopt{md}]}.]{\b}}\\
+% {\renewcommand{\subcaplabelfont}{\bfseries}^
+% \subfigure[][Subcaption label font option {[\Lopt{bf}]}.]{\b}}\\
+% {\renewcommand{\subcaplabelfont}{\upshape}^
+% \subfigure[][Subcaption label font option {[\Lopt{up}]}.]{\b}}\\
+% {\renewcommand{\subcaplabelfont}{\itshape}^
+% \subfigure[][Subcaption label font option {[\Lopt{it}]}.]{\b}}\\
+% {\renewcommand{\subcaplabelfont}{\slshape}^
+% \subfigure[][Subcaption label font option {[\Lopt{sl}]}.]{\b}}\\
+% {\renewcommand{\subcaplabelfont}{\scshape}^
+% \subfigure[][Subcaption label font option {[\Lopt{sc}]}.]{^
+% \label{fig:font2I}\b}}\\
+% \end{minipage}^
+% \qquad
+% \begin{minipage}{2.0in}^
+% {\renewcommand{\subcapfont}{\rmfamily}^
+% \subfigure[][Subcaption font option {[\Lopt{RM}]}.]{^
+% \label{fig:font2J}\b}}\\
+% {\renewcommand{\subcapfont}{\sffamily}^
+% \subfigure[][Subcaption font option {[\Lopt{SF}]}.]{\b}}\\
+% {\renewcommand{\subcapfont}{\ttfamily}^
+% \subfigure[][Subcaption font option {[\Lopt{TT}]}.]{\b}}\\
+% {\renewcommand{\subcapfont}{\mdseries}^
+% \subfigure[][Subcaption font option {[\Lopt{MD}]}.]{\b}}\\
+% {\renewcommand{\subcapfont}{\bfseries}^
+% \subfigure[][Subcaption font option {[\Lopt{BF}]}.]{\b}}\\
+% {\renewcommand{\subcapfont}{\upshape}^
+% \subfigure[][Subcaption font option {[\Lopt{UP}]}.]{\b}}\\
+% {\renewcommand{\subcapfont}{\itshape}^
+% \subfigure[][Subcaption font option {[\Lopt{IT}]}.]{\b}}\\
+% {\renewcommand{\subcapfont}{\slshape}^
+% \subfigure[][Subcaption font option {[\Lopt{SL}]}.]{\b}}\\
+% {\renewcommand{\subcapfont}{\scshape}^
+% \subfigure[][Subcaption font option {[\Lopt{SC}]}.]{^
+% \label{fig:font2R}\b}}^
+% \end{minipage}^
+% \caption[\Lpack{Hhsubfigure} font style options.]{%
+% \Lpack{Hhsubfigure} font style options. (Default:
+% \Lopt{rm,md,up,RM,MD,UP}). Note: The above single options
+% are loaded after the default settings and multiple options are
+% allowed, see the text, section~\ref{sec:font}.}^
+% \label{fig:font2}^
+% \end{figure}
+%
+% \subsection{Caption Position Options}
+% \enlargethispage{12pt}^finalhack
+% \label{sec:position}
+%
+% There are eight options that control the {\em position\/} of the
+% subcaption and how the subcaption {\em numbering\/} is related to the
+% ``containing'' figure or table's caption. The following shows only
+% the subfigure-related options, but the subtable options are symmetric.
+%
+% The first option, \Lopt{figbotcap} tells the subfigure command that
+% the ``containing'' figure's |\caption| occurs {\bf after} the
+% subfigures. This information is needed to decide if the current
+% figure counter shows the number for the last figure (\Lopt{figbotcap})
+% or for the current one (\Lopt{figtopcap}, see below).
+%
+% The second option, \Lopt{figtopcap} tells the subfigure command that
+% the ``containing'' figure's |\caption| occurs {\bf before} the
+% subfigures. The subcaption is automatically placed below the figure
+% for each of these options.
+%
+% The third option, \Lopt{FIGBOTCAP}, is similar to \Lopt{figbotcap},
+% except that it also forces the subcaption to be placed under the
+% figure. This is the default setting for figures (and \Lopt{TABBOTCAP}
+% for tables) and is shown in figure~\ref{fig:position1}.
+%
+% The fourth option, \Lopt{FIGTOPCAP}, is similar to \Lopt{figtopcap},
+% except that it forces the subcaption to be placed above the figure
+% box. (While not the default, it is the preferred format for tables,
+% which uses the option \Lopt{TABTOPCAP}\@.) An example of this option
+% is shown in figure~\ref{fig:position2}. Note that the baseline of the
+% subfigure is along the top of the two subfigures. See
+% section~\ref{sec:custom-position} for another way of positioning the
+% caption when captions are placed above the figure or table.
+%
+% \begin{figure}^
+% \subfigtopskip=8pt^
+% \subfigcapskip=0pt^
+% \subfigbottomskip=4pt^
+% \abovecaptionskip=5pt^
+% \centering
+% \subfigure[First caption.]{^
+% \fbox{\hbox to 1.5in{\vbox to 15mm{\vfil\null}\hfil}}}^
+% \hspace{0.2in}^
+% \subfigure[Second long, long, long, long, long, long, caption.]{^
+% \fbox{\hbox to 1.5in{\vbox to 10mm{\vfil\null}\hfil}}}^
+% \caption{Subcaption position option [\Lopt{FIGBOTCAP}].}
+% \label{fig:position1}^
+% \end{figure}
+%
+% \begin{figure}^
+% \subfigtopskip=8pt^
+% \subfigcapskip=0pt^
+% \subfigbottomskip=0pt^
+% \belowcaptionskip=5pt^
+% \caption{Subcaption position option: [\Lopt{FIGTOPCAP}].}^
+% \label{fig:position2}^
+% \centering
+% \figuretopcaptrue
+% \subfiguretopcaptrue
+% \subfigure[First caption.]{^
+% \fbox{\hbox to 1.5in{\vbox to 15mm{\vfil\null}\hfil}}}^
+% \hspace{0.2in}^
+% \subfigure[Second long, long, long, long, long, long caption.]{^
+% \fbox{\hbox to 1.5in{\vbox to 10mm{\vfil\null}\hfil}}}^
+% \setcounter{subfigure}{0}^
+% \vspace{-18pt}
+% \end{figure}
+%
+% \subsection{Recent Changes and Backward Compatibility}
+% \enlargethispage{24pt}^finalhack
+% \label{sec:back-compat}
+%
+% There are some significant changes in this version of the
+% \Lpack{hhsubfigure} package. One of them was to pack the subfigure
+% tighter together by removing the space at the top of the subfigure at
+% the beginning of a page, or minipage, and to reduce the spacing around
+% the subfigure, see table~\ref{tab:spacing}. If you have been using an
+% older version of the \Lpack{hhsubfigure} package ({\it i.e.\/}, version
+% 2.0 or eariler) than the default (\Lopt{loose}) setting will not cause
+% any change in your existing documents.\footnote{If you have been using
+% a beta release version of \Lpack{subfigure} 2.1, than you will need to
+% use the \Lopt{tight} option in order to maintain the ``look-and-feel''
+% that you are used to.}
+%
+% If you want to use the new and preferred, \Lopt{tight} option, your
+% subfigures will take up less space and should provide a more balanced
+% visual appearance for your paper.
+%
+% The second significant change is the ability to make the text on the
+% List-of-Figures page different than that in the subcaption. The use
+% of a second optional argument to the |\subfigure| command is shown in
+% table~\ref{tab:calling}. This should not cause any compatibility
+% problems.
+%
+% The third significant change is the it is now possible to have the
+% captions and subcaptions come before or after the corresponding
+% figure/table portion. While the default settings support the old view
+% of the subcaptions following the figure/table and, in turn, followed
+% by the main caption. The preferred format is for figures to retain
+% that layout and for tables to have both their subcaption and main
+% captions come before the table portion. This preferred setting may be
+% specified by adding the option \Lopt{TABTOPCAP} when loading the
+% \Lpack{hhsubfigure} package.
+%
+% The fourth update is that the font style options have been generalized
+% so that an option from each of the family, series and shape, may be
+% combined, as long as that combination exists; and you can set the font
+% of the label and text separately. In addition, the the |\space| that
+% separated the label from the text in the subcaption has been replaced
+% with a horizontal skip of |\subfiglabelskip| which has the default
+% value of |0.33em plus 0.07em minus 0.03em|. This extension should not
+% cause any compatibility problems.
+%
+% The last major change is that there is now a |\subref| command that
+% allows a reference to the subfigure without the figure number. An
+% example of the use of this command is shown later in
+% section~\ref{sec:ex3}. Associated with this change is that the
+% |\label| command will accept an optional argument, for use with the
+% \Lpack{hyperref} package, when used within the scope of the
+% |\subfigure| or |\subtable|, see section~\ref{sec:hyperref} for details.
+%
+% \DeleteShortVerb{\|}
+% \MakeShortVerb{\/}
+% \begin{table}^
+% \def\pz{\phantom{0}}^
+% \centering
+% \caption{\Lpack{hhsubfigure} spacing changes.}^
+% \label{tab:spacing}^
+% \vspace{4pt}^
+% \begin{tabular}{|l|c|c|c|} \hline
+% \multicolumn{1}{|c|}{\bf{\Lpack{hhsubfigure}}}
+% & \multicolumn{1}{c|}{{\bf Old (v2.0)}}
+% & \multicolumn{1}{c|}{\bf\Lopt{loose}}
+% & \multicolumn{1}{c|}{\bf\Lopt{tight}} \\
+% \multicolumn{1}{|c|}{{\bf Constant}}
+% & \multicolumn{1}{c|}{{\bf Value}}
+% & \multicolumn{1}{c|}{{\bf Option}}
+% & \multicolumn{1}{c|}{{\bf Option}}
+% \\ \hline
+% /\subfigtopskip/ & 10 pt & 10 pt & 5 pt \\
+% /\subfigcapskip/ & 10 pt & 10 pt & 0 pt \\
+% /\subfigcaptopadj/ & | &\pz0 pt & 3 pt \\
+% /\subfigbottomskip/ & 10 pt & 10 pt & 5 pt \\
+% /\subfigcapmargin/ & 10 pt & 10 pt & 0 pt \\
+% /\subfiglabelskip/ & | & 0.33 em &
+% \vtop{\hbox to 1.2in{0.33 em plus 0.07 em}
+% \hbox to 1.2in{\hfill minus 0.03 em}}
+% \\[8pt] \hline
+% \end{tabular}^
+% \end{table}
+% \DeleteShortVerb{\/}
+% \MakeShortVerb{\|}
+%
+% The \Lpack{hhsubfigure} package checks for and loads a configuration
+% file called \Lfile{subfigure.cfg} which is placed anywhere that \LaTeX\
+% will look for classes or packages (see
+% section~\ref{sec:customization}). By default, the \Lfile{subfigure.sty}
+% file tries to look unchanged from older versions. In order to
+% have it automatically use the preferred settings, you can add a
+% configuration file containing the options \Lopt{tight} to reduce the
+% extra whitespace around the subfigures and \Lopt{TABTOPCAP} to show
+% that table captions will come before the table and the the subcaptions
+% for tables should be set above the subtable. The following line is all
+% you need in your configuration file:
+%
+% \iffalse
+%<*newconf>
+% \fi
+% \begin{macrocode}
+\ExecuteOptions{tight,TABTOPCAP}
+% \end{macrocode}
+% \iffalse
+%</newconf>
+% \fi
+%
+% You could also load the subfigure package with the options with the
+% following in your \LaTeX\ preamble:
+% \begin{quote}
+% |\usepackage[tight,TABTOPCAP]{hhsubfigure}|
+% \end{quote}
+%
+% \subsection{Frequently Asked Questions}
+% \label{sec:faq}
+%
+% The four most frequently asked questions about the \Lpack{hhsubfigure}
+% package are:
+%
+% \begin{enumerate}
+% \item ``My subfigures are not aligned along their bottoms. Why?''
+%
+% Remember! The \Lpack{hhsubfigure} package aligns subfigure along
+% their baselines with the subcaption (if any) sticking out above or
+% below. The above problem is usually due to using a \Lenv{minipage},
+% \Lenv{tabular} or \Lenv{array} environment that, by default,
+% places the baseline at the center of the box that it generates.
+% If the two subfigures are different sizes, or if one subfigure is
+% generated in some other way with its baseline not at the expected
+% place (perhaps an |\includegraphics|), then the subfigures will be
+% misaligned. One solution is to use the environment options `[t]'
+% or `[b]' to move the baseline to the top or bottom rather than the
+% center.
+%
+% \item ``How can I get my figures/subfigures to line up the way I want?''
+%
+% A similar question, but this one is caused by extra whitespace in
+% the source text generating spaces next to the figures, and |\par|'s
+% generated by blanklines. The main thing is {\it be aware\/} that
+% extra whitespace can move figures and subfigures around, sometimes
+% a lot and sometimes just a little so that they look ``wrong''.
+% Placing too many `\%'s at the end of the lines is better than too
+% few in the figure and table environments. (See the discussion of
+% ``white space'' in section~\ref{sec:examples}.)
+%
+% \item ``I have too many subfigures for one page, How can I spread
+% them over two or more pages and continue the numbering?''
+% \begin{description}
+% \item[Option 1:] Adjust the \Lcount{figure} and \Lcount{subfigure}
+% counters (or the \Lcount{table} and
+% \Lcount{subtable} counters) as needed before and
+% after each figure (or table) See, for example
+% \emph{Using Imported Graphics in \LaTeXe}
+% \cite[\textsection~30]{Reck97}.
+% \item[Option 2:] Use the \Lpack{ccaption} package by Peter Wilson
+% \cite{Wils01}.
+% \item[Option 3:] Use the simpler \Lpack{captcont} package by
+% Steven Cochran \cite{Coch02}.
+% \end{description}
+% All of these options work well. Of the packages, the
+% \Lpack{ccaption} package is bigger and offers more control over
+% what is done (and things to do) at the expense of being a little
+% harder to use. The \Lpack{captcont} package is easier to use,
+% but only provides for continued floats.
+% \newpage^finalhack
+% \item ``Why do I get a garbled caption or an error when I use
+% square brackets?''
+% \vspace{-2pt}
+% \begin{verbatim}
+% \subfigure[SHIFT: ``register[3] $<<=$ 3;'']{... figure text ...}
+% \end{verbatim}
+% \vspace{-12pt}
+% Since the |\subfigure| and |\subtable| commands have optional
+% arguments, delimited with square brackets, before their required
+% argument, you cannot use the `]' character at the top level of
+% either the \meta{subcaption} or \meta{list\_entry} argument. To
+% overcome this problem, you must wrap all or the portion of the text
+% containing the `]' character, in a pair of curly brackets
+% (see \cite[\textsection~C.1.1]{Lamp94} for more detail). For example:
+% \begin{verbatim}
+% \subfigure[SHIFT: ``register{[3]} $<<=$ 3;'']{... figure text ...}
+% \end{verbatim}
+% \vspace{-16pt}
+% \noindent
+% or
+% \vspace{-4pt}
+% \begin{verbatim}
+% \subfigure[{SHIFT: ``register[3] $<<=$ 3;''}]{... figure text ...}.
+% \end{verbatim}
+% \vspace{-12pt}
+% \end{enumerate}
+%
+% \section{Three Examples}
+% \label{sec:examples}
+%
+% The easiest way to show the use of this package is to give a few
+% examples. The two most important things to remember when working
+% with the \Lpack{hhsubfigure} package are that (1) the subfigures are
+% aligned along their baselines (see figure~\ref{fig:layout} and
+% section~\ref{sec:customlayout}) and (2) that whitespace in the
+% \Lenv{figure} environment are significant and affect the layout.
+%
+% The baseline of the subfigure is usually at the bottom of the
+% subfigure or (when the subcaption appears at the top) at the bottom of
+% the subcaption {\em and\/} the |\subfigcapskip| space---which is usually
+% the same as the top of the subfigure. However sometimes, especially
+% when using the \Lenv{tabular}, \Lenv{array}, or \Lenv{minipage}
+% environments to build the figure, the baseline appears elsewhere. The
+% above environments are all aligned at their center by default but that
+% may be changed with the optional `{\bf [t]}' or `{\bf [b]}' arguments.
+% As a last resort you can wrap all of your figures in a |\vtop| box with
+% a |\vbox to 0pt{\null}| at the top followed by the figure.
+%
+% If your figure is not quite centered or where you want it to be, the
+% problem is often a space character being placed to one side or the
+% other of the figure. Some general rules of thumb are:\footnote{See
+% chapters 7 and 8 of ``The \TeX book'' \cite{Knut86} for details.}
+% \begin{itemize}\itemsep0pt
+% \item Two end-of-lines following each other (ignoring any
+% whitespace) are turned into a |\par| or paragraph break.
+% \item Multiple whitespace (including the end-of-line) are
+% compressed into a single space.
+% \item The spaces after a macro command name ({\it e.g.\/}, |\foo|)
+% are ignored.
+% \item A `\%' character at the end of the line suppresses the
+% end-of-line and all of the spaces (if any) at the
+% beginning of the next line.
+% \end{itemize}
+%
+% To suppress significant extra whitespace, you can add some `\%'
+% characters at the end of each line that doesn't end with a command name.
+% This is more than is required, but extra `\%' usually don't cause a
+% problem.
+%
+% The other case where things are not correctly centered is when the
+% subfigure uses only the label for the subcaption. This is often the
+% case when the description for each subfigure is given in the figure
+% caption rather than in each subcaption. In this case, the default
+% label has the form `(a)\ \ ' where the trailing space is defined by
+% |\subfiglabelskip|. In this case the style should redefine this space
+% as `0pt' so that the label is perfectly centered (see
+% section~\ref{sec:ex3}, below for an example).
+%
+% \subsection{A Simple Example}
+% \enlargethispage{12pt}
+%
+% The first example, shown in figure~\ref{3figs}, specifies |\centering|
+% \DescribeMacro{\subfigure}
+% to horizontally center the set of subfigures, and uses |\\| and
+% some horizontal space (using |\qquad|) to control the placement of
+% the subfigures. Note that the alignment of the top two subfigures
+% is along the bottom of the figure portion of each.
+%
+% \begin{figure}^
+% \centering
+% \fboxsep=-\fboxrule
+% \fbox{^
+% \begin{minipage}{4.0in}^
+% \vspace{10pt}^
+% \centering
+% \begin{minipage}{3.5in}^
+% \subfigtopskip=3pt^
+% \subfigcapskip=-2pt^
+% \subfigbottomskip=5pt^
+% \subfigcapmargin=3pt^
+% \abovecaptionskip=5pt^
+% \centering
+% \subfigure[First.]{^
+% \fbox{\hbox to 20mm{\vbox to 15mm{\vfil\null}\hfil}}}\qquad
+% \subfigure[Second figure.]{^
+% \fbox{\hbox to 20mm{\vbox to 10mm{\vfil\null}\hfil}}}\\[6pt]
+% \subfigure[Third.]{\label{3figs-c}^
+% \fbox{\hbox to 20mm{\vbox to 10mm{\vfil\null}\hfil}}}\\
+% \caption{Three subfigures.}^
+% \label{3figs}^
+% \rr
+% \vspace{15pt}^
+% Figure~\ref{3figs} contains two top `subfigures' and
+% figure~\ref{3figs-c}.$\!$\footnotemark
+% \end{minipage}^
+% \vspace{4pt}^
+% \end{minipage}}
+% \vspace{-5pt}^
+% \end{figure}
+% \footnotetext{In this and later boxed figures, the boxes are intended to
+% represent a portion of the page in which the figure occurs. This is
+% usually to show the figure along with some text or to show the effect
+% of some option on multiple pages.}
+%
+% \begin{verbatim}
+% \begin{figure}%
+% \centering
+% \subfigure[First.]{...}\qquad
+% \subfigure[Second figure.]{...}\\
+% \subfigure[Third.]{\label{3figs-c}...}%
+% \caption{Three subfigures.}
+% \label{3figs}
+% \end{figure}
+% ...
+% Figure~\ref{3figs} contains two top `subfigures' and
+% figure~\ref{3figs-c}.
+% \end{verbatim}
+%
+% \subsection{A More Advanced Example}
+%
+% A second example, shown in figure~\ref{fig:ex2}, demonstrates how to
+% change the subfigure labels and have the subfigure captions printed in
+% the List-of-Figures.
+%
+% The first |\renewcommand| changes the reference to |\thesubfigure| to
+% return both the figure number and the subfigure number separated with
+% a period. The next two |\renewcommand|'s turn off the |\p@subfigure|
+% (since it is now included in |\thesubfigure| and adds the colon and
+% space to the subfigure label. Later in the file, the
+% \Lcount{lofdepth} is set to ``2'' so allow the subfigure captions to
+% show and the |\listoffigures| is loaded. Finally, the \Lenv{figure}
+% is defined and a little following text is given that refers to it.
+%
+% \begin{verbatim}
+% \renewcommand{\thesubfigure}{\thefigure.\arabic{subfigure}}
+% \makeatletter
+% \renewcommand{\p@subfigure}{}
+% \renewcommand{\@thesubfigure}{\thesubfigure:\hskip\subfiglabelskip}
+% \makeatother
+% ...
+% \setcounter{lofdepth}{2}
+% \listoffigures
+% ...
+% \begin{figure}%
+% \centering
+% \subfigure[First.]{%
+% \label{fig:first}%
+% ...}%
+% \qquad
+% \subfigure[Second.]{%
+% \label{fig:second}%
+% ...}%
+% \caption{Two subfigures.}
+% \end{figure}
+% ...
+% See figures~\ref{fig:first} and \ref{fig:second}.
+% \end{verbatim}%
+%
+% \begin{figure}^
+% \centering
+% \fboxsep=-\fboxrule
+% \renewcommand{\thesubfigure}{\thefigure.\arabic{subfigure}}^
+% \makeatletter
+% \renewcommand{\p@subfigure}{}^
+% \renewcommand{\@thesubfigure}{\thesubfigure:\hskip\subfiglabelskip}^
+% \makeatother
+% \fbox{^
+% \begin{minipage}{4.0in}^
+% \centering
+% \begin{minipage}{3.5in}^
+% \setcounter{lofdepth}{2}^
+% \vspace{.1in}^
+% \section*{ List of Figures}^
+% \vspace{-15pt}^
+% \hspace{40pt}\dots
+% \vspace{3pt}^
+% \contentsline{figure}{\numberline{\ref{fig:ex2}}^
+% {\ignorespaces Two subfigures.}}{\pageref{fig:ex2}}^
+% \contentsline{subfigure}{\numberline{\ref{fig:first}}^
+% {\ignorespaces First.}}{\pageref{fig:first}}^
+% \contentsline{subfigure}{\numberline{\ref{fig:second}}^
+% {\ignorespaces Second.}}{\pageref{fig:second}}^
+% \hspace{40pt}\dots
+% \vspace{8pt}^
+% \end{minipage}^
+% \end{minipage}}\\
+% \fbox{^
+% \begin{minipage}{4.0in}^
+% \centering
+% \begin{minipage}{3.5in}^
+% \subfigtopskip=3pt^
+% \subfigcapskip=-2pt^
+% \abovecaptionskip=5pt^
+% \vspace{10pt}^
+% \centering
+% \subfigure[First.]{^
+% \label{fig:first}^
+% \fbox{\hbox to 22mm{\vbox to 15mm{\vfil\null}\hfil}}}^
+% \hspace{14pt}^
+% \subfigure[Second.]{^
+% \label{fig:second}^
+% \fbox{\hbox to 22mm{\vbox to 15mm{\vfil\null}\hfil}}}\\
+% \caption{Two subfigures.}^
+% \label{fig:ex2}^
+% \rr
+% \vspace{15pt}^
+% See figures~\ref{fig:first} and \ref{fig:second}.
+% \vspace{4pt}^
+% \end{minipage}^
+% \end{minipage}}^
+% \vspace{-8pt}
+% \end{figure}
+% \vspace{-12pt}^finalhack
+%
+% \subsection{An Example Without Subcaption Text}
+% \label{sec:ex3}
+%
+% The last example, shown in figure~\ref{fig:ex3}, demonstrates a
+% \DescribeMacro{\subref}
+% \DescribeMacro{\Subref}
+% \enlargethispage{12pt}
+% commonly required format where the subfigure are just labeled and the
+% description occurs in the main caption. This is easy to do by using
+% the ``empty'' optional caption arguments ``[\space ][\space ]''. This
+% creates a label for the subfigure in the text, but it does not show on
+% the List-of-Figures page. However, by default the caption may not be
+% perfectly centered, so |\subfiglabelskip| is reduced to zero points to
+% ensure that there is not any extra space hidden in the subcaption. To
+% refer to the subfigure label within the text or the main caption, you
+% can use the |\subref| command, which is similar to the |\ref| command,
+% but does not carry the figure number. (The |\Subref| command is the
+% same but sets it with |\subcaplabelfont|).
+%
+% \begin{figure}^
+% \centering
+% \fboxsep=-\fboxrule
+% \subfiglabelskip=0pt
+% \fbox{^
+% \begin{minipage}{4.0in}^
+% \centering
+% \begin{minipage}{3.5in}^
+% \setcounter{lofdepth}{2}^
+% \vspace{.1in}^
+% \section*{ List of Figures}^
+% \vspace{-15pt}^
+% \hspace{40pt}\dots
+% \vspace{3pt}^
+% \contentsline{figure}{\numberline{\ref{fig:ex3}}^
+% {\ignorespaces A set of four subfigures.}}^
+% {\pageref{fig:ex3}}^
+% \hspace{40pt}\dots
+% \vspace{8pt}^
+% \end{minipage}^
+% \end{minipage}}\\
+% \fbox{^
+% \begin{minipage}{4.0in}^
+% \centering
+% \begin{minipage}{3.5in}^
+% \subfigtopskip=3pt^
+% \subfigcapskip=-2pt^
+% \subfigbottomskip=3pt^
+% \abovecaptionskip=5pt^
+% \vspace{7pt}^
+% \centering
+% \makeatletter
+% \subfigure[][]{^
+% \label{fig:ex3-a}^
+% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}}%
+% \hspace{8pt}%
+% \subfigure[][]{^
+% \label{fig:ex3-b}^
+% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}}\\
+% \subfigure[][]{^
+% \label{fig:ex3-c}^
+% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}}%
+% \hspace{8pt}%
+% \subfigure[][]{^
+% \label{fig:ex3-d}^
+% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}}%
+% \caption[A set of four subfigures.]{A set of four subfigures:
+% \subref{fig:ex3-a} describes the first subfigure;
+% \subref{fig:ex3-b} describes the second subfigure;
+% \subref{fig:ex3-c} describes the third subfigure; and,
+% \subref{fig:ex3-d} describes the last subfigure.}^
+% \label{fig:ex3}^
+% \rr
+% \vspace{15pt}^
+% The text references the main figure as figure~\ref{fig:ex3}
+% or part of it as figures~\ref{fig:ex3-a}--\subref{fig:ex3-c}.
+% \vspace{4pt}^
+% \end{minipage}^
+% \end{minipage}}^
+% \vspace{-12pt}
+% \end{figure}
+%
+% \enlargethispage{12pt}
+% \begin{verbatim}
+% \subfiglabelskip=0pt
+% ...
+% \listoffigures
+% ...
+% \begin{figure}%
+% \centering
+% \subfigure[][]{%
+% \label{fig:ex3-a}%
+% ...figure code...}%
+% \hspace{8pt}%
+% \subfigure[][]{%
+% \label{fig:ex3-b}%
+% ...figure code...}\\
+% \subfigure[][]{%
+% \label{fig:ex3-c}%
+% ...figure code...}%
+% \hspace{8pt}%
+% \subfigure[][]{%
+% \label{fig:ex3-d}%
+% ...figure code...}%
+% \caption[A set of four subfigures.]{A set of four subfigures:
+% \subref{fig:ex3-a} describes the first subfigure;
+% \subref{fig:ex3-b} describes the second subfigure;
+% \subref{fig:ex3-c} describes the third subfigure; and,
+% \subref{fig:ex3-d} describes the last subfigure.}%
+% \label{fig:ex3}%
+% \end{figure}
+% ...
+% The text references the main figure as figure~\ref{fig:ex3} or part
+% of it as figures~\ref{fig:ex3-a}--\subref{fig:ex3-c}.
+% \end{verbatim}%
+%
+% \section{Customization}
+% \label{sec:customization}
+%
+% The following sections describe the internal parameters used by the
+% \Lpack{hhsubfigure} package to define the layout of the subfigures
+% or tables, as well as the labels and captions the accompany them.
+% In addition, adjustments to the entries on a ``List-of'' page and
+% the addition of new \Lenv{float} environments are described.
+%
+% Adjusting these values allows extensive customization of the
+% \Lpack{hhsubfigure} package. If you want to customize the package, an
+% alternative to actually changing the code is to create a a file called
+% \Lfile{subfigure.cfg} and place it anywhere that \LaTeX\ will look for
+% classes or packages. Any changes placed in the file will affect the
+% predefined parameters and you can override the default settings. Any
+% user options will be processed after this file is loaded.
+%
+% In order to change the major commands in the \Lpack{hhsubfigure} package
+% with this configure file, you will need to use the |\AtEndOfPackage|
+% command to defer that portion of your changes until the end of the
+% package.
+%
+% \subsection{Changing the Layout}
+% \enlargethispage{15pt}^finalhack
+% \label{sec:customlayout}
+%
+% \noindent
+% The layout of the |\subfigure| or |\subtable| is defined by several
+% internal values which may be changed to customize appearance of the
+% object. The following illustration shows the relationship of these
+% values. Figure~\ref{fig:layout-A} shows the standard layout with the
+% caption following the figure. The figure is vertically centered with
+% |\subfigtopskip| of space added above, then |\subfigcapskip| of
+% space is added below the figure followed by the subcaption and,
+% finally, |\subfigbottomskip| of space added at the bottom. The baseline
+% is located at the bottom of the figure. It is along this baseline that
+% adjacent subfigure boxes are aligned. Figure~\ref{fig:layout-C} shows
+% the case where the caption precedes the figure ({\it ie.\/},
+% |\subfiguretopcaptrue| or |\subtabletopcaptrue|). In this case the
+% various boxes and glue are reversed,$\!$\footnote{The \cmd{\subfigtopskip}
+% and \cmd{\subfigbottomskip} actually follow the \Lif{figuretopcap}
+% and \Lif{tabletopcap} flags, so that the actual top spacing used is
+% \cmd{\subfigtopskip} when the flags are {\bf false} and
+% \cmd{\subfigbottomskip} when they are {\bf true}.}
+% except that the |\subfigcapskip| is increased by |\subfigcaptopadj|.
+% The other two cases, figures~\ref{fig:layout-B} and
+% \subref{fig:layout-D}, show the cases where there is no caption. Note
+% that the |\subfigcapskip| is left out when there is no caption.
+% Note also, for all of these cases, that the space at the top of the
+% subfigure is automatically removed for items that are the first box
+% in a vertical list or other than the first box in a horizontal list.
+% This allows tighter packing of the subfigures and the full use of
+% the page or \Lenv{minipage}.
+%
+% Each of these values |\subfigtopskip|, |\subfigcapskip|, and
+% |\subfigbottomskip|; as well as |\subfigcapmargin| and
+% |\subfiglabelskip| (the latter not shown in figure~\ref{fig:layout})
+% may be changed from their defaults (see
+% table~{\PrintIfDefined{tab:defaults}{\ref{tab:defaults}}{\ref{tab:spacing}}})
+% to adjust the subfigure for the current layout style. In addition,
+% they may all assume negative values, which in some cases may solve
+% problems with the layout. Even though these constants are ``skips'',
+% only the last two (|\subfigcapmargin| and |\subfiglabelskip|) will
+% shrink or expand since the others assume their natural size in the
+% subfigure box and are fixed at that size.
+%
+% \begin{figure}[p]
+% \subfigtopskip=10pt^
+% \subfigcapskip=4pt^
+% \subfigbottomskip=12pt^
+% \abovecaptionskip=3pt^
+% \centering
+% \fboxsep=-\fboxrule
+% \newbox{\tempbox}
+% \newdimen{\tempdima}
+% \newdimen{\tempdimb}
+% \setbox\tempbox\hbox{
+% $\stackrel{\longleftrightarrow}{\cs{subfigcapmargin}}$}
+% \setbox\tempbox\hbox{\cs{subfigcapmargin}}
+% \tempdimb \wd\tempbox
+% \setbox\tempbox\hbox to \tempdimb{^
+% \kern -.5mm\hbox{$\leftarrow$}\kern -.5mm^
+% \leaders\hrule width1pt height2.6pt depth-2.2pt\hfill
+% \kern -.13mm$\rightarrow$}
+% \tempdima \wd\tempbox
+% \advance\tempdima 1mm
+% \tempdimb \tempdima
+% \multiply\tempdimb -2
+% \advance\tempdimb 4.5in
+% \advance\tempdimb -4mm
+% \subfigure[Standard layout {[FIGBOTCAP] or [TABBOTCAP]}.]{
+% \label{fig:layout-A}
+% \fbox{\parbox{4.5in}{
+% \vspace{1pt}
+% \hbox to 4.5in{
+% \hspace{1.5in}
+% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$
+% (\cs{subfigtopskip})
+% \hfil}
+% \fbox{\vbox to 45pt{
+% \vskip1pt
+% \vskip\baselineskip
+% \vfil
+% \hbox to 4.5in{
+% \hfil
+% {\scshape subfigure} or {\scshape subtable}
+% \hfil}
+% \vfil
+% \vbox to 0pt{%
+% \vss
+% \hbox to 4.5in{
+% \hspace{9pt}
+% {\small Baseline}
+% \hfil}}
+% \vspace{1pt}}}
+% \hbox to 4.5in{
+% \hspace{1.5in}
+% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$
+% \cs{subfigcapskip}
+% \hfil}
+% \hbox to 4.5in{
+% \hbox to\tempdima{
+% \vbox to 20pt{
+% \vfil
+% \copy\tempbox
+% \vfil
+% \hbox{\kern .5mm\cs{subfigcapmargin}}
+% \vfil}}
+% \fbox{\vbox to 20pt{
+% \vfil
+% \hbox to\tempdimb{
+% \hfil
+% {\scshape subcaption}
+% \hfil}
+% \vfil}}
+% \hbox to\tempdima{
+% \vbox to 20pt{
+% \vfil
+% \copy\tempbox
+% \vfil
+% \hbox{\kern .5mm\cs{subfigcapmargin}}
+% \vfil}}
+% \hfill}
+% \hbox to 4.5in{
+% \hspace{1.5in}
+% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$
+% \cs{subfigbottomskip}
+% \hfil}}}}
+%
+% \subfigure[Standard layout {[FIGBOTCAP] or [TABBOTCAP]} with no
+% caption present.]{
+% \label{fig:layout-B}
+% \fbox{\parbox{4.5in}{
+% \vspace{1pt}
+% \hbox to 4.5in{
+% \hspace{1.5in}
+% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$
+% (\cs{subfigtopskip})
+% \hfil}
+% \fbox{\vbox to 45pt{
+% \vskip1pt
+% \vskip\baselineskip
+% \vfil
+% \hbox to 4.5in{
+% \hfil
+% {\scshape subfigure} or {\scshape subtable}
+% \hfil}
+% \vfil
+% \hbox to 4.5in{
+% \hspace{9pt}
+% {\small Baseline}
+% \hfil}
+% \vspace{1pt}}}
+% \hbox to 4.5in{
+% \hspace{1.5in}
+% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$
+% \cs{subfigbottomskip}
+% \hfil}}}}
+%
+% \subfigure[Reversed layout {[FIGTOPCAP] or [TABTOPCAP]}.]{
+% \label{fig:layout-C}
+% \fbox{\parbox{4.5in}{
+% \vspace{1pt}
+% \hbox to 4.5in{
+% \hspace{1.5in}
+% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$
+% (\cs{subfigbottomskip})
+% \hfil}
+% \hbox to 4.5in{
+% \hbox to\tempdima{
+% \vbox to 20pt{
+% \vfil
+% \copy\tempbox
+% \vfil
+% \hbox{\kern -.5mm\cs{subfigcapmargin}}
+% \vfil}}
+% \fbox{\vbox to 20pt{
+% \vfil
+% \hbox to\tempdimb{
+% \hfil
+% {\scshape subcaption}
+% \hfil}
+% \vfil}}
+% \hbox to\tempdima{
+% \vbox to 20pt{
+% \vfil
+% \box\tempbox
+% \vfil
+% \hbox{\kern -.5mm\cs{subfigcapmargin}}
+% \vfil}}
+% \hfill}
+% \hbox to 4.5in{
+% \hbox to 0pt{
+% \hspace{9pt}
+% \smash{\raisebox{-6.5pt}{\small Baseline}}
+% \hss}
+% \hspace{1.5in}
+% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$
+% \cs{subfigcapskip}$+$\cs{subfigcaptopadj}
+% \hfil}
+% \fbox{\vbox to 45pt{
+% \vfil
+% \hbox to 4.5in{
+% \hfil
+% {\scshape subfigure} or {\scshape subtable}
+% \hfil}
+% \vfil}}
+% \hbox to 4.5in{
+% \hspace{1.5in}
+% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$
+% \cs{subfigtopskip}
+% \hfil}}}}
+%
+% \subfigure[Reversed layout {[FIGTOPCAP] or [TABTOPCAP]} with no
+% caption present.]{
+% \label{fig:layout-D}
+% \fbox{\parbox{4.5in}{
+% \vspace{1pt}
+% \hbox to 4.5in{
+% \hbox to 0pt{
+% \hspace{9pt}
+% \smash{\raisebox{-6.5pt}{\small Baseline}}
+% \hss}
+% \hspace{1.5in}
+% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$
+% (\cs{subfigbottomskip})
+% \hfil}
+% \fbox{\vbox to 45pt{
+% \vfil
+% \hbox to 4.5in{
+% \hfil
+% {\scshape subfigure} or {\scshape subtable}
+% \hfil}
+% \vfil}}
+% \hbox to 4.5in{
+% \hspace{1.5in}
+% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$
+% \cs{subfigtopskip}
+% \hfil}}}}
+% \caption{Subfigure and subtable layout.}
+% \label{fig:layout}
+% \end{figure}
+%
+% \subsection{Adjusting the Subcaption}
+% \label{sec:customlabel}
+%
+% The subfigure label has three forms. The first is the one that
+% \DescribeMacro{\subref}
+% \DescribeMacro{\Subref}
+% appears in the text when you use the |\ref| command; the second is the
+% one that appears on the List-of-Figures page and may be used to
+% reference individual subfigures within the figure and subfigure captions,
+% using the |\subref| or |\Subref| commands; and the third is the fully
+% formatted version used under the subfigure as the label part of the caption.
+%
+% The |\ref| command yields the string, saved by the |\label| command,
+% composed by concatenating the value of |\p@subfigure| to
+% |\thesubfigure|. By default these are defined by: ``|\thefigure|''
+% and ``|(\alph{subfigure})|'', respectively, which produces a reference
+% of the figure number followed by the subfigure letter in parentheses.
+%
+% The label used on the List-of-Figures page may be retrieved with the
+% |\subref| command (this value is saved by the |\label| command when
+% the |\label| command is used within the scope of the subfigure. This is
+% the string defined by |\@@thesubfigure|, which, by default, is the
+% value ``|\thesubfigure|'' (or ``|(\alph{subfigure})|'').
+%
+% The label used with the subcaption text is defined by the internal
+% value |\@thesubfigure|, which, by default, has the
+% value\hfil\null\linebreak
+% \centerline{``\cmd{\thesubfigure}\cmd{\hskip}\cmd{\subfiglabelskip}''.}
+% It is prefixed by |\subcapsize\subcaplabelfont| and followed by the
+% subcaption text which is set with |\subcapfont|.
+%
+% \changes{v2.1.4}{30 Apr 2002}{Changed the label and caption defaults
+% from \cmd{\rmfamily}\cmd{\mdseries}\cmd{\upshape} to
+% \cmd{\familydefault}\cmd{\seriesdefault} \cmd{\shapedefault}.}
+% Note that by default |\subcaplabelfont| has the default value
+% ``|{\familydefault| |\seriesdefault\shapedefault}|''. The package
+% options described in table~\ref{tab:options} allow you to set these
+% values for your paper. If you update the |\@subfigure| command, you
+% should include any separator character or spacing between the label
+% and the start of the subcaption text. The default is
+% |\hskip\subfiglabelskip| placed after the label.
+%
+% Finally, the text of the subcaption is prefixed by |\subcapfont| which
+% may be changed using the set of nine lower-case font options described
+% in table~\ref{tab:options}\@.$\!$\footnote{It is also prefixed by
+% \cmd{\subcapsize} as part of the overall label and caption.} \ One other
+% way of changing the layout of the lapel and caption is by replacing
+% the |\@makesubfigurecaption| or |\@makesubtablecaption| command (which
+% by default are identical).
+%
+% \subsection{Adjusting the Subfigure and Subtable Counters}
+% \label{sec:counters}
+%
+% To create some special effects, such as continuing the subfigure
+% \DescribeMacro{\c@figure}
+% \DescribeMacro{\c@table}
+% numbering across several pages as part of one long continued figure,
+% you can back off the number change from a caption with the command:
+% \begin{quote}
+% |\addtocounter{|\Lcount{figure}|}{|-1|}|
+% \end{quote}
+% within the \Lenv{figure} environment. In addition, you can adjust for
+% previous subfigures or subtables with one of the following (here
+% we assume that two subfigures or subtables appeared in the previous
+% pages:
+% \begin{quote}
+% |\addtocounter{|\Lcount{subfigure}|}{|2|}|
+% \end{quote}
+% \vspace{-5pt}
+% \noindent
+% or
+% \vspace{-5pt}
+% \begin{quote}
+% |\addtocounter{|\Lcount{subtable}|}{|2|}|.
+% \end{quote}
+%
+% Two other things that may be necessary, if you switch between figures
+% and tables in the same \Lenv{figure} environment ({\it e.g.\/}, by
+% changing |\@captype|, see section~\ref{sec:float_env}), is to add the
+% command |\listsubcaptions| following the last subfigure when the
+% subfigure is using the \Lopt{TOPCAP} or \Lopt{topcap} option. This is
+% necessary to flush the list of subcaptions before the next
+% \Lenv{subfigure} or \Lenv{subtable}. This also may be necessary if
+% you switch between |\figuretopcaptrue| and |\figuretopcapfalse|. The
+% other thing that may be required in some cases, is to reset the
+% subfigure counter by entering:
+% \begin{quote}
+% |\setcounter{|\Lcount{subfigure}|}{|0|}|
+% \end{quote}
+% \noindent
+% This should only be necessary if you are dynamically switching between
+% different \Lpack{hhsubfigure} options, or changing the |\@captype|,
+% within a float environment.
+%
+% \subsection{Modifying the List-of-Figures and List-of-Tables}
+% \label{sec:listof}
+%
+% To generate a List-of-Figures, or List-of-Tables, page you need to
+% \DescribeMacro{\l@subfigure}
+% \DescribeMacro{\@dottedxxxline}
+% add a |\listoffigures| or |\listoftables| command where
+% you want the list to appear. These
+% commands also cause the appropriate captions and subcaptions to be
+% written to a file with the extensions \Lfile{lof} (\Lfile{lot}). If
+% you want the subcaption text to appear in the List-of-Figures or
+% List-of-Tables page, you need to change the value of the counter
+% \Lcount{lofdepth} (\Lcount{lotdepth}) counter from its default of `1'.
+% For example, to have the \Lpack{hhsubfigure} subcaptions to appear on
+% the List-of-Figures, add the following to the preamble of your
+% paper:
+% \begin{quote}
+% |\setcounter{|\Lcount{lofdepth}|}{2}|
+% \end{quote}
+%
+% If you want to change how the subcaption appears on the ``List-of''
+% pages you can change its format by redefining the |\l@subfigure|
+% or |\l@subtable| command. Usually you will want to use the
+% |\@dottedxxxline| command
+% \PrintIfDefined{sec:dl}{(section~\ref{sec:dl},
+% page~\pageref{sec:dl})\space}{} to help with the formatting. For
+% instance the default value of |\l@subfigure| is:
+%
+% \begin{verbatim}
+% \newcommand{\l@subfigure}{%
+% \@dottedxxxline{\ext@subfigure}{2}{3.8em}{2.5em}}
+% \end{verbatim}
+% \vspace{-10pt}
+%
+% \noindent
+% The arguments of the |\@dottedxxxline| command are:
+% \begin{quote}
+% \begin{enumerate}
+% \itemsep -\parsep
+% \item \underline{\smash{\textsf{Type}}}. The usual values are
+% : \Lfile{lof} or \Lfile{lot}. The internal
+% values |\ext@subfigure| and |\ext@subtable| stand for
+% these extensions.
+% \item \underline{\textsf{Level}}. By default this is `2'
+% for the \Lcount{subfigure} and \Lcount{subtable}. If the level
+% is greater than \Lcount{\meta{Type}depth} (where
+% \underline{\smash{\meta{Type}}} is the first argument, above),
+% then no line is produced.
+% \item \underline{\textsf{Indent}}. Total indentation
+% from the left margin.
+% \item \underline{\textsf{Numwidth}}. Width of box for the
+% label number if the \underline{\textsf{Title}} has a
+% |\numberline| command. This is also the amount of extra
+% indentation added to second and later lines of a multiple
+% line entry.
+% \item \underline{\textsf{Title}}. Contents of entry ({\it e.g.\/} the
+% \meta{list\_entry} or \meta{subcaption}).
+% \item \underline{\smash{\textsf{Page}}}. The page number of the
+% figure or table.
+% \end{enumerate}
+% \end{quote}
+%
+% \noindent
+% The final two arguments, \underline{\textsf{title}} and
+% \underline{\smash{\textsf{page}}}, are automatically appended to the
+% value of |\l@subfigure| (and symmetrically for |\l@subtable|).
+%
+% For example, to change the amount of space reserved for the label
+% (if, for instance, you have a lot of figures and the and you need extra
+% space for the figure number) you could widen the
+% \texttt{2.5em} space for the label to \texttt{4.0em}:
+% \begin{verbatim}
+% \makeatletter
+% \renewcommand{\l@subfigure}{%
+% \@dottedxxxline{\ext@subfigure}{2}{3.8em}{4.0em}}
+% \makeatother
+% \end{verbatim}
+%
+% \subsection{Aligning Captions Above the Figure}
+% \label{sec:custom-position}
+%
+% \begin{figure}^
+% \figuretopcaptrue
+% \subfigtopskip=-5pt^
+% \subfigcapskip=-3pt^
+% \subfigbottomskip=2pt^
+% \centering
+% \caption{Caption position option: [\Lopt{figtopcap}] with changing
+% settings of \cmd{\subfiguretopcap}.}^
+% \label{fig:position3}^
+% \subfiguretopcapfalse
+% \subfigure[First caption.]{\hbox to 1.5in{\hfil\null}}^
+% \hspace{0.2in}^
+% \subfigure[Second long, long, long, long,
+% long, long, long, long caption.]{^
+% \hbox to 1.5in{\hfil\null}}\\[5pt]
+% \subfiguretopcaptrue
+% \subfigure{\fbox{\hbox to 1.5in{\vbox to 15mm{\vfil\null}\hfil}}}^
+% \hspace{0.2in}^
+% \subfigure{\fbox{\hbox to 1.5in{\vbox to 10mm{\vfil\null}\hfil}}}^
+% \setcounter{subfigure}{0}
+% \end{figure}
+%
+% \noindent
+% For unbalanced sets of captions placed, above the figures or tables,
+% \DescribeMacro{\subfiguretopcaptrue}
+% \DescribeMacro{\subfiguretopcapfalse}
+% \DescribeMacro{\figuretopcaptrue}
+% the caption portion looks unbalanced, such as the ones in
+% figure~\ref{fig:position2}. If you prefer to have the caption portion
+% aligned along the top rather than the bottom, as shown in
+% figure~\ref{fig:position3}, you can use the
+% \Lopt{figtopcap} option as in figure~\ref{fig:position2}, but use
+% two ``empty'' subfigures to position the captions followed by
+% two more containing the figures, but without captions. The code
+% to produce this example is:
+%
+% \begin{verbatim}
+% \begin{figure}%
+% \centering
+% \caption{Caption position option: [\Lopt{figtopcap}] with changing
+% settings of \subfiguretopcap.}%
+% \label{fig:position3}%
+% \subfiguretopcapfalse
+% \subfigure[First caption.]{\hbox to 1.5in{\hfil\null}}%
+% \hspace{0.2in}%
+% \subfigure[Second long, long, long, long,
+% long, long, long, long caption.]{%
+% \hbox to 1.5in{\hfil\null}}\\[5pt]
+% \subfiguretopcaptrue
+% \subfigure{\fbox{\hbox to 1.5in{\vbox to 15mm{\vfil\null}\hfil}}}%
+% \hspace{0.2in}%
+% \subfigure{\fbox{\hbox to 1.5in{\vbox to 10mm{\vfil\null}\hfil}}}%
+% \end{figure}
+% \end{verbatim}
+%
+% This example makes use of one of the four flags that control how the
+% caption labels are numbered and where the subcaption appears. Two are
+% for |\subfigure| and two for |\subtable|. The first of each set tell
+% the |\subfigure| or |\subtable| command that the related main caption
+% appears before or after the set of subfloats. |\figuretopcaptrue| and
+% |\tabletopcaptrue| indicate that the caption appears before and
+% |\figureotopcapfalse| and |\tabletopcapfalse| indicate that the it
+% appears after. The other two flags force the subcaption to be placed
+% before (|\subfiguretopcaptrue| and |\subtabletopcaptrue|) or after the
+% actual subfigure or subtable (|\subfiguretopcapfalse| and
+% |\subtabletopcapfalse|).
+%
+% There are two difficulties with this approach, first, you need to keep
+% changing the setting of |\subfiguretopcap|, and second, if you have
+% more than one row of subfigures or subtables, then you will need to
+% fiddle with the counter (see section~\ref{sec:counters} to keep the
+% numbers straight. The reason that this format is not supported by the
+% \Lpack{hhsubfigure} package is that you need information about all of
+% the subfigure or subtables on a row to box the figures correctly and
+% this information is not available locally.
+%
+% \subsection{Adding Subfloats to New Environments}
+% \enlargethispage{15pt}^finalhack
+% \label{sec:customfloat}
+%
+% It is easy to add a \Lenv{subfloat} command to a new environment. For
+% instance, let us assume we have a new \Lenv{float}
+% environment\footnote{For information on creating new float
+% environments, see any of the following: \cite{Lamp01}, \cite{Wils01}
+% or \cite{Ling01}.} called ``\Lenv{map}'' in which various maps are
+% displayed and for which a List-of-Maps is to be generated in the
+% contents section. If we wanted to have \Lenv{submaps}, then we could
+% define the following:
+%
+% \vspace{-4pt}
+% \begin{verbatim}
+% \makeatletter
+% \newcounter{submap}[map]
+% \newif\ifmaptopcap
+% \newif\ifsubmaptopcap
+% \newcommand{\p@submap}{\themap}
+% \newcommand{\thesubmap}{(\alph{submap})}
+% \newcommand{\@thesubmap}{\themap\hskip\subfiglabelskip}
+% \newcommand{\@@thesubmap}{\themap}
+% \newcommand{\ext@submap}{\ext@map}
+% \newcommand{\l@submap}{\@dottedxxxline{\ext@submap}{2}{3.8em}{2.5em}}
+% \newcounter{lomdepth}
+% \setcounter{lomdepth}{1}
+% \newcommand{\submap}{\subfigure}
+% \newcommand{\@makesubmapcaption}{\@makesubfigurecaption}
+% \ifhyperrefloaded
+% \newcommand\theHsubmap{\themap.\arabic{submap}}
+% \newcommand{\toclevel@submap}{1}
+% \fi
+% \makeatother
+% \end{verbatim}
+% \vspace{-14pt}
+%
+% The first and last lines make the character `@' act like a letter
+% between them and therefore it may be part of a command name used there.
+% First a new counter for the \Lpack{submap} is created along with two
+% conditionals that define where the position ({\i.e.\/}, above or
+% below) of the main caption and subcaption is with respect to the
+% submap. Then the four commands that define the \Lpack{submap} label
+% are created. The first two, |\p@submap| and |\thesubmap| define the
+% standard label returned by |\ref|. The next, |\@thesubmap| gives the
+% label as shown under or over the submap with the subcaption and the
+% last, |\@@thesubmap| shows how the label is displayed on the List-of-Maps
+% and/or referenced with the |\subref| command.
+%
+% The next four lines show where and how to print to the List-of-Maps
+% page: |\ext@submap| gives the List-of-Maps file extension; |\l@submap|
+% shows how to print the submap line on the List-of-Maps page; and the last
+% two lines show how to create and set the counter \Lcount{lomdepth}, which
+% controls how many caption levels are shown on the page when it is printed.
+%
+% The next two lines create the |\submap| and |\@makesubmapcaption|
+% commands by making them the same as the |\subfigure| and
+% |\@makesubfigurecaption| commands.
+%
+% The last four lines conditionally create the |\theHsubmap| and
+% |\toclevel@submap| commands which are used by the \Lpack{hyperref}
+% Package to name the item and to control the presence of the item
+% bookmark.
+%
+% Of course, this is where the \Lpack{ccaption} package \cite{Wils01}
+% comes in handy since it will do all of the above with one command:
+%
+% \vspace{-4pt}
+% \begin{verbatim}
+% \newsubfloat{map}
+% \end{verbatim}
+% \vspace{-10pt}
+%
+%
+% \subsection{Interaction with Other Parts of \LaTeX}
+% In the following sections, the interaction of the \Lpack{hhsubfigure}
+% package with other parts of \LaTeX\ is documented. These ``other
+% parts'' may be either part of the the \LaTeX\ base or contributed
+% packages or classes.
+%
+% \subsubsection{\TeX 's ``Mouth''}
+% The most important thing to remember when laying out your figures
+% within a \Lenv{float} environment is that spaces take room. If you
+% have an extra space between two figures, then they will be separated
+% by a little bit.
+%
+% \TeX 's state varies as it reads a line of text from a file. It
+% ignores some spaces and carriage-returns and converts others to
+% |\space|'s or |\par|'s. You can use a `|%|' to insure that you only
+% have real spaces where you want them. To understand which spaces
+% are significant, you should read chapters~7 and 8 of the \TeX book
+% \cite{Knut86}. However, the main source of unexpected
+% extra spacing is carriage-returns which are turned in to |\space|'s.
+% As a general rule: if in doubt, then add a `|%|' immediately after
+% the last significant character of the line.
+%
+% \subsubsection{The Float Environment}
+% \label{sec:float_env}
+%
+% Although the \Lpack{hhsubfigure} package was designed to work within a
+% \Lenv{float} environment ({\it e.g.\/}, \Lenv{figure} or
+% \Lenv{table}), it can be used outside with the following two caveats:
+% \begin{enumerate}\itemsep=5pt
+% \item You need to define |\@captype|. This is usually either
+% \Lenv{figure} or \Lenv{table}. For example add the following
+% to the preamble of your document:
+% \begin{verbatim}
+% \makeatletter
+% \newcommand{\change_cap_type}[1]{%
+% \renewcommand{\@captype}{#1}}
+% \makeatother
+% \end{verbatim}\vspace{-15pt}
+% Then use the new command to switch in the middle of a given
+% \Lenv{float} environment, say from ``figure'' to ``table'' with
+% the command |\change_cap_type{table}|.
+% \item If you want to define references using |\label|, then you also
+% need to redefine the \LaTeX\ internal |\@currentlabel|. For
+% example:
+% \begin{verbatim}
+% \makeatletter
+% \edef\@currentlabel{\p@subfigure\thesubfigure}
+% \makeatother
+% \end{verbatim}\vspace{-15pt}
+% before using the |\label| command. NOTE: Many other commands change
+% |\@currentlabel|, including all of the ``section'' commands,
+% |\caption|, \Lenv{equation}'s, and \Lenv{theorem}'s.
+% \end{enumerate}
+%
+% \subsubsection{Interaction with Other Packages}
+%
+% \changes{v2.1}{22 Jan 2001}{Added \Lpack{ccaption} reference.}
+%
+% \changes{v2.1}{11 Oct 1996}{Revised subsubsection on use with
+% the caption package and extended this section to talk about the
+% \Lpack{captcont} package.}
+%
+% \noindent
+% The only packages that directly interact with the \Lpack{hhsubfigure}
+% package are the \Lpack{caption}/\Lpack{caption2} packages by
+% H.A. Sommerfeldt \cite{Somm95a,Somm95b}, the \Lpack{ccaption} package
+% and \Lpack{tocloft} packages by Peter Wilson \cite{Wils01,Wils01B},
+% and the \Lpack{captcont} package by S.D. Cochran \cite{Coch02}.
+%
+% \paragraph{\Lpack{caption}}
+%
+% If you load the \Lpack{hhsubfigure} package {\bf before} the
+% \Lpack{caption} package, then the \Lpack{caption} package will detect
+% that fact and will change the |\subcapsize| when the options
+% \Lopt{scriptsize}, \ldots, \Lopt{Large} are specified (overriding such
+% options used when loading the \Lpack{hhsubfigure} package). In
+% addition, it redefines |\@thesubfigure| and |\@thesubtable| to use
+% |\captionlabelfont|. It also uses an older layout of
+% |\@thesubsubfigure| and |\@thesubtable|.
+%
+% The best plan is to load the \Lpack{caption} package {\bf before} the
+% \Lpack{hhsubfigure} package. In addition, you should try to coordinate
+% the ``look and feel'' of the two packages. This limits you a little
+% since, although the two packages have similar options, the options in
+% the \Lpack{caption} package do not combine the same way. You can pick
+% one from each column:\par\null
+%
+% \DeleteShortVerb{\|}
+% \noindent\hfil\begin{tabular}{*{4}{p{17mm}|}p{17mm}}
+% \rr \Lopt{normal}, \Lopt{hang}, \Lopt{center}, \Lopt{centerlast} &
+% \rr \Lopt{nooneline} &
+% \rr \Lopt{scriptsize}, \Lopt{footnotesize}, \Lopt{small},
+% \Lopt{normalsize}, \Lopt{large}, \Lopt{Large} &
+% \rr \Lopt{up}, \Lopt{it}, \Lopt{sl}, \Lopt{sc}, \Lopt{md},
+% \Lopt{bf}, \Lopt{rm}, \Lopt{sf}, \Lopt{tt} &
+% \rr (Other options---see package.)
+% \end{tabular}
+% \MakeShortVerb{\|}
+% \vskip14pt
+%
+% \paragraph{\Lpack{caption2}}
+%
+% This package acts similarly to the \Lpack{caption} package. If you
+% specify the \Lopt{subfigure} it will try to support the subfigure
+% package, if you specify \Lopt{nosubfigure} than it will not. If
+% neither option is specified, than load order matters. If loaded
+% {\bf before} the \Lpack{hhsubfigure} package, than it will not try to
+% support the package and if loaded {\bf after} it will.
+%
+% Again, the best plan is to load the \Lpack{caption2} package
+% {\bf before} the \Lpack{hhsubfigure} package, and specify the
+% \Lopt{nosubfigure} option. In addition, you should try to coordinate
+% the ``look and feel'' of the two packages. This limits you a little
+% since, although the two packages have similar options, they are not
+% exactly the same; however, most of the good looking combinations are
+% easily available. You can pick one from each column:\par\null
+%
+% \DeleteShortVerb{\|}
+% \noindent\hfil\begin{tabular}{*{5}{p{17mm}|}p{17mm}}
+% \rr \Lopt{nosubfigure}, \Lopt{subfigure} &
+% \rr \Lopt{normal}, \Lopt{hang}, \Lopt{center}, \Lopt{centerlast}
+% \Lopt{flushleft}, \Lopt{indent} &
+% \rr \Lopt{oneline}, \Lopt{nooneline} &
+% \rr \Lopt{scriptsize}, \Lopt{footnotesize}, \Lopt{small},
+% \Lopt{normalsize}, \Lopt{large}, \Lopt{Large} &
+% \rr \Lopt{up}, \Lopt{it}, \Lopt{sl}, \Lopt{sc}, \Lopt{md},
+% \Lopt{bf}, \Lopt{rm}, \Lopt{sf}, \Lopt{tt}^,
+%^ \Lopt{UP}, \Lopt{IT}, \Lopt{SL}, \Lopt{SC}, \Lopt{MD},
+%^ \Lopt{BF}, \Lopt{RM}, \Lopt{SF}, \Lopt{TT}
+% &
+% \rr (Other options---see package.)
+% \end{tabular}
+% \MakeShortVerb{\|}
+%
+% \paragraph{\Lpack{ccaption}}
+%
+% The \Lpack{ccaption} package provides for all sorts of extensions and
+% style options for \Lenv{float} |\captions|. It also provides for the
+% use of the |\caption| command outside of a \Lenv{float} environment and
+% a mechanism for creating new types of \Lenv{float} environments.
+%
+% In order to use it with the \Lpack{hhsubfigure} package, you need to
+% pass the \Lopt{subfigure} option when loading it:
+%
+% \begin{quote}
+% |\usepackage|[subfigure]\{ccaption\}
+% \end{quote}
+%
+% \paragraph{\Lpack{tocloft}}
+%
+% The \Lpack{tocloft} package gives the user the ability to easily
+% configure the ``List-of'' pages. It takes a \Lopt{subfigure} option
+% so it doesn't matter which package is loaded first.
+%
+% \begin{quote}
+% |\usepackage|[subfigure]\{tocloft\}
+% \end{quote}
+%
+% \paragraph{\Lpack{hyperref}}
+% \label{sec:hyperref}
+%
+% \changes{v2.1.2}{26 Mar 2002}{Improved coordination with the hyperref
+% package.}
+%
+% \changes{v2.1.1}{15 Mar 2002}{Added coordination with the hyperref
+% package. There is some interaction with the \cmd{label} command as
+% pointed out by Martin.Bernreuther@po.uni-stuttgart.de.}
+%
+% The \Lpack{hyperref} package extends the functionality of all of the
+% \LaTeX\ cross-referencing commands to produce hypertext links. In
+% addition, it provides new commands to allow the user to insert
+% hypertext links. When used with the \Lpack{hhsubfigure} package, they
+% may be loaded in any order; however, it might be better if the
+% \Lpack{hhsubfigure} package is loaded {\bf first}.
+%
+% To more fully support the \Lpack{hyperref} package, the |\label|
+% \DescribeMacro{\subfloat@label}
+% command, when used within the scope of the |\subfigure| or |\subtable|
+% commands takes an optional argument (note the parentheses rather than
+% square brackets):
+% \vspace{-2pt}
+% \begin{quote}
+% |\label|\parg{bookmark}\marg{key}
+% \end{quote}
+% \vspace{-2pt}
+%
+% \noindent
+% We would like to use the subcaption as the bookmark text, but the
+% |\label| command is often processed before the subcaption. Therefore,
+% this optional argument may be used to supply this information if
+% desired. By default a bookmark field of the form
+% ``Subfigure\textvisiblespace 1(a)'' will be generated.
+% \footnote{If the document class is \Lpack{report} or other class that
+% defines \cmd{\thechapter}, than the default bookmark field will be of the
+% form ``Subfigure\textvisiblespace 1 \textvisiblespace 1(a)''.}
+%
+%
+% \paragraph{\Lpack{captcont}}
+%
+% This package may be used with or without the \Lpack{hhsubfigure} package
+% \DescribeMacro{\caption}
+% \DescribeMacro{\caption*}
+% \DescribeMacro{\captcont}
+% \DescribeMacro{\captcont*}
+% to extend figure or table numbering across multiple pages. This
+% package knows about how the \Lpack{hhsubfigure} package interacts with
+% the List-of-Figures and List-of-Tables and does the right thing when
+% used with \Lenv{subfigure}'s and \Lenv{subtable}'s.
+%
+% The \Lpack{captcont} package may be loaded either {\bf before} or
+% {\bf after} the \Lpack{hhsubfigure} and it has four options:
+% \Lopt{figbotcap} or \Lopt{figtopcap} and \Lopt{tabbotcap} or
+% \Lopt{tabtopcap}. These are the same as the \Lpack{hhsubfigure}
+% options. When the \Lpack{captcont} package is used with the
+% \Lpack{hhsubfigure} package, only the \Lpack{hhsubfigure} options matter.
+% Any given with the \Lpack{captcont} package are ignored.
+%
+% The thing to remember about the \Lpack{captcont} package is that if
+% you normally place the |\caption| {\bf before} your subfigures or
+% subtables ({\it i.e.\/}, \Lopt{figtopcap} or \Lopt{tabtopcap}
+% respectively), then you start a series of continued \Lenv{figure}'s
+% with the |\caption[*]| and use |\contcapt[*]| in each of the rest of
+% the figures. If you {\bf follow} your subfigures or subtables with a
+% caption ({\it i.e.\/}, \Lopt{figbotcap} or \Lopt{tabbotcap}
+% respectively), then you start the series with the |\contcapt[*]| in
+% the first \Lenv{figure} environment and all but the last where you use
+% the |\caption[*]|.
+%
+% \subsubsection{Creating a \Lenv{subfigure} Environment}
+%
+% \changes{v2.1.4}{24 Apr 2002}{Added \cmd{\label} command handling
+% example in the \Lenv{subfloat} environment, thanks to Lars Clausen.}
+%
+% Some people have wanted to use the \Lenv{verbatim} environment within
+% \DescribeEnv{subfloat}
+% the \cmd{\subfigure} command and run into the restriction that the
+% \Lenv{verbatim} environment cannot be nested. To include verbatim text in
+% a subfigure, you can define a new environment, in which verbatim
+% text may be enclosed, and which calls the \cmd{\subfigure} command.
+% \vspace{-2pt}
+% \begin{verbatim}
+% \newbox\subfigbox % Create a box to hold the subfigure.
+% \makeatletter
+% \newenvironment{subfloat}% % Create the new environment.
+% {\def\caption##1{\gdef\subcapsave{\relax##1}}%
+% \let\subcapsave=\@empty % Save the subcaption text.
+% \let\sf@oldlabel=\label
+% \def\label##1{\xdef\sublabsave{\noexpand\label{##1}}}%
+% \let\sublabsave\relax % Save the label key.
+% \setbox\subfigbox\hbox
+% \bgroup}% % Open the box...
+% {\egroup % ... close the box and call \subfigure.
+% \let\label=\sf@oldlabel
+% \subfigure[\subcapsave]{\box\subfigbox}}%
+% \makeatother
+% \end{verbatim}
+% \enlargethispage{12pt}^finalhack
+% \noindent
+% The following is an example of this \Lenv{subfloat} environment begin
+% used to produce figure~\ref{fig:verbatim}. Note that you need to
+% supply the width of the \Lenv{verbatim}; here we use a section using a
+% \Lenv{minipage}).
+% \begingroup
+% \newbox\subfigbox
+% \makeatletter
+% \newenvironment{subfloat}^
+% {\def\caption##1{\gdef\subcapsave{\relax##1}}^
+% \let\subcapsave=\@empty
+% \let\sf@oldlabel=\label
+% \def\label##1{\xdef\sublabsave{\noexpand\label{##1}}}^
+% \let\sublabsave\relax
+% \setbox\subfigbox\hbox
+% \bgroup}^
+% {\egroup
+% \let\label=\sf@oldlabel
+% \subfigure[\subcapsave]{\box\subfigbox\sublabsave}}^
+% \makeatother
+% \begin{figure}
+% \centering
+% \subfigtopskip=0pt^
+% \subfigcapskip=0pt^
+% \subfigbottomskip=0pt^
+% \begin{subfloat}^
+% \begin{minipage}{2.1in}
+% \begin{verbatim}
+% This text should be
+% verbatim. And not
+% messed with in any way !
+% \end{verbatim}
+% \end{minipage}^
+% \caption{First subcaption.}^
+% \label{fig:verbone}
+% \end{subfloat}^
+% \hspace{10pt}^
+% \begin{subfloat}^
+% \begin{minipage}{2.1in}
+% \begin{verbatim}
+% This text (also)should be
+% verbatim. And not
+% messed with in any way !
+% \end{verbatim}
+% \end{minipage}^
+% \caption{Second subcaption.}^
+% \label{fig:verbtwo}
+% \end{subfloat}
+% \caption{Subfigures~\subref{fig:verbone} and \subref{fig:verbtwo}
+% show examples of using verbatim text in a subfigure.}
+% \label{fig:verbatim}
+% \end{figure}
+% \endgroup
+% \begin{quote}\
+% |\begin{figure}| \\
+% | \centering|
+% | \begin{subfloat}%| \\
+% | \begin{minipage}{2.1in}| \\
+% | \begin{verbatim}| \\
+% | This text should be| \\
+% |verbatim. And not| \\
+% | messed with in any way !| \\
+% | \end{verbatim}| \\
+% | \end{minipage}%| \\
+% | \caption{First subcaption.}%| \\
+% | \label{fig:verbone}| \\
+% | \end{subfloat}%| \\
+% | \qquad| \\
+% | \begin{subfloat}%| \\
+% | \begin{minipage}{2.1in}| \\
+% | \begin{verbatim}| \\
+% | This text (also)should be| \\
+% |verbatim. And not| \\
+% | messed with in any way !| \\
+% | \end{verbatim}| \\
+% | \end{minipage}%| \\
+% | \caption{Second subcaption.}%| \\
+% | \label{fig:verbtwo}| \\
+% | \end{subfloat}| \\
+% | \caption{Subfigures~\subref{fig:verbone} and \subref{fig:verbtwo}| \\
+% | show examples of using verbatim text in a subfigure.}| \\
+% | \label{fig:verbatim}| \\
+% |\end{figure}|
+% \end{quote}
+%
+%
+% \StopEventually{^
+% \section{Acknowledgements}
+%
+% This package was originally written to automatically line up some
+% figure boxes and place labels under them for a paper that I was
+% writing. I thought it useful and uploaded it to the internet
+% community and later to CTAN. Many people have asked questions or
+% given comments which collectively have changed and improved the
+% usefulness of this package.
+%
+% A few people have contributed more than most and I want to thank
+% them publicly, but in no particular order:
+%
+% \begin{itemize}\itemsep=-2pt^finalhack
+% \item{\bf Harald Axel Sommerfeldt} for the work that he did to adjust
+% his \Lpack{caption} and \Lpack{caption2} packages as necessary to
+% support the \Lpack{hhsubfigure} package when they are loaded together.
+% \item {\bf Peter Wilson} for the work that he did to adjust his
+% \Lpack{ccaption} package (and other packages) as necessary to support
+% the \Lpack{hhsubfigure} package when they are loaded together.
+% \item {\bf William `bil' L. Kleb} for his extensive list of errors and
+% suggestions to this documentation.
+% \item{\bf Axel Reichert} for his request for a `hang' caption style
+% since the subcaptions tend to have a short width. And, for his
+% request for some way of referencing the individual subfigures in
+% the main caption without the figure number.
+% \item{\bf Harald Harders} for his suggestion of the \cmd{\subref}
+% command and modifying \cmd{\label} within the \Lpack{hhsubfigure}
+% package to save local references to the subfigures that are often
+% needed.
+% \item{\bf Heiko Oberdiek} and {\bf James A. Bednar} for their help
+% with coexisting with the \Lpack{hyperref} and \Lpack{html} packages.
+% Also, {\bf Ingele Roelens} for pointing out some further compatibility
+% problems when using the \Lpack{hyperref} package with PDF\LaTeX.
+% \item{\bf Frederic Darboux} for searching out and finding several
+% incompatibilities with other packages.
+%
+% \end{itemize}
+%
+% \newpage^finalhack
+%
+% \begin{thebibliography}{6}^\itemsep=-2pt^finalhack
+% \itemsep=0.8pt
+% \bibitem{Somm95a}^
+% Harald Axel Sommerfeldt,
+% \emph{The \Lpack{caption} Package},
+% Version 1.4b, 1995/04/05.
+% (Available from CTAN as file \texttt{caption.dtx}.)
+% \bibitem{Somm95b}^
+% Harald Axel Sommerfeldt,
+% \emph{The \Lpack{caption} Package},
+% Version 2.0(beta), 1995/10/09.
+% (Available from CTAN as file \texttt{caption2.dtx}.)
+% \bibitem{Wils01}^
+% Peter Wilson,
+% \emph{The \Lpack{ccaption} Package},
+% Version 1.0a, 2001/08/15.
+% (Available from CTAN as file \texttt{ccaption.dtx}.)
+% \bibitem{Wils01B}^
+% Peter Wilson,
+% \emph{The \Lpack{tocloft} Package},
+% Version 2.2, 2001/14/17.
+% (Available from CTAN as file \texttt{ccaption.dtx}.)
+% \bibitem{Raht02}^
+% Sebastian Rahtz,
+% \emph{Hypertext marks in \LaTeX},
+% 2002/04/05/.
+% (Available from CTAN as file \texttt{hyperref.dtx}.)
+% \bibitem{Coch02}^
+% Steven Douglas Cochran,
+% \emph{The \Lpack{captcont} Package},
+% 2002/02/14/.
+% (Available from CTAN as file \texttt{captcont.dtx}.)
+% \bibitem{Reck97}^
+% Keith Reckdahl,
+% \emph{Using Imported Graphics in \LaTeXe},
+% 1997/12/15.
+% (Available from CTAN as file \texttt{epslatex.pdf})
+% \bibitem{Lamp94}^
+% Leslie Lamport,
+% \emph{LaTeX User's Guide and Reference Manual}, 2nd edition,
+% Addison-Wesley, Reading, Massachusetts,
+% 1994.
+% \bibitem{Knut86}^
+% Donald Ervin Knuth,
+% \emph{The \TeX book},
+% Addison-Wesley, Reading, Massachusetts,
+% 1986.
+% \bibitem{Lamp01}^
+% Leslie Lamport, Frank Mittelbach, and Johannes Braams,
+% \emph{Standard Document Classes for \LaTeX\ version 2e}
+% Version 1.4e, 2001/04/01.
+% (Available from CTAN as file \texttt{classes.dtx}.)
+% \bibitem{Ling01}^
+% Anselm Lingnau,
+% \emph{An Improved Environment for Floats.}
+% Version 1.3d, 2001/11/08.
+% (Available from CTAN as file \texttt{float.dtx}.)
+% \end{thebibliography}}
+%
+% \section{The Code}
+% \iffalse
+%<*package>
+% \fi
+% \subsection{Identification}
+%
+% \changes{v2.1}{23 Jan 2002}{Updated the release date.}
+%
+% \changes{v2.1}{11 Oct 1996}{Removed compatibility with \LaTeX2.09.}
+%
+% Announce the \Lpack{hhsubfigure} package.
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{hhsubfigure}[2003/09/14 v2.1.4a (hh)subfigure package]
+% \end{macrocode}
+%
+% \subsection{Check for the \Lpack{hyperref} Package}
+%
+% \changes{v2.1.4}{02 Jul 2002}{Added the \cmd{\theHsubfigure} and
+% \cmd{\theHsubtable} commands to avoid duplicate names in a PDF
+% file when using the \Lpack{hyperref} Package.}
+%
+% \changes{v2.1.3}{17 Apr 2002}{Changed \cmd{\newcommand} to
+% \cmd{\providecommand} to allow other packages to set the
+% \cmd{\toclevel@subfigure} and \cmd{\toclevel@subtable}.}
+%
+% \changes{v2.1.2}{26 Mar 2002}{Changed to simplify the interaction
+% with the hyperref package and avoid loading nameref.}
+%
+% \changes{v2.1.1}{15 Mar 2002}{Added coordination with the hyperref
+% package.}
+%
+% \begin{macro}{\toclevel@subfigure}
+% \begin{macro}{\toclevel@subtable}
+%
+% After every package is loaded, check to see if the \Lpack{hyperref}
+% package was among them, if so, then make sure that the |\ifhyperrefloaded|
+% switch is set so that the |\subfloat@label| command will write the correct
+% form of the |\newlabel| to the \Lfile{aux} file. Also define the
+% ``TOC level'' of the subfigure and subtable. We fix these at one since
+% the default figure and table levels are zero. Finally, we add definitions
+% for |\theHsubfigure| and |\theHsubtable| to avoid duplicate names in
+% the PDF file when using the \Lpack{hyperref} Package.
+%
+% \begin{macrocode}
+\newif\ifhyperrefloaded
+\AtBeginDocument{%
+ \@ifpackageloaded{hyperref}{%
+ \hyperrefloadedtrue
+ \providecommand\theHsubfigure{\thefigure.\arabic{subfigure}}%
+ \providecommand\theHsubtable{\thetable.\arabic{subtable}}%
+ \providecommand{\toclevel@subfigure}{1}%
+ \providecommand{\toclevel@subtable}{1}}{}}
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Initialization and Shared Constants}
+% \begin{macro}{\ifsubcaphang}
+% \begin{macro}{\ifsubcapcenter}
+% \begin{macro}{\ifsubcapcenterlast}
+% \begin{macro}{\ifsubcapnooneline}
+% \begin{macro}{\ifsubcapraggedright}
+%
+% \changes{v2.1}{23 Jan 2002}{Added.}
+%
+% These five flags control how the style in which the subfloat label and
+% caption are printed. The \Lif{subcaphang} flag is first checked and
+% if true, causes the subcaption label to be typeset separately and
+% placed to the upper left of the space available for the subcaption.
+% The \Lif{subcapcenter} flag centers each line of the subcaption. The
+% \Lif{subcapcenterlast} centers the last line of the subcaption (this
+% is a {\sc nop} if the \Lif{subcapcenter} flag is true. If the
+% \Lif{subcapnooneline} is false, then the label plus the text of the
+% subcaption are centered. If it is true, than the other flags may
+% cause something different to happen. The purpose of this flag,
+% generally, is to cause a single line to be left justified when there
+% is a very short caption. The last flag is the \Lif{subcapraggedright}
+% which typsets its text without lining up the right side. This is
+% useful for the subcaptions since they are usually short and prone to
+% generating hyphenated words unless allowed to be ragged.
+%
+% \begin{macrocode}
+\newif\ifsubcaphang
+\newif\ifsubcapcenter
+\newif\ifsubcapcenterlast
+\newif\ifsubcapnooneline
+\newif\ifsubcapraggedright
+\newif\ifsubcapRaggedRight
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \noindent
+% Table~\ref{tab:defaults} gives the initial (default) values of the
+% internals that are used to control the placement and printing of the
+% subfloats.
+%
+% \changes{v2.1.4}{30 Apr 2002}{Changed the label and caption defaults
+% from \cmd{\rmfamily}\cmd{\mdseries}\cmd{\upshape} to
+% \cmd{\familydefault}\cmd{\seriesdefault} \cmd{\shapedefault}.}
+% \DeleteShortVerb{\|}
+% \MakeShortVerb{\/}
+% \begin{table}^
+% \def\pz{\phantom{0}}^
+% \def\M#1{\vspace*{#1}}
+% \caption[Default values of the Subfigure constants.]%
+% {Default values of the Subfigure constants. These
+% values are set during the options processing (see
+% section~\ref{sec:startup}).}^
+% \label{tab:defaults}^
+% \vspace{5pt}^
+% \begin{minipage}{4.8in}^
+% \setlength\tabcolsep{5pt}^
+% \rr
+% \begin{tabular}{|l|c|p{1.3in}|p{1.963in}|}\hline
+% \multicolumn{1}{|c|}{\raisebox{-1.5ex}{\bf Command}}
+% & \multicolumn{1}{c|}{\bf \Lopt{loose}}
+% & \multicolumn{1}{c|}{\bf \Lopt{tight}}
+% &
+% \multicolumn{1}{c|}{\raisebox{-1.5ex}{\bf Description}}
+% \\
+% & \multicolumn{1}{c|}{\bf Option}
+% & \multicolumn{1}{c|}{\bf Option}
+% & \\ \hline
+% \raisebox{-2.1ex}{\cmd{\subfigtopskip}}
+% & \raisebox{-2.1ex}{10 pt}
+% & \M{0.6ex}\hfil 5 pt
+% & \rr Length from the top of the subfloat
+% box to the beginning of the figure.
+% \\ \hline
+% \raisebox{-1.5ex}{\cmd{\subfigcapskip}}
+% & \raisebox{-1.5ex}{10 pt}
+% & \M{0.0ex}\hfil 0 pt
+% & \rr Length between the baseline of the
+% subcaption and the figure.
+% \\ \hline
+% \raisebox{-2.1ex}{\cmd{\subfigcaptopadj}}
+% & \raisebox{-2.1ex}{\pz0 pt}
+% & \M{0.4ex}\hfil 3 pt
+% & \rr Length added to /\subfigcapskip/
+% when the caption is above the figure.
+% \\ \hline
+% \raisebox{-2.1ex}{\cmd{\subfigbottomskip}}
+% & \raisebox{-2.1ex}{10 pt}
+% & \M{0.7ex}\hfil 5 pt
+% & \rr Length from the bottom of the
+% subcaption to the bottom of the
+% subfloat.
+% \\ \hline
+% \raisebox{-3.5ex}{\cmd{\subfigcapmargin}}
+% & \raisebox{-3.5ex}{10 pt}
+% & \M{2.0ex}\hfil 0 pt
+% & \rr Indentation of the subcaption from
+% the sides of the subfloat box. (This
+% should always be positive or zero.)
+% \\ \hline
+% \raisebox{-1.5ex}{\cmd{\subfiglabelskip}}
+% & \raisebox{-1.5ex}{0.33 em}
+% & \raggedleft 0.33 em plus 0.07 em minus 0.03 em
+% & \rr Space between the label and the
+% text of the subcaption.
+% \\ \hline
+% \raisebox{-1.5ex}{\cmd{\subcapsize}}
+% & \multicolumn{2}{c|}{\raisebox{-1.5ex}{footnotesize}}
+% & \rr Size for the text portion of the
+% subcaption font.
+% \\ \hline
+% \raisebox{-1.5ex}{\cmd{\subcaplabelfont}}
+% & \multicolumn{2}{c|}{\raisebox{-1.5ex}{(Default family, series and shape)}}
+% & \rr Font for the label portion of the
+% subcaption.
+% \\ \hline
+% \raisebox{-1.5ex}{\cmd{\subcapfont}}
+% & \multicolumn{2}{c|}{\raisebox{-1.5ex}{(Default family, series and shape)}}
+% & \rr Font for the text portion of the
+% subcaption.
+% \\ \hline
+% \end{tabular}
+% \end{minipage}
+% \end{table}
+% \DeleteShortVerb{\/}
+% \MakeShortVerb{\|}
+%
+% \begin{macro}{\subfigtopskip}
+% \begin{macro}{\subfigcapskip}
+% \begin{macro}{\subfigcaptopadj}
+% \begin{macro}{\subfigbottomskip}
+%
+% \changes{v2.1}{22 Jan 1997}{Reduced the space to the values separating
+% subfloat caption and figure box and its top and bottom. Added
+% \cmd{\subfigcaptopadj} in case it is needed in styles that with figure
+% subcaptions on the bottom and table subcaptions on the top.}
+%
+% See figure~\ref{fig:layout} for details of where these take effect.
+% Generally the |\subfigtopskip| appears between the figure or table and
+% the edge of the box. |\subfigbottomskip| appears between the
+% subcaption and the edge of the box. If the subcaption follows the
+% figure or table, then |\subfigcapskip| is placed before it along with
+% ({\it i.e.\/}, in addition to) a |\baselineskip|. If the subcaption
+% comes before the figure or table then |\subfigcapskip| is placed
+% after it along with |\subfigcaptopadj|. Although several of the above
+% are {\tt skip}'s they are typset at their base size and will not
+% shrink or expand.
+%
+% \begin{macrocode}
+\newskip\subfigtopskip \subfigtopskip = 5\p@
+\newskip\subfigcapskip \subfigcapskip = 0\p@
+\newdimen\subfigcaptopadj \subfigcaptopadj = 3\p@
+\newskip\subfigbottomskip \subfigbottomskip = 5\p@
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\subfigcapmargin}
+%
+% \changes{v2.1}{22 Jan 1997}{Reduced \cmd{\subfigcapmargin} to zero.}
+% \begin{macro}{\subfiglabelskip}
+%
+% \changes{v2.1}{23 Jan 2002}{Added to replace the space between the
+% subcaption label and text.}
+%
+% These two values are used to typeset the subcaption The width of the
+% subcaption is the same as that of its associated figure or table
+% width. |\subfigcapmargin| is placed on either side of the caption and
+% |\subfiglabelskip| is placed between the subcaption label and the
+% subcaption text. Depending on the manner of typesetting the
+% subcaption, this may shrink or expand. By default, the
+% |\subfigcapmargin| is zero to allow as much room of the subcaption as
+% possible.
+%
+% \begin{macrocode}
+\newdimen\subfigcapmargin \subfigcapmargin = \z@
+\newskip\subfiglabelskip \subfiglabelskip = 0.33em plus 0.07em minus 0.03em
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\subcapsize}
+%
+% |\subcapsize| is used to set the size of both the subcaption label and
+% the subcaption text. The options allow it to be set to any of the
+% following: |\scriptsize|, |\footnotesize|, |\small|, |\normalsize|,
+% |\large|, |\Large|. It may also be set to |\tiny|, |\LARGE|, |\huge|
+% or |\HUGE| by hand if need be for special instances.
+%
+% \begin{macrocode}
+\newcommand*{\subcapsize}{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\subcaplabelfont}
+% \begin{macro}{\subcaplabelfont@f}
+%
+% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcaplabelfont@f}
+% default value to \cmd{\familydefault}.}
+%
+% \begin{macro}{\subcaplabelfont@c}
+%
+% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcaplabelfont@c}
+% default value to \cmd{\seriesdefault}.}
+%
+% \begin{macro}{\subcaplabelfont@s}
+%
+% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcaplabelfont@s}
+% default value to \cmd{\shapedefault}.}
+%
+% The |\subcaplabelfont| is composed of three parts, the font family,
+% such as roman, san serif or typewriter; the font series, such as
+% medium or bold; and the font shape, such as italic, slanted, small
+% caps or upright. These are combined along with the |\subcapsize| to
+% select the font for the subcaption label.
+%
+% \begin{macrocode}
+\newcommand*{\subcaplabelfont}{%
+ \subcaplabelfont@f\subcaplabelfont@c\subcaplabelfont@s}
+\newcommand*{\subcaplabelfont@f}{\fontfamily{\familydefault}\selectfont}
+\newcommand*{\subcaplabelfont@c}{\fontseries{\seriesdefault}\selectfont}
+\newcommand*{\subcaplabelfont@s}{\fontshape{\shapedefault}\selectfont}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\subcapfont}
+%
+% \changes{v2.1}{11 Dec 1996}{Added.}
+%
+% \begin{macro}{\subcapfont@f}
+%
+% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcapfont@f} default
+% value to \cmd{\familydefault}.}
+%
+% \begin{macro}{\subcapfont@c}
+%
+% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcapfont@s} default
+% value to \cmd{\seriesdefault}.}
+%
+% \begin{macro}{\subcapfont@s}
+%
+% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcapfont@s} default
+% value to \cmd{\shapedefault}.}
+%
+% The |\subcapfont| is the same as the |\subcaplabelfont| except that it
+% is applied to the subcaption text rather than the label.
+%
+% \begin{macrocode}
+\newcommand*{\subcapfont}{%
+ \subcapfont@f\subcapfont@c\subcapfont@s}
+\newcommand*{\subcapfont@f}{\fontfamily{\familydefault}\selectfont}
+\newcommand*{\subcapfont@c}{\fontseries{\seriesdefault}\selectfont}
+\newcommand*{\subcapfont@s}{\fontshape{\shapedefault}\selectfont}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ifsf@tight}
+%
+% Create an `if' to control whether the check for the top-of-page is
+% performed in the |\@subfloat| command. This is necessary to preserve
+% the look-and-feel of the older versions of this package. The
+% \Lopt{loose} option turns this flag off (no check) and the
+% \Lopt{tight} option turns it on (do the check).
+%
+% \begin{macrocode}
+\newif\ifsf@tight \sf@tighttrue
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Subfigure Constants}
+% \label{sec:fig_constants}
+% \begin{macro}{\c@subfigure}
+% Subfigure counter.
+%
+% \begin{macrocode}
+\newcounter{subfigure}[figure]
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\iffiguretopcap}
+%
+% \changes{v2.1}{23 Jan 2002}{Added check for existing
+% \cmd{\figuretopcaptrue} so that this package will work with the
+% captcont package.}
+%
+% \changes{v2.1}{22 Jan 1997}{Added to control label numbering for
+% captions at the top vs.\ at the bottom.}
+%
+% \begin{macro}{\ifsubfiguretopcap}
+%
+% \changes{v2.1}{15 Nov 1997}{Added to control placement of the
+% subcaption at the top vs.\ at the bottom.}
+%
+% These control how the \Lpack{hhsubfigure} \Lcount{caption} numbering is
+% obtained and where the figure caption and subcaption should appear
+% relative to the body of the \Lenv{subfigure}. The boolean
+% |\iffiguretopcap| indicates that the \Lcount{caption} counter is
+% current and there is no need to increment it. The boolean
+% |\ifsubfiguretopcap| indicates that the subcaption will be printed
+% above the body portion of the \Lpack{subfigure}.
+%
+% \begin{macrocode}
+\@ifundefined{figuretopcaptrue}{\newif\iffiguretopcap}{}
+\newif\ifsubfiguretopcap
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\p@subfigure}
+% \begin{macro}{\thesubfigure}
+% \begin{macro}{\@thesubfigure}
+% \begin{macro}{\@@thesubfigure}
+%
+% \changes{v2.1}{23 Jan 2002}{Added.}
+%
+% The |\thesubfigure| command defines the label for text references
+% (prefixed by |\p@subfigure|). This is the value saved by the |\label|
+% and retrieved by the |\ref| commands. In the case of a
+% conflict between this package and a prior one over the definition
+% of |\thesubfigure|, this package will win. This is insured by first
+% specifying the |\providecommand| for the |\thesubfigure| and then
+% |\renewcommand|. This is necessary because some packages incorrectly
+% insert this command.
+%
+% The |\@thesubfigure| value defines the the caption label complete
+% offset from the beginning of the caption text. It is used in the
+% subfigure caption and normally takes the label portion as defined
+% by |\thesubfigure|.
+%
+% Finally, the value defined by |\@@thesubfigure| is also saved by the
+% |\label| command and may be retrieved with the |\subref| command. This is
+% often useful in the subcaption or caption text when referring to the
+% individual subfigures. This value is also the one that is used in
+% the List-of-Figures.
+%
+% These multiple ``views'' of the \Lcount{subfigure} counter allow a
+% style to define the way the label looks in the figure, for example
+% ``{\bf (a)}\textvisiblespace''. Then references to it with |\ref|
+% have the form ``2.1a'', and with |\subref| ``(a)'' (This latter form
+% is also used to label references in the List-of-Figures section).
+%
+% \begin{macrocode}
+\let\p@subfigure=\thefigure
+\providecommand*{\thesubfigure}{(\alph{subfigure})}
+\renewcommand*{\thesubfigure}{(\alph{subfigure})}
+\newcommand*{\@thesubfigure}{\thesubfigure\hskip\subfiglabelskip}
+\newcommand*{\@@thesubfigure}{\thesubfigure}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ext@subfigure}
+% \begin{macro}{\l@subfigure}
+%
+% \changes{v2.1}{11 Oct 1996}{Changed the indentation of the
+% List-of-Figures line from 2.3em to 2.5em.}
+%
+% \begin{macro}{\c@lofdepth}
+%
+% These values define how and if the subfigure caption will appear in a
+% List-of-Figures file. |\ext@subfigure| defines the default subfigure
+% file extension (which is the same as |\ext@figure| --- the
+% List-of-Figures file, \Lcount{lof}). |\l@subfigure|
+% shows how to print an \Lfile{lof} subfigure line and defines that line
+% at level two. |\c@lofdepth| is an extension of the Table-of-Contents
+% depth value and controls the depth to which captions in the file are
+% printed to the actual page. By default, the subcaptions are not.
+%
+% \begin{macrocode}
+\let\ext@subfigure=\ext@figure
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\l@subfigure}{%
+ \@dottedxxxline{\ext@subfigure}{2}{3.8em}{2.5em}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcounter{lofdepth}
+\setcounter{lofdepth}{1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Subtable Constants}
+% This section is symmetric to section~\ref{sec:fig_constants}.
+% \begin{macro}{\c@subtable}
+% Subtable counter.
+%
+% \begin{macrocode}
+\newcounter{subtable}[table]
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\iftabletopcap}
+%
+% \changes{v2.1}{23 Jan 2002}{Added check for existing
+% \cmd{\tabeltopcaptrue} so that this package will work with the
+% captcont package.}
+%
+% \changes{v2.1}{22 Jan 1997}{Added to control label numbering for
+% captions at the top vs.\ at the bottom.}
+%
+% \begin{macro}{\ifsubtabletopcap}
+% \changes{v2.1}{15 Nov 1997}{Added to control placement of the
+% subcaption at the top vs.\ at the bottom.}
+%
+% These define the form that the subcaption prefix is generated. The
+% boolean |\iftabletopcap| works with the numbering of the subcaption
+% label and uses the current \Lcount{table} counter value if true and
+% the next value if false. The boolean |\ifsubtabletopcap| sets the
+% subcaption before the main body of the subfigure, if true; and, after
+% it, if false.
+%
+% \begin{macrocode}
+\@ifundefined{tabletopcaptrue}{\newif\iftabletopcap}{}
+\newif\ifsubtabletopcap
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\p@subtable}
+% \begin{macro}{\thesubtable}
+% \begin{macro}{\@thesubtable}
+% \begin{macro}{\@@thesubtable}
+%
+% \changes{v2.1}{23 Jan 2002}{Added.}
+%
+% The |\thesubtable| command defines the label for text references
+% (prefixed by |\p@subtable|), while the |\@thesubtable| command defines
+% what appears in the subcaption under or over the subtable. The
+% |\@@thesubtable| command defines an alternative reference to the label
+% for use in the subcaption and caption of the table (see the discussion
+% above for the equivalent figure values). The latter form is also used
+% for the List-of-Tables label. As above, the |\thesubtable| command is
+% twice specified
+%
+% \begin{macrocode}
+\let\p@subtable=\thetable
+\providecommand*{\thesubtable}{(\alph{subtable})}
+\renewcommand*{\thesubtable}{(\alph{subtable})}
+\newcommand*{\@thesubtable}{\thesubtable\hskip\subfiglabelskip}
+\newcommand*{\@@thesubtable}{\thesubtable}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ext@subtable}
+% \begin{macro}{\l@subtable}
+%
+% \changes{v2.1}{11 Oct 1996}{Changed the indentation of the
+% List-of-Tables line from 2.3em to 2.5em.}
+%
+% \begin{macro}{\c@lotdepth}
+%
+% These define how and if the subtable caption will appear in a
+% List-of-Tables file. |\ext@subtable| defines the default subtable
+% file extension (which is the same as |\ext@table| --- the
+% List-of-Tables file, \Lcount{lot}). |\l@subtable| shows how to print
+% an \Lfile{lot} subtable line and defines that line at level two.
+% |\c@lotdepth| is an extension of the table-of-contents depth value and
+% controls the depth to which captions in the file are printed to the
+% actual page. By default, the subcaptions are not printed.
+%
+% \begin{macrocode}
+\let\ext@subtable=\ext@table
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\l@subtable}{%
+ \@dottedxxxline{\ext@subtable}{2}{3.8em}{2.5em}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcounter{lotdepth}
+\setcounter{lotdepth}{1}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Declaration of Options}
+%
+% The following options allow general compatibility with the
+% \Lpack{caption} and \Lpack{caption2} packages by H.A. Sommerfeldt
+% \cite{Somm95a}. There are six different subcaption layout options
+% supported: \Lopt{normal}, \Lopt{hang} (or \Lopt{isu}), \Lopt{center},
+% \Lopt{centerlast} (or \Lopt{anne}), \Lopt{nooneline} and
+% \Lopt{raggedright}. The \Lopt{hang} subcaption may be combined with
+% the \Lopt{center} or \Lopt{centerlast} options. The \Lopt{nooneline}
+% may be combined with any of the other options (but it's effect is
+% negated or looks bad with either of \Lopt{center} or \Lopt{centerlast}
+% unless the \Lopt{hang} option is also used). \Lopt{raggedright}
+% overrides the \Lopt{center} or \Lopt{centerlast} options.
+%
+% \begin{macrocode}
+\DeclareOption{normal}{%
+ \subcaphangfalse
+ \subcapcenterfalse
+ \subcapcenterlastfalse
+ \subcapnoonelinefalse
+ \subcapraggedrightfalse
+ \subcapRaggedRightfalse}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{hang}{\subcaphangtrue}
+\DeclareOption{center}{\subcapcentertrue}
+\DeclareOption{centerlast}{\subcapcenterlasttrue}
+\DeclareOption{nooneline}{\subcapnoonelinetrue}
+\DeclareOption{raggedright}{\subcapraggedrighttrue}
+\DeclareOption{RaggedRight}{\subcapRaggedRighttrue}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{isu}{\ExecuteOption{hang}}
+\DeclareOption{anne}{\ExecuteOption{centerlast}}
+% \end{macrocode}
+%
+% \newpage^finalhack
+%
+% \noindent
+% There are options for six different font sizes available.
+%
+% \begin{macrocode}
+\DeclareOption{scriptsize}{\renewcommand*{\subcapsize}{\scriptsize}}
+\DeclareOption{footnotesize}{\renewcommand*{\subcapsize}{\footnotesize}}
+\DeclareOption{small}{\renewcommand*{\subcapsize}{\small}}
+\DeclareOption{normalsize}{\renewcommand*{\subcapsize}{\normalsize}}
+\DeclareOption{large}{\renewcommand*{\subcapsize}{\large}}
+\DeclareOption{Large}{\renewcommand*{\subcapsize}{\Large}}
+% \end{macrocode}
+%
+% \noindent
+% There are eighteen options available to set the font attributes of the
+% subcaptions. The first nine affect only the subcaption label
+% The last nine affect only the subcaption text.
+%
+% \changes{v2.1}{22 Jan 1997}{Changed order of font options.}
+%
+% \changes{v2.1}{15 Nov 1997}{Added nine new options to set the format
+% of the caption text separately from the caption label.}
+%
+% \begin{macrocode}
+\DeclareOption{rm}{\renewcommand*{\subcaplabelfont@f}{\rmfamily}}
+\DeclareOption{sf}{\renewcommand*{\subcaplabelfont@f}{\sffamily}}
+\DeclareOption{tt}{\renewcommand*{\subcaplabelfont@f}{\ttfamily}}
+\DeclareOption{md}{\renewcommand*{\subcaplabelfont@c}{\mdseries}}
+\DeclareOption{bf}{\renewcommand*{\subcaplabelfont@c}{\bfseries}}
+\DeclareOption{up}{\renewcommand*{\subcaplabelfont@s}{\upshape}}
+\DeclareOption{it}{\renewcommand*{\subcaplabelfont@s}{\itshape}}
+\DeclareOption{sl}{\renewcommand*{\subcaplabelfont@s}{\slshape}}
+\DeclareOption{sc}{\renewcommand*{\subcaplabelfont@s}{\scshape}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{RM}{\renewcommand*{\subcapfont@f}{\rmfamily}}
+\DeclareOption{SF}{\renewcommand*{\subcapfont@f}{\sffamily}}
+\DeclareOption{TT}{\renewcommand*{\subcapfont@f}{\ttfamily}}
+\DeclareOption{MD}{\renewcommand*{\subcapfont@c}{\mdseries}}
+\DeclareOption{BF}{\renewcommand*{\subcapfont@c}{\bfseries}}
+\DeclareOption{IT}{\renewcommand*{\subcapfont@s}{\itshape}}
+\DeclareOption{SL}{\renewcommand*{\subcapfont@s}{\slshape}}
+\DeclareOption{SC}{\renewcommand*{\subcapfont@s}{\scshape}}
+\DeclareOption{UP}{\renewcommand*{\subcapfont@s}{\upshape}}
+% \end{macrocode}
+%
+% \noindent
+% There are eight options available to control the caption placement
+% and the proper numbering in association with the figure or table
+% caption placement. The first four affect only the caption numbering
+% by informing the internals that the associated figure or table
+% caption appears before or after the subfloat. The second four do
+% this and, in addition, shift the subfloat caption to the bottom or
+% top of the subfloat. The |\subfigure| and |\subtable| commands each
+% have a set of flags since it is often the case that a document style
+% requires that figure captions follow the figure and table captions
+% precede the table.
+%
+% \begin{macrocode}
+\DeclareOption{figbotcap}{\figuretopcapfalse}
+\DeclareOption{figtopcap}{\figuretopcaptrue}
+\DeclareOption{tabbotcap}{\tabletopcapfalse}
+\DeclareOption{tabtopcap}{\tabletopcaptrue}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{FIGBOTCAP}{\ExecuteOptions{figbotcap}\subfiguretopcapfalse}
+\DeclareOption{FIGTOPCAP}{\ExecuteOptions{figtopcap}\subfiguretopcaptrue}
+\DeclareOption{TABBOTCAP}{\ExecuteOptions{tabbotcap}\subtabletopcapfalse}
+\DeclareOption{TABTOPCAP}{\ExecuteOptions{tabtopcap}\subtabletopcaptrue}
+% \end{macrocode}
+%
+% \newpage^finalhack
+%
+% \begin{macro}{\subfigtopskip}
+% \begin{macro}{\subfigcapskip}
+% \begin{macro}{\subfigcaptopadj}
+% \begin{macro}{\subfigbottomskip}
+% \begin{macro}{\subfigcapmargin}
+% \begin{macro}{\subfiglabelskip}
+%
+% \noindent
+% The last two options control the overall ``look-and-feel'' of the
+% subfloat. The \Lopt{loose} option is the default and makes the
+% subfloat look like it always has with lots of extra room around the
+% subfigure and subcaption.
+%
+% \begin{macrocode}
+\DeclareOption{loose}{%
+ \subfigtopskip = 10\p@
+ \subfigcapskip = 10\p@
+ \subfigcaptopadj = 0\p@
+ \subfigbottomskip = 10\p@
+ \subfigcapmargin = 10\p@
+ \subfiglabelskip = 0.33em
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@thesubfigure}
+% \begin{macro}{\@thesubtable}
+% Next, it replaces the glue at the end of the subcaption label with a
+% |\space| like the older version of the \Lpack{subfigure} package.
+%
+% \begin{macrocode}
+ \renewcommand*{\@thesubfigure}{\thesubfigure\space}
+ \renewcommand*{\@thesubtable}{\thesubtable\space}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ifsf@tight}
+%
+% Finally, set the \Lif{sf@tight} flag to make the |\@subfloat| command
+% skip its check for the top of a page or minipage and to always add
+% its topmost vertical spacing. (For more details about the
+% |\@subfloat| command, see section~\ref{sec:mainmacros}.)
+%
+% \begin{macrocode}
+ \sf@tightfalse}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\subfigtopskip}
+% \begin{macro}{\subfigcapskip}
+% \begin{macro}{\subfigcaptopadj}
+% \begin{macro}{\subfigbottomskip}
+% \begin{macro}{\subfigcapmargin}
+% \begin{macro}{\subfiglabelskip}
+%
+% The \Lopt{tight} option is the is the preferred version and has less white
+% space around the subfloat. It also will omit the space above the subfloat
+% at the top of the page or minipage.
+%
+% \begin{macrocode}
+\DeclareOption{tight}{%
+ \subfigtopskip = 5\p@
+ \subfigcapskip = 0\p@
+ \subfigcaptopadj = 3\p@
+ \subfigbottomskip = 5\p@
+ \subfigcapmargin = \z@
+ \subfiglabelskip = 0.33em plus 0.07em minus 0.03em
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@thesubfigure}
+% \begin{macro}{\@thesubtable}
+% Next, it keeps the glue at the end of the subcaption label to allow
+% better subcaption fitting.
+%
+% \begin{macrocode}
+ \renewcommand*{\@thesubfigure}{\thesubfigure\hskip\subfiglabelskip}
+ \renewcommand*{\@thesubtable}{\thesubtable\hskip\subfiglabelskip}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\ifsf@tight}
+%
+% Finally, set the \Lif{sf@tight} flag to make the |\@subfloat| command
+% check for the top of a page or minipage and to skip adding any vertical
+% space there. (For more details about the |\@subfloat| command, see
+% section~\ref{sec:mainmacros}.)
+%
+% \begin{macrocode}
+ \sf@tighttrue}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Execution of Options}
+% \label{sec:startup}
+%
+% \changes{v2.1}{11 Oct 1996}{Added a check for a local configuration file.}
+%
+% \changes{v2.1}{15 Nov 1997}{Added the \Lopt{FIGBOTCAP} and
+% \Lopt{TABBOTCAP} options.}
+%
+% \changes{v2.1.4}{30 Apr 2002}{Changed the subcaption label defaults
+% to be hard coded above and no longer in the options list.}
+%
+% The \Lopt{normal} type of subcaption is preselected, the standard
+% subcaption size is set to \Lopt{footnotesize}, and the font for both
+% the subcaption label and text is set above to the global defaults for
+% family, series, and shape. Also, the subcaptions for the subfigure
+% and subtable are placed after the figure box and it is assumed that
+% the figure or table caption follows all of the associated subfloats.
+% Finally, the \Lopt{loose} form is selected in order to cause minimal
+% change to existing papers using the \Lpack{subfigure} package.
+%
+% The preferred form would be to have the \Lopt{TABTOPCAP} and
+% \Lopt{tight} be the defaults, but this would adversely affect the
+% existing papers that have used the official releases of this package.
+%
+% \begin{macrocode}
+\ExecuteOptions{normal,footnotesize,FIGBOTCAP,TABBOTCAP,loose}
+\InputIfFileExists{subfigure.cfg}{%
+ \typeout{****************************************^^J%
+ * Local config file subfigure.cfg used *^^J%
+ ****************************************}}{}
+\ProcessOptions
+% \end{macrocode}
+%
+% \subsection{The Subfigure and Subtable Commands}
+% \label{sec:mainmacros}
+%
+% \changes{v2.1}{23 Jan 2002}{Added setting \cmd{\label} to
+% \cmd{\subfloat@label}.}
+%
+% \changes{v2.1}{11 Oct 1996}{Added command lines. The subfigure
+% command was updated to allow a second optional argument. This
+% causes changes all the way down to the \cmd{\@subcaption} command.}
+%
+% \begin{macro}{\subfigure}
+% \label{sec:subfigure}
+%
+% \changes{v2.1.2}{26 Mar 2002}{Added check to see if \cmd{\subfig@oldlabel}
+% is defined and if not to save the current definition.}
+%
+% \changes{v2.1}{22 Jan 1997}{Changed the counter advance to occur
+% only if the related boolean is false. This allows \cmd{\caption}'s
+% to occur before the subfloats rather than after.}
+%
+% \changes{v2.1}{07 Mar 1997}{Moved \cmd{\leavevmode} to \cmd{\@subfloat}.}
+%
+% The |\subfigure| command acts as cover function for the |\@subfloat|
+% command. It locally changes the |\label| command to our special version
+% that supports the |\subref|'s (see section~\ref{sec:patches}). It
+% insures that the proper counter is used and has the correct value.
+% Since the caption is usually generated later, we must locally
+% anticipate the future value of its counter by adding one to it within
+% a local group. Upon leaving |\subfigure|, the old value is restored.
+%
+% \begin{macrocode}
+\newcommand*{\subfigure}{%
+ \bgroup
+ \let\subfig@oldlabel=\label
+ \let\label=\subfloat@label
+ \@nameuse{if\@captype topcap}\else
+ \advance\@nameuse{c@\@captype}\@ne
+ \fi
+ \refstepcounter{sub\@captype}%
+ \@ifnextchar [%
+ {\@subfigure}%
+ {\@subfigure[\@empty]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\subtable}
+%
+% The |\subtable| command is identical to |\subfigure|. The of names
+% at the user level is purely cosmetic (and historical).
+%
+% \begin{macrocode}
+\let\subtable=\subfigure
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \enlargethispage{-24pt}^finalhack
+%
+% \begin{macro}{\@subfigure}
+% \changes{v2.1.4}{07 Jun 2002}{Added curly brackets around the
+% argument when passing it on as an optional argument.}
+%
+% Here we are still setting up for the main |\@subfloat| command. We
+% check for a second optional argument. If one is not found, than any
+% optional argument from the last |\subfigure| or |\subtable| becomes
+% the main caption and we give |\@empty| as the default list-entry
+% caption. If we see another optional argument, then we make that one
+% the main caption and use any prior optional argument as the list-entry
+% caption. See Table~\ref{tab:calling} for how this looks to the user.
+%
+% \begin{macrocode}
+\def\@subfigure[#1]{%
+ \@ifnextchar [%
+ {\@subfloat{sub\@captype}[{#1}]}%
+ {\@subfloat{sub\@captype}[\@empty{#1}][{#1}]}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@subfloat}
+%
+% \changes{v2.1.4}{24 Apr 2002}{Changed \cmd{\@subfloat} to globally
+% reset the figure/table counter if it was incremented so that any
+% subfloat body that resets the counters globally will not cause
+% errors ({\it e.g.\/}, the \Lpack{tabularx} package}
+%
+% \changes{v2.1}{23 Jan 2002}{Now using \cmd{\@nameuse} to build names.
+% Made the \cmd{\def} a \cmd{\long}\cmd{\def}.}
+%
+% \changes{v2.1}{22 Apr 1998}{Added some percents to keep out whitespace}
+%
+% \changes{v2.1}{07 Mar 1997}{Changed the addition of the
+% \cmd{\subfigtopskip} to be added only if not at the top of the
+% float and only in vertical mode. Moved \cmd{\leavevmode} from
+% \cmd{\subfigure} to after the topskip addition.}
+%
+% \changes{v2.1}{17 Jan 1997}{Added swap of the top and bottom space
+% when in TOPCAP mode.}
+%
+% This is the common code for setting up the subfloat box and drawing
+% the subcaption under it. The two skips are used only here to keep
+% track of what vertical space is to be placed before and after the
+% figure.
+%
+% The first argument is the type of object being generated: that is,
+% a |subfigure| or a |subtable|. The second and third are the
+% \texttt{subcaption} and \texttt{subfigure} arguments from the
+% calling |\subfigure| or |\subtable| command.
+%
+% \begin{macrocode}
+\newskip\subfig@top
+\newskip\subfig@bottom
+% \end{macrocode}
+%
+% If \Lif{ifsf@tight} is true, then the |\@subfloat| command checks to
+% see if it is at the top of a page or a minipage and will suppress the
+% top vertical space in that case; otherwise, it always adds the space.
+%
+% \begin{macrocode}
+\long\def\@subfloat#1[#2][#3]#4{%
+ \@tempcnta=1
+ \ifsf@tight
+ \if@minipage
+ \@tempcnta=\z@
+ \else\ifdim \lastskip=\z@ \else
+ \@tempcnta=2
+ \fi\fi
+ \fi
+% \end{macrocode}
+%
+% Based on the |\iffiguretopcap| or |\iftabletopcap| flags we
+% select which vertical space is to be placed above and below the figure
+% or table and save it in |\subfig@top| and |\subfig@bottom|.
+%
+% \begin{macrocode}
+ \@nameuse{if\@captype topcap}%
+ \subfig@top=\subfigbottomskip
+ \subfig@bottom=\subfigtopskip
+ \else
+ \subfig@top=\subfigtopskip
+ \subfig@bottom=\subfigbottomskip
+ \fi
+% \end{macrocode}
+%
+% The |\leavevmode| is here to inhibit any \LaTeX\ errors that the
+% surreounding environment might generate if we stay in vertical mode.
+% Then it determines the width of the figure or table by placing it in a
+% box and testing the box.
+%
+% \begin{macrocode}
+ \leavevmode
+ \setbox\@tempboxa \hbox{#4}%
+ \@tempdima=\wd\@tempboxa
+% \end{macrocode}
+%
+% Finally we put the figure together in a vertical box. At the very top
+% goes any vertical space, but only if we are not at the top of the page
+% or minipage as determined above.
+%
+% \begin{macrocode}
+ \vtop\bgroup
+ \vbox\bgroup
+ \ifcase\@tempcnta
+ \@minipagefalse
+ \or
+ \vspace{\subfig@top}%
+ \or
+ \ifdim \lastskip=\z@ \else
+ \@tempskipb\subfig@top\relax\@xaddvskip
+ \fi
+ \fi
+% \end{macrocode}
+%
+% Next, based on the `topcap' flags, we check if the subcaption or the
+% figure goes next. If it is the subcaption, then we add some extra
+% |\subfigcaptopadj| space between the subcaption and the figure and
+% table in addtion to the regular |\subfigcapskip| space. This finishes
+% off the top box and establishes our baseline.
+%
+% After that we add in either the figure or subcaption (whichever we
+% have not typeset yet and follow it with the bottom vertical space.
+% (see figure~\ref{fig:layout-C} for a diagram of this layout).
+%
+% Finally, we globally ({\bf !}) reset the \Lcount{figure} or
+% \Lcount{table} counter, if we incremented it at the beginning of the
+% |\subfigure| or |\subtable| command so that any functions used inside
+% the command body which globally sets the counters ({\it e.g.\/}, the
+% \Lpack{tabularx} package) will not cause problems.
+%
+% \begin{macrocode}
+ \@nameuse{if#1topcap}%
+ \ifx \@empty#3\relax \else
+ \@subcaption{#1}{#2}{#3}%
+ \vskip\subfigcapskip
+ \vskip\subfigcaptopadj
+ \fi\egroup
+ \box\@tempboxa
+ \else
+ \box\@tempboxa\egroup
+ \ifx \@empty#3\relax \else
+ \vskip\subfigcapskip
+ \@subcaption{#1}{#2}{#3}%
+ \fi
+ \fi
+ \vspace{\subfig@bottom}%
+ \egroup
+ \@nameuse{if\@captype topcap}\else
+ \global\advance\@nameuse{c@\@captype}\m@ne
+ \fi
+ \egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@subfigcaptionlist}
+%
+% \begin{macro}{\@subcaption}
+%
+% \changes{v2.1}{23 Jan 2002}{Now using \cmd{\@nameuse} to build names.
+% Also use \@@thesubfigure and \@@thesubtable stored label.}
+%
+% \begin{macro}{\listsubcaptions}
+%
+% \changes{v2.1.4}{09 Jul 2002}{Changed \cmd{\@tempa} to \cmd{\sf@temp}
+% at the request of Donald Arseneau to remove the potential of problems
+% with others using the same variable.}
+% \changes{v2.1}{22 Oct 1996}{Added to allow the user to cause a dump
+% of the currently queued subcaptions to the ``List-of'' page. This
+% is necessary when the \cmd{caption} is placed before the subfloats
+% as is often the case for subtables.}
+%
+% \changes{v2.1}{11 Oct 1996}{Fixed \cmd{\protect} related bug caused by
+% a change in \LaTeX3.}
+% \begin{macro}{\@listsubcaptions}
+%
+% \changes{v2.1}{23 Jan 2002}{Added checks for undefined \cmd{\@captype}
+% and \cmd{ext@<\@captype>} just in case the \cmd{caption} is called
+% outside the \Lenv{float} or the current float type does not support
+% subfigures.}
+%
+% \changes{v2.1}{11 Oct 1996}{Added to print the queued subcaptions.
+% This is also used by the \Lpack{captcont} package to correctly print
+% the subcaptions.}
+%
+% \changes{v2.1}{17 Jan 1997}{Changed the source of the label for the
+% ``List-of'' pages to use the \cmd{\thesubfigure} or \cmd{\thesubtable}
+% value rather than the \cmd{\@currentlabel}. This usually will be
+% cleaner since the figure number won't be repeated.}
+%
+% \changes{v2.1}{05 Jan 1998}{Changed \cmd{\edef} to \cmd{\def} and added
+% back the \cmd{\protect} due to changes in the use of the
+% \cmd{\@subcaption}.}
+%
+% The following series of commands control exactly how the subcaption is
+% typeset. The |\@subcaption| command adds the subcaption to the current
+% list of subcaptions to be added to the ``List-of'' page as soon as
+% the major caption is declared (see |\@caption| below).
+% ({\scshape Note}: only one list is kept because that seems right;
+% if there is a mix of tables and figures, they will be grouped
+% under the next |\caption|\@.) Next |\@subcaption| calls the
+% appropriate float-type specific command to decide how to size and shape
+% the subcaption text.
+%
+% \begin{macrocode}
+\newcommand*{\@subfigcaptionlist}{}
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand{\@subcaption}[3]{%
+ \ifx \relax#2\relax \else
+ \bgroup
+ \let\label=\@gobble
+ \let\protect=\string
+ \def\@subcaplabel{\@nameuse{@@the#1}}%
+ \xdef\@subfigcaptionlist{%
+ \@subfigcaptionlist,%
+ {\protect\numberline{\@subcaplabel}\noexpand{\ignorespaces #2}}}%
+ \egroup
+ \fi
+ \@nameuse{@make#1caption}{\@nameuse{@the#1}}{#3}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\listsubcaptions}{%
+ \@ifstar
+ {\gdef\@subfigcaptionlist{}}%
+ {\@listsubcaptions{\@captype}}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\@listsubcaptions}[1]{%
+ \@ifundefined{@captype}{}{%
+ \@ifundefined{ext@sub#1}{}{%
+ \@for \sf@temp:=\@subfigcaptionlist \do {%
+ \ifx \@empty\sf@temp\relax \else
+ \addcontentsline
+ {\@nameuse{ext@sub#1}}%
+ {sub#1}%
+ {\sf@temp}%
+ \fi}}}%
+ \gdef\@subfigcaptionlist{}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@makesubfigurecaption}
+% \begin{macro}{\@makesubtablecaption}
+%
+% \changes{v2.1}{17 Jan 1997}{Added the new font control.}
+%
+% By default, the |\@subfigurecaption| and |\@subtablecaption|
+% commands are identical. Unlike the standard |\@makecaption| command,
+% we assume that the first argument (the label number produced by
+% the |\@thesubfigure| or the |\@thesubtable|) contains any trailing
+% separator characters or spacing (which makes it easier to customize).
+%
+% \newpage^finalhack
+%
+% The |\@makesubfigurecaption| command first checks the size of the
+% caption typeset as a single line. It knocks off twice the
+% |\subfigcapmargin| (at it's regular size) to determine the with of the
+% caption and label.
+%
+% \begin{macrocode}
+\newcommand{\@makesubfigurecaption}[2]{%
+ \setbox\@tempboxa\hbox{%
+ \subcapsize
+ {\subcaplabelfont #1}%
+ {\subcapfont\ignorespaces #2}}%
+ \@tempdimb=-\subfigcapmargin
+ \multiply\@tempdimb\tw@
+ \advance\@tempdimb\@tempdima
+% \end{macrocode}
+%
+% Next it creates a horizontal box of that width and if the label plus
+% the text was too wide or if the \Lif{subcapnooneline} flag is true,
+% then it sends off the label and subcaption to |\subfig@caption| to
+% typset as a paragraph. NOTE: |\subfig@caption| assumes that
+% |\@tempbdimb| has the calculated width for the paragraph.
+%
+% If the label plus the text will fit and the \Lif{subcapnooneline} flag
+% is false, then we just return them (from box |\@tempboxa|).
+%
+% \begin{macrocode}
+ \hbox to\@tempdima{%
+ \hss
+ \ifdim \wd\@tempboxa >\@tempdimb
+ \subfig@caption{#1}{#2}%
+ \else\ifsubcapnooneline
+ \subfig@caption{#1}{#2}%
+ \else
+ \box\@tempboxa
+ \fi\fi
+ \hss}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\@makesubtablecaption=\@makesubfigurecaption
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\subfig@caption}
+%
+% \changes{v2.1}{23 Jan 2002}{Added \cmd{\subcapfont} and
+% \cmd{\ignorespaces} before the caption text. So that it does not
+% interfere with the label font settings. This fixes a bug found by
+% Axel Sommerfeldt.}
+%
+% \begin{macro}{\subfig@captionpar}
+%
+% \changes{v2.1}{23 Jan 2002}{Simplified by removing the font settings.
+% It is up to the caller to enforce these! This fixes a bug found by
+% Axel Sommerfeldt.}
+%
+% \changes{v2.1}{17 Jan 1997}{Added the new font control.}
+%
+% These commands are called to typeset a multiple-line subcaption (or a
+% single line when \Lif{subcapnooneline} is true). Depending on the
+% \Lif{subcapcenter} and \Lif{subcapcenterlast} flags, the text will be
+% justified (both false), centered (\Lif{subcapcenter} true), or
+% justified with the last line centered (only the flag
+% \Lif{subcapcenterlast} set true).
+%
+% \begin{macrocode}
+\newcommand{\subfig@caption}[2]{%
+ \ifsubcaphang
+ \sbox{\@tempboxa}{\subcapsize\subcaplabelfont #1}%
+ \addtolength{\@tempdimb}{-\wd\@tempboxa}%
+ \usebox{\@tempboxa}%
+ \subfig@captionpar{\@tempdimb}{%
+ {\subcapfont\ignorespaces #2}}%
+ \else
+ \subfig@captionpar{\@tempdimb}{%
+ {\subcaplabelfont #1}%
+ {\subcapfont\ignorespaces #2}}%
+ \fi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand{\subfig@captionpar}[2]{%
+ \parbox[t]{#1}{%
+ \subcapsize
+ \ifsubcapraggedright
+ \setlength{\leftskip}{\z@}%
+ \setlength{\@rightskip}{\@flushglue}%
+ \setlength{\rightskip}{\@rightskip}%
+ \setlength{\parindent}{\z@}%
+ \else\ifsubcapRaggedRight
+ \setlength{\leftskip}{\z@}%
+ \setlength{\@rightskip}{\z@ plus \tw@ em}%
+ \setlength{\rightskip}{\@rightskip}%
+ \setlength{\parfillskip}{\z@ plus \@ne fil}%
+ \setlength{\parindent}{\z@}%
+ \else\ifsubcapcenter
+ \setlength{\leftskip}{\@flushglue}%
+ \setlength{\rightskip}{\@flushglue}%
+ \setlength{\parfillskip}{\z@skip}%
+ \else\ifsubcapcenterlast
+ \addtolength{\leftskip}{\z@ plus 1fil}%
+ \addtolength{\rightskip}{\z@ plus -1fil}%
+ \setlength{\parfillskip}{\z@ plus 2fil}%
+ \fi\fi\fi\fi
+ #2}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Patches to the Standard Environment}
+% \label{sec:patches}
+%
+% The following adjust the standard environment for the
+% \Lpack{subfigure} package. They are designed as wrappers to the
+% current definition of the standard commands to minimize any chance of
+% conflict with other packages or to extend \LaTeX.
+%
+% \begin{macro}{\@dottedxxxline}
+% \label{sec:dl}
+% This is a generalized wrapper for the |\@dottedtocline| command.
+% It checks for the level based on the output file (first argument)
+% and not using only |\@tocdepth|. (See section~\ref{sec:listof}
+% for a description of the arguments.)
+%
+% \begin{macrocode}
+\newcommand*{\@dottedxxxline}[6]{%
+ \ifnum #2>\@nameuse{c@#1depth}\else
+ \@dottedtocline{0}{#3}{#4}{#5}{#6}
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\subfig@end@float}
+% \begin{macro}{\subfig@end@dblfloat}
+% \begin{macro}{\end@float}
+% \begin{macro}{\end@dblfloat}
+%
+% \changes{v2.1}{05 Jan 1998}{Added this section to minimize the need
+% for \cmd{\listofcaptions}.}
+%
+% These commands patch the end of the \Lenv{float} environment so that it will
+% dump out the subcaptions if any remain at this point. This can occur
+% when using the \Lopt{TOPCAP} options.
+% \begin{macrocode}
+\let\subfig@end@float=\end@float
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand*{\end@float}{%
+ \@listsubcaptions{\@captype}%
+ \subfig@end@float}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\let\subfig@end@dblfloat=\end@dblfloat
+% \end{macrocode}
+%
+% \begin{macrocode}
+\renewcommand*{\end@dblfloat}{%
+ \@listsubcaptions{\@captype}%
+ \subfig@end@dblfloat}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \newpage^finalhack
+%
+% \begin{macro}{\subfig@oldcaption}
+% \begin{macro}{\@caption}
+%
+% \changes{v2.1}{23 Jan 2002}{Now using \cmd{\@nameuse} to build names.
+% Added a check for topcap flag. If it is not defined, we assume that
+% this float type does not support subfigures.}
+%
+% \changes{v2.1}{05 Jan 1998}{Changed to print the subcaptions before
+% or after the caption, depending on the TOPCAP setting of the current
+% environment.}
+%
+% Next, we redefine the current |\@caption| command to dump any
+% subcaptions saved. First the `old' caption command is called to
+% add the line to the ``List-of'' file and then the list of
+% subcaptions, |\@subfigcaptionlist| is written to the same file.
+% Lastly, the |\@subfigcaptionlist| is reinitialized.
+%
+% \begin{macrocode}
+\let\subfig@oldcaption=\@caption
+% \end{macrocode}
+%
+% \begin{macrocode}
+\long\def\@caption#1[#2]#3{%
+ \@ifundefined{if#1topcap}%
+ {\subfig@oldcaption{#1}[{#2}]{#3}}%
+ {\@nameuse{if#1topcap}%
+ \@listsubcaptions{#1}%
+ \subfig@oldcaption{#1}[{#2}]{#3}%
+ \else
+ \subfig@oldcaption{#1}[{#2}]{#3}%
+ \@listsubcaptions{#1}%
+ \fi}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\subfig@oldlabel}
+%
+% To support the redefinition of the |\label| command within the body of
+% the subfloats, we will use |\subfig@oldlabel| to save the current
+% definition of |\label| and create the |\subfloat@label| command to take its
+% place during the processing of the |\subfigure| command. Since the
+% definition of |\label| may change as packages are loaded, we save the
+% definition each time that |\label| is replaced with |\sub@label|
+% (see \ref{sec:subfigure} above).
+%
+% \begin{macrocode}
+\let\subfig@oldlabel=\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\subfloat@label}
+% \begin{macro}{\sub@label}
+%
+% \changes{v2.1.4}{02 Jul 2002}{Added reference to this command via
+% the name \cmd{subfloat@label} to avoid packages that replace the
+% name without the support of the optional argument. The old name
+% is still here to decoy the other packages. Added chapter number
+% in the automatically generated label to increase uniqueness.}
+%
+% One difference from the regular |\label| command is that there is an
+% optional argument (note with parentheses rather than square brackets)
+% that is only used with the \Lpack{hyperref} package to define the
+% {\em bookmark\/} argument to the label. Typically, this would be a
+% copy or paraphrase of the subcaption text. If this is not given and
+% the \Lpack{hyperref} package is being used, then the {\em bookmark\/}
+% argument is of the form ``Subfigure\textvisiblespace 1(a)''.
+%
+% \begin{macrocode}
+\newcommand*{\subfloat@label}{%
+ \@ifnextchar(
+ {\sf@sub@label}
+ {\sf@sub@label(Sub\@captype\space
+ \@ifundefined{thechapter}{}{%
+ \@nameuse{thechapter}\space}%
+ \@nameuse{p@sub\@captype}%
+ \@nameuse{thesub\@captype}.)}}
+% \end{macrocode}
+% \begin{macrocode}
+\let\sub@label\subfloat@label
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+%
+% \newpage^finalhack
+%
+% \begin{macro}{\sf@sub@label}
+%
+% \changes{v2.1.4}{02 Jul 2002}{Moved \cmd{\relax} from the
+% \cmd{\sf@@sub@label} to here.}
+%
+% \changes{v2.1.1}{15 Mar 2002}{Added coordination with the hyperref
+% package.}
+%
+% The |\sf@sub@label| parses the optional argument and (if the
+% \Lpack{hyperref} Package is loaded) saves the {\em bookmark\/} text
+% as |\@currentlabelname|. It then calls the |\sf@@sub@label| command
+% to the real processing of the label.
+%
+% \begin{macrocode}
+\def\sf@sub@label(#1)#2{%
+ \ifhyperrefloaded
+ \protected@edef\@currentlabelname{%
+ \expandafter\strip@period #1\relax.\relax\@@@}%
+ \fi
+ \sf@@sub@label{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sf@@sub@label}
+%
+% \changes{v2.1.4}{02 Jul 2002}{Moved \cmd{\relax} from here to the
+% \cmd{\sf@sub@label}.}
+%
+% \changes{v2.1.2}{26 Mar 2002}{Changed to simplify the operation and
+% to avoid a bug in the hyperref package.}
+%
+% \changes{v2.1.1}{15 Mar 2002}{Added coordination with the hyperref
+% package.}
+%
+% In order to support the \Lpack{hyperref} package we check if it was
+% loaded and use the proper form of the |\newlabel| command. |\sf@@sub@label|
+% operates by first calling the old |\label| definition (which adds a
+% |\newlabel| command to the \Lfile{*.aux} file) and then adds another
+% |\newlabel| command to the \Lfile{*.aux} file with a similar reference
+% name (with `sub@' prepended) and the value of |\@@thesubfigure| or
+% |\@@thesubtable|.
+%
+% If the |\ifhyperrefloaded| flag is set, then the |\newlabel| command
+% has three extra fields, the first is the value of |\@currentlabelname|,
+% which is either of the form ``Subfigure\textvisiblespace1(a)'' or
+% was defined by the optional argument to |\label| (actually
+% |\sub@label|). The second extra field is the hypertext anchor name
+% and the third is unused. Otherwise, the we us the standard |\newlabel|
+% form to write the sub-reference.
+%
+% \begin{macrocode}
+\newcommand*{\sf@@sub@label}[1]{%
+ \@bsphack
+ \subfig@oldlabel{#1}%
+ \ifhyperrefloaded
+ \protected@write\@auxout{}{%
+ \string\newlabel{sub@#1}%
+ {{\@nameuse{@@thesub\@captype}}%
+ {\thepage}%
+ {\expandafter\strip@period\@currentlabelname\relax.\relax\@@@}%
+ {\@currentHref}%
+ {}}}%
+ \else
+ \protected@write\@auxout{}{%
+ \string\newlabel{sub@#1}%
+ {{\@nameuse{@@thesub\@captype}}%
+ {\thepage}}}%
+ \fi
+ \@esphack}
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \enlargethispage{24pt}^finalhack
+% \vspace{-10pt}^finalhack
+%
+% \begin{macro}{\subref}
+%
+% The |\subref| command is the same as the |\ref| command except that
+% |\@@thesubtable| instead of |\p@subfigure\thesubfigure| or
+% |\p@subtable\thesubtable|. This is often of use for local references
+% within the figure where the figure number may be assumed; or, for ease
+% in constructing a range of references within a figure with many
+% subfigures.
+%
+% \begin{macrocode}
+\newcommand\subref[1]{%
+ \ref{sub@#1}}
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{\Subref}
+%
+% \changes{v2.1.2}{26 Mar 2002}{Changed \cmd{\subref*} to \cmd{\Subref} to
+% avoid problems in writing to the \Lfile{aux} file.}
+%
+% \changes{v2.1}{23 Jan 2002}{Added \cmd{\subref*} at the request of Benoit
+% Hudson (bhudson\@cs.cmu.edu).}
+%
+% The |\Subref| command is the same as |\subref|, except that it adds
+% |\subcaplabelfont| before the reference so that it uses the same font
+% (except that the current font size is maintained).
+%
+% \begin{macrocode}
+\newcommand\Subref[1]{%
+ {\subcaplabelfont
+ \ref{sub@#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+%
+\endinput
diff --git a/Master/texmf-dist/source/latex/bgteubner/hhsubfigure.ins b/Master/texmf-dist/source/latex/bgteubner/hhsubfigure.ins
new file mode 100644
index 00000000000..7fc286f190f
--- /dev/null
+++ b/Master/texmf-dist/source/latex/bgteubner/hhsubfigure.ins
@@ -0,0 +1,77 @@
+%%
+%% This is file `hhsubfigure.ins', the installation file for the
+%% `hhsubfigure' package.
+%%
+%% Copyright (C) 2003 Harald Harders.
+%%
+%% This is a slightly modified version of the `subfigure' package by
+%% Steven Douglas Cochran. The origianl package can be downloaded from
+%% <ftp://ftp.dante.de/tex-archive/macros/latex/contrib/subfigure/>.
+%%
+%% The hhsubfigure package is free software; it may be distributed under
+%% the conditions of the LaTeX Project Public License, either version 1.2
+%% of this license or (at your option) any later version. The latest
+%% version of this license is in:
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX version
+%% 1999/09/03 or later.
+%%
+%% The hhsubfigure package is distributed in the hope that it will be
+%% useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LaTeX
+%% Project Public License for more details.
+%%
+%% Please use the hhsubfigure package only in conjunction with the
+%% document class bgteubner.cls. Steven has announced a successor for
+%% this package that will make hhsubfigure unnecessary.
+%%
+\def\batchfile{hhsubfigure.ins}
+\input docstrip.tex
+
+\keepsilent
+\generateFile{ltxdoc.cfg}{t}{\from{hhsubfigure.dtx}{ltxdoc}}
+
+\preamble
+
+Copyright (C) 2003 Harald Harders.
+
+This is a slightly modified version of the `subfigure' package by
+Steven Douglas Cochran. The origianl package can be downloaded from
+<ftp://ftp.dante.de/tex-archive/macros/latex/contrib/subfigure/>.
+
+This file is NOT the source for hhsubfigure, because almost all comments
+have been stripped from it. It is NOT the preferred form of hhsubfigure
+for making modifications to it.
+
+Therefore you can NOT redistribute and/or modify THIS file. You can
+however redistribute the complete source (hhsubfigure.dtx and
+hhsubfigure.ins) and/or modify it under the terms of the LaTeX Project
+Public License, either version 1.2 of this license or (at your option)
+any later version. The latest version of this license is in:
+ http://www.latex-project.org/lppl.txt
+and version 1.2 or later is part of all distributions of LaTeX version
+1999/09/03 or later.
+
+The hhsubfigure package is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LaTeX
+Project Public License for more details.
+
+Please use the hhsubfigure package only in conjunction with the
+document class bgteubner.cls. Steven has announced a successor for
+this package that will make hhsubfigure unnecessary.
+
+\endpreamble
+\generateFile{hhsubfigure.sty}{t}{\from{hhsubfigure.dtx}{package}}
+
+\Msg{***********************************************************}
+\Msg{* To finish the installation you have to move the file}
+\Msg{* `hhsubfigure.sty' into a directory searched by TeX.}
+\Msg{*}
+\Msg{* To have the newer look-and-feel (but with different}
+\Msg{* spacing than the old version) move the file}
+\Msg{* `hhsubfigure.cfg' into a directory searched by TeX.}
+\Msg{*}
+\Msg{* To produce the documentation run the file `hhsubfigure.dtx'}
+\Msg{* through LaTeX.}
+\Msg{***********************************************************}