11

So, I've been trying to insert a table so that it spans only one column into my two column document. It partially works, however it creates a large space in the other column for a reason I can't seem to figure out. A screenshot is shown below. I'm currently using the \twocolumn package. However, I'm not sure whether this or \multicols would work better with figures and tables. Any help would be appreciated.

enter image description here

njszym
  • 113
  • 3
    welcome to tex.sx. in order to understand what you're doing, we need to see a compilable example. this looks to me like you're setting the smaller table in-line, not as a float, and there just isn't space for it in the first column. but without code, it's hard to be sure. – barbara beeton Dec 23 '16 at 15:37
  • 1
    welcome again. See at the link http://tex.stackexchange.com/questions/89462/page-wide-table-in-two-column-mode or http://tex.stackexchange.com/questions/53384/creating-a-table-in-two-column-style-page. – Sebastiano Dec 23 '16 at 16:00
  • 3
    Use the table* environment, not table. – Bernard Dec 23 '16 at 17:22
  • Thank you everyone for the replies. You were right, I hadn't set is as a float using the table* environment. After doing so, things seem to be working out much nicer. As you can probably tell, I'm rather new to latex and still trying to learn! – njszym Dec 23 '16 at 18:09
  • table* only supports t and p. multicols allows one to put a full width tabular in the middle of the page by using \end{multicols}. – John Kormylo Dec 24 '16 at 02:54

2 Answers2

16

Use table for single column floats and table* for double column floats.

\documentclass[twocolumn]{article}
\usepackage{booktabs,chemformula}
\begin{document}

\section{Electronic Structure}

\input knuth

\begin{table}[h]
  \centering
  \begin{tabular}{@{}ccc@{}}
    \toprule
    Compound  & Phase    & Exp.\ Band Gap \\
    \midrule
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \ch{VO_2} & Metallic & 0.00 \\
    \bottomrule
  \end{tabular}
  \caption{Sample table}
\end{table}

\input bryson

\section{Charge Transfer}

\input ward

\begin{table*}[h]
  \centering
  \begin{tabular}{@{}ccccc@{}}
    \toprule
    Compound  & Phase    & Lattice Type & Space Group & Exp.\ Band Gap \\
    \midrule
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \ch{VO_2} & Metallic & Tetragonal & P4\textsubscript{2}/mnm & 0.00 \\
    \bottomrule
  \end{tabular}
  \caption{Sample table}
\end{table*}

\input ward

\input zapf

\input darwin

\input ward

\input darwin

\end{document}

enter image description here

Henri Menke
  • 109,596
0

@Henri Menke already answered detailed, I would just like to add a few lines for future references. The main difference to fit the table in one column \begin{tabular}{@{}ccc@{}} and un-fit(!) in one column \begin{tabular}{c|c|c|c|c}. And to visualize the table/figure in two column template that covers both of the columns is just to make it as a float, for example, \begin{table*} ... \end{table*}, or \begin{figure*}...\end{figure*}

bim
  • 180