0

I want to click on the link and open an attached PDF in a specific page.

  • This may be specific to Adobe Acrobat/Reader... – Werner Jul 21 '16 at 22:08
  • This works in Google Chrome http://texdoc.net/texmf-dist/doc/latex/listings/listings.pdf#page=20 or even http://texdoc.net/texmf-dist/doc/latex/listings/listings.pdf#subsection.4.2 – Henri Menke Jul 21 '16 at 22:46
  • With hyperref I use \href[pdfnewwindow]{file.pdf\#target}{text} where file.pdf is either in the same directory or \hyperbaseurl and target is a \hypertarget name. – John Kormylo Jul 22 '16 at 4:17
  • @HenriMenke in your answer, is the PDF file attached to the main PDF, or just linking between folders? – Vitor Abella Jul 22 '16 at 18:56
  • @JohnKormylo Could you give me a complete example? – Vitor Abella Jul 22 '16 at 18:57
1

If you are creating the document, you can either use \hypertarget to create the anchor name, or use \label and look in the aux file to find the corresponding anchor name. If you have no control over the document, you can read the PDF file with an ASCII editor and search for the list of names (if any).

Target document (named test4):

\documentclass{article}
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage{lipsum}% genertic text

\begin{document}
\lipsum[1-5]
\hypertarget{eq1}{\begin{equation}
x=a
\end{equation}}
\lipsum[6-10]
\end{document}

Main document:

\documentclass{article}
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage{lipsum}% genertic text

\begin{document}
As shown in \href[pdfnewwindow]{test4.pdf\#eq1}{(1)} we know that $x=a$.

You can find this equation on \href[pdfnewwindow]{test4.pdf\#page.2}{page 2}.
\end{document}

The page.2 anchor was generated by hyperref automatically. The is no guarantee it will work for all documents.

| improve this answer | |

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.