GeneralSpacing of the List of Figures

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
DannyBoy
Posts: 10
Joined: Mon Dec 03, 2007 12:16 am

Spacing of the List of Figures

Post by DannyBoy »

I'm using the setspace package to control the spacing in my document. For the List of Figures I have to have double spacing between the entries, but if an entry is longer than one line it should be single spaced. (A ridiculous formatting stipulation if you ask me, but anyway...) By placing \singlespacing or \doublespacing prior to \listoffigures I can control the spacing of all the entries, but can't control the spacing within an individual entry. I've tried using \doublespacing\listoffigures and then in the captions using \singlespacing, but I get an error. Does anyone know how I can achieve the desired result?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Spacing of the List of Figures

Post by gmedina »

One possibility is to use the tocloft package to control the vertical spacing between entries in the LoF, as the following example suggests:

Code: Select all

\documentclass{book}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{calc}
\usepackage{tocloft}

\begin{document}
\setlength{\cftparskip}{2\baselineskip}
\listoffigures
\newpage

\doublespacing
\begin{figure}
  \centering
  \fbox{Test Figure}
  \caption{\blindtext}
\end{figure}
\begin{figure}
  \centering
  \fbox{Test figure}
  \caption{A short caption}
\end{figure}
\begin{figure}
  \centering
  \fbox{Test Figure}
  \caption{\blindtext}
\end{figure}

\Blindtext
\end{document}
The blindtext package was loaded only to automatically generate some text.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
DannyBoy
Posts: 10
Joined: Mon Dec 03, 2007 12:16 am

Re: Spacing of the List of Figures

Post by DannyBoy »

Thanks for the reply! I'll give that a go...
Post Reply