有没有办法让 LaTeX 按照文本中引用的顺序放置图形和表格?
我认为这个问题很新颖。这是我遇到的问题。我有一段相对较短的文字,与很多数字和一张表格相关联。我希望浮动仅按我指定的顺序出现在页面上。我已将所有表格和图形参数设置为 [hp] 并按照我希望它们在源中出现的顺序放置它们,例如
图 1
图 2
图 3
表 1
图 4
图 5
我遇到的问题是,无论什么 进行文档排版
我按照表 1
图 1
图 2
等
。我尝试在排版之前删除 Aux 文件。我知道 endfloats 包,但我仍然希望乳胶将浮动放置在文档其他部分的较大文本部分之间。非常感谢任何帮助。
谢谢
I think this question is novel. Here is the problem I have. I have a relatively short piece of text associated with a lot of figures and a table. I want floats to appear on pages just for floats but in the order I specify. I have set all of the table and figure parameters to [hp] and placed them in the order I want them to appear in the source e.g.
Figure 1
Figure 2
Figure 3
Table 1
Figure 4
Figure 5
The problem I have is that no matter what I do the document typesets like this
Table 1
Figure 1
Figure 2
etc....
I have tried trashing the Aux files before typesetting. I am aware of the endfloats package but I still want latex to place the floats in between larger sections of txts in other parts of the document. Any help is greatly appreciated.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我将尝试解释为什么 @user476160(放置修饰符
hp
而不仅仅是p
)的修复有效。figure
是一个float,即不能跨页面分解的元素。figure
环境接受带有放置提示的参数列表:放置说明符
h
代表此处,并大约放置图形> 与源文本中的同一点。位置说明符p
将figure
放置在仅包含浮点数的特殊页面中:Wikibooks 有一篇关于图形放置的精彩文章,如果您想微调图形和表格的放置。
我还建议在 TeX Stack Exchange 问答 中发布与 LaTeX 相关的问题。
I'll try to explain why the fix by @user476160 (placement modifier
hp
instead of justp
) works. Afigure
is a float, i.e. an element that cannot be broken across a page. Thefigure
environment accepts a parameter list with placement hints:The placement specifier
h
stands for here and places the figure approximately at the same point as in the source text. The placement specifierp
puts thefigure
in a special page that contains only floats:Wikibooks has an excellent article on figure placement if you want to fine-tune your figure and table placement.
I also recommend posting LaTeX-related questions in the TeX Stack Exchange Q&A.
问题解决了,列表中的第一个数字的参数是 [p] 而不是 [hp]。由于某种原因,这似乎给乳胶带来了很多悲伤。无论如何,问题暂时解决了。数字和文本都按照我指定的顺序出现。
Problem solved, the first figure in my list had the parameter [p] rather [hp]. This seemed to cause latex a lot of grief for some reason. Anyhow problem solved for now. The figures and txt all appear in the order I have specified.
这很容易。您所要做的就是使用这个包。
并且您必须将图形参数更改为“
让我知道它是否有效:)”
It is quite easy. All you have to do is use this package.
And you have to change the figure parameters to
Let me know if it works :)