1

I am trying to include a clickable hyperlink in my document. I am able to do it with websites, but I struggle to find a solution for clickable hyperlinks to include other documents on my computer.

I have tried the following, but when I try to click on the link nothing happens:

\href{run://This PC/Documents/Lectures/Lecture 1.pdf}{Lecture 1}

I have included these libraries:

\usepackage{pdfpages}
\usepackage[hidelinks]{hyperref}
3
  • 1
    As always you are much more likely to get help if you provide a full but minimal example. I don't think you should expect PDF viewers to gennerally support some run protocol as that might be a big security issue
    – daleif
    Aug 25, 2022 at 10:44
  • 1
    If the current PDF and Lecture_1.pdf (I would never use spaces in filenames as they often need to be escaped) is in the same folder, then \href{Lecture_1.pdf}{Lecture 1} should work (depending on PDF viewer, works in my Evince). Also note that this is computer independent, This PC/Documents/Lectures/Lecture 1.pdf is not.
    – daleif
    Aug 25, 2022 at 10:57
  • Thank you very much - that worked!
    – David
    Aug 25, 2022 at 12:33

1 Answer 1

3

Generally links like \href{run://...}{..} might not be supported for security reasons.

On the other hand of PDF file A.pdf is in the same folder as the file you are working on then

\href{A.pdf}{Some text}

usually works. And have the added bonus that it also works if the folder is moved to a different computer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .