I would like a command that takes two arguments: a page number and a block of text. I would like the command to create a PDF hyperlink around the text that will jump to the given page.

I see that the undocumented \hyperpage{} command from the hyperref package will create a link to the given page, however, I don't see how it can be used to make a link for arbitrary text. I took a look at the underlying code in hyperref.sty but I can't really figure it out.

I do realize that I could use \hyperlink{}{}, but that requires I put a \hypertarget{}{} on each of the pages to be linked. In my case, I only know the numerical number of the page to be linked.


3 Answers 3


You could use \hyperlink with the already defined page targets:

\hyperlink{page.2}{Go to page 2}
text on page 2
  • 1
    Thanks; that worked! I had tried \hyperlink{Page.2}{Go to page 2}, but that caused errors. I guess the "page" is case sensitive.
    – ESultanik
    Commented Aug 16, 2010 at 20:42
  • 1
    Yes. \hyperpage relies on those anchor names, it uses \hyperlink{page.\the\toks@}{\the\toks@} in hyperref.sty.
    – Stefan Kottwitz
    Commented Aug 16, 2010 at 20:51
  • Any hints how to link to a page that was numbered Roman? like "V"?
    – ghx
    Commented Jun 26, 2020 at 21:38

Not sure it is the same, but you can create a link with something like this.

First you add a label somewhere in the document.


And then add the link to that label with.


And if you add


it becomes a link you can click on.

  • 2
    That is not what I want. The "\pageref{}" command typesets the page number of the associated label. I want to have an arbitrary string with a link to a specific page number. For example, I might want to typeset the text "click here to go to page 10" and have that text link to page 10 of the document when clicked from the PDF. Since I don't know a priori how TeX is going to break the pages, I wouldn't know where to put the "\label{}" such that it were guaranteed to be on page 10.
    – ESultanik
    Commented Aug 16, 2010 at 20:38
  • ok, a "arbitrary string" is not possible with this method. And you would add the label right next the the thing you need to link to, and then pageref gives you what page that is. But that is also the opposite from what you what.
    – Johan
    Commented Aug 16, 2010 at 20:48

From this page: https://www.scijournal.org/articles/hyperlinks-in-latex

I could use this to label a page:

\hypertarget{label}{target caption}

and then link to this anchor with:

\hyperlink{label}{link caption} 

You must log in to answer this question.

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