
나는 사용했다
\newtheorem{definition}{Definition}[section]
\newtheorem{proposition}[definition]{Proposition}
그래서 명제와 정의가 "동일한 대상"인 것처럼 번호 매기기가 계속됩니다. 하지만 문제는 \cref{...some proposition name...}을 사용하면 출력이 "proposition 2.7"이 아니라 "definition 2.7"이 된다는 것입니다.
이 문제를 어떻게 해결할 수 있나요?
답변1
다음은 p에서 발췌한 내용입니다. 패키지 사용자 가이드 25 cleveref
[노란색 강조 표시 추가]:
패키지 를 사용한다고 가정하면 amsthm
다음 코드를 사용하여 상호 참조 목표를 달성할 수 있습니다.
\documentclass{article} % or some other suitable document class
\usepackage{amsthm}
\usepackage{cleveref}
% Place all \newtheorem declarations _after_ cleveref is loaded:
\newtheorem{definition}{Definition}[section]
\newtheorem{proposition}[definition]{Proposition}
\begin{document}
\setcounter{section}{2} % just for this example
\begin{definition}\label{def:1} Hello. \end{definition}
\begin{proposition}\label{prop:1} World. \end{proposition}
\noindent % Create some cross-references:
As \cref{def:1,prop:1} argue, \dots
\end{document}