2

I would like the word "item" to be changed to "postulate" in a specific enumerate environment, leaving it unchanged for other environments later in the document. Commands \crefname and \Crefname, available through cleveref, only do this globally. (I am also using enumitem.)

Specifically, I would like the last line of

\begin{enumerate}[label=\textbf{\arabic*.}, ref=\textbf{\arabic*}]
 \item\label{1} Blah
 \item\label{2} Blah
 \item\label{3} Blah
\end{enumerate}

See \cref{2,3}.

to render as "See postulates 2 and 3." How do I do that?

2 Answers 2

3

You can make use of the \crefalias macro and cleveref's ability to provide an optional argument to \label to achieve your formatting objectives.

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{enumitem}
\usepackage{cleveref}

% Create an alias for 'item' (of enumi level):
\crefalias{postulate}{enumi}
\crefname{postulate}{postulate}{postulates}
\Crefname{postulate}{Postulate}{Postulates}

\begin{document}
\begin{enumerate}[label=\textbf{\arabic*.}, 
                  ref=\arabic*]
   \item\label[postulate]{1} Blah % note use of optional argument of \label
   \item\label[postulate]{2} Blah % ditto
   \item\label[postulate]{3} Blah % ditto
\end{enumerate}
See \cref{2,3}.
\end{document}
3

I suggest defining a new enumerate-like environment, with cross-references appropriately defined for cleverref. Note that if you have a cleveref.cfg file, you have to put the definitions in this file.

\documentclass[11pt]{article}
\usepackage{enumitem}
\usepackage{cleveref} 

\newlist{postulates}{enumerate}{1}
\setlist[postulates]{label = \arabic*, font = \bfseries}

\crefname{postulatesi}{postulate}{postulates}
\Crefname{postulatesi}{Postulate}{Postulates}

\begin{document}

\begin{postulates}
 \item\label{1} Blah. 
 \item\label{2} Blah blah. 
 \item\label{3} Blah blah blah. 
\end{postulates}

See \cref{2,3}. \Cref{1} instead, perhaps. 

\end{document} 

enter image description here

You must log in to answer this question.

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