# Formatting a table in a two-column document

I am trying to write a paper in IEEE format which includes tables. It's a two-column document. But when I am trying to create the table it overlaps with material in the other column, like the following image:

The code of the table is as follows:

\begin{table}[!ht]
\begin{center}
\caption{Actors vs Positional Dynamicity (based on Closeness Centrality) in Different LSNs} \label{pos1}
\begin{tabular}{|c||c| c| c| c| c|}
\hline

Actor No. & LSN 1 & LSN 2 & LSN 3 & ...  & LSN 60   \\ [0.5ex]
\hline\hline
1 &0.205602  &0.262515  & 0.247979  &... & 0.170467  \\
\hline
2 &0.00961852  &0.0200901  & 0.0207746  &... & 0.107013 \\
\hline
3 &0.1271  & 0.170967 &  0.199928  &... &0.173208  \\
\hline
4 & 0.00263733 & 0.00524802 & 0.00787202  &... &0.0100803  \\
\hline
5 & 0.00300429 &0.00597824  &  0.00673418  &... & 0.00706005 \\
\hline
... & ... & ... & ...   &...  .  &...    \\
\hline
1899 &0.00994494  &0.00968842  & 0.0216411   &...&0.0610909  \\
\hline
\end{tabular}
\end{center}
\end{table}


Is there any way to resize the table modifying the above code so that it doesn't get intersected with the other column?

• Does the table have to fit inside a single column, or is it OK to let is span both columns? How important is to show the column between "LSN 3" and "LSN 60"? – Mico Feb 25 '17 at 16:56
• Or may it be possible to break "Actor No." in two lines? Or to use a smaller font size (e.g. \footnotesize)? – TeXnician Feb 25 '17 at 17:02
• It is hard to say since you have not posted a compilable example, but it may be that a \noindent before the start of the table and then {@{}|c||c| c| c| c| c|@{}} as the tabular specifier will get you where you need to go. – jon Feb 25 '17 at 17:09
• tried but the result is the same @jon – user5411115 Feb 25 '17 at 17:16
• There are many ways, but without a minimal example (or see here) we run the risk of me suggesting one of the less optimal ones. Also, if @Mico's answer is mainly acceptable (and it does look much more professional because of the lack of vertical rules and the alignment on the decimal), then perhaps it would simply be better for him to add a comment to that effect. – jon Feb 25 '17 at 18:33

I suggest you (a) get rid of all vertical lines and most horizontal lines, use the line-drawing macros of the booktabs package for the remaining few lines to give the table a more open look and (b) use a tabular* environment and let LaTeX figure out the permissible amount of intercolumn whitespace. You may also want to align the numbers on their decimal markers using, say, the siunitx package and its S column type.

\documentclass[twocolumn]{IEEEtran}
\usepackage{lipsum,booktabs,siunitx}
\newcolumntype{T}[1]{S[table-format=#1,group-digits=false]}
\begin{document}
\lipsum[2] % filler text

\begin{table}[!ht]
% let LaTeX figure out optimal amount of intercolumn whitespace:
\setlength\tabcolsep{0pt}
\caption{Actors vs.\ Positional Dynamicity (based on
Closeness Centrality) in Different LSNs} \label{pos1}
\begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}}c*{3}{T{1.8}}cT{1.8}}
\toprule
Actor No. & {LSN 1} & {LSN 2} & {LSN 3}   & $\cdots$ & {LSN 60} \\
\midrule
1 &0.205602    &0.262515    & 0.247979    & $\cdots$ & 0.170467  \\
2 &0.00961852  &0.0200901   & 0.0207746   & $\cdots$ & 0.107013  \\
3 &0.1271      & 0.170967   &  0.199928   & $\cdots$ & 0.173208  \\
4 & 0.00263733 & 0.00524802 & 0.00787202  & $\cdots$ & 0.0100803 \\
5 & 0.00300429 &0.00597824  &  0.00673418 & $\cdots$ & 0.00706005\\
$\cdots$ & $\cdots$ & $\cdots$ & $\cdots$ & $\cdots$ & $\cdots$  \\
1899&0.00994494 &0.00968842 & 0.0216411   & $\cdots$ & 0.0610909 \\
\bottomrule
\end{tabular*}
\end{table}
\lipsum[2-10] % more filler text
\end{document}

• Observe that, with this solution, it's not necessary to introduce a line break in the cell "Actor No.". If you do insist on creating a line break, the easiest way to do so is to write "Actor" in one row and "No." in a new, second, row. – Mico Feb 25 '17 at 19:11