“May it be that you encountered a bug in Emacs itself?” ---- This behavior may be different on different OS. I am using emacs-30/pgtk on archlinux, maybe Mac doesn't have this problem, it has different frontend implementation.
I don't have a Mac machine, so I don't know what will happen on Mac. ---- Replied Message ---- | From | Ihor Radchenko<yanta...@posteo.net> | | Date | 03/16/2025 20:24 | | To | gynamics<dybfys...@163.com> | | Cc | emacs-orgmode@gnu.org、emacs-de...@gnu.org | | Subject | Image transparency and alpha background for Emacs frame (was: [Patch] Support png overlay background transparency in a transparent frame) | gynamics <dybfys...@163.com> writes: >> ... the problem you are trying to solve is >> making LaTeX preview background transparent when your Emacs frame has >> 'alpha-background set to be transparent? >> ... >> However, you can also set :background in `org-format-latex-options' to >> "Transparent". Did you try it? >> >> Generating transparent background from the very beginning should be more >> robust compared to :mask heuristics. > ... > Yes, I have reviewed related code and tried it. Set `:background > "Transparent"` in `org-format-latex-option` only makes sure that latex > will output png images with a transparent background. But to display the > transparent part transparently when my Emacs frame has > `alpha-background` set to be transparent, currently `:mask heuristic` > seems to be the only way, afaik. CCing emacs-devel. May it be that you encountered a bug in Emacs itself? It seems counter-intuitive that images with transparent background do no honor frame transparency. But Emacs display is complex, so I'd like to hear from Emacs experts. Maybe I am missing something. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>