LaTeX floats and consecutively numbered equations

latex

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?

Best Answer

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}"