[OS X TeX] !TEX root

Schremmer Alain Schremmer.Alain at freemathtexts.org
Mon Sep 11 20:07:50 EDT 2023


Forgot to say in favor of this “approach”: 
Each of the chapter files can be equipped with an index and, using the  package titletoc, with a toc down to subsections—usually not shown in tocs, which I usually put at the very end and which of course do not show in the full book. 
I have found that extremely helpful while navigating a chapter for editing it.
—schremmer


> On Sep 9, 2023, at 10:28 AM, Schremmer Alain <schremmer.alain at freemathtexts.org> wrote:
> 
> 1. Sorry to be so late: my Mac died and then gmail would not deal with my freemathtexts mail anymore. All is fixed now but it took well over a month.
> 2. You are correct: "you have to enter manually in each of the _copy_ files 1.tex. 2.tex. ... , the number of pages up to and including the last page of the preceding chapter."
> 3. I have used this “approach” for twenty years and I don’t recall having been much inconvenienced by this shortcoming, probably because you can always see the correct page number in the pdf of the whole book.
>  4. Thus, it might perhaps be feasible to do it automatically but my knowledge of latex is extremely limited and I cannot even dream of how this might be done.
> 
> Apologetic regards
> —schremmer
> 
> 
>> On Aug 4, 2023, at 6:11 PM, Murray Eisenberg <murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>> wrote:
>> 
>> It seems you have to enter manually in each of the _copy_ files 1.tex. 2.tex. ... , the number of pages up to and including the last page of the preceding chapter. So then if you edit a prior chapter, you have to go back and change the value of "number" in each of the _copy_ files of the following chapters.
>> 
>> Is there some nice way to update the number-of-pages-up-to-now values automatically whenever you process a preceding chapter?
>> 
>>> On Jul 16, 2023, at 2:28 PM, Alain Schremmer <schremmer.alain at freemathtexts.org <mailto:schremmer.alain at freemathtexts.org>> wrote:
>>> 
>>> As far as that goes, I prefer my own, simple minded, approach: 
>>> 
>>> In the whole book folder, there is only
>>> — a folder that contains the graphics in the format of the graphics app.
>>> — a folder that contains the pdfs thereof to be included in the text.
>>> — a folder “StyleSheets” that contains the Preamble, the GraphicPaths, and such files as definitions of tcolorboxes.
>>> —a folder that contains:
>>> 		—a folder called Text-contents that contains the files called 1.tex, 2.tex … containing the text of each chapter, 
>>> 			    Each of these text files consists of:
>>> 		%!TEX root = ../\jobname.tex 
>>> 		%!TEX TS-program = pdflatexmk 
>>> 		\chapter{The Name Of The Chapter}
>>> 		\ChapterToc
>>> 		Followed by the text of the chapter.	
>>> —for each of the above text files, a copy, also called 1.tex, 2.tex …, of the single following file:
>>> 		% !TEX TS-program = pdflatexmk \documentclass[11pt]{book} 
>>> 		\usepackage{../StyleSheets/Preamble} 	
>>> 		\usepackage{../StyleSheets/GraphicsPaths} 
>>> 		\begin{document}
>>> 		\addtocounter{chapter}{\jobname-1} (To get the Chapter Number the same as in the whole book.)
>>> 		\addtocounter{page}{number} (To keep the pages numbers the same as in the whole book.)
>>> 		\input{Text-contents/\jobname}
>>> 		\printindex
>>> 		\end{document}
>>> 	—a single file for the whole book which consists of:
>>> 				% !TEX TS-program = pdflatexmk  
>>> 				\documentclass[11pt]{book} 
>>> 				\usepackage{../StyleSheets/Preamble}
>>> 				\usepackage{../StyleSheets/GraphicsPaths}
>>> 				\begin{document}
>>> 				         \toc
>>> 					 \input{Text-contents/1}
>>> 					 \input{Text-contents/2}
>>> 					...
>>> 					\printindex
>>> 				\end{document}
>>> 
>>> So, the only files I actually open to work are the text file(s). 
>>> 
>>> Clicking on either one of the two tex files for a chapter will open both together with the pdf of that chapter so I "can edit and typeset the subfiles by themselves” which indeed “can be much faster and is better for your own mental focus.” and “Of course [I] can also typeset the entire document” by typesetting that single file for the whole book.
>>> 
>>> 
>> 
>> ---
>> Murray Eisenberg		murrayeisenberg at gmail.com <mailto:murrayeisenberg at gmail.com>
>> Mobile (413)-427-5334
>> 503 King Farm Blvd #101		
>> Rockville, MD 20850-6667	
>> 
>> 
>> 
>> ----------- Please Consult the Following Before Posting -----------
>> TeX FAQ: https://www.tug.org/mactex/faq/index.html <https://www.tug.org/mactex/faq/index.html>
>> List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/ <https://sites.esm.psu.edu/~gray/TeX/>
>> List Archives: http://dir.gmane.org/gmane.comp.tex.macosx <http://dir.gmane.org/gmane.comp.tex.macosx>
>>                https://email.esm.psu.edu/pipermail/macosx-tex/ <https://email.esm.psu.edu/pipermail/macosx-tex/>
>> TeX on Mac OS X Website: https://www.tug.org/mactex/index.html <https://www.tug.org/mactex/index.html>
>> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex <https://email.esm.psu.edu/mailman/listinfo/macosx-tex>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: https://www.tug.org/mactex/faq/index.html
> List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
> List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
>                https://email.esm.psu.edu/pipermail/macosx-tex/
> TeX on Mac OS X Website: https://www.tug.org/mactex/index.html
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20230911/9066bb82/attachment.htm>


More information about the MacOSX-TeX mailing list