[Tex/LaTex] Multi page table in twocolumn document spanning two columns overlaps

tablestwo-columnxtab

I have a long multi-page, two-columns wide table in a LaTex document for a journal in twocolumn mode (with 'continued' remarks on captions in subsequent pages). The only way to write this kind a table is to use xtab package. However, the result is several table segments overlapped each other. How can I fix this error?

Note: I don't want a one-column wide table in two-column document.

Page
Next page

\documentclass[twocolumn]{article} % in real case: {svjour3}          % twocolumn
\usepackage{xtab, lipsum, array}

\begin{document}

\section{Introduction}
\label{intro}
\lipsum*[2]

\subsection{Subsection}
\label{sec:1.1}
\lipsum*[2]

\topcaption{The caption} \label{tab:1}
\tablefirsthead{
    \hline
    \textbf{Column1} & \textbf{Column2} \\
    \hline}
\tablehead{
    \multicolumn{2}{@{}l}{\em Table \ref{tab:1}, cont'd\strut}\\
    \hline
    \textbf{Column1} & \textbf{Column2} \\
    \hline}
\tabletail{\hline}
\tablelasttail{\hline}
\begin{xtabular}[b]{@{}p{0.2\textwidth}@{\hspace{0.01\textwidth}}p{0.79\textwidth}}
1st Row First Column  & \lipsum*[2]\\
2nd Row Second Column & \lipsum*[2]\\ 
3rd Row Third Column  & \lipsum*[2]\\
4th Row Fourth Column & \lipsum*[2]\\
5th Row Fourth Column & \lipsum*[2]\\
6th Row Fourth Column & \lipsum*[2]\\
7th Row Fourth Column & \lipsum*[2]\\
8th Row Fourth Column & \lipsum*[2]\\
9th Row Fourth Column & \lipsum*[2]\\
10th Row Fourth Column & \lipsum*[2]\\
11th Row Fourth Column & \lipsum*[2]\\
12th Row Fourth Column & \lipsum*[2]\\
13th Row Fourth Column & \lipsum*[2]\\
14th Row Fourth Column & \lipsum*[2]\\
\end{xtabular}

\lipsum*[2]

\lipsum*[2]

\lipsum*[2]

\lipsum*[2]

\end{document}

Best Answer

You actually expect to change page layout somewhere on middle of the text. Simple and rude solution is to add \onecolumn before your table and on the its end add \twocolumn. However, this cause start of new layouts on the new pages. Consequently empty space before and after table can be quite large (till to whole page).

For solution of your problem it cross my mind the following possibilities:

  • set your table as separated document and than include it (for example in appendix) with help of pdfpages package.
  • shrink table to column width and redesign it to one column and contents of the first column as row before content of the second column
  • use description instead of table

As illustration of use \onecolumn/\twocolumn solution and use of description as possible solution please test the following MWE:

\documentclass[twocolumn]{article} % in real case: {svjour3} twocolumn
\usepackage{xtab,lipsum,array,ragged2e}

\begin{document}

\section{Introduction}
\label{intro}
\lipsum[1-5]

\begin{description}\RaggedRight
\item[1st Row First Column]~\\   \lipsum*[2]
\item[2nd Row Second Column]    \lipsum*[2]
\item[3rd Row Third Column]     \lipsum*[2]
\item[4th Row Fourth Column]    \lipsum*[2]
\item[5th Row Fourth Column]    \lipsum*[2]
\item[6th Row Fourth Column]    \lipsum*[2]
\item[7th Row Fourth Column]    \lipsum*[2]
\item[8th Row Fourth Column]    \lipsum*[2]
\end{description}

\section{Section}
\label{sec:1}
\lipsum*[1]

\subsection{Subsection}
\label{sec:1.1}
\lipsum*[2]

\onecolumn
\topcaption{The caption} \label{tab:1}
\tablefirsthead{
    \hline
    \textbf{Column1} & \textbf{Column2} \\
    \hline}
\tablehead{
    \multicolumn{2}{@{}l}{\em Table \ref{tab:1}, cont'd\strut}\\
    \hline
    \textbf{Column1} & \textbf{Column2} \\
    \hline}
\tabletail{\hline}
\tablelasttail{\hline}
\begin{xtabular}[b]{@{}p{0.2\textwidth}@{\hspace{0.01\textwidth}}p{0.79\textwidth}}
1st Row First Column  & \lipsum*[2]\\
2nd Row Second Column & \lipsum*[2]\\
3rd Row Third Column  & \lipsum*[2]\\
4th Row Fourth Column & \lipsum*[2]\\
5th Row Fourth Column & \lipsum*[2]\\
6th Row Fourth Column & \lipsum*[2]\\
7th Row Fourth Column & \lipsum*[2]\\
8th Row Fourth Column & \lipsum*[2]\\
\end{xtabular}
\twocolumn

\end{document}