From 5ac3f72077e2326d5c7203f2c7e992f20f7ed37f Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 5 May 2017 22:36:55 +0000
Subject: bgteubner (5may17)

git-svn-id: svn://tug.org/texlive/trunk@44205 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/bgteubner/bgteubner.cls   | 293 +++++++++++++--------
 1 file changed, 180 insertions(+), 113 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/bgteubner/bgteubner.cls')

diff --git a/Master/texmf-dist/tex/latex/bgteubner/bgteubner.cls b/Master/texmf-dist/tex/latex/bgteubner/bgteubner.cls
index db5368b4c83..bc0a45189e7 100644
--- a/Master/texmf-dist/tex/latex/bgteubner/bgteubner.cls
+++ b/Master/texmf-dist/tex/latex/bgteubner/bgteubner.cls
@@ -8,7 +8,7 @@
 %% 
 %%   bgteubner class bundle
 %% 
-%%   Copyright 2003--2012 Harald Harders
+%%   Copyright 2003--2015 Harald Harders
 %% 
 %%   This program may be distributed and/or modified under the
 %%   conditions of the LaTeX Project Public License, either version 1.3
@@ -33,7 +33,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{bgteubner}
-  [2012/04/07  v2.02  Springer Vieweg Verlag]
+  [2015/05/17  v2.11  Springer Vieweg Verlag]
 \typeout{^^J^^JDokumentklasse zum Erstellen von Buechern fuer den
   Springer Vieweg Verlag, Wiesbaden}%
 \typeout{(vormals Vieweg+Teubner Verlag, B. G. Teubner Verlag).}%
@@ -41,16 +41,9 @@
 \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.pdf (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.}%
+  bgteubner-cm.pdf (European Computer Modern, 17cm x 24cm).}%
 \typeout{^^JDocument class to produce books for the Springer Vieweg
   Verlag, Wiesbaden, Germany}%
 \typeout{(formerly Vieweg+Teubner Verlag, B. G. Teubner Verlag).}%
@@ -111,16 +104,16 @@
     \@popfilename
     \@reset@ptions}%
   \reserved@a}
-\PassOptionsToClass{smallheadings}{scrbook}
-\PassOptionsToClass{bibtotoc,idxtotoc,liststotoc}{scrbook}
+\PassOptionsToClass{headings=small}{scrbook}
+\PassOptionsToClass{bibliography=totoc,index=totoc,listof=totoc}{scrbook}
 \PassOptionsToClass{fleqn}{scrbook}
 \PassOptionsToPackage{fleqn}{amsmath}
 \PassOptionsToPackage{intlimits}{amsmath}
-\PassOptionsToClass{pointlessnumbers}{scrbook}
-\PassOptionsToClass{cleardoubleempty}{scrbook}
-\PassOptionsToClass{headnosepline}{scrbook}
-\PassOptionsToClass{noappendixprefix}{scrbook}
-\PassOptionsToClass{tablecaptionabove}{scrbook}
+\PassOptionsToClass{numbers=noenddot}{scrbook}
+\PassOptionsToClass{cleardoublepage=empty}{scrbook}
+\PassOptionsToClass{headsepline=false}{scrbook}
+\PassOptionsToClass{appendixprefix=false}{scrbook}
+\PassOptionsToClass{captions=tableheading}{scrbook}
 \PassOptionsToPackage{pagesize,headinclude}{typearea}
 \newif\ifhhcls@dinafuenf
 \DeclareOption{a5paper}{\hhcls@dinafuenftrue}
@@ -177,8 +170,8 @@
 \ExecuteOptions{times,headingoutside,17x24,tocindent,%
   normaltheorem,springervieweg}
 \ProcessOptions\relax
-\PassOptionsToClass{10pt}{scrbook}
-\LoadClass{scrbook}[2003/04/22]
+\PassOptionsToClass{fontsize=10pt}{scrbook}
+\LoadClass{scrbook}[2011/06/16]
 \let\scr@fnt@wrn@pagehead=\@undefined
 \let\scr@fnt@wrn@pagefoot=\@undefined
 \RequirePackage{fixltx2e}[2000/09/24]
@@ -292,6 +285,7 @@
 \RequirePackage{fnbreak}[2003/04/03]
 \RequirePackage[countmax]{subfloat}[2002/12/16]
 \RequirePackage{multicol}[2000/07/10]
+\let\ifpdfoutput\relax
 \RequirePackage[activate]{pdfcprot}[2002/02/27]
 \ifpdftex{}{%
   \ClassError{bgteubner}{Ordinary latex used to compile this
@@ -682,34 +676,50 @@
   \typeout{Number of tables: \thetabellenzahl}%
   \typeout{Number of exercises: \theaufgabenzahl^^J}%
 }%
-\renewcommand*\listoffigures{%
-  \begingroup%
-    \if@twocolumn
-      \@restonecoltrue\onecolumn
-    \else
-      \@restonecolfalse
-    \fi
-    \lof@heading%
-    \small
-    \@parskipfalse\@parskip@indent%
-    \@starttoc{lof}%
-    \if@restonecol\twocolumn\fi
-  \endgroup
-}
-\renewcommand*\listoftables{%
-  \begingroup
-    \if@twocolumn
-      \@restonecoltrue\onecolumn
-    \else
-      \@restonecolfalse
-    \fi
-    \lot@heading%
-    \small
-    \@parskipfalse\@parskip@indent%
-    \@starttoc{lot}%
-    \if@restonecol\twocolumn\fi
-  \endgroup
-}
+\@ifundefined{BeforeStartingTOC}{%
+  \ClassWarningNoLine{bgteubner}{Koma-Script macro
+    \string\BeforeStartingTOC\space not defined.\MessageBreak
+    Using workaround for \string\listoffigures. \MessageBreak
+    You should consider updating Koma-Script.}%
+  \renewcommand*\listoffigures{%
+    \begingroup%
+      \if@twocolumn
+        \@restonecoltrue\onecolumn
+      \else
+        \@restonecolfalse
+      \fi
+      \lof@heading%
+      \small
+      \@parskipfalse\@parskip@indent%
+      \@starttoc{lof}%
+      \if@restonecol\twocolumn\fi
+    \endgroup
+  }
+}{%
+  \BeforeStartingTOC[lof]{\small}
+}%
+\@ifundefined{BeforeStartingTOC}{%
+  \ClassWarningNoLine{bgteubner}{Koma-Script macro
+    \string\BeforeStartingTOC\space not defined.\MessageBreak
+    Using workaround for \string\listoftables.\MessageBreak
+    You should consider updating Koma-Script.}%
+  \renewcommand*\listoftables{%
+    \begingroup
+      \if@twocolumn
+        \@restonecoltrue\onecolumn
+      \else
+        \@restonecolfalse
+      \fi
+      \lot@heading%
+      \small
+      \@parskipfalse\@parskip@indent%
+      \@starttoc{lot}%
+      \if@restonecol\twocolumn\fi
+    \endgroup
+  }
+}{%
+  \BeforeStartingTOC[lot]{\small}
+}%
 \newcommand\hhcls@makeindex{}
 \let\hhcls@makeindex=\makeindex
 \renewcommand\makeindex{%
@@ -766,6 +776,9 @@
 \newcommand*\textbfff[1]{\textbf{#1\,ff}}%
 \newcommand\subind{\,--\,\hskip\z@skip}%
 \newcommand*\emphindex[1]{\textbf{#1}}%
+\BeforePackage{imakeidx}{%
+  \PassOptionsToPackage{original}{imakeidx}
+}
 \deffootnote{1.5em}{1.5em}{\normalfont\newstylenums{\thefootnotemark}\enspace}
 \addtokomafont{footnote}{\normalfont\RaggedRight}
 \deffootnotemark{\textsuperscript{\newstylenums{\thefootnotemark}}}
@@ -1392,7 +1405,7 @@
         \addcontentsline{#1}{#1}{##1}%
       \else
         \addcontentsline{#1}{#1}{%
-          \numberline {\csname thetheorem@#1\endcsname}##1}%
+          \protect\numberline {\csname thetheorem@#1\endcsname}##1}%
       \fi
     \fi
     \nobreak\ignorespaces
@@ -1410,19 +1423,31 @@
     \typeout{#2: \csname thetheorem@#1zahl\endcsname\space times used}%
   }
 }
-\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
+\@ifundefined{BeforeStartingTOC}{%
+  \ClassWarningNoLine{bgteubner}{Koma-Script macro
+    \string\BeforeStartingTOC\space not defined.\MessageBreak
+    Using workaround for \string\listoftheorems.\MessageBreak
+    You should consider updating Koma-Script}%
+  \newcommand*\listoftheorems[2]{%
+    \begingroup%
+      \if@twocolumn
+        \@restonecoltrue\onecolumn
+      \else
+        \@restonecolfalse
+      \fi
+      \float@listhead{#2}%
+      \small
+      \setlength{\parskip}{\z@}%
+      \@starttoc{#1}%
+      \if@restonecol\twocolumn\fi
+    \endgroup
+  }
+}{%
+  \newcommand*\listoftheorems[2]{%
+    \expandafter\def\csname listof#1name\endcsname{#2}%
+    \BeforeStartingTOC[#1]{\small}%
+    \listoftoc{#1}%
+  }
 }
 \newenvironment{theoremdelimiter}[2]{%
   \expandafter\def\csname theorem@#1postfix\endcsname{#2}%
@@ -1739,17 +1764,34 @@
 \setlength{\hhcls@@exerciseindent}{7.8398em}%
 \newcounter{@exercise}
 \renewcommand*\the@exercise{\@arabic\c@@exercise}
-\newcommand\@exercise{\@startsection{@exercise}{1}{\z@}%
-  {-3.5ex \@plus -1ex \@minus -.2ex}%
-  {2.3ex \@plus.2ex}%
-  {\raggedsection\normalfont\sectfont\nobreak\size@section\nobreak}}
-\if@exercisetotoc
-  \newcommand*\l@@exercise[2]{\@dottedtocline{1}{1.5em}{2.3em}{%
-      \def\numberline##1{%
-        \hb@xt@\@tempdima{\lprefix@exercise##1\hfil}}#1}{#2}}
-\else
-  \newcommand*\l@@exercise[2]{}
-\fi
+\newcommand*{\scr@fnt@@exercise}{\size@section}
+\@ifundefined{DeclareSectionCommand}{%
+  \ClassWarningNoLine{bgteubner}{Koma-Script macro
+    \string\DeclareSectionCommand\space not defined.\MessageBreak
+    Using workaround for exercise environment.\MessageBreak
+    You should consider updating Koma-Script}%
+  \newcommand\@exercise{\@startsection{@exercise}{1}{\z@}%
+    {-3.5ex \@plus -1ex \@minus -.2ex}%
+    {2.3ex \@plus.2ex}%
+    {\raggedsection\normalfont\sectfont\nobreak\size@section\nobreak}}
+  \if@exercisetotoc
+    \newcommand*\l@@exercise[2]{\@dottedtocline{1}{1.5em}{2.3em}{%
+        \def\numberline##1{%
+          \hb@xt@\@tempdima{\lprefix@exercise##1\hfil}}#1}{#2}}
+  \else
+    \newcommand*\l@@exercise[2]{}
+  \fi
+}{%
+  \DeclareSectionCommand[%
+    style=section,%
+    level=1,%
+    indent=\z@,%
+    beforeskip=-3.5ex \@plus -1ex \@minus -.2ex,%
+    afterskip=2.3ex \@plus.2ex,%
+    tocindent=1.5em,%
+    tocnumwidth=2.3em%
+  ]{@exercise}
+}%
 \newcommand*\exercisename{Aufgabe}
 \def\prefix@exercise{\exercisename~}%
 \def\postfix@exercise{:}%
@@ -1765,7 +1807,7 @@
   \setcounter{subtaskoffset}{0}%
   \stepcounter{aufgabenzahl}%
   \@exercise{#1}%
-  \addcontentsline{exercise}{exercise}{\numberline {\the@exercise}#1}%
+  \addcontentsline{exercise}{exercise}{\protect\numberline {\the@exercise}#1}%
   \gliederungsfehler{exercise}%
   \exercisefont
 }{%
@@ -1912,7 +1954,7 @@
           \addcontentsline{exercise}{exercise}{#1}%
         \else
           \addcontentsline{exercise}{exercise}{%
-            \numberline{\the@subexercise}#1}%
+            \protect\numberline{\the@subexercise}#1}%
         \fi
       \fi
       \subexercisefont
@@ -1991,20 +2033,30 @@
   \noindentnextpar
   \par
 }
-\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
+\@ifundefined{BeforeStartingTOC}{%
+  \ClassWarningNoLine{bgteubner}{Koma-Script macro
+    \string\BeforeStartingTOC\space not defined.\MessageBreak
+    Using workaround for \string\listofexercises.\MessageBreak
+    You should consider updating Koma-Script}%
+  \newcommand*\exercise@heading{\float@listhead{\listexercisename}}
+  \newcommand*\listofexercises{%
+    \begingroup%
+      \if@twocolumn
+        \@restonecoltrue\onecolumn
+      \else
+        \@restonecolfalse
+      \fi
+      \exercise@heading
+      \small
+      \setlength{\parskip}{\z@}%
+      \@starttoc{exercise}%
+      \if@restonecol\twocolumn\fi
+    \endgroup
+  }
+}{%
+  \newcommand*\listofexercises{\listoftoc{exercise}}
+  \newcommand*\listofexercisename{\listexercisename}
+  \BeforeStartingTOC[exercise]{\small}
 }
 \newcommand*\listexercisename{List of Exercises}
 \newcommand*\hhcls@germanlistexercisename{Aufgabenverzeichnis}
@@ -2062,6 +2114,11 @@
     #3%
   \end{minipage}%
 }
+\AfterPackage{hyperref}{%
+  \hypersetup{%
+    unicode
+  }%
+}%
 \let\@author=\@empty
 \let\@title\@empty
 \let\@subtitle\@empty
@@ -2074,52 +2131,61 @@
 \newwrite\hhcls@fileinfo
 \immediate\openout\hhcls@fileinfo\jobname.info
 \AtEndDocument{%
+  \ifx\pdfstringdef\@undefined
+     \def\hhcls@title{\@title}%
+     \ifx\@subtitle\@empty
+       \def\hhcls@subject{\@edition. Auflage}%
+     \else
+       \def\hhcls@subject{\@subtitle\space (\@edition. Auflage)}%
+     \fi
+     \def\hhcls@author{\@author}%
+  \else
+     \pdfstringdef\hhcls@title{\@title}%
+     \ifx\@subtitle\@empty
+       \pdfstringdef\hhcls@subject{\@edition. Auflage}%
+     \else
+       \pdfstringdef\hhcls@subject{\@subtitle\space (\@edition. Auflage)}%
+     \fi
+     \pdfstringdef\hhcls@author{\@author}%
+  \fi
   \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
+    \ifx\@title\@empty\else\pdfinfo{/Title (\hhcls@title)}\fi
+    \ifx\hhcls@subject\@empty\else\pdfinfo{/Subject (\hhcls@subject)}\fi
+    \ifx\@author\@empty\else\pdfinfo{/Author (\hhcls@author)}\fi
     % 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'.
+    % - a hint that this class has been developed for the `Springer
+    %   Vieweg Verlag, Wiesbaden, Germany'.
     \begingroup
     \GetFileInfo{bgteubner.cls}%
-    \pdfinfo{/Creator (document class bgteubner.cls for the
-      Springer Vieweg Verlag, Wiesbaden, Germany, by Harald Harders
-      \fileversion)}%
+    \pdfinfo{/Creator (Document class bgteubner.cls for the
+      Springer Vieweg Verlag, Wiesbaden, Germany, by Harald Harders,
+      version \fileversion)}%
     \endgroup
     \pdfinfo{/Keywords (Bild: \thebilderzahl; Tabelle: \thetabellenzahl;
       Aufgabe: \theaufgabenzahl\hhcls@theoremanzahl)}%
   \fi
-  \if\@title\@empty
+  \ifx\@title\@empty
   \else
-    \immediate\write\hhcls@fileinfo{Titel: \@title}%
+    \protected@write\hhcls@fileinfo{}{Titel: \@title}%
   \fi
-  \if\@subtitle\@empty
+  \ifx\@subtitle\@empty
   \else
-    \immediate\write\hhcls@fileinfo{Untertitel: \@subtitle}%
-  \fi
-  \if\@subtitle\@empty
+    \protected@write\hhcls@fileinfo{}{Untertitel: \@subtitle}%
   \fi
-  \immediate\write\hhcls@fileinfo{\@edition. Auflage}%
+  \protected@write\hhcls@fileinfo{}{\@edition. Auflage}%
   \ifx\@author\@empty
   \else
-    \immediate\write\hhcls@fileinfo{Autor(en): \@author}%
+    \protected@write\hhcls@fileinfo{}{Autor(en): \@author}%
   \fi
-  \immediate\write\hhcls@fileinfo{Bild: \thebilderzahl; Tabelle:
+  \protected@write\hhcls@fileinfo{}{Bild: \thebilderzahl; Tabelle:
     \thetabellenzahl; Aufgabe: \theaufgabenzahl\hhcls@theoremanzahl}%
 }
 \ifhhcls@titlepage
 \renewcommand*\maketitle{%
+  \begingroup
   \edef\hhcls@tmppage{\arabic{page}}%
   \begin{titlepage}%
     \renewcommand{\sfdefault}{phv}%
@@ -2222,6 +2288,7 @@
      \if@twoside \next@tpage\cleardoublepage \fi
    \fi
   \global\let\maketitle\relax
+  \endgroup
 }
 \else
   \renewcommand\maketitle{%
-- 
cgit v1.2.3

