Is it possible to create a hyperlink to a page that doesn't exist in the current document?
The reason for asking, is that I have many documents on Overleaf, which are split in order to increase productivity by focusing on one specific document at a time, and in order to alleviate compile timeouts, among other vital reasons. I am unable to switch to a local TeX installation either.
I cannot simply merge the .tex source code into one large document and compile from there, as I would easily exceed the compile timeout limits on Overleaf for my account.
Is there a specific function or piece of code utilising hyperref that allows a clickable link to redirect the user to a specific page that is not included in the current document where the link will be created, but where that page will be included once PDFs are merged together using PDFtk?
In order to clarify, the process goes as follows:
- Document 1 creates a clickable link to some certain page that is in Document 2, this link is useless until all PDFs are merged, only then the link finds its correct destination
- Documents 1 through 2 are compiled separately and merged using PDFtk
- Clicking on the link in Document 1 in the final merged document will take the user to the correct page that would have had been on Document 2 pre-merge
Take the following MWEs:
Document 1:
\documentclass[a4paper, 12pt]{article}
\usepackage[]{hyperref}
\usepackage{lipsum}
\begin{document}
\lipsum
\lipsum
\lipsum
% Create a link to page 10
\end{document}
Document 2:
\documentclass[a4paper, 12pt]{article}
\usepackage[]{hyperref}
\usepackage{lipsum}
\setcounter{page}{6}
\begin{document}
\lipsum
\lipsum
\lipsum
% Any code required here that would be necessary for a cross-PDF link?
\end{document}
These 2 PDFs would be merged together using PDFtk.
Some piece of code that does not work for this specific scenario is \hyperlink{page.10}{On page 10...}, I'm assuming this is due to the fact that a 10th page does not exist in Document 1, where there are only 5 available pages to create a hyperlink to.
The goal is to create a clickable link on page 1 that would take the user to page 10 after both documents have been merged.
\href[page=20]{external.pdf}{on page 20}it is then up to the merge application if it can handle it. – Ulrike Fischer Apr 27 '22 at 07:29\href[page=20]{external.pdf}{on page 20}ended up working when merged using PDFtk. Since there isn't an "answer" on this post, I'm unsure of how to either close this question, or select a comment as an answer. I have upvoted both of your comments to show my gratitude. If there is anything I can do to close this question, please do advise. – 8aa Apr 30 '22 at 13:43