summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/tocbasic.sty')
-rw-r--r--Master/texmf-dist/tex/latex/koma-script/tocbasic.sty161
1 files changed, 91 insertions, 70 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty b/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
index 9fe7c231f75..3c29e69e64b 100644
--- a/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
+++ b/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
@@ -52,26 +52,49 @@
%% find a complete unmodified copy of LaTeX2e at
%% <http://mirror.ctan.org/tex-archive/macros/latex/base/>.
%%
-%%% 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 $
%%% (run: identify)
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{tocbasic}[%
- 2018/03/30 v3.25 KOMA-Script
+ 2018/12/30 v3.26a KOMA-Script
package
(handling toc-files)%
]
-%%% 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 $
%%% (run: prepare)
-%%% 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: tocbasic.dtx 2709 2017-11-21 08:03:52Z kohm $
+%%% From File: $Id: tocbasic.dtx 3050 2018-12-30 14:36:55Z kohm $
%%% (run: option)
\ProcessOptions\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: option)
-%%% 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 $
%%% (run: body)
\RequirePackage{scrbase}
+\AfterPackage*{multitoc}{%
+ \@ifpackagelater{multitoc}{2018/08/31}{}{%
+ \PackageWarningNoLine{tocbasic}{%
+ Usage of package `multitoc' is not recommended!\MessageBreak
+ Note, this package generally results in empty ToCs\MessageBreak
+ for all extension but `toc', `lof' and `lot' and\MessageBreak
+ even for these extensions if you do not use the\MessageBreak
+ corresponding multitoc options.\MessageBreak
+ It is recommended to use:\MessageBreak
+ \space\space\string\usepackage{multicol}\MessageBreak
+ \space\space\string\BeforeStartingTOC{\string\begin{multicols}{2}}%
+ \MessageBreak
+ \space\space\string\AfterStartingTOC{\string\end{multicols}}%
+ \MessageBreak
+ instead of loading package `multitoc'.\MessageBreak
+ See the KOMA-Script manual for more information\MessageBreak
+ about using \string\BeforeStartingTOC\space and
+ \string\AfterStartingTOC\MessageBreak
+ and the multicol manual for more information\MessageBreak
+ about the `multicols' environment%
+ }%
+ }%
+}
\newcommand*{\tb@listoftocs}{}
\newcommand{\ifattoclist}[1]{%
\begingroup
@@ -342,7 +365,6 @@
\g@addto@macro\tocbasic@@before@hook{#2}%
\else
\@ifundefined{tb@#1@before@hook}{%
- \PackageInfo{tocbasic}{defining new hook before starting `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@before@hook\endcsname
\@empty
}{}%
@@ -354,7 +376,6 @@
\g@addto@macro\tocbasic@@after@hook{#2}%
\else
\@ifundefined{tb@#1@after@hook}{%
- \PackageInfo{tocbasic}{defining new hook after starting `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@after@hook\endcsname
\@empty
}{}%
@@ -453,11 +474,8 @@
\expandafter\addxcontentsline\expandafter{\ext@toc}%
{subsection}{##1}%
}{}%
- \@ifundefined{@mkright}{%
- \ifx\@mkboth\@gobbletwo\else\markright{\MakeMarkcase{##1}}\fi
- }{%
- \@mkright{\MakeMarkcase{##1}}%
- }%
+ \c@secnumdepth=-\maxdimen
+ \subsectionmark{##1}%
\endgroup
\ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
}%
@@ -489,34 +507,31 @@
\section{##1}%
}{%
\iftocfeature{\@currext}{totoc}{%
- \begingroup
- \@ifundefined{addsec}{%
- \section*{##1}%
- \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
- \begingroup
- \@ifundefined{@mkright}{%
- \ifx\@mkboth\@gobbletwo
- \else\markright{\MakeMarkcase{##1}}\fi
- }{%
- \@mkright{\MakeMarkcase{##1}}%
- }%
- \expandafter\addxcontentsline\expandafter{\ext@toc}%
- {section}{##1}%
- \endgroup
- \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
- }{%
- \addsec{##1}%
- }%
- \endgroup
+ \@ifundefined{addsec}{%
+ \section*{##1}%
+ \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
+ \begingroup
+ \@ifundefined{@mkright}{%
+ \IfActiveMkBoth{\markright{\MakeMarkcase{##1}}}{}%
+ }{%
+ \@mkright{\MakeMarkcase{##1}}%
+ }%
+ \expandafter\addxcontentsline\expandafter{\ext@toc}%
+ {section}{##1}%
+ \endgroup
+ \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
+ }{%
+ \addsec{##1}%
+ }%
}{%
\section*{##1}%
\ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
\begingroup
- \@ifundefined{@mkright}{%
- \ifx\@mkboth\@gobbletwo
- \else\markright{\MakeMarkcase{##1}}\fi
+ \@ifundefined{addsecmark}{%
+ \c@secnumdepth=-\maxdimen
+ \sectionmark{##1}%
}{%
- \@mkright{\MakeMarkcase{##1}}%
+ \addsecmark{##1}%
}%
\endgroup
\ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
@@ -553,7 +568,6 @@
}
\newcommand{\BeforeTOCHead}[2][]{%
\@ifundefined{tb@#1@beforehead@hook}{%
- \PackageInfo{tocbasic}{defining new hook before heading of `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@beforehead@hook\endcsname
\@empty
}{}%
@@ -561,7 +575,6 @@
}
\newcommand{\AfterTOCHead}[2][]{%
\@ifundefined{tb@#1@afterhead@hook}{%
- \PackageInfo{tocbasic}{defining new hook after heading of `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@afterhead@hook\endcsname
\@empty
}{}%
@@ -571,29 +584,16 @@
\@namedef{tocbasic@listhead@#1}##1}
\newcommand*{\setuptoc}[2]{%
\@for\@tempa:=#2\do{%
- \expandafter\tb@@sp@def\expandafter\@tempa\expandafter{\@tempa}%
+ \scr@trim@spaces\@tempa
\@namedef{tocbasic@#1@feature@\@tempa}{}%
}%
}
\newcommand*{\unsettoc}[2]{%
\@for\@tempa:=#2\do{%
- \expandafter\tb@@sp@def\expandafter\@tempa\expandafter{\@tempa}%
+ \scr@trim@spaces\@tempa
\expandafter\let\csname tocbasic@#1@feature@\@tempa\endcsname\relax
}%
}
-\def\@tempa#1{%
- \def\tb@@sp@def##1##2{%
- \futurelet\tb@sp@tempa\tb@@sp@d##2\@nil\@nil#1\@nil\relax##1}%
- \def\tb@@sp@d{%
- \ifx\tb@sp@tempa\@sptoken
- \expandafter\tb@@sp@b
- \else
- \expandafter\tb@@sp@b\expandafter#1%
- \fi}%
- \def\tb@@sp@b#1##1 \@nil{\tb@@sp@c##1}%
-}
-\@tempa{ }
-\def\tb@@sp@c#1\@nil#2\relax#3{\@temptokena{#1}\edef#3{\the\@temptokena}}
\setuptoc{toc}{nobabel}
\setuptoc{lof}{nobabel}
\setuptoc{lot}{nobabel}
@@ -678,12 +678,21 @@
\DefineFamilyKey[.toc]{KOMAarg}{extension}{%
\tb@ifvalueisnotempty{##1}{\edef\tb@nt@ext{##1}}%
}%
+ \DefineFamilyKey[.toc]{KOMAarg}{owner}{%
+ \tb@ifvalueisnotempty{##1}{\edef\tb@nt@owner{##1}}%
+ }%
\DefineFamilyKey[.toc]{KOMAarg}{@else@}{\FamilyKeyStateProcessed}%
\FamilyExecuteOptions[.toc]{KOMAarg}{#1}%
\RelaxFamilyKey[.toc]{KOMAarg}{@else@}%
+ }%
+ \expandafter\newcommand\csname ext@\tb@nt@type\endcsname{}%
+ \expandafter\let\csname ext@\tb@nt@type\endcsname\tb@nt@ext
+ \addtotoclist[\tb@nt@owner]{\csname ext@\tb@nt@type\endcsname}%
+ \IfArgIsEmpty{#1}{}{%
\DefineFamilyKey[.toc]{KOMAarg}{type}{\FamilyKeyStateProcessed}%
\DefineFamilyKey[.toc]{KOMAarg}{tocentrystyle}{\FamilyKeyStateProcessed}%
\DefineFamilyKey[.toc]{KOMAarg}{extension}{\FamilyKeyStateProcessed}%
+ \DefineFamilyKey[.toc]{KOMAarg}{owner}{\FamilyKeyStateProcessed}%
\ifstr{\tb@nt@tocentrystyle}{}{}{%
\begingroup
\let\scr@dte@current\tb@nt@type
@@ -810,9 +819,6 @@
\tb@ifvalueisnotempty{##1}{\edef\tb@nt@name{##1}}%
}%
\FamilyBoolKey[.toc]{KOMAarg}{nonfloat}{tb@nt@nonfloat}%
- \DefineFamilyKey[.toc]{KOMAarg}{owner}{%
- \tb@ifvalueisnotempty{##1}{\edef\tb@nt@owner{##1}}%
- }%
\DefineFamilyKey[.toc]{KOMAarg}{types}{%
\tb@ifvalueisnotempty{##1}{\edef\tb@nt@types{##1}}%
}%
@@ -823,8 +829,9 @@
\unsettoc\tb@nt@ext{##1}%
}%
\FamilyExecuteOptions[.toc]{KOMAarg}{#1}%
+ \RelaxFamilyKey[.toc]{KOMAarg}{unset}%
+ \RelaxFamilyKey[.toc]{KOMAarg}{setup}%
\RelaxFamilyKey[.toc]{KOMAarg}{types}%
- \RelaxFamilyKey[.toc]{KOMAarg}{owner}%
\RelaxFamilyKey[.toc]{KOMAarg}{nonfloat}%
\RelaxFamilyKey[.toc]{KOMAarg}{name}%
\RelaxFamilyKey[.toc]{KOMAarg}{listname}%
@@ -834,17 +841,15 @@
\RelaxFamilyKey[.toc]{KOMAarg}{forcenames}%
\RelaxFamilyKey[.toc]{KOMAarg}{floatpos}%
\RelaxFamilyKey[.toc]{KOMAarg}{float}%
- \RelaxFamilyKey[.toc]{KOMAarg}{extension}%
\RelaxFamilyKey[.toc]{KOMAarg}{counterwithin}%
\RelaxFamilyKey[.toc]{KOMAarg}{atend}%
\RelaxFamilyKey[.toc]{KOMAarg}{atbegin}%
\tb@nt@extra@relax@opts
+ \RelaxFamilyKey[.toc]{KOMAarg}{owner}%
+ \RelaxFamilyKey[.toc]{KOMAarg}{extension}%
\RelaxFamilyKey[.toc]{KOMAarg}{tocentrystyle}%
\RelaxFamilyKey[.toc]{KOMAarg}{type}%
}%
- \expandafter\newcommand\csname ext@\tb@nt@type\endcsname{}%
- \expandafter\let\csname ext@\tb@nt@type\endcsname\tb@nt@ext
- \addtotoclist[\tb@nt@owner]{\csname ext@\tb@nt@type\endcsname}%
\expandafter\let\csname tb@nt@type@\tb@nt@ext\endcsname\tb@nt@type
\scr@ifundefinedorrelax{tb@nt@types}{%
\edef\tb@nt@types{\tb@nt@type s}%
@@ -1011,7 +1016,7 @@
}%
}
\newcommand*{\tb@nt@autofloattype}{16}
-%%% 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)
\newcommand*{\scr@numberline}[1]{%
\numberline@box{%
@@ -1369,6 +1374,22 @@
\fi
}%
}
+\newcommand*{\DeclareTOCStyleEntries}[3][]{%
+ \edef\reserved@a{#3}%
+ \@for \reserved@a:=\reserved@a \do {%
+ \scr@trim@spaces\reserved@a
+ \ifx\reserved@a\@empty\else
+ \IfArgIsEmpty{#1}{%
+ \edef\reserved@a{%
+ \unexpanded{\DeclareTOCStyleEntry{#2}}{\reserved@a}}%
+ }{%
+ \edef\reserved@a{%
+ \unexpanded{\DeclareTOCStyleEntry[{#1}]{#2}}{\reserved@a}}%
+ }%
+ \reserved@a
+ \fi
+ }%
+}
\newcommand*{\DeclareTOCEntryStyle}[1]{%
\kernel@ifnextchar [%]
{\@DeclareTOCEntryStyle{#1}}%
@@ -1396,10 +1417,10 @@
\expandafter\let\csname scr@dte@#2@init\expandafter\endcsname
\csname scr@dte@#1@init\endcsname
}
-%%% 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: style,gobble)
\DeclareTOCEntryStyle{gobble}{}%
-%%% 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: style,dottedtocline)
\DeclareTOCEntryStyle{dottedtocline}[{%
\DefineTOCEntryLengthOption{indent}%
@@ -1528,7 +1549,7 @@
\@dottedtocline{\@nameuse{#1tocdepth}}{\@nameuse{scr@tso@#1@indent}}%
{\@nameuse{scr@tso@#1@numwidth}}{##1}{##2}%
}
-%%% 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: style,undottedtocline)
\DeclareTOCEntryStyle{undottedtocline}[{%
\DefineTOCEntryLengthOption{indent}%
@@ -1684,7 +1705,7 @@
\endgroup
\fi
}
-%%% 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: style, largetocline)
\DeclareTOCEntryStyle{largetocline}[{%
\DefineTOCEntryLengthOption{indent}%
@@ -1794,7 +1815,7 @@
\endgroup
\fi
}
-%%% 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: style,tocline)
\DeclareTOCEntryStyle{tocline}[{%
\DefineTOCEntryLengthOption{beforeskip}%
@@ -2237,10 +2258,10 @@
\mkern \@dotsep mu\hbox{#1}\mkern \@dotsep
mu$}\hfill
}
-%%% 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: style,dottedtocline)
\CloneTOCEntryStyle{dottedtocline}{default}
-%%% 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 $
%%% (run: exit)
\AtBeginDocument{%
\@ifundefined{MakeMarkcase}{%