1

Suppose we are given a big main .tex file. I wish to use the command \include to import all the other .tex files into the mail .tex file. I heard that to save time, one can in fact only compile the particular file included. But how can I do that if the included .tex file does not have a document class or proper setup for it to typeset on its own?

2

You can use \includeonly command:

\documentclass{book}
\includeonly{nextfile}
\begin{document}
  \include{somefile}
  \include{someotherfile}
  \include{nextfile}
\end{document}

Now only the nextfile will be compiled but all the numbers and other cross reference are properly displayed.

|improve this answer|||||

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.