[Tex/LaTex] Invisible Overfull \hbox in toc

table of contentswarnings

For a few toc-entries with long titles getting wrapped I am getting Overfull \hboxes, which are not visible, if I don't use the draft-option of memoir. I wonder where they come from, and how to turn them off, as I don't want to just ignore them:

\documentclass[draft,11pt,a4paper]{memoir}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\begin{document}
\tableofcontents*
\subsection{Places: River Banks, Charnel Grounds and Other Shared Locations}
\end{document}

producing the following output (black box for Overfull \hbox):

Sample Output

Best Answer

The lines before the last line of an entry in the table of contents are indented at the right by \@tocrmarg, default in class memoir and article is 2.55em. The last line ends with a right aligned page number in a box, whose width is \pnumwidth, default in class memoir and article is 1.55em. Thus the text part of the line is 1em shorter than the text in the last line, as illustrated by the following example using rules:

\documentclass[draft,11pt,a4paper]{memoir}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}

\DeclareRobustCommand*{\HRuleFilll}{%
  \null
  \leaders\hrule\hskip 0pt plus 1filll\relax
  \kern0pt\relax
}

\begin{document}
\tableofcontents*
\subsection{Places: River Banks, Charnel Grounds and Other Shared Locations}
\subsection{\HRuleFilll\protect\newline\HRuleFilll\protect\newline\HRuleFilll}
\end{document}

Result

I assume the rationale behind this, is to make the line with the page number easier detectable from the right.

Thus, Fran's list can be extended by another option:

Option 7: Making \@tocrmarg a little smaller. (It could be set to \@pnumwidth, but I have some doubts, that this looks better.)