From 9a6785706ed1238169de63236cf1ade3038a8315 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 3 Jan 2019 21:58:12 +0000
Subject: koma-script (3jan19)

git-svn-id: svn://tug.org/texlive/trunk@49587 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/koma-script/scrreprt.cls  | 556 ++++++++++++++++-----
 1 file changed, 438 insertions(+), 118 deletions(-)

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

diff --git a/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls b/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls
index 62fda5c2771..af7c559a54d 100644
--- a/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls
+++ b/Master/texmf-dist/tex/latex/koma-script/scrreprt.cls
@@ -84,7 +84,7 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: scrkernel-version.dtx 2674 2017-09-07 09:35:17Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 3050 2018-12-30 14:36:55Z kohm $
 \begingroup
   \catcode`\@11\relax
   \ifx\KOMAScriptVersion\undefined
@@ -106,7 +106,7 @@
       \fi
     }
   \fi
-  \@CheckKOMAScriptVersion{2018/03/30 v3.25 KOMA-Script}%
+  \@CheckKOMAScriptVersion{2018/12/30 v3.26a KOMA-Script}%
 \endgroup
 \providecommand*{\scr@clsextension}{\@clsextension}
 \AtBeginDocument{%
@@ -121,23 +121,23 @@
 \newcommand*{\KOMAClassFileName}{\KOMAClassName.\@clsextension}
 \edef\KOMAClassFileName{\KOMAClassFileName}
 \ProvidesClass{\KOMAClassName}[%
-  2018/03/30 v3.25 KOMA-Script
+  2018/12/30 v3.26a KOMA-Script
   document class (\ClassName)%
 ]
-%%% From File: $Id: scrkernel-basics.dtx 2818 2017-12-08 08:31:53Z kohm $
+%%% From File: $Id: scrkernel-basics.dtx 3043 2018-11-06 07:50:06Z kohm $
 %%%            (run: load)
 \RequirePackage{scrkbase}[\KOMAScriptVersion]
-%%% From File: $Id: tocbasic.dtx 2709 2017-11-21 08:03:52Z kohm $
+%%% From File: $Id: tocbasic.dtx 3050 2018-12-30 14:36:55Z kohm $
 \RequirePackage{tocbasic}[%
-  2018/03/30 v3.25 KOMA-Script
+  2018/12/30 v3.26a KOMA-Script
 ]
 \AtAddToTocList[\@currname.\@currext]{\setuptoc{\@currext}{onecolumn}}%
 \AtAddToTocList[float]{\setuptoc{\@currext}{onecolumn}}%
 \addtotoclist{toc}
 \ifstr{\ext@toc}{toc}{}{\expandafter\addtotoclist\expandafter{\ext@toc}}
-%%% From File: $Id: scrkernel-tocstyle.dtx 2731 2017-11-23 09:04:09Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $
 %%%            (run: prepare)
-%%% From File: $Id: scrkernel-sections.dtx 2954 2018-03-10 21:15:16Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 3038 2018-10-14 18:31:51Z kohm $
 %%%            (run: prepare)
 \newif\if@openright
 \@openrightfalse
@@ -213,7 +213,7 @@
 \newcommand*{\size@paragraph}{}
 \newcommand*{\size@subparagraph}{}
 \newcommand*{\sectfont}{\normalcolor\@gr@gsffamily\bfseries}
-%%% From File: $Id: scrkernel-compatibility.dtx 2950 2018-03-05 07:54:19Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 3050 2018-12-30 14:36:55Z kohm $
 %%%            (run: init)
 \newcommand*
   {\scr@compatibility}{\scr@v@last}
@@ -283,10 +283,12 @@
 \@namedef{scr@v@3.23}{16}
 \@namedef{scr@v@3.24}{16}
 \@namedef{scr@v@3.25}{17}
+\@namedef{scr@v@3.26}{17}
+\@namedef{scr@v@3.26a}{17}
 \@namedef{scr@v@last}{17}
-%%% From File: $Id: scrkernel-typearea.dtx 2959 2018-03-15 13:32:29Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 2993 2018-07-16 07:33:22Z kohm $
 %%%            (run: init)
-%%% From File: $Id: scrkernel-compatibility.dtx 2950 2018-03-05 07:54:19Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 3050 2018-12-30 14:36:55Z kohm $
 %%%            (run: option)
 \newif\if@scr@emulatestandardclasses
 \let\scr@emulatestandardclassestrue\relax
@@ -361,7 +363,7 @@
 \newcommand*{\scr@v@is@ge}[1]{%
   \numexpr\scr@compatibility+\@ne\relax>\@nameuse{scr@v@#1}
 }
-%%% From File: $Id: scrkernel-miscellaneous.dtx 2712 2017-11-21 09:27:02Z kohm $
+%%% From File: $Id: scrkernel-miscellaneous.dtx 2995 2018-07-18 06:46:34Z kohm $
 %%%            (run: option)
 \KOMA@key{draft}[true]{%
   \KOMA@set@ifkey{draft}{@tempswa}{#1}%
@@ -417,9 +419,9 @@
 \newcommand*{\@gr@gsffamily}{%
   \if@egregdoesnotlikesansseriftitles\else\sffamily\fi
 }
-%%% From File: $Id: scrkernel-language.dtx 2649 2017-05-29 09:39:43Z kohm $
+%%% From File: $Id: scrkernel-language.dtx 3011 2018-08-29 07:35:17Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-fonts.dtx 2929 2018-02-05 06:37:22Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 3047 2018-12-22 15:51:54Z kohm $
 %%%            (run: option)
 \newcommand*\@ptsize{%
   11%
@@ -505,7 +507,7 @@
 \BeforePackage{tex4ht}{%
   \let\scr@defineobsoletefonts\thr@@
 }
-%%% From File: $Id: scrkernel-typearea.dtx 2959 2018-03-15 13:32:29Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 2993 2018-07-16 07:33:22Z kohm $
 %%%            (run: options)
 \KOMA@key{twoside}[true]{%
   \if@atdocument\else\PassOptionsToPackage{twoside=#1}{typearea}\fi%
@@ -816,9 +818,9 @@
 \KOMA@ifkey{abstract}{@abstrt}
 \KOMA@DeclareStandardOption{abstracton}{abstract=true}
 \KOMA@DeclareStandardOption{abstractoff}{abstract=false}
-%%% From File: $Id: scrkernel-tocstyle.dtx 2731 2017-11-23 09:04:09Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 2954 2018-03-10 21:15:16Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 3038 2018-10-14 18:31:51Z kohm $
 %%%            (run: option)
 \KOMA@key{open}{%
   \KOMA@set@ncmdkey{open}{@tempa}{%
@@ -875,6 +877,31 @@
 }
 \KOMA@DeclareDeprecatedOption{pointednumbers}{numbers=enddot}
 \KOMA@DeclareDeprecatedOption{pointlessnumbers}{numbers=noenddot}
+\KOMA@ifkey{bookmarkpackage}{@scr@autoloadbookmarkpackage}
+\@scr@autoloadbookmarkpackagetrue
+\KOMA@kav@add{.\KOMAClassFileName}{bookmarkpackage}{true}
+\AfterAtEndOfPackage{hyperref}{%
+  \AtBeginDocument{%
+    \@ifpackageloaded{bookmark}{}{%
+      \if@scr@autoloadbookmarkpackage
+        \ClassInfo{\KOMAClassName}{%
+          loading recommended package `bookmark'.\MessageBreak
+          Using `bookmark' together with `hyperref' is
+          recommended,\MessageBreak
+          because of handling of possible bookmark level gaps.\MessageBreak
+          You can avoid loading `bookmark' with KOMA-Script
+          option\MessageBreak
+          `bookmarkpackage=false' before \string\begin{document}
+          and\MessageBreak
+          you can avoid this message with
+          `\string\usepackage{bookmark}'\MessageBreak
+          before \string\begin{document}%
+        }%
+        \RequirePackage{bookmark}%
+      \fi
+    }%
+  }%
+}
 \KOMA@key{chapterprefix}[true]{%
   \KOMA@set@ifkey{chapterprefix}{@chapterprefix}{#1}%
   \ifx\FamilyKeyState\FamilyKeyStateProcessed
@@ -1320,7 +1347,7 @@
 \DeclareOption{origlongtable}{\@komalongtablefalse}
 \KOMA@DeclareDeprecatedOption{onelinecaption}{captions=oneline}
 \KOMA@DeclareDeprecatedOption{noonelinecaption}{captions=nooneline}
-%%% From File: $Id: scrkernel-footnotes.dtx 2640 2017-05-08 09:36:55Z kohm $
+%%% From File: $Id: scrkernel-footnotes.dtx 2979 2018-04-17 06:01:18Z kohm $
 %%%            (run: option)
 \KOMA@key{footnotes}{%
   \ifx\@footnotemark\scr@saved@footnotemark
@@ -1667,7 +1694,7 @@
 \BeforeTOCHead{\@chaptertolistsfalse}
 \KOMA@kav@add{.\KOMAClassFileName}{chapteratlists}{10\p@}%
 \KOMA@kav@add{.\KOMAClassFileName}{listof}{chaptergapsmall}%
-%%% From File: $Id: scrkernel-bibliography.dtx 2769 2017-12-03 10:56:06Z kohm $
+%%% From File: $Id: scrkernel-bibliography.dtx 3016 2018-09-03 11:40:59Z kohm $
 %%%            (run: option)
 \newcommand{\newbibstyle}[3][]{%
   \scr@ifundefinedorrelax{scr@bibstyle@#2}{%
@@ -1736,7 +1763,7 @@
 \newcommand*{\bibliography@heading}[1]{%
   \ifbib@leveldown
     \section*{#1}%
-    \@mkright{\MakeMarkcase{#1}}%
+    \addsecmark{#1}%
   \else
     \chapter*{#1}%
     \@mkdouble{\MakeMarkcase{#1}}%
@@ -1836,7 +1863,7 @@
 \KOMA@DeclareStandardOption{openbib}{bibliography=openstyle}
 \KOMA@DeclareDeprecatedOption{bibtotoc}{bibliography=totoc}
 \KOMA@DeclareDeprecatedOption{bibtotocnumbered}{bibliography=totocnumbered}
-%%% From File: $Id: scrkernel-index.dtx 2782 2017-12-04 07:47:52Z kohm $
+%%% From File: $Id: scrkernel-index.dtx 3016 2018-09-03 11:40:59Z kohm $
 %%%            (run: option)
 \newcommand*{\idx@@heading}{%
   \ifidx@leveldown
@@ -1923,20 +1950,20 @@
 \KOMA@DeclareDeprecatedOption{idxtotoc}{index=totoc}
 %%% From File: $Id: scrkernel-listsandtabulars.dtx 2640 2017-05-08 09:36:55Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 2954 2018-03-10 21:15:16Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 3038 2018-10-14 18:31:51Z kohm $
 %%%            (run: execoption)
 \KOMAExecuteOptions{headings=openany}
 \KOMAExecuteOptions{numbers=autoendperiod}
-%%% From File: $Id: scrkernel-miscellaneous.dtx 2712 2017-11-21 09:27:02Z kohm $
+%%% From File: $Id: scrkernel-miscellaneous.dtx 2995 2018-07-18 06:46:34Z kohm $
 %%%            (run: execoption)
 \KOMAExecuteOptions{%
   parskip=false,%
   headings=big%
 }
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-compatibility.dtx 2950 2018-03-05 07:54:19Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 3050 2018-12-30 14:36:55Z kohm $
 %%%            (run: body)
-%%% From File: $Id: scrkernel-fonts.dtx 2929 2018-02-05 06:37:22Z kohm $
+%%% From File: $Id: scrkernel-fonts.dtx 3047 2018-12-22 15:51:54Z kohm $
 %%%            (run: body)
 \newcommand*\scr@setlength[4]{%
   \expandafter\ifnum\scr@v@is@lt{3.12}\relax
@@ -2411,13 +2438,13 @@
   \@nomath\sfb}
 \DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
 \DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
-%%% From File: $Id: scrkernel-language.dtx 2649 2017-05-29 09:39:43Z kohm $
+%%% From File: $Id: scrkernel-language.dtx 3011 2018-08-29 07:35:17Z kohm $
 %%%            (run: body)
       \def\today{\ifcase\month\or
         January\or February\or March\or April\or May\or June\or
         July\or August\or September\or October\or November\or December\fi
         \space\number\day, \number\year}%
-%%% From File: $Id: scrkernel-typearea.dtx 2959 2018-03-15 13:32:29Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 2993 2018-07-16 07:33:22Z kohm $
 %%%            (run: body)
 \let\@BCOR                =\relax
 \let\@@BCOR               =\relax
@@ -2981,10 +3008,10 @@
   \fi
 }
 \newcommand*\abstractname{Abstract}
-%%% From File: $Id: scrkernel-tocstyle.dtx 2731 2017-11-23 09:04:09Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $
 %%%            (run: body)
 \let\numberline\scr@numberline
-%%% From File: $Id: scrkernel-tocstyle.dtx 2731 2017-11-23 09:04:09Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $
 %%%            (run: class,style,part)
 \CloneTOCEntryStyle{tocline}{part}
 \TOCEntryStyleStartInitCode{part}{%
@@ -2998,7 +3025,7 @@
   \expandafter\providecommand\expandafter*%
   \csname scr@tso@#1@beforeskip\endcsname{2.25em \@plus\p@}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 2731 2017-11-23 09:04:09Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $
 %%%            (run: class,style,chapter)
 \CloneTOCEntryStyle{tocline}{chapter}
 \TOCEntryStyleStartInitCode{chapter}{%
@@ -3018,17 +3045,17 @@
   \expandafter\providecommand\expandafter*%
   \csname scr@tso@#1@beforeskip\endcsname{1.0em \@plus\p@}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 2731 2017-11-23 09:04:09Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $
 %%%            (run: class,style,section)
 \CloneTOCEntryStyle{tocline}{section}
 \TOCEntryStyleStartInitCode{section}{%
   \expandafter\providecommand%
   \csname scr@tso@#1@linefill\endcsname{\TOCLineLeaderFill\relax}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 2731 2017-11-23 09:04:09Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $
 %%%            (run: class,style,default)
 \CloneTOCEntryStyle{section}{default}
-%%% From File: $Id: scrkernel-sections.dtx 2954 2018-03-10 21:15:16Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 3038 2018-10-14 18:31:51Z kohm $
 %%%            (run: body)
 \setcounter{secnumdepth}{2}
 \newcommand*{\ifnumbered}[1]{%
@@ -3120,10 +3147,47 @@
     \if@noskipsec \leavevmode \fi
     \par
     \@tempskipa \glueexpr #4\relax
-    \@afterindenttrue
-    \ifdim \@tempskipa <\z@
-      \@tempskipa -\@tempskipa \@afterindentfalse
-    \fi
+    \@ifundefined{scr@#1@afterindent}{%
+      \def\startsection@afterindent##1##2##3{##3}%
+    }{%
+      \expandafter\let\expandafter\startsection@afterindent
+      \csname scr@#1@afterindent\endcsname
+    }%
+    \startsection@afterindent{\@afterindenttrue}{\@afterindentfalse}{%
+      \@afterindenttrue
+      \ifdim \@tempskipa <\z@
+        \@tempskipa -\@tempskipa \@afterindentfalse
+      \fi
+    }%
+    \def\startsection@sectionname{#1}%
+    \def\startsection@secnumdepth{\numexpr #2\relax}%
+    \def\startsection@indent{\glueexpr #3\relax}%
+    \let\startsection@beforeskip\@tempskipa
+    \@ifundefined{scr@#1@runin}{%
+      \def\scr@sect@runin##1##2##3{##3}%
+    }{%
+      \expandafter\let\expandafter\scr@sect@runin
+      \csname scr@#1@runin\endcsname
+    }%
+    \scr@sect@runin{%
+      \def\startsection@afterskip{\glueexpr #3\relax}%
+      \expandafter\let\csname if@startsection@runin\expandafter\endcsname
+      \csname iftrue\endcsname
+    }{%
+      \def\startsection@afterskip{\glueexpr #3\relax}%
+      \expandafter\let\csname if@startsection@runin\expandafter\endcsname
+      \csname iffalse\endcsname
+    }{%
+      \ifdim \glueexpr #5\relax <\z@
+        \def\startsection@afterskip{\glueexpr (#3)*\m@ne\relax}%
+        \expandafter\let\csname if@startsection@runin\expandafter\endcsname
+        \csname iftrue\endcsname
+      \else
+        \def\startsection@afterskip{\glueexpr #3\relax}%
+        \expandafter\let\csname if@startsection@runin\expandafter\endcsname
+        \csname iffalse\endcsname
+      \fi
+    }%
     \csname scr@startsection@hook\endcsname
     \if@nobreak
       \everypar{}%
@@ -3153,11 +3217,14 @@
     to achieve this. Because of the unexpected definition\MessageBreak
     an alternative approach will be used.\MessageBreak
     If this fails and if there isn't a new release of\MessageBreak
-    KOMA-Scriptt that fixes the problem, please\MessageBreak
+    KOMA-Script that fixes the problem, please\MessageBreak
     send a report to the KOMA-Script author.\MessageBreak
     Note, that this alternative approach does not\MessageBreak
-    execute `\string\scr@startsection@hook', \MessageBreak
-    `\string\scr@preto@ssect@hook', or `\string\scr@preto@sect@hook'%
+    execute `\string\scr@startsection@hook',\MessageBreak
+    `\string\scr@preto@ssect@hook', or
+    `\string\scr@preto@sect@hook'\MessageBreak
+    and does always use `runin=bysign' and\MessageBreak
+    `afterindent=bysign'%
   }%
   \let\scr@saved@startsection\@startsection
   \newcommand*{\scr@startsection}[6]{%
@@ -3171,6 +3238,32 @@
     }%
   }
 \fi
+\newcommand*{\scr@sect@runin}[3]{#3}
+\newcommand*{\scr@startsection@ulm@error}[1]{%
+  \ClassError{\KOMAClassName}{%
+    \string#1 undefined outside of \string\scr@startsection
+  }{%
+    A KOMA-Script macro for package authors have been used outside
+    the\MessageBreak
+    specified definition scope.\MessageBreak
+    See `scrkernel-sections.dtx' for more information.%
+  }%
+}
+\newcommand*\startsection@sectionname{%
+  \scr@startsection@ulm@error\startsection@sectionname}
+\newcommand*\startsection@secnumdepth{%
+  \scr@startsection@ulm@error\startsection@secnumdepth}
+\newcommand*\startsection@indent{%
+  \scr@startsection@ulm@error\startsection@indent}
+\newcommand*\startsection@beforeskip{%
+  \scr@startsection@ulm@error\startsection@beforeskip}
+\newcommand*\startsection@afterskip{%
+  \scr@startsection@ulm@error\startsection@afterskip}
+\newcommand*{\if@startsection@runin}{%
+  \scr@startsection@ulm@error\if@startsection@runin}
+\newif\if@startsection@runin
+\newcommand*\startsection@afterindent{%
+  \scr@startsection@ulm@error\startsection@afterindent}
 \newcommand*{\At@startsection}[1]{%
   \@ifundefined{scr@startsection@hook}{\let\scr@startsection@hook\@empty}{}%
   \l@addto@macro{\scr@startsection@hook}{#1}%
@@ -3282,8 +3375,8 @@
     \expandafter\@maybeautodot\csname the#1\endcsname
     \protected@edef\@svsec{\@seccntformat{#1}\relax}%
   \fi
-  \@tempskipa \glueexpr #5\relax\relax
-  \ifdim \@tempskipa>\z@
+  \ifdim
+    \scr@sect@runin{\z@}{\p@}{\glueexpr #5\relax}>\z@
     \begingroup
       #6{\nobreak\interlinepenalty \@M
         \sectionlinesformat{#1}{\glueexpr #3\relax}\@svsec{#8}\@@par}%
@@ -3395,8 +3488,8 @@
       This could result in several error messages}%
     \def\scr@s@ct@@nn@m@{\string\scr@s@ct@@nn@m@}%
   }{}%
-  \@tempskipa #3\relax
-  \ifdim \@tempskipa>\z@
+  \ifdim
+    \scr@sect@runin{\z@}{\p@}{\glueexpr #3\relax}>\z@
     \begingroup
       #4{\nobreak\interlinepenalty \@M
         \expandafter\sectionlinesformat\expandafter{\scr@s@ct@@nn@m@}%
@@ -3414,6 +3507,72 @@
   \let\scr@s@ct@@nn@m@\relax
   \@xsect{\glueexpr #3\relax}%
 }
+\def\@tempa#1{%
+  \@tempskipa #1\relax
+  \ifdim \@tempskipa>\z@
+    \par \nobreak
+    \vskip \@tempskipa
+    \@afterheading
+  \else
+    \@nobreakfalse
+    \global\@noskipsectrue
+    \everypar{%
+      \if@noskipsec
+        \global\@noskipsecfalse
+       {\setbox\z@\lastbox}%
+        \clubpenalty\@M
+        \begingroup \@svsechd \endgroup
+        \unskip
+        \@tempskipa #1\relax
+        \hskip -\@tempskipa
+      \else
+        \clubpenalty \@clubpenalty
+        \everypar{}%
+      \fi}%
+  \fi
+  \ignorespaces
+}
+\ifx\@xsect\@tempa\else
+  \ClassWarning{\KOMAClassName}{%
+    Unexpected definition of \string\@xsect!\MessageBreak
+    Please send information about this to\MessageBreak
+    the KOMA-Script maintainer!\MessageBreak
+    Maybe LaTeX will be broken by the redefinition\MessageBreak
+    of \string\@xsect\space}%
+\fi
+\def\@xsect#1{%
+  \@ifundefined{scr@sect@runin}{%
+    \def\scr@sect@runin##1##2##3{##3}%
+  }%
+  \@tempskipa #1\relax
+  \ifdim \scr@sect@runin{\z@}{\p@}{\@tempskipa}>\z@
+    \par \nobreak
+    \vskip \@tempskipa
+    \@afterheading
+  \else
+    \@nobreakfalse
+    \global\@noskipsectrue
+    \everypar{%
+      \if@noskipsec
+        \global\@noskipsecfalse
+       {\setbox\z@\lastbox}%
+        \clubpenalty\@M
+        \begingroup \@svsechd \endgroup
+        \unskip
+        \@tempskipa #1\relax
+        \ifdim \@tempskipa<\z@
+          \hskip -\@tempskipa
+        \else
+          \hskip \@tempskipa
+        \fi
+      \else
+        \clubpenalty \@clubpenalty
+        \everypar{}%
+      \fi}%
+  \fi
+  \def\scr@sect@runin##1##2##3{##3}%
+  \ignorespaces
+}
 \newcommand*{\scr@IfUsePrefixLineWarning}[2]{%
   \ClassWarning{\KOMAClassName}{%
     usage of \string\IfUsePrefixLine\space outside
@@ -3486,7 +3645,7 @@
       \noexpand\FamilySetCounterMacro{KOMAarg}{#2}{\noexpand\reserved@a}{##1}
     }\reserved@a
     \ifx\FamilyKeyState\FamilyKeyStateProcessed
-      \expandafter\let\csname #3\scr@dsc@current#4 \endcsname\reserved@a
+      \expandafter\let\csname #3\scr@dsc@current#4\endcsname\reserved@a
     \fi
   }%
 }
@@ -3500,11 +3659,37 @@
     \FamilyKeyStateProcessed
   }%
 }
+\newcommand*{\DeclareSectionCommandStyleFuzzyOption}[5]{%
+  \DeclareSectionCommandStyleOption{#1}{#2}{%
+    \FamilySetBool{KOMAarg}{#2}{@tempswa}{##1}%
+    \ifx\FamilyKeyState\FamilyKeyStateProcessed
+      \if@tempswa
+        \expandafter\def\csname #3\scr@dsc@current#4\endcsname
+        ####1####2####3{####1}%
+      \else
+        \expandafter\def\csname #3\scr@dsc@current#4\endcsname
+        ####1####2####3{####2}%
+      \fi
+    \else
+      \ifstr{##1}{#5}{%
+        \expandafter\def\csname #3\scr@dsc@current#4\endcsname
+        ####1####2####3{####3}%
+        \FamilyKeyStateProcessed
+      }{}%
+    \fi
+  }%
+}
 \newcommand*{\scr@dsc@style@section@options}{}
 \DeclareSectionCommandStyleLengthOption{section}
                                        {indent}{scr@}{@sectionindent}
+\DeclareSectionCommandStyleFuzzyOption{section}
+                                      {afterindent}{scr@}{@afterindent}
+                                      {bysign}
 \DeclareSectionCommandStyleLengthOption{section}
                                        {beforeskip}{scr@}{@beforeskip}
+\DeclareSectionCommandStyleFuzzyOption{section}
+                                      {runin}{scr@}{@runin}
+                                      {bysign}
 \DeclareSectionCommandStyleLengthOption{section}
                                        {afterskip}{scr@}{@afterskip}
 \DeclareSectionCommandStyleFontOption{section}{font}{}{}
@@ -3531,6 +3716,9 @@
   \@namedef{\scr@dsc@current pagestyle}{#1}%
   \FamilyKeyStateProcessed
 }%
+\DeclareSectionCommandStyleFuzzyOption{chapter}
+                                      {afterindent}{scr@}{@afterindent}
+                                      {bysign}
 \DeclareSectionCommandStyleLengthOption{chapter}
                                        {beforeskip}{scr@}{@beforeskip}
 \DeclareSectionCommandStyleLengthOption{chapter}
@@ -3554,6 +3742,9 @@
   \@namedef{\scr@dsc@current pagestyle}{#1}%
   \FamilyKeyStateProcessed
 }%
+\DeclareSectionCommandStyleFuzzyOption{part}
+                                      {afterindent}{scr@}{@afterindent}
+                                      {bysign}
 \DeclareSectionCommandStyleLengthOption{part}
                                        {beforeskip}{scr@}{@beforeskip}
 \DeclareSectionCommandStyleLengthOption{part}
@@ -3588,6 +3779,24 @@
                                      {font}{font}{\normalsize}%
     {\newkomafont{\scr@dsc@current}{\normalsize}}%
   }%
+  \scr@ifundefinedorrelax{scr@\scr@dsc@current @runin}{%
+    \l@addto@macro\local@endgroup{%
+      \ClassInfo{\KOMAClassName}
+                {using compatibility default `runin=bysign'\MessageBreak
+                  for `\expandafter\string\csname \scr@dsc@current\endcsname}%
+      \expandafter\gdef\csname scr@\scr@dsc@current @runin\endcsname
+      ##1##2##3{##3}%
+    }%
+  }{}%
+  \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterindent}{%
+    \l@addto@macro\local@endgroup{%
+      \ClassInfo{\KOMAClassName}
+                {using compatibility default `afterindent=bysign'\MessageBreak
+                  for `\expandafter\string\csname \scr@dsc@current\endcsname}%
+      \expandafter\gdef\csname scr@\scr@dsc@current @afterindent\endcsname
+      ##1##2##3{##3}%
+    }%
+  }{}%
 }
 \newcommand*{\scr@dsc@style@chapter@neededoptionstest}{%
   \scr@ifundefinedorrelax{\scr@dsc@current pagestyle}{%
@@ -3655,6 +3864,15 @@
       {\newkomafont{\scr@dsc@current prefix}{\usekomafont{chapterprefix}}}%
     }%
   }{}%
