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?

1 Answer 1

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}
2
  • 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.
    – PaulS
    May 1, 2019 at 11:47
  • 2
    @PaulSmith: Adding \item[\vspace{\fill}] as the last item will result in the following output: i.stack.imgur.com/Yhuic.png
    – leandriis
    May 1, 2019 at 12:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .