I'm trying to create a pretty long table in an elsarticle.cls
with a two column layout. However, I haven't been able to find a suitable option to break my table so it can fit on a single page and using the two column setting. I provide this example:
\documentclass[5p]{elsarticle}
\usepackage{array}
\usepackage{booktabs}
\usepackage{float}
\usepackage{ragged2e}
\newcommand{\Title}[1]{\justifying\caption{#1}}
\newcommand{\Source}[1]{\caption*{\justifying\textbf{Source:} #1}}
\newcommand{\Note}[1]{\caption*{\justifying\textbf{Note:} #1}}
\begin{document}
%----------------------------------
\begin{frontmatter}
\title{Two column tables in elsarticle document class}
\author{A. J. Lee}
\begin{abstract}
This document asks how to break tables in two column documents.
\end{abstract}
\end{frontmatter}
%----------------------------------
\section{Introduction}
See table
\begin{table}[H]
\centering
\begin{tabular}{p{1cm} p{1cm} p{5cm}}
% Header
\toprule
\textbf{Item} &
\textbf{Code} &
% Content
\textbf{Description} \\
\midrule
% Content
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
A & 777 & Some random stuff \\
\bottomrule
\end{tabular}
\Title{Table}
\Source{Own creation}
\Note{This is an example}
\end{table}
Since this is a two column layout I can't use the longtable
package. Also, I haven't used the supertabular
package since I have created some new commands: \Title
, \Source
and \Note
, and there is no place (I guess) for them within the supertabular
options and maitaining the same appearance.
This is my pdf outcome:
Best Answer
You could achieve a similar result using the
supertabular
package: