[Tex/LaTex] Description list using package enumitem: how to force lowercase small caps and align body text

capitalizationdescriptionenumitemlistssmall-caps

I'm trying to format a description list with small caps for the labels and have the body text a standard distance from the left margin. When I use capitals in the labels (in the real list they are abbreviations and acronyms) and try to force lowercase and then small caps, I only get the first letter in small caps. Also, the "leftmargin" option seems only to apply if there is a second line (i.e., like a hanging indent). I'd like all the body text to be indented the same amount from the left margin, regardless of the size of the label.

\documentclass[11pt]{memoir}   
\usepackage{enumitem}   

\begin{document}   

\begin{description}[leftmargin=4cm,font=\normalfont\scshape\MakeLowercase]   
   \item[FIRST] My definition here   
   \item[NEXT] and another one   
   \item[AFTER] This is the third   
\end{description}   

\end{document}  

Best Answer

To change to lowercase case, you can use the before=... key of enumitem to redefine \makelabel in order to apply \MakeLowercase to the whole label text:

\newcommand{\descriptionmakelabel}[1]{\scshape\MakeLowercase{#1}}
\begin{description}[before=\renewcommand{\makelabel}{\descriptionmakelabel}]

To set the leftmargin automatically to the largest description label, you can use the package eqparbox which allows to make all boxes sharing a same label the same width (requires two compilations). You need of course to make the eqparbox label unique to a particular description, which may be done with a counter. Here's the full code with its result:

result of the code

\documentclass[11pt]{memoir}

\usepackage{enumitem}
\usepackage{eqparbox}

\newcounter{desc}
\newcommand{\descriptionmakelabel}[1]{\eqparbox{descnb\romannumeral\value{desc}}{\scshape\MakeLowercase{#1}\hfill}}

\begin{document}

\begin{description}[before=\refstepcounter{desc}\renewcommand{\makelabel}{\descriptionmakelabel},leftmargin=\eqboxwidth{descnb\romannumeral\numexpr\value{desc}+1\relax}]
   \item[FIRST] My definition here
   \item[NEXT] and another one   
   \item[AFTER] This is the third which is very very very very very very very very very very very very very long
\end{description}

\begin{description}[before=\refstepcounter{desc}\renewcommand{\makelabel}{\descriptionmakelabel},leftmargin=\eqboxwidth{descnb\romannumeral\numexpr\value{desc}+1\relax}]
   \item[A] a short text
   \item[B] a very very very very very very very very very very very very very very very very very very very very long text
\end{description}

\end{document}
Related Question