# equation spanning two columns in ieeetran

I am writing a paper using ieee style in two columns format. Do you know how can I write an equation that spans over the two columns?

-
You could put it in a double column float. –  TH. Apr 23 '11 at 0:02

See page 11 of the IEEEtran manual; there is an example at the top of the page.

Now, the double column equations are defined on the page prior to the one in which they are to appear (and in this example supposed that they are to be equation numbers six and seven):

\begin{figure*}[!t]
% ensure that we have normalsize text
\normalsize
% Store the current equation number.
\setcounter{MYtempeqncnt}{\value{equation}}
% Set the equation number to one less than the one
% desired for the first equation here.
% The value here will have to changed if equations
% are added or removed prior to the place these
% equations are referenced in the main text.
\setcounter{equation}{5}
$$\label{eqn_dbl_x} x = 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19 + 21+ 23 + 25 + 27 + 29 + 31$$
$$\label{eqn_dbl_y} y = 4 + 6 + 8 + 10 + 12 + 14 + 16 + 18 + 20+ 22 + 24 + 26 + 28 + 30$$
% Restore the current equation number.
\setcounter{equation}{\value{MYtempeqncnt}}
% IEEE uses as a separator
\hrulefill
% The spacer can be tweaked to stop underfull vboxes.
\vspace*{4pt}
\end{figure*}


The result of which is shown at the top of this page. This technique allows the definition of the equations to be positioned arbitrarily as needed so that the (floating) equations will appear where desired. The “[!t]” option forces LATEX to do its best to place the equations at the top of the next page. Had it been “[!b]” instead, then the stfloats package would need to be loaded and the \vspace command, followed by the \hrulefill command, would have to occur before the equations in the figure.

-
Why the incantations to store and restore the "current" equation number? (Also, shouldn't there be appropriate increments added to the current equation number?) –  Willie Wong Apr 23 '11 at 3:03
@Willie: I quoted some more of the manual. –  Emre Apr 23 '11 at 3:09
I've tried using the above and it does span both columns but the problem is that it does not place the long equation where I want it (following the appropriate text). How do I get it place correctly? –  BeauGeste Aug 28 '11 at 2:36
I tried to use this example for the same case, but the equation goes to the next page, while I use \begin{figure*}[b] instead of \begin{figure*}[!t]. How can I have the equation in the current page? –  user42212 Dec 5 at 12:07