[Tex/LaTex] Change the baselinestretch (line spacing) only for figure captions

captionsline-spacing

I use

\renewcommand{\baselinestretch}{1.5}

in my preamble to change line spacing of my main text. For my Figure cpations I'd like to have a value of 1.0 or 1.2. Is there an easy way to change the line-spacing for figure captions, table captions,… independently?

Best Answer

You can use caption package together with setspace package. This is what caption documentation says:

enter image description here

Further, you can use setspace package to adjust spacing for the whole document by using the commands it provides as noted by egreg.

A MWE will be:

\documentclass{book}
\usepackage{graphicx,kantlipsum,setspace}
\usepackage{caption}
\captionsetup[table]{font={stretch=1.2}}     %% change 1.2 as you like
\captionsetup[figure]{font={stretch=1.2}}    %% change 1.2 as you like
 %% or
 %% \captionsetup{font={stretch=1.2}}  %% this affects both figure and table


%\renewcommand{\baselinestretch}{1.5}
\setstretch{1.5}


\begin{document}

\chapter{Some chapter}
\kant[1-3]
\begin{table}[htb]
\centering
\caption{\kant[1]}\label{tab:mytable}
Some table comes here
\end{table}

\kant[4-8]
\begin{figure}[htb]
\centering
\includegraphics[width=4cm]{example-image-a}
\caption{\kant[2]}\label{fig:myfig}
\end{figure}
\end{document}

enter image description here