[Tex/LaTex] IEEEtran – Two tables on top of page, two column

ieeetrantablestwo-column

I can't put my tables on the top of page two column, searched for several other tex.stackexchange questions. None of them did help.

My table, two tabulars inside:

\begin{table*}[!t]
    \centering
    \begin{tabular}{ccc}
    \hline
    a&b&c\\
    \hline
    \end{tabular}
    \quad
    \begin{tabular}{ccc}
    \hline
    d&e&f\\
    \hline
    \end{tabular}
\end{table*}

It makes my table two column, but my table goes to in the middle of the page, vertically. I want my table to be on the top of the page.

I tried the same latex script on a normal latex document, it's the following:

\documentclass{article}

\begin{document}

Sample text. Sample text.

\begin{table*}[!t]
\centering
\begin{tabular}{ccc}
\hline
a&b&c\\
\hline
\end{tabular}
\quad
\begin{tabular}{ccc}
\hline
d&e&f\\
\hline
\end{tabular}
\end{table*}

\end{document}

This one worked great. There is something wrong with the IEEE template, I think.

How can I make my two tabulars side by side on the top of page and two column using IEEEtran?

PS: I downloaded the style file from: http://drucmwebproxy.ieee.org/documents/IEEEtran.zip and using bare_jrnl.tex.

Best Answer

From your description, it seems that the two tabular environments are being moved to a floats only page; if this is the case, the float will be placed centered vertically on the page; to change this behaviour, you can change the value for the length \@dblfptop, using

\makeatletter
\@dblfptop 0pt
\makeatother

A complete example:

\documentclass[journal]{IEEEtran}

\makeatletter
\@dblfptop 0pt
\makeatother

\title{The Title}
\author{The Author}

\markboth{Journal of \LaTeX\ Class Files,~Vol.~6, No.~1, January~2007}%
{Shell \MakeLowercase{\textit{et al.}}: Bare Demo of IEEEtran.cls for Journals}

\begin{document}

\maketitle

\begin{abstract}
The abstract goes here.
\end{abstract}

\section{Introduction}
I wish you the best of success.

\begin{table*}[!t]
    \centering
    \begin{tabular}{ccc}
    \hline
    a&b&c\\
    \hline
    \end{tabular}
    \quad
    \begin{tabular}{ccc}
    \hline
    d&e&f\\
    \hline
    \end{tabular}
\end{table*}

\end{document}

An image of the top portion of the second page, showing the float at the top:

enter image description here