# Preventing item break inside a multicols environment

I have the following code, which consists of an enumerate environment inside a multicol environment.

\documentclass[12pt]{article}

\usepackage{enumitem}
\usepackage{multicol}

\begin{document}

\begin{enumerate}

\item Examples set 1.

\begin{multicols}{2}
\begin{enumerate}
\item Example 2.

\item Example 1

Multiple paragraphs

and another paragraph.

\item Example 3.
\item Example 4.

\end{enumerate}
\end{multicols}
\end{enumerate}

\end{document}


How can one prevent the second item of the second level being broken into two columns?

You could enclose the \item that you don't want to be split in two columns into a minipage environment:

\documentclass[12pt]{article}

\usepackage{enumitem}
\usepackage{multicol}

\begin{document}

\begin{enumerate}

\item Examples set 1.

\begin{multicols}{2}
\begin{enumerate}
\item Example 2.

\item \begin{minipage}{\linewidth} Example 1

Multiple paragraphs

and another paragraph.
\end{minipage}
\item Example 3.
\item Example 4.

\end{enumerate}
\end{multicols}
\end{enumerate}

\end{document}

• It works, but the output may look not so nice. For instance, please add the following code to the first item of the second level: \begin{tabular}{|c|c|} \hline 1 & 2\tabularnewline \hline 3 & 4\tabularnewline \hline \end{tabular} (the table to be placed in the second paragraph of the respective item) and see the result. – Paul Smith May 1 '19 at 11:47
• @PaulSmith: Adding \item[\vspace{\fill}] as the last item will result in the following output: i.stack.imgur.com/Yhuic.png – leandriis May 1 '19 at 12:24