[OS X TeX] Syncing in one direction only

Don Green Dragon fergdc at Shaw.ca
Fri Dec 31 05:41:10 CET 2010

Hi Alain,

On 2010-26Dec-, at 6:26 PM, Alain Schremmer wrote:

Below, I've deleted my comments in order to concentrate on your observations.

<<big snip>>

> (1) I have had problems with "I can't write on aux file ... openout". It's mentioned in Companion 2ed, page 901:
> "[...] TeX installations are by default configured to be paranoid (hence p in openout_any = p)" [...] To change that behavior you have to modify the settings in the file texmf.cnf

Well ..... I finally found texmf.cnf and took a look! Not clear to me why I should change anything there. Thanks for the reference to page 901 in the LaTeX Companion, however, I think the sentence

"They allow you to write only to files below the current directory and not to any files specified with an absolute path name or starting with a dot in their name."

is important. Above 'they' refers to "These TeX installations are by default configured to be paranoid (hence p in openout_any = p)". I will refer back to the above below.

> I did it following Bruno Voisin's instructions on this list on March 22, 2007 1:35:26 PM EDT

I have not done that! Since texmf.cnf is such a brief file (here), what is in yours?

> (2) I have attached a zip of a minimum example which---I just checked---works here.

Well ..... it works here too, in the following sense. If I try to TYPESET (in your examples) either Contents/1.tex or Controls/1.tex, the console consistently gives two main complaints (for example):

No file ../Contents/1.aux


./1.tex:7: I can't write on file `../Contents/1.aux (openout_any=p)

However, when the console asks for a filename, I have responded with, for example, "don" (no quotes), and the typeset completes AND a file don.tex is created and placed in Controls/ never in Contents/. If one examines don.tex it looks like an .aux file to me. After several typesets, I end up with files don.tex, doreen.tex, frank.tex, georeg.tex and each such file is identical and each is located in Controls/.

In brief, the behaviour of your examples is identical to that observed with the examples that I created a couple of days ago. I noted also, that one of your examples creates a page entitle 'Contents' but no table of contents was listed.

However, in all trials, yours and mine, it is necessary to reply to the demand:

Please type another output file name:

In fact, when your file TheBook.tex was typeset, it was necessary to reply to the demand <Please type another output file name:> TWICE and on doing so created files don.tex and rae.tex whose contents referred to the source files Contents/1.tex and Contents/2.tex and they were clearly .aux files although their suffix was .tex not .aux.

It seems to me, that the behaviour observed is totally consistent with what the good book LaTeX Companion claims.

> (3) Re H1: You can typeset a chapter either from the control file or from the contents file. Either way, you get one aux file in each folder (different ones)

At last I can confirm that typesetting works from both Contents/1.tex and Controls/1.tex. However, I do NOT get an .aux file in Contents/. When I reply with the filename "george", for example, then a file george.tex is created in Controls/ and, as claimed above, it looks like an auxiliary file to me. These files are long compared to the 'real' .aux files in Controls/. For example, here is the file Controls/1.aux


and to obtain Controls/2.aux, just replace '1' with '2'.

> (4)	I use %!TEX root = ../Controls/\jobname.tex so as to avoid entering chapter numbers by hand and making mistakes.

I still don't follow your \jobname device! The only reference I could find was in the LaTeX Companion on page 754 and the example did not enlighten me.  :--(  It works though!  :-)

> (5)	I don't think that
> 		\frontmatter
> 		\tableofcontents
> 		\mainmatter
> 	in the control file for a chapter will get you chapter TOCs. Use titletoc.

Hmmmm! Another package! 

There are a couple of points in your setup that I am at odds with.

In the more realistic examples that I've been testing, if I use your setup, then in each file


with N in {1,2,3,...,20} say, I need a non-null preamble because in Contents/ChapN.tex there are a number of user-defined commands, environments, etc., that are applied. Granted, the preamble in Controls/Chap1.tex might be significantly different than the one in Controls/Chap2.tex. However, I've been using the same preamble for each chapter, hence, using your setup I will end up with N copies of my preamble. This seems to be inefficient. When it comes time to typeset the entire document, then the file TheBook.tex (to use your identifier) must contain that same preamble.

At the moment, the setup I prefer is patterned after what George Graetzer sets out in his book (I think  ;--))

Create the directory MyBook. Attached to MyBook would be subdirectories

	Chap1   Chap2 ... ChapN

and within those subdirectories the various chapters would be created via a file ChapI/ChapterI.tex where I is in 
{1,2, ... ,N}. The root or master file would be MyBook/MyBook.tex which would contain the desired preamble, applicable to all the source files 

	Chap1/Chapter1.tex   Chap2/Chapter2.tex ... ChapN/ChapterN.tex

Other than the preamble, the file MyBook/MyBook.tex would consist mainly of \include commands to form the front matter, main matter, and back matter, plus an \includeonly{...} entry in the preamble when working on a particular chapter. In this way, TeX keeps track of everything (I think) and no manual intervention is needed. 

For example, when MyBook/Chap1/Chapter1.tex is typeset, then TeX creates the accompanying MyBook/Chap1/Chapter1.aux, and so on down the line. After you've completed both MyBook/Chap1/Chapter1.tex and MyBook/Chap1/Chapter2.tex, then a typeset of MyBook/MyBook.tex will create a TOC, LOT, and LOF which TeX remembers and displays when you start working on MyBook/Chap1/Chapter3.tex. I find that very useful when working on chapter 3.

Of course, there would be other subdirectories of MyBook, like AppA, for Appendix A, and so forth .... but the principle is the same.

Sorry for the details, as all this may be familiar to you, but I've been muddling it out after a rather bad start. I don't what to get to chapter 10, and suddenly realize that the whole damn setup should be reorganized.

Thank you for helping.  :-))

Don Green Dragon
fergdc at Shaw.ca

More information about the macostex-archives mailing list