diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/tocbasic.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/tocbasic.sty | 49 |
1 files changed, 39 insertions, 10 deletions
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 %% <http://www.ctan.org/pub/tex-archive/macros/latex/base/>. %% -%%% 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}% }{}% |