Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
This question might be of interest –  Seamus Jul 13 '11 at 15:44
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
    
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. –  aghsmith Jul 13 '11 at 15:56
    
Thank you very much. You save me. edit: converted to comment to lockstep's answer. –  user11090 Jan 23 '12 at 18:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.