![为什么子浮动需要更多的垂直空间?](https://linux22.com/image/362126/%E4%B8%BA%E4%BB%80%E4%B9%88%E5%AD%90%E6%B5%AE%E5%8A%A8%E9%9C%80%E8%A6%81%E6%9B%B4%E5%A4%9A%E7%9A%84%E5%9E%82%E7%9B%B4%E7%A9%BA%E9%97%B4%EF%BC%9F.png)
我正在对 进行测试subfloat
。我发现subfloat
需要比浮动更多的垂直空间normal
。我不知道为什么。测试代码如下所示。你能帮我删除subfloat
图形中的额外垂直空间吗?
\documentclass{IEEEtran}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{graphicx}
\ifCLASSOPTIONcompsoc
\usepackage[caption=false,font=normalsize,labelfont=sf,textfont=sf]{subfig}
\else
\usepackage[caption=false,font=footnotesize]{subfig}
\fi
%-------------------------------- show page layout, only for test
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
\lipsum[1-9]
\begin{figure*}
\centering
\includegraphics[width=0.32\linewidth]{example-image-a}\hfill
\includegraphics[width=0.32\linewidth]{example-image-a}\hfill
\includegraphics[width=0.32\linewidth]{example-image-a}
\caption{
A test. balabala balabala balabala balabala balabala balabala
balabala balabala balabala balabala balabala balabala balabala
balabala. balabala balabala balabala balabala balabala balabala
balabala balabala balabala balabala balabala balabala balabala balabala.
}
\end{figure*}
\section{New section}
\lipsum
\begin{figure*}
\centering
\subfloat[]{\includegraphics[width=0.32\linewidth]{example-image-a}}\hfill
\subfloat[]{\includegraphics[width=0.32\linewidth]{example-image-a}}\hfill
\subfloat[]{\includegraphics[width=0.32\linewidth]{example-image-a}}
\caption{
A test. balabala balabala balabala balabala balabala balabala
balabala balabala balabala balabala balabala balabala balabala
balabala. balabala balabala balabala balabala balabala balabala
balabala balabala balabala balabala balabala balabala balabala balabala.
}
\end{figure*}
\lipsum[1-10]
\end{document}
答案1
跳过了farskip
,你可以用
\usepackage[caption=false,font=footnotesize,farskip=0pt]{subfig}
软件包文档声称这个跳过不会插入到分页符中,但这个测试似乎无法正常工作figure*
。