[texhax] \include Chapter1} does not work
herbs at wideopenwest.com
Mon Oct 24 13:36:27 CEST 2011
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 the input files that were open for editing.
> WinShell 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.
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.
(herbs at wideopenwest dot com)
More information about the texhax