gynamics <dybfys...@163.com> writes: > Emacs has support frame background transparency since 29, add `:mask > heuristic` to overlay property list to make its transparent part masked > when displayed in a transparent frame. > > There is a related thread > [[https://emacs-china.org/t/org-latex-preview-png/29167/12]] . > > This is my first time to try to contribute, if I have anything done > wrong, please tell me!
Thanks for the patch! Do I understand correctly that the problem you are trying to solve is making LaTeX preview background transparent when your Emacs frame has 'alpha-background set to be transparent? By default, Org mode indeed keeps the LaTeX preview background matching background color of 'default face, without accounting for the frame transparency. 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. -- 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>