[Tex/LaTex] Double spacing within the caption of a figure

captionsline-spacingmemoirsubfloats

I am using the memoir class on my thesis and I have the \DoubleSpacing command in my document to set up double spacing through the document. This works great.

However, I have a figure with subfigures using \subbottom[]{\includegraphics{}} command, and the text in the caption shows with single spacing. How can I activate double spacing in the caption?

Best Answer

Just insert the command \DoubleSpacing at the start of the caption material as well. To avoid getting an error message, also provide a short caption as the second, optional argument (in square brackets) to the \caption command. The contents of the short caption will be used when the List of Figures is generated with the \listoffigures command. In the MWE below, the short caption consists of just the first three words of the long caption.

Even if you're absolutely sure that you are not going to generate a list of figures for your document, you still need to provide a short caption. (It could be as simple as [] if you won't be generating a list of figures.) Otherwise, you'll get an error message, which is caused by the \DoubleSpacing command and by LaTeX's behind-the-scenes attempt to create a "short caption" automatically from the long caption if a short caption is not supplied explicitly.

\documentclass{memoir}
\usepackage{lipsum} % for filler text
\DoubleSpacing
\begin{document}
\lipsum[1]
\begin{figure}[h]
\caption[Nam dui ligula]{\DoubleSpacing\lipsum[2]}
\end{figure}
\lipsum[3]
\end{document}

Aside: It's usually considered to be more reader-friendly to provide (i) a fairly short caption header (i.e., one that fits on a single line) and (ii) a longer, self-contained description of the figure's (or table's) contents elsewhere in the figure (table) environment.