diff options
author | Karl Berry <karl@freefriends.org> | 2006-06-19 22:43:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-06-19 22:43:58 +0000 |
commit | 315f6e8cf21d3f57aaefe05b58147de728d5ede0 (patch) | |
tree | a1cace88e0004de97a607a486feab2045bff04aa /Master/texmf-dist/tex/latex/minitoc/minitoc.sty | |
parent | 1c6ae1bc004f1c8a3b49e90c803ebef5030dcdaa (diff) |
minitoc 45
git-svn-id: svn://tug.org/texlive/trunk@1705 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 | 1668 |
1 files changed, 1149 insertions, 519 deletions
diff --git a/Master/texmf-dist/tex/latex/minitoc/minitoc.sty b/Master/texmf-dist/tex/latex/minitoc/minitoc.sty index 18348359ba0..e262ef98376 100644 --- a/Master/texmf-dist/tex/latex/minitoc/minitoc.sty +++ b/Master/texmf-dist/tex/latex/minitoc/minitoc.sty @@ -8,8 +8,8 @@ %% %% This is a generated file. %% -%% Copyright (C) 2005 by: -%% Jean-Pierre F. Drucbert +%% Copyright (C) 2005, 2006 by: +%% Jean-Pierre F. Drucbert (JPFD) %% <jean-pierre.drucbert@onera.fr> %% %% This file may be distributed and/or modified under the conditions of @@ -24,27 +24,56 @@ %% %% This work has the LPPL maintenance status "author-maintained". %% -%% This Current Maintainer of this work is Jean-Pierre F. Drucbert. +%% This Current Maintainer of this work is Jean-Pierre F. Drucbert (JPFD). %% %% This work consists of all the files listed in the file `minitoc.l' %% distributed with it. %% -\NeedsTeXFormat{LaTeX2e}[1996/06/01]% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e}[1996/06/02]% \ProvidesPackage{minitoc}% - [2005/09/16 v43 Package minitoc] -\PackageInfo{minitoc}% - {*** minitoc package, version 43 ***\@gobble} + [2006/06/08 v45 Package minitoc (JPFD)] +\RequirePackage{mtcmess}[2006/03/14] +\mtcPackageInfo[<I0001>]{minitoc}% + {*** minitoc package, version 45 ***\@gobble} \newwrite\tf@mtc \newlength\mtcindent \newskip\mtcskipamount \setlength{\mtcskipamount}{\bigskipamount} -\def\mtcskip{\unskip\removelastskip{\parskip=\z@\addvspace{\mtcskipamount}}} +\def\mtcskip{{\parskip=\z@\addvspace{\mtcskipamount}}} +\def\mtcgapbeforeheads{50\p@} +\def\mtcgapafterheads{40\p@} +\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 \newif\if@mtc@sect@floats@ \@mtc@sect@floats@false \newif\if@mtc@placeinsLoaded@ \@mtc@placeinsLoaded@false \newif\if@mtc@memoirLoaded@ \@mtc@memoirLoaded@false \newif\if@mtc@memoirnew@ \@mtc@memoirnew@false \newif\if@mtc@sectstyLoaded@ \@mtc@sectstyLoaded@false \newif\if@mtc@sectstyLoaded@a@ \@mtc@sectstyLoaded@a@false +\newif\if@mtc@captionLoaded@ \@mtc@captionLoaded@false +\newif\if@mtc@captionLoaded@a@ \@mtc@captionLoaded@a@false +\newif\if@mtc@captionIILoaded@ \@mtc@captionIILoaded@false +\newif\if@mtc@captionIILoaded@a@ \@mtc@captionIILoaded@a@false +\newif\if@mtc@ccaptionLoaded@ \@mtc@ccaptionLoaded@false +\newif\if@mtc@ccaptionLoaded@a@ \@mtc@ccaptionLoaded@a@false +\newif\if@mtc@mcaptionLoaded@ \@mtc@mcaptionLoaded@false +\newif\if@mtc@mcaptionLoaded@a@ \@mtc@mcaptionLoaded@a@false +\newif\if@mtc@varsectsLoaded@ \@mtc@varsectsLoaded@false +\newif\if@mtc@varsectsLoaded@a@ \@mtc@varsectsLoaded@a@false +\newif\if@mtc@fncychapLoaded@ \@mtc@fncychapLoaded@false +\newif\if@mtc@fncychapLoaded@a@ \@mtc@fncychapLoaded@a@false +\newif\if@mtc@quotchapLoaded@ \@mtc@quotchapLoaded@false +\newif\if@mtc@quotchapLoaded@a@ \@mtc@quotchapLoaded@a@false +\newif\if@mtc@romannumLoaded@ \@mtc@romannumLoaded@false +\newif\if@mtc@romannumLoaded@a@ \@mtc@romannumLoaded@a@false +\newif\if@mtc@sfheadersLoaded@ \@mtc@sfheadersLoaded@false +\newif\if@mtc@sfheadersLoaded@a@ \@mtc@sfheadersLoaded@a@false +\newif\if@mtc@alnumsecLoaded@ \@mtc@alnumsecLoaded@false +\newif\if@mtc@alnumsecLoaded@a@ \@mtc@alnumsecLoaded@a@false +\newif\if@mtc@captcontLoaded@ \@mtc@captcontLoaded@false +\newif\if@mtc@captcontLoaded@a@ \@mtc@captcontLoaded@a@false \newif\if@mtc@empty@parttoc@ \@mtc@empty@parttoc@false \newif\if@mtc@empty@partlof@ \@mtc@empty@partlof@false \newif\if@mtc@empty@partlot@ \@mtc@empty@partlot@false @@ -87,12 +116,34 @@ \newif\if@firstpartis@used@ \global\@firstpartis@used@false \newif\if@firstchapteris@used@ \global\@firstchapteris@used@false \newif\if@firstsectionis@used@ \global\@firstsectionis@used@false +\newif\ifmtcsecondpart \mtcsecondpartfalse +\AtBeginDocument{% + \ifmtcsecondpart + \global\mtcsecondparttrue + \else + \global\mtcsecondpartfalse + \fi} +\AtEndDocument{% +\ifnum\value{part}=2\relax + \mtcsecondparttrue +\else + \mtcsecondpartfalse +\fi +\if@filesw + \ifmtcsecondpart + \immediate\write\@mainaux + {\string\global\string\mtcsecondparttrue}% + \else + \immediate\write\@mainaux + {\string\global\string\mtcsecondpartfalse}% + \fi +\fi} \newif\if@mtc@notoccite@ \@mtc@notoccite@false \@ifundefined{mtc@hook@beforeinputfile}% {\let\mtc@hook@beforeinputfile\relax}{} \newif\iftightmtc \tightmtcfalse \newif\ifktightmtc \ktightmtcfalse -\PackageInfo{minitoc}{*** compatible with hyperref ***\@gobble} +\mtcPackageInfo[<I0005>]{minitoc}{compatible with hyperref\@gobble} \newif\if@mtc@hyper@used@ \global\@mtc@hyper@used@false \AtBeginDocument{% \@ifpackageloaded{hyperref}{% @@ -107,32 +158,55 @@ \let\toclevel@starsubsubsection\toclevel@subsubsection \let\toclevel@starparagraph\toclevel@paragraph \let\toclevel@starsubparagraph\toclevel@subparagraph - }{}% -} + }{}} \@ifpackageloaded{sectsty}{\@mtc@sectstyLoaded@true}{} \AtBeginDocument{\@ifpackageloaded{sectsty}{\@mtc@sectstyLoaded@a@true}{}} + \@ifpackageloaded{varsects}{\@mtc@varsectsLoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{varsects}{\@mtc@varsectsLoaded@a@true}{}} + \@ifpackageloaded{fncychap}{\@mtc@fncychapLoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{fncychap}{\@mtc@fncychapLoaded@a@true}{}} + \@ifpackageloaded{quotchap}{\@mtc@quotchapLoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{quotchap}{\@mtc@quotchapLoaded@a@true}{}} + \@ifpackageloaded{romannum}{\@mtc@romannumLoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{romannum}{\@mtc@romannumLoaded@a@true}{}} + \@ifpackageloaded{sfheaders}{\@mtc@sfheadersLoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{sfheaders}{\@mtc@sfheadersLoaded@a@true}{}} + \@ifpackageloaded{alnumsec}{\@mtc@alnumsecLoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{alnumsec}{\@mtc@alnumsecLoaded@a@true}{}} + \@ifpackageloaded{captcont}{\@mtc@captcontLoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{captcont}{\@mtc@captcontLoaded@a@true}{}} + \@ifpackageloaded{caption}{\@mtc@captionLoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{caption}{\@mtc@captionLoaded@a@true}{}} + \@ifpackageloaded{caption2}{\@mtc@captionIILoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{caption2}{\@mtc@captionIILoaded@a@true}{}} + \@ifpackageloaded{ccaption}{\@mtc@ccaptionLoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{ccaption}{\@mtc@ccaptionLoaded@a@true}{}} + \@ifpackageloaded{mcaption}{\@mtc@mcaptionLoaded@true}{} + \AtBeginDocument{\@ifpackageloaded{mcaption}{\@mtc@mcaptionLoaded@a@true}{}} \newif\if@mtcpatchmemoir@ \@mtcpatchmemoir@false -\@ifclassloaded{memoir}% - {\@mtc@memoirLoaded@true\relax% - \PackageInfo{minitoc}% - {*** the memoir class is loaded: compatibility attempted ***\@gobble}}% - {\@mtc@memoirLoaded@false} +\@ifclassloaded{memoir}{\@mtc@memoirLoaded@true\relax% + \mtcPackageInfo[<I0030>]{minitoc}% + {the memoir class is loaded:\MessageBreak + compatibility attempted\@gobble}}% + {\@mtc@memoirLoaded@false} \if@mtc@memoirLoaded@ \@ifundefined{@m@mchapter}% - {\@mtc@memoirnew@false\PackageInfo{minitoc}% - {*** old version of the memoir class ***\@gobble}} - {\@mtc@memoirnew@true\PackageInfo{minitoc}% - {*** recent version of the memoir class ***\@gobble} - \PackageInfo{minitoc}{*** This version of the memoir class uses \MessageBreak - a version of \string\chapter\space which is \MessageBreak - incompatible with the minitoc package. \MessageBreak - We try to patch ***\@gobble}% + {\@mtc@memoirnew@false\mtcPackageInfo[<I0020>]{minitoc}% + {old version of the memoir class\@gobble}} + {\@mtc@memoirnew@true\mtcPackageInfo[<I0027>]{minitoc}% + {recent version of the memoir class\@gobble} + \mtcPackageInfo[<I0032>]{minitoc}% + {This version of the memoir class uses \MessageBreak + a version of \string\chapter\space which is \MessageBreak + incompatible with the minitoc package. \MessageBreak + We try to patch\@gobble}% \@mtcpatchmemoir@true} \fi \if@mtcpatchmemoir@ -\InputIfFileExists{mtcpatchmem.sty}{}{% - \Package{Error}{minitoc} - {*** Unable to patch the memoir class ***}% +\IfFileExists{mtcpatchmem.sty}{% + \@ifclasslater{memoir}{2005/09/25}{}{\RequirePackage{mtcpatchmem}}}{% + \mtcPackage[<E0028>]{Error}{minitoc} + {Unable to patch the memoir class}% {So it remains incompatible. Sorry.}} \fi \begingroup @@ -198,11 +272,11 @@ \def\mtc@onebackchap{\addtocounter{mtc}{-1}} \def\mtc@onebacksect{\addtocounter{stc}{-1}} \@ifundefined{part}{% - \PackageWarningNoLine{minitoc}% - {*** part level macros NOT available ***} + \mtcPackageWarningNoLine[<W0018>]{minitoc}% + {part level macros NOT available} }{%% else undefined part (\part defined) - \PackageInfo{minitoc}% - {*** part level macros available ***\@gobble} + \mtcPackageInfo[<I0023>]{minitoc}% + {part level macros available\@gobble} \let\mtc@svspart\@spart \def\@spart{\stepcounter{ptc}\mtc@svspart} \let\mtc@svpart\@part @@ -214,16 +288,16 @@ \addcontentsline{lot}{xpart}{}% \adjustptc} }% -\@ifundefined{chapter}{\PackageInfo{minitoc}% - {*** chapter level macros NOT available ***\@gobble}% - \@ifundefined{section}{\PackageInfo{minitoc}% - {*** section level macros NOT available ***\@gobble}% - \PackageWarningNoLine{minitoc}% - {*** no section or chapter level macros available *** +\@ifundefined{chapter}{\mtcPackageInfo[<I0004>]{minitoc}% + {chapter level macros NOT available\@gobble}% + \@ifundefined{section}{\mtcPackageInfo[<I0029>]{minitoc}% + {section level macros NOT available\@gobble}% + \mtcPackageWarningNoLine[<W0017>]{minitoc}% + {no section or chapter level macros available \MessageBreak - *** PLEASE VERIFY YOUR MAIN DOCUMENT CLASS ***}}% - {\PackageInfo{minitoc}% - {*** section level macros available ***\@gobble}% + PLEASE VERIFY YOUR MAIN DOCUMENT CLASS}}% + {\mtcPackageInfo[<I0028>]{minitoc}% + {section level macros available\@gobble}% \let\mtcsv@tableofcontents\tableofcontents \let\mtcsv@listoffigures\listoffigures \let\mtcsv@listoftables\listoftables @@ -234,14 +308,14 @@ \def\section{\stepcounter{stc}\mtc@svsection} \let\mtc@svss\@ssect \newcommand{\mtcaddsection}[1][]{% - \mtc@ifmtarg{#1}{\addcontentsline{toc}{xsection}{}}% + \mtc@ifmtarg{#1}{\addcontentsline{toc}{xsect}{}}% {\addcontentsline{toc}{section}{#1}}% - \addcontentsline{lof}{xsection}{}% - \addcontentsline{lot}{xsection}{}% + \addcontentsline{lof}{xsect}{}% + \addcontentsline{lot}{xsect}{}% \adjuststc} }}% {% - \PackageInfo{minitoc}{*** chapter level macros available ***\@gobble} + \mtcPackageInfo[<I0003>]{minitoc}{chapter level macros available\@gobble} \let\mtc@svchapter\@chapter \def\@chapter{\stepcounter{mtc}\mtc@svchapter} \newcommand{\mtcaddchapter}[1][]{% @@ -265,8 +339,8 @@ \def\mtc@v{\leavevmode\mtc@strut} \def\mtc@zrule{\rule[\z@]{\z@}{\z@}} \def\mtc@BBR{\unpenalty\nopagebreak[4]} -\PackageInfo{minitoc}% - {*** Autoconfiguration of extensions ***\@gobble} +\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} @@ -276,31 +350,31 @@ \immediate\closeout\tf@mtc \input{\jobname.mtc1} \if@longextensions@ - \PackageInfo{minitoc}% - {*** Long extensions (Unix-like) will be used ***\@gobble} - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0012>]{minitoc}% + {Long extensions (Unix-like) will be used\@gobble} + \mtcPackageInfo[<I0031>]{minitoc}% {==> this version is configured for UNIX-like \MessageBreak \space\space\space\space(long extensions) file names\@gobble}% \else - \PackageWarningNoLine{minitoc}% - {*** Short extensions (MSDOS-like) will be used ***sight***} - \PackageWarningNoLine{minitoc}% - {==> this version is configured for MSDOS-like - \MessageBreak \space\space\space\space(8+3) file names} + \mtcPackageWarningNoLine[<W0019>]{minitoc}% + {Short extensions (MSDOS-like) will be used\MessageBreak + ==> this version is configured for MSDOS-like \MessageBreak + \space\space\space\space(8+3) file names} \fi \immediate\openout\tf@mtc \jobname.mtc \immediate\closeout\tf@mtc \immediate\openout\tf@mtc \jobname.mtc1 \immediate\closeout\tf@mtc \@ifundefined{@inputcheck}% - {\PackageWarningNoLine{minitoc}% + {\mtcPackageWarningNoLine[<W0021>]{minitoc}% {Your version of latex.tex is obsolete.\MessageBreak Trying to continue..}\newread\@inputcheck\relax}{} \@ifundefined{reset@font}% - {\PackageWarningNoLine{minitoc}% + {\mtcPackageWarningNoLine[<W0022>]{minitoc}% {Your version of latex.tex is very obsolete.\MessageBreak Trying to continue... crossing fingers}% \let\reset@font\relax}{} +\newif\ifundottedmtc\undottedmtcfalse \def\@undottedtocline#1#2#3#4#5{% \ifnum #1>\c@tocdepth \else \vskip \z@ plus.2\p@ @@ -417,9 +491,13 @@ \let\aftersecttoc\empty \let\aftersectlof\empty \let\aftersectlot\empty -\def\thispageparttocstyle{\thispagestyle{empty}} -\def\thispagepartlofstyle{\thispagestyle{empty}} -\def\thispagepartlotstyle{\thispagestyle{empty}} +\@ifundefined{chapter}{% + \def\thispageparttocstyle{\empty} + \def\thispagepartlofstyle{\empty} + \def\thispagepartlotstyle{\empty}}% +{\def\thispageparttocstyle{\thispagestyle{empty}} + \def\thispagepartlofstyle{\thispagestyle{empty}} + \def\thispagepartlotstyle{\thispagestyle{empty}}} \def\thispageminitocstyle{\empty} \def\thispageminilofstyle{\empty} \def\thispageminilotstyle{\empty} @@ -473,8 +551,8 @@ {% \def\The@mtc{\arabic{mtc}} \def\firstchapteris#1% - {\PackageWarning{minitoc}% - {*** \string\firstchapteris \space is an obsolete command ***}% + {\mtcPackageWarning[<W0003>]{minitoc}% + {\string\firstchapteris \space is an obsolete\MessageBreak command}% \@firstchapteris@used@true} \newcounter{mtc} \setcounter{mtc}{0} @@ -499,7 +577,9 @@ \let\mtcPfont\mtcfont \let\mtcSPfont\mtcfont \let\mlffont\mtcfont +\let\mlfSfont\mtcfont \let\mltfont\mtcfont +\let\mltSfont\mtcfont \def\mtifont{\large\rmfamily\upshape\bfseries} \def\coffeefont{\small\rmfamily\slshape\mdseries} \def\c@mti#1{\null\hfill #1\hfill\null} @@ -534,12 +614,12 @@ \fi \mtc@CkFile{\jobname.\@tocfile} \if@mtc@FE - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0006>]{minitoc}% {\jobname.\@tocfile\space is empty} \@mtc@empty@minitoc@true \else \thispageminitocstyle -%% \mtc@markboth{\uppercase{\mtctitle}}{\uppercase{\mtctitle}}% +%% \mtc@markboth{\MakeUppercase{\mtctitle}}{\MakeUppercase{\mtctitle}}% \beforeminitoc \relax\begin{samepage}% \if #1e\let\do@mtitc\e@mti @@ -605,12 +685,12 @@ \fi \mtc@CkFile{\jobname.\@tocfile} \if@mtc@FE - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0006>]{minitoc}% {\jobname.\@tocfile\space is empty} \@mtc@empty@minilof@true \else \thispageminilofstyle -%% \mtc@markboth{\uppercase{\mlftitle}}{\uppercase{\mlftitle}}% +%% \mtc@markboth{\MakeUppercase{\mlftitle}}{\MakeUppercase{\mlftitle}}% \beforeminilof \relax\begin{samepage}% \if #1e\let\do@mtilf\e@mti @@ -672,12 +752,12 @@ \fi \mtc@CkFile{\jobname.\@tocfile} \if@mtc@FE - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0006>]{minitoc}% {\jobname.\@tocfile\space is empty} \@mtc@empty@minilot@true \else \thispageminilotstyle -%% \mtc@markboth{\uppercase{\mlttitle}}{\uppercase{\mlttitle}}% +%% \mtc@markboth{\MakeUppercase{\mlttitle}}{\MakeUppercase{\mlttitle}}% \beforeminilot \relax\begin{samepage}% \if #1e\let\do@mtilt\e@mti @@ -775,7 +855,6 @@ \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}% \par}% \fi} -\newif\ifundottedmtc\undottedmtcfalse \@ifundefined{chapter}{}{% \let\sv@minitoc@\minitoc@ \def\minitoc@[#1]{{\ifundottedmtc\let\@dottedtocline\@Undottedtoclinep\fi @@ -823,6 +902,14 @@ \MLT@next#1.lot\relax\\}\setcounter{mtc}{0}} \def\dominilot{\@ifnextchar[{\dominilot@}{\dominilot@[l]}} \def\dominitoc@[#1]{% +\if@mtc@hints@ + \if@dominitoc@used@ + \mtcPackageInfo[<I0045>]{minitoc(hints)}% + {The \string\dominitoc \space command\MessageBreak + has been invoked more than once\MessageBreak} + \global\@mtc@hints@given@true + \fi +\fi \global\@dominitoc@used@true \if #1e\let\df@mtitc\e@mti% \else\if #1n\let\df@mtitc\n@mti% @@ -832,6 +919,14 @@ \fi\fi\fi\fi\fi% \@@dominitoc} \def\dominilof@[#1]{% +\if@mtc@hints@ + \if@dominilof@used@ + \mtcPackageInfo[<I0045>]{minitoc(hints)}% + {The \string\dominilof \space command\MessageBreak + has been invoked more than once\MessageBreak} + \global\@mtc@hints@given@true + \fi +\fi \global\@dominilof@used@true \if #1e\let\df@mtilf\e@mti% \else\if #1n\let\df@mtilf\n@mti% @@ -841,6 +936,14 @@ \fi\fi\fi\fi\fi% \@@dominilof} \def\dominilot@[#1]{% +\if@mtc@hints@ + \if@dominilot@used@ + \mtcPackageInfo[<I0045>]{minitoc(hints)}% + {The \string\dominilot \space command\MessageBreak + has been invoked more than once\MessageBreak} + \global\@mtc@hints@given@true + \fi +\fi \global\@dominilot@used@true \if #1e\let\df@mtilt\e@mti% \else\if #1n\let\df@mtilt\n@mti% @@ -864,11 +967,11 @@ \expandafter\ifx\csname #1\endcsname\chapter \stepcounter{mtc}% \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.mtc\themtc\@gobble}% \def\mtcname{\jobname.mtc\themtc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.M\themtc\@gobble}% \def\mtcname{\jobname.M\themtc}% \fi @@ -897,11 +1000,11 @@ \expandafter\ifx\csname #1\endcsname\starchapter \stepcounter{mtc}% \if@longextensions@ - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.mtc\themtc\@gobble}% \def\mtcname{\jobname.mtc\themtc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.M\themtc\@gobble}% \def\mtcname{\jobname.M\themtc}% \fi @@ -927,11 +1030,11 @@ \def\MTC@explist{\expandafter\MTC@next\MTC@list\\} \def\MTC@loop#1{\openin\@inputcheck#1\relax \ifeof\@inputcheck - \PackageWarning{minitoc}% + \mtcPackageWarning[<W0010>]{minitoc}% {No file #1.\MessageBreak MINITOCS NOT PREPARED}% \expandafter\MTC@toc \else - \PackageInfo{minitoc}{PREPARING MINITOCS FROM #1}% + \mtcPackageInfo[<I0024>]{minitoc}{PREPARING MINITOCS FROM #1}% \expandafter\MTC@read \fi } @@ -971,11 +1074,11 @@ \expandafter\ifx\csname #1\endcsname\xchapter \stepcounter{mtc}% \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.mlf\themtc\@gobble} \def\mlfname{\jobname.mlf\themtc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.F\themtc\@gobble} \def\mlfname{\jobname.F\themtc}% \fi @@ -986,15 +1089,19 @@ \mtc@toks{\noexpand\leavevmode#2}% \MTC@WriteContentsline{#1}{mlf}{#3}{#4}% \fi + \expandafter\ifx\csname #1\endcsname\subfigure + \mtc@toks{\noexpand\leavevmode#2}% + \MTC@WriteContentsline{#1}{mlfS}{#3}{#4}% + \fi } \def\MLF@explist{\expandafter\MLF@next\MLF@list\\} \def\MLF@loop#1{\openin\@inputcheck#1\relax \ifeof\@inputcheck - \PackageWarning{minitoc}% + \mtcPackageWarning[<W0008>]{minitoc}% {No file #1.\MessageBreak MINILOFS NOT PREPARED}% \expandafter\MLF@lof \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0034>]{minitoc}% {PREPARING MINILOFS FROM #1}% \expandafter\MLF@read\fi} \def\MLF@read{% @@ -1026,11 +1133,11 @@ \expandafter\ifx\csname #1\endcsname\xchapter \stepcounter{mtc}% \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.mlt\themtc\@gobble}% \def\mltname{\jobname.mlt\themtc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.T\themtc\@gobble}% \def\mltname{\jobname.T\themtc}% \fi @@ -1041,15 +1148,19 @@ \mtc@toks{\noexpand\leavevmode#2}% \MTC@WriteContentsline{#1}{mlt}{#3}{#4}% \fi + \expandafter\ifx\csname #1\endcsname\subtable + \mtc@toks{\noexpand\leavevmode#2}% + \MTC@WriteContentsline{#1}{mltS}{#3}{#4}% + \fi } \def\MLT@explist{\expandafter\MLT@next\MLT@list\\} \def\MLT@loop#1{\openin\@inputcheck#1\relax \ifeof\@inputcheck - \PackageWarning{minitoc}% + \mtcPackageWarning[<W0009>]{minitoc}% {No file #1.\MessageBreak MINILOTS NOT PREPARED}% \expandafter\MLT@lot \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0037>]{minitoc}% {PREPARING MINILOTS FROM #1}% \expandafter\MLT@read\fi} \def\MLT@read{% @@ -1117,8 +1228,8 @@ \def\xpart{xpart} \def\Thepart{\arabic{ptc}} \def\firstpartis#1% - {\PackageWarning{minitoc}% - {*** \string\firstpartis \space is an obsolete command ***}% + {\mtcPackageWarning[<W0004>]{minitoc}% + {\string\firstpartis \space is an obsolete\MessageBreak command}% \@firstpartis@used@true} \newcounter{ptc} \setcounter{ptc}{0} @@ -1141,7 +1252,9 @@ \let\ptcPfont\ptcfont % (paragraphs) \let\ptcSPfont\ptcfont % (subparagraphs) \let\plffont\ptcfont % (figures) + \let\plfSfont\ptcfont % (subfigures) \let\pltfont\ptcfont % (tables) + \let\pltSfont\ptcfont % (subtables) \def\ptifont{\Large\rmfamily\upshape\bfseries}% titles }% {% @@ -1153,7 +1266,9 @@ \let\ptcPfont\ptcfont % (paragraphs) \let\ptcSPfont\ptcfont % (subparagraphs) \let\plffont\ptcfont % (figures) + \let\plfSfont\ptcfont % (subfigures) \let\pltfont\ptcfont % (tables) + \let\pltSfont\ptcfont % (subtables) \def\ptifont{\LARGE\rmfamily\upshape\bfseries}% titles } \@ifundefined{chapter}{% @@ -1173,12 +1288,12 @@ \@afterheading \fi} \def\@makephead@l#1{% - \vspace*{50\p@}% + \vspace*{\mtcgapbeforeheads}% {\parindent \z@ \raggedright \ptifont #1\par \nobreak - \vskip 40\p@ + \vskip \mtcgapafterheads\hbox{} }} \def\r@pti#1{\if@twocolumn \@topnewpage[\@makephead@r{#1}]% @@ -1187,12 +1302,12 @@ \@afterheading \fi} \def\@makephead@r#1{% - \vspace*{50\p@}% + \vspace*{\mtcgapbeforeheads}% {\parindent \z@ \raggedleft \ptifont #1\par \nobreak - \vskip 40\p@ + \vskip \mtcgapafterheads\hbox{} }} \def\c@pti#1{\if@twocolumn \@topnewpage[\@makephead@c{#1}]% @@ -1201,12 +1316,12 @@ \@afterheading \fi} \def\@makephead@c#1{% - \vspace*{50\p@}% + \vspace*{\mtcgapbeforeheads}% {\parindent \z@ \centering \ptifont #1\par \nobreak - \vskip 40\p@ + \vskip \mtcgapafterheads\hbox{} }}% } \let\do@ptitc\l@pti @@ -1236,7 +1351,7 @@ \fi \mtc@CkFile{\jobname.\@tocfile} \if@mtc@FE - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0006>]{minitoc}% {\jobname.\@tocfile\space is empty} \@mtc@empty@parttoc@true \else @@ -1245,7 +1360,7 @@ \global\let\mtc@markboth\markboth \global\let\@mkboth\markboth \thispageparttocstyle - \mtc@markboth{\uppercase{\ptctitle}}{\uppercase{\ptctitle}}% + \mtc@markboth{\MakeUppercase{\ptctitle}}{\MakeUppercase{\ptctitle}}% }% \relax\begin{samepage}% \if #1e\let\do@ptitc\e@pti @@ -1310,7 +1425,7 @@ \fi \mtc@CkFile{\jobname.\@tocfile} \if@mtc@FE - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0006>]{minitoc}% {\jobname.\@tocfile\space is empty} \@mtc@empty@partlof@true \else @@ -1319,7 +1434,7 @@ \global\let\mtc@markboth\markboth \global\let\@mkboth\markboth \thispagepartlofstyle - \mtc@markboth{\uppercase{\plftitle}}{\uppercase{\plftitle}}% + \mtc@markboth{\MakeUppercase{\plftitle}}{\MakeUppercase{\plftitle}}% }% \relax\begin{samepage}% \if #1e\let\do@ptilf\e@pti @@ -1383,7 +1498,7 @@ \fi \mtc@CkFile{\jobname.\@tocfile} \if@mtc@FE - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0006>]{minitoc}% {\jobname.\@tocfile\space is empty} \@mtc@empty@partlof@true \else @@ -1392,7 +1507,7 @@ \global\let\mtc@markboth\markboth \global\let\@mkboth\markboth \thispagepartlotstyle - \mtc@markboth{\uppercase{\plttitle}}{\uppercase{\plttitle}}% + \mtc@markboth{\MakeUppercase{\plttitle}}{\MakeUppercase{\plttitle}}% }% \relax\begin{samepage}% \if #1e\let\do@ptilt\e@pti @@ -1448,9 +1563,9 @@ \afterpartlot\fi} \def\l@xpart{\@dottedtocline{\@M}{1.0em}{2.3em}} \def\l@pchapter{\@dottedtocline{1}{1.0em}{2.3em}} -\def\l@psection{\@dottedtocline{2}{1.0em}{2.3em}} +\def\l@psect{\@dottedtocline{2}{1.0em}{2.3em}} \def\pchapter{pchapter} -\def\psection{psection} +\def\psect{psect} \let\sv@part\mtc@svpart \def\@part[#1]#2{\sv@part[{#1}]{#2}\relax \addcontentsline{lof}{xpart}{#1}% @@ -1480,6 +1595,14 @@ \def\dopartlof{\@ifnextchar[{\dopartlof@}{\dopartlof@[l]}} \def\dopartlot{\@ifnextchar[{\dopartlot@}{\dopartlot@[l]}} \def\doparttoc@[#1]{% +\if@mtc@hints@ + \if@doparttoc@used@ + \mtcPackageInfo[<I0045>]{minitoc(hints)}% + {The \string\doparttoc \space command\MessageBreak + has been invoked more than once\MessageBreak} + \global\@mtc@hints@given@true + \fi +\fi \global\@doparttoc@used@true \if #1e\let\df@ptitc\e@pti% \else\if #1n\let\df@ptitc\n@pti% @@ -1489,6 +1612,14 @@ \fi\fi\fi\fi\fi% \@@doparttoc} \def\dopartlof@[#1]{% +\if@mtc@hints@ + \if@dopartlof@used@ + \mtcPackageInfo[<I0045>]{minitoc(hints)}% + {The \string\dopartlof \space command\MessageBreak + has been invoked more than once\MessageBreak} + \global\@mtc@hints@given@true + \fi +\fi \global\@dopartlof@used@true \if #1e\let\df@ptilf\e@pti% \else\if #1n\let\df@ptilf\n@pti% @@ -1498,6 +1629,14 @@ \fi\fi\fi\fi\fi% \@@dopartlof} \def\dopartlot@[#1]{% +\if@mtc@hints@ + \if@dopartlot@used@ + \mtcPackageInfo[<I0045>]{minitoc(hints)}% + {The \string\dopartlot \space command\MessageBreak + has been invoked more than once\MessageBreak} + \global\@mtc@hints@given@true + \fi +\fi \global\@dopartlot@used@true \if #1e\let\df@ptilt\e@pti% \else\if #1n\let\df@ptilt\n@pti% @@ -1518,11 +1657,11 @@ \expandafter\ifx\csname #1\endcsname\part \stepcounter{ptc}% \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.ptc\theptc\@gobble}% \def\ptcname{\jobname.ptc\theptc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.P\theptc\@gobble}% \def\ptcname{\jobname.P\theptc}% \fi @@ -1532,11 +1671,11 @@ \expandafter\ifx\csname #1\endcsname\starpart\relax \stepcounter{ptc}% \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.ptc\theptc}% \def\ptcname{\jobname.ptc\theptc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.P\theptc}% \def\ptcname{\jobname.P\theptc}% \fi @@ -1591,11 +1730,11 @@ \def\PTC@explist{\expandafter\PTC@next\PTC@list\\} \def\PTC@loop#1{\openin\@inputcheck#1\relax \ifeof\@inputcheck - \PackageWarning{minitoc}% + \mtcPackageWarning[<W0013>]{minitoc}% {No file #1\MessageBreak PARTTOCS NOT PREPARED}% \expandafter\PTC@toc \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0025>]{minitoc}% {PREPARING PARTTOCS FROM #1}% \expandafter\PTC@read\fi} \def\PTC@read{% @@ -1629,11 +1768,11 @@ \expandafter\ifx\csname #1\endcsname\xpart \stepcounter{ptc}% \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.plf\theptc}% \def\plfname{\jobname.plf\theptc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.G\theptc}% \def\plfname{\jobname.G\theptc}% \fi @@ -1644,15 +1783,19 @@ \mtc@toks{\noexpand\leavevmode#2}% \MTC@WriteContentsline{#1}{plf}{#3}{#4}% \fi + \expandafter\ifx\csname #1\endcsname\subfigure + \mtc@toks{\noexpand\leavevmode#2}% + \MTC@WriteContentsline{#1}{plfS}{#3}{#4}% + \fi } \def\PLF@explist{\expandafter\PLF@next\PLF@list\\} \def\PLF@loop#1{\openin\@inputcheck#1\relax \ifeof\@inputcheck - \PackageWarning{minitoc}% + \mtcPackageWarning[<W0011>]{minitoc}% {No file #1\MessageBreak PARTLOFS NOT PREPARED}% \expandafter\PLF@lof \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0035>]{minitoc}% {PREPARING PARTLOFS FROM #1}% \expandafter\PLF@read\fi} \def\PLF@read{% @@ -1685,11 +1828,11 @@ \expandafter\ifx\csname #1\endcsname\xpart \stepcounter{ptc}% \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.plt\theptc}% \def\pltname{\jobname.plt\theptc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.U\theptc}% \def\pltname{\jobname.U\theptc}% \fi @@ -1700,15 +1843,19 @@ \mtc@toks{\noexpand\leavevmode#2}% \MTC@WriteContentsline{#1}{plt}{#3}{#4}% \fi + \expandafter\ifx\csname #1\endcsname\subtable + \mtc@toks{\noexpand\leavevmode#2}% + \MTC@WriteContentsline{#1}{pltS}{#3}{#4}% + \fi } \def\PLT@explist{\expandafter\PLT@next\PLT@list\\} \def\PLT@loop#1{\openin\@inputcheck#1\relax \ifeof\@inputcheck - \PackageWarning{minitoc}% + \mtcPackageWarning[<W0012>]{minitoc}% {No file #1\MessageBreak PARTLOTS NOT PREPARED}% \expandafter\PLT@lot \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0038>]{minitoc}% {PREPARING PARTLOTS FROM #1}% \expandafter\PLT@read\fi} \def\PLT@read{% @@ -1742,8 +1889,8 @@ \if@mtc@chapter@undef@ \if@mtc@section@def@ \def\firstsectionis#1% - {\PackageWarning{minitoc}% - {*** \string\firstsectionis \space is an obsolete command ***}% + {\mtcPackageWarning[<W0005>]{minitoc}% + {\string\firstsectionis \space is an obsolete\MessageBreak command}% \@firstsectionis@used@true} \newcounter{stc}\setcounter{stc}{0}% \newcommand{\adjuststc}[1][1]{\addtocounter{stc}{#1}}% @@ -1758,7 +1905,9 @@ \let\stcPfont\stcfont % (paragraphs) \let\stcSPfont\stcfont % (subparagraphs) \let\slffont\stcfont % sectlof (figures) +\let\slfSfont\stcfont % sectlof (subfigures) \let\sltfont\stcfont % sectlot (tables) +\let\sltSfont\stcfont % sectlot (subtables) \def\stifont{\large\rmfamily\upshape\bfseries} % titles \def\c@sti#1{\null\hfill #1\hfill\null} \def\l@sti#1{\null #1\hfill\null} @@ -1792,13 +1941,13 @@ \fi \mtc@CkFile{\jobname.\@tocfile} \if@mtc@FE - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0006>]{minitoc}% {\jobname.\@tocfile\space is empty} \@mtc@empty@secttoc@true \else \beforesecttoc \thispagesecttocstyle -%% \mtc@markboth{\uppercase{\stctitle}}{\uppercase{\stctitle}}% +%% \mtc@markboth{\MakeUppercase{\stctitle}}{\MakeUppercase{\stctitle}}% \relax\begin{samepage}% \if #1e\let\do@stitc\e@sti \else\if #1n\let\do@stitc\n@sti @@ -1859,12 +2008,12 @@ \fi \mtc@CkFile{\jobname.\@tocfile} \if@mtc@FE - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0006>]{minitoc}% {\jobname.\@tocfile\space is empty} \@mtc@empty@sectlof@true \else \thispagesectlofstyle -%% \mtc@markboth{\uppercase{\slftitle}}{\uppercase{\slftitle}}% +%% \mtc@markboth{\MakeUppercase{\slftitle}}{\MakeUppercase{\slftitle}}% \beforesectlof \relax\begin{samepage}% \if #1e\let\do@stilf\e@sti @@ -1925,12 +2074,12 @@ \fi \mtc@CkFile{\jobname.\@tocfile} \if@mtc@FE - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0006>]{minitoc}% {\jobname.\@tocfile\space is empty} \@mtc@empty@sectlot@true \else \thispagesectlotstyle -%% \mtc@markboth{\uppercase{\slttitle}}{\uppercase{\slttitle}}% +%% \mtc@markboth{\MakeUppercase{\slttitle}}{\MakeUppercase{\slttitle}}% \beforesectlot \relax\begin{samepage}% \if #1e\let\do@stilt\e@sti @@ -2032,9 +2181,12 @@ #7}}% \fi \@xsect{#5}} -\let\stc@ssect\@ssect -\def\@ssect{\addtocontents{toc}{\protect\sectend}\stc@ssect} -\def\@ssect{\addtocontents{toc}{\protect\sectbegin}\stc@ssect} +\let\stc@sect\@sect +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2<1 \relax + \addtocontents{toc}{\protect\sectbegin} + \fi + \stc@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}} \let\sectend\relax \let\sectbegin\relax \def\@dosecttoc#1{{% @@ -2053,6 +2205,14 @@ \def\dosectlof{\@ifnextchar[{\dosectlof@}{\dosectlof@[l]}} \def\dosectlot{\@ifnextchar[{\dosectlot@}{\dosectlot@[l]}} \def\dosecttoc@[#1]{% +\if@mtc@hints@ + \if@dosecttoc@used@ + \mtcPackageInfo[<I0045>]{minitoc(hints)}% + {The \string\dosecttoc \space command\MessageBreak + has been invoked more than once\MessageBreak} + \global\@mtc@hints@given@true + \fi +\fi \global\@dosecttoc@used@true \if #1e\let\df@stitc\e@sti% \else\if #1n\let\df@stitc\n@sti% @@ -2062,6 +2222,14 @@ \fi\fi\fi\fi\fi% \@@dosecttoc} \def\dosectlof@[#1]{% +\if@mtc@hints@ + \if@dosectlof@used@ + \mtcPackageInfo[<I0045>]{minitoc(hints)}% + {The \string\dosectlof \space command\MessageBreak + has been invoked more than once\MessageBreak} + \global\@mtc@hints@given@true + \fi +\fi \global\@dosectlof@used@true \if #1e\let\df@stilf\e@sti% \else\if #1n\let\df@stilf\n@sti% @@ -2071,6 +2239,14 @@ \fi\fi\fi\fi\fi% \@@dosectlof} \def\dosectlot@[#1]{% +\if@mtc@hints@ + \if@dosectlot@used@ + \mtcPackageInfo[<I0045>]{minitoc(hints)}% + {The \string\dosectlot \space command\MessageBreak + has been invoked more than once\MessageBreak} + \global\@mtc@hints@given@true + \fi +\fi \global\@dosectlot@used@true \if #1e\let\df@stilt\e@sti% \else\if #1n\let\df@stilt\n@sti% @@ -2093,11 +2269,11 @@ \stepcounter{stc}% %% \def\thestc{\arabic{stc}} %% HO: removed \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.stc\thestc}% \def\stcname{\jobname.stc\thestc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.S\thestc}% \def\stcname{\jobname.S\thestc}% \fi @@ -2124,11 +2300,11 @@ \stepcounter{stc}% \gdef\thestc{\arabic{stc}} \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.stc\thestc}% \def\stcname{\jobname.stc\thestc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.S\thestc}% \def\stcname{\jobname.S\thestc}% \fi @@ -2151,11 +2327,11 @@ \def\STC@explist{\expandafter\STC@next\STC@list\\} \def\STC@loop#1{\openin\@inputcheck#1\relax \ifeof\@inputcheck - \PackageWarning{minitoc}% + \mtcPackageWarning[<W0016>]{minitoc}% {No file #1\MessageBreak SECTTOCS NOT PREPARED}% \expandafter\STC@toc \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0026>]{minitoc}% {PREPARING SECTTOCS FROM #1}% \expandafter\STC@read\fi} \def\STC@read{% @@ -2188,11 +2364,11 @@ \stepcounter{stc}% %% \gdef\thestc{\arabic{stc}} %%HO: removed \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.slf\thestc}% \def\slfname{\jobname.slf\thestc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.H\thestc}% \def\slfname{\jobname.H\thestc}% \fi @@ -2203,15 +2379,18 @@ \expandafter\ifx\csname #1\endcsname\figure \MTC@WriteContentsline{#1}{slf}{#3}{#4}% \fi + \expandafter\ifx\csname #1\endcsname\subfigure + \MTC@WriteContentsline{#1}{slfS}{#3}{#4}% + \fi } \def\SLF@explist{\expandafter\SLF@next\SLF@list\\} \def\SLF@loop#1{\openin\@inputcheck#1\relax \ifeof\@inputcheck - \PackageWarning{minitoc}% + \mtcPackageWarning[<W0014>]{minitoc}% {No file #1\MessageBreak SECTLOFS NOT PREPARED}% \expandafter\SLF@lof \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0036>]{minitoc}% {PREPARING SECTLOFS FROM #1}% \expandafter\SLF@read\fi} \def\SLF@read{% @@ -2244,11 +2423,11 @@ \stepcounter{stc}% %% \gdef\thestc{\arabic{stc}} %%HO: removed \if@longextensions@% - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.slt\thestc}% \def\sltname{\jobname.slt\thestc}% \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0033>]{minitoc}% {Writing\space\jobname.V\thestc}% \def\sltname{\jobname.V\thestc}% \fi @@ -2259,15 +2438,18 @@ \expandafter\ifx\csname #1\endcsname\table \MTC@WriteContentsline{#1}{slt}{#3}{#4}% \fi + \expandafter\ifx\csname #1\endcsname\subtable + \MTC@WriteContentsline{#1}{sltS}{#3}{#4}% + \fi } \def\SLT@explist{\expandafter\SLT@next\SLT@list\\} \def\SLT@loop#1{\openin\@inputcheck#1\relax \ifeof\@inputcheck - \PackageWarning{minitoc}% + \mtcPackageWarning[<W0015>]{minitoc}% {No file #1\MessageBreak SECTLOTS NOT PREPARED}% \expandafter\SLT@lot \else - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0039>]{minitoc}% {PREPARING SECTLOTS FROM #1}% \expandafter\SLT@read\fi} \def\SLT@read{% @@ -2291,6 +2473,35 @@ \else\expandafter\SLT@read\fi}% \fi% end of \if@mtc@section@def@ \fi% end of \if@mtc@chapter@undef@ +\def\mtcprepare{\@ifnextchar[{\mtcprepare@}{\mtcprepare@[l]}}% +\def\mtcprepare@[#1]{% +\@ifundefined{part}{}{% +\IfFileExists{\jobname.toc}{\doparttoc[#1]}{}% +\IfFileExists{\jobname.lof}{\dopartlof[#1]}{}% +\IfFileExists{\jobname.lot}{\dopartlot[#1]}{}% +}% +\@ifundefined{chapter}{% + \@ifundefined{section}{}% + {% +\IfFileExists{\jobname.toc}{\dosecttoc[#1]}{}% +\IfFileExists{\jobname.lof}{\dosectlof[#1]}{}% +\IfFileExists{\jobname.lot}{\dosectlot[#1]}{}% + }% +}{% +\IfFileExists{\jobname.toc}{\dominitoc[#1]}{}% +\IfFileExists{\jobname.lof}{\dominilof[#1]}{}% +\IfFileExists{\jobname.lot}{\dominilot[#1]}{}% +}% +\if@mtc@hints@ + \@mtc@hints@given@true + \mtcPackageInfo[<I0048>]{minitoc(hints)}% + {Using \string\mtcprepare\space may induce some\MessageBreak + hints about the preparation commands,\MessageBreak + because it invokes ALL the preparation\MessageBreak + commands allowed by the document class,\MessageBreak + without any previous check.\MessageBreak}% +\fi +} \@ifundefined{section}{}{\let\l@listof\l@section} \@ifundefined{chapter}{}{\let\l@listof\l@chapter} \@ifundefined{part}{}{\let\l@starpart\l@part} @@ -2328,8 +2539,8 @@ \def\mlt@rule{\rule[3\p@]{\columnwidth}{.4\p@}\vspace*{2.6\p@}} \def\slt@rule{\rule[3\p@]{\columnwidth}{.4\p@}\vspace*{2.6\p@}} \@namedef{mtc@typetable@parttoc}{ptc}\def\mtc@typetable@parttoc{ptc} -\@namedef{mtc@typetable@partlot}{plt}\def\mtc@typetable@partlot{plf} -\@namedef{mtc@typetable@partlof}{plf}\def\mtc@typetable@partlof{plt} +\@namedef{mtc@typetable@partlof}{plf}\def\mtc@typetable@partlof{plf} +\@namedef{mtc@typetable@partlot}{plt}\def\mtc@typetable@partlot{plt} \@namedef{mtc@typetable@minitoc}{mtc}\def\mtc@typetable@minitoc{mtc} \@namedef{mtc@typetable@minilof}{mlf}\def\mtc@typetable@minilof{mlf} \@namedef{mtc@typetable@minilot}{mlt}\def\mtc@typetable@minilot{mlt} @@ -2386,6 +2597,10 @@ \@namedef{mtc@sectlevel@paragraph}{P}\def\mtc@sectlevel@paragraph{P} \@namedef{mtc@sectlevel@subparagraph}{SP}\def\mtc@sectlevel@subparagraph{SP} \@namedef{mtc@sectlevel@*}{}\expandafter\def\csname mtc@sectlevel@*\endcsname{} +\@namedef{mtc@sectlevel@figure}{}\def\mtc@sectlevel@figure{} +\@namedef{mtc@sectlevel@table}{}\def\mtc@sectlevel@table{} +\@namedef{mtc@sectlevel@subfigure}{S}\def\mtc@sectlevel@subfigure{S} +\@namedef{mtc@sectlevel@subtable}{S}\def\mtc@sectlevel@subtable{S} \newif\if@mtc@setfont@\@mtc@setfont@true \newcommand{\mtcsetfont}[3]{% \def\mtc@mta@abbrev{X} @@ -2393,10 +2608,14 @@ \expandafter\ifx\csname mtc@typetable@#1\endcsname\relax \@mtc@setfont@false \def\mtc@mta@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsetfont \space has a wrong first argument (#1). + \mtcPackageError[<E0013>]{minitoc}% + {\string\mtcsetfont \space has a wrong first argument \MessageBreak - It should be a mini-table type (parttoc...sectlot)}% + (#1). + \MessageBreak + It should be a mini-table type + \MessageBreak + (parttoc...sectlot)}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX} \else @@ -2406,54 +2625,111 @@ \expandafter\ifx\csname mtc@sectlevel@#2\endcsname\relax \@mtc@setfont@false \def\mtc@level@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsetfont \space has a wrong second argument (#2). + \mtcPackageError[<E0014>]{minitoc}% + {\string\mtcsetfont \space has a wrong second argument + \MessageBreak + (#2). + \MessageBreak + It should be a sectionning level \MessageBreak - It should be a sectionning level (part...subparagraph) or * }% + (part...subparagraph) or * }% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX} \else \edef\mtc@level@abbrev{\@nameuse{mtc@sectlevel@#2}} \fi \def\mtc@tmp@name{\mtc@mta@abbrev\mtc@level@abbrev font} -\expandafter\ifx\csname #1\endcsname\minitoc - \expandafter\ifx\csname #2\endcsname\part\@mtc@setfont@false\fi - \expandafter\ifx\csname #2\endcsname\chapter\@mtc@setfont@false\fi +\def\parttoc@mtcqk{parttoc@mtcqk} +\def\minitoc@mtcqk{minitoc@mtcqk} +\def\secttoc@mtcqk{secttoc@mtcqk} +\def\partlof@mtcqk{partlof@mtcqk} +\def\minilof@mtcqk{minilof@mtcqk} +\def\sectlof@mtcqk{sectlof@mtcqk} +\def\partlot@mtcqk{partlot@mtcqk} +\def\minilot@mtcqk{minilot@mtcqk} +\def\sectlot@mtcqk{sectlot@mtcqk} +\def\part@mtcqk{part@mtcqk} +\def\chapter@mtcqk{chapter@mtcqk} +\def\section@mtcqk{section@mtcqk} +\def\subsection@mtcqk{subsection@mtcqk} +\def\subsubsection@mtcqk{subsubsection@mtcqk} +\def\paragraph@mtcqk{paragraph@mtcqk} +\def\subparagraph@mtcqk{subparagraph@mtcqk} +\def\figure@mtcqk{figure@mtcqk} +\def\table@mtcqk{table@mtcqk} +\def\subfigure@mtcqk{subfigure@mtcqk} +\def\subtable@mtcqk{subtable@mtcqk} +\@mtc@setfont@true +\expandafter\ifx\csname #1@mtcqk\endcsname\parttoc@mtcqk\relax + \expandafter\ifx\csname #2@mtcqk\endcsname\figure@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subfigure@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\table@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subtable@mtcqk\relax\@mtc@setfont@false\fi +\fi +\expandafter\ifx\csname #1@mtcqk\endcsname\partlof@mtcqk\relax + \expandafter\ifx\csname #2@mtcqk\endcsname\table@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subtable@mtcqk\relax\@mtc@setfont@false\fi +\fi +\expandafter\ifx\csname #1@mtcqk\endcsname\partlot@mtcqk\relax + \expandafter\ifx\csname #2@mtcqk\endcsname\figure@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subfigure@mtcqk\relax\@mtc@setfont@false\fi +\fi +\expandafter\ifx\csname #1@mtcqk\endcsname\minitoc@mtcqk\relax + \expandafter\ifx\csname #2@mtcqk\endcsname\part@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\chapter@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\figure@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subfigure@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\table@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subtable@mtcqk\relax\@mtc@setfont@false\fi \fi -\expandafter\ifx\csname #1\endcsname\minilof - \expandafter\ifx\csname #2\endcsname\part\@mtc@setfont@false\fi - \expandafter\ifx\csname #2\endcsname\chapter\@mtc@setfont@false\fi +\expandafter\ifx\csname #1@mtcqk\endcsname\minilof@mtcqk\relax + \expandafter\ifx\csname #2@mtcqk\endcsname\part@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\chapter@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\table@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subtable@mtcqk\relax\@mtc@setfont@false\fi \fi -\expandafter\ifx\csname #1\endcsname\minilot - \expandafter\ifx\csname #2\endcsname\part\@mtc@setfont@false\fi - \expandafter\ifx\csname #2\endcsname\chapter\@mtc@setfont@false\fi +\expandafter\ifx\csname #1@mtcqk\endcsname\minilot@mtcqk\relax + \expandafter\ifx\csname #2@mtcqk\endcsname\part@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\chapter@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\figure@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subfigure@mtcqk\relax\@mtc@setfont@false\fi \fi -\expandafter\ifx\csname #1\endcsname\secttoc - \expandafter\ifx\csname #2\endcsname\part\@mtc@setfont@false\fi - \expandafter\ifx\csname #2\endcsname\chapter\@mtc@setfont@false\fi - \expandafter\ifx\csname #2\endcsname\section\@mtc@setfont@false\fi +\expandafter\ifx\csname #1@mtcqk\endcsname\secttoc@mtcqk\relax + \expandafter\ifx\csname #2@mtcqk\endcsname\part@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\chapter@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\section@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\figure@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subfigure@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\table@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subtable@mtcqk\relax\@mtc@setfont@false\fi \fi -\expandafter\ifx\csname #1\endcsname\sectlof - \expandafter\ifx\csname #2\endcsname\part\@mtc@setfont@false\fi - \expandafter\ifx\csname #2\endcsname\chapter\@mtc@setfont@false\fi - \expandafter\ifx\csname #2\endcsname\section\@mtc@setfont@false\fi +\expandafter\ifx\csname #1@mtcqk\endcsname\sectlof@mtcqk\relax + \expandafter\ifx\csname #2@mtcqk\endcsname\part@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\chapter@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\section@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\table@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subtable@mtcqk\relax\@mtc@setfont@false\fi \fi -\expandafter\ifx\csname #1\endcsname\sectlot - \expandafter\ifx\csname #2\endcsname\part\@mtc@setfont@false\fi - \expandafter\ifx\csname #2\endcsname\chapter\@mtc@setfont@false\fi - \expandafter\ifx\csname #2\endcsname\section\@mtc@setfont@false\fi +\expandafter\ifx\csname #1@mtcqk\endcsname\sectlot@mtcqk\relax + \expandafter\ifx\csname #2@mtcqk\endcsname\part@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\chapter@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\section@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\figure@mtcqk\relax\@mtc@setfont@false\fi + \expandafter\ifx\csname #2@mtcqk\endcsname\subfigure@mtcqk\relax\@mtc@setfont@false\fi \fi \if@mtc@setfont@ \def\mtc@tmp@name{\mtc@mta@abbrev\mtc@level@abbrev font} \mtc@toks{#3} - \PackageInfo{minitoc}% - {\string\mtcsetfont\space redefines the macro - \mtc@tmp@name \space as "\the\mtc@toks"} + \mtcPackageInfo[<I0015>]{minitoc}% + {\string\mtcsetfont\space redefines the macro\MessageBreak + "\mtc@tmp@name" as "\the\mtc@toks"} \expandafter\def\csname\mtc@tmp@name\endcsname{#3} \else - \PackageError{minitoc}% - {\string\mtcsetfont\space has incompatible\MessageBreak - first (#1) and second (#2) arguments}{} + \mtcPackageError[<E0024>]{minitoc}% + {The macro \string\mtcsetfont\space has incompatible\MessageBreak + first (#1) and second (#2) arguments}% + {Correct the source code.\MessageBreak + Type <return> and rerun LaTeX} \fi } \newif\if@mtc@settitlefont@\@mtc@settitlefont@true @@ -2463,10 +2739,14 @@ \expandafter\ifx\csname mtc@typetitle@#1\endcsname\relax \@mtc@settitlefont@false \def\mtc@mtatf@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsettitlefont \space has a wrong first argument (#1). + \mtcPackageError[<E0022>]{minitoc}% + {\string\mtcsettitlefont \space has a wrong first argument + \MessageBreak + (#1). + \MessageBreak + It should be a mini-table type \MessageBreak - It should be a mini-table type (parttoc...sectlot)}% + (parttoc...sectlot)}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX} \else @@ -2475,13 +2755,15 @@ \if@mtc@settitlefont@ \def\mtc@tmptf@name{\mtc@mtatf@abbrev font} \mtc@toks{#2} - \PackageInfo{minitoc}% + \mtcPackageInfo[<I0018>]{minitoc}% {\string\mtcsettitlefont\space redefines the macro - \mtc@tmptf@name \space as "\the\mtc@toks"} + \MessageBreak "\mtc@tmptf@name" as + \MessageBreak "\the\mtc@toks"} \expandafter\def\csname\mtc@tmptf@name\endcsname{#2} \else - \PackageError{minitoc}% - {Illegal type of table (#1)}% + \mtcPackageError[<E0034>]{minitoc}% + {The macre \string\\mtcsettitlefont\space uses\MessageBreak + an illegal type of table (#1)}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX}{\relax} \fi @@ -2493,10 +2775,14 @@ \expandafter\ifx\csname mtc@typetable@#1\endcsname\relax \@mtc@settitle@false \def\mtc@mtati@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsettitle \space has a wrong first argument (#1). + \mtcPackageError[<E0021>]{minitoc}% + {\string\mtcsettitle \space has a wrong first argument \MessageBreak - It should be a mini-table type (parttoc...sectlot)}% + (#1). + \MessageBreak + It should be a mini-table type + \MessageBreak + (parttoc...sectlot)}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX} \else @@ -2505,13 +2791,15 @@ \if@mtc@settitle@ \def\mtc@tmpti@name{\mtc@mtati@abbrev title} \mtc@toks{#2} - \PackageInfo{minitoc}% - {\string\mtcsettitle\space redefines the macro - \mtc@tmpti@name \space as "\the\mtc@toks"} + \mtcPackageInfo[<I0017>]{minitoc}% + {\string\mtcsettitle\space redefines the macro\MessageBreak + "\mtc@tmpti@name" as + \MessageBreak "\the\mtc@toks"} \expandafter\def\csname\mtc@tmpti@name\endcsname{#2} \else - \PackageError{minitoc}% - {Illegal type of table (#1)}% + \mtcPackageError[<E0033>]{minitoc}% + {The macro \string\mtcsettitle\space uses\MessageBreak + an illegal type of table (#1)}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX}{\relax} \fi @@ -2606,10 +2894,14 @@ \expandafter\ifx\csname mtc@typetable@#1\endcsname\relax \@mtc@setformat@false \def\mtc@mtf@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsetformat \space has a wrong first argument (#1). + \mtcPackageError[<E0015>]{minitoc}% + {\string\mtcsetformat \space has a wrong first argument + \MessageBreak + (#1). + \MessageBreak + It should be a mini-table type \MessageBreak - It should be a mini-table type (parttoc...sectlot)}% + (parttoc...sectlot)}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX} \else @@ -2618,11 +2910,13 @@ \expandafter\ifx\csname mtc@formatparam@#2\endcsname\relax \@mtc@setformat@false \def\mtc@fparam@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsetformat \space has a wrong second argument (#2). + \mtcPackageError[<E0016>]{minitoc}% + {\string\mtcsetformat \space has a wrong second argument \MessageBreak - It should be a formatting param - (pagenumwidth, tocrightmargin, dotinterval)}% + (#2). + \MessageBreak + It should be a formatting param choosen from:\MessageBreak + pagenumwidth, tocrightmargin, dotinterval}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX} \else @@ -2630,20 +2924,39 @@ \fi \if@mtc@setformat@ \def\mtc@tmpfm@name{\mtc@mtf@abbrev\mtc@fparam@abbrev} - \PackageInfo{minitoc}% - {\string\mtcsetformat\space redefines - the macro \mtc@tmpfm@name \space as \string#3} + \mtcPackageInfo[<I0016>]{minitoc}% + {\string\mtcsetformat\space redefines the macro\MessageBreak + "\mtc@tmpfm@name" as "\string#3"} \expandafter\def\csname\mtc@tmpfm@name\endcsname{#3} \else - \PackageError{minitoc}% - {\string\mtcsetformat\space has incompatible - \MessageBreak - first (#1) and second (#2) arguments}{} + \mtcPackageError[<E0025>]{minitoc}% + {The macro \string\mtcsetformat\space has incompatible\MessageBreak + first (#1) and second (#2) arguments}% + {Correct the source code.\MessageBreak + Type <return> and rerun LaTeX} \fi } \newif\if@mtc@setpagenumbers@ \@mtc@setpagenumbers@false \newif\if@mtc@spn@ok@ \newcommand{\mtcsetpagenumbers}[2]{% + \expandafter\ifx\csname #1\endcsname\*\relax + \@ifundefined{part}{}% + {\mtcsetpagenumbers@{parttoc}{#2} + \mtcsetpagenumbers@{partlof}{#2} + \mtcsetpagenumbers@{partlot}{#2}} + \@ifundefined{chapter}{}% + {\mtcsetpagenumbers@{minitoc}{#2} + \mtcsetpagenumbers@{minilof}{#2} + \mtcsetpagenumbers@{minilot}{#2}} + \@ifundefined{section}{}% + {\mtcsetpagenumbers@{secttoc}{#2} + \mtcsetpagenumbers@{sectlof}{#2} + \mtcsetpagenumbers@{sectlot}{#2}} + \else + \mtcsetpagenumbers@{#1}{#2}% + \fi +} +\newcommand{\mtcsetpagenumbers@}[2]{% \def\mtc@mttpn@abbrev{X} \@mtc@setpagenumbers@true \def\mtc@pnsw@abbrev{} @@ -2651,10 +2964,15 @@ \@mtc@setpagenumbers@false \def\mtc@pnsw@abbrev{X} \def\mtc@mttpn@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsetpagenumbers \space has a wrong first argument (#1).}% - {It should be a mini-table type (parttoc...sectlot)\MessageBreak - Correct the source code, type <return> and rerun LaTeX} + \mtcPackageError[<E0017>]{minitoc}% + {\string\mtcsetpagenumbers \space has a wrong first + \MessageBreak + argument (#1)}% + {It should be a mini-table type + \MessageBreak + (parttoc...sectlot)\MessageBreak + Correct the source code.\MessageBreak + Type <return> and rerun LaTeX} \else \edef\mtc@mttpn@abbrev{\@nameuse{mtc@typetable@#1}} \fi @@ -2665,21 +2983,24 @@ \def\mtc@mttpn@abbrev{X} \@mtc@setpagenumbers@false \def\mtc@mttpn@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsetpagenumbers \space has a wrong second argument (#2)}% - {It should be a boolean value (0/1, yes/no, on/off\MessageBreak - Correct the source code, type <return> and rerun LaTeX} + \mtcPackageError[<E0018>]{minitoc}% + {\string\mtcsetpagenumbers \space has a wrong second + \MessageBreak + argument (#2)}% + {It should be a boolean value (0/1, yes/no, on/off)\MessageBreak + Correct the source code.\MessageBreak + Type <return> and rerun LaTeX} \else \edef\mtc@pnsw@abbrev{\@nameuse{mtc@YN@#2}} \def\mtc@pnsw@abbrevX{X} \def\mtc@noX{mtc@noX} \def\mtc@tmppn@name{\mtc@pnsw@abbrev\mtc@mttpn@abbrev pagenumbers} \expandafter\ifx\csname mtc@\mtc@pnsw@abbrev X\endcsname\mtc@noX - \PackageInfo{minitoc}% - {Page numbers are inhibited for the #1s} + \mtcPackageInfo[<I0022>]{minitoc}% + {Page numbers are inhibited\MessageBreak for the #1s} \else - \PackageInfo{minitoc}% - {Page numbers are activated for the #1s} + \mtcPackageInfo[<I0021>]{minitoc}% + {Page numbers are activated\MessageBreak for the #1s} \fi \csname\mtc@tmppn@name\endcsname{} \fi @@ -2687,6 +3008,24 @@ \newif\if@mtc@setrules@ \@mtc@setrules@false \newif\if@mtc@sru@ok@ \newcommand{\mtcsetrules}[2]{% + \expandafter\ifx\csname #1\endcsname\*\relax + \@ifundefined{part}{}% + {\mtcsetrules@{parttoc}{#2} + \mtcsetrules@{partlof}{#2} + \mtcsetrules@{partlot}{#2}} + \@ifundefined{chapter}{}% + {\mtcsetrules@{minitoc}{#2} + \mtcsetrules@{minilof}{#2} + \mtcsetrules@{minilot}{#2}} + \@ifundefined{section}{}% + {\mtcsetrules@{secttoc}{#2} + \mtcsetrules@{sectlof}{#2} + \mtcsetrules@{sectlot}{#2}} + \else + \mtcsetrules@{#1}{#2}% + \fi +} +\newcommand{\mtcsetrules@}[2]{% \def\mtc@mttru@abbrev{X} \@mtc@setrules@true \def\mtc@rusw@abbrev{} @@ -2694,11 +3033,16 @@ \@mtc@setrules@false \def\mtc@rusw@abbrev{X} \def\mtc@mttru@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsetrules \space has a wrong first argument (#1).}% - {It should be a mini-table type (parttoc...sectlot) + \mtcPackageError[<E0019>]{minitoc}% + {\string\mtcsetrules \space has a wrong first argument + \MessageBreak + (#1)}% + {It should be a mini-table type + \MessageBreak + (parttoc...sectlot) \MessageBreak - Correct the source code, type <return> and rerun LaTeX} + Correct the source code.\MessageBreak + Type <return> and rerun LaTeX} \else \edef\mtc@mttru@abbrev{\@nameuse{mtc@typetable@#1}} \fi @@ -2708,22 +3052,25 @@ \def\mtc@rusw@abbrev{X} \def\mtc@mttru@abbrev{X} \@mtc@setrules@false - \PackageError{minitoc}% - {*** \string\mtcsetrules \space has a wrong second argument (#2)}% - {It should be a boolean value (0/1, yes/no, on/off + \mtcPackageError[<E0020>]{minitoc}% + {\string\mtcsetrules \space has a wrong second argument + \MessageBreak + (#2)}% + {It should be a boolean value (0/1, yes/no, on/off) \MessageBreak - Correct the source code, type <return> and rerun LaTeX} + Correct the source code.\MessageBreak + Type <return> and rerun LaTeX} \else \edef\mtc@rusw@abbrev{\@nameuse{mtc@YN@#2}} \def\mtc@rusw@abbrevX{X} \def\mtc@noX{mtc@noX} \def\mtc@tmppn@name{\mtc@rusw@abbrev\mtc@mttru@abbrev rule} \expandafter\ifx\csname mtc@\mtc@rusw@abbrev X\endcsname\mtc@noX - \PackageInfo{minitoc}% - {Horizontal rules are inhibited for the #1s} + \mtcPackageInfo[<I0008>]{minitoc}% + {Horizontal rules are inhibited\MessageBreak for the #1s} \else - \PackageInfo{minitoc}% - {Horizontal rules are activated for the #1s} + \mtcPackageInfo[<I0007>]{minitoc}% + {Horizontal rules are activated\MessageBreak for the #1s} \fi \csname\mtc@tmppn@name\endcsname{} \fi @@ -2755,10 +3102,14 @@ \expandafter\ifx\csname mtc@ltypetable@#1\endcsname\relax \@mtc@setfeature@false \def\mtc@mtfeat@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsetfeature \space has a wrong first argument (#1). + \mtcPackageError[<E0011>]{minitoc}% + {\string\mtcsetfeature \space has a wrong first argument + \MessageBreak + (#1). \MessageBreak - It should be a mini-table type (parttoc...sectlot)}% + It should be a mini-table type + \MessageBreak + (parttoc...sectlot)}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX} \else @@ -2768,10 +3119,14 @@ \@mtc@setfeature@false \def\mtc@featparam@abbrev{X} \def\mtc@featparam@third{X} - \PackageError{minitoc}% - {*** \string\mtcsetfeature \space has a wrong second argument (#2). + \mtcPackageError[<E0012>]{minitoc}% + {\string\mtcsetfeature \space has a wrong second argument + \MessageBreak + (#2). + \MessageBreak + It should be a feature param \MessageBreak - It should be a feature param (before, after, pagestyle)}% + (before, after, pagestyle)}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX} \else @@ -2781,14 +3136,16 @@ \if@mtc@setfeature@ \def\mtc@tmpfeat@name% {\mtc@featparam@abbrev\mtc@mtfeat@abbrev\mtc@featparam@third} - \PackageInfo{minitoc}% - {\string\mtcsetfeature\space redefines the macro - "\csname mtc@tmpfeat@name\endcsname" as "\string#3"} + \mtcPackageInfo[<I0014>]{minitoc}% + {\string\mtcsetfeature\space redefines the macro\MessageBreak + "\csname mtc@tmpfeat@name\endcsname" as\MessageBreak "\string#3"} \expandafter\def\csname\mtc@tmpfeat@name\endcsname{#3} \else - \PackageError{minitoc}% - {\string\mtcsetfeature\space has incompatible\MessageBreak - first (#1) and second (#2) arguments}{} + \mtcPackageError[<E0023>]{minitoc}% + {The macro \string\mtcsetfeature\space has incompatible\MessageBreak + first (#1) and second (#2) arguments}% + {Correct the source code.\MessageBreak + Type <return> and rerun LaTeX} \fi} \newif\if@mtc@setdepth@\@mtc@setdepth@true \newcommand{\mtcsetdepth}[2]{% @@ -2797,10 +3154,13 @@ \expandafter\ifx\csname mtc@ltypetable@#1\endcsname\relax \@mtc@setdepth@false \def\mtc@mtade@abbrev{X} - \PackageError{minitoc}% - {*** \string\mtcsetdepth \space has a wrong first argument (#1). + \mtcPackageError[<E0009>]{minitoc}% + {\string\mtcsetdepth \space has a wrong first argument + \MessageBreak (#1). \MessageBreak - It should be a mini-table type (parttoc...sectlot)}% + It should be a mini-table type + \MessageBreak + (parttoc...sectlot)}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX} \else @@ -2809,148 +3169,120 @@ \if@mtc@setdepth@ \def\mtc@tmpde@name{\mtc@mtade@abbrev depth} \expandafter\noexpand\@ifundefined{c@\mtc@mtade@abbrev depth}% - {\PackageError{minitoc}% - {*** \string\mtcsetdepth \space attempt to use\MessageBreak + {\mtcPackageError[<E0008>]{minitoc}% + {\string\mtcsetdepth \space attempts to use\MessageBreak an undefined counter (#1depth).}% {Correct the source code.\MessageBreak Type <return> and rerun LaTeX}}{% \mtc@toks{#2} % trick for explicit message using \the. - \PackageInfo{minitoc}% - {\string\mtcsetdepth\space redefines the counter - \mtc@tmpde@name \space as "\the\mtc@toks"}% + \mtcPackageInfo[<I0013>]{minitoc}% + {\string\mtcsetdepth\space redefines the counter\MessageBreak + "\mtc@tmpde@name" as "\the\mtc@toks"}% \expandafter\setcounter{\mtc@tmpde@name}{#2}}% \else - \PackageError{minitoc}% + \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 \newif\if@mtc@Himtoc@ \@mtc@Himtoc@false +\newcommand{\mtc@savetocdepth}{\xdef\mtc@sv@tocdepth{\arabic{tocdepth}}}% +\newcommand{\mtc@restoretocdepth}{\setcounter{tocdepth}{\mtc@sv@tocdepth}}% \newenvironment{mtchideinmaintoc}[1][-1]% -{\if@mtc@Himtoc@\PackageError{minitoc}% +{\if@mtc@Himtoc@\mtcPackageError[<E0005>]{minitoc}% {Imbrication of mtchideinmaintoc environments}% {The hiding in main ToC could be incorrect}\fi \global\@mtc@Himtoc@true - \def\mtc@sv@tocdepth{\arabic{tocdepth}}% + \addtocontents{toc}{\protect\mtc@savetocdepth}% \addtocontents{toc}{\protect\setcounter{tocdepth}{#1}}}% -{\if@mtc@Himtoc@\else\PackageError{minitoc}% +{\if@mtc@Himtoc@\else\mtcPackageError[<E0031>]{minitoc}% {Unbalanced mtchideinmaintoc environment}% {The hiding in main ToC could be incorrect}\fi \global\@mtc@Himtoc@false - \addtocontents{toc}{\protect\setcounter{tocdepth}{\mtc@sv@tocdepth}}} + \addtocontents{toc}{\protect\mtc@restoretocdepth}}% \newif\if@mtc@Himlof@ \@mtc@Himlof@false \AtBeginDocument{% \@ifundefined{c@lofdepth}{% \newenvironment{mtchideinmainlof}[1][-1]% - {\if@mtc@Himlof@\PackageError{minitoc}% + {\if@mtc@Himlof@\mtcPackageError[<E0003>]{minitoc}% {Imbrication of mtchideinmainlof environments}% {The hiding in main LoF could be incorrect}\fi \global\@mtc@Himlof@true \def\mtc@sv@tocdepth{\arabic{tocdepth}}% \def\mtc@sv@lofdepth{\arabic{tocdepth}}% + \addtocontents{lof}{\protect\mtc@savetocdepth}% \addtocontents{lof}{\protect\setcounter{tocdepth}{#1}}}% - {\if@mtc@Himlof@\else\PackageError{minitoc}% + {\if@mtc@Himlof@\else\mtcPackageError[<E0029>]{minitoc}% {Unbalanced mtchideinmainlof environment}% {The hiding in main LoF could be incorrect}\fi \global\@mtc@Himtoc@false - \addtocontents{lof}{\protect\setcounter{tocdepth}{\mtc@sv@lofdepth}}} -}% + \addtocontents{lof}{\protect\mtc@restoretocdepth}% +}}% {% + \newcommand{\mtc@savelofdepth}{\xdef{\mtc@sv@lofdepth{\arabic{lofdepth}}}}% + \newcommand{\mtc@restorelofdepth}{\setcounter{lofdepth}{\mtc@sv@lofdepth}}% \newenvironment{mtchideinmainlof}[1][-1]% - {\if@mtc@Himlof@\PackageError{minitoc}% + {\if@mtc@Himlof@\mtcPackageError[<E0003>]{minitoc}% {Imbrication of mtchideinmainlof environments}% {The hiding in main LoF could be incorrect}\fi \global\@mtc@Himlof@true - \def\mtc@svf@tocdepth{\arabic{tocdepth}}% + \addtocontents{lof}{\protect\mtc@savelofdepth}% \addtocontents{lof}{\protect\setcounter{tocdepth}{#1}}}% - {\if@mtc@Himlof@\else\PackageError{minitoc}% + {\if@mtc@Himlof@\else\mtcPackageError[<E0029>]{minitoc}% {Unbalanced mtchideinmainlof environment}% {The hiding in main LoF could be incorrect}\fi \global\@mtc@Himlof@false - \addtocontents{lof}{\protect\setcounter{tocdepth}{\mtc@svf@tocdepth}}}}} + \addtocontents{lof}{\protect\mtc@restoretocdepth}}}} \newif\if@mtc@Himlot@ \@mtc@Himlot@false \AtBeginDocument{% \@ifundefined{c@lotdepth}{% \newenvironment{mtchideinmainlot}[1][-1]% - {\if@mtc@Himlot@\PackageError{minitoc}% + {\if@mtc@Himlot@\mtcPackageError[<E0004>]{minitoc}% {Imbrication of mtchideinmainlot environments}% {The hiding in main LoT could be incorrect}\fi \global\@mtc@Himlot@true \def\mtc@sv@tocdepth{\arabic{tocdepth}}% \def\mtc@sv@lotdepth{\arabic{tocdepth}}% + \addtocontents{lot}{\protect\mtc@savetocdepth}% \addtocontents{lot}{\protect\setcounter{tocdepth}{#1}}}% - {\if@mtc@Himlot@\else\PackageError{minitoc}% + {\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\setcounter{tocdepth}{\mtc@sv@lotdepth}}} -}% + \addtocontents{lot}{\protect\mtc@restoretocdepth}% +}}% {% + \newcommand{\mtc@savelotdepth}{\xdef{\mtc@sv@lotdepth{\arabic{lotdepth}}}}% + \newcommand{\mtc@restorelotdepth}{\setcounter{lotdepth}{\mtc@sv@lotdepth}}% \newenvironment{mtchideinmainlot}[1][-1]% - {\if@mtc@Himlot@\PackageError{minitoc}% + {\if@mtc@Himlot@\mtcPackageError[<E0004>]{minitoc}% {Imbrication of mtchideinmainlot environments}% {The hiding in main LoT could be incorrect}\fi \global\@mtc@Himlot@true - \def\mtc@svt@tocdepth{\arabic{tocdepth}}% - \addtocontents{lot}{\protect\setcounter{tocdepth}{#1}}}% - {\if@mtc@Himlot@\else\PackageError{minitoc}% + \addtocontents{lot}{\protect\mtc@savelotdepth}% + \addtocontents{lot}{\protect\setcounter{lotdepth}{#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\setcounter{tocdepth}{\mtc@svt@tocdepth}}}}} + \addtocontents{lot}{\protect\mtc@restorelotdepth}}}} \@ifundefined{chapter}{% \@ifundefined{section}% - {\PackageWarningNoLine{minitoc}% + {\mtcPackageWarningNoLine[<W0001>]{minitoc}% {\string\chapter\space and \string\section\space are undefined.% - \MessageBreak Cannot use \string\mtcfixindex\space % - without optional argument [part]}% + \MessageBreak Cannot use \string\mtcfixglossary \space + without\MessageBreak optional argument [part]}% \@ifundefined{part}% - {\PackageError{minitoc}% - {But \string\part\space is undefined}% - {\string\mtcfixindex\space not usable}}% - {\PackageWarningNoLine{minitoc}% - {\string\mtcfixindex\space can only be used with the [part] - optional argument, which becomes the default}% - \def\mtc@ixfix@level{part}% - }% - {\def\mtc@ixfix@level{section}}}}% -{\def\mtc@ixfix@level{chapter}} -\newif\if@mtcfixindex@ \@mtcfixindex@false -\newcommand{\mtcfixindex}[1][\mtc@ixfix@level]{% - \@mtcfixindex@false - \expandafter% - \ifx\csname #1\endcsname\part\relax\@mtcfixindex@true\fi - \expandafter% - \ifx\csname #1\endcsname\chapter\relax\@mtcfixindex@true\fi - \expandafter% - \ifx\csname #1\endcsname\section\relax\@mtcfixindex@true\fi - \if@mtcfixindex@ - \addcontentsline{lof}{x\mtc@ixfix@level}{}% - \addcontentsline{lot}{x\mtc@ixfix@level}{}% - \csname mtcadd\mtc@ixfix@level\endcsname\relax - \else - \PackageError{minitoc}% - {The optional argument of \string\mtcfixindex\space is wrong}% - {It must be omitted (\mtc@ixfix@level), - or be part, chapter or section}% - \fi -}% -\@ifundefined{chapter}{% - \@ifundefined{section}% - {\PackageWarningNoLine{minitoc}% - {\string\chapter\space and \string\section\space are undefined.% - \MessageBreak Cannot use \string\mtcfixglossary\space % - without optional argument [part]}% - \@ifundefined{part}% - {\PackageError{minitoc}% + {\mtcPackageError[<E0001>]{minitoc}% {But \string\part\space is undefined}% {\string\mtcfixglossary\space not usable}}% - {\PackageWarningNoLine{minitoc}% - {\string\mtcfixglossary\space can only be used with the [part] - optional argument, which becomes the default}% + {\mtcPackageWarningNoLine[<W0006>]{minitoc}% + {\string\mtcfixglossary\space can only be used\MessageBreak + with the [part] optional argument,\MessageBreak + which becomes the default}% \def\mtc@glofix@level{part}% - }% - {\def\mtc@glofix@level{section}}}}% + }}% + {\def\mtc@glofix@level{section}}}% {\def\mtc@glofix@level{chapter}} \newif\if@mtcfixglossary@ \@mtcfixglossary@false \newcommand{\mtcfixglossary}[1][\mtc@glofix@level]{% @@ -2966,18 +3298,60 @@ \addcontentsline{lot}{x\mtc@glofix@level}{}% \csname mtcadd\mtc@glofix@level\endcsname\relax \else - \PackageError{minitoc}% - {The optional argument of \string\mtcfixglossary\space is wrong}% + \mtcPackageError[<E0026>]{minitoc}% + {The optional argument of \string\mtcfixglossary + \MessageBreak + is wrong}% {It must be omitted (\mtc@glofix@level), or be part, chapter or section}% \fi }% +\@ifundefined{chapter}{% + \@ifundefined{section}% + {\mtcPackageWarningNoLine[<W0002>]{minitoc}% + {\string\chapter\space and \string\section\space are undefined.% + \MessageBreak Cannot use \string\mtcfixindex \space + without\MessageBreak optional argument [part]}% + \@ifundefined{part}% + {\mtcPackageError[<E0002>]{minitoc}% + {But \string\part\space is undefined}% + {\string\mtcfixindex\space not usable}}% + {\mtcPackageWarningNoLine[<W0007>]{minitoc}% + {\string\mtcfixindex\space can only be used with\MessageBreak + the [part] optional argument,\MessageBreak + which becomes the default}% + \def\mtc@ixfix@level{part}% + }}% + {\def\mtc@ixfix@level{section}}}% +{\def\mtc@ixfix@level{chapter}} +\newif\if@mtcfixindex@ \@mtcfixindex@false +\newcommand{\mtcfixindex}[1][\mtc@ixfix@level]{% + \@mtcfixindex@false + \expandafter% + \ifx\csname #1\endcsname\part\relax\@mtcfixindex@true\fi + \expandafter% + \ifx\csname #1\endcsname\chapter\relax\@mtcfixindex@true\fi + \expandafter% + \ifx\csname #1\endcsname\section\relax\@mtcfixindex@true\fi + \if@mtcfixindex@ + \addcontentsline{lof}{x\mtc@ixfix@level}{}% + \addcontentsline{lot}{x\mtc@ixfix@level}{}% + \csname mtcadd\mtc@ixfix@level\endcsname\relax + \else + \mtcPackageError[<E0027>]{minitoc}% + {The optional argument of \string\mtcfixindex + \MessageBreak + is wrong}% + {It must be omitted (\mtc@ixfix@level), + or be part, chapter or section}% + \fi +}% \newif\if@mtc@insellang@ \@mtc@insellang@false \def\mtcselectlanguage#1{% \InputIfFileExists{#1.mld}% - {\PackageInfo{minitoc}{#1 language selected.% + {\mtcPackageInfo[<I0010>]{minitoc}{The #1 language is selected.% \MessageBreak}}% - {\PackageError{minitoc}% + {\mtcPackageError[<E0006>]{minitoc}% {#1 is not a known language, \MessageBreak #1.mld not found. \MessageBreak Command ignored}% @@ -2988,17 +3362,18 @@ \def\mtcloadmlo#1{% \if@mtc@insellang@ \InputIfFileExists{#1.mlo}% - {\PackageInfo{minitoc}{#1 minitoc language object selected.% - \MessageBreak}}% - {\PackageError{minitoc}% - {#1 is not a known minitoc language object file (.mlo), \MessageBreak + {\mtcPackageInfo[<I0011>]{minitoc}% + {#1 minitoc language object selected.\MessageBreak}}% + {\mtcPackageError[<E0007>]{minitoc}% + {#1 is not a known minitoc\MessageBreak + language object file (.mlo), \MessageBreak #1.mlo not found. \MessageBreak Command ignored}% {See the minitoc documentation. \MessageBreak Correct the source using a valid language name. \MessageBreak Press RETURN}}% \else - \PackageError{minitoc}% + \mtcPackageError[<E0032>]{minitoc}% {You are using the \string\mtcloadmlo\space command\MessageBreak outside of a .mld file}% {It will be ignored} @@ -3023,8 +3398,8 @@ \DeclareOption{dotted}{\undottedmtcfalse} % default \DeclareOption{notoccite}{\@mtc@notoccite@true} \DeclareOption{shortext}{\@longextensions@false -\PackageWarningNoLine{minitoc}% - {*** You have forced the use of short extensions ***}} +\mtcPackageWarningNoLine[<W0020>]{minitoc}% + {You have forced the use of short extensions}} \newif\if@mtc@ss@insection@ \@mtc@ss@insection@false \@ifundefined{chapter}{% \@ifundefined{section}{}% @@ -3033,19 +3408,30 @@ {\@mtc@ss@insection@true}% }% }{} +\newif\if@mtc@listfiles@ \@mtc@listfiles@false +\DeclareOption{listfiles}{\@mtc@listfiles@true} +\DeclareOption{nolistfiles}{\@mtc@listfiles@false} \DeclareOption{acadian}{\mtcselectlanguage{acadian}}% \DeclareOption{acadien}{\mtcselectlanguage{acadien}}% \DeclareOption{afrikaan}{\mtcselectlanguage{afrikaan}}% \DeclareOption{afrikaans}{\mtcselectlanguage{afrikaans}}% +\DeclareOption{albanian}{\mtcselectlanguage{albanian}}% \DeclareOption{american}{\mtcselectlanguage{american}}% \DeclareOption{arab}{\mtcselectlanguage{arab}}% +\DeclareOption{arab2}{\mtcselectlanguage{arab2}}% \DeclareOption{arabic}{\mtcselectlanguage{arabic}}% \DeclareOption{armenian}{\mtcselectlanguage{armenian}}% +\DeclareOption{australian}{\mtcselectlanguage{australian}}% \DeclareOption{austrian}{\mtcselectlanguage{austrian}}% \DeclareOption{bahasa}{\mtcselectlanguage{bahasa}}% +\DeclareOption{bahasai}{\mtcselectlanguage{bahasai}}% +\DeclareOption{bahasam}{\mtcselectlanguage{bahasam}}% \DeclareOption{bangla}{\mtcselectlanguage{bangla}}% \DeclareOption{basque}{\mtcselectlanguage{basque}}% \DeclareOption{bicig}{\mtcselectlanguage{bicig}}% +\DeclareOption{bicig2}{\mtcselectlanguage{bicig2}}% +\DeclareOption{bicig3}{\mtcselectlanguage{bicig3}}% +\DeclareOption{bithe}{\mtcselectlanguage{bithe}}% \DeclareOption{brazil}{\mtcselectlanguage{brazil}}% \DeclareOption{brazilian}{\mtcselectlanguage{brazilian}}% \DeclareOption{breton}{\mtcselectlanguage{breton}}% @@ -3053,6 +3439,7 @@ \DeclareOption{bulgarian}{\mtcselectlanguage{bulgarian}}% \DeclareOption{bulgarianb}{\mtcselectlanguage{bulgarianb}}% \DeclareOption{buryat}{\mtcselectlanguage{buryat}}% +\DeclareOption{buryat2}{\mtcselectlanguage{buryat2}}% \DeclareOption{canadian}{\mtcselectlanguage{canadian}}% \DeclareOption{canadien}{\mtcselectlanguage{canadien}}% \DeclareOption{castillan}{\mtcselectlanguage{castillan}}% @@ -3065,23 +3452,29 @@ \DeclareOption{danish}{\mtcselectlanguage{danish}}% \DeclareOption{dutch}{\mtcselectlanguage{dutch}}% \DeclareOption{english}{\mtcselectlanguage{english}}% +\DeclareOption{english1}{\mtcselectlanguage{english1}}% +\DeclareOption{english2}{\mtcselectlanguage{english2}}% \DeclareOption{esperant}{\mtcselectlanguage{esperant}}% \DeclareOption{esperanto}{\mtcselectlanguage{esperanto}}% \DeclareOption{estonian}{\mtcselectlanguage{estonian}}% \DeclareOption{ethiopia}{\mtcselectlanguage{ethiopia}}% \DeclareOption{ethiopian}{\mtcselectlanguage{ethiopian}}% +\DeclareOption{ethiopian2}{\mtcselectlanguage{ethiopian2}}% \DeclareOption{farsi1}{\mtcselectlanguage{farsi1}}% \DeclareOption{farsi2}{\mtcselectlanguage{farsi2}}% \DeclareOption{finnish}{\mtcselectlanguage{finnish}}% \DeclareOption{finnish2}{\mtcselectlanguage{finnish2}}% \DeclareOption{francais}{\mtcselectlanguage{francais}}% \DeclareOption{french}{\mtcselectlanguage{french}}% +\DeclareOption{french1}{\mtcselectlanguage{french1}}% +\DeclareOption{french2}{\mtcselectlanguage{french2}}% \DeclareOption{frenchb}{\mtcselectlanguage{frenchb}}% \DeclareOption{frenchle}{\mtcselectlanguage{frenchle}}% \DeclareOption{frenchpro}{\mtcselectlanguage{frenchpro}}% \DeclareOption{galician}{\mtcselectlanguage{galician}}% \DeclareOption{german}{\mtcselectlanguage{german}}% \DeclareOption{germanb}{\mtcselectlanguage{germanb}}% +\DeclareOption{germanb2}{\mtcselectlanguage{germanb2}}% \DeclareOption{greek}{\mtcselectlanguage{greek}}% \DeclareOption{greek-mono}{\mtcselectlanguage{greek-mono}}% \DeclareOption{greek-polydemo}{\mtcselectlanguage{greek-polydemo}}% @@ -3091,46 +3484,72 @@ \DeclareOption{hangul2}{\mtcselectlanguage{hangul2}}% \DeclareOption{hangul3}{\mtcselectlanguage{hangul3}}% \DeclareOption{hangul4}{\mtcselectlanguage{hangul4}}% +\DeclareOption{hangul-u8}{\mtcselectlanguage{hangul-u8}}% \DeclareOption{hanja1}{\mtcselectlanguage{hanja1}}% \DeclareOption{hanja2}{\mtcselectlanguage{hanja2}}% +\DeclareOption{hanja-u8}{\mtcselectlanguage{hanja-u8}}% \DeclareOption{hebrew}{\mtcselectlanguage{hebrew}}% +\DeclareOption{hebrew2}{\mtcselectlanguage{hebrew2}}% \DeclareOption{hungarian}{\mtcselectlanguage{hungarian}}% \DeclareOption{icelandic}{\mtcselectlanguage{icelandic}}% +\DeclareOption{indon}{\mtcselectlanguage{indon}}% +\DeclareOption{indonesian}{\mtcselectlanguage{indonesian}}% \DeclareOption{interlingua}{\mtcselectlanguage{interlingua}}% \DeclareOption{irish}{\mtcselectlanguage{irish}}% \DeclareOption{italian}{\mtcselectlanguage{italian}}% +\DeclareOption{italian2}{\mtcselectlanguage{italian2}}% \DeclareOption{japanese}{\mtcselectlanguage{japanese}}% \DeclareOption{japanese2}{\mtcselectlanguage{japanese2}}% \DeclareOption{japanese3}{\mtcselectlanguage{japanese3}}% \DeclareOption{japanese4}{\mtcselectlanguage{japanese4}}% \DeclareOption{japanese5}{\mtcselectlanguage{japanese5}}% +\DeclareOption{kannada}{\mtcselectlanguage{kannada}}% +\DeclareOption{khalkha}{\mtcselectlanguage{khalkha}}% \DeclareOption{latin}{\mtcselectlanguage{latin}}% \DeclareOption{latin2}{\mtcselectlanguage{latin2}}% \DeclareOption{latvian}{\mtcselectlanguage{latvian}}% \DeclareOption{letton}{\mtcselectlanguage{letton}}% \DeclareOption{lithuanian}{\mtcselectlanguage{lithuanian}}% +\DeclareOption{lowersorbian}{\mtcselectlanguage{lowersorbian}}% \DeclareOption{lsorbian}{\mtcselectlanguage{lsorbian}}% \DeclareOption{magyar}{\mtcselectlanguage{magyar}}% \DeclareOption{magyar2}{\mtcselectlanguage{magyar2}}% +\DeclareOption{magyar3}{\mtcselectlanguage{magyar3}}% +\DeclareOption{malay}{\mtcselectlanguage{malay}}% \DeclareOption{malayalam-keli}{\mtcselectlanguage{malayalam-keli}}% +\DeclareOption{malayalam-omega}{\mtcselectlanguage{malayalam-omega}}% \DeclareOption{malayalam-rachana}{\mtcselectlanguage{malayalam-rachana}}% \DeclareOption{malayalam-rachana2}{\mtcselectlanguage{malayalam-rachana2}}% +\DeclareOption{manju}{\mtcselectlanguage{manju}}% +\DeclareOption{meyalu}{\mtcselectlanguage{meyalu}}% \DeclareOption{mongol}{\mtcselectlanguage{mongol}}% \DeclareOption{naustrian}{\mtcselectlanguage{naustrian}}% +\DeclareOption{newzealand}{\mtcselectlanguage{newzealand}}% \DeclareOption{ngerman}{\mtcselectlanguage{ngerman}}% \DeclareOption{ngermanb}{\mtcselectlanguage{ngermanb}}% +\DeclareOption{ngermanb2}{\mtcselectlanguage{ngermanb2}}% \DeclareOption{norsk}{\mtcselectlanguage{norsk}}% -\DeclareOption{nynorsk}{\mtcselectlanguage{nynorsk}}% +\DeclareOption{norsk2}{\mtcselectlanguage{norsk2}}% +\DeclareOption{nynorsk2}{\mtcselectlanguage{nynorsk2}}% \DeclareOption{polish}{\mtcselectlanguage{polish}}% \DeclareOption{polish2}{\mtcselectlanguage{polish2}}% +\DeclareOption{polski}{\mtcselectlanguage{polski}}% \DeclareOption{portuges}{\mtcselectlanguage{portuges}}% \DeclareOption{portuguese}{\mtcselectlanguage{portuguese}}% \DeclareOption{romanian}{\mtcselectlanguage{romanian}}% +\DeclareOption{romanian2}{\mtcselectlanguage{romanian2}}% +\DeclareOption{romanian3}{\mtcselectlanguage{romanian3}}% \DeclareOption{russian}{\mtcselectlanguage{russian}}% \DeclareOption{russianb}{\mtcselectlanguage{russianb}}% \DeclareOption{russianc}{\mtcselectlanguage{russianc}}% \DeclareOption{russian2m}{\mtcselectlanguage{russian2m}}% \DeclareOption{russian2o}{\mtcselectlanguage{russian2o}}% +\DeclareOption{russian-cca}{\mtcselectlanguage{russian-cca}}% +\DeclareOption{russian-cca1}{\mtcselectlanguage{russian-cca1}}% +\DeclareOption{russian-lh}{\mtcselectlanguage{russian-lh}}% +\DeclareOption{russian-lhcyralt}{\mtcselectlanguage{russian-lhcyralt}}% +\DeclareOption{russian-lhcyrkoi}{\mtcselectlanguage{russian-lhcyrkoi}}% +\DeclareOption{russian-lhcyrwin}{\mtcselectlanguage{russian-lhcyrwin}}% \DeclareOption{samin}{\mtcselectlanguage{samin}}% \DeclareOption{scottish}{\mtcselectlanguage{scottish}}% \DeclareOption{serbian}{\mtcselectlanguage{serbian}}% @@ -3140,106 +3559,181 @@ \DeclareOption{spanish}{\mtcselectlanguage{spanish}}% \DeclareOption{spanish2}{\mtcselectlanguage{spanish2}}% \DeclareOption{spanish3}{\mtcselectlanguage{spanish3}}% +\DeclareOption{spanish4}{\mtcselectlanguage{spanish4}}% \DeclareOption{swedish}{\mtcselectlanguage{swedish}}% +\DeclareOption{swedish2}{\mtcselectlanguage{swedish2}}% \DeclareOption{thai}{\mtcselectlanguage{thai}}% \DeclareOption{turkish}{\mtcselectlanguage{turkish}}% +\DeclareOption{uighur}{\mtcselectlanguage{uighur}}% +\DeclareOption{uighur2}{\mtcselectlanguage{uighur2}}% +\DeclareOption{uighur3}{\mtcselectlanguage{uighur3}}% \DeclareOption{UKenglish}{\mtcselectlanguage{UKenglish}}% \DeclareOption{ukraineb}{\mtcselectlanguage{ukraineb}}% +\DeclareOption{ukrainian}{\mtcselectlanguage{ukrainian}}% +\DeclareOption{uppersorbian}{\mtcselectlanguage{uppersorbian}}% \DeclareOption{USenglish}{\mtcselectlanguage{USenglish}}% \DeclareOption{usorbian}{\mtcselectlanguage{usorbian}}% \DeclareOption{vietnam}{\mtcselectlanguage{vietnam}}% \DeclareOption{vietnamese}{\mtcselectlanguage{vietnamese}}% \DeclareOption{welsh}{\mtcselectlanguage{welsh}}% -\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 +\DeclareOption{xalx}{\mtcselectlanguage{xalx}}% +\DeclareOption{xalx2}{\mtcselectlanguage{xalx2}}% +\DeclareOption{xalx3}{\mtcselectlanguage{xalx3}}% \DeclareOption{hints}{\@mtc@hints@true} \DeclareOption{nohints}{\@mtc@hints@false} +\newif\if@mtc@abstract@loaded@ \@mtc@abstract@loaded@false +\newif\if@mtc@toc@used@ \global\@mtc@toc@used@false +\newif\if@mtc@lof@used@ \global\@mtc@lof@used@false +\newif\if@mtc@lot@used@ \global\@mtc@lot@used@false \def\mtc@hints@begindoc{% -\PackageInfo{minitoc(hints)}% - {***** You requested the hints option *****\MessageBreak - ***** Some hints are eventually given below *****\@gobble}% +\mtcPackageInfo[<I0049>]{minitoc(hints)}% + {==> You requested the hints option\MessageBreak + Some hints are eventually given below\@gobble}% +\@ifpackageloaded{alphanum}% + {\@mtc@hints@given@true + \mtcPackageWarningNoLine[<W0025>]{minitoc(hints)}% + {--- The alphanum package is loaded. \MessageBreak + It is incompatible\MessageBreak with the minitoc package}}{}% \@ifpackageloaded{appendix}{% \@mtc@hints@given@true -\PackageInfo{minitoc(hints)}% +\mtcPackageInfo[<I0042>]{minitoc(hints)}% {--- The appendix package is loaded. \MessageBreak See the minitoc package documentation\MessageBreak for specific precautions\@gobble}}{}% \@ifpackageloaded{tocbibind}% {\@mtc@hints@given@true - \PackageInfo{minitoc(hints)}% + \mtcPackageInfo[<I0046>]{minitoc(hints)}% {--- The tocbibind package is loaded. \MessageBreak - See the minitoc package documentation + See the minitoc package documentation\MessageBreak + for specific precautions\@gobble}}{}% +\@ifclassloaded{scrbook}% + {\@mtc@hints@given@true + \mtcPackageInfo[<I0043>]{minitoc(hints)}% + {--- The KOMAScript scrbook class is loaded. \MessageBreak + See the minitoc package documentation\MessageBreak + for specific precautions\@gobble}}{}% +\@ifclassloaded{scrreprt}% + {\@mtc@hints@given@true + \mtcPackageInfo[<I0043>]{minitoc(hints)}% + {--- The KOMAScript scrreprt class is loaded. \MessageBreak + See the minitoc package documentation\MessageBreak + for specific precautions\@gobble}}{}% +\@ifclassloaded{scrartcl}% + {\@mtc@hints@given@true + \mtcPackageInfo[<I0043>]{minitoc(hints)}% + {--- The KOMAScript scrartcl class is loaded. \MessageBreak + See the minitoc package documentation\MessageBreak for specific precautions\@gobble}}{}% \@ifpackageloaded{tocloft}% {\@mtc@hints@given@true - \PackageInfo{minitoc(hints)}% + \mtcPackageInfo[<I0047>]{minitoc(hints)}% {--- The tocloft package is loaded. \MessageBreak - See the minitoc package documentation + See the minitoc package documentation\MessageBreak for specific precautions\@gobble}}{}% \@ifpackageloaded{titletoc}% {\@mtc@hints@given@true - \PackageWarningNoLine{minitoc(hints)}% + \mtcPackageWarningNoLine[<W0040>]{minitoc(hints)}% {--- The titletoc package is loaded. \MessageBreak - It is incompatible with the minitoc package}}{}% + It is incompatible\MessageBreak with the minitoc package}}{}% \@ifpackageloaded{placeins}% {\if@mtc@ss@insection@ - \@ifpackagewith{placeins}{section,below}{}% + \@ifpackagewith{placeins}{section}{}% {\@mtc@hints@given@true - \PackageWarningNoLine{minitoc(hints)}% - {--- The placeins package is loaded without + \mtcPackageWarningNoLine[<W0031>]{minitoc(hints)}% + {--- The placeins package is loaded + \MessageBreak + without the section option, \MessageBreak - section and below options, but minitoc used + but minitoc used the insection option \MessageBreak - the insection option which implies them. + which implies it. Try to inverse the \MessageBreak - Try to inverse the loading order and use coherent options. + loading order and use coherent options. \MessageBreak - You may have got a message - ! LaTeX Error: Option clash for package placeins}% + You may have got a message\MessageBreak + ! LaTeX Error: Option clash for package placeins}% }% + \@ifpackagewith{placeins}{above}% + {\@mtc@hints@given@true + \mtcPackageWarningNoLine[<W0084>]{minitoc(hints)}% + {--- The placeins package is loaded + \MessageBreak + with the above option, + \MessageBreak + but minitoc used the insection option + \MessageBreak + which is incompatible with it. + \MessageBreak + Try to remove the above option + \MessageBreak + and use coherent options}% + }{}% + \@ifpackagewith{placeins}{below}% + {\@mtc@hints@given@true + \mtcPackageWarningNoLine[<W0085>]{minitoc(hints)}% + {--- The placeins package is loaded + \MessageBreak + with the below option, + \MessageBreak + but minitoc used the insection option + \MessageBreak + which is incompatible with it. + \MessageBreak + Try to remove the below option + \MessageBreak + and use coherent options}% + }{}% \fi \@ifpackagelater{placeins}{2005/04/18}{}{% \@mtc@hints@given@true - \PackageWarningNoLine{minitoc(hints)}% - {--- The placeins package loaded is - \MessageBreak - too old. It should have a version date of - \MessageBreak - 2005/04/18 at least}% + \mtcPackageWarningNoLine[<W0032>]{minitoc(hints)}% + {--- The placeins package loaded is + \MessageBreak + too old. It should have a version + \MessageBreak + date of 2005/04/18 at least}% }% }{}% \@ifclassloaded{memoir}% {\@mtc@hints@given@true - \PackageInfo{minitoc(hints)}% + \mtcPackageInfo[<I0044>]{minitoc(hints)}% {--- The memoir class is loaded. \MessageBreak - See the minitoc package documentation for specific precautions\@gobble}{}% + See the minitoc package documentation\MessageBreak + for specific precautions\@gobble}{}% }{}% \@ifclassloaded{amsart}% {\@mtc@hints@given@true - \PackageWarningNoLine{minitoc(hints)}% + \mtcPackageWarningNoLine[<W0026>]{minitoc(hints)}% {--- The amsart class is loaded. \MessageBreak - It is incompatible with the minitoc package}}{}% + It is incompatible\MessageBreak with the minitoc package}}{}% \@ifclassloaded{amsproc}% {\@mtc@hints@given@true - \PackageWarningNoLine{minitoc(hints)}% + \mtcPackageWarningNoLine[<W0027>]{minitoc(hints)}% {--- The amsproc class is loaded. \MessageBreak - It is incompatible with the minitoc package}}{}% + It is incompatible\MessageBreak with the minitoc package}}{}% \@ifclassloaded{amsbook}% {\@mtc@hints@given@true - \PackageInfo{minitoc(hints)}% + \mtcPackageInfo[<I0041>]{minitoc(hints)}% {--- The amsbook class is loaded. \MessageBreak - See the minitoc package documentation for specific precautions\@gobble}{}% + See the minitoc package documentation\MessageBreak + for specific precautions\@gobble}{}% }{}% \@ifpackageloaded{abstract}% {\@mtc@abstract@loaded@true% \@ifpackagewith{abstract}{addtotoc}% {\@mtc@hints@given@true - \PackageInfo{minitoc(hints)}% - {The ``abstract'' package has been loaded with\MessageBreak - the ``addtotoc'' option.\MessageBreak - You need to look at the documentation to adjust.} + \mtcPackageInfo[<I0040>]{minitoc(hints)}% + {The ``abstract'' package has been\MessageBreak + loaded with the ``addtotoc'' option.\MessageBreak + You need to look at the\MessageBreak + documentation to adjust. + \MessageBreak} }}{} +\@ifclassloaded{jura}% + {\@mtc@hints@given@true + \mtcPackageWarningNoLine[<W0029>]{minitoc(hints)}% + {--- The jura class is loaded. \MessageBreak + It is incompatible\MessageBreak with the minitoc package}}{}% \@mtc@hints@w@false \@ifundefined{part}{}{\ifx\part\mtc@hints@part\relax \else\@mtc@hints@w@true\fi} @@ -3248,11 +3742,12 @@ \@ifundefined{part}{}{\ifx\@spart\mtc@hints@@spart\relax \else\@mtc@hints@w@true\fi} \if@mtc@hints@w@\@mtc@hints@given@true% - \PackageWarningNoLine{minitoc(hints)}% - {--- The \string\part\space command is altered after minitoc} + \mtcPackageWarningNoLine[<W0030>]{minitoc(hints)}% + {--- The \string\part\space command is altered\MessageBreak after minitoc} \if@mtc@hyper@used@ - \PackageWarningNoLine{minitoc(hints)}% - {--- It may be the consequence of loading the ``hyperref'' package} + \mtcPackageWarningNoLine[<W0023>]{minitoc(hints)}% + {--- It may be the consequence\MessageBreak + of loading the ``hyperref'' package} \fi \fi \@mtc@hints@w@false @@ -3263,11 +3758,12 @@ \@ifundefined{chapter}{}{\ifx\@schapter\mtc@hints@@schapter\relax \else\@mtc@hints@w@true\fi}% \if@mtc@hints@w@\@mtc@hints@given@true% - \PackageWarningNoLine{minitoc(hints)}% - {--- The \string\chapter\space command is altered after minitoc} + \mtcPackageWarningNoLine[<W0028>]{minitoc(hints)}% + {--- The \string\chapter\space command is altered\MessageBreak after minitoc} \if@mtc@hyper@used@ - \PackageWarningNoLine{minitoc(hints)}% - {--- It may be the consequence of loading the ``hyperref'' package} + \mtcPackageWarningNoLine[<W0023>]{minitoc(hints)}% + {--- It may be the consequence\MessageBreak + of loading the ``hyperref'' package} \fi \fi \@mtc@hints@w@false @@ -3279,17 +3775,18 @@ \@ifundefined{section}{}{\ifx\@ssect\mtc@hints@@ssect\relax\else \@mtc@hints@w@true\fi} \if@mtc@hints@w@\@mtc@hints@given@true% - \PackageWarningNoLine{minitoc(hints)}% - {--- The \string\section\space command is altered after minitoc} + \mtcPackageWarningNoLine[<W0039>]{minitoc(hints)}% + {--- The \string\section\space command is altered\MessageBreak after minitoc} \if@mtc@hyper@used@ - \PackageWarningNoLine{minitoc(hints)}% - {--- It may be the consequence of loading the ``hyperref'' package} + \mtcPackageWarningNoLine[<W0023>]{minitoc(hints)}% + {--- It may be the consequence\MessageBreak + of loading the ``hyperref'' package} \fi \relax\else\fi}{}% \if@mtc@hints@ -\newif\if@mtc@toc@used@ \global\@mtc@toc@used@false -\newif\if@mtc@lof@used@ \global\@mtc@lof@used@false -\newif\if@mtc@lot@used@ \global\@mtc@lot@used@false +\global\@mtc@toc@used@false +\global\@mtc@lof@used@false +\global\@mtc@lot@used@false \let\mtc@sv@tableofcontents\tableofcontents \def\tableofcontents% {\global\@mtc@toc@used@true\mtc@sv@tableofcontents} @@ -3316,40 +3813,39 @@ \if@sectlof@used@\@mtc@sect@floats@true\fi \if@sectlot@used@\@mtc@sect@floats@true\fi \if@mtc@section@def@ -\if@mtc@placeinsLoaded@ -\else +\if@mtc@placeinsLoaded@ \else \if@mtc@sect@floats@% - \PackageWarningNoLine{minitoc(hints)}% - {***** You are using \string\dosectlof\space and/or \MessageBreak + \mtcPackageWarningNoLine[<W0056>]{minitoc(hints)}% + {You are using \string\dosectlof\space and/or \MessageBreak \string\dosectlot, \string\sectlof\space and/or \string\sectlot, \MessageBreak - hence the ``insection'' package option is recommended. *****}% - \@mtc@hints@w@true - \@mtc@hints@given@true + hence the ``insection'' package\MessageBreak + option is recommended}% + \@mtc@hints@w@true \@mtc@hints@given@true \fi \fi \if@mtc@part@def@ \if@parttoc@used@ \if@doparttoc@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\parttoc\space - but not \string\doparttoc\space*****} + \mtcPackageWarningNoLine[<W0062>]{minitoc(hints)}% + {You have used \string\parttoc,\MessageBreak + but not \string\doparttoc} \@mtc@hints@given@true \fi \fi \if@partlof@used@ \if@dopartlof@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\partlof\space - but not \string\dopartlof\space*****} + \mtcPackageWarningNoLine[<W0060>]{minitoc(hints)}% + {You have used \string\partlof,\MessageBreak + but not \string\dopartlof} \@mtc@hints@given@true \fi \fi \if@partlot@used@ \if@dopartlot@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\partlot\space - but not \string\dopartlot\space*****} + \mtcPackageWarningNoLine[<W0061>]{minitoc(hints)}% + {You have used \string\partlot,\MessageBreak + but not \string\dopartlot} \@mtc@hints@given@true \fi \fi @@ -3357,25 +3853,25 @@ \if@mtc@chapter@def@ \if@minitoc@used@ \if@dominitoc@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\minitoc\space - but not \string\dominitoc\space*****} + \mtcPackageWarningNoLine[<W0059>]{minitoc(hints)}% + {You have used \string\minitoc,\MessageBreak + but not \string\dominitoc} \@mtc@hints@given@true \fi \fi \if@minilof@used@ \if@dominilof@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\minilof\space - but not \string\dominilof\space*****} + \mtcPackageWarningNoLine[<W0057>]{minitoc(hints)}% + {You have used \string\minilof,\MessageBreak + but not \string\dominilof} \@mtc@hints@given@true \fi \fi \if@minilot@used@ \if@dominilot@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\minilot\space - but not \string\dominilot\space*****} + \mtcPackageWarningNoLine[<W0058>]{minitoc(hints)}% + {You have used \string\minilot,\MessageBreak + but not \string\dominilot} \@mtc@hints@given@true \fi \fi @@ -3383,50 +3879,50 @@ \if@mtc@section@def@ \if@secttoc@used@ \if@dosecttoc@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\secttoc\space - but not \string\dosecttoc\space*****} + \mtcPackageWarningNoLine[<W0065>]{minitoc(hints)}% + {You have used \string\secttoc,\MessageBreak + but not \string\dosecttoc} \@mtc@hints@given@true \fi \fi \if@sectlof@used@ \if@dosectlof@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\sectlof\space - but not \string\dosectlof\space*****} + \mtcPackageWarningNoLine[<W0063>]{minitoc(hints)}% + {You have used \string\sectlof,\MessageBreak + but not \string\dosectlof} \@mtc@hints@given@true \fi \fi \if@sectlot@used@ \if@dosectlot@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\sectlot\space - but not \string\dosectlot\space*****} + \mtcPackageWarningNoLine[<W0064>]{minitoc(hints)}% + {You have used \string\sectlot,\MessageBreak + but not \string\dosectlot} \fi \fi \fi \if@mtc@part@def@ \if@doparttoc@used@ \if@parttoc@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\doparttoc\space - but not \string\parttoc\space*****} + \mtcPackageWarningNoLine[<W0075>]{minitoc(hints)}% + {You have used \string\doparttoc,\MessageBreak + but not \string\parttoc} \@mtc@hints@given@true \fi \fi \if@dopartlof@used@ \if@partlof@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\dopartlof\space - but not \string\partlof\space*****} + \mtcPackageWarningNoLine[<W0076>]{minitoc(hints)}% + {You have used \string\dopartlof,\MessageBreak + but not \string\partlof} \@mtc@hints@given@true \fi \fi \if@dopartlot@used@ \if@partlot@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\dopartlot\space - but not \string\partlot\space*****} + \mtcPackageWarningNoLine[<W0077>]{minitoc(hints)}% + {You have used \string\dopartlot,\MessageBreak + but not \string\partlot} \@mtc@hints@given@true \fi \fi @@ -3434,25 +3930,25 @@ \if@mtc@chapter@def@ \if@dominitoc@used@ \if@minitoc@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\dominitoc\space - but not \string\minitoc\space*****} + \mtcPackageWarningNoLine[<W0078>]{minitoc(hints)}% + {You have used \string\dominitoc,\MessageBreak + but not \string\minitoc} \@mtc@hints@given@true \fi \fi \if@dominilof@used@ \if@minilof@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\dominilof\space - but not \string\minilof\space*****} + \mtcPackageWarningNoLine[<W0079>]{minitoc(hints)}% + {You have used \string\dominilof,\MessageBreak + but not \string\minilof} \@mtc@hints@given@true \fi \fi \if@dominilot@used@ \if@minilot@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\dominilot\space - but not \string\minilot\space*****} + \mtcPackageWarningNoLine[<W0080>]{minitoc(hints)}% + {You have used \string\dominilot,\MessageBreak + but not \string\minilot} \@mtc@hints@given@true \fi \fi @@ -3460,25 +3956,25 @@ \if@mtc@section@def@ \if@dosecttoc@used@ \if@secttoc@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\dosecttoc\space - but not \string\secttoc\space*****} + \mtcPackageWarningNoLine[<W0081>]{minitoc(hints)}% + {You have used \string\dosecttoc,\MessageBreak + but not \string\secttoc} \@mtc@hints@given@true \fi \fi \if@dosectlof@used@ \if@sectlof@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\dosectlof\space - but not \string\sectlof\space*****} + \mtcPackageWarningNoLine[<W0082>]{minitoc(hints)}% + {You have used \string\dosectlof,\MessageBreak + but not \string\sectlof} \@mtc@hints@given@true \fi \fi \if@dosectlot@used@ \if@sectlot@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\dosectlot\space - but not \string\sectlot\space*****} + \mtcPackageWarningNoLine[<W0083>]{minitoc(hints)}% + {You have used \string\dosectlot,\MessageBreak + but not \string\sectlot} \fi \fi \fi @@ -3486,28 +3982,28 @@ \if@mtc@part@def@ \if@parttoc@used@ \if@mtc@toc@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\parttoc\space but not\MessageBreak - \string\tableofcontents\space nor - \string\faketableofcontents\space *****} + \mtcPackageWarningNoLine[<W0071>]{minitoc(hints)}% + {You have used \string\parttoc\space but not\MessageBreak + \string\tableofcontents\MessageBreak nor + \string\faketableofcontents} \@mtc@hints@given@true \fi \fi \if@partlof@used@ \if@mtc@lof@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\partlof\space but not\MessageBreak - \string\listoffigures\space nor - \string\fakelistoffigures\space *****} + \mtcPackageWarningNoLine[<W0069>]{minitoc(hints)}% + {You have used \string\partlof\space but not\MessageBreak + \string\listoffigures\MessageBreak nor + \string\fakelistoffigures} \@mtc@hints@given@true \fi \fi \if@partlot@used@ \if@mtc@lot@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\partlot\space but not\MessageBreak - \string\listoftables\space nor - \string\fakelistoftables\space *****} + \mtcPackageWarningNoLine[<W0070>]{minitoc(hints)}% + {You have used \string\partlot\space but not\MessageBreak + \string\listoftables\MessageBreak nor + \string\fakelistoftables} \@mtc@hints@given@true \fi \fi @@ -3515,28 +4011,28 @@ \if@mtc@chapter@def@ \if@minitoc@used@ \if@mtc@toc@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\minitoc\space but not\MessageBreak - \string\tableofcontents\space nor - \string\faketableofcontents\space *****} + \mtcPackageWarningNoLine[<W0068>]{minitoc(hints)}% + {You have used \string\minitoc\space but not\MessageBreak + \string\tableofcontents\MessageBreak nor + \string\faketableofcontents} \@mtc@hints@given@true \fi \fi \if@minilof@used@ \if@mtc@lof@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\minilof\space but not\MessageBreak - \string\listoffigures\space nor - \string\fakelistoffigures\space *****} + \mtcPackageWarningNoLine[<W0066>]{minitoc(hints)}% + {You have used \string\minilof\space but not\MessageBreak + \string\listoffigures\MessageBreak nor + \string\fakelistoffigures} \@mtc@hints@given@true \fi \fi \if@minilot@used@ \if@mtc@lot@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\minilot\space but not\MessageBreak - \string\listoftables\space nor - \string\fakelistoftables\space *****} + \mtcPackageWarningNoLine[<W0067>]{minitoc(hints)}% + {You have used \string\minilot\space but not\MessageBreak + \string\listoftables\MessageBreak nor + \string\fakelistoftables} \@mtc@hints@given@true \fi \fi @@ -3544,28 +4040,28 @@ \if@mtc@section@def@ \if@secttoc@used@ \if@mtc@toc@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\secttoc\space but not\MessageBreak - \string\tableofcontents\space nor - \string\faketableofcontents\space *****} + \mtcPackageWarningNoLine[<W0074>]{minitoc(hints)}% + {You have used \string\secttoc\space but not\MessageBreak + \string\tableofcontents\MessageBreak nor + \string\faketableofcontents} \@mtc@hints@given@true \fi \fi \if@sectlof@used@ \if@mtc@lof@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\sectlof\space but not\MessageBreak - \string\listoffigures\space nor - \string\fakelistoffigures\space *****} + \mtcPackageWarningNoLine[<W0072>]{minitoc(hints)}% + {You have used \string\sectlof\space but not\MessageBreak + \string\listoffigures\MessageBreak nor + \string\fakelistoffigures} \@mtc@hints@given@true \fi \fi \if@sectlot@used@ \if@mtc@lot@used@\else - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used \string\sectlot\space but not\MessageBreak - \string\listoftables\space nor - \string\fakelistoftables\space *****} + \mtcPackageWarningNoLine[<W0073>]{minitoc(hints)}% + {You have used \string\sectlot\space but not\MessageBreak + \string\listoftables\MessageBreak nor + \string\fakelistoftables} \@mtc@hints@given@true \fi \fi @@ -3576,25 +4072,25 @@ \if@mtc@part@def@ \ifnum 99 < \value{ptc} \@mtc@hints@given@true - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used short extensions - and more than 99 parts *****} + \mtcPackageWarningNoLine[<W0054>]{minitoc(hints)}% + {You have used short extensions\MessageBreak + and more than 99 parts (\arabic{ptc})} \fi \fi \if@mtc@chapter@def@ \ifnum 99 < \value{mtc} \@mtc@hints@given@true - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used short extensions - and more than 99 chapters *****} + \mtcPackageWarningNoLine[<W0053>]{minitoc(hints)}% + {You have used short extensions\MessageBreak + and more than 99 chapters (\arabic{mtc})} \fi \else \if@mtc@section@def@ \ifnum 99 < \value{stc} \@mtc@hints@given@true - \PackageWarningNoLine{minitoc(hints)}% - {**** You have used short extensions - and more than 99 sections *****} + \mtcPackageWarningNoLine[<W0055>]{minitoc(hints)}% + {You have used short extensions\MessageBreak + and more than 99 sections (\arabic{stc})} \fi \fi \fi @@ -3602,86 +4098,175 @@ \mtc@hints@checklongext \if@mtc@sectstyLoaded@\else \if@mtc@sectstyLoaded@a@ - \PackageWarningNoLine{minitoc(hints)}% - {**** The sectsty package should be loaded \MessageBreak - **before** the minitoc package ****} + \mtcPackageWarningNoLine[<W0037>]{minitoc(hints)}% + {The sectsty package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@varsectsLoaded@\else + \if@mtc@varsectsLoaded@a@ + \mtcPackageWarningNoLine[<W0038>]{minitoc(hints)}% + {The varsects package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@fncychapLoaded@\else + \if@mtc@fncychapLoaded@a@ + \mtcPackageWarningNoLine[<W0086>]{minitoc(hints)}% + {The fncychap package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@quotchapLoaded@\else + \if@mtc@quotchapLoaded@a@ + \mtcPackageWarningNoLine[<W0087>]{minitoc(hints)}% + {The quotchap package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@romannumLoaded@\else + \if@mtc@romannumLoaded@a@ + \mtcPackageWarningNoLine[<W0088>]{minitoc(hints)}% + {The romannum package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@sfheadersLoaded@\else + \if@mtc@sfheadersLoaded@a@ + \mtcPackageWarningNoLine[<W0089>]{minitoc(hints)}% + {The sfheaders package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@alnumsecLoaded@\else + \if@mtc@alnumsecLoaded@a@ + \mtcPackageWarningNoLine[<W0090>]{minitoc(hints)}% + {The alnumsec package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@captcontLoaded@\else + \if@mtc@captcontLoaded@a@ + \mtcPackageWarningNoLine[<W0091>]{minitoc(hints)}% + {The captcont package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@captionLoaded@\else + \if@mtc@captionLoaded@a@ + \mtcPackageWarningNoLine[<W0033>]{minitoc(hints)}% + {The caption package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@captionIILoaded@\else + \if@mtc@captionIILoaded@a@ + \mtcPackageWarningNoLine[<W0034>]{minitoc(hints)}% + {The caption2 package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@ccaptionLoaded@\else + \if@mtc@ccaptionLoaded@a@ + \mtcPackageWarningNoLine[<W0035>]{minitoc(hints)}% + {The ccaption package should be\MessageBreak + loaded BEFORE the minitoc package} + \@mtc@hints@given@true + \fi +\fi +\if@mtc@mcaptionLoaded@\else + \if@mtc@mcaptionLoaded@a@ + \mtcPackageWarningNoLine[<W0036>]{minitoc(hints)}% + {The mcaption package should be\MessageBreak + loaded BEFORE the minitoc package} \@mtc@hints@given@true \fi \fi \if@mtc@empty@parttoc@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have attempted to insert empty parttocs ****} + \mtcPackageWarningNoLine[<W0046>]{minitoc(hints)}% + {You have attempted to insert\MessageBreak empty parttocs} \@mtc@hints@given@true \fi \if@mtc@empty@partlof@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have attempted to insert empty partlofs ****} + \mtcPackageWarningNoLine[<W0044>]{minitoc(hints)}% + {You have attempted to insert\MessageBreak empty partlofs} \@mtc@hints@given@true \fi \if@mtc@empty@partlot@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have attempted to insert empty partlots ****} + \mtcPackageWarningNoLine[<W0045>]{minitoc(hints)}% + {You have attempted to insert\MessageBreak empty partlots} \@mtc@hints@given@true \fi \if@mtc@empty@minitoc@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have attempted to insert empty minitocs ****} + \mtcPackageWarningNoLine[<W0043>]{minitoc(hints)}% + {You have attempted to insert\MessageBreak empty minitocs} \@mtc@hints@given@true \fi \if@mtc@empty@minilof@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have attempted to insert empty minilofs ****} + \mtcPackageWarningNoLine[<W0041>]{minitoc(hints)}% + {You have attempted to insert\MessageBreak empty minilofs} \@mtc@hints@given@true \fi \if@mtc@empty@minilot@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have attempted to insert empty minilots ****} + \mtcPackageWarningNoLine[<W0042>]{minitoc(hints)}% + {You have attempted to insert\MessageBreak empty minilots} \@mtc@hints@given@true \fi \if@mtc@empty@secttoc@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have attempted to insert empty secttocs ****} + \mtcPackageWarningNoLine[<W0049>]{minitoc(hints)}% + {You have attempted to insert\MessageBreak empty secttocs} \@mtc@hints@given@true \fi \if@mtc@empty@sectlof@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have attempted to insert empty sectlofs ****} + \mtcPackageWarningNoLine[<W0047>]{minitoc(hints)}% + {You have attempted to insert\MessageBreak empty sectlofs} \@mtc@hints@given@true \fi \if@mtc@empty@sectlot@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have attempted to insert empty sectlots ****} + \mtcPackageWarningNoLine[<W0042>]{minitoc(hints)}% + {You have attempted to insert\MessageBreak empty sectlots} \@mtc@hints@given@true \fi \if@firstpartis@used@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have invoked an obsolete command: \string\firstpartis\space ****} + \mtcPackageWarningNoLine[<W0051>]{minitoc(hints)}% + {You have invoked an obsolete\MessageBreak command: \string\firstpartis} \@mtc@hints@given@true \fi \if@firstchapteris@used@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have invoked an obsolete command: \string\firstchapteris\space ****} + \mtcPackageWarningNoLine[<W0050>]{minitoc(hints)}% + {You have invoked an obsolete\MessageBreak command: \string\firstchapteris} \@mtc@hints@given@true \fi \if@firstsectionis@used@ - \PackageWarningNoLine{minitoc(hints)}% - {**** You have invoked an obsolete command: \string\firstsectionis\space ****} + \mtcPackageWarningNoLine[<W0052>]{minitoc(hints)}% + {You have invoked an obsolete\MessageBreak command: \string\firstsectionis} \@mtc@hints@given@true \fi \if@mtc@hints@given@ - \PackageWarningNoLine{minitoc(hints)}% - {***** Some hints have been written\MessageBreak - in the \jobname.log file. *****} + \mtcPackageWarningNoLine[<W0024>]{minitoc(hints)}% + {Some hints have been written\MessageBreak + in the \jobname.log file} \else - \PackageInfo{minitoc(hints)}% - {***** No hints have been written\MessageBreak - in the \jobname.log file. *****\@gobble} + \mtcPackageInfo[<I0019>]{minitoc(hints)}% + {No hints have been written\MessageBreak + in the \jobname.log file.\@gobble} \fi } \ExecuteOptions{english} \ProcessOptions* \if@mtc@ss@insection@ - \RequirePackage[section,below,verbose]{placeins}[2005/04/18]% + \RequirePackage{flafter}[2000/07/23]% + \RequirePackage[section,verbose]{placeins}[2005/04/18]% \@ifpackageloaded{placeins}% {\@mtc@placeinsLoaded@true}% {\@mtc@placeinsLoaded@false}% @@ -3689,6 +4274,51 @@ \if@mtc@notoccite@ \RequirePackage{notoccite}% \fi +\def\mtc@maf{% + \mtcPackageInfo[<I0009>]{minitoc}% + {Listing minitoc auxiliary files\MessageBreak + 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 + \immediate\closeout\tf@mtc} +\def\mtc@addtomaf#1{% + \IfFileExists{#1}{\immediate\write\tf@mtc{#1}}{}} +\def\mtc@maf@long{% + \mtc@addtomaf{\jobname.mtc} +\@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}{}{\loop\ifnum\c@mtc>\z@\relax + \mtc@addtomaf{\jobname.mtc\arabic{mtc}} + \mtc@addtomaf{\jobname.mlf\arabic{mtc}} + \mtc@addtomaf{\jobname.mlt\arabic{mtc}} + \advance\c@mtc\m@ne\repeat} +\@ifundefined{c@stc}{}{\loop\ifnum\c@stc>\z@\relax + \mtc@addtomaf{\jobname.stc\arabic{stc}} + \mtc@addtomaf{\jobname.slf\arabic{stc}} + \mtc@addtomaf{\jobname.slt\arabic{stc}} + \advance\c@stc\m@ne\repeat}} +\def\mtc@maf@short{% + \mtc@addtomaf{\jobname.mtc} +\@ifundefined{c@ptc}{}{\loop\ifnum\c@ptc>\z@\relax + \mtc@addtomaf{\jobname.P\arabic{ptc}} + \mtc@addtomaf{\jobname.G\arabic{ptc}} + \mtc@addtomaf{\jobname.U\arabic{ptc}} + \advance\c@ptc\m@ne\repeat} +\@ifundefined{c@mtc}{}{\loop\ifnum\c@mtc>\z@\relax + \mtc@addtomaf{\jobname.M\arabic{mtc}} + \mtc@addtomaf{\jobname.F\arabic{mtc}} + \mtc@addtomaf{\jobname.T\arabic{mtc}} + \advance\c@mtc\m@ne\repeat} +\@ifundefined{c@stc}{}{\loop\ifnum\c@stc>\z@\relax + \mtc@addtomaf{\jobname.S\arabic{stc}} + \mtc@addtomaf{\jobname.H\arabic{stc}} + \mtc@addtomaf{\jobname.V\arabic{stc}} + \advance\c@stc\m@ne\repeat}} +\if@mtc@listfiles@{\AtEndDocument{\mtc@maf}}\else\fi \if@mtc@hints@ \AtBeginDocument{\mtc@hints@begindoc}% \AtEndDocument{\mtc@hints@enddoc}% |