[Tex/LaTex] Creating tables with borders in IEEE conference two column format

ieeetrantablestwo-column

I'm new to LaTex. I'm trying to find some sample code that shows how to create a single column table with borders (and if possible a grey header row) in a two column paper.

Best Answer

Since you mentioned IEEE, in these documentclass(es) the starred versions of table and figure span the whole page.

To have a highlighted (colored) line, just add rowcolor{your_favorite_color} before the line in question. To make this available, you need to load the colortbl and the (xcolor or color) packages in the preamble.

In my example the lipsum package is just necessary to generate some random text.

Here's a MWE you can try (I kept the title and author info from the downloadable template):

\documentclass[conference]{IEEEtran}

\usepackage{xcolor}% you could also use the color package
\usepackage{colortbl}
\usepackage{lipsum}

\begin{document}

\title{Bare Demo of IEEEtran.cls for Conferences}

\author{\authorblockN{Michael Shell}
\authorblockA{School of Electrical and\\Computer Engineering\\
Georgia Institute of Technology\\
Atlanta, Georgia 30332--0250\\
Email: mshell@ece.gatech.edu}
\and
\authorblockN{Homer Simpson}
\authorblockA{Twentieth Century Fox\\
Springfield, USA\\
Email: homer@thesimpsons.com}
\and
\authorblockN{James Kirk\\ and Montgomery Scott}
\authorblockA{Starfleet Academy\\
San Francisco, California 96678-2391\\
Telephone: (800) 555--1212\\
Fax: (888) 555--1212}}

\maketitle

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

\section{Table Example}

\lipsum[1]

\begin{table*}
\centering
\begin{tabular}{|c|c|c|}
\hline
\rowcolor{gray}
A & B & C\\
\hline
1 & 2 & 3\\
\hline
\end{tabular}
\end{table*}

\lipsum[2-15]

\end{document}