[OS X TeX] Syncing in one direction only

Don Green Dragon fergdc at Shaw.ca
Mon Dec 27 00:01:18 CET 2010


Hi Alain,

On 2010-23Dec-, at 8:40 PM, Alain Schremmer wrote:

> On Dec 23, 2010, at 8:57 PM, Don Green Dragon wrote:
> 
>> Now working on the suggestion made by Alain Schremmer.
> 
> It should work but if not, let me know.

I've not been able to replicate your example in the case of two sources files. So I'm missing something. This is the setup:

(1) In a directory ~/Documents/Alain/ I have the three subdirectories:

	Contents	Controls	WholeBook

I'm not yet at your 'ALL' stage.  ;-)

(2) In directory Contents/, I have two 'source' files '1.tex' and '2.tex'. Their content is simply that of longer chapters from which they have been culled. When typeset, each produces about three pages, mostly text, but a teeny bit of math stuff in '2.tex'. Each begins with the comment line:

%!TEX root = ../Controls/n.tex

where n is 1 or 2, as appropriate. The first non-comment line is a \chapter command.

(3) In directory Controls/, there are two 'master' or 'root' files '1.tex' and '2.tex'. Here is the essence of '2.tex'

---------------------------
\documentclass[11pt]{book}

% a very simple preamble which I'm confident is not the problem

\begin{document}
\frontmatter
\tableofcontents

\mainmatter
\addtocounter{page}{3}		% adjust <page> counter to number of pages in 1.tex
\addtocounter{chapter}{1}	% adjust <chapter> counter  so that when \chapter is
				% encountered, then <chapter> will be incremented to 2
\include{../Contents/2}		% includes ~/Documents/Alain/Contents/2.tex
\end{document}
---------------

Structure of Controls/1.tex is essentially the same with requisite changes.

Next is my assumption about the purpose of the .tex files mentioned so far!

H1: When working on the file Contents/1.tex, one initially typesets the file Controls/1.tex and thereafter one can sync back and forth as one repairs or augments the file Contents/1.tex.

H2: Same as H1 with '1' replaced by '2'.

If H1 and H2 and not correct, then please clarify!


Assuming that H1 and H2 are okay, here is what happens:

Before continuing, I note that in the Contents/ directory, the two files '1.tex' and '2.tex' are the only files! In this directory, there is neither a '1.aux' nor a '2.aux' file.


(4) File Controls/1.tex is loaded into TeXShop, and TYPESET is requested. The main console complaint is:

--------------------------
No file ../Contents/1.aux.
) (./1.toc) [1{/usr/local/texlive/2010/texmf-var/fonts/map/pdftex/updmap/pdftex
.map}] [2]
/usr/texbin/pdflatex: Not writing to ../Contents/1.aux (openout_any = p).

./1.tex:28: I can't write on file `../Contents/1.aux'.
\@include ...\immediate \openout \@partaux #1.aux 
                                                  \immediate \write \@partau...
l.28 \include{../Contents/1}
                            		% includes ~/Documents/Schremmer/Contents/1.tex
(Press Enter to retry, or Control-D to exit; default file extension is `.tex')
Please type another output file name: i /Contents/1.aux
(../Contents/1.tex
---------------------------

and --- after my input --- then the PDF version of Contents/1.tex appears and seems to be in perfect order, except for the lack of a table of contents which requires another TYPESET anyway. Notice that, by trial and error, I found that by entering

i /Contents/1.aux

after the prompt "Please type another output file name:" then the typeset would continue. However, NO file Contents/1.aux has been created!!! Consequently, if I try for the Table of Contents with another TYPESET, then the same complaint is lodged.

Same thing happens if I attempt to typeset Contents/2.tex by using Controls/2.tex; i.e., this time, if I enter

i /Contents/2.aux

then the typeset is completed, and, except for the table of contents, everything is correct.

Also, it is NOT necessary to enter what I've recorded above. Something like

i Strange.aux

works equally well, but I can find to trace of of 'strange.aux'.

(5) I created a file MyBook.tex in Alain/WholeBook/ --- no details given here --- and I can typeset it provided i'm willing to enter both

i /Contents/1.aux

and 

i /Contents/2.aux

after the relevant prompts appear on the console window. In fact, I used 'xxxx' and 'yyyy' in one trial, and that worked as well as the i-entries above!?!?!? Perhaps, you can suggest what is missing!


> By the way, I also keep all my preambles in style sheets that I keep in a folder along with the Contents and Controls folders in one project folder.

I'm not quite there, but that is a 'next' step. I want to have a structure that works before doing what you note above. Actually, I have one, but it follows the model that Graetzer outlined.


> You may want to look up http://www.freemathtexts.org/System/Downloads.php

Will look, but not today.  :-)  Thanks for the reference.

Greetings of the Season to everyone, and thanks to the many who have helped with my TeX problems as well as to those persons who continue to upgrade the fantastic TeX system. 


Don Green Dragon
fergdc at Shaw.ca





More information about the macostex-archives mailing list