General ⇒ possible to compile only chapter
possible to compile only chapter
that \include:s one-chapter-files.
The problem is that the first command on the first line in these files is \chapter{} and to
preview the document I have to compile the main file.
Here's what I want:
The document is divided into one-chapter-files for easy re-organizing.
The one-chapter-files can be compiled on their own for easy pre-viewing.
Is this possible?
Or is the best solution to exclude \include-lines by %commenting them?
I'm using TeXnicCenter\MikTeX on XP.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
possible to compile only chapter
you could use \includeonly. Here is a good description: Structuring Large Documents.
Stefan
possible to compile only chapter
Code: Select all
\includeonly{chap1,chap2}
I, personally, tend to split my documents into many, many files (read 100+) some of them generated automatically by some external tools/scripts. So I use \input command a lot and the above method doesn't work for me. Instead, I usually have a main file like this:
Code: Select all
\input{preamble}
\begin{document}
\input{body}% not a corpse ;)
\end{document}
Cheers,
Tomek
Edit:
Damn, I have to write faster, Stefan beat me to it

Re: possible to compile only chapter
My thesis writing just got an order of magnitude more efficient.
possible to compile only chapter

Wow, now that's a differenceMy thesis writing just got an order of magnitude more efficient.

Cheers,
Tomek
PS.
If you're constantly recompiling your documents and you're looking for some ways to speed up that process, there are also other possibilities than exclusion of chapters. It's not uncommon that the actual compilation of your document takes much less than loading of all the packages, so exclusion of chapters doesn't help all that much. In such a case dumping a custom format file from the preamble is a very effective way to cut down on the compilation time.