Within theorems, I have nested enumeration lists:
1.1, 1.2, 1.3, 1.4, etc.
2.1, 2.2, 2.3, 2.4, etc.
For referencing to
1.1 to 1.3 and 2.4
I tried to use the usual command \cref{en1-1,en1-2,en1-3,en2-4}
. However, it does not work correctly since it ignores the first level of numbering and thus yields the wrong result
1.1 to 2.4
Is there way to fix that so that higher levels of numbering are considered as well?
I am looking for an automated solution and not the manual workaround \cref{en1-1,en1-2,en1-3} and \cref{en2-4}
.
Here is an MWE:
\documentclass[12pt]{article}
\usepackage{enumitem}
\usepackage{cleveref}
\parindent0pt
\newtheorem{Theorem}{Theorem}
\setlist[1]{leftmargin=*, labelsep=10pt, itemsep=1pt, label=\theTheorem.\arabic*, align=parleft}
\begin{document}
\begin{Theorem}
This is the first Theorem.
\end{Theorem}
\begin{enumerate}
\item \label{en:1-1} This is item 1.1
\item \label{en:1-2} This is item 1.2
\item \label{en:1-3} This is item 1.3
\item \label{en:1-4} This is item 1.4
\end{enumerate}
\begin{Theorem}
This is the second Theorem.
\end{Theorem}
\begin{enumerate}
\item \label{en:2-1} This is item 2.1
\item \label{en:2-2} This is item 2.2
\item \label{en:2-3} This is item 2.3
\item \label{en:2-4} This is item 2.4
\end{enumerate}
The references to \cref{en:1-1,en:1-2,en:1-3,en:2-4} go wrong.
The references to \cref{en:1-2,en:1-3,en:1-4,,en:2-1} are even more strange.
\end{document}
\label[thoerem]{...}
in my MWE then only "items" is replaced by "theorems", but it still references to "1.1 to 2.4" instead of "1.1 to 1.3 and 2.4"and
instead ofto
.\cref{en:1-2,en:1-3,en:1-4,,en:2-1}
, the result is still wrong and rather strange (see edited MWE).