Here are two ways to do this. The simplest is to use the multicol
package, and a regular enumeration, but this will end up with the numbering of the items by column rather than by row. If this is acceptable, then it's by far the easiest solution. To deal with referencing, you can add labels to any item as normal.
A more klunky solution is to create an enumerated table environment. This is what I've done in the second example. I've used the array
package to create a new column type T
which is actually two columns, one to contain the enumeration and the other to contain the content. To make the syntax similar to an enumeration, I've redefined \item
within that environment, but you still need to add &
and \\
at the end of each item as in a regular table.
The tabularlist
environment takes one argument for the cell label prefix, and then a regular tabular specification in terms of the T
column.
The length passed to the T
column type corresponds to the proportion of the \linewidth
the column should take up. For a three column table, this should be set to .27
; for a two column table it should be set to about .45
.
The cell label prefix sets up an automatic label for every cell, to handle the referencing issue. In the example document I have used the following form:
\begin{tabularlist}{TAB1}{T{.27}T{.27}T{.27}}
This sets up a label for each cell in the table that is of the form \label{TAB1:<cell number>}
, so if you want to refer to Cell 5, you would simply use \ref{TAB1:5}
in the reference text.
I've also added a user-settable length \tblenumlabelspace
for the spacing between the enumeration label and the content.
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{multicol}
\usepackage{array}
\usepackage{etoolbox}
\newenvironment{tabularlist}[1]{%
\preto{\tabular}{\renewcommand{\item}{\label{#1:\thetblenum} &} \setcounter{tblenum}{0}}
\setlength{\extrarowheight}{.5\baselineskip}
\begin{tabular}}
{\end{tabular}}
\newcounter{tblenum}
\newlength{\tblenumlabelspace}
\setlength{\tblenumlabelspace}{.75em}
\newcolumntype{T}[1]{@{}>{\refstepcounter{tblenum}\thetblenum.}
r@{\hspace{\tblenumlabelspace}}p{#1\linewidth}}
\begin{document}
\begin{multicols}{3}
\begin{enumerate}
\item First item is long and will wrap.
\item Second item
\item Third item
\item Fourth item
\item Fifth item
\item Sixth item
\item Seventh item
\item Eighth item
\item Ninth item
\item Tenth item
\item Eleventh item
\item Twelfth item
\item Thirteenth item
\item Fourteenth item
\item Fifteenth item
\end{enumerate}
\end{multicols}
\noindent
\begin{tabularlist}{TAB1}{T{.27}T{.27}T{.27}}
\item First item that is quite long and will wrap. &
\item Second item &
\item Third item\\
\item Fourth item &
\item Fifth item &
\item Sixth item\\
\item Seventh item &
\item Eighth item &
\item Ninth item\\
\item Tenth item &
\item Eleventh item &
\item Twelfth item \\
\item Thirteenth item &
\item Fourteenth item &
\item Fifteenth item
\end{tabularlist}
\bigskip
In Item \ref{TAB1:5} we can see \ldots.
\end{document}
tabular
instead ofenumerate
suffice, or is there a reason it has to be input as an enumeration?