Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Can you give an example with the class you're actually using? –  egreg Nov 4 '12 at 22:37

1 Answer 1

up vote 3 down vote accepted

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

share|improve this answer
    
Better than a perfect answer. Thank you. –  celebisait Nov 5 '12 at 6:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.