Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to get the numbering in the multienumerate environment to go vertically instead of horizontally. So,

\documentclass{article}

\usepackage{multienum}

\begin{document}

\begin{multienumerate}
    \mitemxx{item 1}{item 4}
    \mitemxx{item 2}{item 5}
    \mitemxx{item 3}{item 6}
\end{multienumerate}

\end{document}

Is there an obvious way to do this? I've tried a number of different ways of getting an enumerated list into a tabular environment with the item numbers aligned, to no avail so far. Thanks for any help.

share|improve this question

2 Answers

up vote 11 down vote accepted

Hardly dare to disagree with @egreg, but multienum can do this if you help it by telling it how many entries are in the column (which it could do automatically on a second pass, but here I provide an argument to do that)

\documentclass{article}

\usepackage{multienum}

\def\vmultienumerate#1{% number of entries in the column
 \setcounter{multienumi}{-#1}%
 \addtocounter{multienumi}{1}%
\renewcommand\labelenumi
{\ifnum\value{multienumi}>#1
 \addtocounter{multienumi}{-#1}%
 \addtocounter{multienumi}{1}%
\else
 \addtocounter{multienumi}{#1}%
\fi
  \arabic{multienumi}.}
}

\begin{document}

\begin{multienumerate}\vmultienumerate{3}
    \mitemxx{item 1}{item 4}
    \mitemxx{item 2}{item 5}
    \mitemxx{item 3}{item 6}
\end{multienumerate}

\end{document}
share|improve this answer
Very nice trick! – egreg Feb 26 '12 at 0:05
Perfect! Thanks. – rar Feb 26 '12 at 0:12

It's impossible for multienum to do what you want, as it doesn't know in advance how many items you've got. Use multicol:

\documentclass{article}

\usepackage{multicol}

\begin{document}

\begin{multicols}{2}
\begin{enumerate}
\item item 1
\item item 2
\item item 3
\item item 4
\item item 5
\item item 6
\end{enumerate}
\end{multicols}

\end{document}
share|improve this answer
Hi, I tried this. The problem is that it is not aligning the numbered items on each row. Each numbered item is a formula of varying vertical heights, and using multicol is causing the item numbers to not line up with each other. Of course, I may be missing something with the multicol environment... Sorry, should have added to my sample code enough information to make this clear. – rar Feb 25 '12 at 23:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.