Hla Hla Htay’s Notes


Latex : Table across two columns
August 13, 2008, 11:37 am
Filed under: Latex, Writing | Tags: , , ,

Normally, papers has to be prepared in two column mode. The following code will allow you the table across two columns.

\begin{center}
\begin{table*}[ht]
{\small
\hfill{}
\begin{tabular}{|l|l|c|c|c|c|c|c|c|}
\hline
\textbf{Hello}&\textbf{Hello}& \multicolumn{7}{|c|}{\textbf{Hello}}\\
\cline{3-9}
\hline
AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA\\
BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB\\
AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA\\
BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB\\
\hline
\end{tabular}}
\hfill{}
\caption{Table Name}
\label{tb:tablename}
\end{table*}
\end{center}

I copy their comments for those who has the same problem. @Thanks you, Chus”.@ :)

Liz said that “This code produces a line spacing of 3 lines in my document. Is it possible to avoid that?”
Chus solved this problem by introducing the center environment inside the table environment.


7 Comments so far
Leave a comment

you made my day!

Comment by Adrian Bachmann

Thank you! This code is very usefull!!!

TAG: table article twocolumn latex

Comment by Osvaldo Pulcinelli

thankz. bro

Comment by davyd

nice, it helped me out

Comment by Brasem

Great! Thanks

Comment by Bashir

This code produces a line spacing of 3 lines in my document. Is it possible to avoid that? Thanks in advance!

Comment by Liz

Thank you!
BTW, I was having also the same problem that Liz comments. You can avoid that by introducing the center environment inside the table environment, not outside as in the code above.

Comment by Chus




Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>