# Figures and Tables 'push down' text in the right column

When I use the IEEE two-column latex template, sometimes the text in the right column does not start at the top, but gets 'pushed down'. This happens sometimes when adding figures or table. A similar problem was already discussed HERE in this forum

My problem just occurs with specific text length and figure sizes. My usual solution is to vary those parameter until everything fits. Has anybody got a 'real' solution?

Here are example files which show the problem:

http://dl.dropbox.com/u/25824831/misalignment.tex

http://dl.dropbox.com/u/25824831/IEEEtran.cls

-
I obtain different output when compiling misalignment.tex with your ieeetran.cls than with the CTAN version of ieeetran.cls. Does using the CTAN version fix your problem? Did you change anything in your version of ieeetran.cls? –  Werner Mar 26 '12 at 6:52
I did not modify the file. I git if from computer.org/portal/web/cscps/formatting –  Christopher Mar 27 '12 at 6:54

Your file runs good for me. However, some facts must be noticed from your MWE.

• In your table you have used \begin{center} environment. This introduces some extra vertical place in the document. Use \centering instead.

• Do not leave a blank line before and after the \figure or table environment. Instead put a comment line like this. This will avoid extra vertical space as latex will put a separate paragraph.

• In figure or table environment, it is usually better not to put the placeholder like [!t]. Instead put [t] to give latex some room to adjust the placement. To keep the sections and figures/tables together you can use

\usepackage[section]{placeins}

so that they are placed within the respective sections. (use this package judiciously).

• (Anticipating your query) To balance the last page columns you can try balance package

\usepackage{balance}

and somewhere in the first column of the last page, you say \balance to get columns balanced.

Note: If nothing works out and the problem persists, then you can avoid the figure/table environment (i.e., do not float them at all). Do

\usepackage{caption}

{
\centering
\includegraphics[width=7cm]{images//user-code}
\captionof{figure}{caption}
\label{fig:user-code}
}

for figures and

{
\captionof{table}{caption}
\label{fig:user-code}
\centering
\begin{tabular}{| l | p{1.2cm} | l | }
\hline
\textbf{-} & \textbf{-} & \textbf{-} \\ \hline \hline
- & - & - \\ \hline
- & - & - \\ \hline
- & - & - \\ \hline
- & - & - \\ \hline
- & - & - \\ \hline
- & - & - \\ \hline
\end{tabular}
}

for tables. Hope this will be useful.

The last page with balanced columns:

Edit: OK now I managed to get the error with the file using the given ieeetran.cls.

The given ieeetran.cls is some how modified and is not compatible with the package fixltx2e. Hence with the ieeetran.cls, fixltx2e can not be used.

Given ieeetran.cls with fixltx2e gives this output:

and without fixltx2e (i.e., %\usepackage{fixltx2e} the output is:

I do not know how the ieeetran.cls provided by OP is modified and why? And how it changes this behavior is a mystery to me.

-
Only the MWE worked for me too, but together with the IEEEtran.cls given above, I also get glitches. So it seems to be a modified version of the class. No idea where the problem comes from, though. –  Stephan Lehmke Mar 26 '12 at 8:45
@StephanLehmke, I found the reason how it comes like that. But Why it comes like that, I could not figure out. May be one should look into the changes made to the ieeetran.cls file provided by the OP. –  Harish Kumar Mar 26 '12 at 9:57
The main difference seems to be the implementation of a new option for "IEEE Computer Society conferencs (CPS)". But the changes are mostly margins, font sizes & such, nothing inherently suspect to have such an effect. So I assume this is just coincidence: a random configuration of floating material which happens to trigger this error (whatever it is). –  Stephan Lehmke Mar 26 '12 at 10:04
thanks a lot for your answers. Throwing out the fixltx2e package did it. –  Christopher Mar 27 '12 at 6:55
@Christopher Here to say thanks one will upvote (by clicking the uparrow button above left of the answer) and if the answer solved the problem, by accepting it (clicking the green check mark below arrows). You can do both upvoting and accepting. That is the style we follow here. (if the answer was useful you may consider clicking the green check mark so that for others who search for similar things it will be useful) –  Harish Kumar Mar 27 '12 at 7:00