2

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}

The code's output.

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

2

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

enter image description here

\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}
|improve this answer|||||
  • 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
  • 1
    @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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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