Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having links to an included file by LaTeX PdfPages

Tags:

pdf

latex

How can you maintain the links in your pdf fileA which contains links to itself in the fileB which includes FileA?

FileA has internal links to itself. I include it to FileB by Pdfpages such that

This is in FileB

\usepackage[enable-survey]{pdfpages}
\usepackage{hyperref}
\includepdf[linktodoc=true, link=true]{fileA.pdf}

I have tested the following options unsuccessfully

linktodoc=true
link=true
thread=true

I am reading this tutorial.

like image 453
hhh Avatar asked Sep 05 '25 03:09

hhh


2 Answers

I get the following response from the creator of Pdfpages, A. Matthias.

This is a feature that cannot be implemented on the macro level. It would have to be implemented in the pdftex, xetex, etc. code itself.

On CTAN you find a Java program called `pax' that can extract and reinsert some kind of links (but not all).

So there is work to be done in PDFpages.

like image 104
hhh Avatar answered Sep 07 '25 22:09

hhh


According to the documentation you linked to, with the link option, you have to link to the inserted pages by their given link names - <filename>.<page number>. If you have a look at this demonstration, you can see some explicit examples of doing this, as well as using linktodoc functionality.

like image 29
Cascabel Avatar answered Sep 07 '25 22:09

Cascabel