+  \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterindent}{%
+    \l@addto@macro\local@endgroup{%
+      \ClassInfo{\KOMAClassName}
+                {using compatibility default `afterindent=bysign'\MessageBreak
+                  for `\expandafter\string\csname \scr@dsc@current\endcsname}%
+      \expandafter\gdef\csname scr@\scr@dsc@current @afterindent\endcsname
+      ##1##2##3{##3}%
+    }%
+  }{}%
 }
 \newcommand*{\scr@dsc@style@part@neededoptionstest}{%
   \scr@ifundefinedorrelax{\scr@dsc@current pagestyle}{%
@@ -3721,6 +3939,17 @@
       {\newkomafont{\scr@dsc@current prefix}{\usekomafont{partprefix}}}%
     }%
   }{}%
+  \scr@ifundefinedorrelax{scr@\scr@dsc@current @afterindent}{%
+    \l@addto@macro\local@endgroup{%
+      \ClassInfo{\KOMAClassName}{%
+        using compatibility default
+        `afterindent=true'\MessageBreak
+        for `\expandafter\string\csname \scr@dsc@current\endcsname}%
+      \expandafter\gdef\csname scr@\scr@dsc@current @afterindent\endcsname
+      ##1##2##3%
+      {##1}%
+    }%
+  }{}%
 }
 \newif\ifscr@dsc@parametersonly
 \newcommand*{\DeclareSectionCommand}[2][]{%
@@ -3958,9 +4187,74 @@
       \scr@ifundefinedorrelax{l@#2}{%
         \DeclareTOCStyleEntry[\scr@dsc@tocstyle@options]{default}{#2}%
       }{}%
-      \scr@ifundefinedorrelax{toclevel@part}{}{%
+      \if@atdocument
+        \let\reserved@a\@firstofone
+      \else
+        \@ifpackageloaded{hyperref}{%
+          \let\reserved@a\@firstofone
+        }{%
+          \def\reserved@a##1{%
+            \AfterAtEndOfPackage{hyperref}{\AtBeginDocument{##1}}%
+          }%
+        }%
+      \fi
+      \reserved@a{%
         \expandafter\let\csname toclevel@#2\expandafter\endcsname
         \csname #2tocdepth\endcsname
+        \scr@ifundefinedorrelax{bookmarksetup}{%
+          \scr@ifundefinedorrelax{scr@min@toclevel}{%
+            \expandafter\let\expandafter\scr@min@toclevel
+            \csname toclevel@#2\endcsname
+          }{%
+            \expandafter\ifnum \csname toclevel@#2\endcsname
+            < \numexpr \scr@min@toclevel-1\relax
+              \ClassWarning{\KOMAClassName}{%
+                Trying emergency fix for bookmark level gap,\MessageBreak
+                because toclevel of `#2'
+                (\csname toclevel@#2\endcsname)\MessageBreak
+                is more than 1 lower than currently lowest\MessageBreak
+                known level (\scr@min@toclevel).\MessageBreak
+                Note: This fix can fail and you should load\MessageBreak
+                package `bookmark' to avoid usage of this\MessageBreak
+                fix%
+              }%
+              \expandafter\edef\csname toclevel@#2\endcsname{%
+                \the\numexpr \scr@min@toclevel-1\relax
+              }%
+            \fi
+            \expandafter\ifnum \csname toclevel@#2\endcsname
+            < \scr@min@toclevel\relax
+              \expandafter\let\expandafter\scr@min@toclevel
+              \csname toclevel@#2\endcsname
+            \fi
+          }%
+          \scr@ifundefinedorrelax{scr@max@toclevel}{%
+            \expandafter\let\expandafter\scr@max@toclevel
+            \csname toclevel@#2\endcsname
+          }{%
+            \expandafter\ifnum \csname toclevel@#2\endcsname
+            > \numexpr \scr@max@toclevel+1\relax
+              \ClassWarning{\KOMAClassName}{%
+                Trying emergency fix for bookmark level gap,\MessageBreak
+                because toclevel of `#2'
+                (\csname toclevel@#2\endcsname)\MessageBreak
+                is more than 1 greater than currently highest\MessageBreak
+                known level (\scr@max@toclevel).\MessageBreak
+                Note: This fix can fail and you should load\MessageBreak
+                package `bookmark' to avoid usage of this\MessageBreak
+                fix%
+              }%
+              \expandafter\edef\csname toclevel@#2\endcsname{%
+                \the\numexpr \scr@max@toclevel+1\relax
+              }%
+            \fi
+            \expandafter\ifnum \csname toclevel@#2\endcsname
+            > \scr@max@toclevel\relax
+              \expandafter\let\expandafter\scr@max@toclevel
+              \csname toclevel@#2\endcsname
+            \fi
+          }%
+        }{}%
       }%
     }%
   }%
