Latex link separately compiled book

I am writing a textbook and want to put the exercises in a separate book to save space. 2 books will be compiled independently. However, I want the main book to be able to reference sections in the notebook, for example, "See Exercise ~ \ ref [externalFile] {ex: foo}". In the same way, I want the tutorial to make links to sections in the main book. Is it possible? (I have a vague feeling that I once found a package to do this, but I no longer remember the name, and googling does not do the trick)

Thank! Kevin

+3
source share
1 answer

Use the xr package :

\usepackage{xr}
\externaldocument[ext:other:]{otherdoc}
\ref{ext:other:ex:foo}
+1
source

Source: https://habr.com/ru/post/1756992/


All Articles