diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrbook.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrbook.cls | 612 |
1 files changed, 404 insertions, 208 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrbook.cls b/Master/texmf-dist/tex/latex/koma-script/scrbook.cls index 6824b4f6df9..b2e0f4a9a11 100644 --- a/Master/texmf-dist/tex/latex/koma-script/scrbook.cls +++ b/Master/texmf-dist/tex/latex/koma-script/scrbook.cls @@ -6,7 +6,7 @@ %% %% scrkernel-version.dtx (with options: `class,book') %% scrkernel-basics.dtx (with options: `load') -%% tocbasic.dtx (with options: `class,load,chapter') +%% scrkernel-listsof.dtx (with options: `class,book,prepare') %% scrkernel-tocstyle.dtx (with options: `class,book,prepare') %% scrkernel-sections.dtx (with options: `class,book,prepare') %% scrkernel-compatibility.dtx (with options: `class,book,init') @@ -52,7 +52,7 @@ %% scrkernel-listsandtabulars.dtx (with options: `class,book,body') %% scrlogo.dtx (with options: `logo') %% -%% Copyright (c) 1994-2017 Markus Kohm [komascript at gmx info] +%% Copyright (c) 1994-2019 Markus Kohm [komascript at gmx info] %% %% This file was generated from file(s) of the KOMA-Script bundle. %% --------------------------------------------------------------- @@ -80,11 +80,11 @@ %% %% The KOMA-Script bundle (but maybe not this file) was based upon the %% LaTeX 2.09 Script family created by Frank Neukam 1993 and the LaTeX2e -%% standard classes created by The LaTeX3 Project 1994-1996. You may +%% standard classes created by The LaTeX3 Project 1994-1996. You can %% find a complete unmodified copy of LaTeX2e at %% <http://mirror.ctan.org/tex-archive/macros/latex/base/>. %% -%%% From File: $Id: scrkernel-version.dtx 3063 2019-02-01 07:39:11Z kohm $ +%%% From File: $Id: scrkernel-version.dtx 3263 2019-10-12 14:50:03Z kohm $ \begingroup \catcode`\@11\relax \ifx\KOMAScriptVersion\undefined @@ -106,7 +106,7 @@ \fi } \fi - \@CheckKOMAScriptVersion{2019/02/01 v3.26b KOMA-Script}% + \@CheckKOMAScriptVersion{2019/10/12 v3.27 KOMA-Script}% \endgroup \providecommand*{\scr@clsextension}{\@clsextension} \AtBeginDocument{% @@ -115,29 +115,35 @@ \newcommand*{\KOMAClassName}{% scrbook% } +\newcommand*{\KOMAClassFileName}{\KOMAClassName.\@clsextension} +\edef\KOMAClassFileName{\KOMAClassFileName} \newcommand*{\ClassName}{% book% } -\newcommand*{\KOMAClassFileName}{\KOMAClassName.\@clsextension} -\edef\KOMAClassFileName{\KOMAClassFileName} \ProvidesClass{\KOMAClassName}[% - 2019/02/01 v3.26b KOMA-Script + 2019/10/12 v3.27 KOMA-Script document class (\ClassName)% ] -%%% From File: $Id: scrkernel-basics.dtx 3063 2019-02-01 07:39:11Z kohm $ +%%% From File: $Id: scrkernel-basics.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: load) \RequirePackage{scrkbase}[\KOMAScriptVersion] -%%% From File: $Id: tocbasic.dtx 3050 2018-12-30 14:36:55Z kohm $ +%%% From File: $Id: scrkernel-listsof.dtx 3262 2019-10-10 08:25:29Z kohm $ +%%% (run: prepare) \RequirePackage{tocbasic}[% - 2019/02/01 v3.26b KOMA-Script + 2019/10/12 v3.27 KOMA-Script ] \AtAddToTocList[\@currname.\@currext]{\setuptoc{\@currext}{onecolumn}}% +\AtAddToTocList[ToC]{\setuptoc{\@currext}{onecolumn}}% +\addtotoclist[ToC]{toc} +\ifstr{\ext@toc}{toc}{}{% + \expandafter\addtotoclist + \expandafter[\expandafter T\expandafter o\expandafter C\expandafter ]% + \expandafter{\ext@toc}% +} \AtAddToTocList[float]{\setuptoc{\@currext}{onecolumn}}% -\addtotoclist{toc} -\ifstr{\ext@toc}{toc}{}{\expandafter\addtotoclist\expandafter{\ext@toc}} -%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $ +%%% From File: $Id: scrkernel-tocstyle.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: prepare) -%%% From File: $Id: scrkernel-sections.dtx 3063 2019-02-01 07:39:11Z kohm $ +%%% From File: $Id: scrkernel-sections.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: prepare) \newif\if@openright \@openrighttrue @@ -213,7 +219,7 @@ \newcommand*{\size@paragraph}{} \newcommand*{\size@subparagraph}{} \newcommand*{\sectfont}{\normalcolor\@gr@gsffamily\bfseries} -%%% From File: $Id: scrkernel-compatibility.dtx 3063 2019-02-01 07:39:11Z kohm $ +%%% From File: $Id: scrkernel-compatibility.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: init) \newcommand* {\scr@compatibility}{\scr@v@last} @@ -286,10 +292,11 @@ \@namedef{scr@v@3.26}{17} \@namedef{scr@v@3.26a}{17} \@namedef{scr@v@3.26b}{17} +\@namedef{scr@v@3.27}{17} \@namedef{scr@v@last}{17} -%%% From File: $Id: scrkernel-typearea.dtx 2993 2018-07-16 07:33:22Z kohm $ +%%% From File: $Id: scrkernel-typearea.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: init) -%%% From File: $Id: scrkernel-compatibility.dtx 3063 2019-02-01 07:39:11Z kohm $ +%%% From File: $Id: scrkernel-compatibility.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \newif\if@scr@emulatestandardclasses \let\scr@emulatestandardclassestrue\relax @@ -363,7 +370,7 @@ \newcommand*{\scr@v@is@ge}[1]{% \numexpr\scr@compatibility+\@ne\relax>\@nameuse{scr@v@#1} } -%%% From File: $Id: scrkernel-miscellaneous.dtx 2995 2018-07-18 06:46:34Z kohm $ +%%% From File: $Id: scrkernel-miscellaneous.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \KOMA@key{draft}[true]{% \KOMA@set@ifkey{draft}{@tempswa}{#1}% @@ -419,11 +426,11 @@ \newcommand*{\@gr@gsffamily}{% \if@egregdoesnotlikesansseriftitles\else\sffamily\fi } -%%% From File: $Id: scrkernel-language.dtx 3011 2018-08-29 07:35:17Z kohm $ +%%% From File: $Id: scrkernel-language.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) -%%% From File: $Id: scrkernel-fonts.dtx 3047 2018-12-22 15:51:54Z kohm $ +%%% From File: $Id: scrkernel-fonts.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) -\newcommand*\@ptsize{% +\providecommand*\@ptsize{% 11% } \newcommand*{\@pt@scan}{% @@ -507,7 +514,7 @@ \BeforePackage{tex4ht}{% \let\scr@defineobsoletefonts\thr@@ } -%%% From File: $Id: scrkernel-typearea.dtx 2993 2018-07-16 07:33:22Z kohm $ +%%% From File: $Id: scrkernel-typearea.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: options) \KOMA@key{twoside}[true]{% \if@atdocument\else\PassOptionsToPackage{twoside=#1}{typearea}\fi% @@ -523,7 +530,9 @@ \ifx\FamilyKeyState\FamilyKeyStateProcessed \expandafter\ifnum\scr@v@is@ge{3.17}% \if@twoside\flushbottom - \else\if@twocolumn\flushbottom\else\raggedbottom\fi\fi + \else + \if@twocolumn\sloppy\flushbottom\else\raggedbottom\fi + \fi \fi \KOMA@kav@xreplacevalue{.% \KOMAClassFileName @@ -545,7 +554,12 @@ {\expandafter\AtEndOfClass}\fi {\expandafter\ifnum\scr@v@is@ge{3.17}% \if@twocolumn\twocolumn\sloppy\flushbottom - \else\onecolumn\if@twoside\flushbottom\else\raggedbottom\fi\fi + \else + \onecolumn + \if@twoside\flushbottom\else + \raggedbottom + \fi + \fi \fi}% \fi } @@ -617,7 +631,7 @@ } \DeclareOption*{% \x@paper} -%%% From File: $Id: scrkernel-paragraphs.dtx 3064 2019-02-01 07:40:28Z kohm $ +%%% From File: $Id: scrkernel-paragraphs.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \newcommand*{\setparsizes}[3]{% \edef\f@parindent{\the\parindent}% @@ -783,7 +797,7 @@ \KOMA@DeclareDeprecatedOption{parindent}{parskip=false} \KOMA@kav@add{.\KOMAClassFileName}{parskip}{false} \KOMA@kav@add{.\KOMAClassFileName}{parskip}{absolute} -%%% From File: $Id: scrkernel-title.dtx 3052 2019-01-01 12:47:38Z kohm $ +%%% From File: $Id: scrkernel-title.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \newif\if@titlepage \@titlepagetrue @@ -815,9 +829,9 @@ }{titlepage}{\if@titlepage true\else false\fi} \KOMA@DeclareStandardOption% {notitlepage}{titlepage=false} -%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $ +%%% From File: $Id: scrkernel-tocstyle.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) -%%% From File: $Id: scrkernel-sections.dtx 3063 2019-02-01 07:39:11Z kohm $ +%%% From File: $Id: scrkernel-sections.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \KOMA@key{open}{% \KOMA@set@ncmdkey{open}{@tempa}{% @@ -881,6 +895,30 @@ \AtBeginDocument{% \@ifpackageloaded{bookmark}{}{% \if@scr@autoloadbookmarkpackage + \scr@ifundefinedorrelax{Hy@driver}{% + \ClassWarning{\KOMAClassName}{% + `hyperref' loaded but `\string\Hy@driver' undefined.\MessageBreak + This should not happen!\MessageBreak + Maybe `hyperref' not loaded or unknown version?% + }% + }{% + \ifstr{\Hy@driver}{hdvips}{% + \providecommand*{\BookmarkDriverDefault}{dvips}% + }{% + \ifstr{\Hy@driver}{hdvipdfm}{% + \providecommand*{\BookmarkDriverDefault}{dvipdfm}% + }{% + \ifstr{\Hy@driver}{hdvipson}{% + \providecommand*{\BookmarkDriverDefault}{dvipsone}% + }{% + \ifstr{\Hy@driver}{htexture}{% + \providecommand*{\BookmarkDriverDefault}{textures}% + }{% + }% + }% + }% + }% + }% \ClassInfo{\KOMAClassName}{% loading recommended package `bookmark'.\MessageBreak Using `bookmark' together with `hyperref' is @@ -890,8 +928,11 @@ option\MessageBreak `bookmarkpackage=false' before \string\begin{document} and\MessageBreak - you can avoid this message with - `\string\usepackage{bookmark}'\MessageBreak + you can avoid this message adding:\MessageBreak + \space\space\string\usepackage + \scr@ifundefinedorrelax{BookmarkDriverDefault}{}{% + [\BookmarkDriverDefault]% + }{bookmark}\MessageBreak before \string\begin{document}% }% \RequirePackage{bookmark}% @@ -899,15 +940,18 @@ \else \if@filesw \ClassWarning{\KOMAClassName}{% - seems someone has broken package auxhook.\MessageBreak - Usually this happens, if auxhook is loaded or used\MessageBreak + seems someone has broken package `auxhook'.\MessageBreak + Usually this happens, if `auxhook' is loaded or used\MessageBreak implicitly or explicitly by patching - `\string\document'% + \string\document% \scr@ifundefinedorrelax{AtEndPreamble}{}{% \MessageBreak - or via etoolbox command \string\AtEndPreamble + or via etoolbox command \string\AtEndPreamble% }.\MessageBreak - Trying an emergency workaround% + Trying an emergency workaround.\MessageBreak + You can avoid this warning adding:\MessageBreak + \space\space\string\usepackage{auxhook}\MessageBreak + before \string\begin{document}% }% \@beginmainauxhook \fi @@ -1121,7 +1165,7 @@ \KOMA@DeclareDeprecatedOption{bigheadings}{headings=big} \KOMA@DeclareDeprecatedOption{normalheadings}{headings=normal} \KOMA@DeclareDeprecatedOption{smallheadings}{headings=small} -%%% From File: $Id: scrkernel-pagestyles.dtx 2640 2017-05-08 09:36:55Z kohm $ +%%% From File: $Id: scrkernel-pagestyles.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \KOMA@ifkey{headsepline}{@hsl}% \KOMA@kav@add{.\KOMAClassFileName}{headsepline}{false} @@ -1226,7 +1270,7 @@ \KOMA@DeclareDeprecatedOption{cleardoubleempty}{cleardoublepage=empty} \KOMA@DeclareDeprecatedOption{cleardoubleplain}{cleardoublepage=plain} \KOMA@DeclareDeprecatedOption{cleardoublestandard}{cleardoublepage=current} -%%% From File: $Id: scrkernel-floats.dtx 2701 2017-11-15 14:02:01Z kohm $ +%%% From File: $Id: scrkernel-floats.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \newif\if@captionabove\@captionabovefalse \newif\if@tablecaptionabove\@tablecaptionabovefalse @@ -1361,7 +1405,7 @@ \DeclareOption{origlongtable}{\@komalongtablefalse} \KOMA@DeclareDeprecatedOption{onelinecaption}{captions=oneline} \KOMA@DeclareDeprecatedOption{noonelinecaption}{captions=nooneline} -%%% From File: $Id: scrkernel-footnotes.dtx 2979 2018-04-17 06:01:18Z kohm $ +%%% From File: $Id: scrkernel-footnotes.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \KOMA@key{footnotes}{% \ifx\@footnotemark\scr@saved@footnotemark @@ -1432,7 +1476,7 @@ \csname FN@mf@prepare\endcsname \ifhmode\spacefactor\@x@sf\fi \relax} -%%% From File: $Id: scrkernel-listsof.dtx 2864 2018-01-16 07:55:20Z kohm $ +%%% From File: $Id: scrkernel-listsof.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \newif\if@tocleft \KOMA@key{toc}{% @@ -1708,7 +1752,7 @@ \BeforeTOCHead{\@chaptertolistsfalse} \KOMA@kav@add{.\KOMAClassFileName}{chapteratlists}{10\p@}% \KOMA@kav@add{.\KOMAClassFileName}{listof}{chaptergapsmall}% -%%% From File: $Id: scrkernel-bibliography.dtx 3016 2018-09-03 11:40:59Z kohm $ +%%% From File: $Id: scrkernel-bibliography.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \newcommand{\newbibstyle}[3][]{% \scr@ifundefinedorrelax{scr@bibstyle@#2}{% @@ -1877,7 +1921,7 @@ \KOMA@DeclareStandardOption{openbib}{bibliography=openstyle} \KOMA@DeclareDeprecatedOption{bibtotoc}{bibliography=totoc} \KOMA@DeclareDeprecatedOption{bibtotocnumbered}{bibliography=totocnumbered} -%%% From File: $Id: scrkernel-index.dtx 3016 2018-09-03 11:40:59Z kohm $ +%%% From File: $Id: scrkernel-index.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) \newcommand*{\idx@@heading}{% \ifidx@leveldown @@ -1962,22 +2006,22 @@ \KOMA@kav@add{.\KOMAClassFileName}{index}{notoc} \KOMA@kav@add{.\KOMAClassFileName}{index}{standardlevel} \KOMA@DeclareDeprecatedOption{idxtotoc}{index=totoc} -%%% From File: $Id: scrkernel-listsandtabulars.dtx 2640 2017-05-08 09:36:55Z kohm $ +%%% From File: $Id: scrkernel-listsandtabulars.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: option) -%%% From File: $Id: scrkernel-sections.dtx 3063 2019-02-01 07:39:11Z kohm $ +%%% From File: $Id: scrkernel-sections.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: execoption) \KOMAExecuteOptions{headings=openright} \KOMAExecuteOptions{numbers=autoendperiod} -%%% From File: $Id: scrkernel-miscellaneous.dtx 2995 2018-07-18 06:46:34Z kohm $ +%%% From File: $Id: scrkernel-miscellaneous.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: execoption) \KOMAExecuteOptions{% parskip=false,% headings=big% } \KOMAProcessOptions\relax -%%% From File: $Id: scrkernel-compatibility.dtx 3063 2019-02-01 07:39:11Z kohm $ +%%% From File: $Id: scrkernel-compatibility.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) -%%% From File: $Id: scrkernel-fonts.dtx 3047 2018-12-22 15:51:54Z kohm $ +%%% From File: $Id: scrkernel-fonts.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \newcommand*\scr@setlength[4]{% \expandafter\ifnum\scr@v@is@lt{3.12}\relax @@ -2459,13 +2503,13 @@ \@nomath\sfb} \DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal} \DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal} -%%% From File: $Id: scrkernel-language.dtx 3011 2018-08-29 07:35:17Z kohm $ +%%% From File: $Id: scrkernel-language.dtx 3262 2019-10-10 08:25:29Z 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 2993 2018-07-16 07:33:22Z kohm $ +%%% From File: $Id: scrkernel-typearea.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \let\@BCOR =\relax \let\@@BCOR =\relax @@ -2510,7 +2554,7 @@ }\reserved@a \fi \fi -%%% From File: $Id: scrkernel-paragraphs.dtx 3064 2019-02-01 07:40:28Z kohm $ +%%% From File: $Id: scrkernel-paragraphs.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \setlength{\lineskip}{\p@} \setlength{\normallineskip}{\p@} @@ -2630,6 +2674,19 @@ \expandafter\let\csname #1@listi\endcsname=\@listi \def\@listi{\csname #1@listi\endcsname\@list@extra}% } +\AfterPackage{amsthm}{% + \RequirePackage{xpatch}% + \xpatchcmd{\deferred@thm@head}{\addvspace{-\parskip}}{}{% + \ClassInfoNoLine{\KOMAClassName}{% + amsthm's \string\deferred@thm@head\space patched}% + }{% + \ClassWarningNoLine{\KOMAClassName}{% + cannot patch amsthm's \string\deferred@thm@head.\MessageBreak + This could result in wrong spacing before theorem\MessageBreak + environments defined by package `amsthm'% + }% + }% +} \l@addto@macro{\@listi}{\@list@extra}% \let\@listI=\@listi \l@addto@macro{\@listii}{\@list@extra}% @@ -2639,7 +2696,7 @@ \@lowpenalty = 51 \@medpenalty =151 \@highpenalty =301 -%%% From File: $Id: scrkernel-title.dtx 3052 2019-01-01 12:47:38Z kohm $ +%%% From File: $Id: scrkernel-title.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \newcommand*{\@extratitle}{}% \newcommand{\extratitle}[1]{\gdef\@extratitle{% @@ -2783,7 +2840,7 @@ {\usekomafont{publishers}{\@publishers \par}}% \vskip 3em \end{center}\par - \@thanks\let\@thanks\@empty + \@thanks\global\let\@thanks\@empty \vfill\null \if@twoside \@tempswatrue @@ -2802,7 +2859,7 @@ \begin{minipage}[b]{\textwidth} \@lowertitleback \end{minipage}\par - \@thanks\let\@thanks\@empty + \@thanks\global\let\@thanks\@empty \fi \else \ifx\@uppertitleback\@empty\else @@ -2825,7 +2882,7 @@ \next@tdpage\null\vfill {\centering\usekomafont{dedication}{\@dedication \par}}% \vskip \z@ \@plus3fill - \@thanks\let\@thanks\@empty + \@thanks\global\let\@thanks\@empty \cleardoubleemptypage \fi \ifx\titlepage@restore\relax\else\clearpage\titlepage@restore\fi @@ -2906,7 +2963,7 @@ \@maketitle \fi \ifx\titlepagestyle\@empty\else\thispagestyle{\titlepagestyle}\fi - \@thanks + \@thanks\global\let\@thanks\@empty \endgroup \fi \setcounter{footnote}{0}% @@ -3023,10 +3080,10 @@ \newkomafont{dedication}{\Large} \newcommand*{\scr@fnt@title}{\titlefont}% \newcommand*{\scr@fnt@subject}{\subject@font}% -%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $ +%%% From File: $Id: scrkernel-tocstyle.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \let\numberline\scr@numberline -%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $ +%%% From File: $Id: scrkernel-tocstyle.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: class,style,part) \CloneTOCEntryStyle{tocline}{part} \TOCEntryStyleStartInitCode{part}{% @@ -3040,7 +3097,7 @@ \expandafter\providecommand\expandafter*% \csname scr@tso@#1@beforeskip\endcsname{2.25em \@plus\p@}% } -%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $ +%%% From File: $Id: scrkernel-tocstyle.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: class,style,chapter) \CloneTOCEntryStyle{tocline}{chapter} \TOCEntryStyleStartInitCode{chapter}{% @@ -3060,40 +3117,36 @@ \expandafter\providecommand\expandafter*% \csname scr@tso@#1@beforeskip\endcsname{1.0em \@plus\p@}% } -%%% From File: $Id: scrkernel-tocstyle.dtx 3011 2018-08-29 07:35:17Z kohm $ +%%% From File: $Id: scrkernel-tocstyle.dtx 3262 2019-10-10 08:25:29Z 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 3011 2018-08-29 07:35:17Z kohm $ +%%% From File: $Id: scrkernel-tocstyle.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: class,style,default) \CloneTOCEntryStyle{section}{default} -%%% From File: $Id: scrkernel-sections.dtx 3063 2019-02-01 07:39:11Z kohm $ +%%% From File: $Id: scrkernel-sections.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \setcounter{secnumdepth}{2} \newcommand*{\ifnumbered}[1]{% - \scr@ifundefinedorrelax{#1numdepth}{% - \@secondoftwo - }{% - \expandafter\ifnum \@nameuse{#1numdepth}>\c@secnumdepth + \if@currentusenumber + \scr@ifundefinedorrelax{#1numdepth}{% \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi - }% + }{% + \expandafter\ifnum \@nameuse{#1numdepth}>\c@secnumdepth + \expandafter\expandafter\expandafter\@secondoftwo + \else + \expandafter\expandafter\expandafter\@firstoftwo + \fi + }% + \else + \expandafter\@secondoftwo + \fi } \newcommand*{\ifunnumbered}[1]{% - \scr@ifundefinedorrelax{#1numdepth}{% - \@firstoftwo - }{% - \expandafter\ifnum \@nameuse{#1numdepth}>\c@secnumdepth - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi - }% + \ifnumbered{#1}{\@secondoftwo}{\@firstoftwo}% } \BeforeClosingMainAux{% \if@autodot\if@filesw\immediate\write\@mainaux{% @@ -3159,6 +3212,7 @@ \fi \fi \newcommand*{\scr@startsection}[6]{% + \ExecuteDoHook{heading/preinit/#1}% \if@noskipsec \leavevmode \fi \par \@tempskipa \glueexpr #4\relax @@ -3203,18 +3257,18 @@ \csname iffalse\endcsname \fi }% - \csname scr@startsection@hook\endcsname + \ExecuteDoHook{heading/postinit/#1}% \if@nobreak \everypar{}% \else \addpenalty\@secpenalty\addvspace\@tempskipa \fi \kernel@ifstar {% - \csname scr@preto@ssect@hook\endcsname + \ExecuteDoHook{heading/branch/star/#1}% \def\scr@s@ct@@nn@m@{#1}% \@ssect{\glueexpr #3\relax}{\glueexpr #4\relax}{\glueexpr #5\relax}{#6}% }{% - \csname scr@preto@sect@hook\endcsname + \ExecuteDoHook{heading/branch/nostar/#1}% \scr@section@dblarg{% \@sect{#1}{\numexpr #2\relax}{\glueexpr #3\relax}{\glueexpr #4\relax}% {\glueexpr #5\relax}{#6}% @@ -3224,7 +3278,7 @@ \else \ClassWarningNoLine{\KOMAClassName}{`\string\@startsection' has been changed.\MessageBreak - \KOMAClassName\space needs it's own Definition of + \KOMAClassName\space needs it's own definition of `\string\@startsection'\MessageBreak to provide extended features for the optional argument\MessageBreak of `\string\section` etc.\MessageBreak @@ -3235,14 +3289,16 @@ 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'\MessageBreak + execute the elements of do-hooks:\MessageBreak + \space\space- `heading/postinit`,\MessageBreak + \space\space- `heading/branch/star`,\MessageBreak + \space\space- `heading/branch/nostar`,\MessageBreak and does always use `runin=bysign' and\MessageBreak `afterindent=bysign'% }% \let\scr@saved@startsection\@startsection \newcommand*{\scr@startsection}[6]{% + \ExecuteDoHook{heading/preinit/#1}% \kernel@ifstar {% \scr@saved@startsection{#1}{\numexpr #2\relax}{\glueexpr #3\relax}% {\glueexpr #4\relax}{\glueexpr #5\relax}{#6}*% @@ -3280,16 +3336,34 @@ \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}% + \ClassInfo{\KOMAClassName}{% + Usage of deprecated command `\string\At@startsection' + mapped to\MessageBreak + `\string\AddtoDoHook{heading/postinit} + {...\string\@gobble}'% + }% + \AddtoDoHook{heading/postinit}{\scr@doonlyifstyleofargis{#1}{section}}% +} +\newcommand*{\scr@doonlyifstyleofargis}[3]{% + \IfSectionCommandStyleIs{#3}{#2}{#1}{}% } \newcommand*{\Before@ssect}[1]{% - \@ifundefined{scr@preto@ssect@hook}{\let\scr@preto@ssect@hook\@empty}{}% - \l@addto@macro{\scr@preto@ssect@hook}{#1}% + \ClassInfo{\KOMAClassName}{% + Usage of deprecated command `\string\Before@ssect' + mapped to\MessageBreak + `\string\AddtoDoHook{heading/branch/star}% + {...\string\@gobble}'% + }% + \AddtoDoHook{heading/branch/star}{\scr@onlyifstyleofargis{#1}{section}}% } \newcommand*{\Before@sect}[1]{% - \@ifundefined{scr@preto@sect@hook}{\let\scr@preto@sect@hook\@empty}{}% - \l@addto@macro{\scr@preto@sect@hook}{#1}% + \ClassInfo{\KOMAClassName}{% + Usage of deprecated command `\string\Before@sect' + mapped to\MessageBreak + `\string\AddtoDoHook{heading/branch/nostar}% + {...\string\@gobble}'% + }% + \AddtoDoHook{heading/branch/nostar}{\scr@onlyifstyleofargis{#1}{section}}% } \newcommand{\scr@section@dblarg}[1]{% \kernel@ifnextchar[%] @@ -3310,10 +3384,22 @@ \expandafter\scr@startsection \fi } +\newcommand*{\UseNumberUsageError}[2]{% + \ClassError{\KOMAClassName}{% + \string\IfUseNumber\space not allowed% + }{% + You cannot use \string\IfUseNumber\space outside a heading.\MessageBreak + If you'd continue, I'll ignore both arguments, because I do not + know\MessageBreak + whether to use the first or the second argument.% + }% +} +\newcommand*{\IfUseNumber}[2]{}% +\let\IfUseNumber\UseNumberUsageError \newcommand*{\SecDef}[2]{\kernel@ifstar{#2}{\scr@section@dblarg{#1}}} \CheckCommand*{\secdef}[2]{\@ifstar{#2}{\@dblarg{#1}}} \let\secdef\SecDef -\def\@tempa#1#2#3#4#5#6[#7]#8{% +\def\scr@latex@sect#1#2#3#4#5#6[#7]#8{% \ifnum #2>\c@secnumdepth \let\@svsec\@empty \else @@ -3345,7 +3431,8 @@ #7}}% \fi \@xsect{#5}} -\ifx\@sect\@tempa\else +\ifx\@sect\scr@latex@sect\else + \let\scr@latex@sect\@sect \ClassWarning{\KOMAClassName}{% Unexpected definition of \string\@sect!\MessageBreak Please send information about this to\MessageBreak @@ -3359,6 +3446,7 @@ \else \scr@istest#7=\@nil \fi + \@currentusenumbertrue \if@scr@tempswa \setkeys{KOMAarg.section}{tocentry={#8},head={#8},reference={#8},#7}% \else @@ -3383,7 +3471,12 @@ \fi }% \let\IfUsePrefixLine\@secondoftwo - \ifnum \numexpr #2\relax>\c@secnumdepth + \ifcase + \if@currentusenumber + \ifnum \numexpr #2\relax>\c@secnumdepth \z@\else \@ne\fi + \else + \z@ + \fi \let\@svsec\@empty \else \refstepcounter{#1}% @@ -3393,8 +3486,15 @@ \ifdim \scr@sect@runin{\z@}{\p@}{\glueexpr #5\relax}>\z@ \begingroup + \ifx\@svsec\@empty + \let\IfUseNumber\@secondoftwo + \else + \let\IfUseNumber\@firstoftwo + \fi + \ExecuteDoHook{heading/begingroup/#1}% #6{\nobreak\interlinepenalty \@M \sectionlinesformat{#1}{\glueexpr #3\relax}\@svsec{#8}\@@par}% + \ExecuteDoHook{heading/endgroup/#1}% \endgroup \expandafter\csname #1mark\expandafter\endcsname\expandafter{\@currentheadentry}% \ifx\@currenttocentry\@empty\else @@ -3404,7 +3504,12 @@ \addtocentrydefault{#1}{##1}{##2}% }% }{}% - \ifnum \numexpr #2\relax>\c@secnumdepth + \ifcase + \if@currentusenumber + \ifnum \numexpr #2\relax>\c@secnumdepth \z@\else \@ne\fi + \else + \z@ + \fi \csname add#1tocentry\endcsname{}{\@currenttocentry}% \else \csname add#1tocentry\endcsname{\csname the#1\endcsname}{% @@ -3413,6 +3518,12 @@ \fi \else \def\@svsechd{% + \ifx\@svsec\@empty + \let\IfUseNumber\@secondoftwo + \else + \let\IfUseNumber\@firstoftwo + \fi + \ExecuteDoHook{heading/begingroup/#1}% #6{\nobreak\sectioncatchphraseformat{#1}{\glueexpr #3\relax}\@svsec{#8}}% \expandafter\csname #1mark\expandafter\endcsname \expandafter{\@currentheadentry}% @@ -3423,13 +3534,19 @@ \addtocentrydefault{#1}{####1}{####2}% }% }{}% - \ifnum \numexpr #2\relax>\c@secnumdepth + \ifcase + \if@currentusenumber + \ifnum \numexpr #2\relax>\c@secnumdepth \z@\else \@ne\fi + \else + \z@ + \fi \csname add#1tocentry\endcsname{}{\@currenttocentry}% \else \csname add#1tocentry\endcsname{\csname the#1\endcsname}{% \@currenttocentry}% \fi \fi + \ExecuteDoHook{heading/endgroup/#1}% }% \fi \let\IfUsePrefixLine\scr@IfUsePrefixLineWarning @@ -3461,6 +3578,7 @@ }% \FamilyKeyStateProcessed } +\FamilyInverseBoolKey[.section]{KOMAarg}{nonumber}{@currentusenumber} \newcommand*{\scr@istest}{} \def\scr@istest#1=#2\@nil{% \ifx\relax#2\relax\@scr@tempswafalse\else\@scr@tempswatrue\fi @@ -3472,7 +3590,7 @@ \newcommand{\sectioncatchphraseformat}[4]{% \hskip #2#3#4% } -\def\@tempa#1#2#3#4#5{% +\def\scr@latex@ssect#1#2#3#4#5{% \@tempskipa #3\relax \ifdim \@tempskipa>\z@ \begingroup @@ -3484,7 +3602,9 @@ \def\@svsechd{#4{\hskip #1\relax #5}}% \fi \@xsect{#3}} -\ifx\@ssect\@tempa\else +\ifx\@ssect\scr@latex@ssect +\else + \let\scr@latex@ssect\@ssect \ClassWarning{\KOMAClassName}{% Unexpected definition of \string\@ssect!\MessageBreak Please send information about this to\MessageBreak @@ -3494,7 +3614,7 @@ \fi \def\@ssect#1#2#3#4#5{% \scr@ifundefinedorrelax{scr@s@ct@@nn@m@}{% - \ClassWarning{\KOMAClassName}{incompatible usage of + \ClassWarning{\KOMAClassName}{Incompatible usage of \string\@ssect\space detected.\MessageBreak You've used the KOMA-Script implementation of \string\@ssect\MessageBreak @@ -3506,23 +3626,33 @@ \ifdim \scr@sect@runin{\z@}{\p@}{\glueexpr #3\relax}>\z@ \begingroup + \let\IfUseNumber\@secondoftwo + \edef\reserved@a{% + \noexpand\ExecuteDoHook{heading/begingroup/\scr@s@ct@@nn@m@}% + }\reserved@a #4{\nobreak\interlinepenalty \@M \expandafter\sectionlinesformat\expandafter{\scr@s@ct@@nn@m@}% {\glueexpr #1\relax}\@empty{#5}\@@par}% + \edef\reserved@a{% + \noexpand\ExecuteDoHook{heading/endgroup/\scr@s@ct@@nn@m@}% + }\reserved@a \endgroup \else \edef\@svsechd{% + \unexpanded{\let\IfUseNumber\@secondoftwo}% + \noexpand\ExecuteDoHook{heading/begingroup/\scr@s@ct@@nn@m@}% \unexpanded{#4}{% \noexpand\nobreak \noexpand\sectioncatchphraseformat{\scr@s@ct@@nn@m@}% \unexpanded{{\glueexpr #1\relax}\@empty{#5}}% }% + \noexpand\ExecuteDoHook{heading/endgroup/\scr@s@ct@@nn@m@}% }% \fi \let\scr@s@ct@@nn@m@\relax \@xsect{\glueexpr #3\relax}% } -\def\@tempa#1{% +\def\scr@latex@xsect#1{% \@tempskipa #1\relax \ifdim \@tempskipa>\z@ \par \nobreak @@ -3547,7 +3677,8 @@ \fi \ignorespaces } -\ifx\@xsect\@tempa\else +\ifx\@xsect\scr@latex@xsect\else + \let\scr@latex@xsect\@xsect \ClassWarning{\KOMAClassName}{% Unexpected definition of \string\@xsect!\MessageBreak Please send information about this to\MessageBreak @@ -3590,7 +3721,7 @@ } \newcommand*{\scr@IfUsePrefixLineWarning}[2]{% \ClassWarning{\KOMAClassName}{% - usage of \string\IfUsePrefixLine\space outside + Usage of \string\IfUsePrefixLine\space outside section command\MessageBreak style makes no sense, because the behaviour not only\MessageBreak depends on class options but also on the run-time\MessageBreak @@ -3985,7 +4116,11 @@ }% \DefineFamilyKey[.dsc]{KOMAarg}{tocstyle}{% \IfArgIsEmpty{##1}{% - \expandafter\let\csname scr@dte@\scr@dsc@current @style\endcsname + \@ifundefined{scr@dte@\scr@dsc@current @style}{}{% + \expandafter\let\csname scr@dte@\scr@dsc@current @style\endcsname + \relax + }% + \expandafter\let\csname scr@tso@\scr@dsc@current @style\endcsname \relax \FamilyKeyStateProcessed }{% @@ -3993,6 +4128,7 @@ \FamilyKeyStateUnknownValue }{% \@namedef{scr@dte@\scr@dsc@current @style}{##1}% + \@namedef{scr@tso@\scr@dsc@current @style}{##1}% \FamilyKeyStateProcessed }% }% @@ -4012,19 +4148,24 @@ \endgroup \@firstofone{% \@nameuse{scr@dsc@style@\@nameuse{scr@\scr@dsc@current @style}@options}% - \scr@ifundefinedorrelax{scr@dte@\scr@dsc@current @style}{% + \scr@ifundefinedorrelax{scr@tso@\scr@dsc@current @style}{% \scr@ifundefinedorrelax{l@\scr@dsc@current}{% - \@namedef{scr@dte@\scr@dsc@current @style}{default}% + \@namedef{scr@tso@\scr@dsc@current @style}{default}% }{}% }{}% \let\scr@dsc@tocstyle@options\@empty \let\scr@dsc@extra@relax@opts\@empty - \scr@ifundefinedorrelax{scr@dte@\scr@dsc@current @style}{}{% + \scr@ifundefinedorrelax{scr@tso@\scr@dsc@current @style}{% + \expandafter\let + \csname scr@tso@\scr@dsc@current @style\expandafter\endcsname + \csname scr@dte@\scr@dsc@current @style\endcsname + }{}% + \scr@ifundefinedorrelax{scr@tso@\scr@dsc@current @style}{}{% \begingroup \def\scr@dte@current{#2}% \edef\reserved@a{% \noexpand\@ExecuteTOCEntryStyleInitCode{% - \@nameuse{scr@dte@\scr@dsc@current @style}% + \@nameuse{scr@tso@\scr@dsc@current @style}% }{\scr@dsc@current}% }\reserved@a \def\do@endgroup{\endgroup}% @@ -4132,10 +4273,26 @@ \def\local@endgroup{\endgroup}% \scr@ifundefinedorrelax{\scr@dsc@current numdepth}{% \scr@declaresectioncommanderror{\scr@dsc@current}{section level}{level}% - }{}% - \@nameuse{scr@dsc@style@% - \@nameuse{scr@\scr@dsc@current @style}% - @neededoptionstest}% + }{% + \expandafter\ifnum \csname #2numdepth\endcsname>-\maxdimen + \@nameuse{scr@dsc@style@% + \@nameuse{scr@\scr@dsc@current @style}% + @neededoptionstest}% + \else + \ClassError{\KOMAClassName}{% + `level' must be > -\the\numexpr\maxdimen\relax + }{% + KOMA-Script internally sets `secnumdepth' to + -\the\numexpr\maxdimen\relax\space + to locally switch of\MessageBreak + the numbering, i.e., inside running heads.\MessageBreak + Because of this, you can define section commands with\MessageBreak + `level' greater than -\the\numexpr\maxdimen\relax\space only.% + }% + \let\local@endgroup\endgroup + \aftergroup\@gobbletwo + \fi + }% \local@endgroup \@firstofone{% \@ifundefined{c@#2}{\newcounter{#2}}{}% @@ -4193,10 +4350,14 @@ \csname add#2tocentry\endcsname[2]{% \addtocentrydefault{#2}{##1}{##2}% }% - \scr@ifundefinedorrelax{scr@dte@#2@style}{% + \scr@ifundefinedorrelax{scr@tso@#2@style}{% + \expandafter\let\csname scr@tso@#2@style\expandafter\endcsname + \csname scr@dte@#2@style\endcsname + }{}% + \scr@ifundefinedorrelax{scr@tso@#2@style}{% }{% \DeclareTOCStyleEntry[\scr@dsc@tocstyle@options]{% - \@nameuse{scr@dte@#2@style}% + \@nameuse{scr@tso@#2@style}% }{#2}% }% \scr@ifundefinedorrelax{l@#2}{% @@ -4478,6 +4639,30 @@ \let\scr@local@leveloffset\relax \let\scr@local@tocleveloffset\relax } +\newcommand*{\IfSectionCommandStyleIs}[2]{% + \scr@ifundefinedorrelax{#1}{% + \ClassError{\KOMAClassName}{% + \expandafter\string\csname #1\endcsname\space not defined}{% + You cannot compare the section command style of an undefined command.}% + }{% + \scr@ifundefinedorrelax{scr@#1@style}{% + \ClassError{\KOMAClassName}{% + \expandafter\string\csname #1\endcsname\space not a valid section + command% + }{% + You cannot detect the section command style of a command, that + has\MessageBreak + never been defined as a section command by KOMA-Script.% + }% + }% + }% + \scr@ifundefinedorrelax{scr@dsc@def@style@#2@command}{% + \ClassError{\KOMAClassName}{% + unknown section command style `#2'% + }{}% + }% + \ifstr{\@nameuse{scr@#1@style}}{#2}% +} \newcommand*{\use@preamble}[1]{% \@ifundefined{#1@preamble}{}{% \@nameuse{#1@preamble}% @@ -4588,6 +4773,21 @@ } \newcommand*{\bprot@dottedtocline}[5]{% \expandafter\ifnum\scr@v@is@gt{2.96}\relax + \ClassWarning{\KOMAClassName}{% + usage of `\string\bprot@dottedtocline' is deprecated.\MessageBreak + Maybe an old auxiliary file has been used.\MessageBreak + Note, this command will be removed from\MessageBreak + KOMA-Script soon. So if this warning message\MessageBreak + persists after one more LaTeX run, you should\MessageBreak + redeclare the corresponding ToC entries using\MessageBreak + \string\DeclareTOCStyleEntry[\MessageBreak + \space\space level=\detokenize{#1},\MessageBreak + \space\space indent=\detokenize{#2},\MessageBreak + \space\space numwidth=\detokenize{#3}]{default}{...},\MessageBreak + where `...' is the name of the ToC level.\MessageBreak + Note, in future usage of `\string\bprot@dottedtocline'\MessageBreak + could result in an error% + }% \ifnum #1>\c@tocdepth \else \ifnum \lastpenalty<\numexpr 20010-#1\relax \addpenalty{\@lowpenalty}% @@ -4638,6 +4838,7 @@ \csname appendixmore\endcsname } \newcommand*{\scr@startpart}[1]{% + \ExecuteDoHook{heading/preinit/#1}% \if@openright\cleardoublepage\else\clearpage\fi \scr@ifundefinedorrelax{#1pagestyle}{}{% \ifstr{#1pagestyle}{}{}{% @@ -4661,6 +4862,7 @@ \fi }% }% + \ExecuteDoHook{heading/postinit/#1}% \partheadstartvskip \vbox to\z@{\vss\use@preamble{#1@o}\strut\par}% \vskip-\baselineskip\nobreak @@ -4668,11 +4870,13 @@ } \newcommand{\scr@@startpart}{} \long\def\scr@@startpart#1[#2]#3{% + \ExecuteDoHook{heading/branch/nostar/#1}% \ifnum \scr@osectarg=\z@ \@scr@tempswafalse \else \scr@istest#2=\@nil \fi + \@currentusenumbertrue \if@scr@tempswa \setkeys{KOMAarg.section}{tocentry={#3},head={#3},reference={#3},#2}% \else @@ -4716,8 +4920,9 @@ \fi }% \begingroup - \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative \def\IfUseNumber{\ifnumbered{#1}}% + \ExecuteDoHook{heading/begingroup/#1}% + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative \raggedpart \normalfont\usekomafont{disposition}{\nobreak \IfUseNumber{% @@ -4739,18 +4944,21 @@ \csname #1mark\expandafter\endcsname\expandafter{\@currentheadentry}% \fi }% + \ExecuteDoHook{heading/endgroup/#1}% \endgroup \@nameuse{@end#1}% \@afterheading } \newcommand{\scr@@startspart}[2]{% + \ExecuteDoHook{heading/branch/star/#1}% \begingroup \let\@mkboth\@gobbletwo \hy@insteadofrefstepcounter{#1}% \endgroup \begingroup - \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative \let\IfUseNumber\@secondoftwo + \ExecuteDoHook{heading/begingroup/#1}% + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative \raggedpart \normalfont\usekomafont{disposition}{% \nobreak @@ -4759,6 +4967,7 @@ }% \@mkboth{}{}% }% + \ExecuteDoHook{heading/endgroup/#1}% \endgroup \@nameuse{@end#1}% } @@ -4777,24 +4986,26 @@ } \newcommand*{\hy@insteadofrefstepcounter}[1]{} \let\hy@insteadofrefstepcounter\@gobble -\BeforePackage{hyperref}{% +\newcommand*{\scr@chapter@before@hyperref@patch}{% \let\scr@orig@chapter\@chapter \let\scr@orig@schapter\@schapter \let\scr@orig@addchap\@addchap } -\AfterPackage!{hyperref}{% +\BeforePackage{hyperref}{\scr@chapter@before@hyperref@patch} +\newcommand*{\scr@chapter@after@hyperref@patch}{% \let\@chapter\scr@orig@chapter \let\@schapter\scr@orig@schapter \let\@addchap\scr@orig@addchap \ifx\hy@insteadofrefstepcounter\@gobble \renewcommand*{\hy@insteadofrefstepcounter}[1]{% - \Hy@MakeCurrentHrefAuto{#1*}% + \Hy@MakeCurrentHrefAuto{##1*}% \Hy@raisedlink{% \hyper@anchorstart{\@currentHref}\hyper@anchorend }% }% \fi } +\AfterPackage!{hyperref}{\scr@chapter@after@hyperref@patch} \newcommand*{\addparttocentry}[2]{% \addtocentrydefault{part}{#1}{#2}% } @@ -4837,6 +5048,7 @@ \newkomafont{partentry}{\usekomafont{disposition}\large} \newkomafont{partentrypagenumber}{} \newcommand*{\scr@startchapter}[1]{% + \ExecuteDoHook{heading/preinit/#1}% \if@openright\cleardoublepage\else\clearpage\fi \scr@ifundefinedorrelax{#1pagestyle}{}{% \ifstr{#1pagestyle}{}{}{% @@ -4855,15 +5067,18 @@ }% }% }% + \ExecuteDoHook{heading/postinit/#1}% \expandafter\SecDef\csname @#1\expandafter\endcsname\csname @s#1\endcsname } \newcommand*{\scr@@startchapter}{} \def\scr@@startchapter#1[#2]#3{% + \ExecuteDoHook{heading/branch/nostar/#1}% \ifnum \scr@osectarg=\z@ \@scr@tempswafalse \else \scr@istest#2=\@nil \fi + \@currentusenumbertrue \if@scr@tempswa \setkeys{KOMAarg.section}{tocentry={#3},head={#3},reference={#3},#2}% \else @@ -4934,6 +5149,7 @@ \@afterheading } \newcommand*{\scr@@startschapter}[2]{% + \ExecuteDoHook{heading/branch/star/#1}% \begingroup \let\@mkboth\@gobbletwo \hy@insteadofrefstepcounter{#1}% @@ -4976,14 +5192,15 @@ }% \chapterheadstartvskip {% - \setlength{\parindent}{\z@}\setlength{\parfillskip}{\z@ plus 1fil}% \def\IfUseNumber{\ifnumbered{#1}}% \if@mainmatter\else\let\IfUseNumber\@secondoftwo\fi + \ExecuteDoHook{heading/begingroup/#1}% \if@chapterprefix \let\IfUsePrefixLine\@firstoftwo \else \let\IfUsePrefixLine\@secondoftwo \fi + \setlength{\parindent}{\z@}\setlength{\parfillskip}{\z@ plus 1fil}% \normalfont\usekomafont{disposition}{% \usekomafont{#1}{% \settoheight{\@tempskipa}{% @@ -5016,6 +5233,7 @@ }% }% }% + \ExecuteDoHook{heading/endgroup/#1}% }% \nobreak\par\nobreak \@tempskipa=\glueexpr \csname scr@#1@afterskip\endcsname\relax\relax @@ -5031,13 +5249,14 @@ }% \chapterheadstartvskip {% - \setlength{\parindent}{\z@}\setlength{\parfillskip}{\z@ plus 1fil}% \let\IfUseNumber\@secondoftwo + \ExecuteDoHook{heading/begingroup/#1}% \if@chapterprefix \let\IfUsePrefixLine\@firstoftwo \else \let\IfUsePrefixLine\@secondoftwo \fi + \setlength{\parindent}{\z@}\setlength{\parfillskip}{\z@ plus 1fil}% \normalfont\usekomafont{disposition}{% \usekomafont{#1}{% \raggedchapter @@ -5052,6 +5271,7 @@ }% }% }% + \ExecuteDoHook{heading/endgroup/#1}% }% \nobreak\par\nobreak \@tempskipa=\glueexpr \csname scr@#1@afterskip\endcsname\relax\relax @@ -5248,9 +5468,7 @@ } \newcounter{section}[chapter] \renewcommand*\thesection{% - \ifnum \scr@compatibility>\@nameuse{scr@v@2.97d} % the space before this - % comment should be \relax but hyperref has a - % not documented problem with \relax + \expandafter\ifnum\scr@v@is@gt{2.97d}% \if@mainmatter\thechapter.\fi \else \thechapter.% @@ -5367,7 +5585,7 @@ \fi \newcommand*{\scr@fnt@disposition}{\sectfont} \aliaskomafont{sectioning}{disposition} -%%% From File: $Id: scrkernel-miscellaneous.dtx 2995 2018-07-18 06:46:34Z kohm $ +%%% From File: $Id: scrkernel-miscellaneous.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \newif\if@restonecol \newcommand{\dictum}[2][]{\par% @@ -5397,7 +5615,7 @@ \setlength\fboxrule{.4\p@} \@addtoreset{equation}{chapter} \renewcommand*\theequation{% - \expandafter\ifnum\scr@v@is@gt{2.97d}\relax + \expandafter\ifnum\scr@v@is@gt{2.97d}% \if@mainmatter\thechapter.\fi \else \thechapter.% @@ -5528,12 +5746,27 @@ `parskip' with one of it's several values} \scr@package@not@recommended{titleps}{% package `scrlayer-scrpage'} -\scr@package@not@recommended{titlesec}{% - the package only\MessageBreak - if you really need it, because it breaks several\MessageBreak - KOMA-Script features, i.e., option `headings' and\MessageBreak - the extended optional argument of the section\MessageBreak - commands} +\AfterPackage*{sectsty}{% + \@ifpackagelater{sectsty}{2002/02/26}{% + \ClassInfo{\KOMAClassName}{Unknown `sectsty' release.\MessageBreak + Cross your fingers, that is compatible% + }% + }{% + \ClassWarning{\KOMAClassName}{% + Incompatible package `sectsty' loaded!\MessageBreak + Package `sectsty' up to version 2.0.2 is incompatible\MessageBreak + with KOMA-Script from version 2.8e released in 2001.\MessageBreak + You should avoid that package and configure the\MessageBreak + section titles of your document using the KOMA-Script\MessageBreak + user interface, e.g., \string\chapterlinesformat,\MessageBreak + \string\RedeclareSectionCommand\space etc. or you should ask\MessageBreak + the `sectsty' maintainer for a more compatible release.\MessageBreak + Ignoring this warning could result in several error\MessageBreak + messages and formatting issues after loading package\MessageBreak + `sectsty'% + }% + }% +} \scr@package@not@recommended{tocbibind}{% options like `listof=totoc'\MessageBreak or `bibliography=totoc', or commands like\MessageBreak @@ -5651,75 +5884,35 @@ \let\scr@mt@saved@sect\relax \fi } -\BeforePackage{titlesec}{% - \let\scr@ttl@saved@section\section - \let\scr@ttl@saved@subsection\subsection - \let\scr@ttl@saved@subsubsection\subsubsection - \let\scr@ttl@saved@paragraph\paragraph - \let\scr@ttl@saved@subparagraph\subparagraph -} \AfterPackage{titlesec}{% - \@ifpackagelater{titlesec}{2016/03/22}{% - \ClassInfo{\KOMAClassName}{% - Deactivating the `titlesec' workaround,\MessageBreak - because package is newer than expected% + \@ifpackagelater{titlesec}{2019/07/17}{% + \ClassInfo{\KOMAClassName}{Unknown `titesec' release.\MessageBreak + Cross your fingers, that is compatible% }% }{% - \ClassWarning{\KOMAClassName}{% - Activating an ugly workaround for a missing\MessageBreak - feature of package `titlesec`% - }% - \def\scr@ttl@@extract#1\scr@startsection#2#3#4#5#6#7#8{% - \@tempskipa=#5 - \@tempskipb=#6 - \ifdim\@tempskipa<\z@ - \toks@{\titlespacing*#8{#4}}% - \@tempskipa-\@tempskipa - \else - \toks@{\titlespacing#8{#4}}% - \fi - \@ifundefined{ttl@space}{}{% - \ttl@assign\@tempskipa*\ttl@space\relax\beforetitleunit}% - \ifdim\@tempskipb<\z@ - \if@tempswa - \titleformat#8[runin]% - {\ttl@fonts\ttl@sizes{#3}}{\@seccntformat{#2}}% - {\z@}\ttl@passexplicit - \else - \titleformat#8[runin]% - {#7}{\@seccntformat{#2}}% - {\z@}\ttl@passexplicit - \fi - \@tempskipb-\@tempskipb - \else - \if@tempswa - \titleformat#8% - {\ttl@fil\ttl@fonts\ttl@sizes{#3}}{\@seccntformat{#2}}% - {\z@}\ttl@passexplicit - \else - \titleformat#8% - {#7}{\@seccntformat{#2}}% - {\z@}\ttl@passexplicit - \fi - \@ifundefined{ttl@space}{}{% - \ttl@assign\@tempskipb*\ttl@space\relax\aftertitleunit}% - \fi - \edef\ttl@a{\the\toks@{\the\@tempskipa}{\the\@tempskipb}} - \ttl@a}% - \expandafter\scr@ttl@@extract\scr@ttl@saved@section\section - \expandafter\scr@ttl@@extract\scr@ttl@saved@subsection\subsection - \expandafter\scr@ttl@@extract\scr@ttl@saved@subsubsection\subsubsection - \expandafter\scr@ttl@@extract\scr@ttl@saved@paragraph\paragraph - \expandafter\scr@ttl@@extract\scr@ttl@saved@subparagraph\subparagraph - \let\scr@ttl@saved@section\relax - \let\scr@ttl@saved@subsection\relax - \let\scr@ttl@saved@subsubsection\relax - \let\scr@ttl@saved@paragraph\relax - \let\scr@ttl@saved@subparagraph\relax - \let\scr@ttl@@extract\relax + \scr@class@titlesec@warning + }% +} +\providecommand*{\scr@class@titlesec@warning}{% + \ClassWarning{\KOMAClassName}{% + Usage of this version of package `titlesec'\MessageBreak + with KOMA-Script class `\KOMAClassName' is\MessageBreak + not recommended, because the package does not\MessageBreak + support KOMA-Script classes, but break them.\MessageBreak + If you want to use `titlesec' with KOMA-Script\MessageBreak + classes instead of using the KOMA-Script's\MessageBreak + user interface to configure the headings of\MessageBreak + parts, + chapters, sections + ... subparagraphs,\MessageBreak + please ask the author of `titlesec' for support.\MessageBreak + Expect errors like:\MessageBreak + \space\space- ``Illegal unit of measure (pt inserted).''\MessageBreak + \space\space- ``Missing number, treated as zero''\MessageBreak + after loading `titlesec'% }% } -%%% From File: $Id: scrkernel-pagestyles.dtx 2640 2017-05-08 09:36:55Z kohm $ +%%% From File: $Id: scrkernel-pagestyles.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \newcommand*{\set@tempdima@hw}{% \setlength{\@tempdima}{\textwidth}% @@ -5820,7 +6013,7 @@ \newcommand*{\indexpagestyle}{plain} \pagestyle{headings} \pagenumbering{arabic} -%%% From File: $Id: scrlayer.dtx 3015 2018-09-03 10:51:32Z kohm $ +%%% From File: $Id: scrlayer.dtx 3196 2019-08-26 09:20:16Z kohm $ %%% (run: body) \providecommand*{\@mkleft}{% \IfActiveMkBoth{\markleft}{\@gobble}% @@ -5831,7 +6024,7 @@ \providecommand*{\@mkdouble}[1]{% \@mkboth{#1}{#1}% } -%%% From File: $Id: scrkernel-floats.dtx 2701 2017-11-15 14:02:01Z kohm $ +%%% From File: $Id: scrkernel-floats.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \newcommand\marginline[1]{% \marginpar[\raggedleft{#1}]{\raggedright #1}% @@ -6616,7 +6809,7 @@ } ]{lof} \renewcommand*\thefigure{% - \expandafter\ifnum\scr@v@is@gt{2.97d}\relax + \expandafter\ifnum\scr@v@is@gt{2.97d}% \if@mainmatter\thechapter.\fi \else \thechapter.% @@ -6637,14 +6830,14 @@ } ]{lot} \renewcommand*\thetable{% - \expandafter\ifnum\scr@v@is@gt{2.97d}\relax + \expandafter\ifnum\scr@v@is@gt{2.97d}% \if@mainmatter\thechapter.\fi \else \thechapter.% \fi \@arabic\c@table } -%%% From File: $Id: scrkernel-footnotes.dtx 2979 2018-04-17 06:01:18Z kohm $ +%%% From File: $Id: scrkernel-footnotes.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \renewcommand*\footnoterule{% \normalsize\ftn@rule@test@values @@ -6803,7 +6996,7 @@ \endgroup \@footnotemark } -%%% From File: $Id: scrkernel-listsof.dtx 2864 2018-01-16 07:55:20Z kohm $ +%%% From File: $Id: scrkernel-listsof.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \g@addto@macro{\numberline@numberpostfix}{\autodot} \usetocbasicnumberline[% @@ -6815,9 +7008,6 @@ \AtAddToTocList[float]{% \setuptoc{\@currext}{chapteratlist}% } -\newcommand*\@pnumwidth{1.55em} -\newcommand*\@tocrmarg {2.55em} -\newcommand*\@dotsep{4.5} \newcommand*{\scr@dottedtocline}{} \newcommand*{\last@l@number}{} \newcommand*{\@l@number}{} @@ -6868,7 +7058,7 @@ \protected@write\@auxout{}{% \string\gdef\expandafter\string\csname#1@l@number\endcsname{% \@l@number}}% - } +} \g@addto@macro\tocbasic@@before@hook{% \if@dynlist\expandafter\before@starttoc\expandafter{\@currext}\fi } @@ -6877,6 +7067,8 @@ } \newcommand*\contentsname{Contents} \newcommand*\listoftocname{\contentsname} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\contentsname{Contents}% \setcounter{tocdepth}{2} \newcommand*\toc@heading{% \ClassWarning{\KOMAClassName}{% @@ -6945,12 +7137,16 @@ \global\let\scr@float@addtolists@warning\relax } \renewcommand*\listfigurename{List of Figures} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\listfigurename{List of Figures} \renewcommand*\listoflofname{\listfigurename} \renewcommand*\listoflofentryname{\figurename} \renewcommand*\listtablename{List of Tables} +\providecaptionname{american,australian,british,canadian,english,newzealand,% + UKenglish,ukenglish,USenglish,usenglish}\listtablename{List of Tables} \renewcommand*\listoflotname{\listtablename} \renewcommand*\listoflotentryname{\tablename} -%%% From File: $Id: scrkernel-bibliography.dtx 3016 2018-09-03 11:40:59Z kohm $ +%%% From File: $Id: scrkernel-bibliography.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \newcommand*\bibname{Bibliography} \newcommand*{\bibpreamble}{\relax} @@ -7036,7 +7232,7 @@ } \newcommand{\AfterBibliographyPreamble}{\g@addto@macro\bib@before@hook} \newcommand{\AtEndBibliography}{\g@addto@macro\bib@after@hook} -%%% From File: $Id: scrkernel-index.dtx 3016 2018-09-03 11:40:59Z kohm $ +%%% From File: $Id: scrkernel-index.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \newcommand*{\index@preamble}{} \let\index@preamble=\relax @@ -7077,7 +7273,7 @@ \par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax } \newcommand*\indexname{Index} -%%% From File: $Id: scrkernel-listsandtabulars.dtx 2640 2017-05-08 09:36:55Z kohm $ +%%% From File: $Id: scrkernel-listsandtabulars.dtx 3262 2019-10-10 08:25:29Z kohm $ %%% (run: body) \if@twocolumn \setlength{\leftmargini}{2em} |