2

I want to make a label for enumerate that looks like this :

\documentclass{report}
\usepackage{enumitem}
\usepackage{graphicx}

\newlength{\exnormal}
\settoheight{\exnormal}{\scshape x}

\begin{document}

\begin{enumerate}
  \item[\bfseries(\resizebox{!}{\exnormal}{1})] First item
  \item[\bfseries(\resizebox{!}{\exnormal}{2})] Second item
  \item[\bfseries(\resizebox{!}{\exnormal}{3})] Third item
\end{enumerate}

\end{document}

Obviously putting label = \bfseries(\resizebox{!}{\exnormal}{\arabic*}) didn't work.

  • Are you trying to emulate lining numerals? – Alan Munn Aug 29 '19 at 01:57
  • @AlanMunn I just think a small numeral looks better. (I actually don't even know what lining numerals are.) Thanks for the answer! –  Aug 29 '19 at 04:23

2 Answers2

4

The value of label is a moving argument, so fragile commands need to be protected using \protect (warning p. 4 of the enumitem manual). Of course this warning isn't helpful if you don't know what it means. :) See What is the difference between Fragile and Robust commands? for some explanation.

\documentclass{report}
\usepackage{enumitem}
\usepackage{graphicx}

\newlength{\exnormal}
\settoheight{\exnormal}{\scshape x}

\begin{document}

\begin{enumerate}[label={\bfseries(\protect\resizebox{!}{\exnormal}{\arabic*})}]
  \item First item
  \item Second item
  \item Third item
\end{enumerate}

\end{document}

output of code

Alan Munn
  • 218,180
2

Maybe you'd be interested in enumerating with oldstyle numbers, which is easy with enumitem alone:

\documentclass{report}
\usepackage{enumitem,textcomp}

\begin{document}

\begin{enumerate}[label =(\oldstylenums{\arabic*}), font=\bfseries]
  \item First item
  \item Second item
  \item Third item
\end{enumerate}

\end{document} 

enter image description here

Bernard
  • 271,350