diff options
author | Karl Berry <karl@freefriends.org> | 2015-04-24 23:19:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-04-24 23:19:31 +0000 |
commit | 0a00b3b492fd27dc12cddae602b2c43206a17d74 (patch) | |
tree | 40a09bf2208cc13bcd727626e1ee058e2caa68b1 /Master/texmf-dist/source/latex/koma-script/tocbasic.dtx | |
parent | 77b150bbd42aa48ba71627e09763785b26adfcfd (diff) |
koma-script (24apr15)
git-svn-id: svn://tug.org/texlive/trunk@37036 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 | 84 |
1 files changed, 65 insertions, 19 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx b/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx index baf0f5cb0a8..9afd1be9a2d 100644 --- a/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx +++ b/Master/texmf-dist/source/latex/koma-script/tocbasic.dtx @@ -1,8 +1,8 @@ -% \CheckSum{1368} +% \CheckSum{1455} % \iffalse meta-comment % ====================================================================== % tocbasic.dtx -% Copyright (c) Markus Kohm, 2008-2014 +% Copyright (c) Markus Kohm, 2008-2015 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -22,7 +22,7 @@ % This work consists of all files listed in manifest.txt. % ---------------------------------------------------------------------- % tocbasic.dtx -% Copyright (c) Markus Kohm, 2008-2014 +% Copyright (c) Markus Kohm, 2008-2015 % % Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz, % Version 1.3c, verteilt und/oder veraendert werden. @@ -57,10 +57,16 @@ % Right brace \} Tilde \~} % % \iffalse -%%% 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 $ %<*dtx> \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi -\ProvidesFile{tocbasic.dtx}[% +\begingroup + \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} + \filedate$Date: 2015-03-25 09:42:54 +0100 (Wed, 25 Mar 2015) $ + \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} + \filerevision$Revision: 1962 $ +\endgroup +\ProvidesFile{tocbasic.dtx}[\filedate\space\filerevision\space %</dtx> %<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01] %<doc>\ProvidesFile{tocbasic.tex}[% @@ -1046,6 +1052,11 @@ features. \Package{tocbasic} does know following features: \Package{scrwfile}\important{\Package{scrwfile}}\IndexPackage{scrwfile} uses this feature also for clone destinations, because those will get the language change from the clone source already. +\item[\texttt{noparskipfake}] prevents\ChangedAt{v3.17}{\Package{tocbasic}} + usage of an extra \Length{parskip} before switching \Length{parskip} off. In + general, the consequence of this feature for documents using paragraph + distance is less vertical space between heading and first entry than between + normal headings and normal text. \item[\texttt{noprotrusion}] prevents\ChangedAt{v3.10}{\Package{tocbasic}} disabling character protrusion at the lists of something. Character protrusion at the lists will be disabled by default if package @@ -2300,6 +2311,7 @@ may be found in \autoref{tab:tocbasic.DeclareNewTOC-options}. % too. Here are basics and high level commands for this. % % \begin{macro}{\tocbasic@starttoc} +% \changes{v3.17}{2015/03/23}{usage of feature \texttt{noparskipfake}}^^A % Some basics are done like setting up \cs{parskip}, \cs{parindent} and % \cs{parfillskip}, a general hook will be called, an individual hook will % be called, the toc will be started, an individual hook will be called, an @@ -2307,10 +2319,18 @@ may be found in \autoref{tab:tocbasic.DeclareNewTOC-options}. % \begin{macrocode} \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}% @@ -2463,6 +2483,10 @@ may be found in \autoref{tab:tocbasic.DeclareNewTOC-options}. % \changes{v3.15}{2014/12/10}{moved \cs{@mkboth} inside \cs{chapter*}}^^A % \changes{v3.15}{2014/12/10}{usage of \cs{addsec} if available}^^A % \changes{v3.15}{2014/12/10}{usage of \cs{@mkright} if available}^^A +% \changes{v3.17}{2015/03/08}{moved \cs{@mkboth} outside \cs{chapter*}}^^A +% \changes{v3.17}{2015/03/08}{usage of \cs{@mkdouble} if available}^^A +% \changes{v3.17}{2015/03/25}{penalty and skip reconstruction after +% \cs{@mkright}, \cs{@mkboth}, or \cs{@mkdouble}}^^A % Setting the headings of a list of something. The heading is the only % argument. % \begin{macrocode} @@ -2476,26 +2500,36 @@ may be found in \autoref{tab:tocbasic.DeclareNewTOC-options}. \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 }% }% }% @@ -2509,6 +2543,7 @@ may be found in \autoref{tab:tocbasic.DeclareNewTOC-options}. \begingroup \@ifundefined{addsec}{% \section*{##1}% + \ifvmode\@tempcnta\lastpenalty\@tempskipa\lastskip\unskip\fi \begingroup \@ifundefined{@mkright}{% \ifx\@mkboth\@gobbletwo @@ -2516,14 +2551,16 @@ may be found in \autoref{tab:tocbasic.DeclareNewTOC-options}. }{% \@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 @@ -2532,17 +2569,26 @@ may be found in \autoref{tab:tocbasic.DeclareNewTOC-options}. \@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 }% }% }% |