[OS X TeX] !TEX root

Murray Eisenberg murrayeisenberg at gmail.com
Sat Aug 5 00:11:06 CEST 2023

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> 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
Mobile (413)-427-5334
503 King Farm Blvd #101		
Rockville, MD 20850-6667	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/macostex-archives/attachments/20230804/a2e5d9e6/attachment.htm>
-------------- next part --------------
----------- 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
TeX on Mac OS X Website: https://www.tug.org/mactex/index.html
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

More information about the macostex-archives mailing list.