On Tue, Jan 18, 2011 at 08:31:31PM +0100, [email protected] wrote: > Here's the new patch: dvipng encountering PostScript specials was VERY slow > (it > seems to call GhostScripting internally but failing miserably), so I looked > for > another solution. Dvipng has "-pp" parameter which allows to choose which > pages > render, it works great! Simple and effective. I'm using page ranges where > possible as, specially under Win32, too long command lines could give > problems. > The solution is much cleaner: we don't create an alternative DVI and also the > metrics generation is much simpler. > I've tested it with the latest revision from trunk under Win32 and Linux and > seems to work both with Math.lyx and my test file. > As usual, I'm interested on how things work on your side and in your comments.
It works for me. > However, I found a subtle bug in the patch you posted to use "dvips -i", you > were using glob.glob, which doesn't sort the results, so the output PNG > indexes > were messed up. I fixed that with a .sort(). Sorry, it was a quick&dirty patch... > > > I've not yet investigated the XeTeX version of instant-preview, and > > > how it works. I'll do it. > > Not managed in this patch. How many people use XeTeX? Well, it seems that instant-preview is semi-broken when using XeTeX. The preview snippets are generated but they are not cropped, such that any of them takes the space of a full page... Given that, I'd say that your patch is OK, even if it does not addresses XeTeX, because instant-preview is actually unusable in this case. > I also changed PreviewLoader.cpp to ignore files referenced from metrics file > but not actually existing. It was causing a SIGSEV in another part of the > code. Good catch! I'd already noticed it but had no time to investigate. Your patch is an improvement over the current situation, so I am going to commit a revised version. There is a number of preview snippets failing in the math manual, but it seems that hyperref is the culprit here. For example, see: https://bugs.launchpad.net/ubuntu/+source/auctex/+bug/524961 https://bugs.launchpad.net/ubuntu/+source/auctex/+bug/592509 http://bugs.gentoo.org/show_bug.cgi?id=267930 -- Enrico
