如果图形太大且带有参数 [H],LaTeX 会跳过一页

如果图形太大且带有参数 [H],LaTeX 会跳过一页

如果图形对于一页来说太大,并且使用参数 [H] 绑定,LaTeX 会留下一整页空白。使用放置[p!]可以避免空白页,但会打乱顺序。结果的第一页是空白的,然后图形出现在第二页上。第二个图形应该放置在文本“第二个图后的文本”,但事实并非如此。
为什么 LaTeX 会让一页完全空白?使用[p!]而不是[H]显然不是真正的解决方案。这是代码:

\documentclass[40pt]{scrreprt}
\usepackage{float}

\begin{document}
\begin{figure}[H]
    \caption{This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption.}
\end{figure}
Text after the first figure.
\newpage
\begin{figure}[p!]
    \caption{This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption. This is a really long caption.}
\end{figure}
Text after the second figure.
\end{document}

答案1

正如评论中所述,这是有意为之。如果浮动环境不适合其应在的页面,LaTeX 会将其放置在下一页,即使留下一个完全空白的页面。

不过,有一个解决方法:诱使 LaTeX 相信对象适合!有人告诉我,这不应该作为标准使用,因为如果过程中出现任何问题,都不会发出警告。
但这就是它:

为了将对象准确地放置在您想要的位置,并且在此过程中没有奇怪的空白页,请使用以下命令:

\parbox[c][\textheight]{\textwidth}{
    The stuff that you want to be here
}

相关内容