1

I'm trying to use the hyperref package in Latex to link a specific website using href. The problem is that using a URL such that

\href{https://link.springer.com}{book}

produces a clickable link that tries to jump through my local directories. The error is in the word "link" whereas using "www" will ATTEMPT to take me to a page that is not valid (a positive result). Any idea how to get this link to behave properly?

1
  • 2
    This could be a viewer issue. In a short example I just tried, the link as posted worked in TeXworks' preview, Adobe Reader DC, SumatraPDF. What reader do you use?
    – moewe
    Jul 19 '18 at 5:07
4

Package hyperref does not change the URL:

% arara: pdflatex
\pdfobjcompresslevel=0
\documentclass{article}
\usepackage{hyperref}
\begin{document}
  \href{https://link.springer.com/}{book}
\end{document}

The PDF file contains:

3 0 obj
<<
/Type /Annot
/Border[0 0 1]/H/I/C[0 1 1]
/Rect [147.716 656.239 171.018 665.15]
/Subtype/Link/A<</Type/Action/S/URI/URI(https://link.springer.com/)>>
>>
endobj

BTW, the slash at the end completes the URL.

As can be seen, the URL does not contain www. Thus, the error is somewhere else. Maybe the PDF viewer or the web browser.

2
  • What tool do you use to see those PDF file contents?
    – Max
    Jul 19 '18 at 7:30
  • 1
    @MaxSnippe You can just use a text editor (e.g. VIM). Jul 19 '18 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.