On Mon, Jan 10, 2011 at 09:11:25PM +0100, Pavel Sanda wrote:
> [email protected] wrote:
> > I've attached a patch which waits for the a snippets to be rendered to start
> > with the next one, this doesn't lock the UI with the math guide and allows 
> > to
> > choose for each snippet which method to use (dvipng or legacy).
> > What do you think? Is it a stupid enough solution? :)
> 
> ideologically yes :)
> 
> > It's just a stub, but I want someone to test it before making it nicer.
> 
> patch can't be applied (patch: **** malformed patch at line 39: @@ -539,11 
> +559,8 @@)
> also please send the attachment not as application/octet-stream but as simple 
> text,
> eg text/plain so others can directly read and comment on it.
> 
> also on the first sight this can't work, i dont see any error detection 
> there...

I would try a different approach. Currently, all previews are generated
from a single dvi file. However, each preview snippet is contained in a
separate page, so I would use dviselect to extract all pages and process
them one by one in the python scripts. In this way, latex is called only
once and only the failing preview snippet would be skipped.

Looking at legacy_lyxpreview2ppm.py, I see that when latex or ghostscript
fails, the conversion is aborted, even if some snippets were already
generated. Replacing the error() with warning() calls, the already generated
snippets are used.

I have no time to work on this, though.

-- 
Enrico

Reply via email to