summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-02 21:47:58 +0000
committerKarl Berry <karl@freefriends.org>2013-05-02 21:47:58 +0000
commit0aded7b9ed8d32ea2311499243871cc3ee7a7ec0 (patch)
tree5126a908d013417cb22a119d4611228e3268a03c /Master
parent6cdb75282c226eb14173774707ff1d26629c47ac (diff)
tocloft (2may13)
git-svn-id: svn://tug.org/texlive/trunk@30209 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/tocloft/README18
-rw-r--r--Master/texmf-dist/doc/latex/tocloft/tocloft.pdfbin436896 -> 449529 bytes
-rw-r--r--Master/texmf-dist/source/latex/tocloft/tocloft.dtx191
-rw-r--r--Master/texmf-dist/tex/latex/tocloft/tocloft.sty96
4 files changed, 192 insertions, 113 deletions
diff --git a/Master/texmf-dist/doc/latex/tocloft/README b/Master/texmf-dist/doc/latex/tocloft/README
index e65bbc67054..a50cabd8796 100644
--- a/Master/texmf-dist/doc/latex/tocloft/README
+++ b/Master/texmf-dist/doc/latex/tocloft/README
@@ -8,12 +8,22 @@ define your own kinds of `List of ...'
_______________
Change history:
+Changes in version 2.3f (2013/05/02)
+- (Try to) support KOMA and titlesec packages w.r.t. \part entries
+- Extraneous whitespace fixes
+- Doc explanation of removing between-chapter space in LoF, LoT
+- Add \cftpnumalign to specify alignment of the page number in its box
+- Prevent some "Dimension too large" issues with large font sizes and a "no dots" ToC design.
+- Bug fix for the macro used to store the extension filename for new "lists of"
+
+Thanks to Andre Pinkert, Florent Chervet, Stephan Stiller, Matthew Skala, Simon Verleger, Leo Liu, Haruyuki Kawabe, and Axel Sommerfeldt for suggesting all of the changes above and my apologies for the slow turn-around releasing the package.
+
Changes in version 2.3e (2010/10/13)
-- Remove a superfluous message from the console output:
+- Remove a superfluous message from the console output:
"The document has [section|chapter] divisions"
Changes in version 2.3d (2009/09/04)
-- New package maintainer (Will Robertson) and small bug fix
+- New package maintainer (Will Robertson) and small bug fix
Changes in version 2.3c (2003/09/26)
- Another fix for the hyperref package
@@ -23,7 +33,7 @@ Changes in version 2.3b (2003/01/20)
Changes in version 2.3a (2002/10/03)
- Made Part commands work as advertised or deleted them
-- Added examples for page break control in the ToC, etc
+- Added examples for page break control in the ToC, etc.
Changes in version 2.3 (2002/06/15)
- Made compatible with the koma classes
@@ -52,7 +62,7 @@ Changes in version 1.0 (1999/09/19)
Changes in version 0.3 (1999/08/22)
- Added option to use default headings, so that packages like
- fncychap can be used for ToC, etc headings
+ fncychap can be used for ToC, etc. headings
Changes in version 0.2 (1999/01/17)
- Now works with the tocbibind package
diff --git a/Master/texmf-dist/doc/latex/tocloft/tocloft.pdf b/Master/texmf-dist/doc/latex/tocloft/tocloft.pdf
index 6ff4d5abc34..4096e801c65 100644
--- a/Master/texmf-dist/doc/latex/tocloft/tocloft.pdf
+++ b/Master/texmf-dist/doc/latex/tocloft/tocloft.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/tocloft/tocloft.dtx b/Master/texmf-dist/source/latex/tocloft/tocloft.dtx
index 716e747894d..c27a028c25a 100644
--- a/Master/texmf-dist/source/latex/tocloft/tocloft.dtx
+++ b/Master/texmf-dist/source/latex/tocloft/tocloft.dtx
@@ -19,6 +19,7 @@
%
%<*driver>
\documentclass{ltxdoc}
+\usepackage{hypdoc}
\EnableCrossrefs
\CodelineIndex
\setcounter{StandardModuleDepth}{1}
@@ -29,7 +30,7 @@
%
% \fi
%
-% \CheckSum{2197}
+% \CheckSum{2219}
%
% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
% \DoNotIndex{\@centercr,\@cite}
@@ -106,6 +107,7 @@
% \def\fileversion{v2.3c} \def\filedate{2003/09/26}
% \def\fileversion{v2.3d} \def\filedate{2009/09/04}
% \def\fileversion{v2.3e} \def\filedate{2010/10/13}
+% \def\fileversion{v2.3f} \def\filedate{2013/05/02}
% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
@@ -423,7 +425,7 @@
% Note that as both |\addtocontents| and |\addcontentsline| write their
% arguments to a file, it means that any \emph{fragile} commands in
% their arguments must be protected
-% by preceeding each fragile command with |\protect|.
+% by preceding each fragile command with |\protect|.
% The result of the example above
% would be the following two lines in the \file{.toc} file (assuming that it
% is the second Part and is on page 34):
@@ -582,7 +584,7 @@
% Figure~\ref{fig:ltoc}.
%
% \DescribeMacro{\cftdot}
-% In the default ToC typsetting only the more minor entries have dotted
+% In the default ToC typesetting only the more minor entries have dotted
% leader lines between the sectioning title and the page number. The
% \Lpack{tocloft} package provides for general leaders for all entries.
% The `dot' in a leader is given by the value of |\cftdot|. Its default
@@ -596,19 +598,19 @@
%
% \DescribeMacro{\cftdotsep}
% \DescribeMacro{\cftnodots}
-% Each kind of entry can control the seperation between the dots
+% Each kind of entry can control the separation between the dots
% in its leader (see below). For consistency though, all dotted leaders
% should use the same spacing. The macro |\cftdotsep| specifies the
% default spacing. Its value is a number.
-% However, if the seperation is too large
+% However, if the separation is too large
% then no dots will be actually typeset. The macro |\cftnodots| is
-% a seperation value that is `too large'.
+% a separation value that is `too large'.
%
% \DescribeMacro{\cftsetpnumwidth}
% \DescribeMacro{\cftsetrmarg}
% The page numbers are typeset in a fixed width box. The command
% |\cftsetpnumwidth{|\meta{length}|}| can be used to change the width
-% of the box (\LaTeX 's internal |\@pnumwidth|).
+% of the box (\LaTeX 's internal |\@pnumwidth|).
% The title texts will end before reaching the righthand margin.
% |\cftsetrmarg{|\meta{length}|}| can be used to set this distance
% (\LaTeX 's internal |\@tocrmarg|).
@@ -616,6 +618,15 @@
% than the length set in |\cftsetpnumwidth|. These values should remain
% constant in any given document.
%
+% \DescribeMacro{\cftpnumalign}
+% The page numbers are typeset in a box as described above.
+% By default they are right-aligned which is suitable when the page numbers are aligned vertically on the page so their digits line up.
+% For a design with fixed width between a ToC entry and its page number, say, a left alignment may be more suitable.
+% This can be controlled by setting the \cs{cftpnumalign} macro to \verb|l|, \verb|c|, or \verb|r| (just like \cs{makebox}):
+% \begin{verbatim}
+% \renewcommand{\cftpnumalign}{l}
+% \end{verbatim}
+%
% \DescribeMacro{\cftparskip}
% Normally the |\parskip| in the ToC, etc., is zero. This may be changed
% by changing the |\cftparskip| length. Note that the current value
@@ -671,7 +682,7 @@
% is typeset within a box of width |\cftXnumwidth|.
%
% \DescribeMacro{\cftXfont}
-% This controls the appearance of the title (and its preceeding number,
+% This controls the appearance of the title (and its preceding number,
% if any). It may be changed using |\renewcommand|.
%
% \DescribeMacro{\cftXpresnum}
@@ -691,8 +702,14 @@
% In the standard classes the ToC entry for a |\part| is just typeset as
% the number and title, followed by the page number, with the
% |\cftpartpresnum|
-% macro being called before typesetting the number and title. When a
-% standard class is used the |\cftpartaftersnum| and
+% macro being called before typesetting the number and title.
+% Due to \LaTeX\ ideosyncracies, |\cftpartpresnum| may become doubled in the output
+% if a third-party package behaves differently to that of the default internal \LaTeX\ commands.
+% The |tocloft| package contains specific code to prevent this in the case of
+% the KomaScript classes and for the |titlesec| package; please contact the maintainer
+% to add further corrections if you discover other packages which also exhibit this mis-behaviour.
+%
+% When a standard class is used the |\cftpartaftersnum| and
% |\cftpartaftersnumb| macros have no effect, but they may do something
% if a non-standard class is used.
%
@@ -812,6 +829,7 @@
% \begin{verbatim}
% \renewcommand{\cftXleader}{}
% \renewcommand{\cftXafterpnum}{\cftparfillskip}
+% \renewcommand{\cftpnumalign}{l}
% \end{verbatim}
% By default the |\parfillskip| value is locally set to fill up the last
% line of a paragraph. Just changing |\cftXleader| puts horrible interword
@@ -819,6 +837,16 @@
% command
% is part of the \Lpack{tocloft} package and is provided just so that
% the above effect can be achieved.
+% In addition, this is a good example of when it would be suitable to change the alignment of the page number box.
+%
+% \item To remove the space inserted between table and figure caption entries between chapters:
+% \begin{verbatim}
+% \begingroup
+% \renewcommand*{\addvspace}[1]{}
+% \listoftables
+% \listoffigures
+% \endgroup
+% \end{verbatim}
% \end{itemize}
%
% \DescribeMacro{\cftpagenumbersoff}
@@ -828,7 +856,7 @@
% \meta{entry} is the name of one of the standard
% kinds of entries (e.g., |subsection|, or |figure| --- including |subfigure|
% if the \Lpack{subfigure} package is used --- etc.), or the name of a
-% new entry defined wih the \Lpack{tocloft} package.
+% new entry defined with the \Lpack{tocloft} package.
%
% The command |\cftpagenumberson{|\meta{entry}|}| reverses
% the effect of a corresponding |\cftpagenumbersoff|.
@@ -907,7 +935,7 @@
% |\cftafterZtitleskip|,
% |\cftZtitlefont|, and
% |\cftafterZtitle|,
-% are analagous to the commands of the same names
+% are analogous to the commands of the same names
% described in section~\ref{sec:titles}.
%
% \DescribeMacro{\listofX}
@@ -916,7 +944,7 @@
% the new listing at the point where it is called.
%
% \DescribeMacro{\Zdepth}
-% The command |\Zdepth{|\meta{number}|}| is analagous to the standard
+% The command |\Zdepth{|\meta{number}|}| is analogous to the standard
% |\tocdepth{|\meta{number}|}| command, in that it specifies that entries
% in the new listing should not be typeset if their numbering level
% is greater
@@ -960,7 +988,7 @@
% |\cftXdotsep|,
% |\cftXpagefont|, and
% |\cftXafterpnum|,
-% are analagous to the commands of the same names
+% are analogous to the commands of the same names
% described in section~\ref{sec:entries}. Their default values are also
% as described earlier.
%
@@ -1046,7 +1074,7 @@
% files must remain open for writing throughout the document processing.
% TeX has only a limited number of files that it can keep open, and this
% puts a limit on the number of listings that can be used. For a document
-% that includes a ToC but no other extra ancilliary files (e.g., no
+% that includes a ToC but no other extra ancillary files (e.g., no
% index or bibliography output files) the maximum number of LoX's, including
% a LoF and LoT, is no more than about eleven. If you try and create too many
% new listings LaTeX will respond with the error message:
@@ -1136,7 +1164,7 @@
% \end{verbatim}
% Recall that a |\caption| command will put an entry in the \file{.lof}
% file, which is not wanted here. If a caption is required, then you can
-% either craft one youself or, assuming that your general captions are not
+% either craft one yourself or, assuming that your general captions are not
% too exotic, use the |\legend| command from the
% \Lpack{ccaption} package. If the illustration is numbered, use the
% |\cftaddnumtitleline| command instead of |\cftaddtitleline|.
@@ -1157,7 +1185,7 @@
% such as |\tocotherhead{clause}|,
% then this will almost certainly cause a problem (as the \Lpack{tocloft}
% package will not know how to define the corresponding |\l@clause| command).
-% In such a case you will have to supply the appropriate macros youself.
+% In such a case you will have to supply the appropriate macros yourself.
% \end{itemize}
%
% \DescribeMacro{\@cftbsnum}
@@ -1216,7 +1244,7 @@
% \begin{macrocode}
%<*usc>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tocloft}[2010/10/13 v2.3e parameterised ToC, etc., typesetting]
+\ProvidesPackage{tocloft}[2013/05/02 v2.3f parameterised ToC, etc., typesetting]
% \end{macrocode}
%
% In order to try and avoid name clashes with other packages, each internal
@@ -1240,11 +1268,18 @@
% \changes{v2.3}{2002/06/15}{Added check for a koma class}
% \begin{macrocode}
\newif\if@cftkoma
- \@cftkomafalse
+\@cftkomafalse
\@ifclassloaded{scrartcl}{\@cftkomatrue}{}
\@ifclassloaded{scrreprt}{\@cftkomatrue}{}
\@ifclassloaded{scrbook}{\@cftkomatrue}{}
-
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\if@cfttitlesec}
+% \changes{v2.3f}{2013/04/30}{Added check for titlesec package}
+% \begin{macrocode}
+\newif\if@cfttitlesec
+\AtBeginDocument{\@ifpackageloaded{titlesec}{\@cfttitlesectrue}{}}
% \end{macrocode}
% \end{macro}
%
@@ -1413,7 +1448,7 @@ Consider installing the current version of tocbibind.}}
%
% \begin{macro}{\cftparskip}
% The |\parskip| local to the ToC, etc., is set to the length |\cftparskip|.
-% \changes{v2.1}{2001/04/08}{Added \cs{cftparskip} for local parskip in ToC, etc}
+% \changes{v2.1}{2001/04/08}{Added \cs{cftparskip} for local parskip in ToC, etc.}
% \begin{macrocode}
\newlength{\cftparskip}
\setlength{\cftparskip}{0pt}
@@ -1469,13 +1504,13 @@ Consider installing the current version of tocbibind.}}
\newcommand{\@cftmaketoctitle}{%
\addpenalty\@secpenalty
\if@cfthaschapter
- \vspace*{\cftbeforetoctitleskip}
+ \vspace*{\cftbeforetoctitleskip}%
\else
- \vspace{\cftbeforetoctitleskip}
+ \vspace{\cftbeforetoctitleskip}%
\fi
\@cftpagestyle
{\interlinepenalty\@M
- {\cfttoctitlefont\contentsname}{\cftaftertoctitle}
+ {\cfttoctitlefont\contentsname}{\cftaftertoctitle}%
\cftmarktoc
\par\nobreak
\vskip \cftaftertoctitleskip
@@ -1537,33 +1572,51 @@ Consider installing the current version of tocbibind.}}
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\cftpnumalign}
+% \changes{v2.3f}{2013/05/02}{Add \cs{cftpnumalign} for page number alignment}
+% Alignment string (as input to \cs{makebox} for the page number box.
+% \begin{macrocode}
+\newcommand{\cftpnumalign}{r}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\cftdot}
% \begin{macro}{\cftdotfill}
% In the default ToC, a dotted line can be used to provide a leader between
% a title and the page number. The definition of this leader is buried
% in the |\@dottedtocline| command. The |\cftdotfill{|\meta{sep}|}|
% command provides a parameterised version of the leader code, where
-% \meta{sep} is the seperation between the dots in mu units.
+% \meta{sep} is the separation between the dots in mu units.
% The symbol used for the `dots' in the leader is given by the value
% of |\cftdot|. These macros are also provided by the \Lpack{ccaption} package.
% \begin{macrocode}
\providecommand{\cftdot}{.}
\providecommand{\cftdotfill}[1]{%
- \leaders\hbox{$\m@th\mkern #1 mu\hbox{\cftdot}\mkern #1 mu$}\hfill}
+ \def\@tempa{#1}%
+ \def\@tempb{\cftnodots}%
+ \ifx\@tempa\@tempb
+ \hfill
+ \else
+ \leaders\hbox{$\m@th\mkern #1 mu\hbox{\cftdot}\mkern #1 mu$}\hfill
+ \fi
+}
% \end{macrocode}
+% \changes{v2.3f}{2013/04/30}{Specifically avoid placing dots when \cs{cftnodots} is used}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\cftdotsep}
% \begin{macro}{\cftnodots}
-% |\cftdotsep| holds the default dot seperation, and is also provided
+% |\cftdotsep| holds the default dot separation, and is also provided
% by the \Lpack{ccaption} package.
% If the kerns in |\cftdotfill| are large enough, then no dots will
% be printed. |\cftnodots| should be `large enough'.
+% (Actually, |\cftnodots| is now used as a flag for a conditional branch, so its numerical value isn't as important now.)
% \begin{macrocode}
\providecommand{\cftdotsep}{4.5}
-\newcommand{\cftnodots}{10000}
+\newcommand{\cftnodots}{5000}
% \end{macrocode}
+% \changes{v2.3f}{2013/04/30}{Reduce \cs{cftnodots} to avoid very large dotsep sizes.}
% \end{macro}
% \end{macro}
%
@@ -1589,9 +1642,9 @@ Consider installing the current version of tocbibind.}}
%
% For the purposes at hand it is generally impossible to treat
% the typesetting
-% of a title and its number seperately, as both are bundled into the
+% of a title and its number separately, as both are bundled into the
% \meta{title} argument within |\contentsline|. They could be handled
-% seperately if the |\contentsline| command was suitably modified. If
+% separately if the |\contentsline| command was suitably modified. If
% this was done, then the |\addtocontentsline| command would also need
% to be changed which would then require the sectioning and captioning
% commands to be modified as well. This is certainly possible, but would
@@ -1704,7 +1757,12 @@ Consider installing the current version of tocbibind.}}
\let\@cftasnum \cftpartaftersnum
\let\@cftasnumb \cftpartaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
- {\cftpartfont \cftpartpresnum #1}%
+% \end{macrocode}
+% In default \LaTeX, the part ToC entry is written without \verb|\numberline|
+% and hence the `presnum' needs to be inserted manually.
+% In Koma-Script and titlesec (and probably others---let me know!), however, this is not the case.
+% \begin{macrocode}
+ {\cftpartfont \if@cftkoma\else\if@cfttitlesec\else\cftpartpresnum\fi\fi #1}%
\cftpartfillnum{#2}}
\nobreak
\if@cfthaschapter
@@ -1757,7 +1815,8 @@ Consider installing the current version of tocbibind.}}
\setlength{\cftpartindent}{0em}
\newcommand{\cftpartfillnum}[1]{%
{\cftpartleader}%
- {\hb@xt@\@pnumwidth{\hss {\cftpartpagefont #1}}}\cftpartafterpnum\par}
+ {\makebox[\@pnumwidth][\cftpnumalign]{\cftpartpagefont #1}\cftpartafterpnum\par}%
+ }
% \end{macrocode}
% \Lpack{koma} classes use some different settings.
% \changes{v2.3}{2002/06/15}{koma has different part settings}
@@ -1768,7 +1827,6 @@ Consider installing the current version of tocbibind.}}
\renewcommand{\cftpartpagefont}{\sectfont\large}
\fi
\fi
-
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1844,7 +1902,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftchapafterpnum}{}
\newcommand{\cftchapfillnum}[1]{%
{\cftchapleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftchappagefont #1}\cftchapafterpnum\par}
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftchappagefont #1}\cftchapafterpnum\par
+ }
% \end{macrocode}
% \Lpack{koma} classes have different chapter settings.
% \changes{v2.3}{2002/06/15}{koma has different chapter settings}
@@ -1939,8 +1998,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftsecafterpnum}{}
\newcommand{\cftsecfillnum}[1]{%
{\cftsecleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsecpagefont #1}\cftsecafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsecpagefont #1}\cftsecafterpnum\par
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2078,8 +2137,8 @@ Consider installing the current version of tocbibind.}}
% \begin{macrocode}
\newcommand{\cftsubsecfillnum}[1]{%
{\cftsubsecleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsubsecpagefont #1}\cftsubsecafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsubsecpagefont #1}\cftsubsecafterpnum\par
+}
% \end{macrocode}
% \end{macro}
%
@@ -2145,8 +2204,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftsubsubsecafterpnum}{}
\newcommand{\cftsubsubsecfillnum}[1]{%
{\cftsubsubsecleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsubsubsecpagefont #1}\cftsubsubsecafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsubsubsecpagefont #1}\cftsubsubsecafterpnum\par
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2223,8 +2282,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftparaafterpnum}{}
\newcommand{\cftparafillnum}[1]{%
{\cftparaleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftparapagefont #1}\cftparaafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftparapagefont #1}\cftparaafterpnum\par
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2301,8 +2360,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftsubparaafterpnum}{}
\newcommand{\cftsubparafillnum}[1]{%
{\cftsubparaleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsubparapagefont #1}\cftsubparaafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsubparapagefont #1}\cftsubparaafterpnum\par
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2499,8 +2558,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftfigafterpnum}{}
\newcommand{\cftfigfillnum}[1]{%
{\cftfigleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftfigpagefont #1}\cftfigafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftfigpagefont #1}\cftfigafterpnum\par
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2712,8 +2771,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cfttabafterpnum}{}
\newcommand{\cfttabfillnum}[1]{%
{\cfttableader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cfttabpagefont #1}\cfttabafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cfttabpagefont #1}\cfttabafterpnum\par
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2807,7 +2866,8 @@ Consider installing the current version of tocbibind.}}
\providecommand{\toclevel@subfigure}{1}
\newcommand{\cftsubfigfillnum}[1]{%
{\cftsubfigleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsubfigpagefont ##1}\cftsubfigafterpnum\par}
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsubfigpagefont ##1}\cftsubfigafterpnum\par
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2902,7 +2962,8 @@ Consider installing the current version of tocbibind.}}
\providecommand{\toclevel@subtable}{1}
\newcommand{\cftsubtabfillnum}[1]{%
{\cftsubtableader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsubtabpagefont ##1}\cftsubtabafterpnum\par}
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsubtabpagefont ##1}\cftsubtabafterpnum\par
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3083,18 +3144,18 @@ Consider installing the current version of tocbibind.}}
% \begin{macrocode}
\@namedef{cft#2fillnum}##1{%
{\@nameuse{cft#2leader}}\nobreak
- \hb@xt@\@pnumwidth{\hfil\@nameuse{cft#2pagefont}##1}\@nameuse{cft#2afterpnum}\par}
+ \makebox[\@pnumwidth][\cftpnumalign]{\@nameuse{cft#2pagefont}##1}\@nameuse{cft#2afterpnum}\par
+ }
% \end{macrocode}
% \end{macro}
% This ends the definition of |\newlistentry|.
% \begin{macrocode}
-} % end \newlistentry
-
+}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\newlistof}
-% |\newlistof[|\meta{within}|]{|\meta{counter}|}{|\meta{ext}|}{|\meta{listofname}|}|
+% |\newlistof[|\meta{within}|]{|\meta{entry}|}{|\meta{ext}|}{|\meta{listofname}|}|
% creates the commands for a new List of.
% \begin{macrocode}
\newcommand{\newlistof}[4][\@empty]{%
@@ -3106,17 +3167,15 @@ Consider installing the current version of tocbibind.}}
\else
\newlistentry[#1]{#2}{#3}{0}
\fi
-
% \end{macrocode}
%
% \begin{macro}{\ext@Z}
% \begin{macro}{\Zdepth}
% The file extension and listing depth.
% \begin{macrocode}
- \@namedef{ext@#3}{#3}
+ \@namedef{ext@#2}{#3}
\newcounter{#3depth}
\setcounter{#3depth}{1}
-
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -3179,16 +3238,16 @@ Consider installing the current version of tocbibind.}}
\@namedef{@cftmake#3title}{%
\addpenalty\@secpenalty
\if@cfthaschapter
- \vspace*{\@nameuse{cftbefore#3titleskip}}
+ \vspace*{\@nameuse{cftbefore#3titleskip}}%
\else
- \vspace{\@nameuse{cftbefore#3titleskip}}
+ \vspace{\@nameuse{cftbefore#3titleskip}}%
\fi
\@cftpagestyle
{\interlinepenalty\@M
- {\@nameuse{cft#3titlefont}#4}{\@nameuse{cftafter#3title}}
- \@nameuse{cftmark#3}
+ {\@nameuse{cft#3titlefont}#4}{\@nameuse{cftafter#3title}}%
+ \@nameuse{cftmark#3}%
\par\nobreak
- \vskip \@nameuse{cftafter#3titleskip}
+ \vskip \@nameuse{cftafter#3titleskip}%
\@afterheading}}
% \end{macrocode}
@@ -3234,8 +3293,7 @@ Consider installing the current version of tocbibind.}}
%
% This is the end of the definition of |\newlistof|.
% \begin{macrocode}
-} % end \newlistof
-
+}
% \end{macrocode}
% \end{macro}
%
@@ -3453,8 +3511,9 @@ Consider installing the current version of tocbibind.}}
\newcommand{\@cftpnumon}[1]{%
\@namedef{cft#1fillnum}##1{%
{\@nameuse{cft#1leader}}\nobreak
- \hb@xt@\@pnumwidth{\hfil\@nameuse{cft#1pagefont}##1}\@nameuse{cft#1afterpnum}\par}}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\@nameuse{cft#1pagefont}##1}\@nameuse{cft#1afterpnum}\par
+ }%
+}
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/tex/latex/tocloft/tocloft.sty b/Master/texmf-dist/tex/latex/tocloft/tocloft.sty
index 64f4beeb8d3..907d17a728c 100644
--- a/Master/texmf-dist/tex/latex/tocloft/tocloft.sty
+++ b/Master/texmf-dist/tex/latex/tocloft/tocloft.sty
@@ -23,15 +23,16 @@
%% This work consists of the files listed in the README file.
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tocloft}[2010/10/13 v2.3e parameterised ToC, etc., typesetting]
+\ProvidesPackage{tocloft}[2013/05/02 v2.3f parameterised ToC, etc., typesetting]
\newcommand{\@cftquit}{}
\newif\if@cfthaschapter
\newif\if@cftkoma
- \@cftkomafalse
+\@cftkomafalse
\@ifclassloaded{scrartcl}{\@cftkomatrue}{}
\@ifclassloaded{scrreprt}{\@cftkomatrue}{}
\@ifclassloaded{scrbook}{\@cftkomatrue}{}
-
+\newif\if@cfttitlesec
+\AtBeginDocument{\@ifpackageloaded{titlesec}{\@cfttitlesectrue}{}}
\@ifundefined{chapter}{%
\@cfthaschapterfalse
\@ifundefined{section}{%
@@ -127,13 +128,13 @@ Consider installing the current version of tocbibind.}}
\newcommand{\@cftmaketoctitle}{%
\addpenalty\@secpenalty
\if@cfthaschapter
- \vspace*{\cftbeforetoctitleskip}
+ \vspace*{\cftbeforetoctitleskip}%
\else
- \vspace{\cftbeforetoctitleskip}
+ \vspace{\cftbeforetoctitleskip}%
\fi
\@cftpagestyle
{\interlinepenalty\@M
- {\cfttoctitlefont\contentsname}{\cftaftertoctitle}
+ {\cfttoctitlefont\contentsname}{\cftaftertoctitle}%
\cftmarktoc
\par\nobreak
\vskip \cftaftertoctitleskip
@@ -157,11 +158,19 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftaftertoctitle}{}
\newcommand{\cftsetpnumwidth}[1]{\renewcommand{\@pnumwidth}{#1}}
\newcommand{\cftsetrmarg}[1]{\renewcommand{\@tocrmarg}{#1}}
+\newcommand{\cftpnumalign}{r}
\providecommand{\cftdot}{.}
\providecommand{\cftdotfill}[1]{%
- \leaders\hbox{$\m@th\mkern #1 mu\hbox{\cftdot}\mkern #1 mu$}\hfill}
+ \def\@tempa{#1}%
+ \def\@tempb{\cftnodots}%
+ \ifx\@tempa\@tempb
+ \hfill
+ \else
+ \leaders\hbox{$\m@th\mkern #1 mu\hbox{\cftdot}\mkern #1 mu$}\hfill
+ \fi
+}
\providecommand{\cftdotsep}{4.5}
-\newcommand{\cftnodots}{10000}
+\newcommand{\cftnodots}{5000}
\newcommand{\cftparfillskip}{\parfillskip=0pt plus1fil}
\renewcommand{\numberline}[1]{%
\hb@xt@\@tempdima{\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
@@ -203,7 +212,7 @@ Consider installing the current version of tocbibind.}}
\let\@cftasnum \cftpartaftersnum
\let\@cftasnumb \cftpartaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
- {\cftpartfont \cftpartpresnum #1}%
+ {\cftpartfont \if@cftkoma\else\if@cfttitlesec\else\cftpartpresnum\fi\fi #1}%
\cftpartfillnum{#2}}
\nobreak
\if@cfthaschapter
@@ -235,14 +244,14 @@ Consider installing the current version of tocbibind.}}
\setlength{\cftpartindent}{0em}
\newcommand{\cftpartfillnum}[1]{%
{\cftpartleader}%
- {\hb@xt@\@pnumwidth{\hss {\cftpartpagefont #1}}}\cftpartafterpnum\par}
+ {\makebox[\@pnumwidth][\cftpnumalign]{\cftpartpagefont #1}\cftpartafterpnum\par}%
+ }
\if@cftkoma
\setlength{\cftpartnumwidth}{2em}
\renewcommand{\cftpartfont}{\sectfont\large}
\renewcommand{\cftpartpagefont}{\sectfont\large}
\fi
\fi
-
\if@cfthaschapter
\renewcommand*{\l@chapter}[2]{%
\ifnum \c@tocdepth >\m@ne
@@ -280,7 +289,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftchapafterpnum}{}
\newcommand{\cftchapfillnum}[1]{%
{\cftchapleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftchappagefont #1}\cftchapafterpnum\par}
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftchappagefont #1}\cftchapafterpnum\par
+ }
\if@cftkoma
\renewcommand{\cftchapfont}{\sectfont}
\fi
@@ -334,8 +344,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftsecafterpnum}{}
\newcommand{\cftsecfillnum}[1]{%
{\cftsecleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsecpagefont #1}\cftsecafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsecpagefont #1}\cftsecafterpnum\par
+}
\renewcommand*{\l@subsection}[2]{%
\ifnum \c@tocdepth >\@ne
\vskip \cftbeforesubsecskip
@@ -374,8 +384,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftsubsecafterpnum}{}
\newcommand{\cftsubsecfillnum}[1]{%
{\cftsubsecleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsubsecpagefont #1}\cftsubsecafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsubsecpagefont #1}\cftsubsecafterpnum\par
+}
\renewcommand*{\l@subsubsection}[2]{%
\ifnum \c@tocdepth >\tw@
\vskip \cftbeforesubsubsecskip
@@ -414,8 +424,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftsubsubsecafterpnum}{}
\newcommand{\cftsubsubsecfillnum}[1]{%
{\cftsubsubsecleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsubsubsecpagefont #1}\cftsubsubsecafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsubsubsecpagefont #1}\cftsubsubsecafterpnum\par
+}
\renewcommand*{\l@paragraph}[2]{%
\ifnum \c@tocdepth >3\relax
\vskip \cftbeforeparaskip
@@ -454,8 +464,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftparaafterpnum}{}
\newcommand{\cftparafillnum}[1]{%
{\cftparaleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftparapagefont #1}\cftparaafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftparapagefont #1}\cftparaafterpnum\par
+}
\renewcommand*{\l@subparagraph}[2]{%
\ifnum \c@tocdepth >4\relax
\vskip \cftbeforesubparaskip
@@ -494,8 +504,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftsubparaafterpnum}{}
\newcommand{\cftsubparafillnum}[1]{%
{\cftsubparaleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsubparapagefont #1}\cftsubparaafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsubparapagefont #1}\cftsubparaafterpnum\par
+}
\newcommand{\@cftdobiblof}{%
\if@dotoclof
\if@bibchapter
@@ -591,8 +601,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cftfigafterpnum}{}
\newcommand{\cftfigfillnum}[1]{%
{\cftfigleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftfigpagefont #1}\cftfigafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftfigpagefont #1}\cftfigafterpnum\par
+}
\if@cftsubfigopt\else
\newcounter{lofdepth}\setcounter{lofdepth}{1}
\newcounter{lotdepth}\setcounter{lotdepth}{1}
@@ -693,8 +703,8 @@ Consider installing the current version of tocbibind.}}
\newcommand{\cfttabafterpnum}{}
\newcommand{\cfttabfillnum}[1]{%
{\cfttableader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cfttabpagefont #1}\cfttabafterpnum\par}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\cfttabpagefont #1}\cfttabafterpnum\par
+}
\newcommand{\@cftl@subfig}{%
\renewcommand*{\l@subfigure}[2]{%
\ifnum \c@lofdepth > \toclevel@subfigure
@@ -734,7 +744,8 @@ Consider installing the current version of tocbibind.}}
\providecommand{\toclevel@subfigure}{1}
\newcommand{\cftsubfigfillnum}[1]{%
{\cftsubfigleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsubfigpagefont ##1}\cftsubfigafterpnum\par}
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsubfigpagefont ##1}\cftsubfigafterpnum\par
+}
}
\newcommand{\@cftl@subtab}{%
@@ -775,7 +786,8 @@ Consider installing the current version of tocbibind.}}
\providecommand{\toclevel@subtable}{1}
\newcommand{\cftsubtabfillnum}[1]{%
{\cftsubtableader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftsubtabpagefont ##1}\cftsubtabafterpnum\par}
+ \makebox[\@pnumwidth][\cftpnumalign]{\cftsubtabpagefont ##1}\cftsubtabafterpnum\par
+}
}
@@ -854,20 +866,18 @@ Consider installing the current version of tocbibind.}}
\@namedef{toclevel@#2}{#4}
\@namedef{cft#2fillnum}##1{%
{\@nameuse{cft#2leader}}\nobreak
- \hb@xt@\@pnumwidth{\hfil\@nameuse{cft#2pagefont}##1}\@nameuse{cft#2afterpnum}\par}
-} % end \newlistentry
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\@nameuse{cft#2pagefont}##1}\@nameuse{cft#2afterpnum}\par
+ }
+}
\newcommand{\newlistof}[4][\@empty]{%
\ifx \@empty#1\relax
\newlistentry{#2}{#3}{0}
\else
\newlistentry[#1]{#2}{#3}{0}
\fi
-
- \@namedef{ext@#3}{#3}
+ \@namedef{ext@#2}{#3}
\newcounter{#3depth}
\setcounter{#3depth}{1}
-
\if@cftkoma
\@namedef{cftmark#3}{%
\@mkboth{#4}{#4}}
@@ -901,16 +911,16 @@ Consider installing the current version of tocbibind.}}
\@namedef{@cftmake#3title}{%
\addpenalty\@secpenalty
\if@cfthaschapter
- \vspace*{\@nameuse{cftbefore#3titleskip}}
+ \vspace*{\@nameuse{cftbefore#3titleskip}}%
\else
- \vspace{\@nameuse{cftbefore#3titleskip}}
+ \vspace{\@nameuse{cftbefore#3titleskip}}%
\fi
\@cftpagestyle
{\interlinepenalty\@M
- {\@nameuse{cft#3titlefont}#4}{\@nameuse{cftafter#3title}}
- \@nameuse{cftmark#3}
+ {\@nameuse{cft#3titlefont}#4}{\@nameuse{cftafter#3title}}%
+ \@nameuse{cftmark#3}%
\par\nobreak
- \vskip \@nameuse{cftafter#3titleskip}
+ \vskip \@nameuse{cftafter#3titleskip}%
\@afterheading}}
\expandafter\newlength\csname cftbefore#3titleskip\endcsname
@@ -933,8 +943,7 @@ Consider installing the current version of tocbibind.}}
\fi
\fi
\@namedef{cftafter#3title}{}
-} % end \newlistof
-
+}
\newcommand{\cftsetindents}[3]{%
\def\@cftemp{#1}
\ifx\@cftemp\cftchapname
@@ -1066,8 +1075,9 @@ Consider installing the current version of tocbibind.}}
\newcommand{\@cftpnumon}[1]{%
\@namedef{cft#1fillnum}##1{%
{\@nameuse{cft#1leader}}\nobreak
- \hb@xt@\@pnumwidth{\hfil\@nameuse{cft#1pagefont}##1}\@nameuse{cft#1afterpnum}\par}}
-
+ \makebox[\@pnumwidth][\cftpnumalign]{\@nameuse{cft#1pagefont}##1}\@nameuse{cft#1afterpnum}\par
+ }%
+}
\newcommand{\cftchapterprecis}[1]{%
\cftchapterprecishere{#1}
\cftchapterprecistoc{#1}}