> The user should not need to 
> know these details of the preview generation. Instead, the preview machinery 
> of LyX should be smart enough to use the right method automatically.

Georg, trying first in a way and then in the other seems useless to me, just a
delay. There's nothing that the legacy method can't render AFAIK. However, by
the test I've done with a small app I wrote, dvipng is quite faster in effect,
legacy requires from 15% to 75% more time, using LyX I didn't noticed it.
Detecting packages unsupported by dvipng is not that simple, probably there are
a lot of packages with this problem, moreover you can't just check just for
PSTricks, but also all the pst-* packages, which include PSTricks. I'll try to
ask on the preview-latex group to ask them if there's a way to quickly determine
if dvipng will be able to render correctly the tex input or not.

If nothing new comes out, I'll write a patch for lyxpreview2bitmap.py which
detects TikZ and PSTricks and goes directly to the legacy mode.

Ale

-- Test results --
Win32, MiKTeX 2.8
Math_formula: just "3+3=6"
Pstricks: the plot of a function (not working with dvipng)
Simple_latex: plain text LaTeX inset preview
XY-Pic: a simple \xymatrix with some bullets and arrow

file                dvipng              legacy              legacy/dvipng
math_formula.tex    763,04              946,05              123,98%
pstricks.tex        3451,2              675,04              19,56%
simple_latex.tex    864,05              996,06              115,28%
xypic.tex           745,04              1104,06             148,19%

file                dvipng              legacy              legacy/dvipng
math_formula.tex    756,04              970,06              128,31%
pstricks.tex        3983,23             622,04              15,62%
simple_latex.tex    608,03              967,06              159,05%
xypic.tex           681,04              1016,06             149,19%

file                dvipng              legacy              legacy/dvipng
math_formula.tex    764,04              936,05              122,51%
pstricks.tex        3535,2              640,04              18,1%
simple_latex.tex    552,03              967,06              175,18%
xypic.tex           735,04              1100,06             149,66%

Reply via email to