我在使用 引用定理和枚举项目时遇到了困难hyperref
。
这是我的最小工作示例。
\documentclass{amsart}
\usepackage[colorlinks]{hyperref}
\newtheorem{Thm}{Theorem}
\newcommand{\Thmautorefname}{Theorem}
\begin{document}
The following theorem is important.
\begin{Thm} \label{Important}
Meow.
\end{Thm}
Here are some consequences of \autoref{Important}:
\begin{enumerate}
\item[(1)] \label{MM}
Meow meow.
\item[(2)] \label{MMM}
Meow meow meow.
\end{enumerate}
Let us now study the meowing coefficient of \autoref{MM}.
\end{document}
现在,定理的超链接可以完美运行,但项目 (1) 的超链接却不行。单击它反而会将我引导至定理。
有人能帮我解决这个问题吗?谢谢!
答案1
您的强制编号方案删除了任何参考设置标记. 以下示例使用enumitem
纠正一下:
\documentclass{amsart}
\usepackage{enumitem}
\usepackage[colorlinks]{hyperref}
\newtheorem{Thm}{Theorem}
\newcommand{\Thmautorefname}{Theorem}
\begin{document}
The following theorem is important.
\begin{Thm} \label{Important}
Meow.
\end{Thm}
Here are some consequences of \autoref{Important}:
\begin{enumerate}[label={(\arabic*)}]
\item \label{MM}
Meow meow.
\item \label{MMM}
Meow meow meow.
\end{enumerate}
Let us now study the meowing coefficient of \autoref{MM}.
\end{document}