[tex-k] [comp.text.tex] web2c wish...

Michael John Downes mjd@ams.org
28 Feb 2002 09:49:33 -0500


David.Kastrup@t-online.de (David Kastrup) writes:

> What global state?  My proposal was to use the fork system call in a
> more or less pristine state of LaTeX (either after reading in the
> format, or even after reading the preamble): the forked process
> modifies its own copies of the variables.  When it finishes, the
> parent from which the forks are generated is still in pristine state.

OK. Blame it on my ignorance that I did not understand the implications
of your proposal.

But then I have another question: If the parent remains in a pristine
state, what do you plan to do---if anything---for typesetting something
less than the full document? If you typeset only the third section out
of four, then the section/subsection numbers will show up as 1, 1.1, 1.2
instead of 3, 3.1, 3.2, I suppose?

Or how about an equation containing a \ref or other pointer to
information outside the fragment being processed?

  \begin{equation}
  a=b+c\quad\text{by applying (\ref{xyz})}
  \end{equation}

Offhand it would appear that if the referenced label was in a
pre-existing .aux file, no problem, but if it was a \label added during
the current writing session, the ref would presumably show up as
undefined.

I expect that the practical answer would be: just let LaTeX print
question marks as usual, in the case of a document fragment, and let the
users understand that if they want absolutely everything resolved they
have to do a full document run to ensure that the aux file is updated.

But if you're talking about a programmable editor (and I think you are
:-) the ideal thing to do would probably be to catch the addition of new
labels and do something to ensure that an appropriate call of \newlabel
gets done in some kind of mini-preamble when processing document
fragments.