0

I am using ntheorem and cleveref, and I want to reference enumerate environments inside theorems, like the following:

\documentclass{article}

\usepackage{ntheorem, cleveref, enumitem}

% Define theorem environments
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}

% Define new list environments for use in theorems
\newlist{enumthm}{enumerate}{1}
\setlist[enumthm]{label=\upshape(\arabic*), ref=\upshape\thetheorem(\arabic*)}
\crefalias{enumthmi}{theorem}

\newlist{enumprop}{enumerate}{1}
\setlist[enumprop]{label=\upshape(\arabic*), ref=\upshape\theproposition(\arabic*)}
\crefalias{enumpropi}{proposition}

\begin{document}

\begin{proposition}
    \begin{enumprop}
        \item First claim. This one is important. \label{important_claim}
        \item Second claim
    \end{enumprop}
\end{proposition}

The result follows from the important \cref{important_claim}.

\end{document}

However, what if I decide that this proposition should actually be a theorem? Then I would have to change both the proposition and enumprop environments to get the proper references.

Is there any way to create a list environment such that both the reference name ("theorem" or "proposition") as well as the counter are automatically determined by the environment in which the list is placed?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.