TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I get Overfull warning for TOC entries when using memoir documentclass. They seem to occur when the page number for chapter title entries (highlighted in bold text) exceeds 2-digits or section page number exceeds 3-digits.

I do not get the warning for chapter headings if I switch to book documentclass. But it still happens for sections heading.

How can I fix this?

\documentclass[oneside, draft]{memoir}


\newcommand{\repeattext}[1]{#1 #1 #1 #1 #1 #1}



\chapter{Chapter 1}         \lipsum
    \section{Section 1.1}   \repeattext{\repeattext{\lipsum[1-150]}}

\chapter{Chapter 2}         \lipsum[2]
    \section{Section 2.1}   \repeattext{\repeattext{\lipsum[1-150]}}

\chapter{Chapter 3}         \lipsum[2]
    \section{Section 3.1}   \lipsum[2]

share|improve this question
up vote 15 down vote accepted

There are three internal LATEX commands that are used in the typesetting the table of contents, lof, lot etc. They are (with their default values):

  • \@pnumwidth = 1.55em
  • \@tocrmarg = 2.55em
  • \@dotsep = 4.5

The page number is typeset flushright in a box of width \@pnumwidth, and the box is at the righthand margin. If the page number is too long to fit into the box it will stick out into the righthand margin. This is what is happening in your case.

The title text is indented from the righthand margin by an amount given by \@tocrmarg.

\@dotsep gives the distance (in math units) between the dots in the leader.

Your problem is due to big numbers which can not be fitted into the box defined by the default value of \@pnumwidth. Hence if we make the box bigger everything will be alright. We add the following in the preamble:


Note that \@pnumwidth should be always smaller than \@tocrmarg.

For memoir these can be changed by


without any need for \makeatletter construct.

enter image description here

share|improve this answer
Thank you. That solved the issue. – mythealias Mar 29 '12 at 13:05
+1! Are you setting 3em value of @pnumwidth since the OP mentions that the issue occurs when two digits and more are involved? In other words, is it 3em so it could hold 3 digits? – Dror Jan 8 '14 at 13:10
@Dror Thanks. Yes. The value must be adjusted depending upon number of digits page number has so as to fit it in. At the same time @tocmarg too. – Harish Kumar Jan 8 '14 at 22:48
There is already a command \setpnumwidth{} in memoir class. – John Kormylo Mar 15 '14 at 17:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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