Reputation: 31
I am writing a textbook and want to put the exercises into a separate book to save space. The 2 books will be compiled independently. However, I want the main book to be able to make references to sections in the exercise book, eg "See Exercise~\ref[externalFile]{ex:foo}". Similarly, I want the exercise book to make references to sections in the main book. Is this possible? (I have a vague feeling that I once found a package to do this, but cannot remember the name anymore, and googling is not doing the trick)
Thanks! Kevin
Upvotes: 3
Views: 77
Reputation: 2832
Use the xr package:
\usepackage{xr}
\externaldocument[ext:other:]{otherdoc}
\ref{ext:other:ex:foo}
Upvotes: 1