图表标题下方的垂直空间很大,如何减小。
\documentclass[a5paper]{scrbook}
\usepackage[demo]{graphicx}
\begin{document}
\chapter{Sample chapter}
\section{Sample section}
%
%
Some text more text more text more text more text more text more text more text more text more text more text.
\begin{figure}[htb!]
\centering
\includegraphics[width=0.25\textwidth]{frog.jpg}
\caption{A test caption without label for a figure}
\end{figure}
%
Some text more text more text more text more text more text more text more text more text more text more text.
\end{document}
问:为什么我会收到 typearea 警告?这是什么意思?
答案1
更新\belowcaptionskip
(默认为0pt
)为负值:
左边是默认;右边是\setlength{\belowcaptionskip}{-\baselineskip}
。
答案2
您可以加载该caption
包并使用此设置(-5pt
根据您的需要进行调整):
\captionsetup[figure]{belowskip=-5pt}
完整代码:
\documentclass[a5paper]{scrbook}
\usepackage[demo]{graphicx}
\usepackage{caption}
\captionsetup[figure]{belowskip=-5pt}
\begin{document}
\chapter{Sample chapter}
\section{Sample section}
%
%
Some text more text more text more text more text more text more text more text more text more text more text.
\begin{figure}[htb!]
\centering
\includegraphics[width=0.25\textwidth]{frog.jpg}
\caption{A test caption without label for a figure}
\end{figure}
%
Some text more text more text more text more text more text more text more text more text more text more text.
\end{document}