[texhax] all purpose main tex file
Philip G. Ratcliffe
philip.ratcliffe at uninsubria.it
Fri Oct 19 10:46:25 CEST 2007
> I like to setup a 'main' tex file composed of 'input' and 'include'
> s, as much as possible, such that for a book or an article I simply
> call the corresponding preamble and 'include' files, instead of having
> two distinct files such as 'main-book.tex' or 'main-article.tex'. Is
> this a good idea and does it really streamline compiling and properly
> laying out the output files, and file management in general?
The smple answer is "yes". How much depends on the complexity on exactly
what you're doing and how easy it is to prepare input files that may be used
equally in a book and an article.
> Do you
> have a template to share, or offer specific guidelines for achieving
> this objective? Thank you all.
No. Just use \include{filename} as much as possible (instead of \input), but
beware: you cannot nest includes. Then in your preamble
\includeonly{file1,file2,...} will allow selective compiling, which can
speed things up if you're writing a large book, say.
Cheers, Phil
P.S. The various manuals available do explain most of this pretty clearly.
More information about the texhax
mailing list