[Tex/LaTex] List of Figures – how to add caption label

captionstable of contentstocloft

I'm using the caption package.
In the List-Of-Figures I get only the numbers, but I also want to have the prefix.
It currently looks like that:

List of Figures
1 Caption of Figure 1……..1
2 Caption of Figure 2……..9

And I want it to look like:

List of Figures
Figure 1: Caption of Figure 1…1
Figure 2: Caption of Figure 2…9

The same format is already used for the captions themselves.

Best Answer

You could use the tocloft package; an example:

\documentclass{book}
\usepackage{tocloft}

\newlength{\mylen}

\renewcommand{\cftfigpresnum}{\figurename\enspace}
\renewcommand{\cftfigaftersnum}{:}
\settowidth{\mylen}{\cftfigpresnum\cftfigaftersnum}
\addtolength{\cftfignumwidth}{\mylen}

\begin{document}

\listoffigures
\begin{figure}[!ht]
  \centering
  \rule{2cm}{2cm}
  \caption{test figure one}
  \label{fig:test1}
\end{figure}
\begin{figure}[!ht]
  \centering
  \rule{2cm}{2cm}
  \caption{test figure two}
  \label{fig:test2}
\end{figure}

\end{document}

If you want tocloft to use default LaTeX formatting (so it won't "mess up" for example the layout of your table of contents and so on) you can use the titles option of the package:

\usepackage[titles]{tocloft}