Take the 2-minute tour ×
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.

How can you create a link with hyperref in a PDF file to open a LaTeX file?

share|improve this question
    
If you prefer to discuss your question in german, consider asking at golatex.de or mrunix.de. –  Benedikt Bauer Dec 21 '12 at 12:19
    
I asked a similar question, but for pdf files on record in bibtex database. tex.stackexchange.com/questions/86189/… –  Nicholas Hamilton Dec 21 '12 at 12:57
add comment

1 Answer

The trick is to use run:/. like

\href{run:./myFile.pdf}{LinkText}

To make a Link to the PDF myFile.pdf in the same directory as the LaTeX file (more precisely the created PDF from that file). It is then opened in the PDF-Viewer thats standard for viewing PDFs on that specific system.

Edit I had that in my file to Link to a TeX file, of course that works the same way

\href{run:./myFile.tex}{LinkText}

It should then open in the standard editor for .tex files. Thanks for mentioning in the comments.

share|improve this answer
1  
Whether or not this works is of course viewer dependent, and in Adobe requires disabling "Enhanced security". –  cyberSingularity Dec 21 '12 at 13:04
    
Thank you, this was just what I needed. The remark is correct, that the matter is viewer dependent. With Adobe it works, but what about sumatra? For some reasons I want to use this PDF viewer. –  Klaus Wagner Dec 21 '12 at 16:12
add comment

Your Answer

 
discard

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.