I tried to use the xr package to get cross-references between files.
My primary document is book.tex:
\documentclass[a4paper,10pt]{scrbook}
\usepackage{hyperref}
\begin{document}
\chapter{Beginning}
\label{ch1}
Foo
\input{chapter2.tex}
\end{document}
book.tex includes chapter2.tex:
\chapter{End}
\label{ch2}
Bar
My secondary document is supplement.tex:
\documentclass{powerdot}
\usepackage{xr}
\externaldocument{book}
\begin{document}
\begin{slide}{Slide Title}
Reference A: \ref{ch1} page \pageref{ch1}
Reference B: \ref{ch2} page \pageref{ch2}
\end{slide}
\end{document}
book.tex compiles fine using pdflatex book.tex but when I latex supplement.tex I get stuck with
LaTeX Warning: Reference `ch1' on page 1 undefined on input line 13.
LaTeX Warning: Reference `ch2' on page 1 undefined on input line 13.
All the files are in the same directory and I am running pdflatex and latex in that directory without using the -output-directory flag. I also tried the xr-hyper package.
What else do I need to do to make supplement.tex pick up the references from book.tex (and its included file chapter2.tex)?
\externaldocumentstatement in yoursupplementfile – Jan 22 '17 at 09:48beamersince it does apparently not supporthyperrefin its full extent and redefines some features, e.g. see http://tex.stackexchange.com/questions/127495/referencing-an-article-from-a-beamer-document-with-xr-hyper – Jan 22 '17 at 10:14