[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Overlay mechanic improvements

From: Stephen J. Turnbull
Subject: Re: Overlay mechanic improvements
Date: Tue, 30 Sep 2014 10:21:25 +0900

Richard Stallman writes:

 >     > Does this mean you turn off display of the image on the
 >     > overlay when the text in that region is changed?
 >     Very much so, yes.  Changing the text in the region would be a
 >     pain if you could not see it, and changing it breaks the
 >     correspondence between text and image anyway.
 > I see.
 > But you keep the overlay in existence -- how come?

Why do you care?  David knows his business, isn't that good enough?
(These are real questions, not an attack.  It would be easier to
answer your questions informatively if we knew where you are going.)

In most cases the object is something, such as an equation, which is
marked by explicit delimiters, so unless you actually delete the
delimiters or add new ones, it makes sense to keep the overlay which
provably still contains the correct boundaries[1], rather than re-parse
the relevant region, and change only the image associated with the
delimited object at next request for the formatted display.

Unlike a fundamentally WYSIWYG application, preview-latex provides no
facility for displaying syntactically incorrect formatted output.[2]
Instead, preview-latex gets out of the user's way, and allows them to
take advantage of AUCTeX's[3] features to ensure syntactically correct
source editing, then provides immediate feedback as to whether the
input LaTeX code is *semantically* correct.  Ie, the source entered
displays as the user expects.

Because it is based on the device-independent rendering system which
will be used to produce formatted content, this feedback is as
accurate as possible in most cases.  Compare with WYSIWYG office
suites, which typically not only produce ugly math, but produce
*different* ugliness on different devices.  They even auto-bogotify
macro features like whether a table gets split across pages depending
on whether it's output to screen or to a printer.

In preview-latex, Emacs is at its text-editing best.

[1]  And it in theory could provide "protection" for the delimiters
against inadvertant corruption, although AFAIK such a feature has not
been added.

[2]  Eg, if you are entering a superscript, theoretically a WYSIWYG
editor could provide a transient raised text-entry field and move the
cursor there.  I don't know if any actually do that.

[3]  AFAIK, preview-latex is heavily dependent on AUCTeX features,
although it probably could be ported to other TeX modes, even *ML
modes, with a more or less great expenditure of effort.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]