1.3 Using the minitoc package
1.3.3 Placing the mini-tables
\mtcskip
\mtcskipamount
\bigskipamount
The \mtcskipcommand may be used to add a vertical skip between two mini-tables. Its height is \mtcskipamount(equal to\bigskipamount by default). \mtcskipeliminates any immediate previous vertical skip, to not accumulate vertical space when a mini-table is empty and skipped by thecheckfilesoption.
\secttoc
\section
The section-level table of contents will be in the section, after the\sectioncommand, at the point of the\secttoccommand. The\secttoccommand may occuralmost anywhere inside a section. It is often better to put it at the beginning of the section, or after some short introductory material. You should use the same conventions in all sections. If you want to add a section-level table of contents for a section, you must use the sequence given in Table1.2on the following page.
For each section-level table of contents, an auxiliary file will be created with a name of the formdocument.stchNi, wherehNiis the absolute section number. The suffix is.slfhNifor section-level lists of figures and is.slthNifor section-level lists of tables. (If under MS-DOS or any operating system with short extensions to filenames, see section1.9on page 57and section2.5on page61).
\usepackage
\FloatBarrier
As floats (figures and tables) could drift7somewhere outside the printing area of the text of the W0056
section, the sectlofs and sectlots can be rather strange. In order to have a better behaviour of these mini-tables, it may be useful to add the insection option in the \usepackage command:
\usepackage[insection]{minitoc}
if you want more consistent sectlofs and sectlots. Theinsectionoption loads theplaceins package [15] with itsverboseandsectionoptions. Sometimes, it might be necessary to use the\FloatBarriercommand of this package to correctly place the figure or table and have a correct mini-table. The optionsaboveorbelowoptions should not be used, because they allow floats to drift above or below a\FloatBarrier(or a section limit): the barrier
7 A float is like a ship in harbor. There is a place in the text which is the anchor location. The figure or “ship” can float around to various places relative to the anchor, but always downstream or downwind. A float with bad placement parameters is like a ship that slips its anchor and eventually crashes on the rocks at the end of a chapter.
Donald A
Table 1.2: Commands for asecttoc
\documentclass[...]{article}
\usepackage[...options...]{minitoc}
...
\setlength{\stcindent}{24pt} default
\renewcommand{\stcoffset}{0pt} default
\mtcsetoffset{secttoc}{0pt} default ...
\setcounter{secttocdepth}{2} default
\renewcommand{\stcfont}{\small\rmfamily\upshape\mdseries} default
\renewcommand{\stcSSfont}{\small\rmfamily\upshape\bfseries} default or:
\mtcsetdepth{secttoc}{2} default
\mtcsetfont{secttoc}{*}{\small\rmfamily\upshape\mdseries} default
\mtcsetfont{secttoc}{subsection}{\small\rmfamily\upshape\bfseries} default ...
\begin{document}
...
\dosecttoc
\dosectlof
\dosectlot
\tableofcontents or \faketableofcontents
\listoffigures or \fakelistoffigures
\listoftables or \fakelistoftables ...
\section{...}
\secttoc if you want one
\sectlof if you want one
\sectlot if you want one
...
becomes “porous” upwards8(↑) or downwards (↓), or both (l). Thesectionoption makes a more “watertight” barrier (≡). This is illustrated by the figure1.1on the next page.
Theplaceinspackage, by Donald A, is available on CTAN archives; note that the file placeins.stycontains its own documentation, with a copy inplaceins.txt. You need a version whose date is at least 2005/04/18.
Since version #45, this option also loads the flafterpackage (described in [288] and [330, page 286]) to force a float to appearafterits reference. Theaboveandbelowoptions of the placeinspackage are no more used, because they allowed the floats to move out of the section.
In all cases, it isstronglyrecommended to verify the position of the floats and, if necessary, to look at the messages of theplaceinspackage in thedocument.logfile. The placement of
floats is a very complex problem, so some manual intervention may be necessary, like the use of thefloatpackage [302] or, better, of thefloatrowpackage [285].
8 But a float can not drift upwards beyond the top of the current page.
With thesectionoption
Command Action
× × × × × × × × × × × × Forbidden Area × × × × × × × × × × × ×
\section ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Allowed Area Floats inserted here
Allowed Area
\section ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
× × × × × × × × × × × × Forbidden Area × × × × × × × × × × × ×
With theaboveoption
Command Action
Allowed Area
\section ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ Allowed Area
Floats inserted here Allowed Area
\section ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
× × × × × × × × × × × × Forbidden Area × × × × × × × × × × × ×
With thebelowoption
Command Action
× × × × × × × × × × × × Forbidden Area × × × × × × × × × × × ×
\section ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Allowed Area Floats inserted here
Allowed Area
\section ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ Allowed Area
With theaboveandbelowoptions
Command Action
Allowed Area
\section l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l Allowed Area
Floats inserted here Allowed Area
\section l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l Allowed Area
Figure 1.1: Float barriers
Table 1.3: Commands for aparttoc
\documentclass[...]{book}
\usepackage[...options...]{minitoc}
...
\setlength{\ptcindent}{0pt} default
\renewcommand{\ptcoffset}{0pt} default
\mtcsetoffset{parttoc}{0pt} default ...
\setcounter{parttocdepth}{2} default
\renewcommand{\ptcfont}{\normalsize\rmfamily\upshape\mdseries} default
\renewcommand{\ptcCfont}{\normalsize\rmfamily\upshape\bfseries} default
\renewcommand{\ptcSfont}{\normalsize\rmfamily\upshape\mdseries} default or:
\mtcsetdepth{parttoc}{2} default
\mtcsetfont{parttoc}{*}{\normalsize\rmfamily\upshape\mdseries} default
\mtcsetfont{parttoc}{chapter}{\normalsize\rmfamily\upshape\bfseries} default
\mtcsetfont{parttoc}{section}{\normalsize\rmfamily\upshape\mdseries} default ...
\begin{document}
...
\doparttoc
\dopartlof
\dopartlot
\tableofcontents or \faketableofcontents
\listoffigures or \fakelistoffigures
\listoftables or \fakelistoftables ...
\part{...}
\parttoc if you want one
\partlof if you want one
\partlot if you want one
...
If you want to add the partial table of contents for a part, you must use the sequence given in Table1.3. For each partial table of contents, an auxiliary file will be created with a name of the formdocument.ptchNi, wherehNiis the absolute part number. The suffix is.plfhNifor partial lists of figures and is.plthNifor partial lists of tables. (If under MS-DOS or any oper- ating system with short extensions to filenames, see section1.9on page57and section2.5on page61).
Note: the user is responsible of asking or not asking a mini-table (mini-toc, -lof or -lot) for some chapter. Asking a minilof for a chapter without any figure would result in an empty
and ugly mini-list of figures (i.e., the title and two horizontal rules). He is also responsible of requiring or not requiring a partial toc (lof or lot) for some part. Asking a partlof for a part without any figure would result in an empty and ugly part list of figures (i.e., the title alone on a page). Analogous remarks apply to section-level mini-tables (secttoc, sectlof, and sectlot) and to the part-level mini-tables (parttoc, partlof, and partlot).
But since version #35, empty mini-tables are just ignored and this problem should disappear in normal circumstances. Nevertheless, it is recommended to put no \minitoc command
in a chapter without sections and no\minilofor\minilotcommand in a chapter without figures or tables. The checkfiles(see section1.3.3on page32) package option (default) skips empty mini-tables (with a note in thedocument.logfile); thenocheckfilespackage option restores the old behaviour (empty mini-tables are displayed).
By default, the mini-tables and partial tables of contents contain only references higher and to sections and subsections. The countersparttocdepth,minitocdepthandsecttocdepth, similar totocdepth, allow the user to modify this behaviour. Mini or partial lists of figures or tables are not affected by the value of these counters, but if there are depth counters for these lists (lofdepthandlotdepth), as done by thesubfigureandsubfigpackages [130,132] from Steven Douglas C, new depth counters are created if necessary, with obvious names likepartlofdepth,partlotdepth,minilofdepth,minilotdepth,sectlofdepth, and sectlotdepth.