I am writing a book, I have a main.tex, Chapter1.tex and Chapter2.tex file.
I have an equation in Chapter1.tex and I want to refereed it in Chapter2.tex.
I have defined the two chapter in main.tex as follows:
\include{Chapter1}
\include{Chapter2}
We assume that the equation is labeled in Chapter 1 under the name \label{eq1}. I have tried to apply This solution. I added \usepackage{xr} in main.tex. Then I added \externaldocument{Chapter1} in Chapter2.tex. However, the result is always (??)
Chapter1.tex and Chapter2.tex as follows:
\labeland\refit is all the same document. – David Carlisle Oct 06 '22 at 08:28\includewhich requires no extra code at all. – David Carlisle Oct 06 '22 at 08:36\includeonly. You can still access chapter1.aux without actually printing chapter1. – John Kormylo Oct 06 '22 at 14:44