TransWikia.com

Hyperlink jumping to wrong page if label is placed onto the next page

TeX - LaTeX Asked on June 28, 2021

When referencing a theorem starting immediately on a new page with hyperref the page number is returned wrong and clicking on the link does not jump to the page the theorem is on.
The following MWE replicates this behaviour. It returns page number 1 for the theorem and when clicked on, it jumps to the end of page 1, although the theorem is on page 2.

documentclass{article}

usepackage{lipsum}
usepackage{hyperref}

newtheorem{theorem}{Theorem}[section]

begin{document}
section{Section}
lipsum[1-5][1-90]
foo pageref{theorem}

begin{theorem}label{theorem}
 bar
end{theorem}
end{document}

Including amsthm fixes the jumping but the page returned is still wrong. With cleveref this is reverted.
What can I do in order to have the reference point at the correct destination?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP