[TriLUG] LaTeX gurus: is it possible to ignore lines on 'include'

David Rasch rasch at raschnet.com
Wed Mar 24 19:20:36 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

you'd do best to make a macro including your formatting directives, and either 
pass it: chapter1.tex (without any formatting or \begin and \end{document} 
directives) or your whole.tex (with the \include{chapter1.tex}).

I typically write a makefile when working with LaTeX to do this building of 
each of the parts or the whole.

David

On Wednesday 24 March 2004 19:09, Douglas Kojetin wrote:
> I figured I'd send this out to the local LaTeX gurus out there (many
> thanks for all the previous help!).
>
> I'm starting to develop a skeleton for my dissertation text.  I plan on
> having a main document that sources my chapter files (using
> '\include{chapter1}', etc.) so as to keep the main file relatively
> small.  I'd like to be able to just work with the chapter files
> individually as I'm working on them, but every once and a while I'd
> like to be able to compile the entire document to see how it all looks.
>
> This is where I foresee (and have seen) problems.  I have document
> formatting statements at the beginning of the chapter files that, upon
> compilation of the entire document (where main.tex uses the \include
> command to source the chapters), I get the obvious errors due to the
> document formatting lines appearing after \begin{document} in the main
> tex file.
>
> Is there a way to comment or ... format, somehow ... the
> document/usepackage(s) in the chapter files so they *are* sourced when
> the individual files are typeset but *not* sourced when the entire
> document is typeset (i.e. upon sourcing a file, it would ignore any
> document/usepackage information)?
>
> If it matters, I'm using TeXShop.
>
> Many thanks (again)!
> Doug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAYiXWNwizLD1M8XoRAuSUAKCN015LYZncC/kKohQ1CtsdBGD2QgCghINP
QT5BQaBlSEF+UinObF8z9ZY=
=Y/4O
-----END PGP SIGNATURE-----



More information about the TriLUG mailing list