[texhax] Large Project

Henry Law news at lawshouse.org
Wed Dec 23 11:16:16 CET 2009

Patrick M. Rutkowski wrote:
> How the heck do people go about writing 20+ page projects in TeX?

Patrick, I'm currently "managing editor" for a geology book which tops 
out at about 160 graphics-heavy pages, the chapters of which format in 
seconds (we don't do the whole book at the moment), so be reassured that 
there is an answer to your problem!

Along the lines of what others have posted, I suggest you create a 
"driver file" which contains package includes, command definitions and 
other common stuff.  Have it include a separate file for the front 
matter (title page, list of figures, ... all the stuff that typically 
has roman numerals for page numbers), and then one for each chapter (or 
other major section).  If you have back matter (bibliography, 
acknowledgements, index ...) then make each of those separate files as 
well.  Call your "driver" file something that makes sense for your 
document, and then give the other files names that start with the same 
string and have "-1", "-2", "-glossary", suffixes.

Now the best bit.  Look up the \includeonly command.  It will allow you 
to format just one chapter (actually more than one if you wish), but in 
such a way that page numbers are maintained, references come out and so 

So if your project is called "foo", your driver file is foo.tex and 
looks like this:

% all your definitions and \usepackage statements not shown

\includeonly{foo-1}  % format only chapter 1, in this instance


\include{foo-0}      % front matter
\include{foo-1}      % Chapter 1
\include{foo-2}      % Chapter 2 ... etc
\include{foo-gloss}  % glossary
\include{foo-ack}    % acknowledgements


Using pdflatex, find out about the "-jobname" parameter, which allows 
you to output into "foo-chapter1.pdf" (for example) when you're 
formatting just chapter 1, and so on.


Henry Law            Manchester, England

More information about the texhax mailing list