# Aligning Multi-line Caption in list of figures

I have modified my list of figures so that it includes Fig. figure number before each caption in List of Figures. This done by using the following code.

{%
\let\oldnumberline\numberline%
\renewcommand{\numberline}{\tablename~\oldnumberline}%
\listoftables%
}


However, I am not able to align figure caption which extends to second line. What should be done to align the multi-line figure caption in list of figures.

• Can you make a minimal working example (MWE)? – user36296 Mar 18 '18 at 13:56
• You would have better luck modifying \l@figure and \l@table, which set the indentation, – John Kormylo Mar 18 '18 at 17:21
• See tex.stackexchange.com/questions/326573/… (although it has other modifications you may not need). – John Kormylo Mar 18 '18 at 17:33
• I tried the suggestion in above comment. However its showing following error ! Undefined control sequence. \l@figure ->\@tocline – S.Dev Mar 19 '18 at 4:13
• The first step is finding the current definition of \l@figure, which usually depends on the document class. \meaning\l@figure would belp. (don't forget \makeatletter ... \makeatother) – John Kormylo Mar 19 '18 at 16:53

## 1 Answer

I am able to get alignment using this code

\contentsmargin{1cm}
\titlecontents{figure}
[2.5cm]
{}
{\makebox[0pt][r]{%
\makebox[2.5cm][l]{Figure~\thecontentslabel}%
}%
}
{\hspace{-2.5cm}}
{\titlerule*[6pt]{}\contentspage}


However, in some cases the page number comes down