On Mon, Apr 14 2025, Ihor Radchenko <yanta...@posteo.net> wrote:

> Billy Lei <leiyixi...@outlook.com> writes:
>
>> When using themes with background color set to #000000, and 
>> org-preview-default-process is set to dvisvgm, the LaTeX fragments are 
>> displayed incorrectly.
>>
>> To reduplicate:
>>
>> 1. Switch to a theme with background color set to #000000 (like Modus 
>> Vivendi)
>> 2. Create an org-mode document. Write some LaTeX fragment and press C-c 
>> C-x C-l to preview LaTeX fragment.
>> 3. The LaTeX preview is displayed as a white rectangle.
>
> I am unable to reproduce.
> Here is what I did
>
> 1. cd /path/to/org/git/repo (main branch)
> 2. make repro EMACS=emacs-30-vcs
> 3. M-x load-theme RET modus-vivendi RET
> 4. C-x C-f /tmp/bug.org
> 5. Type in \(x^2=2\)
> 6. C-c C-x C-l
> 7. The preview background is black. Nothing unexpected.

Ihor,

I see the same thing as Billy, both with an up-to-date Org main branch
and 9.7.25. Applying his patch fixes the issue.

Note that step 2 fails for me, with the message:

make[1]: emacs-30-vcs: No such file or directory
make[1]: *** [Makefile:64: org-version.el] Error 127
make[1]: Leaving directory '/home/tester/org/org-mode/lisp'
make: *** [mk/targets.mk:128: autoloads] Error 2

Reproduction:
1. cd /path/to/org/git/repo (main branch)
2. git checkout main && git pull origin refs/heads/main
3. make clean && make
4. launch emacs
5. M-x load-theme RET modus-vivendi RET
6. M-x customize-variable RET org-preview-latex-default-process
   (set it to dvisvgm)
7. C-x C-f /tmp/bug.org
8. Type in \(x^2=2\)
9. C-c C-x C-l
10. M-x customize-variable RET org-format-latex-options RET
    (change :background from default to "Transparent")
11. Redo steps 8-9 on a new equation.

Step 9 will display a white rectangle, step 11 will display the correct image.

Leo

Reply via email to