# Multicols and enumerate

I'm using multicols environment inside the enumerate one like this:

\begin{enumerate}
\begin{multicols}{2}

\item Se o $\tri ABC$ é isósceles de base $\ov{BC}$, determine $x$.
\begin{center}
\begin{minipage}{\linewidth}
\centering
\includegraphics[scale=1]{m5c4exf2}
\end{minipage}
\end{center}

\vspace{.5cm}

\item O triângulo $ABC$ é equilátero. Determine $x$ e $y$.
\begin{center}
\begin{minipage}{\linewidth}
\centering
\includegraphics[scale=1]{m5c4exf3}
\end{minipage}
\end{center}

\end{multicols}
\end{enumerate}


then I get this:

So there's a problem in the exercise number. How can I fix it?

Thanks :)

• Shouldn't multicols be outside and enumerate inside? Jul 6 '14 at 22:20
• But then all the exercises would be written in two columns and I don't wanna this. Just for some exercises. Jul 6 '14 at 22:21
• I wonder that this works at all, apart from the wrong number there
– user31729
Jul 6 '14 at 22:22
• \begin{center} \begin{minipage}{\linewidth} is just a strange way of adding vertical space, it doesn't centre anything as the inner minipage is \linewidth wide so center or flush left or right has no visible effect. Jul 6 '14 at 22:25
• You could increase \columnsep just before \begin{multicols}, by using something like \setlength\columnsep{30pt} Jul 6 '14 at 22:25

If you use enumitem you can get the correct numbering without nesting multicols inside enumerate. The idea is to use the series key provided by enumitem to tag the first occurrence of the enumerate environment. Subsequent instances then use resume to continue the numbering in sequence:

\documentclass{article}
\usepackage{enumitem,multicol}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{enumerate}[series=mine]
\item first item
\item second item
\end{enumerate}
\begin{multicols}{2}
\begin{enumerate}[resume*=mine]
\item third item
\item fourth item
\end{enumerate}
\end{multicols}
\begin{enumerate}[resume*=mine]
\item fifth item
\end{enumerate}
\end{document}


To make clear this also solves the spacing issue:

\documentclass{article}
\usepackage{enumitem,multicol}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{enumerate}[series=mine]
\item first item
\item second item
\end{enumerate}
\begin{multicols}{2}
\begin{enumerate}[resume=mine]
\item third item here is some text just to fill up the space, of course
\item fourth item here is some text just to fill up the space, of course
\end{enumerate}
\end{multicols}
\begin{enumerate}[resume=mine]
\item fifth item
\end{enumerate}
\end{document}


• I didn't know about it. Thank you so much for helping :) Jul 7 '14 at 0:11
• @mvfs314 You're welcome. I rely so heavily on enumitem that I sometimes forget it isn't part of LaTeX itself! (And it seemed perfect for this.)
– cfr
Jul 7 '14 at 2:17