On 24/03/2011 10:55 AM, veno...@arcadiaclub.com wrote:
I would suggest one more: - remove eqn. numbers from previews; they tend to be wrong anywayIsn't this too specific as a solution? I think there are several other things wrong we'll probably never know.
I don't think it's too specific. The bug report is specific: combine eqn. numbers/hyperref/preview/dvi. Remove any component to remove the bug. But it might be too radical a solution.
Yet these are just workarounds. I try to catch attention of other developers on how best to tackle this. It seems that ideally, the previews would be broken down into several .tex files, each to be processed by the intended backend. venom?The things works like this: call latex on the .tex file (containing all the IP insets) and create a unique .dvi file. Then we find all the pages (IP insets) containing postscript literals (which dvipng can't handle) and create a new tex file with those pages and give it to the legacy method (latex+dvips+gs). Maybe we can add a third fallback level based on pdflatex. I think it would be much better to manage all the IP generation in a unique place (that is Python scripting). This would work with all the possible input, even if the last cases would be a little slow. venom00
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. Or, have a third option as fall back, as you said.
I agree that having the handling done in the python script is a good way to go.
-- Julien
ip-hyperref.lyx
Description: application/lyx