9

I'm using a scrreprt document class to write my lecture notes in a condensed form for easy reviewing later. I organized the main.tex in a modular file and I downloaded, installed and loaded the minitoc package because I wanted to have a mini-TOC at the beginning of each chapter. However, when I compile with pdfLaTeX I get 8 warnings: some are not that important (Italian not defined, using English instead), others are perplexing:

Package minitoc(hints) Warning: W0030
(minitoc(hints))                --- The \part command is altered 
(minitoc(hints))                after minitoc.

Package minitoc(hints) Warning: W0023
(minitoc(hints))                --- It may be the consequence 
(minitoc(hints))                of loading the ``hyperref'' package.

Package minitoc(hints) Warning: W0028
(minitoc(hints))                --- The \chapter command is altered 
(minitoc(hints))                after minitoc.

Are these serious warnings? Do I need to get them fixed? It's not impeding me to obtain a final *.pdf file, but I wonder if it is signaling a much serious underlying problem that I'm missing. After all, it's the first time I'm using minitoc package. I've also noticed there is a *.mtc0, *.mtc1, *.mtc2, *.mtc3 etc that are created after compilation. If I erase them, next time there'll be *.mtc4 and so forth.

  • I'm on a Debian 7.3 (KDE desktop) machine, with
  • TeX Live 2013 installed "manually" (ie with a dummy *.deb package, not via repository) and
  • Kile editor 2.1.0.

Here's a minimal working example:

1) main.tex

\documentclass[a4paper,10pt]{scrreprt}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}

\usepackage{amssymb, amsmath, amsfonts} 

\usepackage[math,bible]{blindtext}
%\usepackage{titlesec}
\usepackage{hyperref}
\hypersetup{pdfstartview=FitH} 
\usepackage[italian]{cleveref} 
\usepackage[italian]{minitoc}


%opening
\title{M.T.N.}
\author{Myself}
\date{}

\begin{document}

\maketitle
\thispagestyle{empty}
\clearpage
\mbox{}
\cleardoublepage

\dominitoc
\tableofcontents
\clearpage
\input{Err_w1}
\end{document}

2) Err_w1

\chapter{Topic One}

\minitoc
\clearpage
\section{First Topic}
\blindmathpaper

\section{Second Topic}
\blindtext

\subsection{Second Topic, first subsection}
\blindtext
8

The warning message Italian not defined, using English instead is issued by blindtext, so you can safely ignore it (and it won't appear in a real document).

For the annoying messages issued by minitoc, you can use the silence package:

\usepackage{silence}

\WarningFilter{minitoc(hints)}{W0023}
\WarningFilter{minitoc(hints)}{W0028}
\WarningFilter{minitoc(hints)}{W0030}

\WarningFilter{blindtext}{} % this takes care of the `blindtext` messages

The package works by telling it what messages to ignore, based on the information string and the start of the message. With these lines, only the message

Package minitoc(hints) Warning: W0024
(minitoc(hints))                Some hints have been written 
(minitoc(hints))                in the wobby.log file.

appears. You can disable it, too, in the same way.

\documentclass[a4paper,10pt]{scrreprt}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}

\usepackage{amssymb, amsmath, amsfonts} 
\usepackage{silence}

\WarningFilter{minitoc(hints)}{W0023}
\WarningFilter{minitoc(hints)}{W0028}
\WarningFilter{minitoc(hints)}{W0030}

\WarningFilter{blindtext}{} % this takes care of the `blindtext` messages

\usepackage[math,bible]{blindtext}
%\usepackage{titlesec}
\usepackage{hyperref}
\hypersetup{pdfstartview=FitH} 
\usepackage[italian]{cleveref} 
\usepackage[italian]{minitoc}


%opening
\title{M.T.N.}
\author{Myself}
\date{}

\begin{document}

\maketitle
\thispagestyle{empty}
\clearpage
\mbox{}
\cleardoublepage

\dominitoc
\tableofcontents
\clearpage
\chapter{Topic One}

\minitoc
\clearpage
\section{First Topic}
\blindmathpaper

\section{Second Topic}
\blindtext

\subsection{Second Topic, first subsection}
\blindtext
\end{document}

You could disable all warnings by minitoc, but I wouldn't recommend it. Just disable those warnings you know for sure are innocuous.

  • Mmm...seems like I'll have to download/install another package. Will let you know how that goes. – WobblyWindows Mar 23 '14 at 22:09
5

In the minitoc documentation, part I “User’s Manual”, a chapter “Messages” exists (chapter 5 at time of writing), where you can read more information about these warnings. (Alas, this documentation is missing in MiKTeX, read online on TeXdoc.net: minitoc.)

  • Warning W0030:

    Some packages alter the sectionning commands, like \part. Most of them should be loaded before the minitoc package. The hyperref package, even if it is loaded before the minitoc package (as recommended), alters the sectionning commands in an \AtBeginDocument, so this message is always printed when you use the hyperref package with minitoc, but then it is harmless.

  • Warning W0028 is the same for \chapter.

  • Also Warning W0023 is essentially the same, but a general warning for changed sectionning commands:

    Some sectionning commands have been altered after the loading of the minitoc package. The hyperref package does that, but it is harmless. For other packages or user-made alterations, it is recommended to alter the sectionning commands only before loading the minitoc package.

egreg already wrote, how to disable these harmless warnings.

I got BTW with your code another harmless message declared as warning:

Package minitoc(hints) Warning: W0024
(minitoc(hints)) Some hints have been written
(minitoc(hints)) in the ⟨document⟩.log file.

Other than egreg I want to recommend you: In the final state of your document writing you could add the package option nohints, which disables all these in most cases harmless, more informative warnings.


Another hint: Search also in the minitoc documentation for “KOMA-Script”, because with some options respective configurations you have to be precautious.

[…] with the KOMA-Script classes […], it may sometimes be necessary to use the following options or commands, […] The efficiency of the following options depends on the options given to these KOMA-Script classes (parindent option, parskip option and variants).
[…]
For the KOMA-Script classes, with the commands \ktightmtctrue (or the k-tight package option) and \ktightmtcfalse (or the k-loose package option, which is the default), the mini-tables will have less (tight) or more (loose) space between contents lines.

Note that the same problems appear if you use one of the […] KOMA-Script classes with some options (liststotoc, liststotocnumbered, bibtotoc, bibtotocnumbered, and idxtotoc). The solutions are the same ones.

  • I think [nohints] is the best solution, thanks! – Yan King Yin Jul 3 '15 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.