4

I want to implement both inline and vertical enumeration in my document. I know that inline enumeration can be achieved using inline option of enumitem package.

In addition, I found this question (second answer)in which a custom inline list environment is defined.

However, I do not fully understand how to define my own list environment in which the items are presented horizontally, without affecting the vertical behavior of the enumerate environment.

Let's say that I have:

\documentclass{article}

\usepackage[inline]{enumerate}

\begin{document}

\begin{enumerate}
\item Items will be presented vertically
\end{enumerate}

\begin{enumerate}[inline,label=(\roman*)]
\item Items will be presented horizontially
\end{enumerate}

\end{document}
Benjamin
  • 4,781
Yorgos
  • 2,694
  • You are not loading enumitem, also with enumitem inline listed are labeled with a *, please see the manual – daleif Feb 23 '16 at 15:16

1 Answers1

8

As @daleif already mentioned in the comment if you load the enumitem package with the inline option the starred versions of the environments itemize, enumerate and description are defined. You can then use these to get a horizontal enumeration.

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

\begin{document}

\begin{enumerate}
\item Items will be presented vertically
\item Items will be presented vertically
\end{enumerate}

\begin{enumerate*}[label=(\roman*)]
\item Items will be presented horizontially
\item Items will be presented horizontially
\end{enumerate*}

\end{document}

Output:

enumitem

Benjamin
  • 4,781