Split itemize into multiple columns
Since you want multiple columns, you should use the multicol
package:
Code:
\documentclass{article}
\usepackage{multicol}
\begin{document}
Two columns:
\begin{multicols}{2}
\begin{itemize}
\item item 1
\item item 2
\item item 3
\item item 4
\item item 5
\item item 6
\end{itemize}
\end{multicols}
Three columns:
\begin{multicols}{3}
\begin{itemize}
\item item 1
\item item 2
\item item 3
\item item 4
\item item 5
\item item 6
\end{itemize}
\end{multicols}
\end{document}
Here is some code that does the automatic column adjust thing, I used the code found in "count and use the number of items in advance" to help me.
\documentclass{article}
\usepackage{etoolbox,refcount}
\usepackage{multicol}
\newcounter{countitems}
\newcounter{nextitemizecount}
\newcommand{\setupcountitems}{%
\stepcounter{nextitemizecount}%
\setcounter{countitems}{0}%
\preto\item{\stepcounter{countitems}}%
}
\makeatletter
\newcommand{\computecountitems}{%
\edef\@currentlabel{\number\c@countitems}%
\label{countitems@\number\numexpr\value{nextitemizecount}-1\relax}%
}
\newcommand{\nextitemizecount}{%
\getrefnumber{countitems@\number\c@nextitemizecount}%
}
\newcommand{\previtemizecount}{%
\getrefnumber{countitems@\number\numexpr\value{nextitemizecount}-1\relax}%
}
\makeatother
\newenvironment{AutoMultiColItemize}{%
\ifnumcomp{\nextitemizecount}{>}{3}{\begin{multicols}{2}}{}%
\setupcountitems\begin{itemize}}%
{\end{itemize}%
\unskip\computecountitems\ifnumcomp{\previtemizecount}{>}{3}{\end{multicols}}{}}
\begin{document}
\begin{itemize}
\item Here are two columns
\begin{AutoMultiColItemize}
\item Item 1
\item Item 2
\item Item 3
\item Item 4
\item Item 5
\item Item 6
\end{AutoMultiColItemize}
\item AutoMultiColItemize can be nested in an itemize
\item Or it does not have to be.
\item Normal itemize, like this one, are still single column.
\end{itemize}
Here is one column
\begin{AutoMultiColItemize}
\item Item 1
\item Item 2
\item Item 3
\end{AutoMultiColItemize}
\end{document}
Here is what it looks like:
Use multicol
. If your items do not divide evenly into each column, add \item[\vspace{\fill}]
to the end of your list to align the items.
The multicol
package solution from AboAmmar works well if your enumerate items can be divided evenly into each column.
However, spacing between items can become inconsistent if each column does not hold an equal number of items. For example, dividing 7 items between 2 columns:
One can fix this easily by adding an 'empty' item at the end of the list as padding.
\item[\vspace{\fill}]
Which produces the following nicely aligned multi-columned enumerate list:
\documentclass[preview]{standalone}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
\begin{enumerate}
\item one \item two \item three \item four
\item five \item six \item seven \item[\vspace{\fill}]
\end{enumerate}
\end{multicols}
\end{document}