Text FormattingAttempts to set enumitem label lead to errors.

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

Attempts to set enumitem label lead to errors.

Post by mado »

If I try to typeset

Code: Select all

\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}
\begin{enumerate*}[label=\arabic)]
\item ohai
\item yes
\end{enumerate*}
\end{document}
I see the following error:

Code: Select all

ERROR: Missing number, treated as zero.

--- TeX said ---
<to be read again> 
                   \c@) 
l.5 \item o
           hai
If I try the following code

Code: Select all

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}}[label=\emph{\alph*})]
\item ohai
\item yes
\end{enumerate}
\end{document}
I see the following error:

Code: Select all

ERROR: Missing number, treated as zero.

--- TeX said ---
<to be read again> 
                   \c@* 
l.4 \begin{enumerate}}[label=\emph{\alph*}
                                          )]
How can I fix the error? By the way, I installed texlive on manjaro linux.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Attempts to set enumitem label lead to errors.

Post by Stefan Kottwitz »

Hi Mado,

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

Code: Select all

\documentclass{article}
\usepackage[inline]{enumitem}
\begin{document}
\begin{enumerate*}[label=\arabic*)]
\item ohai
\item yes
\end{enumerate*}
\end{document}
Stefan
LaTeX.org admin
mado
Posts: 16
Joined: Thu Dec 10, 2015 5:55 am

Attempts to set enumitem label lead to errors.

Post by mado »

You're right. How could I miss *?
Post Reply