summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/minitoc/minitoc.sty
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-12-05 17:02:16 +0000
committerNorbert Preining <preining@logic.at>2007-12-05 17:02:16 +0000
commit7783322feeec90c418c79f9e5bc1fcdf2b85aaee (patch)
tree8f0fd989e56a0b0324b844b66dde1aef1cc9435d /Master/texmf-dist/tex/latex/minitoc/minitoc.sty
parent5b7f41a22a74abcc6ed54b2c3fa1d5cf62be920c (diff)
minitoc from ctan (2007-12-05)
git-svn-id: svn://tug.org/texlive/trunk@5714 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.sty131
1 files changed, 86 insertions, 45 deletions
diff --git a/Master/texmf-dist/tex/latex/minitoc/minitoc.sty b/Master/texmf-dist/tex/latex/minitoc/minitoc.sty
index fc21cfef30a..c48d09749f6 100644
--- a/Master/texmf-dist/tex/latex/minitoc/minitoc.sty
+++ b/Master/texmf-dist/tex/latex/minitoc/minitoc.sty
@@ -28,13 +28,12 @@
%% 2001 2002 2003 2004 2005 2006 2007 2008
%% Jean-Pierre F. Drucbert
%% <jean-pierre.drucbert@onera.fr>
-\makeatletter
\NeedsTeXFormat{LaTeX2e}[1996/06/02]%
\ProvidesPackage{minitoc}%
- [2007/06/29 v55 Package minitoc (JPFD)] % message I0000
+ [2007/12/04 v56 Package minitoc (JPFD)] % message I0000
\RequirePackage{mtcmess}[2006/03/14]
\mtcPackageInfo[I0001]{minitoc}%
- {*** minitoc package, version 55 ***\@gobble}
+ {*** minitoc package, version 56 ***\@gobble}
\newwrite\tf@mtc
\newlength\mtcindent
\newskip\mtcskipamount
@@ -192,7 +191,6 @@
\def\toclevel@xpart{1000}%
\def\toclevel@xchapter{1000}%
\def\toclevel@xsect{1000}%
- \def\toclevel@xsection{1000}%
\let\toclevel@starpart\toclevel@part
\let\toclevel@starchapter\toclevel@chapter
\let\toclevel@starsection\toclevel@section
@@ -386,15 +384,15 @@
\def\mtc@BBR{\unpenalty\nopagebreak[4]}
\mtcPackageInfo[I0002]{minitoc}%
{Autoconfiguration of extensions\@gobble}
-\newif\if@longextensions@\@longextensions@false
-\immediate\openout\tf@mtc \jobname.mtc1
-\immediate\write\tf@mtc{\string\@longextensions@true}
+\newif\if@mtc@longext@\@mtc@longext@false
+\immediate\openout\tf@mtc \jobname.mtc0
+\immediate\write\tf@mtc{\string\@mtc@longext@true}
\immediate\closeout\tf@mtc
\immediate\openout\tf@mtc \jobname.mtc
-\immediate\write\tf@mtc{\string\@longextensions@false}
+\immediate\write\tf@mtc{\string\@mtc@longext@false}
\immediate\closeout\tf@mtc
-\input{\jobname.mtc1}
-\if@longextensions@
+\input{\jobname.mtc0}
+\if@mtc@longext@
\mtcPackageInfo[I0012]{minitoc}%
{Long extensions (Unix-like) will be used\@gobble}
\mtcPackageInfo[I0031]{minitoc}%
@@ -411,7 +409,7 @@
\fi
\immediate\openout\tf@mtc \jobname.mtc
\immediate\closeout\tf@mtc
-\immediate\openout\tf@mtc \jobname.mtc1
+\immediate\openout\tf@mtc \jobname.mtc0
\immediate\closeout\tf@mtc
\@ifundefined{@inputcheck}%
{\mtcPackageWarningNoLine[W0021]{minitoc}%
@@ -665,7 +663,7 @@
\def\minitoc{\@ifnextchar[{\minitoc@}{\minitoc@[d]}}
\def\minitoc@[#1]{%
\global\@minitoc@used@true
-\if@longextensions@
+\if@mtc@longext@
\def\@tocfile{mtc\The@mtc}%
\else
\def\@tocfile{M\The@mtc}%
@@ -735,7 +733,7 @@
\def\minilof{\@ifnextchar[{\minilof@}{\minilof@[d]}}
\def\minilof@[#1]{%
\global\@minilof@used@true
-\if@longextensions@%
+\if@mtc@longext@%
\def\@tocfile{mlf\The@mtc}%
\else
\def\@tocfile{F\The@mtc}%
@@ -803,7 +801,7 @@
\def\minilot{\@ifnextchar[{\minilot@}{\minilot@[d]}}
\def\minilot@[#1]{%
\global\@minilot@used@true
-\if@longextensions@%
+\if@mtc@longext@%
\def\@tocfile{mlt\The@mtc}%
\else
\def\@tocfile{T\The@mtc}%
@@ -1028,7 +1026,7 @@
\gdef\themtc{\arabic{mtc}}%
\expandafter\ifx\csname #1\endcsname\chapter
\stepcounter{mtc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.mtc\themtc\@gobble}%
\def\mtcname{\jobname.mtc\themtc}%
@@ -1042,7 +1040,7 @@
\fi
\expandafter\ifx\csname #1\endcsname\appendix
\stepcounter{mtc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.mtc\themtc\@gobble}%
\def\mtcname{\jobname.mtc\themtc}%
@@ -1075,7 +1073,7 @@
\fi
\expandafter\ifx\csname #1\endcsname\starchapter
\stepcounter{mtc}%
- \if@longextensions@
+ \if@mtc@longext@
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.mtc\themtc\@gobble}%
\def\mtcname{\jobname.mtc\themtc}%
@@ -1148,7 +1146,7 @@
\gdef\themtc{\arabic{mtc}}%
\expandafter\ifx\csname #1\endcsname\xchapter
\stepcounter{mtc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.mlf\themtc\@gobble}
\def\mlfname{\jobname.mlf\themtc}%
@@ -1209,7 +1207,7 @@
\gdef\themtc{\arabic{mtc}}%
\expandafter\ifx\csname #1\endcsname\xchapter
\stepcounter{mtc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.mlt\themtc\@gobble}%
\def\mltname{\jobname.mlt\themtc}%
@@ -1395,7 +1393,7 @@
\def\parttoc{\@ifnextchar[{\parttoc@}{\parttoc@[d]}}
\def\parttoc@[#1]{%
\global\@parttoc@used@true
-\if@longextensions@%
+\if@mtc@longext@%
\def\@tocfile{ptc\Thepart}%
\else
\def\@tocfile{P\Thepart}%
@@ -1461,7 +1459,7 @@
\def\partlof{\@ifnextchar[{\partlof@}{\partlof@[d]}}
\def\partlof@[#1]{%
\global\@partlof@used@true
-\if@longextensions@%
+\if@mtc@longext@%
\def\@tocfile{plf\Thepart}%
\else
\def\@tocfile{G\Thepart}%
@@ -1535,7 +1533,7 @@
\def\partlot{\@ifnextchar[{\partlot@}{\partlot@[d]}}
\def\partlot@[#1]{%
\global\@partlot@used@true
-\if@longextensions@%
+\if@mtc@longext@%
\def\@tocfile{plt\Thepart}%
\else
\def\@tocfile{U\Thepart}%
@@ -1595,7 +1593,7 @@
\@fileswfalse\mtc@hook@beforeinputfile
\plt@setform
\openpartlot
- \@input{\jobname.\@tocfile}5
+ \@input{\jobname.\@tocfile}%
\closepartlot
\vspace{-1ex} \vspace{-1\baselineskip}
\leavevmode\mtc@strut
@@ -1707,7 +1705,7 @@
\def\PTC@contentsline#1#2#3#4{%
\expandafter\ifx\csname #1\endcsname\part
\stepcounter{ptc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.ptc\theptc\@gobble}%
\def\ptcname{\jobname.ptc\theptc}%
@@ -1721,7 +1719,7 @@
\fi
\expandafter\ifx\csname #1\endcsname\starpart\relax
\stepcounter{ptc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.ptc\theptc}%
\def\ptcname{\jobname.ptc\theptc}%
@@ -1819,7 +1817,7 @@
\def\PLF@contentsline#1#2#3#4{%
\expandafter\ifx\csname #1\endcsname\xpart
\stepcounter{ptc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.plf\theptc}%
\def\plfname{\jobname.plf\theptc}%
@@ -1879,7 +1877,7 @@
\def\PLT@contentsline#1#2#3#4{%
\expandafter\ifx\csname #1\endcsname\xpart
\stepcounter{ptc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.plt\theptc}%
\def\pltname{\jobname.plt\theptc}%
@@ -1987,7 +1985,7 @@
\def\secttoc{\@ifnextchar[{\secttoc@}{\secttoc@[d]}}
\def\secttoc@[#1]{%
\global\@secttoc@used@true
-\if@longextensions@%
+\if@mtc@longext@%
\def\@tocfile{stc\thestc}%
\else
\def\@tocfile{S\thestc}%
@@ -2054,7 +2052,7 @@
\def\sectlof{\@ifnextchar[{\sectlof@}{\sectlof@[d]}}
\def\sectlof@[#1]{%
\global\@sectlof@used@true
-\if@longextensions@%
+\if@mtc@longext@%
\def\@tocfile{slf\thestc}%
\else
\def\@tocfile{H\thestc}%
@@ -2121,7 +2119,7 @@
\def\sectlot{\@ifnextchar[{\sectlot@}{\sectlot@[d]}}
\def\sectlot@[#1]{%
\global\@sectlot@used@true
-\if@longextensions@%
+\if@mtc@longext@%
\def\@tocfile{slt\thestc}%
\else
\def\@tocfile{I\thestc}%
@@ -2189,7 +2187,7 @@
\def\l@xsect{\@dottedtocline{\@M}{1.0em}{2.3em}}
\def\l@xsection{\@dottedtocline{\@M}{1.0em}{2.3em}}
\def\l@schapter{\@dottedtocline{1}{1.0em}{2.3em}}
-\def\xsect{xsect} \def\xsection{xsection} \def\schapter{schapter}
+\def\xsect{xsect} \def\schapter{schapter}
\let\sv@sect\@sect
\gdef\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2=1\relax
@@ -2328,7 +2326,7 @@
\gdef\thestc{\arabic{stc}}%
\expandafter\ifx\csname #1\endcsname\section
\stepcounter{stc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.stc\thestc}%
\def\stcname{\jobname.stc\thestc}%
@@ -2359,7 +2357,7 @@
\ifx\csname #1\endcsname\starsection
\stepcounter{stc}%
\gdef\thestc{\arabic{stc}}
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.stc\thestc}%
\def\stcname{\jobname.stc\thestc}%
@@ -2424,7 +2422,7 @@
\gdef\thestc{\arabic{stc}}%
\expandafter\ifx\csname #1\endcsname\xsect
\stepcounter{stc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.slf\thestc}%
\def\slfname{\jobname.slf\thestc}%
@@ -2484,7 +2482,7 @@
\gdef\thestc{\arabic{stc}}%
\expandafter\ifx\csname #1\endcsname\xsect
\stepcounter{stc}%
- \if@longextensions@%
+ \if@mtc@longext@%
\mtcPackageInfo[I0033]{minitoc}%
{Writing\space\jobname.slt\thestc}%
\def\sltname{\jobname.slt\thestc}%
@@ -2570,6 +2568,25 @@
without any previous check\@gobble}%
\fi
}
+\def\gobbleopt@[#1]{\relax}
+\AtBeginDocument{\if@filesw\relax\else
+ \mtcPackageWarningNoLine[W0098]{minitoc}%
+ {--- You have used the \string\nofiles\space command
+ \MessageBreak
+ in your preamble; all preparation commands
+ \MessageBreak
+ in the body of the document will be ignored}
+\def\doparttoc{\@ifnextchar[{\gobbleopt@}{\gobbleopt@[l]}}
+\def\dopartlof{\@ifnextchar[{\gobbleopt@}{\gobbleopt@[l]}}
+\def\dopartlot{\@ifnextchar[{\gobbleopt@}{\gobbleopt@[l]}}
+\def\dominitoc{\@ifnextchar[{\gobbleopt@}{\gobbleopt@[l]}}
+\def\dominilof{\@ifnextchar[{\gobbleopt@}{\gobbleopt@[l]}}
+\def\dominilot{\@ifnextchar[{\gobbleopt@}{\gobbleopt@[l]}}
+\def\dosecttoc{\@ifnextchar[{\gobbleopt@}{\gobbleopt@[l]}}
+\def\dosectlof{\@ifnextchar[{\gobbleopt@}{\gobbleopt@[l]}}
+\def\dosectlot{\@ifnextchar[{\gobbleopt@}{\gobbleopt@[l]}}
+\def\mtcprepare{\@ifnextchar[{\gobbleopt@}{\gobbleopt@[l]}}
+\fi}
\@ifundefined{section}{}{\let\l@listof\l@section}
\@ifundefined{chapter}{}{\let\l@listof\l@chapter}
\@ifundefined{part}{}{\let\l@starpart\l@part}
@@ -3377,6 +3394,7 @@
\newif\if@mtc@Himlof@ \@mtc@Himlof@false
\AtBeginDocument{%
\@ifundefined{c@lofdepth}{%
+ \providecommand{\mtc@savelofdepth}{\empty}
\newenvironment{mtchideinmainlof}[1][-1]%
{\if@mtc@Himlof@\mtcPackageError[E0003]{minitoc}%
{Imbrication of mtchideinmainlof environments}%
@@ -3389,11 +3407,11 @@
{\if@mtc@Himlof@\else\mtcPackageError[E0029]{minitoc}%
{Unbalanced mtchideinmainlof environment}%
{The hiding in main LoF could be incorrect}\fi
- \global\@mtc@Himtoc@false
+ \global\@mtc@Himlof@false
\addtocontents{lof}{\protect\mtc@restoretocdepth}%
}}%
{%
- \newcommand{\mtc@savelofdepth}{\xdef{\mtc@sv@lofdepth{\arabic{lofdepth}}}}%
+ \newcommand{\mtc@savelofdepth}{\xdef\mtc@sv@lofdepth{\arabic{lofdepth}}}%
\newcommand{\mtc@restorelofdepth}{\setcounter{lofdepth}{\mtc@sv@lofdepth}}%
\newenvironment{mtchideinmainlof}[1][-1]%
{\if@mtc@Himlof@\mtcPackageError[E0003]{minitoc}%
@@ -3410,6 +3428,7 @@
\newif\if@mtc@Himlot@ \@mtc@Himlot@false
\AtBeginDocument{%
\@ifundefined{c@lotdepth}{%
+ \providecommand{\mtc@savelotdepth}{\empty}
\newenvironment{mtchideinmainlot}[1][-1]%
{\if@mtc@Himlot@\mtcPackageError[E0004]{minitoc}%
{Imbrication of mtchideinmainlot environments}%
@@ -3426,7 +3445,7 @@
\addtocontents{lot}{\protect\mtc@restoretocdepth}%
}}%
{%
- \newcommand{\mtc@savelotdepth}{\xdef{\mtc@sv@lotdepth{\arabic{lotdepth}}}}%
+ \newcommand{\mtc@savelotdepth}{\xdef\mtc@sv@lotdepth{\arabic{lotdepth}}}%
\newcommand{\mtc@restorelotdepth}{\setcounter{lotdepth}{\mtc@sv@lotdepth}}%
\newenvironment{mtchideinmainlot}[1][-1]%
{\if@mtc@Himlot@\mtcPackageError[E0004]{minitoc}%
@@ -3434,12 +3453,12 @@
{The hiding in main LoT could be incorrect}\fi
\global\@mtc@Himlot@true
\addtocontents{lot}{\protect\mtc@savelotdepth}%
- \addtocontents{lot}{\protect\setcounter{lotdepth}{#1}}}%
+ \addtocontents{lot}{\protect\setcounter{tocdepth}{#1}}}%
{\if@mtc@Himlot@\else\mtcPackageError[E0030]{minitoc}%
{Unbalanced mtchideinmainlot environment}%
{The hiding in main LoT could be incorrect}\fi
\global\@mtc@Himlot@false
- \addtocontents{lot}{\protect\mtc@restorelotdepth}}}}
+ \addtocontents{lot}{\protect\mtc@restoretocdepth}}}}
\@ifundefined{chapter}{%
\@ifundefined{section}%
{\mtcPackageWarningNoLine[W0001]{minitoc}%
@@ -3634,7 +3653,7 @@
\DeclareOption{dotted}{\undottedmtcfalse} % default
\DeclareOption{notoccite}{\@mtc@notoccite@true}
\DeclareOption{shortext}{%
- \@longextensions@false
+ \@mtc@longext@false
\mtcPackageWarningNoLine[W0020]{minitoc}%
{You have forced the use of short extensions}}
\newif\if@mtc@ss@insection@ \@mtc@ss@insection@false
@@ -3750,6 +3769,10 @@
\MessageBreak
in the \string\jobname.log file.
\MessageBreak
+ The full list of the missing language files
+ \MessageBreak
+ is given in the W0094 warning message.
+ \MessageBreak
Please install the missing files from
\MessageBreak
a recent distribution
@@ -3779,6 +3802,7 @@
\mtc@setlangopt{bahasam}%
\mtc@setlangopt{bangla}%
\mtc@setlangopt{basque}%
+\mtc@setlangopt{bengali}%
\mtc@setlangopt{bicig}%
\mtc@setlangopt{bicig2}%
\mtc@setlangopt{bicig3}%
@@ -3877,10 +3901,14 @@
\mtc@setlangopt{magyar2}%
\mtc@setlangopt{magyar3}%
\mtc@setlangopt{malay}%
+\mtc@setlangopt{malayalam-b}%
\mtc@setlangopt{malayalam-keli}%
+\mtc@setlangopt{malayalam-keli2}%
+\mtc@setlangopt{malayalam-mr}%
\mtc@setlangopto{malayalam-omega}%
\mtc@setlangopt{malayalam-rachana}%
\mtc@setlangopt{malayalam-rachana2}%
+\mtc@setlangopt{malayalam-rachana3}%
\mtc@setlangopt{manju}%
\mtc@setlangopt{meyalu}%
\mtc@setlangopt{mongol}%
@@ -3924,6 +3952,7 @@
\mtc@setlangopt{spanish2}%
\mtc@setlangopt{spanish3}%
\mtc@setlangopt{spanish4}%
+\mtc@setlangopt{swahili}%
\mtc@setlangopt{swedish}%
\mtc@setlangopt{swedish2}%
\mtc@setlangopto{thai}%
@@ -4010,6 +4039,14 @@
See the minitoc package documentation
\MessageBreak
for specific precautions\@gobble}}{}%
+\@ifpackageloaded{titlesec}%
+ {\@mtc@hints@given@true
+ \mtcPackageWarningNoLine[W0099]{minitoc(hints)}%
+ {--- The titlesec package is loaded.
+ \MessageBreak
+ It is incompatible
+ \MessageBreak
+ with the minitoc package}}{}%
\@ifpackageloaded{titletoc}%
{\@mtc@hints@given@true
\mtcPackageWarningNoLine[W0040]{minitoc(hints)}%
@@ -4520,7 +4557,7 @@
\fi
\fi
\def\mtc@hints@checklongext{%
-\if@longextensions@
+\if@mtc@longext@
\else
\if@mtc@part@def@
\ifnum 99 < \value{ptc}\relax \@mtc@hints@given@true
@@ -4848,18 +4885,19 @@
Creating the \jobname.maf file\@gobble}
\immediate\closeout\tf@mtc
\immediate\openout\tf@mtc \jobname.maf
- \if@longextensions@\mtc@maf@long\else\mtc@maf@short\fi
+ \if@mtc@longext@\mtc@maf@long\else\mtc@maf@short\fi
\immediate\closeout\tf@mtc}
\def\mtc@addtomaf#1{%
\IfFileExists{#1}{\immediate\write\tf@mtc{#1}}{}}
\def\mtc@maf@long{%
\mtc@addtomaf{\jobname.mtc}
+ \mtc@addtomaf{\jobname.mtc0}
\@ifundefined{c@ptc}{}{\loop\ifnum\c@ptc>\z@\relax
\mtc@addtomaf{\jobname.ptc\arabic{ptc}}
\mtc@addtomaf{\jobname.plf\arabic{ptc}}
\mtc@addtomaf{\jobname.plt\arabic{ptc}}
\advance\c@ptc\m@ne\repeat}
-\@ifundefined{c@mtc}{\mtc@addtomaf{\jobname.mtc1}}{%
+\@ifundefined{c@mtc}{}{%
\loop\ifnum\c@mtc>\z@\relax
\mtc@addtomaf{\jobname.mtc\arabic{mtc}}
\mtc@addtomaf{\jobname.mlf\arabic{mtc}}
@@ -4930,7 +4968,10 @@
\providecommand{\sectlof}[1][l]{\mtc@classck{sectlof}}%
\providecommand{\sectlot}[1][l]{\mtc@classck{sectlot}}%
}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+
+%%
+%%
\endinput
%%
%% End of file `minitoc.sty'.