From 4d4fe569c8fd3aa109b21399493671c6d0002ccf Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 1 Jul 2008 01:00:28 +0000
Subject: minitoc 58 (27jun08)

git-svn-id: svn://tug.org/texlive/trunk@9130 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/minitoc/minitoc.sty | 118 ++++++++++++++++--------
 1 file changed, 77 insertions(+), 41 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/minitoc/minitoc.sty')

diff --git a/Master/texmf-dist/tex/latex/minitoc/minitoc.sty b/Master/texmf-dist/tex/latex/minitoc/minitoc.sty
index 719751df56c..d52e0dedc11 100644
--- a/Master/texmf-dist/tex/latex/minitoc/minitoc.sty
+++ b/Master/texmf-dist/tex/latex/minitoc/minitoc.sty
@@ -28,12 +28,13 @@
 %%           2001 2002 2003 2004 2005 2006 2007 2008
 %% Jean-Pierre F. Drucbert
 %% <jean-pierre.drucbert@onera.fr>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \NeedsTeXFormat{LaTeX2e}[1996/06/02]%
 \ProvidesPackage{minitoc}%
-   [2008/04/03 v57 Package minitoc (JPFD)] % message I0000
+   [2008/06/26 v58 Package minitoc (JPFD)] % message I0000
 \RequirePackage{mtcmess}[2006/03/14]
 \mtcPackageInfo[I0001]{minitoc}%
-   {*** minitoc package, version 57 ***\@gobble}
+   {*** minitoc package, version 58 ***\@gobble}
 \newwrite\tf@mtc
 \newlength\mtcindent
 \newskip\mtcskipamount
@@ -77,6 +78,15 @@
             \def\mlfoffset{0pt}%
             \def\mltoffset{0pt}%
                            }%
+\newif\ifinparttoc\inparttocfalse%
+\newif\ifinpartlof\inpartloffalse%
+\newif\ifinpartlot\inpartlotfalse%
+\newif\ifinsecttoc\insecttocfalse%
+\newif\ifinsectlof\insectloffalse%
+\newif\ifinsectlot\insectlotfalse%
+\newif\ifinminitoc\inminitocfalse%
+\newif\ifinminilof\inminiloffalse%
+\newif\ifinminilot\inminilotfalse%
 \newif\if@mtc@hints@ \@mtc@hints@true
 \newif\if@mtc@hints@w@ \@mtc@hints@w@false
 \newif\if@mtc@hints@given@ \@mtc@hints@given@false
@@ -539,15 +549,24 @@
 \let\aftersecttoc\empty
 \let\aftersectlof\empty
 \let\aftersectlot\empty
