I'm working on a large-ish Latex document (my dissertation) in which each chapter has its own .tex file. For various reasons, I have two master files: one that includes all chapters and one that I modify over time to compile whatever chapter I happen to be working on at the time.
For the most part, the chapters are independent and resolving references isn't a big deal. But, there's a handful of important results that need to get referenced across chapters and a few times when I need to refer to another chapter, i.e., In Chap.~\ref{ch:other_chapter}, we discuss X, Y, and Z.. As-is, that of course results in "Chap. ??" in the compiled document. I'd really like to be able to hand off a PDF of a single chapter to someone else to review without a bunch of "??" references (and not have to wait for the whole document to compile).
SO.. Supposing that there's only a handful of such references so that it's manageable to do this manually, and supposing that I don't mind if their values aren't quite right, is there a simple way to manually set the label values in my single-chapter master file so that my compiled document a) doesn't have a bunch of undefined references and b) doesn't include an empty chapter that's just there to populate the reference.
I tried something like
% the chapter I'm currently working on
\include{the_chapter}
% so I can reference the next chapter without having to compile it
\setcounter{chapter}{2}
\label{ch:other_chapter}
But then \ref{ch:other_chapter} resolves itself as a Section of the chapter before it.
I don't want to do this:
\include{the_chapter}
\chapter{The other chapter}
\label{ch:other_chapter}
Because this will actually generate a new chapter in the text, TOC, etc.
\includeonly? – Gonzalo Medina Mar 19 '12 at 18:08\includeonly, then your question will evaporate. – Seamus Mar 19 '12 at 18:08\includeonlyis not practical for several reasons; each sheet needs to be its own document. – Raphael Dec 11 '12 at 15:03