diff options
author | Karl Berry <karl@freefriends.org> | 2020-07-16 22:03:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-07-16 22:03:21 +0000 |
commit | 1b6b0fd46b28228e02cef728834f46792feff84a (patch) | |
tree | 9cf84d591e749e005b0e78729cf56fbf3b65ff20 /Master/texmf-dist/tex/latex | |
parent | 5e7c45a283a2403c25348d1f470fed5654d78d63 (diff) |
tocdata (16jul20)
git-svn-id: svn://tug.org/texlive/trunk@55852 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/tocdata/tocdata.sty | 121 |
1 files changed, 26 insertions, 95 deletions
diff --git a/Master/texmf-dist/tex/latex/tocdata/tocdata.sty b/Master/texmf-dist/tex/latex/tocdata/tocdata.sty index ae4dfa715bf..4cd4b2256bd 100644 --- a/Master/texmf-dist/tex/latex/tocdata/tocdata.sty +++ b/Master/texmf-dist/tex/latex/tocdata/tocdata.sty @@ -17,7 +17,7 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{tocdata} - [2019/07/06 v2.03 Adds author/artist to TOC entries.] + [2020/07/15 v2.04 Adds author/artist to TOC entries.] \RequirePackage{xparse} @@ -157,12 +157,20 @@ {\nobreak\hfil\nobreak} {\nobreak\hfil\TD@usetocdata\nobreak} {} - {} + {% + \PackageWarningNoLine{tocdata}{% + Could not patch titletoc ttl@savel@#1.\MessageBreak + Authors may not appear in TOC, LOF} + } \expandafter\xpatchcmd\csname l@#1\endcsname {\contentspage} {\TD@usetocdata\contentspage} {} - {} + {% + \PackageWarningNoLine{tocdata}{% + Could not patch titletoc l@#1.\MessageBreak + Authors may not appear in TOC, LOF} + } } \TD@titletoc@patch{part} @@ -218,99 +226,22 @@ \AtBeginDocument{ \@ifpackageloaded{tocbasic}{ -\renewcommand*{\scr@dte@tocline}[3]{% - \ifnum \@nameuse{#1tocdepth}>\c@tocdepth - \else - \tocbasic@DependOnPenaltyAndTOCLevel{#1}% - \addvspace{\@nameuse{scr@tso@#1@beforeskip}}\relax +\xpatchcmd{\scr@dte@tocline} {% - \leftskip \@nameuse{scr@tso@#1@indent}\relax - \rightskip \@tocrmarg - \parfillskip -\rightskip - \@nameuse{Ifscr@tso@#1@raggedpage}{% - \addtolength{\parfillskip}{\z@ \@plus 1fil}% - }{}% - \parindent \@nameuse{scr@tso@#1@indent}\relax - \@afterindenttrue - \interlinepenalty\@M - \expandafter\ifx\csname ragged#1entry\endcsname\raggedright - \addtolength\rightskip\@flushglue - \else - \def\reserved@a{\raggedright}% - \expandafter\ifx\csname ragged#1entry\endcsname\reserved@a - \addtolength\rightskip\@flushglue - \else - \renewcommand\reserved@a{\raggedright}% - \expandafter\ifx\csname ragged#1entry\endcsname\reserved@a - \addtolength\rightskip\@flushglue - \fi - \fi - \fi - \leavevmode - \@tempdima \@nameuse{scr@tso@#1@numwidth}\relax - \@nameuse{Ifscr@tso@#1@dynnumwidth}{% - \scr@ifundefinedorrelax{scr@dte@#1@lastmaxnumwidth}{}{% - \ifdim \@nameuse{scr@dte@#1@lastmaxnumwidth}>\@tempdima - \@tempdima\@nameuse{scr@dte@#1@lastmaxnumwidth}\relax - \fi - }% - }{}% - \advance\leftskip \@tempdima - \null\nobreak\hskip -\leftskip - {% - \usetocbasicnumberline - \let\scr@dte@numberline@box\numberline@box - \def\numberline@box##1{% - \sbox\scr@dte@tocline@numbox{\@nameuse{scr@tso@#1@numberformat}{##1}}% - \global\scr@dte@tocline@numberwidth - \dimexpr\wd\scr@dte@tocline@numbox+\@nameuse{scr@tso@#1@numsep}\relax - \relax - \ifdim \scr@dte@tocline@numberwidth - >\@nameuse{scr@dte@#1@maxnumwidth}\relax - \global\@nameuse{scr@dte@#1@maxnumwidth}\scr@dte@tocline@numberwidth - \fi - \@nameuse{Ifscr@tso@#1@dynnumwidth}{}{% - \ifdim \scr@dte@tocline@numberwidth - >\dimexpr \@nameuse{scr@tso@#1@numwidth}% - +\@nameuse{scr@tso@#1@numsep}\relax\relax - \PackageWarning{tocbasic% - }{% - number width of #1 toc entries should be - increased!\MessageBreak - Currently used number width = - \the\wd\scr@dte@tocline@numbox,\MessageBreak - Wanted number separation - \space\space\space = - \the\dimexpr\@nameuse{scr@tso@#1@numsep}\relax,\MessageBreak - Reserved number width \space\space\space\space\space\space = - \the\dimexpr\@nameuse{scr@tso@#1@numwidth}\relax% - }% - \fi - }% - \scr@dte@numberline@box{\@nameuse{scr@tso@#1@numberformat}{##1}}% - \@nameuse{Ifscr@tso@#1@breakafternumber}{% - {\parfillskip\@flushglue\par}\nobreak\hskip-\leftskip - }{}% - }% - \@nameuse{scr@tso@#1@entryformat}{% - #2% - \nobreak - {% - \normalfont\normalsize\@nameuse{scr@tso@#1@linefill}% - \TD@usetocdata% lwarp - \nobreak - \@nameuse{scr@tso@#1@pagenumberbox}{% - \@nameuse{scr@tso@#1@pagenumberformat}{#3}% - }% - }% - \@par - }% - }% - }% - \tocbasic@SetPenaltyByTOCLevel{#1}% - \fi -} - + \nobreak + \expandafter\let\expandafter\scr@dte@pagenumberwidth + } + {% + \TD@usetocdata% tocdata + \nobreak + \expandafter\let\expandafter\scr@dte@pagenumberwidth + } + {} + {% + \PackageWarningNoLine{tocdata}{% + Could not patch tocbasic \protect\scr@dte@tocline.\MessageBreak + Authors may not appear in TOC, LOF} + } }{} } \AtBeginDocument{ |