[Tex/LaTex] Making a long table continue over two columns

multicoltablestwo-column

I am using multicol to make a two-column document using the book document class. I have a long tabular that I want to break where the page breaks and then continue in the next column.

I could split it into two tables, but I want their width and such to be the same. I've tried with longtable but can't get it to work.

I basically want the table to split and arrange itself into two columns just like normal text does.

Edit: Sorry for the lack of information. With just 1 column it works fine with longtable, but when I use multicols it breaks down and just continues outside the page. I also get an error while compiling.

Package longtable Error: longtable not in 1-column mode.

This is a simplification of my code:

\documentclass[11pt,a4paper]{article}

\usepackage{multicol}
\usepackage{longtable}

\begin{document}

\begin{multicols}{2}

\begin{longtable}{ccc}
Header of first column & Header of second column \\
\endhead
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{longtable}

\end{multicols}

\end{document}

What it looks like

I hope this is enough information. Any thoughts?

Best Answer

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.