[texhax] \include Chapter1} does not work

John C Frain frainj at gmail.com
Sat Oct 22 01:44:26 CEST 2011

---------- Forwarded message ----------
From: John C Frain <frainj at gmail.com>
Date: 22 October 2011 00:41
Subject: Re: [texhax] \include Chapter1} does not work
To: Adolf Giger <ajgiger at comcast.net>

There is some kind of missunderstanding here.

If test.tes is the master file it should contain something like


\title{Title of Book}



Then chap1.tex will contain

\chapter{Chapter 1 Title}
Chapter 1 text follows here

(ie the contents are the same as if they were included in the main
document and extracted to this file.

Following your scheme chap2.tex will contain

\chapter{Chapter 2 Title}
Chapter 2 text follows here

If a (master) LaTeX file contains seveal \include statements the
compile may be restricted to the master file and those files listed in
an \includeonly statements in the preamble to the master file.

For the purpose of a LaTeX run Latex proceeds as if the \include file
is simply inserted in the masterfile at the point of the \include
statement.  If the preamble contains a \includeonly statement only the
files listed in that statement are "included".

I hope that this helps

Best Regards


ajgiger at comcast.net> wrote:
> Herb,
> I tried as suggested, and to make the situation more clear I have attached a
> 5 page pdf  with LaTeX source and pdf files. You may be able to quickly find
> the problem in these pages. I am really reluctant to bother you again with
> this problem. Or is it something that should be made more clear for other
> novices in LaTeX as well?
> Thanks   Adolf
> On 10/18/11 4:39 AM, "Herbert Schulz" <herbs at wideopenwest.com> wrote:
>> On Oct 17, 2011, at 7:37 PM, Adolf Giger wrote:
>>>> Herb Schulz et.al.
>>>> Thank you very much for your replies and your efforts to answer my puzzle.
>>>> Unfortunately I am still not where I am supposed to be.
>>>> Herb Schulz asks about my directory structure, something I am very weak
>>>> about.
>>>> I can give you the location of my tex files. Starting on my Mac's Home
>>>> Folder
>>>> it goes like this:
>>>> --Documents---AJGTexFolder---AJGbook---{AJGbook.tex, AJGbook.pdf..log...aux
>>>> which are all LaTeX generated files here}.
>>>> There are other Tex files in Applications(TeX) and in the Home Folder
>>>> Library(TeXShop).
>>>> I have used amsbook to prepare a rough outline (a mock-up) of my book, and
>>>> have been able to make it look to my satisfaction, including titlepage,
>>>> table
>>>> of contents, intro, 2 chapters with figures, appendix and biblio. I was even
>>>> able to tweak chapter, section and subsection numbers and font sizes. All
>>>> this
>>>> is in the single file named AJGbook.tex.
>>>> I suspect that I have to generate something like Chapter1.tex to make
>>>> \includeonly and \include work, but doing it from within my existing
>>>> AJGbook.tex has not been successful.
>>>> Perhaps, do I have to start an entirely new TeX session for each chapter,
>>>> using the same preamble I used for AJGbook.tex? And then assemble the book
>>>> from these many separate TeX sessions?
>>>> Adolf J Giger
>> Howdy,
>> Yes, you supply the ChapterN.tex files. They are ``generated'' the same way
>> you ``generated'' the AJGbook.tex files from within TeXShop. You then use
>> \include commands so that when you typeset AJGbook.tex using pdflatex (by
>> default with TeXshop) and it will read in the ChapterN.tex files you include
>> (and if you have an \includeonly command it will not include the ones missing
>> there).
>> Good Luck,
>> Herb Schulz
>> (herbs at wideopenwest dot com)
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org

John C Frain
Economics Department
Trinity College Dublin
Dublin 2
mailto:frainj at tcd.ie
mailto:frainj at gmail.com

John C Frain
Economics Department
Trinity College Dublin
Dublin 2
mailto:frainj at tcd.ie
mailto:frainj at gmail.com

More information about the texhax mailing list