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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
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