# How can I get cleveref / enumitem to print, not 'item (e)', but 'Proposition 1 (e)'?

I currently make use of enumitem and cleveref to show references to theorems. Sometimes, I want to reference a point in a list inside of a theorem. It should show [Name of theorem type, e.g. Propsiton] [Number] [number inside list], but it shows item [number inside list]

How can I get this?

## MWE

\documentclass[a4paper]{scrartcl}
\usepackage{amssymb, amsmath} % needed for math
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
\usepackage{enumitem}
\usepackage[framed,amsmath,thmmarks,hyperref]{ntheorem}
\usepackage{framed}
\usepackage[german,nameinlink]{cleveref}
\newframedtheorem{satz}{Satz}[section]
\newframedtheorem{proposition}[satz]{Proposition}
\crefname{proposition}{Proposition}{Propositionen}
\begin{document}
\section{adfa}
adsfasdfasdf asdf asdf asd fasdfasd asd fasdf asdf
asdfasdfa sasdfas dfasdf asdf

\begin{proposition}\leavevmode
\begin{enumerate}[label=\alph*), ref=\theenumi{} (\alph*)]
\item asdfasdf asdf asdf sdf
\item  sdfas dasdfasd fasdf asdf asdf
\item asdfasd asdf asdf sad f
\item \label{prop:15.2d} a fa ssd fas df
\item \label{prop:15.2e} sdf asd asdf sad f
\end{enumerate}
\end{proposition}

As shown in \cref{prop:15.2d} ...
\end{document}


## Rendered

"Punkt" is German for "item".

-

## 1 Answer

In addition to (a) instructing LaTeX to prepend the proposition number to the level-one item number when creating cross-references, say, via an instruction such as

\begin{enumerate}[label=\alph*), ref=\theproposition~(\alph*)]


when starting the enumerated list, you also need to (b) use the \crefalias command to inform cleveref that entities of type enumi (first-level enumerated items) should be referred to as propositions; by default, cleveref will refer to them as items (or "Punkte" in German):

\crefalias{enumi}{proposition}


If the only instances of enumerated lists in your document are inside proposition environments, these are the only two modifications you should need to make in order to achieve your cross-referencing objective. However, this simple solution is probably too far-reaching since it applies to all cross-references to enumi entities, not just those contained inside proposition environments.

Fortunately, the enumitem package provides a convenient method for creating new enumerated lists with associated dedicated counters. For instance, you could add the instructions

\newlist{propenum}{enumerate}{1} % also creates a counter called 'propenumi'
\setlist[propenum]{label=\alph*), ref=\theproposition~(\alph*)}
\crefalias{propenumi}{proposition}


in the preamble, after enumitem and cleveref have been loaded. Then, use the propenum environment to create enumerated lists inside proposition environments:

\begin{proposition}\leavevmode
\begin{propenum} % use 'propenum', not 'enumerate'
\item asdfasdf asdf asdf sdf
\item  sdfas dasdfasd fasdf asdf asdf
\item asdfasd asdf asdf sad f
\item \label{prop:15.2d} a fa ssd fas df
\item \label{prop:15.2e} sdf asd asdf sad f
\end{propenum}
\end{proposition}


With this setup, the instruction

As shown in \cref{prop:15.2d} \dots


will generate this output:

\cref-based cross-references to "ordinary" level-one enumerate-environments items will continue to show up as "Punkt xx" (or as "item xx" if the german language options aren't set...).

Addendum: In your follow-up comments you mention that you'd like to embed these cross-references inside math mode and would like to avoid seing the string "Proposition" (or "Propositionen") be rendered in math-italic mode -- without having to encase the \cref instructions in explicit \text or \textup commands. To achieve this additional objective, you could provide the following commands in the preamble:

\crefname{proposition}{\textup{Proposition}}{\textup{Propositionen}}
\setlist[propenum]{label=\alph*), ref=\textup{\theproposition~(\alph*)}}

-
I've deleted my answer- in my early tests I thought it was babel giving the Punk't word (I didn't know if this was German for Proposition). Anyway, +1 :) –  cmhughes Jan 26 '14 at 19:14
Thanks for your answer! When I use $\xRightarrow{\cref{prop:15.2d}}$ it will make the text italic. Should I use it like $\xRightarrow{\text{\cref{prop:15.2d}}}$ or is there a possiblity to get it automatically always in text mode? –  moose Jan 26 '14 at 19:54
I'd try ref=\textup{\theproposition~(\alph*)} (in the definition of the propenum environment) first. –  Mico Jan 26 '14 at 20:02
\textup does not work. –  moose Jan 26 '14 at 21:12
@moose - By "does not work", do you mean that the string "Proposition" is set in math-italics? If so, I guess you could also write \crefname{proposition}{\textup{Proposition}}{\textup{Propositionen}} to force these strings to be set in upright roman mode. If you have two arguments in the \cref instruction while in math mode, you may also need \renewcommand\crefpairconjunction{\textup{ und}}. And, if you have multiple \cref arguments, you will also need to redefine \crefmiddleconjunction and \creflastconjuntion... –  Mico Jan 26 '14 at 21:28