diff options
author | Karl Berry <karl@freefriends.org> | 2021-11-21 21:11:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-21 21:11:31 +0000 |
commit | 3367ff3b4f3e35fd696252ede7227352504083df (patch) | |
tree | 212aaf43e4472c0a6de50792075110eae3d6828f /Master/texmf-dist/source/latex/koma-script/tocbasic.dtx | |
parent | 01d0ab68fa1f6e72c8b568cfea2dbc1ddab12759 (diff) |
koma-script (21nov21)
git-svn-id: svn://tug.org/texlive/trunk@61108 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/tocbasic.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/tocbasic.dtx | 54 |
1 files changed, 43 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx b/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx index 44a222f81dd..90a27fd6708 100644 --- a/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx +++ b/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx @@ -54,7 +54,7 @@ % Right brace \} Tilde \~} % % \iffalse -%%% From File: $Id: tocbasic.dtx 3518 2020-08-25 08:26:01Z kohm $ +%%% From File: $Id: tocbasic.dtx 3617 2021-10-12 09:21:01Z kohm $ %<identify>%%% (run: identify) %<prepare>%%% (run: prepare) %<option>%%% (run: option) @@ -65,7 +65,7 @@ \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2020-08-25 10:26:01 +0200 (Tue, 25 Aug 2020) $ + \filedate$Date: 2021-10-12 11:21:01 +0200 (Tue, 12 Oct 2021) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} \filerevision$Revision: 1962 $ \endgroup @@ -1917,9 +1917,12 @@ % \end{macrocode} % The counter and hooks of float and nonfloat environments: % \changes{v3.10b}{2012/04/04}{\cs{noexpand} added to fix problems using -% \cs{autodot}}%^^A +% \cs{autodot}} % \changes{v3.13}{2014/07/31}{add \cs{autodot} only to hierachical -% counters}%^^A +% counters} +% \changes{v3.35}{2021/10/12}{ignore \texttt{counterwithin} if it is +% ``\texttt{chapter}'' resp. ``\texttt{section}'' and \cs{ifmainmatter} is +% not \cs{iffalse} and the counterwithin counter is < 1} % \begin{macrocode} \if@tempswa \@ifundefined{c@\tb@nt@type}{% @@ -1929,14 +1932,43 @@ }% \ifx\tb@nt@counterwithin\@empty\else \@addtoreset{\tb@nt@type}{\tb@nt@counterwithin}% - \begingroup\edef\@tempa{% - \noexpand\endgroup - \noexpand\renewcommand*\expandafter\noexpand - \csname the\tb@nt@type\endcsname{% - \expandafter\noexpand\csname the\tb@nt@counterwithin\endcsname - .\noexpand\arabic{\tb@nt@type}% + \begingroup + \def\reserved@c{section}% + \@ifundefined{chapter}{}{% + \@ifundefined{c@chapter}{}{% + \@ifundefined{l@chapter}{}{% + \def\reserved@c{chapter}}}}% + \expandafter\Ifstr\expandafter{\reserved@c}{\tb@nt@counterwithin}{% + \edef\@tempa{% + \noexpand\endgroup + \noexpand\renewcommand*\expandafter\noexpand + \csname the\tb@nt@type\endcsname{% + \unexpanded{% + \expandafter\ifx\csname ifmainmatter\expandafter\endcsname + \csname iffalse\endcsname\else + }% + \noexpand\ifnum + \expandafter\noexpand\csname c@\tb@nt@counterwithin\endcsname + >\noexpand\z@ + \expandafter\noexpand\csname the\tb@nt@counterwithin\endcsname + .% + \noexpand\fi + \noexpand\fi + \noexpand\arabic{\tb@nt@type}% + }% + }% + }{% + \edef\@tempa{% + \noexpand\endgroup + \noexpand\renewcommand*\expandafter\noexpand + \csname the\tb@nt@type\endcsname{% + \expandafter\noexpand\csname the\tb@nt@counterwithin\endcsname + .% + \noexpand\arabic{\tb@nt@type}% + }% + }% }% - }\@tempa + \@tempa \fi \begingroup \edef\@tempa{% |