LaTeX 浮点数和连续编号的方程

发布于 2024-08-13 01:24:24 字数 345 浏览 3 评论 0原文

我有一些出现在浮动图中的方程。不幸的是,假设浮点(以及方程)出现在定义浮点的位置,则分配相应的方程编号。从概念上讲,页面将如下所示:

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 技术交流群。

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

发布评论

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

评论(4

像极了他 2024-08-20 01:24:24

解决这个问题的一种方法是在浮点数内使用未编号的方程,然后通过说“图 \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}"

大姐,你呐 2024-08-20 01:24:24

不确定,但可能不会。在第二个示例中,两个方程编号为#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)

佼人 2024-08-20 01:24:24

通过添加数组包 \usepackage{array} 使你的图形不浮动,

然后告诉 Latex 你想要你的图形在代码中的确切位置:

\begin{figure}[H]
blah blah figure
\end{figure}

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:

\begin{figure}[H]
blah blah figure
\end{figure}
岁月蹉跎了容颜 2024-08-20 01:24:24

我建议在文档完成后,将图形的代码移动到输出中出现的同一位置。我不知道有任何自动方法可以做到这一点(虽然我还没有研究过它,但我相当确定这将是一个相当困难的问题)。

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).

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