LaTeX forum ⇒ Text FormattingAttempts to set enumitem label lead to errors. Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
mado
Posts: 16
Joined: Thu Dec 10, 2015 5:55 am

Attempts to set enumitem label lead to errors.

Postby mado » Mon May 02, 2016 10:46 am

If I try to typeset

  1. \documentclass{article}
  2. \usepackage[inline]{enumitem}
  3. \begin{document}
  4. \begin{enumerate*}[label=\arabic)]
  5. \item ohai
  6. \item yes
  7. \end{enumerate*}
  8. \end{document}


I see the following error:

  1. ERROR: Missing number, treated as zero.
  2.  
  3. --- TeX said ---
  4. <to be read again>
  5. \c@)
  6. l.5 \item o
  7. hai


If I try the following code

  1. \documentclass{article}
  2. \usepackage{enumitem}
  3. \begin{document}
  4. \begin{enumerate}}[label=\emph{\alph*})]
  5. \item ohai
  6. \item yes
  7. \end{enumerate}
  8. \end{document}


I see the following error:

  1. ERROR: Missing number, treated as zero.
  2.  
  3. --- TeX said ---
  4. <to be read again>
  5. \c@*
  6. l.4 \begin{enumerate}}[label=\emph{\alph*}
  7. )]


How can I fix the error? By the way, I installed texlive on manjaro linux.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9522
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon May 02, 2016 10:59 am

Hi Mado,

I think you need to add a star. Use \arabic*:

  1. \documentclass{article}
  2. \usepackage[inline]{enumitem}
  3. \begin{document}
  4. \begin{enumerate*}[label=\arabic*)]
  5. \item ohai
  6. \item yes
  7. \end{enumerate*}
  8. \end{document}


Stefan
Site admin

mado
Posts: 16
Joined: Thu Dec 10, 2015 5:55 am

Postby mado » Mon May 02, 2016 11:01 am

You're right. How could I miss *?


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 3 guests