
Das Problem besteht darin, dass beim Teilen der Nummerierung der \cref
Name nicht angezeigt werden kann, auch \crefname
nicht bei „ \autoref
alle Namen anzeigen“ Equation
.
Hier ist ein 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}
Wie kann ich es lösen?
Antwort1
Wenn man cleveref
die Namen der theoremartigen Umgebungen richtig aufgreifen will, \newtheorem
müssen die Deklarationen erfolgenVor, nicht nach der \begin{document}
Aussage. Das ist was@leandriishabe ich versucht, es Ihnen in den Kommentaren zu sagen.
\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}