# Remove Gap in Table of Figures

I want to remove the gap between the figures of different chapters in my table of figures. I have a screenshot here:

Is there some kind of command to disable the gap? I'm not sure what kind of MWE I can give, as its the table of figures in a large document.

Here is a solution for book.cls

The gap is introduced by the \chapter command (actually \@chapter), using

\addtocontents{lof}{\protect\addvspace{10\p@}}%


each time a new chapter is set up, i.e. vertical space (the gap!) is set to the relevant .lof or .lot file.

This can be patched out with \xpatchcmd{}, replacing the commands in \@chapter with 'nothing'.

\documentclass{book}

\usepackage{xpatch}

\makeatletter
\xpatchcmd{\@chapter}{%
}{}{}{}
\makeatother

\begin{document}

\listoffigures

\chapter{First}
\begin{figure}
\caption{Dummy figure}
\end{figure}

\begin{figure}
\caption{Dummy figure}
\end{figure}

\chapter{Second}
\begin{figure}
\caption{Dummy figure}
\end{figure}

\end{document}


• I think there is a tocloft based solution too – user31729 Oct 29 '15 at 15:29

If you are using a KOMA-Script class (scrbook or srcreprt) you can use the option listof=nochaptergap to disable the gap:

\documentclass[listof=nochaptergap]{scrbook}
\usepackage[ngerman]{babel}
\begin{document}

\listoffigures
\chapter{First}
\captionof{figure}{Eine Abbildung}
\captionof{figure}{Eine zweite Abbildung}

\chapter{Second}
\captionof{figure}{Eine Abbildung im zweiten Kapitel}
\end{document}
`