I would like to add labels to pages inserted with the pdfpages package.
I sort of works right now, but it is not possible to link to the labels with \ref and \pageref commands. But it is possible to link to the page with the hyperlink command from hyperref.
The goal is to compile a list of things to read in a course and then later say 'read from page xx to yy'. The pagenumbers should of course be determined automatic.
In the document below, the pageref expands to ?? while the text Hello links to the correct page.
\documentclass{article}
\usepackage{hyperref}
\usepackage{pdfpages}
\begin{document}
See page \pageref{testing.1}.
\hyperlink{testing.1}{Hello.}
\includepdf[pages=-,link,linkname=testing]{test.pdf}
\end{document}
For reference the inserted document (test.pdf) can be any valid pdf document.