-\let\openparttoc\empty \let\closeparttoc\empty
-\let\openpartlof\empty \let\closepartlof\empty
-\let\openpartlot\empty \let\closepartlot\empty
-\let\openminitoc\empty \let\closeminitoc\empty
-\let\openminilof\empty \let\closeminilof\empty
-\let\openminilot\empty \let\closeminilot\empty
-\let\opensecttoc\empty \let\closesecttoc\empty
-\let\opensectlof\empty \let\closesectlof\empty
-\let\opensectlot\empty \let\closesectlot\empty
+\let\openparttoc\empty
+\let\openpartlof\empty
+\let\openpartlot\empty
+\let\openminitoc\empty
+\let\openminilof\empty
+\let\openminilot\empty
+\let\opensecttoc\empty
+\let\opensectlof\empty
+\let\opensectlot\empty
+\let\closeparttoc\empty
+\let\closepartlof\empty
+\let\closepartlot\empty
+\let\closeminitoc\empty
+\let\closeminilof\empty
+\let\closeminilot\empty
+\let\closesecttoc\empty
+\let\closesectlof\empty
+\let\closesectlot\empty
 \@ifundefined{chapter}{%
  \def\thispageparttocstyle{\empty}
  \def\thispagepartlofstyle{\empty}
@@ -715,9 +734,9 @@
   {\let\@dottedtocline\@undottedtocline}{}
   \@fileswfalse\mtc@hook@beforeinputfile
   \mtc@setform%
-  \openminitoc
+  \openminitoc \global\inminitoctrue
   \@input{\jobname.\@tocfile}%
-  \closeminitoc
+  \global\inminitocfalse\closeminitoc
   \vspace{-1ex} \vspace{-\baselineskip}
   \leavevmode\mtc@strut
   \global\@nobreakfalse\endgroup
@@ -787,9 +806,9 @@
   {\let\@dottedtocline\@undottedtocline}{}
   \@fileswfalse\mtc@hook@beforeinputfile
   \mlf@setform
-  \openminilof
+  \global\openminilof\inminiloftrue
   \@input{\jobname.\@tocfile}%
-  \closeminilof
+  \global\inminiloffalse\closeminilof
   \vspace{-1ex} \vspace{-\baselineskip}
   \leavevmode\mtc@strut
   \global\@nobreakfalse\endgroup
@@ -855,9 +874,9 @@
   {\let\@dottedtocline\@undottedtocline}{}
   \@fileswfalse\mtc@hook@beforeinputfile
   \mlt@setform
-  \openminilot
+  \global\openminilot\inminilottrue
   \@input{\jobname.\@tocfile}%
-  \closeminilot
+  \global\inminilotfalse\closeminilot
   \vspace{-1ex} \vspace{-\baselineskip}
   \leavevmode\mtc@strut
   \global\@nobreakfalse\endgroup
@@ -1444,9 +1463,9 @@
      \def\l@chapter##1##2{\l@chapter@SVPN{##1}{\hbox{}}}}{}
   \@fileswfalse\mtc@hook@beforeinputfile
   \ptc@setform
-  \openparttoc
+  \openparttoc\global\inparttoctrue
   \@input{\jobname.\@tocfile}%
-  \closeparttoc
+  \global\inparttocfalse\closeparttoc
   \vspace{-1ex} \vspace{-1\baselineskip}
   \leavevmode\mtc@strut
   \global\@nobreakfalse\endgroup
@@ -1518,9 +1537,9 @@
    {\let\@dottedtocline\@undottedtocline}{}
   \@fileswfalse\mtc@hook@beforeinputfile
   \plf@setform
-  \openpartlof
+  \openpartlof\global\inpartloftrue
   \@input{\jobname.\@tocfile}%
-  \closepartlof
+  \global\inpartloffalse\closepartlof
   \vspace{-1ex} \vspace{-1\baselineskip}
   \leavevmode\mtc@strut
   \global\@nobreakfalse\endgroup
@@ -1592,9 +1611,9 @@
    {\let\@dottedtocline\@undottedtocline}{}
   \@fileswfalse\mtc@hook@beforeinputfile
   \plt@setform
-  \openpartlot
+  \openpartlot\global\inpartlottrue
   \@input{\jobname.\@tocfile}%
-  \closepartlot
+  \global\inpartlotfalse\closepartlot
   \vspace{-1ex} \vspace{-1\baselineskip}
   \leavevmode\mtc@strut
   \global\@nobreakfalse\endgroup
@@ -2038,9 +2057,9 @@
   {\let\@dottedtocline\@undottedtocline}{}
   \@fileswfalse\mtc@hook@beforeinputfile
   \stc@setform%
-  \opensecttoc
+  \opensecttoc\global\insecttoctrue
   \@input{\jobname.\@tocfile}%
-  \closesecttoc
+  \global\insecttocfalse\closesecttoc
   \vspace{-1ex} \vspace{-\baselineskip}
   \leavevmode\mtc@strut
   \global\@nobreakfalse\endgroup
@@ -2107,9 +2126,9 @@
   {\let\@dottedtocline\@undottedtocline}{}
   \@fileswfalse\mtc@hook@beforeinputfile
   \slf@setform%
-  \opensectlof
+  \opensectlof\global\insectloftrue
   \@input{\jobname.\@tocfile}%
-  \closesectlof
+  \global\insectloffalse\closesectlof
   \global\@nobreakfalse\endgroup
         \end{stc@verse}%
         \kernaftersectlof
@@ -2175,9 +2194,9 @@
    \gdef\thestc{\arabic{stc}}
   \@fileswfalse\mtc@hook@beforeinputfile
   \slt@setform%
-  \opensectlot
+  \opensectlot\global\insectlottrue
   \@input{\jobname.\@tocfile}%
-  \closesectlot
+  \global\insectlotfalse\closesectlot
   \global\@nobreakfalse\endgroup
         \end{stc@verse}%
         \kernaftersectlof
@@ -3376,6 +3395,30 @@
        \MessageBreak
        Type <return> and rerun LaTeX}{\relax}%
 \fi}% end of \mtcsetoffset
