summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/koma-script/source/tocbasic.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/koma-script/source/tocbasic.dtx')
-rw-r--r--macros/latex/contrib/koma-script/source/tocbasic.dtx121
1 files changed, 84 insertions, 37 deletions
diff --git a/macros/latex/contrib/koma-script/source/tocbasic.dtx b/macros/latex/contrib/koma-script/source/tocbasic.dtx
index fd90f4e8c5..4f42a82726 100644
--- a/macros/latex/contrib/koma-script/source/tocbasic.dtx
+++ b/macros/latex/contrib/koma-script/source/tocbasic.dtx
@@ -1,4 +1,4 @@
-% \CheckSum{1617}
+% \CheckSum{1643}
% \iffalse meta-comment
% ======================================================================
% tocbasic.dtx
@@ -55,7 +55,7 @@
% Right brace \} Tilde \~}
%
% \iffalse
-%%% From File: $Id: tocbasic.dtx 3256 2019-10-10 07:06:49Z kohm $
+%%% From File: $Id: tocbasic.dtx 3401 2019-11-22 07:30:48Z 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: 2019-10-10 09:06:49 +0200 (Thu, 10 Oct 2019) $
+ \filedate$Date: 2019-11-22 08:30:48 +0100 (Fri, 22 Nov 2019) $
\def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
\filerevision$Revision: 1962 $
\endgroup
@@ -282,13 +282,25 @@
% \end{macro}
%
% \begin{macro}{\ifattoclist}
+% \changes{v3.28}{2019/11/19}{renamed to \cs{Ifattoclist}}%^^A
+% \begin{macro}{\Ifattoclist}
+% \changes{v3.28}{2019/11/19}{renamed from \cs{ifattoclist}}%^^A
% This command tests, if an extension is already at the list of
% toc-files. The extension has to be the first argument. The second argument
% will be done, if the extension is already at the list of toc-files. The
% third argument will be done, if the extension is at the list of toc-files
% not yet.
% \begin{macrocode}
-\newcommand{\ifattoclist}[1]{%
+\providecommand*{\ifattoclist}{%
+ \PackageWarning{tocbasic}{Usage of deprecated command
+ `\string\ifattoclist'.\MessageBreak
+ The command has been renamed because of a\MessageBreak
+ recommendation of The LaTeX Project Team.\MessageBreak
+ Please replace `\string\ifattoclist' by `\string\Ifattoclist'%
+ }%
+ \Ifattoclist
+}
+\newcommand{\Ifattoclist}[1]{%
\begingroup
\def\do##1##2{%
\edef\reserved@a{##1}%
@@ -299,7 +311,8 @@
\endgroup
}
% \end{macrocode}
-% \end{macro}
+% \end{macro}%^^A \Ifattoclist
+% \end{macro}%^^A \ifattoclist
%
% \begin{macro}{\addtotoclist}
% \changes{v1.0a}{2008/11/11}{internal \cs{@addtotoclist} renamed to
@@ -310,6 +323,10 @@
% internal list}%^^A
% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
% \cs{kernel@ifnextchar}}%^^A
+% \begin{macro}{\scr@addtotoclist}
+% \begin{macro}{\scr@@addtotoclist}
+% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} replaced by
+% \cs{Ifattoclist}}%^^A
% This command adds an extension to the list of toc-files. The first,
% optional argument is the class or package name with the corresponding
% extension of class or package files. If this argument was omitted
@@ -332,7 +349,7 @@
\reserved@a
}
\newcommand*{\scr@@addtotoclist}[2][]{%
- \ifattoclist{#2}{%
+ \Ifattoclist{#2}{%
\PackageError{tocbasic}{%
file extension `#2' cannot be used twice
}{%
@@ -367,16 +384,19 @@
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\owneroftoc}
% \changes{v3.22}{2016/08/09}{new}%^^A
+% \changes{v3.28}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A
% Returns the owner of a TOC or uses the owner of a TOC as argument of the
% optional argument, if it exists.
% \begin{macrocode}
\newcommand*{\owneroftoc}[2][\@firstofone]{%
\begingroup
\let\reserved@a\endgroup
- \def\do##1##2{\ifstr{#2}{##1}{\def\reserved@a{\endgroup#1{##2}}}{}}%
+ \def\do##1##2{\Ifstr{#2}{##1}{\def\reserved@a{\endgroup#1{##2}}}{}}%
\tb@listoftocs
\reserved@a
}
@@ -427,6 +447,8 @@
% \end{macro}
%
% \begin{macro}{\tocbasic@extend@babel}
+% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
+% \cs{Iftocfeature}}%^^A
% NOTE: To extend the original \cs{bbl@set@language} the argument of
% \cs{tocbasic@extend@babel} must not be a local macro (like \cs{@currext})
% \begin{macrocode}
@@ -435,7 +457,7 @@
\PackageInfo{tocbasic}{babel extension for `#1' omitted\MessageBreak
because of missing \string\bbl@set@language}%
}{%
- \iftocfeature{#1}{nobabel}{%
+ \Iftocfeature{#1}{nobabel}{%
\PackageInfo{tocbasic}{omitting babel extension for `#1'\MessageBreak
because of feature `nobabel' available\MessageBreak
for `#1'}%
@@ -478,10 +500,12 @@
% \begin{macro}{\removefromtoclist}
% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
% \cs{kernel@ifnextchar}}%^^A
-% \begin{macro}{\@removefromtoclist}
+% \begin{macro}{\scr@removefromtoclist}
% \changes{v3.22}{2016/09/06}{missing \cs{global} added}%^^A
-% \begin{macro}{\@@removefromtoclist}
+% \changes{v3.28}{2019/11/22}{renamed from \cs{@removefromtoclist}}%^^A
+% \begin{macro}{\scr@@removefromtoclist}
% \changes{v3.22}{2016/09/06}{missing \cs{global} added}%^^A
+% \changes{v3.28}{2019/11/22}{renamed from \cs{@@removefromtoclist}}%^^A
% This command will remove an extension from the list of toc-files. If the
% first, optional argument is given, the extension will only be removed, if
% it was added by the given owner. NOTE: An empty first argument is not the
@@ -489,9 +513,9 @@
% \begin{macrocode}
\newcommand*{\removefromtoclist}{%
\kernel@ifnextchar [%]
- \@removefromtoclist\@@removefromtoclist
-}
-\newcommand*{\@removefromtoclist}[2][]{%
+ \scr@removefromtoclist\scr@@removefromtoclist
+}
+\newcommand*{\scr@removefromtoclist}[2][]{%
\begingroup
\let\tb@oldlist\tb@listoftocs
\def\do##1##2{%
@@ -513,7 +537,7 @@
\tb@oldlist
\endgroup
}
-\newcommand*{\@@removefromtoclist}[1]{%
+\newcommand*{\scr@@removefromtoclist}[1]{%
\begingroup
\let\tb@oldlist\tb@listoftocs
\def\do##1##2{%
@@ -743,6 +767,8 @@
% \begin{macro}{\tocbasic@starttoc}
% \changes{v3.17}{2015/03/23}{usage of feature \texttt{noparskipfake}}%^^A
% \changes{v3.27}{2019/07/08}{hack to add \cs{par} at end of (main) file}%^^A
+% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
+% \cs{Iftocfeature}}%^^A
% Some basics are done like setting up \cs{parskip}, \cs{parindent} and
% \cs{parfillskip}, a general hook will be called, an individual hook will
% be called, the toc will be started, an individual hook will be called, an
@@ -752,7 +778,7 @@
\newcommand*{\tocbasic@starttoc}[1]{%
\begingroup
\edef\@currext{#1}%
- \iftocfeature{\@currext}{noparskipfake}{}{%
+ \Iftocfeature{\@currext}{noparskipfake}{}{%
\ifvmode
\@tempskipa\lastskip
\vskip-\lastskip
@@ -838,6 +864,8 @@
% \changes{v1.01}{2008/11/13}{new feature \texttt{onecolumn}}%^^A
% \changes{v3.09}{2011/03/01}{\cs{@currext} defined using \cs{edef} instead
% of \cs{def}}%^^A
+% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
+% \cs{Iftocfeature}}%^^A
% Command to handle the hole list of something. There are additional hooks
% for this. The first optional argument is the title for this list. If the
% optional argument was omitted \cs{listof\#2name} will be used. The star
@@ -863,17 +891,17 @@
\expandafter\let\expandafter\list@fname\csname listof#2name\endcsname
}%
\edef\@currext{#2}%
- \iftocfeature{\@currext}{onecolumn}{%
- \iftocfeature{\@currext}{leveldown}{}{%
+ \Iftocfeature{\@currext}{onecolumn}{%
+ \Iftocfeature{\@currext}{leveldown}{}{%
\if@twocolumn
\aftergroup\twocolumn\onecolumn
\fi
}%
}{}%
- \iftocfeature{\@currext}{numberline}{\def\nonumberline{\numberline{}}}{}%
+ \Iftocfeature{\@currext}{numberline}{\def\nonumberline{\numberline{}}}{}%
\tocbasic@listhead{#1}%
\scr@ifundefinedorrelax{microtypesetup}{}{%
- \iftocfeature{\@currext}{noprotrusion}{}{%
+ \Iftocfeature{\@currext}{noprotrusion}{}{%
\microtypesetup{protrusion=false}%
\PackageInfo{tocbasic}{%
character protrusion at \@currext\space deactivated}%
@@ -975,6 +1003,8 @@
% \changes{v3.26}{2018/06/22}{removed spurious group}%^^A
% \changes{v3.26}{2018/09/03}{usage of \cs{addsecmark} or \cs{sectionmark}
% instead of \cs{@mkright} or \cs{markright}}%^^A
+% \changes{v3.28}{2019/11/19}{\cs{iftocfeature} replaced by
+% \cs{Iftocfeature}}%^^A
% Setting the headings of a list of something. The heading is the only
% argument.
% \begin{macrocode}
@@ -982,14 +1012,14 @@
\@ifundefined{tocbasic@listhead@\@currext}{%
\scr@ifundefinedorrelax{chapter}{%
\expandafter\def\csname tocbasic@listhead@\@currext\endcsname##1{%
- \iftocfeature{\@currext}{leveldown}{%
- \iftocfeature{\@currext}{numbered}{%
+ \Iftocfeature{\@currext}{leveldown}{%
+ \Iftocfeature{\@currext}{numbered}{%
\subsection[##1]{##1}%
}{%
\subsection*{##1}%
\ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
\begingroup
- \iftocfeature{\@currext}{totoc}{%
+ \Iftocfeature{\@currext}{totoc}{%
\expandafter\addxcontentsline\expandafter{\ext@toc}%
{subsection}{##1}%
}{}%
@@ -999,13 +1029,13 @@
\ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
}%
}{%
- \iftocfeature{\@currext}{numbered}{%
+ \Iftocfeature{\@currext}{numbered}{%
\section[##1]{##1}%
}{%
\section*{##1}%
\ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
\begingroup
- \iftocfeature{\@currext}{totoc}{%
+ \Iftocfeature{\@currext}{totoc}{%
\expandafter\addxcontentsline\expandafter{\ext@toc}%
{section}{##1}%
}{}%
@@ -1021,11 +1051,11 @@
}%
}{%
\expandafter\def\csname tocbasic@listhead@\@currext\endcsname##1{%
- \iftocfeature{\@currext}{leveldown}{%
- \iftocfeature{\@currext}{numbered}{%
+ \Iftocfeature{\@currext}{leveldown}{%
+ \Iftocfeature{\@currext}{numbered}{%
\section{##1}%
}{%
- \iftocfeature{\@currext}{totoc}{%
+ \Iftocfeature{\@currext}{totoc}{%
\@ifundefined{addsec}{%
\section*{##1}%
\ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
@@ -1057,7 +1087,7 @@
}%
}%
}{%
- \iftocfeature{\@currext}{numbered}{%
+ \Iftocfeature{\@currext}{numbered}{%
\chapter[##1]{##1}%
}{%
\chapter*{##1}%
@@ -1068,7 +1098,7 @@
}{%
\@mkdouble{\MakeMarkcase{##1}}%
}%
- \iftocfeature{\@currext}{totoc}{%
+ \Iftocfeature{\@currext}{totoc}{%
\expandafter\addxcontentsline\expandafter{\ext@toc}%
{chapter}{##1}%
}{}%
@@ -1199,9 +1229,21 @@
\setuptoc{lot}{nobabel}
% \end{macrocode}
% \begin{macro}{\iftocfeature}
+% \changes{v3.28}{2019/11/19}{renamed to \cs{Iftocfeature}}%^^A
+% \begin{macro}{\Iftocfeature}
+% \changes{v3.28}{2019/11/19}{renamed from \cs{iftocfeature}}%^^A
% We need a test for the features
% \begin{macrocode}
-\newcommand*{\iftocfeature}[2]{%
+\providecommand*{\iftocfeature}{%
+ \PackageWarning{tocbasic}{Usage of deprecated command
+ `\string\iftocfeature'.\MessageBreak
+ The command has been renamed because of a\MessageBreak
+ recommendation of The LaTeX Project Team.\MessageBreak
+ Please replace `\string\iftocfeature' by `\string\Iftocfeature'%
+ }%
+ \Iftocfeature
+}
+\newcommand*{\Iftocfeature}[2]{%
\scr@ifundefinedorrelax{tocbasic@#1@feature@#2}{%
\expandafter\@secondoftwo
}{%
@@ -1213,12 +1255,15 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\tocbasicautomode}
% \changes{v1.0a}{2008/11/11}{use of \cs{addtotoclist} instead of
% internal}%^^A
% \changes{v3.07a}{2010/11/25}{fix: added missing
% \cs{let}\cs{@starttoc}\cs{tocbasic@starttoc}}%^^A
+% \changes{v3.28}{2019/11/19}{\cs{ifattoclist} replaced by
+% \cs{Ifattoclist}}%^^A
% \textsf{tocbasic} can overtake \cs{@starttoc} to automaticly add all
% used extensions to the list of known extensions and use
% \cs{tocbasic@starttoc} instead of \cs{@starttoc} from \LaTeX{}
@@ -1234,7 +1279,7 @@
\let\@starttoc\tocbasic@starttoc
\BeforeStartingTOC{%
\let\@starttoc\tb@saved@starttoc
- \expandafter\ifattoclist\expandafter{\@currext}{}{%
+ \expandafter\Ifattoclist\expandafter{\@currext}{}{%
\addtotoclist[tocbasicautomode]{\@currext}%
}%
}%
@@ -1254,6 +1299,7 @@
% \changes{v3.20}{2016/04/12}{\cs{@ifnextchar} replaced by
% \cs{kernel@ifnextchar}}%^^A
% \changes{v3.26a}{2018/12/30}{fixed usage of \cs{kernel@ifnextchar}}%^^A
+% \changes{v3.28}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A
% This command defines only a new TOC and a new caption command for this
% TOC. It does not define a new foat unless option float was set! It does
% not define a new nonfloat unless option nonfloat was set! The optional
@@ -1295,12 +1341,12 @@
\@ExecuteTOCEntryStyleInitCode{\tb@nt@tocentrystyle}{\tb@nt@type}%
\def\do@endgroup{\endgroup}%
\def\do##1{%
- \ifstr{##1}{numwidth}{%
+ \Ifstr{##1}{numwidth}{%
\l@addto@macro\do@endgroup{%
\l@addto@macro{\tb@nt@tocstyle@options}{,numwidth=1.5em}%
}%
}{%
- \ifstr{##1}{indent}{%
+ \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}%
@@ -1409,7 +1455,7 @@
% If the toc style is empty we won't define any \cs{l@\dots}. Otherwise we
% need to define additional options.
% \begin{macrocode}
- \ifstr{\tb@nt@tocentrystyle}{}{}{%
+ \Ifstr{\tb@nt@tocentrystyle}{}{}{%
\begingroup
\let\scr@dte@current\tb@nt@type
\@ExecuteTOCEntryStyleInitCode{\tb@nt@tocentrystyle}{\tb@nt@type}%
@@ -1746,14 +1792,14 @@
% The list entry:
% \changes{v3.20}{2016/04/05}{warning if \cs{l@\dots} is undefined}%^^A
% \begin{macrocode}
- \ifstr{\tb@nt@tocentrystyle}{}{%
+ \Ifstr{\tb@nt@tocentrystyle}{}{%
\@ifundefined{l@\tb@nt@type}{%
\PackageWarning{tocbasic}{%
\expandafter\string\csname l@\tb@nt@type\endcsname\space
undefined!\MessageBreak
I hope you know, what you are doing, but\MessageBreak
maybe it would be better to use proper\MessageBreak
- `tocentrystyle` settings%
+ `tocentrystyle' settings%
}%
}{}%
}{%
@@ -1907,10 +1953,11 @@
% \begin{macro}{\tb@ifvalueisnotempty}
% \changes{v3.06}{2010/05/21}{new internal}%^^A
% \changes{v3.20}{2015/12/16}{simpler definition}%^^A
+% \changes{v3.28}{2019/11/18}{\cs{ifstr} umbenannt in \cs{Ifstr}}%^^A
% This is only a helper for defining some of the keys.
% \begin{macrocode}
\newcommand*{\tb@ifvalueisnotempty}[1]{%
- \ifstr{#1}{}{%
+ \Ifstr{#1}{}{%
\FamilyKeyStateUnknownValue
\expandafter\@gobble
}{%