![交叉引用无法正常工作](https://linux22.com/image/453029/%E4%BA%A4%E5%8F%89%E5%BC%95%E7%94%A8%E6%97%A0%E6%B3%95%E6%AD%A3%E5%B8%B8%E5%B7%A5%E4%BD%9C.png)
\documentclass[notitlepage, 12pt]{amsart}
\usepackage{amsthm, amsmath, amsaddr, amssymb, graphicx, dsfont,}
\usepackage[dvipsnames]{xcolor}
\usepackage[
colorlinks=true,
linkcolor=Blue,
citecolor=Brown]{hyperref}
\renewcommand{\baselinestretch}{1.2}
\usepackage{natbib}
\usepackage{caption}
\raggedbottom
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{corollary}{Corollary}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
\newtheorem{remark}{Remark}
\newtheorem{assumption}{Assumption}
\usepackage{geometry}
\geometry{
body={6.5in, 9.0in},
left=1.25in,
right=1.25in,
top=1.25in,
bottom=1.25in
}
%\usepackage{footmisc}
%\setlength{\footnotesep}{0.4cm} %footnote spacing
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator{\ima}{Im}
\newcommand{\namedthm}[2]{\theoremstyle{plain}
\newtheorem*{thm#1}{Theorem #1}\begin{thm#1}#2\end{thm#1}}
\usepackage{float}
\title[Test]{Test}\thanks{Test}
\author[A]{A}\address{University of LaTeX}
\author[B]{B}\address{University of LaTeX}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
Test
\end{abstract}
\pagenumbering{alpha}
\thispagestyle{empty}
\clearpage
\pagenumbering{arabic}
\setcounter{page}{1}
\section{Introduction}
Test
\section{General Results}\label{General}\bigskip
\begin{theorem}
\begin{itemize}
\item[(i)] a.
\item[(ii)] b.
\item[(iii)] c.
\item[(iv)] d.
\item[(v)] e.
\end{itemize}
\label{main}
\end{theorem}\bigskip
Theorem \ref{main}.\bigskip
\end{document}
在生成的 PDF 中,当单击“定理 1”中的“1”时,它会跳转到标题页,而不是定理 1 所在的位置。我该如何解决这个问题?谢谢!
答案1
最好hyperref
在最后一个包中使用,并且你保留了\label
和\ref
在同一个页面中,我稍微修改了你的MWE
\documentclass[notitlepage, 12pt]{amsart}
\usepackage{amsthm, amsmath, amsaddr, amssymb, graphicx, dsfont,}
\usepackage[dvipsnames]{xcolor}
\renewcommand{\baselinestretch}{1.2}
\usepackage{natbib}
\usepackage{caption}
\raggedbottom
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{corollary}{Corollary}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
\newtheorem{remark}{Remark}
\newtheorem{assumption}{Assumption}
\usepackage{geometry}
\geometry{
body={6.5in, 9.0in},
left=1.25in,
right=1.25in,
top=1.25in,
bottom=1.25in
}
\usepackage[
colorlinks=true,
linkcolor=Blue,
citecolor=Brown]{hyperref}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator{\ima}{Im}
\newcommand{\namedthm}[2]{\theoremstyle{plain}
\newtheorem*{thm#1}{Theorem #1}\begin{thm#1}#2\end{thm#1}}
\usepackage{float}
\title[Test]{Test}\thanks{Test}
\author[A]{A}\address{University of LaTeX}
\author[B]{B}\address{University of LaTeX}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
Test
\end{abstract}
\clearpage
\pagenumbering{arabic}
\setcounter{page}{1}
\section{Introduction}
Test
\section{General Results}\label{General}\bigskip
\begin{theorem}\label{main}
\begin{itemize}
\item[(i)] a.
\item[(ii)] b.
\item[(iii)] c.
\item[(iv)] d.
\item[(v)] e.
\end{itemize}
\end{theorem}\bigskip
Theorem \ref{main}.\bigskip
\clearpage
Test for hyperlink \ref{main}
\end{document}