I want to get rid of some annoying warnings that showed up when changing how chapters look in TOC (institutional requirements).

From the log:

Overfull \hbox (58.08pt too wide) detected at line 3 \TU/lmr/bx/n/12 CHAPTER I []

Underfull \hbox (badness 10000) in paragraph at lines 3--3 [][] []

Overfull \hbox (63.48pt too wide) detected at line 5 \TU/lmr/bx/n/12 CHAPTER II []

Underfull \hbox (badness 10000) in paragraph at lines 5--5 [][] []

Overfull \hbox (68.88pt too wide) detected at line 8 \TU/lmr/bx/n/12 CHAPTER III []

Underfull \hbox (badness 10000) in paragraph at lines 8--8 [][] []

I'm pretty sure the issue isn't related to package conflicts, but mainly to inexperience with LaTeX code (actually, added some TeX code in there). Since the document is now in final stages, i'm not willing to switch packages or classes at this point :\.

The MWE:


%% https://tex.stackexchange.com/questions/231302/change-number-after-chapter-in-table-of-contents

%% "Head" with roman numbers

%% Remove blank space before chapter titles (where chapter number was)

%% Chapter titles in a new line
\renewcommand{\cftchapaftersnumb}{\par\nobreak\vskip 6\p@}

\chapter{The problem}
\section{Why is it important?}
\chapter{Some background information}
\section{These people cared about this before}
\section{Someone's theory}

Looks like this:



The problem
  1.1  Why is it important? .......


Some background information
  2.1  These people .......
  2.2  Someone's theory .......


  • They aren't errors but warnings. If the output looks OK then ignore them. I have tried, but so far failed, to eliminate the warnings but perhaps someone else will do better. – Peter Wilson Jun 24 '18 at 18:06
  • @PeterWilson I see, thank you. I was afraid it would mess up other things eventually. – undostres Jun 24 '18 at 19:07
  • I get different warnings. I also get different output: I have page numbers, whereas your code says you shouldn't. – cfr Jun 30 '18 at 2:25
  • If I comment \setlength{\cftchapnumwidth}{0pt}, I get the same warnings as you, but I still get page numbers. – cfr Jun 30 '18 at 2:26
  • @cfr confused "chapter number" with "page number", sorry. Fixed it in the MWE – undostres Jul 3 '18 at 14:45

Your Answer

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

Browse other questions tagged or ask your own question.