Does anyone know how to provide references through a file rather than by compiling labels? Specifically, I want to compile only a specific part of a LaTeX file into a PDF, but I want to make sure that the reference numbers and section numbers are consistent with the PDF of the entire file.


It sounds like what you want is to use LaTeX's \include mechanism. It allows you to specify only specific parts of the document to be compiled while keeping references/pagination/etc. the same as for the whole document. \include works like input except that you don't provide the .tex extension and every \include implicitly starts a new page. E.g.,

\includeonly{chapter1,chapter2} % leave out \includeonly to compile whole document
  • The \includeonly was what I was looking for thanks. – Tae Hyung Kim Aug 28 '20 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.