4

Is there some easy way to append some code (or text) to appear directly after the label item, but before the text, in a description list using the enumitem package?

Here's an example below to show what I mean:

\documentclass{article}

\usepackage{enumitem}

\setlist[description]{%
   %appendtolabel=.,
}

\begin{document}
\begin{description}
  \item[First] bla bla blaa.
  \item[Second] bla bla blaa.
  \item[Third] bla bla blaa.
\end{description}
\end{document}

From this I would like to get:

First. bla bla blaa.
Second. bla bla blaa.
Third. bla bla blaa.
3

After carefully reading the documentation of enumitem, I realized that you can do this:

\documentclass{article}

\usepackage{enumitem}

% Typeset descriptions
\newcommand{\appendDot}[1]{#1.}
\setlist[description]{%
  font=\appendDot,
}

\begin{document}
\begin{description}
  \item[First] bla bla blaa.
  \item[Second] bla bla blaa.
  \item[Third] bla bla blaa.
\end{description}
\end{document}

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.