Hi all
I have 5 pages long table in my latex two column document. I used longtable package it shows error cant use is two column mode. Is there any otherway to split long tables in my twocolumn document?
thanks in advance
regards
a r u l
Graphics, Figures & Tables ⇒ Longtable package is not working in two column mode
NEW: TikZ book now 40% off at Amazon.com for a short time.

Longtable package is not working in two column mode
Hi,
in effect, as the longtable documentation (page 8) mentions:
You will notice the poor column balancing obtained in page two in the above example. A better way to deal with two column documents is to use the multicol package:
in effect, as the longtable documentation (page 8) mentions:
A possible solution: use \onecolumn to temporarily switch to one column mode and build the table, and then use \twocolumn to swith back to two column mode:documentation wrote:longtable now issues an error if started in the scope of \twocolumn, or the multicols environment.
Code: Select all
\documentclass[twocolumn]{article}
\usepackage{longtable}
\usepackage{lipsum}% just to automatically generate some text
\begin{document}
\lipsum[1-10]
\onecolumn
\begin{longtable}{cc}
text & text\\
text & text\\
text & text\\
text & text\\
text & text\\
text & text\\
text & text\\
\end{longtable}
\twocolumn
\lipsum[1-10]
\end{document}
Code: Select all
\documentclass{article}
\usepackage{multicol}
\usepackage{longtable}
\usepackage{lipsum}% just to automatically generate some text
\begin{document}
\begin{multicols}{2}
\lipsum[1-10]
\end{multicols}
\onecolumn
\begin{longtable}{cc}
text & text\\
text & text\\
text & text\\
text & text\\
text & text\\
text & text\\
text & text\\
\end{longtable}
\begin{multicols}{2}
\lipsum[1-10]
\end{multicols}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Longtable package is not working in two column mode
The supertabular and xtab packages will allow you to have a long multi-page table in a multiple column environment, but they don’t seem to actually wrap the table across the columns. I'd actually recommend using the tabbing environment instead if you can get away with it.