[pdftex] Caching intermediate compilation results for near-real-time PDF re-renders during editing

Jim Diamond jdiamond at acadiau.ca
Fri Jan 14 02:25:01 CET 2022


Hi all,

On Thu, Jan 13, 2022 at 16:36 (-0700), Karl Berry wrote:

> Hi Jamie - thanks for the interesting message. Thanh could say more, but
> FWIW, here are my reactions (in short, "sounds impossible").

>> My understanding of pdftex is that it operates on a per-page basis.

> Plus about a million global variables representing the state of
> the compiler. (All the TeX engines are similar in this regard, having
> inherited their basic architecture from Knuth's tex.web.)

I recognize that you are employing hyperbole for effect here.  But
thinking about the OP's question, I wonder... just how many variables
are in play after a shipout?

>> Suppose a small change is then made to the latex source, such that the
>> compiler determines this change would first affect page k.

> I can't imagine how that could be determined without retypesetting the
> entire document.

Currently, various editors and document viewers can do lookups and
reverse lookups so that one can go from a point in the source doc to
the corresponding line in the compiled document, and vice versa.

> There is no way to predict what any given change will affect.

Is that really true?  ***Except for multi-page paragraphs (bah!),
tables and similar***, is it possible for a change on page N of a
document to affect anything before page N-1?  (While I can see change
to a word in a continued paragraph on page N changing the typesetting
of that paragraph, and thus possibly how page N-1 should be laid out,
can page N-2 be affected?)

I will admit I post this on a public forum recognizing that I may end
up looking like a total ignoramus.  I'll look at it as a bit of
"life-long learning".  :-)

>> possible in principle because this is the basis of operation of BaKoMa
>> TeX, which I have used for years.

> That is amazing. I wonder if Malyshev's heirs can somehow be contacted
> to get the source freed. We have had no luck even finding notices
> beyond the bare fact of his death :(.

>> I believe very strongly in the benefits of ultra-fast recompilation

> I agree, but can't conceive of how Basil implemented what you describe.
> A failure of imagination on my part, no doubt. --best, karl.

It does make for an interesting puzzle, don't you think?

Cheers.

                                Jim


More information about the pdftex mailing list.