# Remove indentation in list of figures when using caption package

I am typesetting a book, and I don’t want to have figure numbers in my captions; thus I am using labelformat=empty in the captions package. Similarly, I want to suppress numbers in my list of figures, so my preamble looks like this:

\usepackage[listformat=empty,labelformat=empty,]{caption}

Let’s assume this image in my text:

\begin{figure}[ht]
\centering
\includegraphics{example-image-a}
\caption[\textit{Title of the Work, which can also be a bit longer}, \textsc{Author of the work}, 2010, No Copyright]{Title of the work} \label{fig:some-label}
\end{figure}


When I print my \listoffigures I get an indentation. Is there any way to get rid of this?

## MWE (this is an edit link, feel free to play around):

\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[belowskip=-11pt,listformat=empty,labelsep=none,labelformat=empty]{caption}
\begin{document}

\begin{figure}[ht]
\centering
\includegraphics{example-image-a}
\caption[\textit{Title of the Work, which can also be a bit longer}, \textsc{Author of the work}, 2010, No Copyright]{Title of the work} \label{fig:some-label}
\end{figure}

\listoffigures

\end{document}


• Please -- as usual here -- make your code snippet be compilable, then we do not have to guess what you are doing ... Oct 3 at 18:50
• Sorry you are right. I added a link Oct 3 at 21:23
• See tex.stackexchange.com/questions/612537/…. Actually, the indentation is in \l@figure. Oct 4 at 0:51
• Sorry, this is nothing in this with \l@figure, what does it mean the indentation is in \l@figure — how do I get rid of it? Oct 4 at 6:28

Based on https://tex.stackexchange.com/a/186844/56823, here is the solution:

\documentclass{scrbook}
\usepackage[utf8]{inputenc}

\usepackage{graphicx}
\usepackage[belowskip=-11pt,listformat=empty,labelformat=empty]{caption}
\makeatletter
\renewcommand*\l@figure{\@dottedtocline{1}{0em}{0em}}
\makeatother

\begin{document}

\begin{figure}[ht]
\centering
\includegraphics{example-image-a}
\caption[\textit{Title of the Work, which can also be a bit longer}, \textsc{Author of the work}, 2010, No Copyright]{Title of the work} \label{fig:some-label}
\end{figure}

\listoffigures

\end{document}

• That’s it! Thank you so much. Is there any way to get a hanging indentation (first line no indented, following lines indented)? I know that this is a different question 😬 ... Oct 8 at 10:30
• Likely, but this is way harder since normally what you can control is the indentation w.r.t. the “Figure 1” label, which is a separated object. Here you want to indent two lines that are stored together, so it requires patching the code displaying them more deeply, and I haven’t found a simple way even using tocloft. As you said, you should ask this in a new question. Oct 8 at 14:55