A manual with chapters, sections, subsections, and sub-subsections. Using KOMA Script v2.


The spacing between the heading title and its number is too close to the number in some cases:

enter image description here

After reading the tocloft package, I do not see how to adjust the spacing between the heading title and the number.


How do you increase the space before the section title a consistent amount?


Tried including the following package:


Tried setting linewidth:


Tried setting the dottedtocline:


The last attempt looks promising, but it is tricky to adjust the margins correctly.


4 Answers 4


Current KOMA-Script release provides options tocindent and tocnumwidth for \RedeclareSectionCommand that allows to change the indent and the space reserved for the entry number without breaking any feature of the KOMA-Script classes.



% Only some dummy test code:

e.g., would result in:

enter image description here


For me, tocstyle produces correct horizontal spacing with both standard and KOMA-script classes. Try to compile my example with three or even four LaTeX runs -- maybe the makefile you use doesn't recognize that tocstyle needs yet another LaTeX run to calculate the ToC spacing.







Some text.

  • Thanks for this. I'm not sure if this is an exact reproduction of the problem, though. The preamble for this manual is 1000 lines long. Inside I have set different fonts. Also, I'm using tocloft, not tocstyle (if that matters). Commented Mar 17, 2011 at 0:27
  • @Dave: Yes, it matters. My suggestion boils down to use tocstyle instead of tocloft.
    – lockstep
    Commented Mar 17, 2011 at 0:33
  • @Dave: One of the features of tocstyle is automatic calculation of ToC spacing instead of using fixed pre-set values.
    – lockstep
    Commented Mar 17, 2011 at 0:37
  • Substituting tocstyle for tocloft results in a lot of "Undefined control sequence" errors that I have neither the time nor inclination to resolve. One day, perhaps, latex will generate errors that are a bit more meaningful to the lay person. I do appreciate you taking the time to suggest an alternative, though! Commented Mar 17, 2011 at 0:45
  • tocstyle is deprecated and not longer provides by the TeX distriutions.
    – cabohah
    Commented Jun 6, 2023 at 9:03

When using tocloft is a requirement, the \cftsetindents command solves the given issue, for example:


With this solution, different indents and numwidths can be set for each level. This command can also be used for figures; for more see the tocloft package manual.

  • 1
    Is this compatible with KOMA-script classes as requested in the question?
    – Werner
    Commented Feb 23, 2018 at 0:49

Add the following to the preamble:


followed by


or by

  • tocstyle is a never supported alpha package. The KOMA-Script author recommends to not longer use it and declared to never release a version 1. You should use package tocbasic (see the accepted answer) instead. Commented Jun 7, 2017 at 19:18

You must log in to answer this question.

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