# How do I convince tocloft to put the word 'Figura' ahead of entries in my List of Figures?

How to customize list of figures, adding word FIGURA to appears in the table of contents? I changed \newcommand{\cftfigfont}{Figura }, but in the summary, it's not linked (hyperref). How to solve it?

\renewcommand*{\l@figure}[2]{%
\ifnum \c@lofdepth >\z@
\vskip \cftbeforefigskip
{\leftskip \cftfigindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftfigindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftfignumwidth\relax
\let\@cftbsnum \cftfigpresnum
\let\@cftasnum \cftfigaftersnum
\let\@cftasnumb \cftfigaftersnumb
{\cftfigfont #1}\nobreak
\cftfigfillnum{#2}}
\fi
}
\newlength{\cftbeforefigskip}
\setlength{\cftbeforefigskip}{\z@ \@plus.2\p@}
\newlength{\cftfigindent}
\setlength{\cftfigindent}{1.5em}
\newlength{\cftfignumwidth}
\setlength{\cftfignumwidth}{2.3em}
\newcommand{\cftfigfont}{Figura }
\newcommand{\cftfigpresnum}{}
\newcommand{\cftfigaftersnum}{}
\newcommand{\cftfigaftersnumb}{}
\newcommand{\cftfigdotsep}{\cftdotsep}
\newcommand{\cftfigpagefont}{\normalfont}
\newcommand{\cftfigafterpnum}{}
\newcommand{\cftfigfillnum}[1]{%
\hb@xt@\@pnumwidth{\hfil\cftfigpagefont #1}\cftfigafterpnum\par}

-
Why is this tagged with beamer? –  Martin Scharrer Jun 16 '11 at 15:28
@Martin It can't really be for beamer, so I retagged it –  Martin H Jun 16 '11 at 15:58
Please make sure that the next time you ask a question you provide a fully working example. From what you show in your code it is impossible to reproduce your problem. A good question is hard to ask but always the basis to a good answer. –  Martin H Jun 16 '11 at 16:07

(Assuming the real question is "how do I convince tocloft to put the word 'Figura' ahead of entries in my List of Figures?")

\cftfigfont is for setting the font to typeset the List of Figures entries. \cftfigpresnum is for adding arbitrary text to the beginning on the entries. Both of these are described in section 2.3 of the tocloft manual. You'll probably also need to increase the \cftfignumwidth length to accommodate your extra text. Try something like:

\documentclass{article}

\usepackage{tocloft}
\usepackage{hyperref}
\renewcommand{\cftfigpresnum}{Figura }
\setlength{\cftfignumwidth}{5em}

\begin{document}
\listoffigures
\begin{figure}[htbp]
\centering (Figure goes here)
\caption{The first figure}
\label{fig:first}
\end{figure}
\begin{figure}[htbp]
\centering (Figure goes here)
\caption{The second figure}
\label{fig:second}
\end{figure}
\end{document}


-