From 82dc50c595ce8268fd46c4af7ce77bf20af120d0 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 11 Oct 2007 23:46:49 +0000
Subject: koma-script 2.97c (10oct07)

git-svn-id: svn://tug.org/texlive/trunk@5160 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/koma-script/scrbook.cls   | 772 ++++++++++-----------
 1 file changed, 361 insertions(+), 411 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/koma-script/scrbook.cls')

diff --git a/Master/texmf-dist/tex/latex/koma-script/scrbook.cls b/Master/texmf-dist/tex/latex/koma-script/scrbook.cls
index 73ad231cc42..3409d50a09c 100644
--- a/Master/texmf-dist/tex/latex/koma-script/scrbook.cls
+++ b/Master/texmf-dist/tex/latex/koma-script/scrbook.cls
@@ -91,7 +91,7 @@
       \fi
     }
   \fi
-  \@CheckKOMAScriptVersion{2007/03/07 v2.97a KOMA-Script}%
+  \@CheckKOMAScriptVersion{2007/09/28 v2.97c KOMA-Script}%
 \endgroup
 \newcommand*{\KOMAClassName}{%
   scrbook%
@@ -107,7 +107,7 @@
 %%% From File: scrkcomp.dtx
 \newcommand*{\scr@compatibility}{0}
 \KOMA@key{version}[last]{%
-  \scr@ifundefined{scr@v@#1}{%
+  \scr@ifundefinedorrelax{scr@v@#1}{%
     \def\scr@compatibility{0}%
     \ClassWarningNoLine{\KOMAClassName}{%
       You have set option `version' to value `#1', but\MessageBreak
@@ -139,6 +139,8 @@
 \@namedef{scr@v@2.96a}{3}
 \@namedef{scr@v@2.97}{3}
 \@namedef{scr@v@2.97a}{3}
+\@namedef{scr@v@2.97b}{3}
+\@namedef{scr@v@2.97c}{3}
 \@namedef{scr@v@last}{3}
 %%% From File: scrkmisc.dtx
 \KOMA@key{draft}[true]{%
@@ -164,12 +166,12 @@
 \def\@pt@@scan #1pt#2\@pt@@scan{%
   \ifstr{#2}{pt}{%
     \ifnumber{#1}{%
-      \KOMA@UseObsolete{option}{\PackageInfo}{#1#2}{fontsize=#1#2}%
+      \KOMA@UseObsoleteOption{\PackageInfo}{#1#2}{fontsize=#1#2}%
     }{\@headlines}%
   }{\@headlines}%
 }
 \KOMA@key{fontsize}{%
-  \scr@ifundefined{changefontsizes}{%
+  \scr@ifundefinedorrelax{changefontsizes}{%
     \@defaultunits\@tempdima#1pt\relax\@nnil
     \edef\@ptsize{#1}%
   }{%
@@ -234,31 +236,8 @@
 \newcommand*{\scr@pti@nerr@r}{
   \OptionNotUsed
 }
-\KOMA@key{headlines}{%
-  \PassOptionsToPackage{headlines=#1}{typearea}%
-}
-\KOMA@key{headinclude}[true]{\PassOptionsToPackage{headinclude=#1}{typearea}}
-\KOMA@key{footinclude}[true]{\PassOptionsToPackage{footinclude=#1}{typearea}}
-\KOMA@key{mpinclude}[true]{\PassOptionsToPackage{mpinclude=#1}{typearea}}
-\KOMA@key{BCOR}{%
-  \PassOptionsToPackage{BCOR=#1}{typearea}%
-}
-\KOMA@key{DIV}[calc]{%
-  \PassOptionsToPackage{DIV=#1}{typearea}%
-}
-\KOMA@key{twoside}[true]{%
-  \KOMA@set@ifkey{twoside}{@twoside}{#1}%
-  \if@twoside\@mparswitchtrue\else\@mparswitchfalse\fi%
-}
-\KOMA@key{twocolumn}[true]{%
-  \KOMA@set@ifkey{twocolumn}{@twocolumn}{#1}%
-}
-\KOMA@key{pagesize}[auto]{%
-  \PassOptionsToPackage{pagesize=#1}{typearea}%
-}
-\KOMA@key{paper}{%
-  \PassOptionsToPackage{paper=#1}{typearea}%
-}
+\DeclareOption*{%
+  \x@paper}
 %%% From File: scrkpar.dtx
 \newcommand*{\setparsizes}[3]{%
   \edef\f@parindent{\the\parindent}%
@@ -537,9 +516,7 @@
   \KOMA@set@ifkey{headsepline}{@hsl}{#1}%
   \@ifpackageloaded{typearea}{%
     \KOMAoptions{headinclude=#1}%
-  }{%
-    \PassOptionsToPackage{headinclude=#1}{typearea}%
-  }%
+  }{}%
 }
 \KOMA@DeclareObsoleteOption[\PackageInfo]{headnosepline}{headsepline=false}
 \newif\if@fsl
@@ -547,11 +524,10 @@
   \KOMA@set@ifkey{footsepline}{@fsl}{#1}%
   \@ifpackageloaded{typearea}{%
     \KOMAoptions{footinclude=#1}%
-  }{%
-    \PassOptionsToPackage{footinclude=#1}{typearea}%
-  }%
+  }{}%
 }
 \KOMA@DeclareObsoleteOption[\PackageInfo]{footnosepline}{footsepline=false}
+\@twosidetrue
 \KOMA@key{cleardoublepage}{%
   \begingroup%
     \def\@tempc{%
@@ -685,244 +661,253 @@
 }
 %%% From File: scrklist.dtx
 %%% From File: scrkmisc.dtx
-\DeclareKeyValOption[%
-  \let\scr@pti@nerr@r
-    \OptionNotUsed
-  \x@paper
-]{KOMA}
-\KOMAoptions{%
-  draft=false,headsepline=false,footsepline=false,parskip=false%
-  ,twoside%
-}
-\ProcessOptions\relax
+\KOMAExecuteOptions{%
+  parskip=false%
+}
+\KOMAProcessOptions\relax
 %%% From File: scrkcomp.dtx
 %%% From File: scrkfont.dtx
 \newcommand*{\changefontsizes}[2][1.2\@tempdima]{%
   \ClassWarning{\KOMAClassName}{%
     Using fallback calculation to setup font sizes\MessageBreak
     for basic size `#2'}%
-  \@defaultunits\@tempdima#2pt\relax\@nnil
-  \setlength{\@tempdimc}{\@tempdima}%
-  \addtolength{\@tempdimc}{-10\p@}%
-  \edef\@ptsize{\strip@pt\@tempdimc}%
-  \@defaultunits\@tempdimb#1pt\relax\@nnil
-  \setlength{\@tempdimc}{\dimexpr (100\@tempdimb / \@tempdima * \p@)}%
-  \edef\@tempb{\the\@tempdimc}%
-  \setlength{\@tempdimc}{\@tempdima}%
-  \def\@tempa##1##2##3##4##5\@nnil{\def##1{##2.##3##4}}%
-  \expandafter\@tempa\expandafter\@tempb\@tempb\@nnil%
-  \setlength{\abovedisplayskip}{%
-    \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
-  \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
-  \setlength{\belowdisplayskip}{\abovedisplayskip}%
-  \setlength{\belowdisplayshortskip}{%
-    .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
-  \edef\normalsize{%
-    \noexpand\@setfontsize\noexpand\normalsize
+  \scr@ifundefinedorrelax{dimexpr}{%
+    \ClassError{\KOMAClassName}{%
+      feature only allowed using e-TeX%
+    }{%
+      The fallback calculation to setup font sizes was implemented
+      using e-TeX.\MessageBreak
+      You should not continue, because the fallback calculation would fail%
+    }
+  }{%
+    \@defaultunits\@tempdima#2pt\relax\@nnil
+    \setlength{\@tempdimc}{\@tempdima}%
+    \addtolength{\@tempdimc}{-10\p@}%
+    \edef\@ptsize{\strip@pt\@tempdimc}%
+    \@defaultunits\@tempdimb#1pt\relax\@nnil
+    \setlength{\@tempdimc}{\dimexpr (100\@tempdimb / \@tempdima * \p@)}%
+    \edef\@tempb{\the\@tempdimc}%
+    \setlength{\@tempdimc}{\@tempdima}%
+    \def\@tempa##1##2##3##4##5\@nnil{\def##1{##2.##3##4}}%
+    \expandafter\@tempa\expandafter\@tempb\@tempb\@nnil%
+    \setlength{\abovedisplayskip}{%
+      \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
+    \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
+    \setlength{\belowdisplayskip}{\abovedisplayskip}%
+    \setlength{\belowdisplayshortskip}{%
+      .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
+    \edef\normalsize{%
+      \noexpand\@setfontsize\noexpand\normalsize
       {\the\@tempdima}{\the\@tempdimb}%
-    \abovedisplayskip \the\abovedisplayskip
-    \abovedisplayshortskip \the\abovedisplayshortskip
-    \belowdisplayskip \the\belowdisplayskip
-    \belowdisplayshortskip \the\belowdisplayshortskip
-    \let\noexpand\@listi\noexpand\@listI
-  }%
-  \setlength{\@tempdima}{0.9125\@tempdimc}%
-  \setlength{\@tempdimb}{\@tempb\@tempdima}%
-  \setlength{\abovedisplayskip}{%
-    \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
-  \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
-  \setlength{\belowdisplayskip}{\abovedisplayskip}%
-  \setlength{\belowdisplayshortskip}{%
-    .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
-  \edef\small{%
-    \noexpand\@setfontsize\noexpand\small
+      \abovedisplayskip \the\abovedisplayskip
+      \abovedisplayshortskip \the\abovedisplayshortskip
+      \belowdisplayskip \the\belowdisplayskip
+      \belowdisplayshortskip \the\belowdisplayshortskip
+      \let\noexpand\@listi\noexpand\@listI
+    }%
+    \setlength{\@tempdima}{0.9125\@tempdimc}%
+    \setlength{\@tempdimb}{\@tempb\@tempdima}%
+    \setlength{\abovedisplayskip}{%
+      \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
+    \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
+    \setlength{\belowdisplayskip}{\abovedisplayskip}%
+    \setlength{\belowdisplayshortskip}{%
+      .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
+    \edef\small{%
+      \noexpand\@setfontsize\noexpand\small
       {\the\@tempdima}{\the\@tempdimb}%
-    \abovedisplayskip \the\abovedisplayskip
-    \abovedisplayshortskip \the\abovedisplayshortskip
-    \belowdisplayskip \the\belowdisplayskip
-    \belowdisplayshortskip \the\belowdisplayshortskip
-    \let\noexpand\@listi\noexpand\@listi@small
-  }%
-  \setlength{\@tempdima}{.83334\@tempdimc}%
-  \setlength{\@tempdimb}{\@tempb\@tempdima}%
-  \setlength{\abovedisplayskip}{%
-    \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
-  \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
-  \setlength{\belowdisplayskip}{\abovedisplayskip}%
-  \setlength{\belowdisplayshortskip}{%
-    .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
-  \edef\footnotesize{%
-    \noexpand\@setfontsize\noexpand\footnotesize
+      \abovedisplayskip \the\abovedisplayskip
+      \abovedisplayshortskip \the\abovedisplayshortskip
+      \belowdisplayskip \the\belowdisplayskip
+      \belowdisplayshortskip \the\belowdisplayshortskip
+      \let\noexpand\@listi\noexpand\@listi@small
+    }%
+    \setlength{\@tempdima}{.83334\@tempdimc}%
+    \setlength{\@tempdimb}{\@tempb\@tempdima}%
+    \setlength{\abovedisplayskip}{%
+      \@tempdima \@plus .25\@tempdima \@minus .58\@tempdima}%
+    \setlength{\abovedisplayshortskip}{\z@ \@plus .25\@tempdima}%
+    \setlength{\belowdisplayskip}{\abovedisplayskip}%
+    \setlength{\belowdisplayshortskip}{%
+      .55\@tempdima \@plus .3\@tempdima \@minus .25\@tempdima}%
+    \edef\footnotesize{%
+      \noexpand\@setfontsize\noexpand\footnotesize
       {\the\@tempdima}{\the\@tempdimb}%
-    \abovedisplayskip \the\abovedisplayskip
-    \abovedisplayshortskip \the\abovedisplayshortskip
-    \belowdisplayskip \the\belowdisplayskip
-    \belowdisplayshortskip \the\belowdisplayshortskip
-    \let\noexpand\@listi\noexpand\@listi@footnotesize
-  }%
-  \setlength{\@tempdima}{.66667\@tempdimc}%
-  \setlength{\@tempdimb}{\@tempb\@tempdima}%
-  \edef\scriptsize{%
-    \noexpand\@setfontsize\noexpand\scriptsize
+      \abovedisplayskip \the\abovedisplayskip
+      \abovedisplayshortskip \the\abovedisplayshortskip
+      \belowdisplayskip \the\belowdisplayskip
+      \belowdisplayshortskip \the\belowdisplayshortskip
+      \let\noexpand\@listi\noexpand\@listi@footnotesize
+    }%
+    \setlength{\@tempdima}{.66667\@tempdimc}%
+    \setlength{\@tempdimb}{\@tempb\@tempdima}%
+    \edef\scriptsize{%
+      \noexpand\@setfontsize\noexpand\scriptsize
       {\the\@tempdima}{\the\@tempdimb}%
-  }%
-  \setlength{\@tempdima}{.5\@tempdimc}%
-  \setlength{\@tempdimb}{\@tempb\@tempdima}%
-  \edef\tiny{%
-    \noexpand\@setfontsize\noexpand\tiny
+    }%
+    \setlength{\@tempdima}{.5\@tempdimc}%
+    \setlength{\@tempdimb}{\@tempb\@tempdima}%
+    \edef\tiny{%
+      \noexpand\@setfontsize\noexpand\tiny
       {\the\@tempdima}{\the\@tempdimb}%
-  }%
-  \setlength{\@tempdima}{1.2\@tempdimc}%
-  \setlength{\@tempdimb}{\@tempb\@tempdima}%
-  \edef\large{%
-    \noexpand\@setfontsize\noexpand\large
+    }%
+    \setlength{\@tempdima}{1.2\@tempdimc}%
+    \setlength{\@tempdimb}{\@tempb\@tempdima}%
+    \edef\large{%
+      \noexpand\@setfontsize\noexpand\large
       {\the\@tempdima}{\the\@tempdimb}%
-  }%
-  \setlength{\@tempdima}{1.44\@tempdimc}%
-  \setlength{\@tempdimb}{\@tempb\@tempdima}%
-  \edef\Large{%
-    \noexpand\@setfontsize\noexpand\Large
+    }%
+    \setlength{\@tempdima}{1.44\@tempdimc}%
+    \setlength{\@tempdimb}{\@tempb\@tempdima}%
+    \edef\Large{%
+      \noexpand\@setfontsize\noexpand\Large
       {\the\@tempdima}{\the\@tempdimb}%
-  }%
-  \setlength{\@tempdima}{1.728\@tempdimc}%
-  \setlength{\@tempdimb}{\@tempb\@tempdima}%
-  \edef\LARGE{%
-    \noexpand\@setfontsize\noexpand\LARGE
+    }%
+    \setlength{\@tempdima}{1.728\@tempdimc}%
+    \setlength{\@tempdimb}{\@tempb\@tempdima}%
+    \edef\LARGE{%
+      \noexpand\@setfontsize\noexpand\LARGE
       {\the\@tempdima}{\the\@tempdimb}%
-  }%
-  \setlength{\@tempdima}{2.074\@tempdimc}%
-  \setlength{\@tempdimb}{\@tempb\@tempdima}%
-  \edef\huge{%
-    \noexpand\@setfontsize\noexpand\huge
+    }%
+    \setlength{\@tempdima}{2.074\@tempdimc}%
+    \setlength{\@tempdimb}{\@tempb\@tempdima}%
+    \edef\huge{%
+      \noexpand\@setfontsize\noexpand\huge
       {\the\@tempdima}{\the\@tempdimb}%
-  }%
-  \setlength{\@tempdima}{2.488\@tempdimc}%
-  \setlength{\@tempdimb}{\@tempb\@tempdima}%
-  \edef\Huge{%
-    \noexpand\@setfontsize\noexpand\Huge
+    }%
+    \setlength{\@tempdima}{2.488\@tempdimc}%
+    \setlength{\@tempdimb}{\@tempb\@tempdima}%
+    \edef\Huge{%
+      \noexpand\@setfontsize\noexpand\Huge
       {\the\@tempdima}{\the\@tempdimb}%
+    }%
+    \normalsize
+    \setlength{\footnotesep}{.7\@tempdimc}%
+    \setlength{\skip\footins}{.9\@tempdimc \@plus .3333\@tempdimc \@minus
+      .6\@tempdimc}%
+    \setlength{\floatsep}{\@tempdimc \@plus .1667\@tempdimc \@minus
+      .3333\@tempdimc}%
+    \setlength{\textfloatsep}{1.6667\@tempdimc \@plus .1667\@tempdimc \@minus
+      .3333\@tempdimc}%
+    \setlength{\intextsep}{\@tempb\@tempdimc \@plus .3333\@tempdimc \@minus
+      .3333\@tempdimc}%
+    \setlength{\dblfloatsep}{\@tempb\@tempdimc \@plus .1667\@tempdimc \@minus
+      .3333\@tempdimc}%
+    \setlength{\dbltextfloatsep}{\textfloatsep}%
+    \setlength{\@fptop}{0\p@ \@plus 1fil}%
+    \setlength{\@fpsep}{.8333\@tempdimc \@plus 2fil}%
+    \setlength{\@fpbot}{\@fptop}%
+    \setlength{\@dblfptop}{0\p@ \@plus 1fil}%
+    \setlength{\@dblfpsep}{.8333\@tempdimc \@plus 2fil}%
+    \setlength{\@dblfpbot}{\@fptop}%
+    \setlength{\partopsep}{.25\@tempdimc \@plus .16667\@tempdimc \@minus
+      .16667\@tempdimc}%
+    \setlength{\topsep}{.8333\@tempdimc \@plus .3333\@tempdimc \@minus
+      .5\@tempdimc}%
+    \setlength{\parsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}%
+    \@tempswafalse
+    \begingroup
+      \def\@list@extra{\aftergroup\@tempswatrue}%
+      \csname @listi\endcsname
+    \endgroup
+    \edef\@listi{\leftmargin\leftmargini
+      \topsep \the\topsep
+      \parsep \the\parsep
+      \itemsep \parsep
+      \if@tempswa\noexpand\@list@extra\fi
+    }%
+    \let\@listI\@listi
+    \setlength{\topsep}{.75\@tempdimc \@plus .25\@tempdimc \@minus
+      .41667\@tempdimc}%
+    \setlength{\parsep}{.375\@tempdimc \@plus .16667\@tempdimc \@minus \p@}%
+    \@tempswafalse
+    \begingroup
+      \def\@list@extra{\aftergroup\@tempswatrue}%
+      \csname @listi\endcsname
+    \endgroup
+    \edef\@listi@small{\leftmargin\leftmargini
+      \topsep \the\topsep
+      \parsep \the\parsep
+      \itemsep \parsep
+      \if@tempswa\noexpand\@list@extra\fi
+    }%
+    \setlength{\topsep}{.5\@tempdimc \@plus .16667\@tempdimc \@minus
+      .16667\@tempdimc}%
+    \setlength{\parsep}{.25\@tempdimc \@plus .16667\@tempdimc \@minus \p@}%
+    \@tempswafalse
+    \begingroup
+      \def\@list@extra{\aftergroup\@tempswatrue}%
+      \csname @listi\endcsname
+    \endgroup
+    \edef\@listi@footnotesize{\leftmargin\leftmargini
+      \topsep \the\topsep
+      \parsep \the\parsep
+      \itemsep \parsep
+      \if@tempswa\noexpand\@list@extra\fi
+    }%
+    \setlength{\topsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}%
+    \setlength{\parsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}%
+    \@tempswafalse
+    \begingroup
+      \def\@list@extra{\aftergroup\@tempswatrue}%
+      \csname @listii\endcsname
+    \endgroup
+    \edef\@listii{\leftmargin\leftmarginii
+      \labelwidth=\dimexpr \leftmargin-\labelsep
+      \topsep \the\topsep
+      \parsep \the\parsep
+      \itemsep \parsep
+      \if@tempswa\noexpand\@list@extra\fi
+    }%
+    \setlength{\topsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}%
+    \setlength{\parsep}{\p@ \@plus\z@ \@minus\p@}%
+    \@tempswafalse
+    \begingroup
+      \def\@list@extra{\aftergroup\@tempswatrue}%
+      \csname @listiii\endcsname
+    \endgroup
+    \edef\@listiii{\leftmargin\leftmarginiii
+      \labelwidth=\dimexpr \leftmargin-\labelsep
+      \topsep \the\topsep
+      \parsep \z@
+      \partopsep \the\parsep
+      \itemsep \topsep
+      \if@tempswa\noexpand\@list@extra\fi
+    }%
+    \@tempswafalse
+    \begingroup
+      \def\@list@extra{\aftergroup\@tempswatrue}%
+      \csname @listiv\endcsname
+    \endgroup
+    \def\@listiv{\leftmargin\leftmarginiv
+      \labelwidth=\dimexpr \leftmargin-\labelsep
+      \if@tempswa\noexpand\@list@extra\fi
+    }%
+    \@tempswafalse
+    \begingroup
+      \def\@list@extra{\aftergroup\@tempswatrue}%
+      \csname @listv\endcsname
+    \endgroup
+    \def\@listv{\leftmargin\leftmarginv
+      \labelwidth=\dimexpr \leftmargin-\labelsep
+      \if@tempswa\noexpand\@list@extra\fi
+    }%
+    \@tempswafalse
+    \begingroup
+      \def\@list@extra{\aftergroup\@tempswatrue}%
+      \csname @listvi\endcsname
+    \endgroup
+    \def\@listvi{\leftmargin\leftmarginvi
+      \labelwidth=\dimexpr \leftmargin-\labelsep
+      \if@tempswa\noexpand\@list@extra\fi
+    }%
+    \@listi
+    \setlength{\@tempdimb}{\@tempb\@tempdima}%
+    \setlength{\@tempdima}{\dimexpr \@tempdimb-\@tempdimc}%
+    \setlength\intextsep{\@tempdimb \@plus.2\@tempdima \@minus.2\@tempdima}%
+    \setlength\dblfloatsep\intextsep
+    \setlength\partopsep{.2\@tempdimc \@plus.1\@tempdimc \@minus.1\@tempdimc}%
   }%
-  \normalsize
-  \setlength{\footnotesep}{.7\@tempdimc}%
-  \setlength{\skip\footins}{.9\@tempdimc \@plus .3333\@tempdimc \@minus
-    .6\@tempdimc}%
-  \setlength{\floatsep}{\@tempdimc \@plus .1667\@tempdimc \@minus
-    .3333\@tempdimc}%
-  \setlength{\textfloatsep}{1.6667\@tempdimc \@plus .1667\@tempdimc \@minus
-    .3333\@tempdimc}%
-  \setlength{\intextsep}{\@tempb\@tempdimc \@plus .3333\@tempdimc \@minus
-    .3333\@tempdimc}%
-  \setlength{\dblfloatsep}{\@tempb\@tempdimc \@plus .1667\@tempdimc \@minus
-    .3333\@tempdimc}%
-  \setlength{\dbltextfloatsep}{\textfloatsep}%
-  \setlength{\@fptop}{0\p@ \@plus 1fil}%
-  \setlength{\@fpsep}{.8333\@tempdimc \@plus 2fil}%
-  \setlength{\@fpbot}{\@fptop}%
-  \setlength{\@dblfptop}{0\p@ \@plus 1fil}%
-  \setlength{\@dblfpsep}{.8333\@tempdimc \@plus 2fil}%
-  \setlength{\@dblfpbot}{\@fptop}%
-  \setlength{\partopsep}{.25\@tempdimc \@plus .16667\@tempdimc \@minus
-    .16667\@tempdimc}%
-  \setlength{\topsep}{.8333\@tempdimc \@plus .3333\@tempdimc \@minus
-    .5\@tempdimc}%
-  \setlength{\parsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}%
-  \@tempswafalse
-  \begingroup
-    \def\@list@extra{\aftergroup\@tempswatrue}%
-    \csname @listi\endcsname
-  \endgroup
-  \edef\@listi{\leftmargin\leftmargini
-    \topsep \the\topsep
-    \parsep \the\parsep
-    \itemsep \parsep
-    \if@tempswa\noexpand\@list@extra\fi
-  }%
-  \let\@listI\@listi
-  \setlength{\topsep}{.75\@tempdimc \@plus .25\@tempdimc \@minus
-    .41667\@tempdimc}%
-  \setlength{\parsep}{.375\@tempdimc \@plus .16667\@tempdimc \@minus \p@}%
-  \@tempswafalse
-  \begingroup
-    \def\@list@extra{\aftergroup\@tempswatrue}%
-    \csname @listi\endcsname
-  \endgroup
-  \edef\@listi@small{\leftmargin\leftmargini
-    \topsep \the\topsep
-    \parsep \the\parsep
-    \itemsep \parsep
-    \if@tempswa\noexpand\@list@extra\fi
-  }%
-  \setlength{\topsep}{.5\@tempdimc \@plus .16667\@tempdimc \@minus
-    .16667\@tempdimc}%
-  \setlength{\parsep}{.25\@tempdimc \@plus .16667\@tempdimc \@minus \p@}%
-  \@tempswafalse
-  \begingroup
-    \def\@list@extra{\aftergroup\@tempswatrue}%
-    \csname @listi\endcsname
-  \endgroup
-  \edef\@listi@footnotesize{\leftmargin\leftmargini
-    \topsep \the\topsep
-    \parsep \the\parsep
-    \itemsep \parsep
-    \if@tempswa\noexpand\@list@extra\fi
-  }%
-  \setlength{\topsep}{.4167\@tempdimc \@plus .2083\@tempdimc \@minus \p@}%
-  \setlength{\parsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}%
-  \@tempswafalse
-  \begingroup
-    \def\@list@extra{\aftergroup\@tempswatrue}%
-    \csname @listii\endcsname
-  \endgroup
-  \edef\@listii{\leftmargin\leftmarginii
-    \labelwidth=\dimexpr \leftmargin-\labelsep
-    \topsep \the\topsep
-    \parsep \the\parsep
-    \itemsep \parsep
-    \if@tempswa\noexpand\@list@extra\fi
-  }%
-  \setlength{\topsep}{.2083\@tempdimc \@plus \p@ \@minus \p@}%
-  \setlength{\parsep}{\p@ \@plus\z@ \@minus\p@}%
-  \@tempswafalse
-  \begingroup
-    \def\@list@extra{\aftergroup\@tempswatrue}%
-    \csname @listiii\endcsname
-  \endgroup
-  \edef\@listiii{\leftmargin\leftmarginiii
-    \labelwidth=\dimexpr \leftmargin-\labelsep
-    \topsep \the\topsep
-    \parsep \z@
-    \partopsep \the\parsep
-    \itemsep \topsep
-    \if@tempswa\noexpand\@list@extra\fi
-  }%
-  \@tempswafalse
-  \begingroup
-    \def\@list@extra{\aftergroup\@tempswatrue}%
-    \csname @listiv\endcsname
-  \endgroup
-  \def\@listiv{\leftmargin\leftmarginiv
-    \labelwidth=\dimexpr \leftmargin-\labelsep
-    \if@tempswa\noexpand\@list@extra\fi
-  }%
-  \@tempswafalse
-  \begingroup
-    \def\@list@extra{\aftergroup\@tempswatrue}%
-    \csname @listv\endcsname
-  \endgroup
-  \def\@listv{\leftmargin\leftmarginv
-    \labelwidth=\dimexpr \leftmargin-\labelsep
-    \if@tempswa\noexpand\@list@extra\fi
-  }%
-  \@tempswafalse
-  \begingroup
-    \def\@list@extra{\aftergroup\@tempswatrue}%
-    \csname @listvi\endcsname
-  \endgroup
-  \def\@listvi{\leftmargin\leftmarginvi
-    \labelwidth=\dimexpr \leftmargin-\labelsep
-    \if@tempswa\noexpand\@list@extra\fi
-  }%
-  \@listi
 }
 \providecommand*{\@fontsizefilebase}{scrsize}
 \expandafter\@defaultunits\expandafter\@tempdima\@ptsize pt\relax\@nnil
@@ -993,20 +978,6 @@
     }%
   }%
 }
-\scr@ifundefined{unexpanded}{%
-  \newcommand*{\g@addto@macro@temp}{}%
-  \newcommand{\l@addto@macro}[2]{%
-    \begingroup%
-      \toks@\expandafter{#1#2}%
-      \xdef\g@addto@macro@temp{\the\toks@}%
-    \endgroup
-    \let#1\g@addto@macro@temp
-  }%
-}{%
-  \newcommand{\l@addto@macro}[2]{%
-    \edef#1{\unexpanded\expandafter{#1#2}}%
-  }%
-}
 \newcommand*{\addtokomafont}[2]{%
   \@ifundefined{scr@fnt@#1}{%
     \@ifundefined{scr@fnt@instead@#1}{%
@@ -1322,6 +1293,8 @@
 \newcommand{\titlehead}[1]{\gdef\@titlehead{#1}}
 \newcommand*{\@subject}{}
 \newcommand*{\subject}[1]{\gdef\@subject{#1}}
+\newcommand*{\subtitle}[1]{\gdef\@subtitle{#1}}
+\newcommand*{\@subtitle}{}
 \newcommand*{\@publishers}{}
 \newcommand{\publishers}[1]{\gdef\@publishers{#1}}
 \newcommand*{\@uppertitleback}{}
@@ -1342,7 +1315,7 @@
       \let\@oldmakefnmark\@makefnmark
       \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
       \ifx\@extratitle\@empty \else
-        \noindent\@extratitle\next@tpage\cleardoublepage
+        \noindent\@extratitle\next@tpage\cleardoubleemptypage
         \thispagestyle{empty}%
       \fi
       \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
@@ -1358,7 +1331,9 @@
           \vskip 3em
         \fi
         {\titlefont\huge \@title\par}%
-        \vskip 3em
+        \vskip 1em
+        {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
+        \vskip 2em
         {\Large \lineskip 0.75em
           \begin{tabular}[t]{c}
             \@author
@@ -1385,7 +1360,7 @@
         \next@tpage\null\vfill
         {\centering \Large \@dedication \par}%
         \vskip \z@ \@plus3fill
-        \if@twoside \next@tpage\cleardoublepage \fi
+        \if@twoside \next@tpage\cleardoubleemptypage \fi
       \fi
     \end{titlepage}
     \setcounter{footnote}{0}%
@@ -1395,6 +1370,7 @@
     \global\let\@author\@empty
     \global\let\@date\@empty
     \global\let\@title\@empty
+    \global\let\@subtitle\@empty
     \global\let\@extratitle\@empty
     \global\let\@titlehead\@empty
     \global\let\@subject\@empty
@@ -1448,6 +1424,7 @@
     \global\let\@author\@empty
     \global\let\@date\@empty
     \global\let\@title\@empty
+    \global\let\@subtitle\@empty
     \global\let\@extratitle\@empty
     \global\let\@titlehead\@empty
     \global\let\@subject\@empty
@@ -1488,7 +1465,9 @@
       \vskip 1.5em
     \fi
     {\titlefont\huge \@title \par}%
-    \vskip 1.5em%
+    \vskip .5em
+    {\ifx\@subtitle\@empty\else\usekomafont{subtitle}\@subtitle\par\fi}%
+    \vskip 1em
     {\Large
       \lineskip .5em%
       \begin{tabular}[t]{c}
@@ -1509,6 +1488,7 @@
 }
 \newcommand*\titlefont{\sectfont}
 \newcommand*{\subject@font}{\normalfont\normalcolor\bfseries\Large}
+\newkomafont{subtitle}{\usekomafont{title}\large}
 \newcommand*{\scr@fnt@title}{\titlefont}
 \newcommand*{\scr@fnt@subject}{\subject@font}
 \newenvironment{titlepage}{%
@@ -1827,7 +1807,7 @@
 \newcommand*{\@@makechapterhead}[1]{\chapterheadstartvskip
   {%
     \setlength{\parindent}{\z@}\setlength{\parfillskip}{\fill}%
-    \normalfont\sectfont\size@chapter{}%
+    \normalfont\sectfont\nobreak\size@chapter{}%
     \if@chapterprefix
       \let\@tempa\raggedsection
     \else
@@ -1842,7 +1822,7 @@
           \fi
           {\chapterformat}%
           \if@chapterprefix
-            \size@chapterprefix{}\endgraph\nobreak\vskip.5\baselineskip
+            \size@chapterprefix{}\endgraf\nobreak\vskip.5\baselineskip
           \fi
         \fi
       \fi
@@ -1864,7 +1844,7 @@
 }
 \newcommand*{\@@makeschapterhead}[1]{%
   \chapterheadstartvskip%
-  {\normalfont\sectfont\size@chapter{}%
+  {\normalfont\sectfont\nobreak\size@chapter{}%
     \setlength{\parindent}{\z@}\setlength{\parfillskip}{\fill}%
     \raggedsection \interlinepenalty \@M \size@chapter{#1}\par}%
   \nobreak\chapterheadendvskip%
@@ -1923,14 +1903,14 @@
   {2.3ex \@plus.2ex}%
   {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\setlength{\parfillskip}{\z@
       plus 1fil}\fi
-    \raggedsection\normalfont\sectfont\size@section}%
+    \raggedsection\normalfont\sectfont\nobreak\size@section}%
 }
 \newcommand\subsection{\@startsection{subsection}{2}{\z@}%
   {-3.25ex\@plus -1ex \@minus -.2ex}%
   {1.5ex \@plus .2ex}%
   {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\setlength{\parfillskip}{\z@
       plus 1fil}\fi
-    \raggedsection\normalfont\sectfont\size@subsection
+    \raggedsection\normalfont\sectfont\nobreak\size@subsection
   }%
 }
 \newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
@@ -1938,25 +1918,25 @@
   {1.5ex \@plus .2ex}%
   {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\setlength{\parfillskip}{\z@
       plus 1fil}\fi
-    \raggedsection\normalfont\sectfont\size@subsubsection
+    \raggedsection\normalfont\sectfont\nobreak\size@subsubsection
   }%
 }
 \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
   {3.25ex \@plus1ex \@minus.2ex}%
   {-1em}%
-  {\raggedsection\normalfont\sectfont\size@paragraph}%
+  {\raggedsection\normalfont\sectfont\nobreak\size@paragraph}%
 }
 \newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
   {3.25ex \@plus1ex \@minus .2ex}%
   {-1em}%
-  {\raggedsection\normalfont\sectfont\size@subparagraph}%
+  {\raggedsection\normalfont\sectfont\nobreak\size@subparagraph}%
 }
 \newkomafont{minisec}{}
 \newcommand\minisec[1]{\@afterindentfalse \vskip 1.5ex
   {\parindent \z@
     \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
       \setlength{\parfillskip}{\z@ plus 1fil}\fi
-    \raggedsection\normalfont\sectfont
+    \raggedsection\normalfont\sectfont\nobreak
     \usekomafont{minisec}#1\par\nobreak}\nobreak%
   \@afterheading
 }
@@ -1965,6 +1945,10 @@
 \newcommand*{\raggedpart}{}
 \let\raggedpart\centering
 \newcommand*\sectfont{\normalcolor\sffamily\bfseries}
+\newkomafont{partentry}{\usekomafont{sectioning}\large}
+\newkomafont{partentrypagenumber}{}
+\newkomafont{chapterentry}{\usekomafont{sectioning}}
+\newkomafont{chapterentrypagenumber}{}
 \newcommand*{\size@part}{}
 \newcommand*{\size@partnumber}{}
 \newcommand*{\size@chapter}{}
@@ -2110,10 +2094,12 @@
     \begingroup
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
-      \leavevmode\sectfont\large
+      \leavevmode
       \advance\leftskip\@tempdima
       \hskip -\leftskip
-      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
+      \usekomafont{partentry}{#1\nobreak
+        \usekomafont{partentrypagenumber}{\hfil\nobreak
+          \hb@xt@\@pnumwidth{\hss#2}}}\par
       \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}
       \endgroup
       \penalty20010
@@ -2136,12 +2122,16 @@
       \fi
     \fi
     \begingroup
-      \parindent \z@ \rightskip \@pnumwidth
+      \raggedchapterentry
+      \parindent \z@ \advance\rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
-      \leavevmode \sectfont
-      \advance\leftskip\@tempdima
-      \hskip -\leftskip
-      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
+      \interlinepenalty\@M
+      \leavevmode
+      \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
+      \usekomafont{chapterentry}{#1\nobreak
+        \usekomafont{chapterentrypagenumber}{%
+          \hfill\nobreak
+          \hb@xt@\@pnumwidth{\hss#2}}}\par
       \ifnum \scr@compatibility>\@nameuse{scr@v@2.96}
       \endgroup
       \penalty20009
@@ -2151,6 +2141,7 @@
     \fi
   \fi
 }
+\newcommand*{\raggedchapterentry}{}
 \newcommand*{\l@chapteratlist}{\l@chapter}
 \newcommand*\l@section{\bprot@dottedtocline{1}{1.5em}{2.3em}}
 \newcommand*\l@subsection{\bprot@dottedtocline{2}{3.8em}{3.2em}}
@@ -2264,124 +2255,83 @@
 \aliaskomafont{pagination}{pagenumber}
 \newcommand*{\scr@fnt@pagehead}{\headfont}
 \newcommand*{\scr@fnt@wrn@pagehead}[1]{%
-  font selection of elements `pagehead' and `pagefoot'\MessageBreak
-  changed, because they are same%
+  `pagehead' and `pagefoot' are aliases for the same^^b8\MessageBreak
+  font element, changed%
 }
 \aliaskomafont{pagefoot}{pagehead}
 \newcommand*{\pagemark}{{\usekomafont{pagenumber}%
     \thepage}}
-\if@twoside
-  \renewcommand*{\ps@plain}{%
-    \renewcommand*{\@evenhead}{}%
-    \renewcommand*{\@oddhead}{}%
-    \renewcommand*{\@evenfoot}{%
-      \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
-          \if@fsl \hrule \vskip 3\p@ \fi
-          \hb@xt@ \@tempdima{{\pagemark\hfil}}}}}%
-    \renewcommand*{\@oddfoot}{%
-      \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
-          \if@fsl \hrule \vskip 3\p@ \fi
-          \hb@xt@ \@tempdima{{\hfil\pagemark}}}}\hss}%
-  }%
-  \newcommand*{\ps@headings}{\let\@mkboth\markboth
-    \renewcommand*{\@evenhead}{%
-      \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
-          \hb@xt@ \@tempdima{{\headfont\strut\leftmark\hfil}}%
-          \if@hsl \vskip 1.5\p@ \hrule \fi}}}%
-    \renewcommand*{\@oddhead}{%
-      \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
-          \hb@xt@ \@tempdima{{\headfont\hfil\strut\rightmark}}%
-          \if@hsl \vskip 1.5\p@ \hrule \fi}}\hss}%
-    \renewcommand*{\@evenfoot}{%
-      \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
-          \if@fsl \hrule \vskip 3\p@ \fi
-          \hb@xt@ \@tempdima{{\pagemark\hfil}}}}}%
-    \renewcommand*{\@oddfoot}{%
-      \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
-          \if@fsl \hrule \vskip 3\p@ \fi
-          \hb@xt@ \@tempdima{{\hfil\pagemark}}}}\hss}%
-    \renewcommand*{\chaptermark}[1]{%
-      \markboth{\ifnum \c@secnumdepth >\m@ne
-          \if@mainmatter
-            \chaptermarkformat
-          \fi
+\renewcommand*{\ps@plain}{%
+  \renewcommand*{\@oddhead}{}%
+  \let\@evenhead\@oddhead
+  \renewcommand*{\@evenfoot}{%
+    \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
+        \if@fsl \hrule \vskip 3\p@ \fi
+        \hb@xt@ \@tempdima{{\pagemark\hfil}}}}}%
+  \renewcommand*{\@oddfoot}{%
+    \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
+        \if@fsl \hrule \vskip 3\p@ \fi
+        \hb@xt@ \@tempdima{{\hfil\pagemark
+            \if@twoside\else\hfil\fi}}}}\hss}%
+}%
+\newcommand*{\ps@headings}{\let\@mkboth\markboth
+  \renewcommand*{\@evenhead}{%
+    \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
+        \hb@xt@ \@tempdima{{\headfont\strut\leftmark\hfil}}%
+        \if@hsl \vskip 1.5\p@ \hrule \fi}}}%
+  \renewcommand*{\@oddhead}{%
+    \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
+        \hb@xt@ \@tempdima{{\headfont\hfil\strut\rightmark
+            \if@twoside\else\hfil\fi}}%
+        \if@hsl \vskip 1.5\p@ \hrule \fi}}\hss}%
+  \renewcommand*{\@evenfoot}{%
+    \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
+        \if@fsl \hrule \vskip 3\p@ \fi
+        \hb@xt@ \@tempdima{{\pagemark\hfil}}}}}%
+  \renewcommand*{\@oddfoot}{%
+    \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
+        \if@fsl \hrule \vskip 3\p@ \fi
+        \hb@xt@ \@tempdima{{\hfil\pagemark
+            \if@twoside\else\hfil\fi}}}}\hss}%
+  \renewcommand*{\chaptermark}[1]{%
+    \if@twoside\expandafter\markboth\else\expandafter\markright\fi
+    {\ifnum \c@secnumdepth >\m@ne
+        \if@mainmatter
+          \chaptermarkformat
         \fi
-        ##1}{}%
-    }%
-    \renewcommand*{\sectionmark}[1]{%
+      \fi
+      ##1}{}%
+  }%
+  \renewcommand*{\sectionmark}[1]{%
+    \if@twoside
       \markright{\ifnum \c@secnumdepth >\z@
-          \sectionmarkformat\fi
-        ##1}}%
+        \sectionmarkformat\fi
+        ##1}%
+    \fi
   }%
-  \newcommand*{\ps@myheadings}{\let\@mkboth\@gobbletwo
-    \renewcommand*{\@evenhead}{%
-      \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
-          \hb@xt@ \@tempdima{{\headfont\strut\leftmark\hfil}}%
-          \if@hsl \vskip 1.5\p@ \hrule \fi}}}%
-    \renewcommand*{\@oddhead}{%
-      \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
-          \hb@xt@ \@tempdima{{\headfont\hfil\strut\rightmark}}%
-          \if@hsl \vskip 1.5\p@ \hrule \fi}}\hss}%
-    \renewcommand*{\@evenfoot}{%
-      \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
-          \if@fsl \hrule \vskip 3\p@ \fi
-          \hb@xt@ \@tempdima{{\pagemark\hfil}}}}}%
-    \renewcommand*{\@oddfoot}{%
-      \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
-          \if@fsl \hrule \vskip 3\p@ \fi
-          \hb@xt@ \@tempdima{{\hfil\pagemark}}}}\hss}%
-    \renewcommand*{\chaptermark}[1]{}%
-    \renewcommand*{\sectionmark}[1]{}%
-  }
-\else
-  \renewcommand*{\ps@plain}{%
-    \renewcommand*{\@oddhead}{%
-    }%
-    \let\@evenhead\@oddhead%
-    \renewcommand*{\@oddfoot}{%
-      \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
-          \if@fsl \hrule \vskip 3\p@ \fi
-          \hb@xt@ \@tempdima{{\hfil\pagemark\hfil}}}}\hss
-    }%
-    \let\@evenfoot\@oddfoot
-  }
-  \newcommand*{\ps@headings}{\let\@mkboth\markboth
-    \renewcommand*{\@oddhead}{%
-      \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
-          \hb@xt@ \@tempdima{{\headfont\hfil\strut\rightmark\hfil}}
-          \if@hsl \vskip 1.5\p@ \hrule \fi}}\hss
-    }%
-    \let\@evenhead\@oddhead
-    \renewcommand*{\@oddfoot}{%
-      \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
-          \if@fsl \hrule \vskip 3\p@ \fi
-          \hb@xt@ \@tempdima{{\hfil\pagemark\hfil}}}\hss}}%
-    \renewcommand*{\sectionmark}[1]{}%
-    \renewcommand*{\chaptermark}[1]{%
-      \markright{\ifnum \c@secnumdepth >\m@ne
-          \if@mainmatter
-            \chaptermarkformat
-          \fi
-        \fi
-        ##1}}%
-    \let\@evenfoot\@oddfoot
-  }
-  \newcommand*{\ps@myheadings}{%
-    \let\@mkboth\@gobbletwo
-    \renewcommand*{\@evenhead}{}%
-    \renewcommand*{\@oddhead}{%
-      \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
-          \hb@xt@ \@tempdima{{\headfont\hfil\strut\rightmark\hfil}}%
-          \if@hsl \vskip 1.5\p@ \hrule \fi}}\hss}%
-    \renewcommand*{\@evenfoot}{}%
-    \renewcommand*{\@oddfoot}{%
-      \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
-          \if@fsl \hrule \vskip 3\p@ \fi
-          \hb@xt@ \@tempdima{{\hfil\pagemark\hfil}}}}\hss}%
-    \renewcommand*{\chaptermark}[1]{}%
-    \renewcommand*{\sectionmark}[1]{}%
-  }
-\fi
+}%
+\newcommand*{\ps@myheadings}{\let\@mkboth\@gobbletwo
+  \renewcommand*{\@evenhead}{%
+    \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
+        \hb@xt@ \@tempdima{{\headfont\strut\leftmark\hfil}}%
+        \if@hsl \vskip 1.5\p@ \hrule \fi}}}%
+  \renewcommand*{\@oddhead}{%
+    \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
+        \hb@xt@ \@tempdima{{\headfont\hfil\strut\rightmark
+            \if@twoside\else\hfil\fi}}%
+        \if@hsl \vskip 1.5\p@ \hrule \fi}}\hss}%
+  \renewcommand*{\@evenfoot}{%
+    \set@tempdima@hw\hss\hb@xt@ \@tempdima{\vbox{%
+        \if@fsl \hrule \vskip 3\p@ \fi
+        \hb@xt@ \@tempdima{{\pagemark\hfil}}}}}%
+  \renewcommand*{\@oddfoot}{%
+    \set@tempdima@hw\hb@xt@ \@tempdima{\vbox{%
+        \if@fsl \hrule \vskip 3\p@ \fi
+        \hb@xt@ \@tempdima{{\hfil\pagemark
+            \if@twoside\else\hfil\fi}}}}\hss}%
+  \renewcommand*{\chaptermark}[1]{}%
+  \renewcommand*{\sectionmark}[1]{}%
+}
 \newcommand*{\titlepagestyle}{plain}
 \newcommand*{\partpagestyle}{plain}
 \newcommand*{\chapterpagestyle}{plain}
