添加图片后,我有一个空白区域。如何减少它?我用了\FloatBarrier
。但没有用。
% Following copied by Marc van Dongen from comment from OP.
\documentclass[12pt,a4paper,oneside]{report}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{placeins}
\begin{document}
\FloatBarrier
\subsection{ddd}
\begin{figure}[ht]
\begin{center}
\includegraphics[width=9cm,height=5.5cm]{sss.jpg}
\end{center}
\begin{center}
\caption[ddd ]{ ddd }
\end{center}
\end{figure}
\FloatBarrier
In English, the word datum is still used in the general
sense of "an item given".
In cartography, geography, nuclear magnetic
\end{document}
答案1
除了使用Werner 的答案之外,您还可以使用序言中的(例如)\centering
控制标题下方的空间,或者使用浮动下方文本中的负数(例如)手动调整特定空间。\belowcaptionskip
\belowcaptionskip-1em
\vspace
\vspace{-1cm}
然而,为了获得优雅的格式,只需使用\centering
。
答案2
您应该避免使用center
环境来对齐内容。具体来说,使用\centering
以下方式在浮动环境中居中内容figure
:
\documentclass[12pt,a4paper,oneside]{report}
\usepackage{graphicx}
\begin{document}
\subsection{ddd}
\begin{figure}[ht]
\begin{center}
\includegraphics[width=9cm,height=5.5cm]{example-image-a}
\end{center}
\begin{center}
\caption[ddd ]{ ddd }
\end{center}
\end{figure}
In English, the word datum is still used in the general
sense of ``an item given.''
In cartography, geography, nuclear magnetic.
\newpage
\subsection{ddd}
\begin{figure}[ht]
\centering
\includegraphics[width=9cm,height=5.5cm]{example-image-a}
\caption[ddd ]{ ddd }
\end{figure}
In English, the word datum is still used in the general
sense of ``an item given.''
In cartography, geography, nuclear magnetic.
\end{document}