summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/tocbasic.sty')
-rw-r--r--Master/texmf-dist/tex/latex/koma-script/tocbasic.sty62
1 files changed, 46 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty b/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
index 6c3f4e5e66b..233dd82d314 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 1871 2014-12-10 09:06:20Z kohm $
+%%% From File: $Id: tocbasic.dtx 2041 2015-03-25 08:42:54Z kohm $
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{tocbasic}[%
- 2015/02/07 v3.16 KOMA-Script
+ 2015/04/23 v3.17 KOMA-Script
package
(handling toc-files)%
]
@@ -272,10 +272,18 @@
}
\newcommand*{\tocbasic@starttoc}[1]{%
\begingroup
+ \edef\@currext{#1}%
+ \iftocfeature{\@currext}{noparskipfake}{}{%
+ \ifvmode
+ \@tempskipa\lastskip
+ \vskip-\lastskip
+ \addtolength{\@tempskipa}{\parskip}%
+ \vskip\@tempskipa
+ \fi
+ }%
\setlength{\parskip}{\z@}%
\setlength{\parindent}{\z@}%
\setlength{\parfillskip}{\z@\@plus 1fil}%
- \edef\@currext{#1}%
\csname tocbasic@@before@hook\endcsname
\csname tb@#1@before@hook\endcsname
\@starttoc{#1}%
@@ -370,26 +378,36 @@
\subsection[##1]{##1}%
}{%
\subsection*{##1}%
- \iftocfeature{\@currext}{totoc}{%
- \addxcontentsline{toc}{subsection}{##1}%
- }{}%
+ \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
\begingroup
+ \iftocfeature{\@currext}{totoc}{%
+ \addxcontentsline{toc}{subsection}{##1}%
+ }{}%
\@ifundefined{@mkright}{%
\ifx\@mkboth\@gobbletwo\else\markright{\MakeMarkcase{##1}}\fi
}{%
\@mkright{\MakeMarkcase{##1}}%
}%
\endgroup
+ \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
}%
}{%
\iftocfeature{\@currext}{numbered}{%
\section[##1]{##1}%
}{%
\section*{##1}%
- \iftocfeature{\@currext}{totoc}{%
- \addxcontentsline{toc}{section}{##1}%
- }{}%
- \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}%
+ \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
+ \begingroup
+ \iftocfeature{\@currext}{totoc}{%
+ \addxcontentsline{toc}{section}{##1}%
+ }{}%
+ \@ifundefined{@mkdouble}{%
+ \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}%
+ }{%
+ \@mkdouble{\MakeMarkcase{##1}}%
+ }%
+ \endgroup
+ \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
}%
}%
}%
@@ -403,6 +421,7 @@
\begingroup
\@ifundefined{addsec}{%
\section*{##1}%
+ \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
\begingroup
\@ifundefined{@mkright}{%
\ifx\@mkboth\@gobbletwo
@@ -410,14 +429,16 @@
}{%
\@mkright{\MakeMarkcase{##1}}%
}%
+ \addxcontentsline{toc}{section}{##1}%
\endgroup
- \addxcontentsline{toc}{section}{##1}%
+ \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
}{%
\addsec{##1}%
}%
\endgroup
}{%
\section*{##1}%
+ \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
\begingroup
\@ifundefined{@mkright}{%
\ifx\@mkboth\@gobbletwo
@@ -426,17 +447,26 @@
\@mkright{\MakeMarkcase{##1}}%
}%
\endgroup
+ \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
}%
}%
}{%
\iftocfeature{\@currext}{numbered}{%
\chapter[##1]{##1}%
}{%
- \chapter*{##1\unskip
- \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}}%
- \iftocfeature{\@currext}{totoc}{%
- \addxcontentsline{toc}{chapter}{##1}%
- }{}%
+ \chapter*{##1}%
+ \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi
+ \begingroup
+ \@ifundefined{@mkdouble}{%
+ \@mkboth{\MakeMarkcase{##1}}{\MakeMarkcase{##1}}%
+ }{%
+ \@mkdouble{\MakeMarkcase{##1}}%
+ }%
+ \iftocfeature{\@currext}{totoc}{%
+ \addxcontentsline{toc}{chapter}{##1}%
+ }{}%
+ \endgroup
+ \ifvmode\penalty\@tempcnta\vskip\@tempskipa\fi
}%
}%
}%