Sunday, December 9, 2012

Flexible inline enumerate

I was asked to produce an inline enumerate with more flexibility and i quite like the solution. Just include enumitem
\usepackage[inline]{enumitem}
and then define
 
\newenvironment{my_enum}[1]{\begin{enumerate*}[itemjoin={{; }}, itemjoin*={{; #1 }}]}{\end{enumerate*}}
\begin{my_enum}{as well as}
  \item foo
  \item bar
  \item baz
\end{my_enum}
.

No comments:

Post a Comment