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.

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

I'd like to include some http links in my document. So i Included the hyperref package so that i can use the command \url{}

Microsoft Surface\footnote{\url{http://www.microsoft.com/surface}}

This works, but the problem is, that all the links in my document (also the ones created with \ref{} or \cite{} are highlighted. I want to avoid that. So i added:


But nothing changed. How can I avoid that all links are highlighted? I only want to enable URLs and nothing else.

share|improve this question
if you do not want that, why do you then load hyperref? – Herbert Feb 3 '11 at 14:06
@Herbert: Because i want to link microsoft.com but not highlight that and not highlight any other link in my document. – RoflcoptrException Feb 3 '11 at 14:09
You could try using the url package instead, or a have a look at the answers on this related question. – Juan A. Navarro Feb 3 '11 at 14:09
up vote 7 down vote accepted

Only load the url package it also provides \url but will not render an hyperlink. Note that most PDF viewer do this now automatically anyway.

If your really need hyperref for something else try to:

  1. Load the option with the package: \usepackage[colorlinks=false]{hyperref}

  2. Create a hyperref.cfg file in the same directory as your TeX file and put the \hypersetup{colorlinks=false} in there.

Certain options of hyperref must be given very early and can't be changed afterwards. The colorlinks option might be one of them.


I just tested this under my TeXLive 2010 installation. With colorlinks=false I get the usual colored frame around the hypertext. You might want to activate colors and set them to black:

share|improve this answer
Thanks. That solved the problem. – RoflcoptrException Feb 3 '11 at 14:16
The option colorlinks=false should still give you boxes around the url (and \cites etc.) – Carsten Thiel Feb 3 '11 at 14:23
@Carsten: Thanks, I already added that to my answer. – Martin Scharrer Feb 3 '11 at 14:36

Since hyperref version 2011/02/05 v6.82a, the option hidelinks has been available, which suppresses the highlighting of links.

share|improve this answer
With \usepackage[colorlinks=true,urlcolor=black]{hyperref} the TOC links become red, while with \usepackage[hidelinks]{hyperref} everything renders perfectly. This is the way to go :) – Riccardo Nov 19 '12 at 11:41

You can also used the style facilities of the url package.



colorlinks = False

in hypersetup. I think it is easier. I did this for a beamer package where hyperref is loaded by default.

share|improve this answer

For natbib cites, you just need to intercept the hooks between hyperref and natbib. Similar changes can be done for refs (look in hyperref.sty).

So, after loading hyperref and natbib:

share|improve this answer

If you want only to print urls you can use the url package. If you want to have active links for the urls you could try this. It should disable all hyperref features (including bookmarks) with the exception of links behind urls:


share|improve this answer

Microsoft Surface\footnote{\url{http://www.microsoft.com/surface}}


if you want the links. Replace \usepackage{url} instead of hyperref, will print URLs in typewriter. NEarly all pdf viewer convert it by default into a link.


share|improve this answer
Unfortunately, I find that the url package still has a bug relating to underscores in URLs. – user4417 Aug 11 '11 at 11:53
no it has no bug, otherwise show the opposite! – Herbert Aug 11 '11 at 12:11
Ok, it is probably not a bug in the url package, and rather the pdf viewer. I find that clicking such a link containing an underscore, in a pdf document, using Adobe Reader X 10.1.0 will follow a truncated URL. e.g. http://www.under_score.com -> http://www.under – user4417 Aug 11 '11 at 15:12

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.