emacs 25.3에서 최신 마스터 버전 0.200.10.x Spacemacs
을 사용했습니다. 나는 사용자가 사용하고자하는 라텍스 컴파일러를 정의 할 수 있도록하기 위해 orgmode
documentation으로 권장되는 함수를 구현하려고 시도했다. 함수를 구현했지만 작동하지 않는 것 같습니다. 라텍스 컴파일 단계는 파일 헤더에 지정된대로 xelatex
대신 pdflatex
을 계속 사용합니다. 그래서 나는 어떤 조정을해야하는지 알아 내려고 노력했습니다.orgmode 헤더를 기반으로 latex 컴파일러를 변경하는 함수를 받아들이도록 Emacs`spacemacs '가져 오기
;; Originally taken from Bruno Tavernier: http://thread.gmane.org/gmane.emacs.orgmode/31150/focus=31432
;; but adapted to use latexmk 4.20 or higher.
(defun my-auto-tex-cmd()
"When exporting from .org with latex, automatically run latex,
pdflatex, or xelatex as appropriate, using latexmk."
(let ((texcmd)))
;; default command: oldstyle latex via dvi
(setq texcmd "latexmk -dvi -pdfps -quiet %f")
;; pdflatex -> .pdf
(if (string-match "LATEX_CMD: pdflatex" (buffer-string))
(setq texcmd "latexmk -pdf -quiet %f"))
;; xelatex -> .pdf
(if (string-match "LATEX_CMD: xelatex" (buffer-string))
(setq texcmd "latexmk -pdflatex=xelatex -pdf -quiet %f"))
;; LaTeX compilation command
(setq org-latex-to-pdf-process (list texcmd)))
(add-hook 'org-export-latex-after-initial-vars-hook 'my-auto-tex-cmd)
는 Spacemacs
문제에 따라 list 나는 spacemacs-configuration-layers
에 변화가 a la을 설정해야 :
dotspacemacs-configuration-layers '(
(latex :variables latex-build-command "LaTeX"))
문제 dotspacemacs-configuration-layers
의 변화를 만드는 것은 나를을 적용 할 수 있습니다하지 않는 것이다 파일 별 설정에 따라 변경하십시오.
spacemacs에서 (my-auto-tex-cmd
) 위의 기능을 구현하는 올바른 방법을 아는 사람이 있습니까?