From 66279a58ec36789c4d363e2d4598176d99f43c66 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 25 Jul 2020 21:47:49 +0000
Subject: koma-script (25jul20)

git-svn-id: svn://tug.org/texlive/trunk@55944 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/koma-script/scrbook.cls   | 123 ++++++++++++++-------
 1 file changed, 82 insertions(+), 41 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 b3dea2ee566..38513d41388 100644
--- a/Master/texmf-dist/tex/latex/koma-script/scrbook.cls
+++ b/Master/texmf-dist/tex/latex/koma-script/scrbook.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 3481 2020-04-19 09:52:23Z kohm $
+%%% From File: $Id: scrkernel-version.dtx 3510 2020-07-22 13:29:13Z kohm $
 \begingroup
   \catcode`\@11\relax
   \ifx\KOMAScriptVersion\undefined
@@ -106,7 +106,7 @@
       \fi
     }
   \fi
-  \@CheckKOMAScriptVersion{2020/04/19 v3.30 KOMA-Script}%
+  \@CheckKOMAScriptVersion{2020/07/22 v3.31 KOMA-Script}%
 \endgroup
 \providecommand*{\scr@clsextension}{\@clsextension}
 \AtBeginDocument{%
@@ -121,7 +121,7 @@
   book%
 }
 \ProvidesClass{\KOMAClassName}[%
-  2020/04/19 v3.30 KOMA-Script
+  2020/07/22 v3.31 KOMA-Script
   document class (\ClassName)%
 ]
 %%% From File: $Id: scrkernel-basics.dtx 3465 2020-03-07 10:23:56Z kohm $
@@ -130,7 +130,7 @@
 %%% From File: $Id: scrkernel-listsof.dtx 3477 2020-04-11 07:26:26Z kohm $
 %%%            (run: prepare)
 \RequirePackage{tocbasic}[%
-  2020/04/19 v3.30 KOMA-Script
+  2020/07/22 v3.31 KOMA-Script
 ]
 \AtAddToTocList[\@currname.\@currext]{\setuptoc{\@currext}{onecolumn}}%
 \AtAddToTocList[ToC]{\setuptoc{\@currext}{onecolumn}}%
@@ -141,9 +141,9 @@
   \expandafter{\ext@toc}%
 }
 \AtAddToTocList[float]{\setuptoc{\@currext}{onecolumn}}%
-%%% From File: $Id: scrkernel-tocstyle.dtx 3392 2019-11-19 09:37:46Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3507 2020-06-11 14:57:03Z kohm $
 %%%            (run: prepare)
-%%% From File: $Id: scrkernel-sections.dtx 3476 2020-04-08 14:42:59Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 3507 2020-06-11 14:57:03Z kohm $
 %%%            (run: prepare)
 \newif\if@openright
 \@openrighttrue
@@ -219,7 +219,7 @@
 \newcommand*{\size@paragraph}{}
 \newcommand*{\size@subparagraph}{}
 \newcommand*{\sectfont}{\normalcolor\@gr@gsffamily\bfseries}
-%%% From File: $Id: scrkernel-compatibility.dtx 3451 2020-02-24 16:22:41Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 3492 2020-06-02 09:02:18Z kohm $
 %%%            (run: init)
 \newcommand*
   {\scr@compatibility}{\scr@v@last}
@@ -297,10 +297,11 @@
 \@namedef{scr@v@3.28}{17}
 \@namedef{scr@v@3.29}{17}
 \@namedef{scr@v@3.30}{17}
-\@namedef{scr@v@last}{17}
-%%% From File: $Id: scrkernel-typearea.dtx 3470 2020-03-24 12:12:02Z kohm $
+\@namedef{scr@v@3.31}{18}
+\@namedef{scr@v@last}{18}
+%%% From File: $Id: scrkernel-typearea.dtx 3488 2020-04-27 13:04:43Z kohm $
 %%%            (run: init)
-%%% From File: $Id: scrkernel-compatibility.dtx 3451 2020-02-24 16:22:41Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 3492 2020-06-02 09:02:18Z kohm $
 %%%            (run: option)
 \newif\if@scr@emulatestandardclasses
 \let\scr@emulatestandardclassestrue\relax
@@ -374,7 +375,7 @@
 \newcommand*{\scr@v@is@ge}[1]{%
   \numexpr\scr@compatibility+\@ne\relax>\@nameuse{scr@v@#1}
 }
-%%% From File: $Id: scrkernel-miscellaneous.dtx 3453 2020-02-25 07:33:30Z kohm $
+%%% From File: $Id: scrkernel-miscellaneous.dtx 3487 2020-04-27 07:19:23Z kohm $
 %%%            (run: option)
 \KOMA@key{draft}[true]{%
   \KOMA@set@ifkey{draft}{@tempswa}{#1}%
@@ -518,7 +519,7 @@
 \BeforePackage{tex4ht}{%
   \let\scr@defineobsoletefonts\thr@@
 }
-%%% From File: $Id: scrkernel-typearea.dtx 3470 2020-03-24 12:12:02Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 3488 2020-04-27 13:04:43Z kohm $
 %%%            (run: options)
 \KOMA@key{twoside}[true]{%
   \if@atdocument\else\PassOptionsToPackage{twoside=#1}{typearea}\fi%
@@ -581,8 +582,12 @@
 \def\@@BCOR #1BCOR#2BCOR#3\@@BCOR{%
   \Ifstr{#1}{}{%
     \Ifstr{#3}{BCOR}{%
-      \Ifstrstart{#2}{=}{\OptionNotUsed}{%
-        \PassOptionsToPackage{BCOR#2}{typearea}}%
+      \Ifstrstart{#2}{=}{%
+        \edef\reserved@a{\noexpand\Ifdimen{\@gobble#2}}%
+        \reserved@a{\PassOptionsToPackage{BCOR#2}{typearea}}{\OptionNotUsed}%
+      }{%
+        \Ifdimen{#2}{\PassOptionsToPackage{BCOR#2}{typearea}}{\OptionNotUsed}%
+      }%
     }{\scr@pti@nerr@r}%
   }{\scr@pti@nerr@r}%
 }
@@ -591,8 +596,12 @@
 \def\@@DIV #1DIV#2DIV#3\@@DIV{%
   \edef\@tempa{#1}\ifx\@tempa\@empty
     \edef\@tempa{#3}\def\@tempb{DIV}\ifx\@tempa\@tempb
-      \Ifstrstart{#2}{=}{\OptionNotUsed}{%
-        \PassOptionsToPackage{DIV#2}{typearea}}%
+      \Ifstrstart{#2}{=}{%
+        \edef\reserved@a{\noexpand\Ifnumber{\@gobble#2}}%
+        \reserved@a{\PassOptionsToPackage{DIV#2}{typearea}}{\OptionNotUsed}%
+      }{%
+        \Ifnumber{#2}{\PassOptionsToPackage{DIV#2}{typearea}}{\OptionNotUsed}%
+      }%
     \else\scr@pti@nerr@r\fi
   \else\@BCOR\fi
 }
@@ -835,9 +844,9 @@
 }{titlepage}{\if@titlepage true\else false\fi}
 \KOMA@DeclareStandardOption%
   {notitlepage}{titlepage=false}
-%%% From File: $Id: scrkernel-tocstyle.dtx 3392 2019-11-19 09:37:46Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3507 2020-06-11 14:57:03Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 3476 2020-04-08 14:42:59Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 3507 2020-06-11 14:57:03Z kohm $
 %%%            (run: option)
 \KOMA@key{open}{%
   \KOMA@set@ncmdkey{open}{@tempa}{%
@@ -2015,18 +2024,18 @@
 \KOMA@DeclareDeprecatedOption{idxtotoc}{index=totoc}
 %%% From File: $Id: scrkernel-listsandtabulars.dtx 3394 2019-11-19 11:56:28Z kohm $
 %%%            (run: option)
-%%% From File: $Id: scrkernel-sections.dtx 3476 2020-04-08 14:42:59Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 3507 2020-06-11 14:57:03Z kohm $
 %%%            (run: execoption)
 \KOMAExecuteOptions{headings=openright}
 \KOMAExecuteOptions{numbers=autoendperiod}
-%%% From File: $Id: scrkernel-miscellaneous.dtx 3453 2020-02-25 07:33:30Z kohm $
+%%% From File: $Id: scrkernel-miscellaneous.dtx 3487 2020-04-27 07:19:23Z kohm $
 %%%            (run: execoption)
 \KOMAExecuteOptions{%
   parskip=false,%
   headings=big%
 }
 \KOMAProcessOptions\relax
-%%% From File: $Id: scrkernel-compatibility.dtx 3451 2020-02-24 16:22:41Z kohm $
+%%% From File: $Id: scrkernel-compatibility.dtx 3492 2020-06-02 09:02:18Z kohm $
 %%%            (run: body)
 %%% From File: $Id: scrkernel-fonts.dtx 3390 2019-11-18 17:09:35Z kohm $
 %%%            (run: body)
@@ -2516,7 +2525,7 @@
         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 3470 2020-03-24 12:12:02Z kohm $
+%%% From File: $Id: scrkernel-typearea.dtx 3488 2020-04-27 13:04:43Z kohm $
 %%%            (run: body)
 \let\@BCOR                =\relax
 \let\@@BCOR               =\relax
@@ -3089,10 +3098,10 @@
 \newkomafont{dedication}{\Large}
 \newcommand*{\scr@fnt@title}{\titlefont}%
 \newcommand*{\scr@fnt@subject}{\subject@font}%
-%%% From File: $Id: scrkernel-tocstyle.dtx 3392 2019-11-19 09:37:46Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3507 2020-06-11 14:57:03Z kohm $
 %%%            (run: body)
 \let\numberline\scr@numberline
-%%% From File: $Id: scrkernel-tocstyle.dtx 3392 2019-11-19 09:37:46Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3507 2020-06-11 14:57:03Z kohm $
 %%%            (run: class,style,part)
 \CloneTOCEntryStyle{tocline}{part}
 \TOCEntryStyleStartInitCode{part}{%
@@ -3106,7 +3115,7 @@
   \expandafter\providecommand\expandafter*%
   \csname scr@tso@#1@beforeskip\endcsname{2.25em \@plus\p@}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 3392 2019-11-19 09:37:46Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3507 2020-06-11 14:57:03Z kohm $
 %%%            (run: class,style,chapter)
 \CloneTOCEntryStyle{tocline}{chapter}
 \TOCEntryStyleStartInitCode{chapter}{%
@@ -3126,17 +3135,17 @@
   \expandafter\providecommand\expandafter*%
   \csname scr@tso@#1@beforeskip\endcsname{1.0em \@plus\p@}%
 }
-%%% From File: $Id: scrkernel-tocstyle.dtx 3392 2019-11-19 09:37:46Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3507 2020-06-11 14:57:03Z 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 3392 2019-11-19 09:37:46Z kohm $
+%%% From File: $Id: scrkernel-tocstyle.dtx 3507 2020-06-11 14:57:03Z kohm $
 %%%            (run: class,style,default)
 \CloneTOCEntryStyle{section}{default}
-%%% From File: $Id: scrkernel-sections.dtx 3476 2020-04-08 14:42:59Z kohm $
+%%% From File: $Id: scrkernel-sections.dtx 3507 2020-06-11 14:57:03Z kohm $
 %%%            (run: body)
 \setcounter{secnumdepth}{2}
 \providecommand*{\ifnumbered}{%
@@ -3505,6 +3514,13 @@
       \z@
     \fi
     \let\@svsec\@empty
+    \expandafter\ifnum\scr@v@is@lt{3.31}\relax\else
+      \begingroup
+        \let\@elt\@stpelt
+        \csname cl@#1\endcsname
+      \endgroup
+    \fi
+    \hy@insteadofrefstepcounter{#1}%
   \else
     \refstepcounter{#1}%
     \expandafter\@maybeautodot\csname the#1\endcsname
@@ -3526,8 +3542,7 @@
     \expandafter\csname #1mark\expandafter\endcsname\expandafter{\@currentheadentry}%
     \ifx\@currenttocentry\@empty\else
       \scr@ifundefinedorrelax{add#1tocentry}{%
-        \expandafter\global\expandafter\def
-        \csname add#1tocentry\endcsname##1##2{%
+        \expandafter\gdef\csname add#1tocentry\endcsname##1##2{%
           \addtocentrydefault{#1}{##1}{##2}%
         }%
       }{}%
@@ -3539,7 +3554,11 @@
         \fi
         \csname add#1tocentry\endcsname{}{\@currenttocentry}%
       \else
-        \csname add#1tocentry\endcsname{\csname the#1\endcsname}{%
+        \@ifundefined{#1tocformat}{%
+          \expandafter\gdef\csname #1tocformat\endcsname
+          {\csname the#1\endcsname}%
+        }{}%
+        \csname add#1tocentry\endcsname{\csname #1tocformat\endcsname}{%
           \@currenttocentry}%
       \fi
     \fi
@@ -3556,8 +3575,7 @@
       \expandafter{\@currentheadentry}%
       \ifx\@currenttocentry\@empty\else
         \scr@ifundefinedorrelax{add#1tocentry}{%
-          \expandafter\global\expandafter\def
-          \csname add#1tocentry\endcsname####1####2{%
+          \expandafter\gdef\csname add#1tocentry\endcsname####1####2{%
             \addtocentrydefault{#1}{####1}{####2}%
           }%
         }{}%
@@ -3569,8 +3587,12 @@
           \fi
           \csname add#1tocentry\endcsname{}{\@currenttocentry}%
         \else
-          \csname add#1tocentry\endcsname{\csname the#1\endcsname}{%
-            \@currenttocentry}%
+        \@ifundefined{#1tocformat}{%
+          \expandafter\gdef\csname #1tocformat\endcsname
+          {\csname the#1\endcsname}%
+        }{}%
+        \csname add#1tocentry\endcsname{\csname #1tocformat\endcsname}{%
+          \@currenttocentry}%
         \fi
       \fi
       \ExecuteDoHook{heading/endgroup/#1}%
@@ -3649,7 +3671,14 @@
       \string\scr@s@ct@@nn@m@\space locally.\MessageBreak
       This could result in several error messages}%
     \def\scr@s@ct@@nn@m@{\string\scr@s@ct@@nn@m@}%
-  }{}%
+  }{%
+    \expandafter\ifnum\scr@v@is@lt{3.31}\relax\else
+      \begingroup
+        \let\@elt\@stpelt
+        \csname cl@\scr@s@ct@@nn@m@\endcsname
+      \endgroup
+    \fi
+  }%
   \ifdim
     \scr@sect@runin{\z@}{\p@}{\glueexpr #3\relax}>\z@
     \begingroup
@@ -4955,15 +4984,19 @@
   \fi
   \Ifnumbered{#1}{%
     \refstepcounter{#1}%
-    \@maybeautodot\thepart%
     \expandafter\@maybeautodot\csname the#1\endcsname
     \typeout{#1 \csname the#1\endcsname.}%
     \ifx\@currenttocentry\@empty\else
+      \@ifundefined{#1tocformat}{%
+        \expandafter\gdef\csname #1tocformat\endcsname
+        {\csname the#1\endcsname}%
+      }{}%
       \scr@ifundefinedorrelax{add#1tocentry}{%
         \addtocentrydefault{#1}%
       }{%
         \@nameuse{add#1tocentry}%
-      }{\csname the#1\endcsname}{\@currenttocentry}%
+      }{\csname\@ifundefined{#1tocformat}{the#1}{#1tocformat}\endcsname}%
+      {\@currenttocentry}%
     \fi
   }{%
     \expandafter\ifnum\scr@v@is@lt{3.18}\relax\else
@@ -5165,11 +5198,16 @@
     \expandafter\@maybeautodot\csname the#1\endcsname
     \typeout{#1 \csname the#1\endcsname.}%
     \ifx\@currenttocentry\@empty\else
+      \@ifundefined{#1tocformat}{%
+        \expandafter\gdef\csname #1tocformat\endcsname
+        {\csname the#1\endcsname}%
+      }{}%
       \scr@ifundefinedorrelax{add#1tocentry}{%
         \addtocentrydefault{#1}%
       }{%
         \@nameuse{add#1tocentry}%
-      }{\csname the#1\endcsname}{\@currenttocentry}%
+      }{\csname\@ifundefined{#1tocformat}{the#1}{#1tocformat}\endcsname}%
+      {\@currenttocentry}%
     \fi
   \else
     \expandafter\ifnum\scr@v@is@lt{3.15}\relax\else
@@ -5591,6 +5629,7 @@
   beforeskip=-3.5ex \@plus -1ex \@minus -.2ex,%
   afterskip=2.3ex \@plus.2ex,%
   tocstyle=section,%
+  tocindentfollows=chapter,%
   tocindent=1.5em,%
   tocnumwidth=2.3em%
 ]{section}
@@ -5629,6 +5668,7 @@
   indent=\z@,%
   beforeskip=3.25ex \@plus1ex \@minus.2ex,%
   afterskip=-1em,%
+  tocindentfollows=subsubsection,%
   tocstyle=section,%
   tocindent=10em,%
   tocnumwidth=5em%
@@ -5650,7 +5690,7 @@
 \fi
 \newcommand*{\scr@fnt@disposition}{\sectfont}
 \aliaskomafont{sectioning}{disposition}
-%%% From File: $Id: scrkernel-miscellaneous.dtx 3453 2020-02-25 07:33:30Z kohm $
+%%% From File: $Id: scrkernel-miscellaneous.dtx 3487 2020-04-27 07:19:23Z kohm $
 %%%            (run: body)
 \newif\if@restonecol
 \newcommand{\dictum}[2][]{\par%
@@ -5731,7 +5771,8 @@
 \newcommand*{\is@thispageodd@setlabel}{}
 \newif\ifthispagewasodd
 \providecommand*{\ifthispageodd}{%
-  \PackageWarning{scrbase}{Usage of deprecated command
+  \ClassWarning{\KOMAClasSName}{%
+    Usage of deprecated command
     `\string\ifthispageodd'.\MessageBreak
     The command has been renamed because of a\MessageBreak
     recommendation of The LaTeX Project Team.\MessageBreak
-- 
cgit v1.2.3

