Problema de referência cruzada se o contador de ambientes semelhantes a teoremas for compartilhado

Problema de referência cruzada se o contador de ambientes semelhantes a teoremas for compartilhado

O problema é quando compartilho a numeração e \crefnão consigo mostrar o nome, mesmo por \crefnamee \autorefmostrar todos os nomes Equation.

Aqui está um MWE:

%&latex
\documentclass{amsart}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If you want to insert other packages. Insert them here
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage[nameinlink]{cleveref}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\numberwithin{equation}{section}

\newtheorem{The}[equation]{Theorem}
\crefname{The}{Theorem}{Theorems}

\newtheorem{Dfn}[equation]{Definition}
\newtheorem{Lem}[equation]{Lemma}
\newtheorem{Prs}[equation]{Proposition}
\newtheorem{Crl}[equation]{Corollary}
\newtheorem{Rmk}[equation]{Remark}

\begin{The}\label{T1}
   Assume ...
\end{The}

...
\begin{Dfn}\label{D1}
   Assume ...
\end{Dfn}

...
\begin{Lem}\label{L1}
   Assume ...
\end{Lem}

...
\begin{Prs}\label{P1}
   Assume ...
\end{Prs}

...
\begin{Crl}\label{C1}
   Assume ...
\end{Crl}

...
\begin{Rmk}\label{R1}
   Assume ...
\end{Rmk}

\begin{equation}\label{E1}
   Assume ... \bigskip
\end{equation}

\noindent
\cref{T1} \\
\cref{D1} \\
\cref{L1} \\
\cref{P1} \\
\cref{C1} \\
\cref{R1} \\
\cref{E1} \\

\noindent
\autoref{T1} \\
\autoref{D1} \\
\autoref{L1} \\
\autoref{P1} \\
\autoref{C1} \\
\autoref{R1} \\
\autoref{E1} \\

\end{document}

Aqui está a foto do resultado

Como posso resolver isso?

Responder1

Se você quiser cleverefescolher corretamente os nomes dos ambientes semelhantes a teoremas, as \newtheoremdeclarações devem ocorrerantes, não depois, a \begin{document}declaração. Isso é o que@leandriisestava tentando te dizer nos comentários.

insira a descrição da imagem aqui

\documentclass{amsart}
%\usepackage{amsthm} % is loaded automatically by 'amsart' class
\usepackage[colorlinks]{hyperref}
\usepackage[nameinlink]{cleveref}

\numberwithin{equation}{section}
\newtheorem{The}[equation]{Theorem}
\newtheorem{Dfn}[equation]{Definition}
\newtheorem{Lem}[equation]{Lemma}
\newtheorem{Prs}[equation]{Proposition}
\newtheorem{Crl}[equation]{Corollary}
\newtheorem{Rmk}[equation]{Remark}

\begin{document}
\setcounter{section}{2} % just for this example

\begin{The}\label{T1} Assume \dots \end{The}
\begin{Dfn}\label{D1} Assume \dots \end{Dfn}
\begin{Lem}\label{L1} Assume \dots \end{Lem}
\begin{Prs}\label{P1} Assume \dots \end{Prs}
\begin{Crl}\label{C1} Assume \dots \end{Crl}
\begin{Rmk}\label{R1} Assume \dots \end{Rmk}
\begin{equation}\label{E1} 1+1=2 \end{equation}

\bigskip\noindent
\cref{T1,D1,L1,P1,C1,R1,E1}
\end{document}

informação relacionada