summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/tocbasic.dtx')
-rw-r--r--Master/texmf-dist/source/latex/koma-script/tocbasic.dtx95
1 files changed, 77 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx b/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx
index 3f472994ac8..eb3513966e6 100644
--- a/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx
+++ b/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx
@@ -1,4 +1,4 @@
-% \CheckSum{1564}
+% \CheckSum{1612}
% \iffalse meta-comment
% ======================================================================
% tocbasic.dtx
@@ -55,7 +55,7 @@
% Right brace \} Tilde \~}
%
% \iffalse
-%%% From File: $Id: tocbasic.dtx 2640 2017-05-08 09:36:55Z kohm $
+%%% From File: $Id: tocbasic.dtx 2709 2017-11-21 08:03:52Z kohm $
%<identify>%%% (run: identify)
%<prepare>%%% (run: prepare)
%<option>%%% (run: option)
@@ -66,7 +66,7 @@
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
\def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
- \filedate$Date: 2017-05-08 11:36:55 +0200 (Mon, 08 May 2017) $
+ \filedate$Date: 2017-11-21 09:03:52 +0100 (Tue, 21 Nov 2017) $
\def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
\filerevision$Revision: 1962 $
\endgroup
@@ -827,6 +827,39 @@
% \end{macro}
% \end{macro}
%
+% \changes{v3.25}{2017/11/21}{\textsf{tocbibind} warning added}^^A
+% Using \textsf{tocbibind} and \textsf{tocbasic} together can break features
+% either of \textsf{tocbibind} or \textsf{tocbasic}. Here we add at least a
+% warning:
+% \begin{macrocode}
+\@ifpackageloaded{tocbibind}{}{%
+ \AtBeginDocument{%
+ \@ifpackageloaded{tocbibind}{%
+ \PackageInfo{tocbasic}{usage of `tocbibind' detected}%
+ \newcommand*{\tb@tocbibindpatch}[3]{%
+ \long\def\reserved@a{\tocfile{#2}{#1} }%
+ \ifx #3\reserved@a
+ \PackageWarningNoLine{tocbasic}{%
+ `tocbibind' redefinition of `\string#3'\MessageBreak
+ detected.\MessageBreak
+ Note: Loading `tocbibind' without option `not#1'\MessageBreak
+ can break several features of `tocbasic'%
+ \scr@ifundefinedorrelax{KOMAClassName}{%
+ .\MessageBreak
+ Loading `tocbibind' before `tocbasic' would avoid\MessageBreak
+ this warning message%
+ }{}%
+ }%
+ \fi
+ }%
+ \tb@tocbibindpatch{toc}{\contentsname}{\tableofcontents}%
+ \tb@tocbibindpatch{lof}{\listfigurename}{\listoffigures}%
+ \tb@tocbibindpatch{lot}{\listtablename}{\listoftables}%
+ }{}%
+ }%
+}
+% \end{macrocode}
+%
% \begin{macro}{\listofname}
% While this is only an emergancy command, we don't support languages.
% \begin{macrocode}
@@ -1217,6 +1250,7 @@
}%
}{%
\ifstr{##1}{indent}{%
+%<trace>\typeout{TRACE \string\DeclareNewTOC[...]{#2}: set default indent 1em}%
\l@addto@macro\do@endgroup{%
\l@addto@macro{\tb@nt@tocstyle@options}{,indent=1em}%
}%
@@ -1265,6 +1299,17 @@
}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\tb@nt@ext}
+% \changes{v3.20}{2015/12/16}{local valid only}^^A
+% \changes{v3.25}{2017/11/20}{moved to pass 1}^^A
+% Don't tell the user, that the mandatory argument of the command may be
+% overloaded by this option. This was only done to simplify the definition.
+% \begin{macrocode}
+ \DefineFamilyKey[.toc]{KOMAarg}{extension}{%
+ \tb@ifvalueisnotempty{##1}{\edef\tb@nt@ext{##1}}%
+ }%
+% \end{macrocode}
+% \end{macro}
% After this we define pseudo option \texttt{@else@} to ignore all currently
% not needed options. After this we do the first option execution run.
% \begin{macrocode}
@@ -1277,6 +1322,7 @@
% \begin{macrocode}
\DefineFamilyKey[.toc]{KOMAarg}{type}{\FamilyKeyStateProcessed}%
\DefineFamilyKey[.toc]{KOMAarg}{tocentrystyle}{\FamilyKeyStateProcessed}%
+ \DefineFamilyKey[.toc]{KOMAarg}{extension}{\FamilyKeyStateProcessed}%
% \end{macrocode}
% \changes{v3.20}{2015/12/16}{defining toc style depending options}^^A
% \changes{v3.20}{2016/06/12}{using prefix \texttt{tocentry} instead of
@@ -1365,16 +1411,6 @@
}%
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\tb@nt@ext}
-% \changes{v3.20}{2015/12/16}{local valid only}^^A
-% Don't tell the user, that the mandatory argument of the command may be
-% overloaded by this option. This was only done to simplify the definition.
-% \begin{macrocode}
- \DefineFamilyKey[.toc]{KOMAarg}{extension}{%
- \tb@ifvalueisnotempty{##1}{\edef\tb@nt@ext{##1}}%
- }%
-% \end{macrocode}
-% \end{macro}
% \begin{macro}{\iftb@nt@float}
% \changes{v3.20}{2015/12/16}{local valid only}^^A
% \changes{v3.06}{2010/06/01}{new internal}
@@ -1473,6 +1509,7 @@
\FamilyKeyStateProcessed
}%
\scr@ifundefinedorrelax{KV@KOMAarg.toc@tocindent}{}{%
+%<trace>\typeout{TRACE \string\DeclareNewTOC[...]{#2}: set default indent 1em}%
\l@addto@macro\tb@nt@tocstyle@options{,indent=1em}%
}%
% \end{macrocode}
@@ -1542,13 +1579,32 @@
}%
% \end{macrocode}
% \end{macro}
+% \changes{v3.25}{2017/11/20}{new (internal)}
+% The new option \texttt{setup} allowes to setup ToC features provided by
+% \cs{setuptoc}. Note, currently there is no test whether or not a feature
+% does exist!
+% \begin{macrocode}
+ \DefineFamilyKey[.toc]{KOMAarg}{setup}{%
+ \setuptoc\tb@nt@ext{##1}%
+ }%
+% \end{macrocode}
+% \changes{v3.25}{2017/11/20}{new (internal)}
+% The new option \texttt{unset} allowes to unset ToC features provided
+% by \cs{unsettoc}. Note, currently there is no test whether or not a feature
+% does exist!
+% \begin{macrocode}
+ \DefineFamilyKey[.toc]{KOMAarg}{unset}{%
+ \unsettoc\tb@nt@ext{##1}%
+ }%
+% \end{macrocode}
% Last but not least we have to execute the options and reset the option
% definitions.
+% \changes{v3.25}{2017/09/27}{\texttt{nonfloat} fixed}^^A
% \begin{macrocode}
\FamilyExecuteOptions[.toc]{KOMAarg}{#1}%
\RelaxFamilyKey[.toc]{KOMAarg}{types}%
\RelaxFamilyKey[.toc]{KOMAarg}{owner}%
- \RelaxFamilyKey[.toc]{KOMAarg}{nonfload}%
+ \RelaxFamilyKey[.toc]{KOMAarg}{nonfloat}%
\RelaxFamilyKey[.toc]{KOMAarg}{name}%
\RelaxFamilyKey[.toc]{KOMAarg}{listname}%
\RelaxFamilyKey[.toc]{KOMAarg}{level}%
@@ -1566,7 +1622,7 @@
\RelaxFamilyKey[.toc]{KOMAarg}{type}%
}%
% \end{macrocode}
-% First of all, every TOC needs a extension, that should be added to the
+% First of all, every TOC needs an extension, that should be added to the
% list of known extensions.
% \begin{macrocode}
\expandafter\newcommand\csname ext@\tb@nt@type\endcsname{}%
@@ -1579,6 +1635,8 @@
\expandafter\let\csname tb@nt@type@\tb@nt@ext\endcsname\tb@nt@type
% \end{macrocode}
% Then we need the TOC itself with a name:
+% \changes{v3.25}{2017/10/10}{use \cs{ext@\dots} instead of the extension
+% itself in definition of \cs{listof\dots}}^^A
% \begin{macrocode}
\scr@ifundefinedorrelax{tb@nt@types}{%
\edef\tb@nt@types{\tb@nt@type s}%
@@ -1605,7 +1663,8 @@
\expandafter{\csname list\tb@nt@type name\endcsname}%
\begingroup\edef\@tempa{\endgroup
\noexpand\newcommand*\csname listof\tb@nt@types\endcsname{%
- \noexpand\listoftoc{\tb@nt@ext}%
+ \noexpand\listoftoc{%
+ \expandafter\noexpand\csname ext@\tb@nt@type\endcsname}%
}%
}\@tempa
% \end{macrocode}
@@ -1832,11 +1891,11 @@
%</chapter>
% \end{macrocode}
% Tell the package, what files are used:
+% \changes{v3.25}{2017/10/10}{extension \texttt{lof} not added explicitely}^^A
+% \changes{v3.25}{2017/10/10}{extension \texttt{lot} not added explicitely}^^A
% \begin{macrocode}
\addtotoclist{toc}
\ifstr{\ext@toc}{toc}{}{\expandafter\addtotoclist\expandafter{\ext@toc}}
-\addtotoclist[float]{lof}
-\addtotoclist[float]{lot}
% \end{macrocode}
%</class>
%</load>