图形占用太多空间

图形占用太多空间

我有两个小图,占据了整整一页。如何减少图间/图后的间距,以便在同一页上开始下一部分?

\begin{figure}
    \centering
    \includegraphics[width=0.55\textwidth]{...}
    \caption{...}
    \label{fig:figure4}
        \end{figure}
\begin{figure}
    \centering
    \includegraphics[width=0.55\textwidth]{...}
    \caption{...}
    \label{fig:figure5}
        \end{figure}
\FloatBarrier
\section{...}

答案1

这可能与 LaTeX 处理同一空间中的图形和文本的方式有关。具体来说,如果一页上的文本量无法满足最低要求,LaTeX 会将整页专门用于图形。

您可以在序言中使用以下三个命令(请注意,可能有更好的方法)来调整这一点。我相信这些命令使用了 setspace 包,我无法确认这一点,因为我正在从旧文档中提取示例。

% To be confirmed that it requires the setspace package, try with and without.
\usepackage{setspace}

% Let top 85% of a page contain a figure
\renewcommand{\topfraction}{0.85}

% Default amount of minimum text on page (Set to 10%)
\renewcommand{\textfraction}{0.1}

% Only place figures by themselves if they take up more than 75% of the page
\renewcommand{\floatpagefraction}{0.75}

希望这对你有帮助,但你可能需要进行实验。此外,当你更改默认行为时,你有责任注意一些常见的注意事项等。

相关内容