# How to enumerate in multicols with top alignment?

I am trying to gain space by using enumerate in multicolumns, but here the (v) is not top aligned.

Is there a way to do it so?

\begin{multicols}{2}
\begin{enumerate}[label=(\roman*)]
\item \lstinline{-1}
\item \lstinline{07}
\item \lstinline{-6}
\item \lstinline{0x22}
\item \lstinline{0b01110011}
\end{enumerate}
\end{multicols}


• Please add a full compileable code – AndréC Nov 2 '19 at 11:58
• Probably the starred version of multicols helps? – leandriis Nov 2 '19 at 12:09
• There's also the tasks, tablists or shortlstpackage for a horizontal numbering. – Bernard Nov 2 '19 at 13:26

Here are two different possibilites on how to achieve the desired alignment using either multicol or two minipages:

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

\begin{document}

\begin{multicols}{2}
\begin{enumerate}[label=(\roman*)]
\item \lstinline{-1}
\item \lstinline{07}
\item \lstinline{-6}
\item \lstinline{0x22}
\item \lstinline{0b01110011}
\item[\vspace{\fill}]
\end{enumerate}
\end{multicols}

\noindent
\begin{minipage}{0.5\textwidth}
\begin{enumerate}[label=(\roman*),series=mylist]
\item \lstinline{-1}
\item \lstinline{07}
\item \lstinline{-6}
\end{enumerate}
\end{minipage}%
\begin{minipage}{0.5\textwidth}
\begin{enumerate}[resume*=mylist]
\item \lstinline{0x22}
\item \lstinline{0b01110011}
\item[\vspace{\fill}]
\end{enumerate}
\end{minipage}
\end{document}


Multicol balances by default and 2 columns with 3 and 2 items will then give you that result if there is enough stretchable glue (and in such lists there is).

There are a lot of bells and whistles in multicol to prevent that the last column stretches based on the situation (so look at the documentation for that: texdoc multicol) or use \raggedcolumns or you could make sure that there is no stretch between the \items in which case the balancing would figure out that your intended design is really all that is sensible.

But on the whole the environment isn't made for producing such lists but doing more or less straight text so maybe other packages or approaches will get you faster to the desired result.