仅更改图形标题的基线拉伸(行距)

仅更改图形标题的基线拉伸(行距)

我用

\renewcommand{\baselinestretch}{1.5}

在我的序言中更改正文的行距。对于我的图表标题,我希望其值为1.01.2。有没有一种简单的方法可以独立更改图表标题、表格标题等的行距?

答案1

您可以将caption包与setspace包一起使用。这是caption文档中所说的:

在此处输入图片描述

此外,您可以使用setspace包提供的命令来调整整个文档的间距,如 egreg 所述。

MWE 将是:

\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}

在此处输入图片描述

相关内容