Удалить верхнее поле в многоколоночном \enumerate

Удалить верхнее поле в многоколоночном \enumerate

Я пытаюсь объединить среды multicols и enumerate (альтернативно, пакеты multicols и enumitem). По сути, я хочу избавиться от верхнего поля при наличии enumerate внутри multicol. Обычные настройки, как показано ниже, не работают. Спасибо!

Вот мой минимальный пример:

\documentclass{article}
\usepackage{enumitem}
\usepackage{multicol}

\begin{document}
I can get rid of the margin here:
\begin{enumerate}[topsep=0pt]
    \item a
    \item b
\end{enumerate}
\vspace{10pt}

but not here
\begin{multicols}{2}
\begin{enumerate}[topsep=0pt]
    \item a
    \item b
\end{enumerate}
\end{multicols}
\vspace{10pt}

and
\begin{multicols}{2}
[not even like so]
\begin{enumerate}[noitemsep,nolistsep,partopsep=-20pt,topsep=-20pt]
    \item a
    \item b
\end{enumerate}
\end{multicols}

\end{document}

и вот что получилось:

введите описание изображения здесь

решение1

Вы можете устранить это с помощью \setlength\multicolsep{0pt}:

введите описание изображения здесь

Код:

\documentclass{article}
\usepackage{enumitem}
\usepackage{multicol}


\begin{document}
I can get rid of the margin here:
\begin{enumerate}[topsep=0pt]
    \item a
    \item b
\end{enumerate}
\vspace{10pt}

and also here
{\setlength\multicolsep{0pt}%
\begin{multicols}{2}
\begin{enumerate}[topsep=0pt]
    \item a
    \item b
\end{enumerate}
\end{multicols}}
\vspace{10pt}

and
{\setlength\multicolsep{0pt}%
\begin{multicols}{2}
[also like so]
\begin{enumerate}[noitemsep,nolistsep,partopsep=-20pt,topsep=-20pt]
    \item a
    \item b
\end{enumerate}
\end{multicols}}

\end{document}

Связанный контент