# Enumerate environment with tabular layout

I'm new to Latex. I'm familiar with the enumerate environment as well as the tabular environment, but I am trying to combine the two; that is to say, I want the items in the list to be broken up into several columns rather than one long column. Any tips?

-
Not sure I understand: It seems all you want is a table with an automated row counter? –  Peter Grill Sep 25 '11 at 22:11
Im not quite sure that I understand your question. Are you looking for something like the multenum package? –  Gonzalo Medina Sep 25 '11 at 22:11
Could you be interested in the shortlst package? –  Werner Sep 25 '11 at 22:13
At a glance, both multenum and shortlst seem to do what I'm looking for. I'm surprised a special package is needed for this. –  Isaac Kleinman Sep 25 '11 at 22:20
Don't be surprised. It's impossible for the LaTeX kernel to contain everything is needed for typesetting. Rather consider it a benefit of a system such as LaTeX; with others (and it should be clear which I'm referring to) you have to wait until the developers listen to requests and decide they're worthy an implementation. –  egreg Sep 25 '11 at 22:39

A little example with the multienum package:

\documentclass{article}
\usepackage{multienum}

\begin{document}

\begin{multienumerate}
\mitemxxxx{First}{Second}{Third}{Fourth}
\mitemxxxx{Fifth}{Sixth}{Seventh}{Eigth}
\end{multienumerate}

\end{document}


Since multienum internally uses a \hsize length set to \textwidth, the results obtained inside other environments (lists like enumerate, for example) might not be as expected. This can be fixed by setting \hsize to \linewidth. The following example illustrates the problem and the solution:

\documentclass{article}
\usepackage{multienum}

\begin{document}

\begin{enumerate}
\item First item with a standard \verb!multienumerate!:
\begin{multienumerate}
\mitemxxxx{First}{Second}{Third}{Fourth}
\mitemxxxx{Fifth}{Sixth}{Seventh}{Eigth}
\end{multienumerate}
\end{enumerate}

\begin{enumerate}
\setlength\hsize{\linewidth}
\item First item with a modified \verb!multienumerate!:
\begin{multienumerate}
\mitemxxxx{First}{Second}{Third}{Fourth}
\mitemxxxx{Fifth}{Sixth}{Seventh}{Eigth}
\end{multienumerate}
\end{enumerate}

\end{document}


-
multienum works nicely for me, but screws up when it's used as a sublist in a regular enumerate environment. Any advice for that? –  Isaac Kleinman Sep 26 '11 at 0:32
@Isaac Kleinman: please add to your question a minimal example code showing the undesired behaviour. –  Gonzalo Medina Sep 26 '11 at 0:51
@Isaac Kleinman: I think I understand what you meant (if not, then let me know). I've updated my answer with a new example. –  Gonzalo Medina Sep 26 '11 at 1:24
Yes, that's exactly what I meant. Great example. –  Isaac Kleinman Sep 26 '11 at 1:31

Are you possibly interested in typesetting enumerated material in a multicolumn setting? If so, the multicol package, which lets you switch from a single-column to, say, a 4-column layout (and back) on the fly, may be of interest.

The following MWE shows how it may be used (the "lipsum" package provides filler text). Note that the text in the enumerate environment will be "balanced" across columns, i.e., each item will not necessarily start in a new column.

\documentclass{article}
\usepackage{multicol,lipsum}
\usepackage[margin=0.75in]{geometry}
\begin{document}
\lipsum[1]
\begin{multicols}{4}
\begin{enumerate}
\item \lipsum[2]
\item \lipsum[3]
\item \lipsum[4]
\item \lipsum[5]
\end{enumerate}
\end{multicols}
\lipsum[6]
\end{document}

-

You can use the \newcolumntype from the array package to define a custom column (which numbers the columns). So if you want the column numbered just use the newly defined enumerated) E column type. Below, I defined the first column to be a normal right aligned column, but the others are the enumerated column types.

Also, I added \setcounter{MyCounter}{0} after row 2 to illustrate what you need to do if you want to start a new list on the following row.

\documentclass{article}
\usepackage{array}
\usepackage[inline]{enumitem}

\newcounter{MyCounter}%
\newcommand*{\rowNumber}{%
\refstepcounter{MyCounter}%
\theMyCounter.~%
}%

\newcolumntype{E}{>\rowNumber l}% enumerate column type

\begin{document}
\begin{tabular}{rEEEE}
first row& a & b & c\\
second row& d & e & f\\\setcounter{MyCounter}{0}
third row& g & h & i\\
\end{tabular}
\end{document}


If you prefer different label styles, you can customize the \theMyCounter.~% line.

-
Not really; I want the items in the list to be numbered. –  Isaac Kleinman Sep 25 '11 at 22:23
Ok, now that I understand better, I have updated the answer. –  Peter Grill Sep 25 '11 at 22:55