When I type \ref{name} giving the link is on the wrong page.
How do I fix this?
\documentclass[a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{theorem}
\newtheorem{teo}{Teorema}[chapter]
\begin{document}
\begin{teo}\label{tvi}
text
\end{teo}
... %insert various \newpage
\ref{tvi}
\end{document}
Returns incorrect page.
teoinclude a\refstepcounter? Otherwise the\labelmight point to the last label-able item (e.g. section) instead. – Martin Scharrer Sep 25 '11 at 20:21teodoesn't exist in standard LaTeX, so you have to show its definition. – egreg Sep 25 '11 at 20:32\lipsumparagraphs I always get the correct link. – egreg Sep 25 '11 at 20:56tvi? You'll know this is the case your log file contains the output "LaTeX Warning: There were multiply-defined labels." near the end. – Werner Sep 25 '11 at 21:42