diff options
author | Karl Berry <karl@freefriends.org> | 2006-07-21 23:50:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-07-21 23:50:03 +0000 |
commit | 6205fe4cf94df0a8693755ae920874a8c7b9e959 (patch) | |
tree | b9bb7f5c0bd37d8fe34aa6dbd377a571dbb3b823 /Master/texmf-dist/tex/latex/minitoc/minitoc.sty | |
parent | c3ea4d2926cc433f86635f1d9d122be96311c55f (diff) |
minitoc 46 update (20jul06)
git-svn-id: svn://tug.org/texlive/trunk@1892 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/minitoc/minitoc.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/minitoc/minitoc.sty | 119 |
1 files changed, 64 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/latex/minitoc/minitoc.sty b/Master/texmf-dist/tex/latex/minitoc/minitoc.sty index e262ef98376..5d6170bff9a 100644 --- a/Master/texmf-dist/tex/latex/minitoc/minitoc.sty +++ b/Master/texmf-dist/tex/latex/minitoc/minitoc.sty @@ -29,13 +29,14 @@ %% This work consists of all the files listed in the file `minitoc.l' %% distributed with it. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[1996/06/02]% \ProvidesPackage{minitoc}% - [2006/06/08 v45 Package minitoc (JPFD)] + [2006/07/20 v46 Package minitoc (JPFD)] \RequirePackage{mtcmess}[2006/03/14] \mtcPackageInfo[<I0001>]{minitoc}% - {*** minitoc package, version 45 ***\@gobble} + {*** minitoc package, version 46 ***\@gobble} \newwrite\tf@mtc \newlength\mtcindent \newskip\mtcskipamount @@ -376,7 +377,7 @@ \let\reset@font\relax}{} \newif\ifundottedmtc\undottedmtcfalse \def\@undottedtocline#1#2#3#4#5{% - \ifnum #1>\c@tocdepth \else + \ifnum #1>\c@tocdepth\relax \else \vskip \z@ plus.2\p@ {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip \parindent #2\relax\@afterindenttrue @@ -653,8 +654,7 @@ \labelsep=\z@\listparindent=\z@% \begin{mtc@verse}% \c@tocdepth=\c@minitocdepth - \leavevmode\\\mtc@BBR - \vskip -.5\baselineskip + \leavevmode\\\mtc@BBR\vskip -.5\baselineskip \begingroup \makeatletter \@ifundefined{mtc@pgno}% @@ -723,10 +723,11 @@ \itemindent=\z@\labelwidth=\z@% \labelsep=\z@\listparindent=\z@% \begin{mtc@verse}% - \@ifundefined{c@lofdepth}{}{\c@tocdepth=\c@minilofdepth} - \ifnum\c@tocdepth<1\relax\c@tocdepth=1\fi - \leavevmode\\\mtc@BBR - \vskip -.5\baselineskip + \@ifundefined{c@lofdepth}% + {}% + {\c@lofdepth=\c@minilofdepth + \ifnum\c@lofdepth<1\relax\c@lofdepth=1\fi} + \leavevmode\\\mtc@BBR\vskip -.5\baselineskip \begingroup \makeatletter \@ifundefined{mlf@pgno}% @@ -790,10 +791,11 @@ \itemindent=\z@\labelwidth=\z@% \labelsep=\z@\listparindent=\z@% \begin{mtc@verse}% - \@ifundefined{c@lotdepth}{}{\c@tocdepth=\c@minilotdepth} - \ifnum\c@tocdepth<1\relax\c@tocdepth=1\fi - \leavevmode\\\mtc@BBR - \vskip -.5\baselineskip + \@ifundefined{c@lotdepth}% + {}% + {\c@lotdepth=\c@minilotdepth + \ifnum\c@lotdepth<1\relax\c@lotdepth=1\fi} + \leavevmode\\\mtc@BBR\vskip -.5\baselineskip \begingroup \makeatletter \@ifundefined{mlt@pgno}% @@ -828,7 +830,7 @@ \@ifundefined{part}% {}{\def\addstarredpart#1{\addst@rred{part}{#1}}} \def\@Undottedtocline#1#2#3#4#5{% - \ifnum #1>\c@tocdepth \else + \ifnum #1>\c@tocdepth\relax \else \vskip \z@ \@plus.2\p@ {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip \parindent #2\relax\@afterindenttrue @@ -841,7 +843,7 @@ \par}% \fi} \def\@Undottedtoclinep#1#2#3#4#5{% - \ifnum #1>\c@tocdepth \else + \ifnum #1>\c@tocdepth\relax \else \vskip \z@ \@plus.2\p@ {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip \parindent #2\relax\@afterindenttrue @@ -1205,14 +1207,9 @@ } \def\MTC@WriteCoffeeline#1#2#3{% \immediate\write\tf@mtc{% - {\string\reset@font - \string\coffeefont - \string\mtc@string -%% COFFEE \string\textbf{#1}% + {\string\reset@font \string\coffeefont \string\mtc@string {\the\mtc@toks}% - {\string\reset@font - \string\coffeefont - \space #3% + {\string\reset@font \string\coffeefont \space #3% }% }% }% @@ -1394,8 +1391,7 @@ \itemindent=\z@\labelwidth=\z@% \labelsep=\z@\listparindent=\z@% \begin{ptc@verse}\c@tocdepth=\c@parttocdepth% - \leavevmode\\\mtc@BBR - \vskip -.5\baselineskip + \leavevmode\\\mtc@BBR\vskip -.5\baselineskip \begingroup \makeatletter \@ifundefined{ptc@pgno}% @@ -1468,10 +1464,11 @@ \itemindent=\z@\labelwidth=\z@% \labelsep=\z@\listparindent=\z@% \begin{ptc@verse}% - \@ifundefined{c@lofdepth}{}{\c@tocdepth=\c@partlofdepth} - \ifnum\c@tocdepth<1\relax\c@tocdepth=1\fi - \leavevmode\\\mtc@BBR - \vskip -.5\baselineskip + \@ifundefined{c@lofdepth}% + {}% + {\c@lofdepth=\c@partlofdepth + \ifnum\c@lofdepth<1\relax\c@lofdepth=1\fi} + \leavevmode\\\mtc@BBR\vskip -.5\baselineskip \begingroup \makeatletter \@ifundefined{plf@pgno}% @@ -1541,10 +1538,11 @@ \itemindent=\z@\labelwidth=\z@% \labelsep=\z@\listparindent=\z@% \begin{ptc@verse}% - \@ifundefined{c@lotdepth}{}{\c@tocdepth=\c@partlotdepth} - \ifnum\c@tocdepth<1\relax\c@tocdepth=1\fi - \leavevmode\\\mtc@BBR - \vskip -.5\baselineskip + \@ifundefined{c@lotdepth}% + {}% + {\c@lotdepth=\c@partlotdepth + \ifnum\c@lotdepth<1\relax\c@lotdepth=1\fi} + \leavevmode\\\mtc@BBR\vskip -.5\baselineskip \begingroup \makeatletter \@ifundefined{plt@pgno}% @@ -1980,8 +1978,7 @@ \itemindent=\z@\labelwidth=\z@% \labelsep=\z@\listparindent=\z@% \begin{stc@verse}\c@tocdepth=\c@secttocdepth% - \leavevmode\\\mtc@BBR - \vskip -.5\baselineskip + \leavevmode\\\mtc@BBR\vskip -.5\baselineskip \begingroup \makeatletter \stc@setform% @@ -2047,10 +2044,11 @@ \itemindent=\z@\labelwidth=\z@% \labelsep=\z@\listparindent=\z@% \begin{stc@verse}% - \@ifundefined{c@lofdepth}{}{\c@tocdepth=\c@sectlofdepth} - \ifnum\c@tocdepth<1\relax\c@tocdepth=1\fi - \leavevmode\\\mtc@BBR - \vskip -.5\baselineskip + \@ifundefined{c@lofdepth}% + {}% + {\c@lofdepth=\c@sectlofdepth + \ifnum\c@lofdepth<1\relax\c@lofdepth=1\fi} + \leavevmode\\\mtc@BBR\vskip -.5\baselineskip \begingroup \makeatletter \@ifundefined{slf@pgno}% @@ -2113,10 +2111,11 @@ \itemindent=\z@\labelwidth=\z@% \labelsep=\z@\listparindent=\z@% \begin{stc@verse}% - \@ifundefined{c@lotdepth}{}{\c@tocdepth=\c@sectlotdepth} - \ifnum\c@tocdepth<1\relax\c@tocdepth=1\fi - \leavevmode\\\mtc@BBR - \vskip -.5\baselineskip + \@ifundefined{c@lotdepth}% + {}% + {\c@lotdepth=\c@sectlotdepth + \ifnum\c@lotdepth<1\relax\c@lotdepth=1\fi} + \leavevmode\\\mtc@BBR\vskip -.5\baselineskip \begingroup \makeatletter \@ifundefined{slt@pgno}% @@ -2137,7 +2136,7 @@ \def\schapter{schapter} \let\sv@sect\@sect \gdef\@sect#1#2#3#4#5#6[#7]#8{% -\ifnum #2=1 +\ifnum #2=1\relax \addcontentsline{lof}{xsect}{#7}% \addcontentsline{lot}{xsect}{#7}% \fi @@ -2152,7 +2151,7 @@ \addcontentsline{lof}{xsect}{#7}% \addcontentsline{lot}{xsect}{#7}% \fi -\ifnum #2>\c@secnumdepth +\ifnum #2>\c@secnumdepth\relax \let\@svsec\@empty \else \refstepcounter{#1}% @@ -2165,7 +2164,7 @@ {\interlinepenalty \@M #8\par}% \endgroup \csname #1mark\endcsname{#7}\addcontentsline - {toc}{#1}{\ifnum #2>\c@secnumdepth + {toc}{#1}{\ifnum #2>\c@secnumdepth\relax \else \protect\numberline{\csname the#1\endcsname}% \fi @@ -2174,7 +2173,7 @@ \def\@svsechd{#6\hskip #3\relax \@svsec #8\csname #1mark\endcsname {#7}\addcontentsline - {toc}{#1}{\ifnum #2>\c@secnumdepth + {toc}{#1}{\ifnum #2>\c@secnumdepth\relax \else \protect\numberline{\csname the#1\endcsname} \fi @@ -3076,11 +3075,11 @@ \fi } \@namedef{mtc@ltypetable@parttoc}{parttoc}\def\mtc@ltypetable@parttoc{parttoc} -\@namedef{mtc@ltypetable@partlot}{partlot}\def\mtc@ltypetable@partlot{partlot} \@namedef{mtc@ltypetable@partlof}{partlof}\def\mtc@ltypetable@partlof{partlof} +\@namedef{mtc@ltypetable@partlot}{partlot}\def\mtc@ltypetable@partlot{partlot} \@namedef{mtc@ltypetable@minitoc}{minitoc}\def\mtc@ltypetable@minitoc{minitoc} -\@namedef{mtc@ltypetable@minilot}{minilot}\def\mtc@ltypetable@minilot{minilot} \@namedef{mtc@ltypetable@minilof}{minilof}\def\mtc@ltypetable@minilof{minilof} +\@namedef{mtc@ltypetable@minilot}{minilot}\def\mtc@ltypetable@minilot{minilot} \@namedef{mtc@ltypetable@secttoc}{secttoc}\def\mtc@ltypetable@secttoc{secttoc} \@namedef{mtc@ltypetable@sectlof}{sectlof}\def\mtc@ltypetable@sectlof{sectlof} \@namedef{mtc@ltypetable@sectlot}{sectlot}\def\mtc@ltypetable@sectlot{sectlot} @@ -3178,13 +3177,13 @@ \mtcPackageInfo[<I0013>]{minitoc}% {\string\mtcsetdepth\space redefines the counter\MessageBreak "\mtc@tmpde@name" as "\the\mtc@toks"}% - \expandafter\setcounter{\mtc@tmpde@name}{#2}}% + \expandafter\csname c@\mtc@tmpde@name\endcsname=#2}% \else \mtcPackageError[<E0010>]{minitoc}% {\string\mtcsetdepth:\space Illegal type of table (#1)}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX}{\relax} -\fi}% end of \mtcsettitle +\fi}% end of \mtcsetdepth \newif\if@mtc@Himtoc@ \@mtc@Himtoc@false \newcommand{\mtc@savetocdepth}{\xdef\mtc@sv@tocdepth{\arabic{tocdepth}}}% \newcommand{\mtc@restoretocdepth}{\setcounter{tocdepth}{\mtc@sv@tocdepth}}% @@ -3402,7 +3401,16 @@ {You have forced the use of short extensions}} \newif\if@mtc@ss@insection@ \@mtc@ss@insection@false \@ifundefined{chapter}{% - \@ifundefined{section}{}% + \@ifundefined{section}{\DeclareOption{insection}{% + \mtcPackageError[<E0035>]{minitoc}% + {You have used the `insection' option in + \MessageBreak + a document where chapters are defined. + \MessageBreak + This is not compatible: option ignored.}% + {Remove this option.\MessageBreak + Type <return> and rerun LaTeX} + }}% {% \DeclareOption{insection}% {\@mtc@ss@insection@true}% @@ -4070,7 +4078,7 @@ \if@longextensions@ \else \if@mtc@part@def@ - \ifnum 99 < \value{ptc} + \ifnum 99 < \value{ptc}\relax \@mtc@hints@given@true \mtcPackageWarningNoLine[<W0054>]{minitoc(hints)}% {You have used short extensions\MessageBreak @@ -4078,7 +4086,7 @@ \fi \fi \if@mtc@chapter@def@ - \ifnum 99 < \value{mtc} + \ifnum 99 < \value{mtc}\relax \@mtc@hints@given@true \mtcPackageWarningNoLine[<W0053>]{minitoc(hints)}% {You have used short extensions\MessageBreak @@ -4086,7 +4094,7 @@ \fi \else \if@mtc@section@def@ - \ifnum 99 < \value{stc} + \ifnum 99 < \value{stc}\relax \@mtc@hints@given@true \mtcPackageWarningNoLine[<W0055>]{minitoc(hints)}% {You have used short extensions\MessageBreak @@ -4291,7 +4299,8 @@ \mtc@addtomaf{\jobname.plf\arabic{ptc}} \mtc@addtomaf{\jobname.plt\arabic{ptc}} \advance\c@ptc\m@ne\repeat} -\@ifundefined{c@mtc}{}{\loop\ifnum\c@mtc>\z@\relax +\@ifundefined{c@mtc}{\mtc@addtomaf{\jobname.mtc1}}{% + \loop\ifnum\c@mtc>\z@\relax \mtc@addtomaf{\jobname.mtc\arabic{mtc}} \mtc@addtomaf{\jobname.mlf\arabic{mtc}} \mtc@addtomaf{\jobname.mlt\arabic{mtc}} |