# Enumerate after \label

I have the following code:

\usepackage{hyperref}
\newtheorem{thm}{Theorem}

\begin{thm} \label{mythm}
\begin{enumerate}
\item
\end{enumerate}
\end{thm}

\ref{mythm}


The ref prints the right number. However, when I click on it, it will lead me to a wrong page (basically, to the beginning of the document). pdflatex also has some warning. If I add  between \begin{thm} and \begin{enumerate}, the problem disappears, but now, the enumeration starts a new line. Is there any way to fix this?

-

You can use the \phantomsection command from hyperref:

\documentclass{book}
\usepackage{amsthm}
\usepackage{hyperref}

\newtheorem{thm}{Theorem}

\begin{document}

\begin{thm}\phantomsection \label{mythm}
\begin{enumerate}
\item
\end{enumerate}
\end{thm}

\ref{mythm}

\end{document}


Another option would be to use the ntheorem package instead of amsthm:

\documentclass{book}
\usepackage{ntheorem}
\usepackage{hyperref}

\newtheorem{thm}{Theorem}

\begin{document}
\mbox{}\newpage
\begin{thm}
\label{mythm}
\begin{enumerate}
\item
\end{enumerate}
\end{thm}

\newpage
\ref{mythm}

\end{document}

-
For ntheorem, do I need to also define the proof environment? –  brian Mar 21 '11 at 21:27
@brian: if you load the package with the standard option, then some predefined theorem-like environments become available, proof amongst them (you'll also need the thmmarks package option to activate the endmark). If you don't load those options, you'll have to define your own proof environment. –  Gonzalo Medina Mar 21 '11 at 21:39