From 734c91dfac1697d69bdd509c8bc7a97750c78f96 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 6 May 2017 21:41:21 +0000
Subject: koma-script (6may17)

git-svn-id: svn://tug.org/texlive/trunk@44226 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/koma-script/tocbasic.sty  | 50 +++++++++++++++-------
 1 file changed, 34 insertions(+), 16 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/koma-script/tocbasic.sty')

diff --git a/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty b/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
index e1414a045f3..5830a69d488 100644
--- a/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
+++ b/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
@@ -52,24 +52,24 @@
 %% find a complete unmodified copy of LaTeX2e at
 %% <http://www.ctan.org/pub/tex-archive/macros/latex/base/>.
 %% 
-%%% From File: $Id: tocbasic.dtx 2499 2016-09-06 07:00:45Z kohm $
+%%% From File: $Id: tocbasic.dtx 2600 2017-02-23 12:07:58Z kohm $
 %%%            (run: identify)
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
 \ProvidesPackage{tocbasic}[%
-  2017/01/03 v3.22 KOMA-Script
+  2017/04/13 v3.23 KOMA-Script
   package
   (handling toc-files)%
 ]
-%%% From File: $Id: tocbasic.dtx 2499 2016-09-06 07:00:45Z kohm $
+%%% From File: $Id: tocbasic.dtx 2600 2017-02-23 12:07:58Z kohm $
 %%%            (run: prepare)
 %%% From File: $Id: scrkernel-tocstyle.dtx 2559 2016-12-02 08:03:11Z kohm $
 %%%            (run: prepare)
-%%% From File: $Id: tocbasic.dtx 2499 2016-09-06 07:00:45Z kohm $
+%%% From File: $Id: tocbasic.dtx 2600 2017-02-23 12:07:58Z kohm $
 %%%            (run: option)
 \ProcessOptions\relax
 %%% From File: $Id: scrkernel-tocstyle.dtx 2559 2016-12-02 08:03:11Z kohm $
 %%%            (run: option)
-%%% From File: $Id: tocbasic.dtx 2499 2016-09-06 07:00:45Z kohm $
+%%% From File: $Id: tocbasic.dtx 2600 2017-02-23 12:07:58Z kohm $
 %%%            (run: body)
 \RequirePackage{scrbase}
 \newcommand*{\tb@listoftocs}{}
@@ -162,11 +162,24 @@
         because of feature `nobabel' available\MessageBreak
         for `#1'}%
     }{%
-      \PackageInfo{tocbasic}{setting babel extension for `#1'}%
-      \expandafter\gdef\expandafter\bbl@set@language\expandafter##\expandafter1%
-      \expandafter{%
-        \bbl@set@language{##1}%
-        \addtocontents{#1}{\xstring\select@language{\languagename}}%
+      \scr@ifundefinedorrelax{BabelContentsFiles}{%
+        \PackageInfo{tocbasic}{setting babel extension for `#1'}%
+        \expandafter\gdef\expandafter\bbl@set@language
+        \expandafter##\expandafter1%
+        \expandafter{%
+          \bbl@set@language{##1}%
+          \addtocontents{#1}{\xstring\select@language{\languagename}}%
+        }%
+      }{%
+        \@expandtwoargs\in@{,#1,}{,\BabelContentsFiles,}%
+        \ifin@
+          \PackageInfo{tocbasic}{omitting babel extension for
+            `#1'\MessageBreak
+            because it is already in \string\BabelContentsFiles}%
+        \else
+          \PackageInfo{tocbasic}{setting babel extension for `#1'}%
+          \xdef\BabelContentsFiles{\BabelContentsFiles,#1}%
+        \fi
       }%
     }%
   }%
@@ -398,6 +411,7 @@
 \newcommand{\@@listofeachtoc}[1]{%
   \doforeachtocfile{\listoftoc{\@currext}}%
 }
+\providecommand*{\ext@toc}{toc}
 \newcommand*{\tocbasic@listhead}[1]{%
   \@ifundefined{tocbasic@listhead@\@currext}{%
     \scr@ifundefinedorrelax{chapter}{%
@@ -410,7 +424,8 @@
             \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
             \begingroup
               \iftocfeature{\@currext}{totoc}{%
-                \addxcontentsline{toc}{subsection}{##1}%
+                \expandafter\addxcontentsline\expandafter{\ext@toc}%
+                {subsection}{##1}%
               }{}%
               \@ifundefined{@mkright}{%
                 \ifx\@mkboth\@gobbletwo\else\markright{\MakeMarkcase{##1}}\fi
@@ -428,7 +443,8 @@
             \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
             \begingroup
               \iftocfeature{\@currext}{totoc}{%
-                \addxcontentsline{toc}{section}{##1}%
+                \expandafter\addxcontentsline\expandafter{\ext@toc}%
+                {section}{##1}%
               }{}%
               \@ifundefined{@mkdouble}{%
                 \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}%
@@ -458,7 +474,8 @@
                     }{%
                       \@mkright{\MakeMarkcase{##1}}%
                     }%
-                    \addxcontentsline{toc}{section}{##1}%
+                    \expandafter\addxcontentsline\expandafter{\ext@toc}%
+                    {section}{##1}%
                   \endgroup
                   \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
                 }{%
@@ -492,7 +509,8 @@
                 \@mkdouble{\MakeMarkcase{##1}}%
               }%
               \iftocfeature{\@currext}{totoc}{%
-                \addxcontentsline{toc}{chapter}{##1}%
+                \expandafter\addxcontentsline\expandafter{\ext@toc}%
+                {chapter}{##1}%
               }{}%
             \endgroup
             \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
@@ -2177,7 +2195,7 @@
 %%% From File: $Id: scrkernel-tocstyle.dtx 2559 2016-12-02 08:03:11Z kohm $
 %%%            (run: style,dottedtocline)
 \CloneTOCEntryStyle{dottedtocline}{default}
-%%% From File: $Id: tocbasic.dtx 2499 2016-09-06 07:00:45Z kohm $
+%%% From File: $Id: tocbasic.dtx 2600 2017-02-23 12:07:58Z kohm $
 %%%            (run: exit)
 \AtBeginDocument{%
   \@ifundefined{MakeMarkcase}{%
@@ -2188,7 +2206,7 @@
     }%
   }{}%
 }
-%%% From File: $Id: scrlogo.dtx 1380 2013-10-01 15:31:55Z mjk $
+%%% From File: $Id: scrlogo.dtx 2592 2017-02-16 16:56:10Z kohm $
 \@ifundefined{KOMAScript}{%
   \DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
       M\kern.05em A\kern.1em-\kern.1em Script}}}{}
-- 
cgit v1.2.3

