Hi I have a problem with the table of figures in latex. As the figure below shows, the figure number is quite long and bleeding over the figure label. Any ideas on how I can address this?
Hi I have a problem with the table of figures in latex. As the figure below shows, the figure number is quite long and bleeding over the figure label. Any ideas on how I can address this?
A workaround: Use horizontal space in the short caption argument of your figure environment
\caption[\hspace{0.5cm} short caption text]{Long caption text}
This is of course not a too nice solution, though. If you want to avoid it, you would have to fudge the code in your document class, I believe.
You can use tocloft to define the spacing between the figure number and figure caption within the LoF. The length that controls this distance is \cftfignumwidth. Here's a quick example:
\documentclass{article}
\usepackage{tocloft}
\setlength{\cftfignumwidth}{3em}
\begin{document}
\listoffigures
\begin{figure}
\caption[short caption text]{Long caption text}
\end{figure}
\end{document}
The above suggestion provides a consistent adjustment that can be changed as needed.
Reference:
If you get an error like:
! LaTeX Error: Command \c@lofdepth already defined.
Or name \end... illegal, see p.192 of the manual.
Try using tocloft from the subfigure package:
\usepackage{subfigure}
\usepackage[subfigure]{tocloft}
\setlength{\cftfignumwidth}{4em}