Emacs org-mode 的 inline latex 公式中显示中文

配置了一下生成xdv转svg的方案,目前已经可以显示中文了:

配置:

(setq org-latex-packages-alist '(("" "mhchem" t)
				 ("" "ctex" t)))
(add-to-list 'org-preview-latex-process-alist
	     '(xelatex-ch
	       :programs ("xelatex" "dvisvgm")
	       :description "xdv > svg"
	       :message "You need to install xelatex & dvisvgm"
	       :image-input-type "xdv"
	       :image-output-type "svg"
	       :latex-compiler
	       ("xelatex -no-pdf -interaction nonstopmode -output-directory %o %f")
	       :image-converter
	       ("dvisvgm %f --no-fonts --exact-bbox --scale=%S --output=%O")))
(setq org-preview-latex-default-process 'xelatex-ch)
3 个赞