Use the \twocolumn
format, then you can use the package supertabular
\documentclass[11pt,a4paper]{article}
\usepackage{supertabular}
\begin{document}
\twocolumn
\tablehead{Header of first column & Header of second column \\}
\begin{supertabular}{ccc}
Table cell 1, 1 & Table cell 1, 2 \\
Table cell 2, 1 & Table cell 2, 2 \\
Table cell 1, 1 & Table cell 1, 2 \\
...
...
\end{supertabular}
\end{document}
together with the package multicols
you can only use the tabbing
environment.
What you try to achieve, is probably not possible using twocolumn
mode. When you change from twocolumn
to onecolumn
, LaTeX gives will have a new page, and lot of white space.
I suggest using the package multicol instead for twocolumn
mode, and place your texts before and after the tables in multicols
environments.
multicol has some shortcomings regarding floats inside columns. If you have lots of floats, it may be not the way to go.
Example 1
\documentclass{article}
\usepackage{lipsum} %% To generate example text
\usepackage{array, booktabs,longtable}
\usepackage[latin]{babel}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
\lipsum[1-6] %% To generate example text
\end{multicols}
%%% Begin table %%%
\begin{longtable}{>{\hangindent=1em}p{13cm}}
\toprule
\lipsum[1]\\ %% To generate example text
\lipsum[1]\\ %% To generate example text
\lipsum[1]\\ %% To generate example text
\lipsum[1]\\ %% To generate example text
\lipsum[1]\\ %% To generate example text
\bottomrule
\end{longtable}
%%% End table %%%
\begin{multicols}{2}
\lipsum[1-6] %% To generate example text
\end{multicols}
\end{document}
Example 2 - switch to onecolumn
You have to adjust the left and right margin of the longtable
if the table shall be set flush to the margins. Since this will depend on your documents margin, I leave it to you.
\documentclass[twocolumn]{article}
\usepackage{lipsum} %% To generate example text
\usepackage{array, booktabs,longtable}
\usepackage[latin]{babel}
\usepackage{multicol}
\begin{document}
\onecolumn
\begin{multicols}{2}
\lipsum[1-7] %% To generate example text
\end{multicols}
%%% Begin table %%%
\begin{longtable}[c]{>{\hangindent=1em}p{13cm}}
\toprule
\lipsum[1]\\ %% To generate example text
\lipsum[1]\\ %% To generate example text
\lipsum[1]\\ %% To generate example text
\lipsum[1]\\ %% To generate example text
\lipsum[1]\\ %% To generate example text
\bottomrule
\end{longtable}
%%% End table %%%
\begin{multicols}{2}
\lipsum[1-6] %% To generate example text
\end{multicols}
\end{document}
Best Answer
Instead of using the
supertabular
package, which is known to have certain weaknesses, I suggest you use the xtab pacakge and itsxtabular
andxtabular*
environments.I gather you want the long table is also quite wide and thus needs to span both columns. To obtain this behavior, you need to issue the instruction
\onecolumn
before\begin{xtabular*}{\textwidth}...}
, and you need to issue the instruction\twocolumn
after\end{xtabular*}
. In order to avoid getting a wretched-looking mid-page page break when LaTeX encounters the\onecolumn
directive, I suggest you also load theafterpage
package and encase the entirextabular*
-related stuff in an\afterpage{...}
instruction. For instance:Depending on the length of the table, there may still be some empty space at the bottom of the last page of the table; however, that's usually much less severe a problem than having a bad page immediately before the start of the table.