# Can you have hyperlinks to locations in different PDFs?

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?

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}
Foo bar

\section{Source b}
Fu baz
\end{document}


dest.tex:

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

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

\section{Two}
Fill paragraph.
\lipsum

\section{Three}
Fill paragraph.
\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)

• Could you expand your answer a bit to make it self-contained? – doncherry Aug 17 '11 at 8:38
• @doncherry, sure, added a small example. – maxschlepzig Aug 17 '11 at 17:06