I did checked the code. I think we should keep it ATM, because:
* This option uses xdv image input type, while dvipng & dvisvgm option
uses dvi (since dvi can't handle CJK characters, xdv is used to )
* LaTeX preview compiler relies on :latex-compiler, and it shouldn't
affected by org-latex-compiler setting, because this setting is used for
exporting org files. While pdflatex can export PDF documents, it can't
generate dvi or xdv files like latex or xelatex.
I think we may add org-preview-latex-process and
org-preview-latex-processes setting if we want to make latex preview
compiler independent. I also agree that the "xelatex" name is
inappropriate. We may change it to "dvisvgm-xelatex".
在 2026/1/1 6:58, Karthik Chikmagalur 写道:
Hi Ihor,
Thanks!
Applied, onto main, after small changes to the commit message and the
NEWS entry.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f30f6dc4bc
I'm working on merging org-latex-preview again, and noticed that there
is a new "xelatex" entry in org-preview-latex-process-alist introduced
in this patch. In the patchset we are providing this is unnecessary
because setting org-latex-compiler to xelatex is all that is required to
generate previews correctly.
I think this is the correct way to handle it -- notice that the
possible preview methods right now are dvipng, dvisvgm, imagemagick and
xelatex -- one of these is not like the others!
The choice of the latex compiler should be independent of the choice of
the image converter, and if a combination is unsupported Org mode should
inform the user of this. The patchset handles this correctly, and
handles previews with lualatex as well.
Just a heads-up that the "xelatex" option will be removed from this
list. Some of the changes made to ox-odt as a result of this change
will be reverted as well. If there's some reason why this shouldn't
happen please let me know.
Karthik