The following document shows the problem:
\documentclass{scrreprt}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage{hyperref}
\newtheorem{thm}{Theorem}[chapter]
\begin{document}
\chapter{first chapter}
The reference to theorem \ref{thm:structureunoriented1} is correctly displayed (2.1 in this case) but points to the last page of the document with {\ttfamily warning (pdf backend): unreferenced destination with name 'thm.2.1'} during compilation.
\newpage
\chapter{second chapter}
\begin{thm}\label{thm:structureunoriented1}
%% \phantom{x} % Uncommenting this line prevents the problem
\begin{enumerate}[(i)]
\item This is the part 1 of the theorem I want to refer to.
\item This is the part 2 of the theorem I want to refer to.
\end{enumerate}
\end{thm}
\newpage
\chapter{third chapter}
This is where I land when klicking on the reference.
\end{document}
I'm not sure who the culprit is but one of the packages hyperref and enumerate is, right? Is there a way to avoid that problem? After all \phantom is not very elegant. Putting the label after \end{enumerate} works but then I land on the bottom of the theorem.
amsthmdefinestheoremto be run-in. It expects something (i.e. text) to follow before a "vertical" environment likeenumerate. See the questions about starting a theorem with a list; this one might suffice:theoremenvironment : interaction withenumerate/itemize– barbara beeton Jul 05 '23 at 22:27