0

I want to prevent added new-line after all items in enumerate.

My code:

\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}
  Start an enumeration:
  \begin{enumerate*}[label=(\arabic*),itemjoin=\\]
    \item[$(i)$] The first item
    \item[$(ii)$] Second item
    \item[$(iii)$] Third item
    \item[$(iv-vi)$] Fourth,fifth, and sixt item.
  \end{enumerate*}
\end{document}

generated output, by default all items have new-line at the end:

Start an enumeration: (i) The first item
(ii) Second item
(iii) Third item
(iv-vi) Fourth,fifth, and sixt item.

wanted output (no new line in between items.):

Start an enumeration: (i) The first item (ii) Second item (iii) Third item (iv-vi) Fourth,fifth, and sixt item.

1 Answer 1

1

Replace \itemjoin=\\ with \itemjoin=\quad (or any horizontal space you please), and everything works fine:

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

    \begin{document}

      Start an enumeration:
      \begin{enumerate*}[label=(\arabic*),itemjoin=\quad]
        \item[$(i)$] The first item
        \item[$(ii)$] Second item
        \item[$(iii)$] Third item
        \item[$(iv)$] Third item.
      \end{enumerate*}

    \end{document} 

enter image description here

8
  • 1
    Use $(iv$-$vi)$ instead
    – Bernard
    Aug 6 at 9:26
  • 1
    I was using \usepackage{enumitem} as well for other items (without new line) , when I try to use both I am having ! LaTeX Error: Option clash for package enumitem. error :-(
    – alper
    Aug 6 at 9:28
  • 1
    Could you post a minimal, yet complete code reproducing this problem?
    – Bernard
    Aug 6 at 9:32
  • 1
    Replacing \usepackage{enumitem} with \usepackage[inline]{enumitem} solved it
    – alper
    Aug 6 at 9:34
  • 1
    @Alper: Maybe try itemjoin=\ . If it's not enough, you might try itemjoin=\enspace.
    – Bernard
    Aug 6 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.