Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to create a clickable link from which I can jump to the top of the page which contains a certain labelled object. I tried \pageref but then clicking on the corresponding link results in a jump to the exact site of the labelled object [formula (1) in the MWE below]. Instead, I want to jump to the top of the corresponding page [top of page 2 in the MWE below]. Is that possible?

\documentclass{article}
\usepackage{lipsum}
\usepackage{hyperref}
\begin{document}
\lipsum
\begin{equation}\label{a}
  a:=b
\end{equation}
\lipsum
Note that $a$ is defined in (\ref{a}) on page \pageref{a}.
\end{document}
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Here's one approach if hyperref option hypertexnames is set (it is by default):

\documentclass{article}
\usepackage{lipsum}
\usepackage{hyperref}
\usepackage{refcount}
\newcommand{\pagereftop}[1]{\hyperlink{page.\getpagerefnumber{#1}}{\pageref*{#1}}}
\begin{document}
\lipsum
\begin{equation}\label{a}
  a:=b
\end{equation}
\lipsum
Note that $a$ is defined in (\ref{a}) on page \pagereftop{a}.
\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.