@@ -2726,7 +2676,7 @@
     \sbox\@tempboxa{%
       {\capfont\strut\ignorespaces
         #1{{\caplabelfont#2\captionformat}}%
-        #3}%
+        #3\unskip\strut}%
     }%
     \let\@footnotetext=\scr@tmp@footnotetext
     \let\scr@tmp@footnotetext=\undefined
@@ -2741,23 +2691,23 @@
       \hb@xt@\hsize{%
         \setbox\@tempboxa\vbox{\hsize=\cap@width
           \ifdofullc@p
-            {\capfont\@hangfrom{\strut\ignorespaces
-                #1{{\caplabelfont#2\captionformat}}}%
-              {#3\par}}%
+            {\capfont\@hangfrom{\scr@smashdp{\strut\ignorespaces
+                  #1{{\caplabelfont#2\captionformat}}}}%
+              {#3\unskip\strut\par}}%
           \else%
             \ifdim\cap@indent<\z@
               {\capfont\strut\ignorespaces
                 #1{{\caplabelfont #2\captionformat\par}}%
-                \noindent\hspace*{-\cap@indent}#3\par}%
+                \noindent\hspace*{-\cap@indent}#3\unskip\strut\par}%
             \else%
               \if@capbreak
                 {\capfont\strut\ignorespaces
                   #1{{\caplabelfont #2\captionformat\par}}%
                   \noindent\@hangfrom{\hspace*{\cap@indent}}{#3\par}}%
               \else
-                {\capfont\@hangfrom{\strut\hspace*{\cap@indent}}%
-                  {\hspace{-\cap@indent}\ignorespaces#1%
-                    {{\caplabelfont#2\captionformat}}#3\par}}%
+                {\capfont\@hangfrom{\scr@smashdp\strut\hspace*{\cap@indent}}%
+                  {\hspace{-\cap@indent}\scr@smashdp{\ignorespaces#1%
+                    {{\caplabelfont#2\captionformat}}}#3\unskip\strut\par}}%
               \fi
             \fi
           \fi
@@ -2774,8 +2724,8 @@
     \else
       \global \@minipagefalse
       \sbox\@tempboxa{%
-        {\capfont\strut\ignorespaces
-          #1{{\caplabelfont#2\captionformat}}%
+        {\capfont\scr@smashdp{\strut\ignorespaces
+          #1{{\caplabelfont#2\captionformat}}}%
           #3}%
       }%
       \hb@xt@\hsize{\strut\cap@left\box\@tempboxa\cap@right\strut}%
-- 
cgit v1.2.3