+\DeclareRobustCommand{\mtcpolymtoc}[4]{%
+      \ifinparttoc\relax{#1}%
+      \else\ifinminitoc\relax{#2}%
+           \else\ifinsecttoc\relax{#3}%
+                \else\relax{#4}
+                \fi
+           \fi
+      \fi}
+\DeclareRobustCommand{\mtcpolymlof}[4]{%
+      \ifinpartlof\relax{#1}%
+      \else\ifinminilof\relax{#2}%
+           \else\ifinsectlof\relax{#3}%
+                \else\relax{#4}
+                \fi
+           \fi
+      \fi}
+\DeclareRobustCommand{\mtcpolymlot}[4]{%
+      \ifinpartlot\relax{#1}%
+      \else\ifinminilot\relax{#2}%
+           \else\ifinsectlot\relax{#3}%
+                \else\relax{#4}
+                \fi
+           \fi
+      \fi}
 \newif\if@mtc@Himtoc@ \@mtc@Himtoc@false
 \newcommand{\mtc@savetocdepth}{\xdef\mtc@sv@tocdepth{\arabic{tocdepth}}}%
 \newcommand{\mtc@restoretocdepth}{\setcounter{tocdepth}{\mtc@sv@tocdepth}}%
@@ -3686,14 +3729,11 @@
 \newcommand{\mtc@setlangopt}[1]{%
    \IfFileExists{#1.mld}%
       {\DeclareOption{#1}{\mtcselectlanguage{#1}}}%
-      {\@mtc@misslangtrue
-       \mtc@addmisslanguage{#1.mld}
+      {\@mtc@misslangtrue \mtc@addmisslanguage{#1.mld}
        \mtcPackageInfo[I0050]{minitoc}%
           {The required "#1.mld" file is missing.
            \MessageBreak
-           The "#1" language option
-           \MessageBreak
-           will not be available.
+           The "#1" language option will not be available.
            \MessageBreak
            Please install it from a recent distribution
            \MessageBreak
@@ -3702,14 +3742,11 @@
 \newcommand{\mtc@setlangopto}[1]{%
    \IfFileExists{#1.mlo}%
      {\mtc@setlangopt{#1}}%
-     {\@mtc@misslangtrue
-      \mtc@addmisslanguage{#1.mlo}
+     {\@mtc@misslangtrue \mtc@addmisslanguage{#1.mlo}
        \mtcPackageInfo[I0051]{minitoc}%
           {The required "#1.mlo" file is missing.
            \MessageBreak
-           The "#1" language option
-           \MessageBreak
-           will not be available.
+           The "#1" language option will not be available.
            \MessageBreak
            Please install it from a recent distribution
            \MessageBreak
@@ -3983,7 +4020,7 @@
 \newif\if@mtc@lot@used@ \global\@mtc@lot@used@false
 \def\mtc@hints@begindoc{%
 \mtcPackageInfo[I0049]{minitoc(hints)}%
-   {==> You requested the hints option
+   {==> You requested the hints option.
     \MessageBreak
     Some hints are eventually given below\@gobble}%
 \@ifpackageloaded{alphanum}%
@@ -4972,7 +5009,6 @@
  \providecommand{\sectlot}[1][l]{\mtc@classck{sectlot}}%
 }
 %%
-%%
 \endinput
 %%
 %% End of file `minitoc.sty'.
-- 
cgit v1.2.3

