2

Consider this example:

\documentclass{report}
\begin{document}
\begin{description}
\item[it 1] description 1
\item[ittt 2] description 2
\end{description}
\end{document}

which renders:

enter image description here

Is there a way to tail automatically "it 1" and "ittt 2" with a dot?

1 Answer 1

3

The command \descriptionlabel controls the format of the description label. Its default definition, which you can find in ll. 438-439 of report.cls, is

\newcommand*\descriptionlabel[1]{\hspace\labelsep
                                \normalfont\bfseries #1}

You can include a period and make it read

\renewcommand*\descriptionlabel[1]{\hspace\labelsep
                                   \normalfont\bfseries #1.}

**it 1.** description 1//**ittt 2.** description 2


If applied in the preamble this change is global and affects all description environments. If you want to change only one environment you can keep the redefinition local with grouping

\begingroup
\renewcommand*\descriptionlabel[1]{%
  \hspace\labelsep
  \normalfont\bfseries #1.}
\begin{description}
\item[it 1] description 1
\item[ittt 2] description 2
\end{description}
\endgroup

If you are using enumitem something like

\newcommand*\dotteddescriptionlabel[1]{%
  \normalfont\bfseries #1.}

in the preamble and then

\begin{description}[format=\dotteddescriptionlabel]
\item[it 1] description 1
\item[ittt 2] description 2
\end{description}

would also work since format may take an argument. Indeed

\newcommand*\dotteddescriptionlabel[1]{#1.}

would have been enough since the remaining format settings are inherited from the standard \dotteddescriptionlabel.

2
  • 1
    +1, but it might be useful to note that this changes all description environments to have a period after the label.
    – egreg
    Apr 7, 2019 at 11:26
  • @egreg Indeed, added a short comment about that. Thanks for the hint.
    – moewe
    Apr 7, 2019 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .