4

I have a very weird problem using the hyperref package. When I try to link an external web site it doesn't work and only show me the link which it is pointing to. I've tried this MWE:

\documentclass{article}
\usepackage{hyperref}
\begin{document}

Here's a link to \href{http://twitter.com/home}{Twitter}.

\end{document}

but the result is always negative. I click the link and it displays the toast with the web address. The weird fact though is that when I use the moderncv package and link my mail address with the macro \email it works, so I guess the problem is with my \hyperref but I can't figure out how to solve it.

diabonas
  • 25,784
  • Welcome to TeX.SX! From your MWE I have no problems in opening the url. – Claudio Fiandrino Jun 26 '12 at 11:34
  • 2
    Hi Luigi, could you tell us your operating system, TeX distro and PDF viewer? :) – Paulo Cereda Jun 26 '12 at 11:36
  • The problem might be your pdf viewer's configuration and not LaTeX. What happens when you click a URL/link in a pdf that wasn't created with LaTeX? If the problem appears there, too, we should probably migrate this question to [su]. – doncherry Jun 26 '12 at 11:45
  • You are right :-). I am using pdflatex to compile and this is the version pdfTeX 3.1415926-2.3-1.40.12 (TeX Live 2011). I'm under Ubuntu 12.04 and use emacs23 as text editor and acroread file.pdf to see the file – Luigi Tiburzi Jun 26 '12 at 20:56
  • I've tried to open it with Document Viewer (as an alternative to Acrobat) but the problem is the same – Luigi Tiburzi Jun 26 '12 at 21:00
  • What does 'the result is always negative' mean? If by 'Document Viewer', you mean evince, when you click on the link, do you get a warning along the lines of "Unable to open external link"? If so, this is not a TeX problem. – jon Jun 28 '12 at 04:42
  • Yes I mean evince and I don't get any message or warning in the terminal, I simply get a toast in the document with the link's name – Luigi Tiburzi Jun 28 '12 at 17:56
  • Which version of hyperref do you use? I think nobody can reproduce this problem. – Marco Daniel Jul 08 '12 at 11:08
  • Assuming it is the one given by issuing $ latex --version

    it is 6.0.1 (Tex Live 2011)

    I've tried from a couple my friends' pc and the problem was the same.

    I've tried the following visualizer:

    evince, acroread, okular

    – Luigi Tiburzi Jul 08 '12 at 22:04
  • 2
    I've tried your MWE and it works perfect for me. I'm using pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9) and Package: hyperref 2012/05/13 v6.82q Hypertext links for LaTeX. I viewed the pdf with the actual SumatraPDF. Seems to be a problem of your installation? – Mensch Aug 06 '12 at 21:54
  • Seems like I have to install it again... Is there a ''magic command'' to do it without pain? – Luigi Tiburzi Aug 07 '12 at 16:41
  • I've partially solved the issue by using Okular as pdfViewer. I use the word partially because if I try to send the file to someone not using Okular they are still unable to get the links opened and that's not what I want. By the way right this is the best I can do, hope to find a better answer asap. – Luigi Tiburzi Jun 28 '12 at 18:01
  • Does hyperref's internal macro \hyper@linkurl{<text>}{<url>} work for you? – cgnieder Aug 28 '12 at 12:35
  • I tried sudo apt-get install texlive-full, sudo apt-get update and then I compiled again the pdf but the problem is still there... – Luigi Tiburzi Aug 29 '12 at 13:47
  • @cgnieder what is the usage of hyper@linkurl? ùtex says it is an unknown command – Luigi Tiburzi Aug 29 '12 at 13:53
  • I suppose by »ùtex« you mean »LaTeX«? It's as simple as I posted it. Of course you have to enclose it with \makeatletter and \makeatother because of the @ in its name. (If it works one could define a more user-friendly command) – cgnieder Aug 29 '12 at 14:07
  • Yes sorry I meant Latex. I tried your suggestion and successfully get an hyperlink in the text but when I click on it I have the same behavior I had before. Tried with acroread and evince. – Luigi Tiburzi Aug 29 '12 at 20:38
  • With the command pdflatex --version I get pdfTeX 3.1415926-2.3-1.40.12 (TeX Live 2011), was the upgrade successful? I was sure I had installed the last version... – Luigi Tiburzi Sep 05 '12 at 21:49
  • 1
    Luigi, you wrote about “I tried sudo apt-get …” This looks to me, as that you installed the outdated (!!!) TeX Live version from the repository of your Linux distro. Perhaps it includes an old version of hyperref with a bug, that was fixed later. See also How to install “ vanilla ” TeXLive on Debian or Ubuntu?. – Speravir Sep 12 '12 at 21:09

0 Answers0