doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.39k stars 3.05k forks source link

Can't change latex-to-pdf compiler for org #5172

Open nerosun64 opened 3 years ago

nerosun64 commented 3 years ago

What did you expect to happen?

I need to change latex compiler from pdflatex to xelatex. I've expected that changing org-latex-compiler and/or org-latex-compilers variables and/or setting #+LATEX_COMPILER org header will change my latex compiler.

What actually happened?

Latex compiler didn't change. pdflatex is used instead of xelatex.

image

Describe your attempts to resolve the issue

I've searched all standard ways of changing latex compiler for org's export. I've set variables in my config.el:

(after! org
  (setq org-latex-compiler 'xelatex)
  (setq org-latex-compilers '("xelatex")))

Also I've set header #+LATEX_COMPILER: xelatex in my org file. After that, I've synced my configuration with doom sync and confirmed that those variables is set.

image

image

Googling "doom emacs change org compiler" and "doom emacs change latex compiler" gives nothing useful up to 3d page. Setting those variables in vanilla emacs works as expected.

Steps to reproduce

In my init.el those flags is set for latex and org:

(org +brain +dragndrop +gnuplot +noter +pomodoro +present +pretty +roam)
(latex +lsp +cdlatex +latexmk)

System Information

https://pastebin.com/sptznH9H

ymarco commented 3 years ago

Evaluating (setq org-latex-compiler "xelatex") (via SPC ;) in an org buffer and then running the export (via SPC m e l o) works for me.

nerosun64 commented 3 years ago

Update: problem appears only if Body only switch is on (space m e C-b in default configuration). After setting Body only to off export works as expected - xelatex is used.