[Tex/LaTex] minitoc package: overfull \hbox

minitoctable of contentswarnings

Does anyone of you know how to format a ToC created with the minitoc package in LaTeX? My problem is that I always get the following warning:

./hauptdokument.mtc.1:21:Overfull \hbox (2.83262 pt too wide) detected

This happens if the page number is greater than 10 e. g. 1-10 or 1-12. I've read the minitoc documentation but I didn't find a solution to widen the box around the page numbers so I appreciate any help you could give.

I use the following commands to format my minitoc:




Best Answer

The warning is not specific to minitoc. The standard classes typeset ToC page numbers in a box of width \@pnumwidth (note: this is a command, not a length), and minitoc adopts the setting of \@pnumwidth. The command's default value is 1.55em, which is sufficient for three-digit numbers. In your case, the warning disappears by setting \@pnumwidth to 2.5em.



\renewcommand{\@pnumwidth}{2.5em}% default is 1.55em



\dominitoc% Initialization

\minitoc% Creating an actual minitoc



Related Question