I need to link a text to a page (by page number). I do not want to use labels, but simply to specify the text and the page number. Can I do that with hyperref?

  • 3
    I can't see any advantage of non-using /label and \ref/\pageref combination because this allows you to edit your file without care of such references. And what "text" do you mean? Text on referred page or caption of the reference?
    – Crowley
    Commented May 30, 2011 at 8:01
  • @Crowley: I think "text" refers to the link text. So instead of "The details will be discussed on p. [[5]]", Raphink wants something like "[[The details]] are discussed at a later point.", where the part between [[ ]] is the link.
    – Jake
    Commented May 30, 2011 at 8:19
  • @Crowley: in general no, indeed. But in this particular case, I'm post-processing an index to replace page numbers with text, and I want the text to link to the page number I'm replacing.
    – raphink
    Commented May 30, 2011 at 8:22

2 Answers 2


You can link to any page using the implicit page anchor page.<number> as long the pageanchor option is active (which is the default anyway). Using labels is still more correct and recommended.

Note that this makes the link jump to the upper left corner of the page where the page anchor is automatically inserted. The zoom level is not changed, so if you have a large zoom factor before than you might not see the full page.



\hyperlink{page.5}{On page 5}



Note that the page number is the "number" given by \thepage. If you have a frontmatter with roman numbers then the page link might be page.I, page.II and page.5 should be the logical, not physical page 5.

Using the bookmark package you can also create a PDF bookmark (the ToC like structure displayed by the PDF reader) which points directly to the absolute page (starting with 1 for the very first page of the document). Using this link the full page is always displayed disregarding the existing zoom level.

\bookmark[page=5]{Absolute page 5}%  useful option: level=<number>

There seems to be no macro to add such a page link into the text. \hyperlink doesn't support any options. I posted a message at comp.text.tex asking about this. The author of hyperref is active there.

Furthermore, the zref package with its abspage module is useful if you want to get the absolute page numbers of stuff (i.e. label them using \zlabel).


After a short discussion with the hyperref author I came up with this patch to make all page anchors to be displayed in full page mode, i.e. the zoom level is changed to make the whole page fit on the screen. I very much prefer this for page links.

  • just saw the patch. This is very nice. Not sure it'll be useful in my case since my main goal is to get the PDF printed as a book :-)
    – raphink
    Commented Aug 26, 2011 at 10:06


Go to \jump{page.5}{page 5}.


This solution gets around hyperref's unorthodox method of highlighting links. \jump places a thin blue line under the linked item.

You can change the link color from blue to red, black, green, whatever you wish.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .