How float environments are handled in LaTeX can you read in the answer of Frank Mittelbach: How to influence the position of float environments like figure and table in LaTeX?
To answer your question we must collect some facts:
- Floating environments doesn't allow any page breaks.
longtable or supertabular aren't floating environments and can't be used inside them.
- Only the package
tabularx and ltxtable (combination of longtable and tabularx) can handel a given width.
- You can't simple interrupt the
twocolumn mode.
- When a document is set in
twocolumn, yet you can switch inside the document between onecolumn and twocolumn
Based of this fact and your request I suggest a combination of the package multicol and ltxtable
The package multicol provided the environment multicols.
\documentclass[twocolumn,demo]{article}
\usepackage{graphicx,lipsum}
\usepackage{multicol}
\usepackage{longtable,ltxtable,booktabs}
\usepackage{forloop}
\newcounter{count}
\setcounter{count}{1}
\usepackage{filecontents}
\begin{filecontents}{myltxtable.tex}
\renewcommand\arraystretch{3.5}
\begin{longtable}{X}
\caption{caption}\\\endfirsthead
\toprule
foo\\bar\\foo\\bar\\
foo\\bar\\foo\\bar\\
foo\\bar\\foo\\bar\\
foo\\bar\\foo\\bar\\
foo\\bar\\foo\\bar\\
\bottomrule
\end{longtable}
\end{filecontents}
\begin{document}
\section{foo}
\lipsum[1]
\clearpage
\onecolumn
\begin{multicols}{2}[\section{begin multicols}]
\lipsum\lipsum[2]
\end{multicols}
\LTXtable{\textwidth}{myltxtable.tex}
\twocolumn
\lipsum
\end{document}
ORIG
I hope I understand you correct. Some time ago I wrote a small post about the package supertabular on the FAQ Dante (in German) which is able to handle two column.
One important fact is that supertabular calculates the width of the rows c, l and r on every new page again.
Here a small example:
\documentclass[twocolumn]{article}
\usepackage{forloop,supertabular}
\newcounter{count}
\setcounter{count}{1}
\begin{document}
\begin{center}
\tablefirsthead{erster Tabellenkopf\\}
\tablehead{Tabellenkopf\\}
\tabletail{Fortsetzung n\"achste Seite\\}
\tablelasttail{letze Seite\\}
\tablecaption{supertabular-Tabelle}
\begin{supertabular}{c}
\whiledo{\value{count} < 100}{\stepcounter{count}
\arabic{count} \\}
\end{supertabular}
\end{center}
\end{document}
Any advice on how to do this?
– Alex T. Dec 30 '11 at 20:35