“caption”包在浮动下方添加了一个空白 - 如何删除它?

“caption”包在浮动下方添加了一个空白 - 如何删除它?

我注意到,caption加载包后,浮点数与文本之间的垂直间距在h图的上方和下方并不相同。

以下是我所做的(近似)测量:
在此处输入图片描述 在此处输入图片描述

无论有没有caption,浮动块上方的垂直空间都是大约 0.42 厘米。
没有caption,浮动块下方的垂直空间是 0.46 厘米(我猜想 0.04 厘米的差异是因为标题的字母较低(p、q、j、...)。
另一方面,caption加载包后,浮动块下方的垂直空间增加到 0.51 厘米。

额外的垂直空间的原因是什么?如何删除它(保留\belowcaptionskip=0pt)?我在文档中找不到有关此内容的任何信息。

\documentclass{article}
\usepackage{mwe, graphicx}
%\usepackage{caption}

\setlength\intextsep{10pt}
\setlength\abovecaptionskip{0pt}
\setlength\belowcaptionskip{0pt}

\begin{document}
The quick brown fox jumps over the lazy  dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over \rule{2em}{\baselineskip} the lazy dog.

\begin{figure}[h]
\centering\includegraphics[width=0.4\textwidth]{example-image}
\caption{The quick brown fox \rule{2em}{\baselineskip} jumps over the lazy dog.}%
\end{figure}

The quick brown fox jumps over the \rule{2em}{\baselineskip} lazy  dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.

\begin{figure}[h]
\centering\includegraphics[width=0.4\textwidth]{example-image}
\caption{The quick brown fox \rule{2em}{\baselineskip} jumps over the lazy dog.}%
\end{figure}

The quick brown fox jumps over the \rule{2em}{\baselineskip} lazy  dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.

\end{document}

相关内容