0

Updated I found that if I use \enumerate at the beginning of theorem environment, then the hyperlink to the label does not bring me to the correct place. For example:

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{hyperref}
\theoremstyle{plain}
\newtheorem{thm}[subsubsection]{Theorem}
\theoremstyle{definition}
\newtheorem{rmk}[subsubsection]{Remark}

\begin{document}

abc

\newpage

\begin{thm}[cf. Theorem 1.1.1 in XYZ]\label{thm:important-theorem} \begin{enumerate} \item this \item is important \end{enumerate} \end{thm}

\begin{rmk} Note that Theorem \ref{thm:important-theorem} is an important theorem. \end{rmk}

\end{document}

If I click the hyperlink in the remark, it brings me to the first page. Is there an easy way to fix this?

  • You wrote, "I found that the caption causes an error". Which caption? What kind of error? – Mico Nov 18 '22 at 20:19
  • You don't load the hyperref package in the code that you show here, so no hyperlink is created. The example as given works without any problems (but, as said, doesn't create a link). – Marijn Nov 18 '22 at 20:33
  • And when I add \usepackage{hyperref} myself then it still works correctly, creating a link that points to the theorem. Please clarify if you can reproduce the problem with this code or if it only happens in your real document. And if this code is causing the problem then please state which compiler you use and with which pdf viewer you open the document. – Marijn Nov 18 '22 at 20:37
  • @Marijn my apologies; I did use \usepackage{hyperref} in my original document. By "the caption" I mean [cf. Theorem 1.1.1 in XYZ] after my theorem. Indeed, I found that this document causes no problems. I will try to figure out what is wrong with my actual document and update the question. Thank you – quasi-mathematician Nov 18 '22 at 21:27
  • @Marijn The problem was actually using enumerate at the beginning, and the question is now updated. – quasi-mathematician Nov 19 '22 at 04:36
  • The same problem was described in this answer, with a workaround of adding \hspace{2em} before \begin{enumerate}. Maybe that would be a solution for you as well? Currently the enumerate doesn't look very nice because the first item is not aligned with the second. – Marijn Nov 19 '22 at 13:21
  • @Marijn Thanks for your suggestion! I agree that the enumerate does not look very nice in this way. – quasi-mathematician Nov 19 '22 at 18:56

0 Answers0