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

Possible Duplicate:
TOC Text - numbers alignment
How to modify the indentation before sectioning titles in the table of contents?

I have a LaTeX document with many subsections (more than 100), which give rise to an issue. Here is how it looks like for a specific part of the Table of contents:

2.98 Subsection whatever.
2.99 One more subsection.
2.100This is the hundredth section.

i.e. the horizontal space between the subsection number and the name of the subsection gets to zero. Is there an easy way to increase this space, so the subsection title does not 'touch' the section numbering?

share|improve this question

migrated from stackoverflow.com Jan 3 '12 at 19:54

This question came from our site for professional and enthusiast programmers.

marked as duplicate by lockstep, Werner, Marco Daniel, egreg, Torbjørn T. Jan 3 '12 at 20:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Welcome to TeX.sx! Your question was migrated here from another stackexchange site. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. – lockstep Jan 3 '12 at 19:56

For what it's worth, tocloft provides the length \cftsubsecnumwidth which represents the width of the box containing the \subsection numbers in them. Redefining this length solves your problem. Here's a minimal example:

enter image description here

\usepackage{tocloft}% http://ctan.org/pkg/tocloft
\setlength{\cftsubsecnumwidth}{4em}% Set length of number width in ToC for \subsection
\section{This is a section}
\subsection{This is a subsection}
\subsection{This is another subsection}
share|improve this answer
Now that you've gained an upvote, you may still vote to close. ;-) – lockstep Jan 3 '12 at 20:11
Similar question tex.stackexchange.com/questions/7853/toc-text-numbers-alignment – Aku Jan 3 '12 at 20:16