# List of figures and list of tables overlaps figure/table indices with proceeding text when double figures are used

I have a list of figures, automatically generated using the \listoffigures command, The list is three numbers deep, and when i get double figures in one, it overlaps with text e.g.

1.2.12 My figure caption

Only the last "2" in the number and "M" from "My" overlap one another. How can I fix this please. I'm using a class that redefines \listoffigures but I don't think it does anything.

The problem seems to be because the system doesn't know to modify the lot of lof when \numberwithin{figure}{section}

i gather that the tocloft package might be able to fix this for me but it seems like overkill for such a simple problem.

Any ideas? thanks

Here's an example code:

\documentclass{book}
\usepackage{amsmath}
%\usepackage[titles]{tocloft}

\numberwithin{figure}{section}

\begin{document}

\listoffigures

\chapter{my first chapter}

\section{hello}

\begin{figure}
\caption{stuff}
\label{fig:first1}
\end{figure}

\begin{figure}
\caption{stuff}
\label{fig:first2}
\end{figure}

\begin{figure}
\caption{stuff}
\label{fig:first3}
\end{figure}

\begin{figure}
\caption{stuff}
\label{fig:first4}
\end{figure}

\begin{figure}
\caption{stuff}
\label{fig:first5}
\end{figure}

\begin{figure}
\caption{stuff}
\label{fig:first6}
\end{figure}

\begin{figure}
\caption{stuff}
\label{fig:first7}
\end{figure}

\begin{figure}
\caption{stuff}
\label{fig:first8}
\end{figure}

\begin{figure}
\caption{stuff}
\label{fig:first9}
\end{figure}

\begin{figure}
\caption{stuff}
\label{fig:first10}
\end{figure}

\begin{figure}
\caption{stuff}
\label{fig:first11}
\end{figure}

\end{document}


## 1 Answer

Add the following to your preamble:

\makeatletter
\renewcommand*\l@figure{\@dottedtocline{1}{1.5em}{3em}}% 3em instead of 2.3em
\let\l@table\l@figure
\makeatother


EDIT: Added fix for tables.

• Excellent work sir. I actually found a command similar to this with subsection instead of figure. I didn't understand how the command worked though. Btw, based on some data in the tocloft package manual I think that 3.2em is the "formal" correct spacing rather than 3em. Not that it makes much difference. Also found it useful to remove the indent by changing the 1.5em to 0em. Thanks again for a quick and easy solution. Jul 13, 2011 at 15:56
• Thank you very much. You save me. edit: converted to comment to lockstep's answer.
– user11090
Jan 23, 2012 at 18:41
• How would you also add some extra blank space on the right side?, it's too close to the numbers.
– skan
Dec 14, 2020 at 2:02