I've just submitted my workings on the preview code to CVS. Attached is a 
screen shot of what you can now expect. As you can see, I've just about 
resolved the positioning of the preview on the screen. There may be an 
off-by-one problem.

To get the equivalent of this image yourself, you should add the following to 
your preferences file.

\preview true
\set_color "preview" "#0000df"
\format "lyxpreview" "lyxpreview"  "LyX preview" ""
\converter "lyxpreview" "ppm" "sh LYXSRC/lib/scripts/lyxpreview2ppm.sh" ""

where LYXSRC is ...

You'll also need to grab a copy of preview-latex. I grabbed the most recent 
stable version, preview-latex-0.7.2b.tar.gz from
        http://prdownloads.sourceforge.net/preview-latex

Actually, you'll need just the preview.sty .def and .cfg files that are 
generated by 
        tar xvzf preview-latex-0.7.2b.tar.gz
        cd preview-latex-0.7.2b/latex
        follow the instructions in README-preview
Don't forget to install them someplace LaTeX can find them and remember to 
run texhash or equivalent.

I have not yet addressed the fact that the size of the screenshot fonts is 
different to those used by LyX. If you really don't like this, you can always 
modify lyxpreview2ppm.sh, hard-coding the RESOLUTION parameter rather than 
letting lyX set it.

- RESOLUTION=$2
+ RESOLUTION=124

will give you similar-sized previews to those in the attached image.

Incidentally, if you load a document with LOTS of equations, don't expect to 
see anything soon. We only load the images into LyX once gs has finished 
generating ALL the bitmap files.

I've just tried with a Thesis containing 617 equations. It took gs about 5 
mins to do the work. Thereafter LyX freezes until all these images are loaded 
up into memory.

I think we'll have to do something about that. Presumably the elegant 
solution of loading an image file as it is created might aleviate this 
problem somewhat.

Have fun and a good weekend,
Angus

Attachment: preview.png
Description: PNG image

Reply via email to