# [TeXShop] input file and master doc compilation

11 messages
Open this post in threaded view
|

## [TeXShop] input file and master doc compilation

 howdy (again) ! i have a document (book class) in which i input files for each chapter   in order to work only on the chapter in process. this chapter file is   not indeed a tex document, just a piece of text. now imagine i have in the master document the line '\input{./chapitres/ 3e-trigo}' among other things and i'm working on this file '3e-trigo'.   is there a way to compile this file _without_ opening the master   document ? in fact, i have actually to do backwards and forwards all   the time between the master document and the file of the chapter to   see the result of what i'm writing... which it's quite boring !!! hope i'm clear anouth. thanks for answers. sylvain. ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

## Re: [TeXShop] input file and master doc compilation

 Am 03.02.2010 um 23:34 schrieb Sylvain CHAMBON: > this chapter file is not indeed a tex document, just a piece of text. There seems to exist a texnique to dump a special FMT. AUCTeX is set   up to work in a similiar, but I don't know whether the (La)TeX file   needs to have the necessary preamble plus \begin and \end of   {document). I doubt that it can work to leave these statements away... Why can't you just comment the chapters/files you've already finished   in your master document? Then you can easily recompile it time after   time. -- Greetings    Pete Build a man a fire and he'll be warm for a night, but set a man on   fire and he'll be warm for the rest of his life. ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

## Re: [TeXShop] input file and master doc compilation

 In reply to this post by Sylvain CHAMBON On Feb 3, 2010, at 4:34 PM, Sylvain CHAMBON wrote: > howdy (again) ! > > i have a document (book class) in which i input files for each chapter in order to work only on the chapter in process. this chapter file is not indeed a tex document, just a piece of text. > > now imagine i have in the master document the line '\input{./chapitres/3e-trigo}' among other things and i'm working on this file '3e-trigo'. is there a way to compile this file _without_ opening the master document ? in fact, i have actually to do backwards and forwards all the time between the master document and the file of the chapter to see the result of what i'm writing... which it's quite boring !!! > > hope i'm clear anouth. thanks for answers. > > sylvain. Howdy, Put the comment % !TEX root = ../masterfile.tex at the top of 3e-trigo.tex (it called .tex isn't it?) and when you typeset TeXShop will know which file to actually compile. Good Luck, Herb Schulz (herbs at wideopenwest dot com) ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

## Re: [TeXShop] input file and master doc compilation

Open this post in threaded view
|

## Re: [TeXShop] input file and master doc compilation

Open this post in threaded view
|

## Re: [TeXShop] input file and master doc compilation

 On Feb 3, 2010, at 6:41 PM, Herbert Schulz wrote: > > On Feb 3, 2010, at 5:34 PM, Alain Schremmer wrote: >> >> I can thus typeset a chapter from both the Content file and from   >> the Control file. I typeset the whole book once in a while to   >> update the \addtocounter{page} in the control files. > > Howdy, > > But can you start a compile from one of your chapter files? Yes I can. Either from the contents file whose %!TEX root = ../ Chapters-controls/\jobname.tex calls the control file (the chapter   root file) or, of course, from the control file itself. > With the root set to .../\jobname... TeXshop can't possibly find   > the proper root file from within the Chapter file. > You've always got to compile from one of your root files and those > > %!TEX root = ../Chapters-controls/\jobname.tex > > are not doing anything. Your Honor, I am innocent: Nobody told me that so I have been doing   it for over a year! ;-)) Best regards --schremmer ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

## Re: [TeXShop] input file and master doc compilation

 On Feb 3, 2010, at 6:43 PM, Alain Schremmer wrote: > > Yes I can. Either from the contents file whose %!TEX root = ../Chapters-controls/\jobname.tex calls the control file (the chapter root file) or, of course, from the control file itself. > > Howdy, How does TeXshop know'' that \jobname refers to the chapter root file if you simply open the chapter file and try to typeset? Don't you have to open the chapter-control file separately and typeset that? Good Luck, Herb Schulz (herbs at wideopenwest dot com) ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

## Re: [TeXShop] input file and master doc compilation

 On Feb 3, 2010, at 8:18 PM, Herbert Schulz wrote: > > On Feb 3, 2010, at 6:43 PM, Alain Schremmer wrote: > >> >> Yes I can. Either from the contents file whose %!TEX root = ../ >> Chapters-controls/\jobname.tex calls the control file (the chapter   >> root file) or, of course, from the control file itself. >> >> > > Howdy, > > How does TeXshop know'' that \jobname refers to the chapter root   > file if you simply open the chapter file and try to typeset? Don't   > you have to open the chapter-control file separately and typeset that? No. Because the contents file and the control file both have the same   number, say 2. Then, when typesetting Chapters-contents/2, the line %!TEX root = ../Chapters-controls/\jobname.tex calls ../Chapters-controls/2.tex   which is the root file which contains \include{../Chapters-contents/\jobname} namely Chapters-contents/2 that is the original file. I do think that it is a bit perverse but it really works beautifully. Proud regards --schremmer ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

## Re: [TeXShop] input file and master doc compilation

 Alain Schremmer wrote: > > On Feb 3, 2010, at 8:18 PM, Herbert Schulz wrote: > [] >> How does TeXshop know'' that \jobname refers to the chapter root >> file if you simply open the chapter file and try to typeset? Don't you >> have to open the chapter-control file separately and typeset that? > > No. > > Because the contents file and the control file both have the same > number, say 2. > > Then, when typesetting Chapters-contents/2, the line > > %!TEX root = ../Chapters-controls/\jobname.tex > > calls > > ../Chapters-controls/2.tex What Herb thinks (as I did) is that this %!TEX line is executed by TeXShop, which normally does not interpret TeX macros. Thus TeXShop should be looking for a file with the literal file name "Chapters-controls/\jobname.tex", which does not exist. In reality, by some miracle the \jobname macro *is* interpreted correctly by TeXShop. This is different from setting the project root via the "File" menu, which creates a *.texshop file containing the file name. There you cannot use \jobname. >  which is the root file which contains > > \include{../Chapters-contents/\jobname} > > namely Chapters-contents/2 This one is clear, the "\include" line is executed by latex, which knows about TeX macros. > that is the original file. > > I do think that it is a bit perverse but it really works beautifully. -- Martin ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

## Re: [TeXShop] input file and master doc compilation

 On Feb 4, 2010, at 3:21 AM, Martin Costabel wrote: > In reality, by some miracle the \jobname macro *is* interpreted   > correctly by TeXShop. But what a nice miracle!!! I have always been lucky---not that I am complaining. Best regards to all. --schremmer ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

## Re: [TeXShop] input file and master doc compilation

 In reply to this post by Martin Costabel On Feb 4, 2010, at 2:21 AM, Martin Costabel wrote: > > What Herb thinks (as I did) is that this %!TEX line is executed by TeXShop, which normally does not interpret TeX macros. Thus TeXShop should be looking for a file with the literal file name "Chapters-controls/\jobname.tex", which does not exist. > > In reality, by some miracle the \jobname macro *is* interpreted correctly by TeXShop. This is different from setting the project root via the "File" menu, which creates a *.texshop file containing the file name. There you cannot use \jobname. > > Howdy, Yes, you have it exactly correct. TeXShop itself must be substituting the file name (e.g., 2) for \jobname in that comment and accidentally/on purpose :-) the actual file to compile has the same name but along the path given; quite interesting. Of course if Schremmer wants to compile the whole book he must execute that root file directly. Now I'm going to have to try that! TeXShop keeps on amazing me! Good Luck, Herb Schulz (herbs at wideopenwest dot com) ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex