LateX 中的数字在页面上自动流动/分布
我有一个很长的 LaTeX 脚本,用于制作文档,其中大部分部分都有三个数字,并且它们非常适合页面。在一些随机部分,我们有六到九个数字。因此,页面将无法容纳这些额外的数字,它们将覆盖在页面的底部。
如何自动强制最后三个数字显示在单独的页面上,而不需要手动调整每个部分? (换句话说,一种使清晰页面自动完成的方法)。
我正在寻找类似于 longtable – 允许表格跨越页面边界环境自动控制流量。
以下是常规情况和随机情况的示例:
***Regular case***
\begin{figure}[b!]
\centering
\includegraphics[width =\textwidth]{Path/A.png}
\includegraphics[width =\textwidth]{Path/B.png}
\includegraphics[width =\textwidth]{Path/C.png}
\end{figure}
\clearpage
***Random case***
\begin{figure}[b!]
\centering
\includegraphics[width =\textwidth]{Path/E.png}
\includegraphics[width =\textwidth]{Path/F.png}
\includegraphics[width =\textwidth]{Path/G.png}
\includegraphics[width =\textwidth]{Path/H.png}
\includegraphics[width =\textwidth]{Path/I.png}
\includegraphics[width =\textwidth]{Path/J.png}
\includegraphics[width =\textwidth]{Path/K.png}
\includegraphics[width =\textwidth]{Path/L.png}
\end{figure}
\clearpage
I have a long LaTeX script for making a document where most of the sections have three figures and they fit the page very good. In some random sections, we have six or nine figures. Therefore, the page will not fit these extra figures and they will overlay at the bottom of the page.
How can I automatically force the last three figures to appear on a separate page without the need to adjust each of these sections manually? (In other words, a way to make the clear page done automatically).
I am looking for something similar to longtable – Allow tables to flow over page boundaries environment to control the flow automatically.
Here is an example of the regular and random cases:
***Regular case***
\begin{figure}[b!]
\centering
\includegraphics[width =\textwidth]{Path/A.png}
\includegraphics[width =\textwidth]{Path/B.png}
\includegraphics[width =\textwidth]{Path/C.png}
\end{figure}
\clearpage
***Random case***
\begin{figure}[b!]
\centering
\includegraphics[width =\textwidth]{Path/E.png}
\includegraphics[width =\textwidth]{Path/F.png}
\includegraphics[width =\textwidth]{Path/G.png}
\includegraphics[width =\textwidth]{Path/H.png}
\includegraphics[width =\textwidth]{Path/I.png}
\includegraphics[width =\textwidth]{Path/J.png}
\includegraphics[width =\textwidth]{Path/K.png}
\includegraphics[width =\textwidth]{Path/L.png}
\end{figure}
\clearpage
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
感谢大家的反馈。我在网上查了一些关于这个问题的帖子,有几种方法可以解决这个问题(相当好,但不是 100%)。
第一个解决方案:
正如 @samcarter_is_at_topanswers.xyz 提到的,
figure
环境不支持分页符。\captionof
(来自标题包)和\label
可用于图形标题和引用。第二个解决方案(不是最好的自动化解决方案):
将
figure
分成subfigure
并使用\ContinuedFloat
来分隔页面,但具有相同的标题和标签。第二种解决方案参考: LaTeX 中的 Subfigure – 完整指南
第三种解决方案: 使用@Prof 创建的
figureSeries
包。托马斯·韦斯.不幸的是,它已经有一段时间没有更新了。第三种解决方案参考:GitHub 上的figureSeries包和Stack Exchange 上的figureSeries 包
Thanks everyone for the feedback. I checked couple of posts on the internet regarding the issue and there are couple of ways to solve the problem (fairly good but not 100%).
First Solution:
As mentioned by @samcarter_is_at_topanswers.xyz , the
figure
environment does not support page breaks.\captionof
(from the caption package) and\label
can be used for figure captioning and referencing.Second Solution (Not the best automated solution):
Divide the
figure
intosubfigure
and use\ContinuedFloat
to break the pages but with the same caption and label.Reference of Second Solution: Subfigure in LaTeX – Full Guide
Third Solution: Use
figureSeries
package created by @Prof. Thomas Weise. Unfortunately, it has not been updated since a while.References of Third Solution: figureSeries Package on GitHub and figureSeries Package on Stack Exchange
figure
环境不支持分页符。如果你想要一些东西来打破页面,不要使用figure环境。如果您仍然需要标题和类似的东西,您可以使用
caption
包,如下所示:The
figure
environment does not support page breaks. If you want something to break pages, don't use the figure environment.In case you still need a caption and similar stuff, you can use the
caption
package like this: