[texhax] \include Chapter1} does not work

John C Frain frainj at gmail.com
Mon Oct 24 15:04:12 CEST 2011


Just a brief comment.  Any "Latex" editor (LaTeX IDE) that I have used
has some special facilities for dealing with master an included files.
 The method used by each IDE differs from IDE to IDE and one might
consult the manual for details.  Some (e.g. Emacs, TeXWorks) use a
similar system, to that described by Herbert, of adding comments to
the master and included files). Some (eg TexnicCenter and, I think
current versions of Winedt) set up a project file that specifies the
master and included files. In using these one opens the project file
rather than the master.  Others (eg TeXmaker) allow one to specify a
master file and exit/enter master mode through the menus.  Kile has
project management facilities but will recognise the master file
automatically.   These are features of the relevant IDEs and are not
part of LaTeX.  The manual for each IDE contains details of how it
manages multiple files and what, if anything,  needs to be added to
the master and included files.

I would have thought that, with today's increased computer power,
there was less need for \includeonly commands.  I find that large
documents compile in a few seconds.  If on went back 20+ years one
could go for coffee or lunch or take a night's sleep during the
compile run for a fairly large file.

Best Regards

John

On 24 October 2011 12:36, Herbert Schulz <herbs at wideopenwest.com> wrote:
>
> On Oct 24, 2011, at 3:18 AM, Uwe Lueck wrote:
>
>> ...
>> I have never worked with TeXShop, as to how to use it with
>> \include. Some years ago I worked with WinShell. There indeed
>> you had tabs for all input files that were open for editing.
>> WinSh ell did not know which one the master file was,
>> and often it ran a chapter file instead of the master file.
>> It liked to run the file that was edited just before -- typically
>> a chapter file. To avoid this, you had to click on the tab
>> for the master file after editing a chapter file.
>> ...
>
> Howdy,
>
> Thanks for clarifying some of my comments.
>
> I guess I didn't realize/remember (I'm getting old) that TeXShop was being used. Now that I know that I can give one more piece of information that will allow TeXShop to typeset the ``root'' file (i.e., the overall book tex file that has the \include commands) even when you  run the Typeset->Typeset (Cmd-T) menu command with one of the Chapter files being edited. Add a line
>
> % !TEX root = path/to/root.tex
>
> where path/to/root.tex is the absolute or relative path to that root.tex file near the top of the Chapter.tex files. E.g., if the Chapter files are in the same folder as the root.tex (please use whatever name your actual root file is called here) the line
>
> % !TEX root = root.tex
>
> and if the Chapter.tex files are in a sub-folder of the root file the line
>
> % !TEX root = ../root.tex
>
> should be used near the top of each of the Chapter files (the ../ means it's one folder up in the hierarchy from the Chapter file.
>
> Good Luck,
>
> Herb Schulz
> (herbs at wideopenwest dot com)
>
>
>
>



-- 
John C Frain
Economics Department
Trinity College Dublin
Dublin 2
Ireland
www.tcd.ie/Economics/staff/frainj/home.html
mailto:frainj at tcd.ie
mailto:frainj at gmail.com



More information about the texhax mailing list