On Wednesday 31 July 2002 9:29 pm, David Kastrup wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> > Lars Gullik Bjønnes wrote:
> > > | 3. Would people like a Preview of such Input?
> > >
> > > sure.
> >
> > Oh my god! It works! See attached!
>
> This is all a secret plot from envious Emacs users that want LyX
> development to stall by incurring a lethal eye candy dependency on
> core developers.

Only on one I'm afraid, and he's just rewarded himself with candy after 
working like a dog for a few weeks. The grind will start again so emacs will 
have to fend for itself once again.

> > Questions:
> > 1. Does it make sense to preview anything other than Input?
>
> Uh, yes.  But this very much depends on the document in question.
> See a few examples on the <http://preview-latex.sourceforge.net> homepage.
> Other obvious candidates are figures, tables, includegraphics (you'll
> tell me that LyX already previews them in its own way, but does that
> include psfrag replacements?), picture environments, pspicture,
> psmatrix and so on.  Of course, with nested such things, just take
> the outer one.

This was actually a LyX specific question. We have an inset that wraps 
LaTeX's include, verbatiminput and input commands. I was using an input 
command here. Does it make sense to generate previews for the others too? 
Probably not is my guess.

> Since this is actually a Pandora's box, preview.sty offers a few
> default settings for extractions, and an elaborate LaTeX-based scheme
> that lets the user specify the components to be extracted to LaTeX
> either in the document preamble or in separate configuration files.

Well here the math stuff is stand-alone, so it makes sense to just generate 
previews if a global previewsActive flag is set. Thereafter everything in LyX 
is an inset. Each inset can have a local wantPreview flag. Bingo!

> Emacs itself has no clue about what previews the LaTeX run might turn
> up and where, but with the "auctex" option set, each of the preview
> snippets causes an error message to be generated at the start and end
> of it, and those error messages provide the needed correlation between
> exact buffer positions of the snippet and the produced image files.

Well the positioning stuff "just works" with LyX. Other than that, it too has 
no clue about what an inset is doing. It just gets told about the dimensions 
of the inset and provides a painter for the inset to do its stuff with.

Angus

ps. It's great candy! Thanks!

Reply via email to