정리를 상호 참조하는 방법

정리를 상호 참조하는 방법

나는 latex에서 이와 같은 정리를 작성했습니다. \begin{theorem} lllllll \end{theorem} 이 정리를 인용할 때 파란색으로 쓰여진 ''정리 5.2''를 발견하고 이를 클릭하면 원하는 정리로 이동합니다. .

답변1

정리와 유사한 환경 설정을 단순화하려면 amsthm또는 패키지와 같은 패키지를 로드해야 합니다 . ntheorem상호 참조 콜아웃을 파란색 하이퍼링크로 만들려면 및 hyperref옵션을 사용하여 패키지를 로드 해야 합니다 colorlinks. 또한 옵션을 사용하여 패키지를 linkcolor=blue로드하는 것이 좋습니다 . 그런 다음 상호 참조하려는 각 정리와 지시어를 연결하고 및/또는 명령문을 사용하여 상호 참조 콜아웃을 만듭니다.cleverefnameinlink\label\cref\autoref

여기에 이미지 설명을 입력하세요

\documentclass{article}

\usepackage{amsmath,amssymb,amsthm}
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\usepackage[nameinlink]{cleveref}
% Set up theorem-like environments:
\newtheorem{theorem}{Theorem}

\begin{document}
\counterwithin{theorem}{section} % just for this example
\setcounter{section}{5} \stepcounter{theorem}

\begin{theorem} \label{thm:important}
Bla bla bla
\end{theorem}

\noindent
A cross-reference to \autoref{thm:important}.
Another cross-reference to \cref{thm:important}.

\end{document}

관련 정보