18

Why does the following generate an error?

\documentclass{article}

\usepackage{enumitem}
\begin{document}
 \begin{description}[label=\emph{\alph*})]
 \item [aaa] bbbb
 \item [eee] əəəə 
 \end{description}
\end{document}
Real Dreams
  • 8,298
  • 12
  • 56
  • 78

3 Answers3

21

Description lists don't admit a label in the sense of the label key of the enumitem package.

According to a comment to the original question, the purpose is to get description items numbered; in this case, you can use an enumerate environment (setting the label key appropriately to get the desired numbering) and a variant of \item to emulate the format of a description list; something along these lines

\documentclass{article}
\usepackage{enumitem}

\newcommand\litem[1]{\item{\bfseries#1.\space}}

\begin{document}

\begin{enumerate}[label=\emph{\alph*)}]
 \litem{Term one} First term description.
 \litem{Term two} Second term description.
\end{enumerate}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128
17

The \item of description lists must be formatted with enumitem's font key (or its format synonym). Its last command can take an argument, so here's how to add a closing parenthesis after the item name:

\documentclass{article}

\usepackage{enumitem}

\newcommand*{\textitplusparen}[1]{\textit{#1)}}

\begin{document}

\begin{description}[font=\normalfont\textitplusparen]
\item [Item name] Some text
\end{description}

\end{document}

enter image description here

lockstep
  • 250,273
12

You can even use \item, provided you do some juggling of the macros:

\documentclass{article}
\usepackage{enumitem}

\newcommand{\changeitem}{%
  \let\latexitem\item
  \renewcommand\item[1][]{\latexitem\relax{\bfseries##1} }%
}
\newenvironment{descenum}[1][]
  {\begin{enumerate}[before=\changeitem,#1]}
  {\end{enumerate}}

\begin{document}

\begin{descenum}
 \item[Term one] First term description.
 \item[Term two] Second term description.
\end{descenum}

\end{document}

The descenum environment accepts all kind of options good for enumerate (as provided by enumitem), for instance

\begin{descenum}[label=(\arabic*)]
 \item[Term one] First term description.
 \item[Term two] Second term description.
\end{descenum}
egreg
  • 1,121,712