LaTeX 浮点数和连续编号的方程
我有一些出现在浮动图中的方程。不幸的是,假设浮点(以及方程)出现在定义浮点的位置,则分配相应的方程编号。从概念上讲,页面将如下所示:
equation #1
figure begins
equation #2
figure ends
equation #3
但如果 Latex 将图形浮动到页面顶部,那么我希望它的编号如下:
figure begins
equation #1
figure ends
equation #1
equation #2
Is it possible to get Latex to do this?
I have a few equations that appear in a floating figure. Unfortunately, the corresponding equation numbers are assigned assuming that the float (and hence the equations) appear in the position that the float was defined. Conceptually, a page will appear like this:
equation #1
figure begins
equation #2
figure ends
equation #3
But if latex floats the figure to the top of the page, then I would like it to be numbered like this:
figure begins
equation #1
figure ends
equation #1
equation #2
Is it possible to get Latex to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
解决这个问题的一种方法是在浮点数内使用未编号的方程,然后通过说“图 \ref{fig:foo} 中的方程”来引用它
One way round this would be just to use unnumbered equation inside the float, and then refer to it by saying "the equation in figure \ref{fig:foo}"
不确定,但可能不会。在第二个示例中,两个方程编号为#1。我不知道上下文,但您应该考虑不对图中的方程式进行编号(或不在图中放置方程式),或覆盖方程式的标准标签(通过使用 AMS 包中的 \tag 命令)
Not sure, but probably not. In your second example, two equations are numbered as #1. I don't know the context, but you should consider not numbering the equation in the figure (or not put an equation in a figure), or overriding the standard label for the equation (by using the \tag command from the AMS packages)
通过添加数组包
\usepackage{array}
使你的图形不浮动,然后告诉 Latex 你想要你的图形在代码中的确切位置:
make your figures not float by adding the array package
\usepackage{array}
then tell latex you want your figure exactly where it is in the code:
我建议在文档完成后,将图形的代码移动到输出中出现的同一位置。我不知道有任何自动方法可以做到这一点(虽然我还没有研究过它,但我相当确定这将是一个相当困难的问题)。
I suggest that after the document is finished you move the code for the figure into the same place it appears in the output. I'm not aware of any automatic means that this can be done (although I haven't looked into it, I'm fairly sure that it would be quite a difficult problem).