Le 31/05/2015 16:12, Enrico Forestieri a écrit :
On Sun, May 31, 2015 at 01:24:05PM +0200, Kornel Benko wrote:

Am Sonntag, 31. Mai 2015 um 00:53:41, schrieb Enrico Forestieri <for...@lyx.org>
commit ad0d0f6d69a7acd6e99f7858f08b427a28d8f8cc
Author: Enrico Forestieri <for...@lyx.org>
Date:   Sun May 31 00:52:49 2015 +0200

     Really fix bug #9354


This is still not working in branch for redefined macros.
(Works in master as implemented by Jürgen)

Try the attached. (The second definition of \qG is different, but the preview
is not changed)

Thanks, should be fixed now.
This has nothing to do with bug 9354, though.


In fact it does not work entirely in master. There is a regression (after bc47054b I believe) because compilation can now fail due to \renewcommandx being used without the command being defined prior to that (try the attached lyx-bug-renewcommandx.lyx). (Stable is fine in this regard after your commit 9285f338, it seems.) <http://www.lyx.org/trac/ticket/6369>

One quick solution would be to prepend all \renewcommandx\a{b} with \providecommand\a{}.


Here are other conclusions from my test of stable and master this week-end:

1) b3d2ffc0 introduces a regression in stable and master wrt 2.1.3. See the attached lyx-bug-font2.lyx. This is because legacy_lyxpreview2ppm.py now includes the font lmodern (L236). I do not understand this addition: font setting is already done in the preamble. Removing the line fixes the issue.

2) In master, preview incorrectly calls latex instead of pdflatex if the default output format is set to "default". More details in the attached lyx-bug-microtype.lyx. (It causes the instant preview to fail, while the "default" (pdflatex) compilation with Ctrl+R succeeds.) Stable also fails because it seems to call latex instead of pdflatex all the time, but it does not appear to be a regression wrt 2.1.3.

3) As reported in #6369, "InstantPreview multiplies math macros definitions". Although the particular compilation issue has been solved, the duplication of macro definitions is not fixed. This has performance consequences. In stable and master, opening a moderately-sized math article (10-20 pages) with instant preview activated results in 75s of full CPU usage (and more when latex is called incorrectly instead of pdflatex), 55s during which LyX is unresponsive (and just generates the tex file). The instant preview tex file is 550000 lines long and is 16MB big, mainly comprised of macro definitions (maybe there is another performance bottleneck, but this is probably one). So instant preview is still unusable for me (at least until the instant preview inset supports math macros---BTW the patch <http://www.lyx.org/trac/attachment/ticket/9354/9354.diff> works well for me).

4) Using Ctrl+Mousewheel to zoom sometimes results in a preview of the wrong size. LyX recreates the previews when zooming, and sometimes we end up with an intermediary size of preview inconsistent with the size of the text (race condition?). (BTW why redoing preview from scratch when the pdf is already generated? Why not keeping the each preview as a pdfs, displayed on the fly by LyX using Cairo, when actually needed? This sounds vastly more efficient.)

3+4) Zooming with Ctrl+mousewheel is impossible with instant preview activated in a reasonably-sized document as a combination of 3) and 4). LyX freezes as soon as we touch the mouse wheel. (Both master and stable. Regression from 2.1.3. Same suggested solutions as 3 and 4.)

5) I find that the preferences dialog is counter-intuitive, with the distinction between Save, Apply and Close. I don't see the point of applying without saving (e.g. I think I have disabled instant preview, but then I find that it is reactivated the next time I run LyX). To add to the wish list of UI improvements...


Thank you, have a nice day.

Attachment: lyx-bug-renewcommandx.lyx
Description: application/lyx

Attachment: lyx-bug-font2.lyx
Description: application/lyx

Attachment: lyx-bug-microtype.lyx
Description: application/lyx

Reply via email to