Customizing Inline Enumerate with Enumitem in LaTeX

enumitemlists

I have the latest version of the enumitem package and I'm trying to use different labels for enumerate lists which are set as normal lists and enumerate lists which are set inline. However, it doesn't seem to work (one customization overwrites the other), and I've already asked a question about this where it turned out to be due to a bug.

However, I still can't get it to work. I have the following MWE:

\documentclass{article}
\usepackage[inline]{enumitem}

\setlist[enumerate,1]{%
  label=\arabic*.,
}
\setlist*[enumerate,1]{%
  label=(\roman*),
}

\begin{document}

\begin{enumerate}
  \item item 1
  \item item 2
  \item item 3
\end{enumerate}

\begin{enumerate*}
  \item item 1
  \item item 2
  \item item 3
\end{enumerate*}

\end{document}

and what I get is:

enter image description here

Either I don't understand how to use the \setlist to get this to work, or the bug still remains. I can't figure out which.

Best Answer

Nothing can say it better than the manual.

The three inline lists have types enumerate*, itemize*, and description*, which are available always, even without the package option inline (which just defines three environments with these names).

The starred form \setlist* adds the settings to previous ones.

You should create a \newlist instead and there is no more need to put the inline option unless you want to use the predefined lists.

\documentclass{article}
\usepackage{enumitem}

\setlist[enumerate,1]{%
  label=\arabic*.,
}

\newlist{inlinelist}{enumerate*}{1}
\setlist*[inlinelist,1]{%
  label=(\roman*),
}

\begin{document}

\begin{enumerate}
  \item item 1
  \item item 2
  \item item 3
\end{enumerate}

\begin{inlinelist}
  \item item 1
  \item item 2
  \item item 3
\end{inlinelist}

\end{document}

enter image description here

Related Question