GNU bug report logs -
#79332
14.1.0; Running 'preview-Latex' with ```pdfxelatex```
Previous Next
Reported by: 越千仞 <yueqrgg <at> gmail.com>
Date: Thu, 28 Aug 2025 18:22:07 UTC
Severity: normal
Tags: notabug
Found in version 14.1.0
Done: Ikumi Keita <ikumi <at> ikumi.que.jp>
Full log
Message #8 received at 79332 <at> debbugs.gnu.org (full text, mbox):
Hi 越,
>>>>> 越千仞 <yueqrgg <at> gmail.com> writes:
> Auctex works well while compiling with `C-c, C-c', but try to use
> 'pdfxelatex' in preview process. I guess this may due to my config with
> tex-mode, and Gemini could not make it works well. May I get some help?
> THX!
[...]
> And my init_latex.el is as fellow:
> ;; 设置 XeLaTeX 编译命令
> (setq LaTeX-command "xelatex -synctex=1 -shell-escape")
I suppose you intend to force XeLaTeX usage.
> (preview-supports-image-type 'dvipng)
This doesn't work because xelatex produces pdf file, not dvi file.
Comment out those two customizations and try the following (after you
restart the emacs session).
(1) After you open your XeLaTeX document, open the menu
"Command"->"TeXing Options" and select "Use XeTeX engine"
(2) Type C-c C-c (for ordinary typeset) or C-c C-p C-d (for preview-latex).
If it does the trick, Change the default value of `TeX-engine' from
`default' to `xetex' via
M-x customize-option RET TeX-engine RET
. Then the customization will persist across emacs sessions.
> ;; 或者更细致地,为PDF输出的预览指定
> (setq LaTeX-command-for-section-preview '("LaTeX"))
> ;; 为 AUCTeX 的预览功能显式指定编译命令
> (setq Preview-LaTeX-command "latex -synctex=1 -shell-escape")
> ;; 强制预览使用 XeLaTeX 方案
> (setq TeX-command-run-scheme '((_region_ . "XeLaTeX")))
> ;; 或者更通用的设置 (但可能影响其他模式)
> (setq TeX-command-run-scheme '("XeLaTeX"))
AUCTeX doesn't have these four options. Why do you have them? Perhaps
some other package(s) offer them?
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
This bug report was last modified 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.