I am trying something ambitious and I hope there is a way to get it to work.
I have a number of pdf documents that I will eventually pull together in one pdf. One of the documents, a cover page of sorts, to include links to other components in the final pdf.
To do this, I set up three dummy documents:
% doc1
\documentclass{article}
\begin{document}
This is the first document.
\end{document}
% doc2
\documentclass{article}
\begin{document}
This is the second document.
\end{document}
% doc3
\documentclass{article}
\begin{document}
This is the third document.
\end{document}
Then, I construct the coverpage document:
% coverpage
\documentclass{article}
\begin{document}
Here is the link to the first document, \ref{doc1.1}.
Here is the link to the second document, \ref{doc2.1}.
Here is the link to the third documents, \ref{doc3.1}.
\end{document}
And finally, I construct the wrapper document, which calls all the component pdfs, and defines the links:
% main document
\documentclass{article}
\usepackage[final]{pdfpages}
\usepackage{url}
\usepackage{hyperref}
\title{Document set}
\begin{document}
\maketitle
%\tableofcontents
\includepdf[link=true]{coverpage.pdf}
\includepdf[link=true, linkname=doc1]{doc1.pdf}
\includepdf[link=true, linkname=doc2]{doc2.pdf}
\includepdf[link=true, linkname=doc3]{doc3.pdf}
\end{document}
I want the references in coverpage to show up when compiled within main.tex. Obviously, the references I want in the coverpage.tex file live in the main.aux file. I am wondering if there is a way to streamline this process so that it works, or indeed if there is an easier way to do this.
I want to write the coverpage separately instead of within the main document, since it uses its own documentclass which is not how I want the main document to be typeset.
