On Mon, 10 Jan 2011 00:00:55 +0100
<[email protected]> wrote:
> >     For this, the simple recursive bisection would work.
> 
> I was thinking that too. But we still have the problem of choosing
> between dvipng (quicker) or legacy (needed by PSTricks and TikZ) mode.
    As I'd like to think it through and give some sane opionion, I have
two questions, fundamental for me to fully understand this issue. I have
some ideas for a compromise, but it all depends on some answers:

    1. The advantages of using legacy method are obvious and huge. But
is there any advantage of using dvipng over the legacy one, other than
the speed? (the problem from the other thread does not count as an
advantage, as it is clearly the bug in some LaTeX package).

    2. How the LyX 2.0beta2 currently 'knows' which method to use? Is it
hardcoded to use the legacy method only? Is there any better method?

> >     As a bonus feature, something similar to 'visual instant
> >     warnings' [...]
> Yes, it would be nice, but this would add a problematic layer, as we
> know from the other thread: preview-latex.
    From the POV of the quick testing of LateX code, it wouldn't be too
much of a problem if IP will be misrendered, the warning would still be
given only in the case of an error - and that'd be the whole purpose of
using instant preview there.

    Moreover, I think we can safely assume, that if legacy and dvipng
methods both fail then it is an error (well, a 'warning' at least) that
needs to be corrected by the user.

> >     1. There should be an option to use instant preview for 
> > "math only",
> > for the cases where the user knows about the failing preview 
> > insets, but
> > don't have time to fix these,
> 
> If a piece of code doesn't work why put it a preview inset? Simply
> remove the preview inset, it's not the default for ERT insets to have
> instant-preview.
    Consider the reverse: you've just somewhat changed the environment
(updated MikTeX? hint, hint :) ). Now this large document of yours
suddenly reports a lot of errors, so (as of now) your only choice to
silence LyX is to not use IP at all. That's what I'm trying to predict
and solve before it happens. I've myself encountered it too many times
to believe it will never happen again.

> > [...]
> Yes, it's what I proposed in my last mail. Maybe the best solution
> would be to generate all the math insets together (with dvipng and
> maybe bisection to find failing instant-previews) and all the others
> separately so we can still choose for each one which mode to use
> (dvipng or legacy). Enrico? Pavel? Julien?
    Separate generation of IPs would be slow, maybe too slow for
large documents. Please also read my response to Pavel Sanda.

Regards,
MichaƂ Skrzypek

Reply via email to