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.


2 Answers 2


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}

Or if you are using the book class, as per https://tex.stackexchange.com/a/336618/50702 and Torbjørn T.'s comment below:

% note you need the subfigure option if you are using the subfigure package


\chapter{A chapter}
\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
    Commented Jul 14, 2013 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} Commented Feb 11, 2017 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}. Commented Feb 11, 2017 at 20:38
  • 2
    @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. Commented Aug 31, 2020 at 16:34
  • 1
    @PatrickElPollo Did you read the other comments just above yours? Commented Aug 3, 2021 at 7:40

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
    Commented Jul 14, 2013 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
    Commented Jul 14, 2013 at 10:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .