[Tex/LaTex] List of Figures: How to get a vertical space between figures from the final chapter and the first appendix

spacingtable of contentstocloft

I'm using tocloft with the report document class. I have four chapters and some appendices. My List of Figures produces vertical spacing between figures from different chapters, but it does not add a vertical space between the last figure from my last chapter and the first figure from my first appendix:

3.7
3.8
     <-- appropriate spacing
4.1
4.2
A1   <-- no preceding v-space
A2

Can anyone suggest what I might be doing wrong (and/or how to fix this)?

Best Answer

The default behaviour in report with or without tocloft is to add a vertical space of 10pt in the ToC, LoF and LoT whenever you use \chapter. If you use \chapter* for a similar chapter look-and-feel but no numbering, no entry is written to the ToC and this space is dropped.

There are many ways to insert this "missing" gap, the easiest of which would just be to add

\addtocontents{lof}{\protect\addvspace{10pt}}%

at the start of your appendix. This adds the traditional 10pt space, but won't add more than that (due to \addvspace; rather than \vspace alone). For example, if the previous chapter didn't include any figures, you don't want double the gap between the LoF entries. This solution is independent of the use of tocloft.

Here is a minimal example:

Add vertical space between figures in LoF after appendix

\documentclass{report}
%\usepackage{tocloft}% http://ctan.org/pkg/tocloft
\begin{document}
\listoffigures
\chapter{A chapter}
\begin{figure}\caption{A figure}\end{figure}
\begin{figure}\caption{A figure}\end{figure}
\chapter{A chapter}
\begin{figure}\caption{A figure}\end{figure}
\begin{figure}\caption{A figure}\end{figure}
\appendix
\chapter*{A chapter}
\addtocontents{lof}{\protect\addvspace{10pt}}%
\begin{figure}\caption{A figure}\end{figure}
\begin{figure}\caption{A figure}\end{figure}
\end{document}