[OS X TeX] !TEX root

Herbert Schulz herbs2 at mac.com
Sat Jul 15 20:04:33 EDT 2023



> On Jul 15, 2023, at 6:43 PM, Alain Schremmer <schremmer.alain at freemathtexts.org> wrote:
> 
> Somewhere along the line, I gave here my own, simple-minded solution to how to work on separate chapters and, at the same time, be able to see what the result will look like in the whole book—which is necessary to see crossr chapters references as well as having many different views of a chapter source—nice when editing.
> 
>> On Jul 15, 2023, at 18:14, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu> wrote:
>> 
>> I’m simultaneously working on two projects.  One is a book-length project while the other is a single, short article. 
>> For each one, I have a root file and then separate files for individual chapters (resp sections).
>> 
>> I’ve been using method described in section 2.4 of the TexShop Tips and Tricks file for a long time on the book project, but am puzzled by a different behavior by the (very recent) article project. 
>> 
>> Setup:
>> The root file for the book project, Couer.tex,  is in a Dropbox folder  Books->Couer. The chapter files are also all in this folder. The first line of each reads
>> % !TEX root = Coeur.tex
>> and the root file calls them via an \input{filename} command.
>> 
>> The root file for the article, SpaceFillCurve.tex, is in a different Dropbox folder, MyPapers->SpaceFill, and the section files (so far, just one) are in that folder. The first line of each reads
>> % !TEX root = SpaceFillCurve.tex
>> and the root file calls them via an \include{filename} command (I wanted to see how the include option works).
>> 
>> 
>> The style files I am using are in a texmf folder in my Library.
>> 
>> Behavior:
>> In both cases, a command-T on the root file or the output file results in typesetting.
>> In the (older) book project, if I am displaying an individual chapter source file and I click either command-T or the “typeset” button the whole thing typesets.
>> In the new article project when I do this nothing happens, unless I am in the root file.
>> 
>> I should mention, if it is relevant, that I have root/source/output/console files for both projects open simultaneously.
>> 
>> Any suggestions where to look for a fix?  It is relevant if I want, for example, to do bibtex or makeindex.
>> 
>> 
>> 
>> 
>> 
>> Zbigniew Nitecki
>> Professor Emeritus
>> Department of Mathematics
>> Tufts University
>> Medford, MA 02155
>> 
>> telephones:
>> Dept.    (617)627-3234
>> Dept. fax    (617)627-3966
>> http://www.tufts.edu/~znitecki/

Howdy,

Sigh... I know there's a package that will input a file you can typeset (i.e., has a preamble. \begin{document}...\end{document}), eliminate the preamble and \begin{document} and \end{document} and pass the contents of that document to be typeset in the second document. I don't remember what it's called :-( or when it originated but I'm pretty sure it's included in recent versions of TeX Live/MacTeX.

Good Luck,

Herb Schulz
herbs2 at mac.com




More information about the MacOSX-TeX mailing list