<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On , at 2016 Apr 22,6:57 AM, Themis Matsoukas wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">TS (3.61) seems to open multiple copies of the same file. I’m working with a root file that calls six chapters by \includefile. Each chapter is connected to the root file by a %!TEX root command. All source files are in the same folder.</div></div></blockquote></div><div><span class="Apple-tab-span" style="white-space: pre; "> </span></div><div><br>This is not directly relevant to your problem but, since you "use root files a lot", I thought I might mention that I once got fed-up with root files, includeonly, and the lot and, after quite a bit of fiddling, ended up with the following file structure, the point of which is completely to separate the TEXT of each chapter from everything else (and make each one typesettable all by itself), and with which I have lived happily ever after. </div><div><br></div><div>What makes it work is the systematic use of \jobname which, at least with TeXShop, allows all files other than those containing the text to be just copies of a generic file. Of course, the structure extends naturally for the ancillaries. See <<a href="http://tug.org/pracjourn/2010-2/schremmer.html">http://tug.org/pracjourn/2010-2/schremmer.html</a>>. </div><div><div><br><br>Book (Folder for EVERYTHING about the book.) which contains the following five folders:</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>• Figures (Folder for the pdfs in the includegraphics)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>1 (Folder for Chapter 1)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>2 (Folder for Chapter 2)<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>. . .<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>n (Folder for Chapter n)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>101 (Folder for Appendix 1)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>• Graphics (Folder for the editable graphics files from which the pdf are made. Intaglio remembers where in Figures to put the pdfs.)</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>1 (Folder for Chapter 1)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>2 (Folder for Chapter 2)<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>. . .<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>n (Folder for Chapter n)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>101 (Folder for Appendix 1)<br></div><div><span class="Apple-tab-span" style="white-space: pre; "><span class="Apple-style-span" style="white-space: normal;"><br></span> </span>• Stylesheets (Folder for<br><span class="Apple-tab-span" style="white-space: pre; "> </span>- GraphicsPaths.sty Which contains just the command<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\graphicspath%<br><span class="Apple-tab-span" style="white-space: pre; "> </span>{%<br><span class="Apple-tab-span" style="white-space: pre; "> </span>{../Figures/1/}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>{../Figures/2/}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>. . .<br><span class="Apple-tab-span" style="white-space: pre; "> </span>{../Figures/n/}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>{../Figures/101/}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>}%<br><span class="Apple-tab-span" style="white-space: pre; "> </span>- Preamble.sty Which is where the \usepackages are listed as well as where the various \definecolor, \newcounter, \newcommand, etc are defined.<br><br><span class="Apple-tab-span" style="white-space: pre; "> </span>• Text-contents folder Which contains ONLY the files that contain the TEXT. So this is the working folder.<br><span class="Apple-tab-span" style="white-space: pre; "> </span>1.tex (Text of Chapter 1)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>2.tex (Text of Chapter 2)<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>. . .<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>n.tex (Text of Chapter n)<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>101.tex (Text of Appendix 1)<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>All these files, from which one can typeset the chapter, start with<br><span class="Apple-tab-span" style="white-space: pre; "> </span>%!TEX root = ../Text-controls/\jobname.tex<br><span class="Apple-tab-span" style="white-space: pre; "> </span>%!TEX TS-program = pdflatexmk <br><span class="Apple-tab-span" style="white-space: pre; "> </span>\chapter{Name}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\ChapterToc</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>followed by the text of the chapter.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>BOOK.tex</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>from which one can typeset the book and which contains only the commands</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>%!TEX root = ../Text-controls/\jobname.tex<br><span class="Apple-tab-span" style="white-space: pre; "> </span>%!TEX TS-program = pdflatexmk <br><span class="Apple-tab-span" style="white-space: pre; "> </span>\mainmatter<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\include{../Text-contents/1}<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\include{../Text-contents/2}<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>. . .<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\include{../Text-contents/n}<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span> where commenting out chapter lines lets one choose which chapters to include in the book.<br><br><span class="Apple-tab-span" style="white-space: pre; "> </span>• Text-control folder (Contains the control files which one usually leaves entirely alone.)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>1.tex (Control of Chapter 1)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>2.tex (Control of Chapter 2)<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>. . .<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>n.tex (Control of Chapter n)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>101.tex (Control of Appendix 1)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>from which one also can typeset the chapter, and which are all copies of the generic file containing the following code:<br><span class="Apple-tab-span" style="white-space: pre; "> </span>% !TEX TS-program = pdflatexmk<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\documentclass[11pt]{book}<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\usepackage{../StyleSheets/Preamble}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\usepackage{../StyleSheets/GraphicsPaths}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\begin{document}<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\addtocounter{page}{n}<span class="Apple-tab-span" style="white-space: pre; "> </span>(where n+1 will be the number of the first page of the chapter.)<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\addtocounter{chapter}{\jobname-1}<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\include{../Text-contents/\jobname}<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\printindex<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\end{document}</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>BOOK.tex<br><span class="Apple-tab-span" style="white-space: pre; "> </span>from which one also can typeset the book and which contains only the following code:</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>% !TEX TS-program = pdflatexmk<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\documentclass[11pt]{book}<br><span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\usepackage{../StyleSheets/Preamble}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\usepackage{../StyleSheets/GraphicsPaths}<br><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\begin{document}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\frontmatter<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\thispagestyle{empty}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\hspace{-12mm}{\Large \textsc{Name of the Book}}<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\cleartooddpage[\thispagestyle{empty}]<br><br><span class="Apple-tab-span" style="white-space: pre; "> </span>etc, etc<br><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\tableofcontents<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\input{../Text-contents/BOOK}<br><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\appendix<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>\include{../Text-contents/101}<br><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\backmatter<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\phantomsection<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\addcontentsline{toc}{chapter}{Index}<span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span>\printindex<br><span class="Apple-tab-span" style="white-space: pre; "> </span>\end{document}<br><br><br></div></div></body></html>