如何在乳胶中将图形单独放在页面顶部?

发布于 2024-08-17 02:14:02 字数 54 浏览 6 评论 0原文

当其中一个图形与其他文本不匹配时,该图形会出现在页面中间(单独)。如何让它显示在新页面的顶部?

One of the figures appear in the middle of a page (on its own) when the figure does not fit the other text. How to show it on top of the new page?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

謌踐踏愛綪 2024-08-24 02:14:02

如果所有其他方法都失败,只需将 \vspace*{3in} 添加到图形底部 \caption 下方。然后通过反复试验更改 3in 尺寸,直到获得所需的外观。这当然是纯粹的蛮力,但有时这比尝试让 LaTeX 以“正确”的方式做事要容易得多。

如有疑问,请使用暴力。

---肯·汤普森

If all else fails, just add \vspace*{3in} to the bottom of your figure below the \caption. Then by trial and error change the 3in dimension until you get the look you want. This is of course pure brute force, but sometimes that's a lot easier than trying to get LaTeX to do things the "right" way.

When in doubt, use brute force.

--- Ken Thompson

苦妄 2024-08-24 02:14:02

我想我误解了你的问题。您是否在问“如何让页面上的浮动元素本身位于页面顶部,而不是垂直居中?”?

如果是这样,以下是如何自定义浮动页面。从 source2e 开始,粘合被插入到页面的顶部和底部以及页面上的每个浮动之间。这种插入的胶水由以下参数给出:

\setlength\@fptop{0\p@ \@plus 1fil} 
\setlength\@fpsep{8\p@ \@plus 2fil} 
\setlength\@fpbot{0\p@ \@plus 1fil}

只需重新定义这些参数即可获得您喜欢的输出。例如,对于顶部和底部对齐的浮动:(未经测试)

\makeatletter
\setlength\@fptop{0pt} 
\setlength\@fpsep{8pt plus 1fil} 
\setlength\@fpbot{0pt}
\makeatother

I think I misunderstood your question. Are you asking "how do I get floats on pages by themselves to be at the top of the page, rather than vertically centred?"?.

If so, here's how to customise the float page. From source2e, glue is inserted at the top and bottom of the page, and between each float on the page. This inserted glue is given by the following parameters:

\setlength\@fptop{0\p@ \@plus 1fil} 
\setlength\@fpsep{8\p@ \@plus 2fil} 
\setlength\@fpbot{0\p@ \@plus 1fil}

Simply redefine these to get the output you like. For example, for top- and bottom- aligned floats: (untested)

\makeatletter
\setlength\@fptop{0pt} 
\setlength\@fpsep{8pt plus 1fil} 
\setlength\@fpbot{0pt}
\makeatother
昔日梦未散 2024-08-24 02:14:02

您可以通过 \clearpage\newpage 插入分页符,然后在 figure 环境中使用 t 选项:

...

\clearpage

\begin{figure}[t!]
    \centering
    \includegraphics[scale=.75]{graphic/...}
    \caption{}
    \label{fig:}    
\end{figure}

...

You can insert a pagebreak via \clearpage or \newpage, then use the t option on the figure environment:

...

\clearpage

\begin{figure}[t!]
    \centering
    \includegraphics[scale=.75]{graphic/...}
    \caption{}
    \label{fig:}    
\end{figure}

...
半世晨晓 2024-08-24 02:14:02

如果没有地方可以容纳该图形,那么它会单独放在一页上。有关如何设置的更多信息,请参阅有关浮动的常见问题解答自定义此行为。

If there's nowhere for the figure to fit then it will go on a page by itself. See the FAQ answer on floats for more information on how to customise this behaviour.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文