This is related to How to make a figure span on two columns in a scientific paper?
In a table* element, I want to put two \tabular{} elements, and get them appear side by side. I will then need to caption them as (a) and (b) and create labels (for references in the text) and so forth. If I just use the table* element, the tables appear below each other and are centred across the two columns.
EDIT: In response to TH: This is what I tried. Both tables still appear on the right column.
\begin{table*} \subfloat[Before processing]{ \begin{tabular}{|c|c|c|c|c|} \hline Year & Month & Country & State & Impressions\tabularnewline \hline \hline 2007 & JAN & IN & TN & 3\tabularnewline \hline 2007 & JAN & IN & TN & 1\tabularnewline \hline \end{tabular} } \begin{table} \subfloat[After processing]{ \begin{tabular}{|c|c|c|c|c|} \hline Year & Month & Country & State & Impressions\tabularnewline \hline \hline 2007 & JAN & IN & TN & 7\tabularnewline \hline 2007 & FEB & IN & KA & 13\tabularnewline \hline \end{tabular} } \caption{overall} \end{table*}
Best Answer
You should use the
subfig
package.This can be used in conjunction with the
floatrow
package. See thesubfig
documentation for an example that aligns captions usingfloatrow
.EDIT:
Your example has an extra
\begin{table}
that doesn't belong. It also has a blank line which causes TeX to start a new paragraph which is why one table appears on top of the other.Here's a complete example where I've also cleaned up your tables following the guidelines given in the documentation to the
booktabs
package.