准确指定浮动的位置(例如第 2 页右侧栏的顶部)

准确指定浮动的位置(例如第 2 页右侧栏的顶部)

简短版本:我如何才能禁用 LaTeX 的自动图形放置功能,而是手动指定它们相对于页面布局的位置,而不是它们在文本中的位置?

长版本:写完文档后,我经常需要做很多调整才能将图片放到我想要的位置。(这种情况尤其发生在有页数限制的情况下,例如会议论文。)通常,这涉及在figure文档源中移动环境的大量反复试验,以及编辑标题和重新缩放图片等,以尝试将它们放到正确的位置。这个过程效率很低,我想知道是否有更好的方法。

具体来说,我想知道是否有一种方法可以直接指定图形的位置,而不使用 LaTeX 的自动定位。我仍然希望它们在文档中显示为浮动图形,但我想确切地说出它们所属的位置,例如第 2 页右侧栏的顶部。这可能吗?

这是 MWE。目标是将两个图定位在第二页右侧栏的顶部,无论它们出现在源文档中的什么位置。

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\begin{document}

% this figure should appear at the top of the right-hand column on page 2, *no matter what*.
\begin{figure}
\centering
\includegraphics[width=0.9\columnwidth]{example-image-a}
\caption{A figure.}
\end{figure}

% this figure should appear at the top of the right-hand column on page 2, underneath the
% first figure, no matter what.
\begin{figure}
\centering
\includegraphics[width=0.9\columnwidth]{example-image-b}
\caption{Another figure.}
\end{figure}

\lipsum[1-11]

\end{document}

在此处输入图片描述

相关内容