I'm using the simple ordinary \tableofcontents command to produce a table of contents, and I find that the resulting spacing between the section number and the section title is too small:

enter image description here

Can someone tell me how to fix this, please. My documentclass is memoir, if that matters.


The width for the section numbers in the ToC is defined by the length called \cftKnumwidth, where K should be replaced by the sectioning level, i.e. chapter, section, etc. You can change it with \setlength, e.g.


See section 9.2.2 Typesetting the entries of the memoir manual for more on this.

A complete example:

% \setlength\cftsectionnumwidth{4em} % uncomment to see difference
\chapter{A chapter}
\setcounter{section}{999} % just for this example
\section{A section}
  • 2
    Thanks very much. I got the result I wanted after a lot of iterative fiddling with the length parameter. This is one of those occasions where a visual interface would have been very useful. Or, maybe Latex could be smarter about this: the minimum space would be a much easier parameter to work with, rather than thr indent distance. But, anyway, it works, after some fiddling. Thanks again. – bubba Jul 14 '13 at 13:21
  • 2
    Could it be that this solution does not work in the book class? I get ! Undefined control sequence. <argument> \cftsectionnumwidth \setlength #1#2->#1 #2\relax l.113 \setlength \cftsectionnumwidth{4em} – Zelphir Kaltstahl Feb 11 '17 at 20:23
  • 1
    @Zelphir Yes, that is correct, the \cft.. macros are not defined in book. The tocloft defines similar commands for customizing the ToC though, so try adding \usepackage{tocloft}. – Torbjørn T. Feb 11 '17 at 20:38
  • Does not work in report class, even after adding \usepackage{tocloft}. – rasha Aug 31 '20 at 16:19
  • 1
    @rasha I probably misremembered, as stated in the tocloft manual the corresponding length is \cftsecnumwidth, i.e. sec instead of section. Change that, and it works. – Torbjørn T. Aug 31 '20 at 16:34

If you have huge numbers in the ToC, you can use the \cftsetindents command (texdoc memoir, page 153) in the preamble, to control the space before and after the numbers, with this syntax:


Where kind in the sectioning level (e.g., subsection) indent is the length of the indent (space before the numbers) and numwidth is the space for the numbers and the separation of section titles.

For example:



  • Thanks for your answer. If I had huge numbers in my toc, will the previous answer (using \cftKnumwidth) not work? What are the pros and cons of the two solutions? – bubba Jul 14 '13 at 10:25
  • @bubba. Torbjørn T. answer works. I made this answer in parallel and I hesitated to left because this, but I left anyway because for huge numbers and long titles could be interesting a higher numwith but also a lower indent value (even 0em) and I think that this solution is more flexible but not less "user friendly". – Fran Jul 14 '13 at 10:48

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.