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

Douglas Kojetin djkojeti at unity.ncsu.edu
Wed Mar 24 20:20:30 EST 2004

Well, it's by no means perfect at this point.  I'm using a system
similar to yours.  Just make sure you use \input instead of \include in
included files (apparently an included file cannot \include another
file, but can \input another file).

% test.tex

\include{chapter1}
%\include{chapter2}
%\include{everything}

\end{document}

I still have to fiddle .. but it's better than what I was doing in the
beginning!

Doug

On Mar 24, 2004, at 8:07 PM, Andrew Perrin wrote:

> On Wed, 24 Mar 2004, Douglas Kojetin wrote:
>
>> Ah.  Thanks!  I guess I'm cheating in that I don't have a 'makefile'
>> (I
>> simply hit 'typeset' in TeXShop).  However, based on your advice, I
>> figured out how to modify my main file to include either a single
>> chapter or the entire document.  Woo hoo!
>
> If you're willing to share, I'd appreciate seeing the solution to
> this. I
> don't know make, so don't use makefiles, so my usual solution is to
> create
> a preamble.tex file, then the main document is:
>
> \input{preamble}
> \include{...}
> \end{document}
>
> but that still requires some fiddling to LaTeX just particular
> chapters; I
> end up either having lines in those chapters that are commented out
> when
> running the whole book, or alternatively using shell files (i.e., files
> with only one \include{} in them), or sometimes using \includeonly.
> None
> of these is optimal!
>
> ap
>
> ----------------------------------------------------------------------
> Andrew J Perrin - http://www.unc.edu/~aperrin
> Assistant Professor of Sociology, U of North Carolina, Chapel Hill
> clists at perrin.socsci.unc.edu * andrew_perrin (at) unc.edu
>
>
>
> --
> TriLUG mailing list        :
> http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc
>