From 83b4f07dfc662cf6c2632a34e88a1aad0009e35a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 19 Jan 2015 23:43:25 +0000 Subject: koma-script (19jan15) git-svn-id: svn://tug.org/texlive/trunk@36095 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/koma-script/tocbasic.sty | 49 +++++++++++++++++----- 1 file changed, 39 insertions(+), 10 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 942aae4c940..9b5347a1aa6 100644 --- a/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty +++ b/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty @@ -39,10 +39,10 @@ %% find a complete unmodified copy of LaTeX2e at %% . %% -%%% From File: $Id: tocbasic.dtx 1782 2014-08-18 10:48:22Z kohm $ +%%% From File: $Id: tocbasic.dtx 1871 2014-12-10 09:06:20Z kohm $ \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{tocbasic}[% - 2014/10/28 v3.14 KOMA-Script + 2015/01/14 v3.15 KOMA-Script package (handling toc-files)% ] @@ -370,20 +370,26 @@ \subsection[##1]{##1}% }{% \subsection*{##1}% - \ifx\@mkboth\@gobbletwo\else\markright{\MakeMarkcase{##1}}\fi \iftocfeature{\@currext}{totoc}{% \addxcontentsline{toc}{subsection}{##1}% }{}% + \begingroup + \@ifundefined{@mkright}{% + \ifx\@mkboth\@gobbletwo\else\markright{\MakeMarkcase{##1}}\fi + }{% + \@mkright{\MakeMarkcase{##1}}% + }% + \endgroup }% }{% \iftocfeature{\@currext}{numbered}{% \section[##1]{##1}% }{% \section*{##1}% - \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}% \iftocfeature{\@currext}{totoc}{% \addxcontentsline{toc}{section}{##1}% }{}% + \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}% }% }% }% @@ -393,18 +399,41 @@ \iftocfeature{\@currext}{numbered}{% \section{##1}% }{% - \section*{##1}% \iftocfeature{\@currext}{totoc}{% - \addxcontentsline{toc}{section}{##1}% - }{}% - \ifx\@mkboth\@gobbletwo\else\markright{\MakeMarkcase{##1}}\fi + \begingroup + \@ifundefined{addsec}{% + \section*{##1}% + \begingroup + \@ifundefined{@mkright}{% + \ifx\@mkboth\@gobbletwo + \else\markright{\MakeMarkcase{##1}}\fi + }{% + \@mkright{\MakeMarkcase{##1}}% + }% + \endgroup + \addxcontentsline{toc}{section}{##1}% + }{% + \addsec{##1}% + }% + \endgroup + }{% + \section*{##1}% + \begingroup + \@ifundefined{@mkright}{% + \ifx\@mkboth\@gobbletwo + \else\markright{\MakeMarkcase{##1}}\fi + }{% + \@mkright{\MakeMarkcase{##1}}% + }% + \endgroup + }% }% }{% \iftocfeature{\@currext}{numbered}{% \chapter[##1]{##1}% }{% - \chapter*{##1}% - \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}% + \chapter*{##1\unskip + \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}}% \iftocfeature{\@currext}{totoc}{% \addxcontentsline{toc}{chapter}{##1}% }{}% -- cgit v1.2.3