我怎样才能阻止 revtex 将高大的数字发送到文档末尾?

我怎样才能阻止 revtex 将高大的数字发送到文档末尾?

我正在用 revtex 4.1 编写一个双列文档,其中有一个非常高的图形,revtex 坚持将其发送到文档的最末尾。该图形很高,但足够短,可以放入文档中\textheight,可能在其下方有一些文本。如果有必要让图形占据整个列,那么我可以接受 - 对我来说,重要的是将图形放在一起,并为其添加适当的标题。

该文件大致如下:

在此处输入图片描述

MWE 是这样的

\documentclass[
  twoside,
  reprint,
  aps,
  pra,
  a4paper
]{revtex4-1}

\usepackage{lipsum}
\usepackage[draft]{pgf}

\begin{document}

\lipsum[1-4]

\begin{figure}
  \begin{pgfpicture}
    \pgftext{\pgfimage[width=0.9\columnwidth,height=0.77\textheight]{}}
  \end{pgfpicture}
  \caption{
    This is sample text and it sits inside the caption because lipsum will not 
    work there. This is sample text and it sits inside the caption because
    lipsum will not work there. This is sample text and it sits inside the 
    caption because lipsum will not work there. 
  }
\end{figure}

\lipsum[1-3]

\end{document}

稍微增加图形高度或在标题中添加另一个句子将导致 TeX 将整个图形(以及所有后续浮动图形)发送到文档末尾 - 甚至不会发送到浮动图形页面。

对于这种情况:

  • 类别floatfix选项似乎没有什么帮助。
  • 重新定义\renewcommand{\textfraction}{0.001},如建议的那样这里,通过扩大允许高度的范围有一定的帮助,但对我的身材来说还不够。
  • vspace在标题末尾添加(可变量的)负面内容确实有帮助,但感觉非常不雅。

有没有更干净的方法来解决这个问题?

答案1

您可以准确地找出哪些约束迫使浮动到下一页,但这些问题正是[!]添加到 LaTeX 中的原因,只需告诉它忽略此处的约束,浮动就会停留在第一页。

\documentclass[
  twoside,
  reprint,
  aps,
  pra,
  a4paper
]{revtex4-1}

\usepackage{lipsum}
\usepackage[draft]{pgf}


\begin{document}

\lipsum[1-4]

\begin{figure}[!]
  \begin{pgfpicture}
    \pgftext{\pgfimage[width=0.9\columnwidth,height=0.77\textheight]{}}
  \end{pgfpicture}
  \caption{
    This is sample text and it sits inside the caption because lipsum will not 
    work there. This is sample text and it sits inside the caption because
    lipsum will not work there. This is sample text and it sits inside the 
    caption because lipsum will not work there. 
a aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa a
  }
\end{figure}

\lipsum[1-3]

\end{document}

相关内容