TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For some reason, I can't get a link to generate when I use the \hyperref package with pdfLaTeX compiler. \hyperref[this is link text]{www.google.com} yields only a plain unformatted "www.google.com" in the finished document.

I'm running manually installed Texlive 2013 on Linux Mint 16 Cinnamon 32-bit. On a 64-bit Lenovo Thinkpad e420 machine.

Below is a shortened example of the doc I'm trying to compile:



Here's a hyperref. \hyperref[This is a link to Google]{http://www.google.com}.


Output for the above compiles to "Here's a hyperref. http://www.google.com" (no hyperlink or link text).

share|improve this question
Welcome to TeX.SE! – Mico Jan 28 '14 at 20:42
up vote 11 down vote accepted

The syntax of \hyperref with the optional argument is:

\hyperref[<label name>]{<text>}

I assume, you do not have \label{This is a link to Google}. Then the text "http://www.google.com" appears without link to a non-existing label.

I think you want somethink like:

\href{https://www.google.com/}{This is a link to Google.}

Then the text "This is a link to Google." is a link to the URL https://www.google.com/.

share|improve this answer
That was dumb of me. I read the documentation too quickly and replaced \href with \hyperref. I was confounded by the fact that hyperref is defined, so I didn't get any errors; else I probably would have figured it out sooner.... argh. The simplest things. Thanks again! :-) – Kevin Jan 28 '14 at 21:24

From the hyperref documentation (section 4 Additional user macros):

If you need to make references to URLs, or write explicit links, the following low-level user macros are provided:


The text is made a hyperlink to the URL; this must be a full URL (relative to the base URL, if that is defined). The special characters # and ~ do not need to be escaped in any way.

So you're after \href{http://www.google.com}{This is a link to Google}.

share|improve this answer

Your Answer


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.