> Right. See this example file and revert r37696 locally. The 
> bug appear 
> because with hyperref activated, psspecials appear and we send the 
> numbered equations snippets to legacy method. The legacy 
> method doesn't 
> handle them well. Previously, the dvipng method was used on such 
> snippets and it worked fine. So it seems that only *some* psspecials 
> should be sent to legacy, not all.

You're right dvipng creates the PNG image, but...

> #7303: InstantPreview fails with hyperref
> Comment(by reiguz):
> Infact forcing the dvipng route I receive an "Unrecoverable error" from
> dvipng and GhostScript, but the png is produced correctly, but we've been
> lucky, we can't rely on dvipng in these cases, IMHO.


> Or, have a third option as fall back, as you said.

Adding a third fallback option, that is pdflatex, would solve this and probably
any other possible future problem: if dvipng, the legacy route and pdflatex can
produce a correct output, no one can and the snippet is simply wrong. Well, at
least in most cases :D So I think this is the way to go.

However this is the at least the second time we fight an incompatibility with
preview-latex, we should start considering the possibility to drop it and to
create IP in the standard way. I'm going to study how preview-latex works and
what it does, if automatic crop is the only advantage, we can find another
solution for doing that, maybe with some Python library. In the meantime I'll
write a patch for adding pdflatex as third and last route.

venom00

Reply via email to