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.

It's possible to hyperlink to another PDF file using Adobe Acrobat using the following LaTeX code:

\href{run:target.pdf}{Click me!}

If this is placed in source.pdf, then you can click on the hyperlink to open up target.pdf on the front page.

Is there any chance of hyperlinking to a different section in another PDF, similar to second.html#target in HTML?

share|improve this question
add comment

1 Answer 1

up vote 11 down vote accepted

(for reference the Adobe Knowledge base entry about pdf from html linking)

Checkout section 4.1 in Hypertext capabilities with pdfLaTeX (F. Garcia, TUGBoat, Vol. 28, No. 1, 2007), which describes the hyperdef and hyperref commands.

Just a small example:

src.tex:

\documentclass{article}
\usepackage{hyperref}

\begin{document}
\section{Source a}
\hyperdef{cat1}{link1}
Foo bar
\hyperref{dest.pdf}{cat1}{link1}{Link 1}

\section{Source b}
\hyperdef{cat2}{link2}
Fu baz
\hyperref{dest.pdf}{cat2}{link2}{Link 2}
\end{document}

dest.tex:

\documentclass{article}
\usepackage{lipsum}
\usepackage{hyperref}

\begin{document}
\section{One}
\lipsum

\section{Two}
\hyperdef{cat1}{link1}
Fill paragraph.
\hyperref{src.pdf}{cat1}{link1}{Back 1}
\lipsum

\section{Three}
\hyperdef{cat2}{link2}
Fill paragraph.
\hyperref{src.pdf}{cat2}{link2}{Back 2}
\lipsum

\end{document}

Create the PDFs via:

$ pdflatex src
$ pdflatex dest

Now you can try to jump back and forth between the both documents in your favorite PDF Viewer.

(Tested it with Okular under Ubuntu 10.04)

share|improve this answer
    
Could you expand your answer a bit to make it self-contained? –  doncherry Aug 17 '11 at 8:38
1  
@doncherry, sure, added a small example. –  maxschlepzig Aug 17 '11 at 17:06
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.