7

On my List of Figures page, my figures go up to 4 digits, such as Figure 13.14.

This causes the figure list to be right up against the text, such as:

13.9 My figure
13.10My next figure

I need to change the width reserved for these numbers. I found this answer, but it seemed to only pertain to being able to change the class itself. I'd rather not screw around with the class file if I can at all help it.

Is there something I can do in my preamble to fix this problem?

cflewis
  • 173
  • 1
    If your document class is (based on) one of the standard ones, add to the preamble \makeatletter\newcommand*\l@figure{\@dottedtocline{1}{2.5em}{3em}}\makeatother Change the lengths according to your needs. – Gonzalo Medina Jun 01 '13 at 00:04
  • Sadly, this did not appear to work for me. I don't think the List of Figures deviates from a standard one (it's the ucthesis style which is fairly close to the standard ones), but nothing happened when this was added. – cflewis Jun 01 '13 at 00:08
  • Sorry: it should have been \renewcommand or \def; see my answer below. – Gonzalo Medina Jun 01 '13 at 00:18

1 Answers1

6

ucthesis.cls uses \@dottedtocline to format the entries in the Lot and LoF and, in partular, it defines

\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}

so figure entries in the LoF are indented by 1.5em and the width reserved to typeset the figure number is 2.3em. To add a little more space, change 2.3em to a higher value in the preamble:

\documentclass{ucthesis}

\makeatletter
\def\l@figure{\@dottedtocline{1}{1.5em}{3em}}
\makeatother

\begin{document}

\listoffigures

\setcounter{chapter}{10}% just for the example
\chapter{Test}
\setcounter{figure}{10}% just for the example
\begin{figure}
\centering
A
\caption{A test figure}
\end{figure}


\begin{figure}
\centering
B
\caption{Another test figure}
\end{figure}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128
  • Perfect! Not only does this work, but the values you chose are excellent. Thank you! – cflewis Jun 01 '13 at 01:03
  • 2
    This worked for me as well. If you have a few moments, could you explain why the command works or provide a link to some documentation that explains it. thanks! – G. Khanna Feb 06 '17 at 06:57