Le 22/06/2022 à 07:08, Ikumi Keita a écrit :
Ikumi Keita <ikumi@ikumi.que.jp> writes:
Indeed. It seems that xelatex produces PDF incompatible with the
PostScript code which preview-latex sends to Ghostscript to alter
foreground color. Is this recent change in xelatex (or xdvipdfmx)? If my
memory serves, the current PostScript code once worked with xelatex...
Anyway, it seems that we need to ask on gs developers' list again to
revise that PostScript code. :-(
I asked it, but it turned out to be impossible. According to their
explanation,
- PDF file produced by pdflatex doesn't specify the foreground color
explicitly. preview-latex sets up the Ghostscript initialization
to specify the default foreground color, so the text in the resultant
png image is rendered with that color.
- However, PDF file produced by xelatex does specify black as the
foreground color explicitly. Thus the initial default color isn't used
at rendering the png image.
I'll add notification in preview-latex documentation that the preview
images don't follow the foreground color of emacs when xelatex is used.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
Hi Keita,
I tested
(setq preview-pdf-color-adjust-method nil)
If xetex previews are not functional
on dark themes this workaround can
perhaps be useful. Not suggesting that
AUCTeX tries to compare background color
with black to decide when to opt for this
radical fallback behavior...
Best,
Jean-François