@@ -4060,6 +4354,7 @@
   \def\scr@local@leveloffset{\z@}%
   \def\scr@local@tocleveloffset{\z@}%
   \@for\reserved@a:=\reserved@a\do{%
+    \scr@trim@spaces\reserved@a
     \edef\reserved@a{%
       \unexpanded{\DeclareSectionCommand[{#1}]}{\reserved@a}%
     }%
@@ -4075,6 +4370,7 @@
   \def\scr@local@leveloffset{\z@}%
   \def\scr@local@tocleveloffset{\z@}%
   \@for\reserved@a:=\reserved@a\do{%
+    \scr@trim@spaces\reserved@a
     \@ifundefined{\reserved@a}{}{%
       \ClassError{\KOMAClassName}{%
         command `\expandafter\string\csname\reserved@a\endcsname` already
@@ -4105,6 +4401,7 @@
   \def\scr@local@leveloffset{\z@}%
   \def\scr@local@tocleveloffset{\z@}%
   \@for\reserved@a:=\reserved@a\do{%
+    \scr@trim@spaces\reserved@a
     \@ifundefined{\reserved@a}{%
       \ClassError{\KOMAClassName}{%
         command `\expandafter\string\csname\reserved@a\endcsname` not defined%
@@ -4133,6 +4430,7 @@
   \def\scr@local@leveloffset{\z@}%
   \def\scr@local@tocleveloffset{\z@}%
   \@for\reserved@a:=\reserved@a\do{%
+    \scr@trim@spaces\reserved@a
     \@ifundefined{\reserved@a}{%
       \edef\reserved@a{%
         \unexpanded{\DeclareSectionCommand[{#1}]}{\reserved@a}%
@@ -4325,8 +4623,17 @@
   \else
     \@tempswafalse
   \fi
-  \@tempskipa=\glueexpr\@nameuse{scr@#1@beforeskip}\relax\relax
-  \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi
+  \@tempskipa=\glueexpr\@nameuse{scr@#1@beforeskip}\relax
+  \@ifundefined{scr@#1@afterindent}{\@afterindentfalse}{%
+    \csname scr@#1@afterindent\endcsname
+    {\@afterindenttrue}{\@afterindentfalse}{%
+      \@afterindenttrue
+      \ifdim\@tempskipa<\z@
+        \@tempskipa=-\@tempskipa
+        \@afterindentfalse
+      \fi
+    }%
+  }%
   \partheadstartvskip
   \vbox to\z@{\vss\use@preamble{#1@o}\strut\par}%
   \vskip-\baselineskip\nobreak
@@ -4407,6 +4714,7 @@
     }%
   \endgroup
   \@nameuse{@end#1}%
+  \@afterheading
 }
 \newcommand{\scr@@startspart}[2]{%
   \begingroup
@@ -4509,7 +4817,17 @@
     }%
   }%
   \global\@topnum\z@
-  \@afterindentfalse
+  \@ifundefined{scr@#1@afterindent}{\@afterindentfalse}{%
+    \csname scr@#1@afterindent\endcsname
+    {\@afterindenttrue}{\@afterindentfalse}{%
+      \@afterindenttrue
+      \@ifundefined{scr@#1@beforeskip}{\@afterindentfalse}{%
+        \ifdim\glueexpr\@nameuse{scr@#1@beforeskip}\relax<\z@
+          \@afterindentfalse
+        \fi
+      }%
+    }%
+  }%
   \expandafter\SecDef\csname @#1\expandafter\endcsname\csname @s#1\endcsname
 }
 \newcommand*{\scr@@startchapter}{}
@@ -4621,9 +4939,12 @@
 }
 \newcommand*{\scr@@makechapterhead}[2]{%
   \@tempskipa=\glueexpr \csname scr@#1@beforeskip\endcsname\relax\relax
-  \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\else
-    \expandafter\ifnum\scr@v@is@ge{3.22}\@afterindenttrue\fi
-  \fi
+  \csname scr@#1@afterindent\endcsname
+  {\@afterindenttrue}{\@afterindentfalse}{%
+    \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\else
+      \expandafter\ifnum\scr@v@is@ge{3.22}\@afterindenttrue\fi
+    \fi
+  }%
   \chapterheadstartvskip
   {%
     \setlength{\parindent}{\z@}\setlength{\parfillskip}{\z@ plus 1fil}%
@@ -4668,14 +4989,16 @@
   }%
   \nobreak\par\nobreak
   \@tempskipa=\glueexpr \csname scr@#1@afterskip\endcsname\relax\relax
-  \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi
   \chapterheadendvskip
 }
 \newcommand*{\scr@@makeschapterhead}[2]{%
   \@tempskipa=\glueexpr \csname scr@#1@beforeskip\endcsname\relax\relax
-  \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\else
-    \expandafter\ifnum\scr@v@is@ge{3.22}\@afterindenttrue\fi
-  \fi
+  \csname scr@#1@afterindent\endcsname
+  {\@afterindenttrue}{\@afterindentfalse}{%
+    \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\else
+      \expandafter\ifnum\scr@v@is@ge{3.22}\@afterindenttrue\fi
+    \fi
+  }%
   \chapterheadstartvskip
   {%
     \setlength{\parindent}{\z@}\setlength{\parfillskip}{\z@ plus 1fil}%
@@ -4702,7 +5025,6 @@
   }%
   \nobreak\par\nobreak
   \@tempskipa=\glueexpr \csname scr@#1@afterskip\endcsname\relax\relax
-  \ifdim\@tempskipa<\z@\@tempskipa-\@tempskipa\fi
   \chapterheadendvskip
 }
 \newcommand{\chapterlinesformat}[3]{%
@@ -4870,7 +5192,8 @@
     \expandafter\ifnum\scr@v@is@gt{2.96}\relax
       \setlength{\parfillskip}{\z@ plus 1fil}\fi
     \raggedsection\normalfont\sectfont\nobreak
-    \usekomafont{minisec}{\nobreak #1\par\nobreak}}\nobreak%
+    \usekomafont{minisec}{\nobreak\interlinepenalty \@M #1\par\nobreak}%
+  }\nobreak
   \@afterheading
 }
 \newcommand*{\addsectiontocentry}[2]{%
@@ -4926,15 +5249,6 @@
 \newcommand*{\scr@fnt@subsubsection}{\size@subsubsection}
 \newcommand*{\scr@fnt@paragraph}{\size@paragraph}
 \newcommand*{\scr@fnt@subparagraph}{\size@subparagraph}
-\DeclareSectionCommand[%
-  style=part,%
-  level=\m@ne,%
-  pagestyle=plain,%
-  tocstyle=part,%
-  toclevel=\m@ne,%
-  tocindent=\z@,%
-  tocnumwidth=2em%
-]{part}
 \DeclareSectionCommand[%
   style=chapter,%
   level=\z@,%
@@ -4953,6 +5267,15 @@
   tocindent=1.5em,%
   tocnumwidth=2.3em%
 ]{section}
+\DeclareSectionCommand[%
+  style=part,%
+  level=\m@ne,%
+  pagestyle=plain,%
+  tocstyle=part,%
+  toclevel=\m@ne,%
+  tocindent=\z@,%
+  tocnumwidth=2em%
+]{part}
 \DeclareSectionCommand[%
   style=section,%
   level=2,%
@@ -5000,7 +5323,7 @@
 \fi
 \newcommand*{\scr@fnt@disposition}{\sectfont}
 \aliaskomafont{sectioning}{disposition}
-%%% From File: $Id: scrkernel-miscellaneous.dtx 2712 2017-11-21 09:27:02Z kohm $
+%%% From File: $Id: scrkernel-miscellaneous.dtx 2995 2018-07-18 06:46:34Z kohm $
 %%%            (run: body)
 \newif\if@restonecol
 \newcommand{\dictum}[2][]{\par%
@@ -5135,6 +5458,23 @@
   `\string\addtokomafont' for the page style elements need\MessageBreak
   explicite user intervention to work}
 \scr@package@not@recommended{minitoc}{}
+\scr@package@not@recommended{multitoc}{%
+  package `multicol' and, e.g.:\MessageBreak
+  \space\space
+  \string\BeforeStartingTOC{\string\begin{multicols}{2}}\MessageBreak
+  \space\space
+  \string\AfterStartingTOC{\string\end{multicols}}\MessageBreak
+  to make all ToCs two-columned.\MessageBreak
+  \@ifpackagelater{2018/07/18}{}{%
+    Note, package `multitoc' breaks additional\MessageBreak
+    ToCs generated by `\string\DeclareNewTOC' or\MessageBreak
+    packages like `listings' or `newcaption' and\MessageBreak
+    even the standard table of contents,\MessageBreak
+    list of figures or list of tables,\MessageBreak
+    if you omit the corresponding options `toc',\MessageBreak
+    `lof' or `lot'.%
+  }%
+}
 \scr@package@not@recommended{parskip}{%
   option\MessageBreak
   `parskip' with one of it's several values}
@@ -5154,6 +5494,28 @@
   the list of figures, list of tables, bibliography,\MessageBreak
   index and the running head%
 }
+\scr@package@not@recommended{tocloft}{%
+  options like `listof=entryprefix',\MessageBreak
+  commands like `\string\listoflofentryname' or\MessageBreak
+  `\string\listoflotentryname',
+  and `\string\DeclareTOCStyleEntry' or\MessageBreak
+  `\string\RedeclareSectionCommand'
+  instead of this package,\MessageBreak
+  because it breaks several KOMA-Script features of\MessageBreak
+  the list of figures, list of tables and table of\MessageBreak
+  contents, i.e., options like `listof=numbered',\MessageBreak
+  `listof=flat or `toc=flat', commands like\MessageBreak
+  `\string\BeforeTOCHead{...}' and
+  `\string\AfterTOCHead{...}',\MessageBreak
+  `\string\BeforeStartingTOC{...}' and
+  \string\AfterStartingTOC{...}',\MessageBreak
+  all features of  `\string\DeclareTOCStyleEntry',\MessageBreak
+  and the ToC entry features of `\string\DeclareSecionCommand'\MessageBreak
+  and `\string\RedeclareSectionCommand' of levels\MessageBreak
+  `part',
+  `section', `subsection',\MessageBreak
+  `subsubsection', `paragraph' and `subparagraph'%
+}
 \BeforePackage{minitoc}{%
   \let\scr@mt@saved@sect\@sect
 }
@@ -5408,55 +5770,13 @@
 \newcommand*{\indexpagestyle}{plain}
 \pagestyle{plain}
 \pagenumbering{arabic}
-%%% From File: $Id: scrlayer.dtx 2684 2017-10-13 13:35:13Z kohm $
+%%% From File: $Id: scrlayer.dtx 3015 2018-09-03 10:51:32Z kohm $
 %%%            (run: body)
 \providecommand*{\@mkleft}{%
-  \begingroup
-    \ifx\@mkboth\markboth \aftergroup\markleft
-    \else
-      \ifx\@mkboth\@gobbletwo \aftergroup\@gobble
-      \else \def\@gobbletwo##1##2{}%
-        \ifx \@mkboth\@gobbletwo \aftergroup\@gobble
-        \else
-          \ClassWarning{\KOMAClassName}{%
-            package incompatibility detected!\MessageBreak
-            \string\@mkboth it neither \string\markboth nor any\MessageBreak
-            kind of two arguments gobbling,\MessageBreak
-            e.g., \string\@gobbletwo.\MessageBreak
-            So I don't known, what to do\MessageBreak
-            with \string\@mkleft.\MessageBreak
-            Nevertheless, \string\markleft\space will be\MessageBreak
-            used%
-          }%
-          \aftergroup\markleft
-        \fi
-      \fi
-    \fi
-  \endgroup
+  \IfActiveMkBoth{\markleft}{\@gobble}%
 }%
 \providecommand*{\@mkright}{%
-  \begingroup
-    \ifx\@mkboth\markboth \aftergroup\markright
-    \else
-      \ifx\@mkboth\@gobbletwo \aftergroup\@gobble
-      \else \def\@gobbletwo##1##2{}%
-        \ifx \@mkboth\@gobbletwo \aftergroup\@gobble
-        \else
-          \ClassWarning{\KOMAClassName}{%
-            package incompatibility detected!\MessageBreak
-            \string\@mkboth it neither \string\markboth nor any\MessageBreak
-            kind of two arguments gobbling,\MessageBreak
-            e.g., \string\@gobbletwo.\MessageBreak
-            So I don't known, what to do\MessageBreak
-            with \string\@mkright.\MessageBreak
-            Nevertheless, \string\markright\space will be\MessageBreak
-            used%
-          }%
-          \aftergroup\markright
-        \fi
-      \fi
-    \fi
-  \endgroup
+  \IfActiveMkBoth{\markright}{\@gobble}%
 }%
 \providecommand*{\@mkdouble}[1]{%
   \@mkboth{#1}{#1}%
@@ -6266,7 +6586,7 @@
   \thechapter.%
   \@arabic\c@table
 }
-%%% From File: $Id: scrkernel-footnotes.dtx 2640 2017-05-08 09:36:55Z kohm $
+%%% From File: $Id: scrkernel-footnotes.dtx 2979 2018-04-17 06:01:18Z kohm $
 %%%            (run: body)
 \renewcommand*\footnoterule{%
   \normalsize\ftn@rule@test@values
@@ -6388,7 +6708,7 @@
   \kern-\multiplefootnotemarker
   \kern\multiplefootnotemarker\relax
 }
-\@ifundefined{FN@mf@prepare}{}{}
+\@ifundefined{FN@mf@prepare}{\let\FN@mf@prepare\relax}{}
 \newcommand{\scr@saved@footnotetext}{}
 \let\scr@saved@footnotetext\@footnotetext
 \renewcommand{\@footnotetext}[1]{%
@@ -6572,7 +6892,7 @@
 \renewcommand*\listtablename{List of Tables}
 \renewcommand*\listoflotname{\listtablename}
 \renewcommand*\listoflotentryname{\tablename}
-%%% From File: $Id: scrkernel-bibliography.dtx 2769 2017-12-03 10:56:06Z kohm $
+%%% From File: $Id: scrkernel-bibliography.dtx 3016 2018-09-03 11:40:59Z kohm $
 %%%            (run: body)
 \newcommand*\bibname{Bibliography}
 \newcommand*{\bibpreamble}{\relax}
@@ -6658,7 +6978,7 @@
 }
 \newcommand{\AfterBibliographyPreamble}{\g@addto@macro\bib@before@hook}
 \newcommand{\AtEndBibliography}{\g@addto@macro\bib@after@hook}
-%%% From File: $Id: scrkernel-index.dtx 2782 2017-12-04 07:47:52Z kohm $
+%%% From File: $Id: scrkernel-index.dtx 3016 2018-09-03 11:40:59Z kohm $
 %%%            (run: body)
 \newcommand*{\index@preamble}{}
 \let\index@preamble=\relax
@@ -6669,7 +6989,7 @@
     \@chaptertolistsfalse
                   \idx@@heading{\indexname}]%
   \ifidx@leveldown
-    \@mkright{\MakeMarkcase{\indexname}}%
+    \addsecmark{\indexname}%
   \else
     \@mkdouble{\MakeMarkcase{\indexname}}%
   \fi
-- 
cgit v1.2.3

