preview environment doesn't render in the document in 2.4.0?

Udicoudco udifoglle at gmail.com
Fri Jun 21 18:44:49 UTC 2024


On 6/21/24 11:20, matan guedj wrote:
hello,
> I've just updated from 2.3.7 to 2.4.0 and everything went smoothly but
> the preview environments I have in my files don't render anymore, I
> used to have TeX code in an ERT environment (for plots and graphs) and
> that ERT, inside a preview environment, would render that code inside
> the lyx file itself, but now it doesn't work anymore for the old files
> (any file that I created before 2.4.0 the preview environment doesn't
> work) the output still works as intended.
> just to make it clear that means that the preview environment doesn't
> work for me in all of my older files, even if I write something new.
> it's a minor inconvenience:

Hello matan,

Guessing from the description of your
problem, and from your name, you are
using an RTL script (say hebrew) and
and a dark theme for the GUI.

There was a problem in such cases, even
in LyX 2.3, it was just less noticeable.  The
problem was that the color of the text in the
PDF output of the preview snippet wasn't
updated according to the value of previewed
snippet (which is white by default in dark theme),
and stayed black.

Since the text is black, and your background is black,
you see nothing.  You should have probably encountered
that if you are using XeTeX. In pdfTeX the preview script
isn't producing any pdf output, and with LuaTeX there is
a bug with preview in documents where the main language.

In XeTeX there is also problem with the background color (not just in RTL),
but that can depend on the system as in some of them
we discard the background, while sometimes it stays white
regardless of the background of the GUI.

Note that I've done some work to fix the situation in LyX 2.4.1,
which should be released soon. Since it was the only change
to legacy_lyxpreview2ppm.py, you should be able to copy
the file from https://git.lyx.org/gitweb/?p=lyx.git;a=blob;f=lib/scripts/legacy_lyxpreview2ppm.py;h=78034416365cc6e63ecdfc01c120ca715cc78616;hb=7dcf9611d2867de530a2c77b8fdfabdd9011b19b
to your installation and see if it fixes your problem. If you prefer,
it should be even possible to solve it from the preamble, but
I'll need to think for a minute on the code when I return home.

As for the bug with LuaTeX, I've reported the problem in
https://lists.gnu.org/archive/html/bug-auctex/2024-06/msg00013.html.
It will probably take a while until the fix will be released as I need
to sign some legal stuff from the FSF...
until then it is fixed in LyX.

Udi

> --
> lyx-users mailing list
> lyx-users at lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users


More information about the lyx-users mailing list