# Multicolumn list with same number of items in each column

I want to make a multicolumn list with the same number of items in each column. I tried this with multicols, but some items have bigger heights than others so I got a column of 5 and a column of 3:

\documentclass{article}
\usepackage{multicol}
\usepackage{amsmath}
\begin{document}
\begin{multicols}{2}
\begin{enumerate}
\item $1$
\item $2$
\item $3$
\item $4$
\item $5$
\item $\cfrac{1}{4}$
\item $\cfrac{1}{5}$
\item $\cfrac{1}{6}$
\end{enumerate}
\end{multicols}
\end{document}


Is there a simple way to get the same number of items in each column?

• Add \vphantom{\cfrac14} -> \item $1\vphantom{\cfrac14}$, etc. – karlkoeller Sep 14 '13 at 16:05
• The \cfrac command -- generally used for typesetting continued fractions -- inserts even more vertical space than \dfrac ("display style \frac") does. This choice contributes to making the lines look rather unbalanced. Could you live with using \tfrac ("text style \frac") throughout? – Mico Sep 14 '13 at 16:08
• @karlkoeller That works for this, but I'd like something more automatic. Especially if I have several different item heights, this would be cumbersome, and might need to be redone entirely if I decide on 3 columns instead of 2 – Chris Chudzicki Sep 14 '13 at 16:09
• @Mico: This was my MWE. I really don't care about fractions. My list might have single numbers, matrices, integrals . . . anything of different heights – Chris Chudzicki Sep 14 '13 at 16:11

I would create my own environment, say myenumerate, which inserts a strut with each \item to some predefined height and depth so it accommodates for the largest item. I've hardcoded it below to have a depth of 1\baselineskip and span 3\baselineskip (effectively 2\baselineskip above the baseline):

\documentclass{article}
\usepackage{multicol,amsmath}% http://ctan.org/pkg/{multicol,amsmath,etoolbox}
\newenvironment{myenumerate}
{\enumerate% Regular enumerate environment
\def\makelabel##1{\hss\llap{##1}\rule[-\baselineskip]{0pt}{3\baselineskip}}}
{\endenumerate}
\begin{document}
\begin{multicols}{2}
\begin{myenumerate}
\item $1$
\item $2$
\item $3$
\item $4$
\item $5$
\item $\dfrac{1}{4}$
\item $\dfrac{1}{5}$
\item $\dfrac{1}{6}$
\end{myenumerate}
\end{multicols}
\end{document}


The strut is inserted through a (local) redefinition of \makelabel - the macro responsible for setting the actual label formatting.

Another option is the tasks package that I just learned about.

The package has the side effect that numbering increments horizontally rather than vertically, but that's fine with me. Also there are some limitations, like tasks environment can't be nested (but can contain itemize and other normal lists). I'm OK with both of those facts.

\documentclass{article}
\usepackage{multicol}

\everymath{\displaystyle}

\begin{document}
\task $1$
\task $2$
\task $3$
\task $\frac{1}{4}$
\task $5$
\task $\frac{1}{5}$
\task $4$
\task $\frac{1}{6}$