I am using a two-column template to write an article in LaTeX. I would like to insert in the text tables which have one column only. Is there a way in which I can switch from a two-column to a one column environment and back?
1 Answer
The following document shows a full with table (with table*
) and a table within a single column (with table
) at the top of a two column page:
\documentclass[twocolumn]{article}
\usepackage{fixltx2e}
\begin{document}
\begin{table*}
\centering
\begin{tabular}{|cc|}
\hline
aaaaaaaaaaaaaaaaaaaaa& b\\
a&bbbbbbbbbbbbbbbbbbbbbb\\
\hline
\end{tabular}
\caption{xxxx}
\end{table*}
\begin{table}
\centering
\begin{tabular}{|cc|}
\hline
aaaaaaaaaaaa& b\\
a&bbbbbb\\
\hline
\end{tabular}
\caption{xxxx}
\end{table}
\def\a{abc }
\def\b{\a\a\a\a\a\a\a\a}
\def\c{\b\b\b\b\b\b\b\b\b}
\def\d{\c\c\c\c\c\c\c\c\c}
\d\d
\d\d\d
\end{document}
\begin{table*}
\begin{table}
if it should not take up two columns (\textwidth) and stay in a single column.multicol
package, but not with the[twocolumn]
option.