next up previous contents
Next: Checking and Printing Up: An Introduction to Using Previous: Making Life a Little

Working with Large Files

latex is well-suited for working with a large document like a thesis. For instance, the \ref{ } command makes it easy to work on a long document without spending lots of time updating cross-references. However, you may find it frustrating to wait as latex works through your entire 150-page document just so that you can see whether a diagram looks all right. Fortunately, there is a way to get around this.

First of all, divide your file into smaller files containing, say, the chapters of your thesis. We'll suppose these files are chapter1.tex, chapter2.tex and so on. Then, create a master file, say thesis.tex, that looks like this, for example:


Obviously, you should use whatever \documentclass command is appropriate, and put whatever \newtheorem commands you are using before the \begin{document}.

Now when you use latex on the file thesis.tex, latex will read in the different chapters from the files you specified. Now, suppose you are working on Chapter 5 and haven't changed the other chapters. Then by putting the command

between the \documentclass command and the \begin{document} command, you can tell latex to re-process only Chapter 5, and ignore the other \include commands. However, latex will remember the \label{ } commands from the other chapters, so that all the \ref commands in Chapter 5 will be okay. Also, latex will remember that the \chapter{ } command which, presumably, appears at the beginning of the file, should start Chapter 5, not Chapter 1.

Processed by LaTeX2html