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

I want to stop every URL in my document from being clickable in the resulting PDF.

I am using the url package, and the documentation claims that it "does not make hyper-links." So, I don't know why links are becoming clickable!

I also have some specific requirements that are met by the url package and not by the hyperref package, so simply using the hyperref package is probably not an option for me.

I'm using TeXShop 3.11 with Pdftex. The minimal example below generates a document with a clickable link to www.google.com when viewed in Preview.app in OS X 10.9.4.




foo \url{www.google.com} bar

share|improve this question
up vote 8 down vote accepted

It's your PDF viewer's fault: Mac OS X Preview (at least v7.0) recognises URLs and makes them clickable, whether they be typeset with a special package (hyperref, url) or not.

To convince yourself, try compiling the following example and open the output in Preview; the URL will be clickable.

So there's really nothing you can do about it on the author's side.

enter image description here

share|improve this answer
Thank you sir, I appreciate it! – andrewinfosec Aug 8 '14 at 23:01
This seems to happen with other readers as well (I tried it with Sumatra PDF) – Scz Aug 9 '14 at 7:00
PDF-XChange Reader too – Kapep Mar 7 '15 at 22:18

This problem seems to come from the pdf reader that is used. Therefore my idea is to add something invisible that breaks up the url for the program but not for the person reading it. Something like \url{www.google}\rlap{~}{.com} does not work, though, because the space ~ is ignored.

An ugly workaround that works for me (with Sumatra PDF) is:

\url{www.google}\rlap{ \color{white}X}{.com}

with \usepackage{color} in the preamble. Make sure to include the space, as otherwise there will be a link to www.googleX.com.

However, this only works if your background is white. Another downside is that you will not be able to copy the original url from the document. Maybe you can play around and replace X with something invisible.

share|improve this answer
Thank you! Once I learnt from the first answer that the cause is the PDF reader itself, I accepted that it's probably not something that I can fix (at least not easily). The ideas you propose are interesting however, and I appreciate your efforts! – andrewinfosec Aug 10 '14 at 19:32
Thanks! The stackexchange.com way to show your appreciation would be an upvote ;-) – Scz Aug 11 '14 at 16:24
Done! (I'm still new....) :-) – andrewinfosec Aug 12 '14 at 16:33

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.