I want to use minted package in my tex file. It needs the command-line option --shell-escape to allow external pygmentize program execution. How can I add that option to the tex engine?
My related code snippets are
(add-hook 'LaTeX-mode-hook
(lambda ()
(setq TeX-auto-untabify t ; remove all tabs before saving
TeX-engine 'xetex ; use xelatex default
TeX-show-compilation t) ; display compilation windows
(TeX-global-PDF-mode t) ; PDF mode enable, not plain
(setq TeX-save-query nil)
(imenu-add-menubar-index)
(define-key LaTeX-mode-map (kbd "TAB") 'TeX-complete-symbol)))
I tried to add (add-to-list 'tex-compile-commands '("xelatex --shell-escape -interaction nonstopmode -output-directory %o %f" t "%r.pdf")), but that doesn't help.
tex-mode? I tried your solution, it didn't work. – Oskar Limka Dec 12 '23 at 10:40describe-variableto findTeX-command-extra-optionsis defined intex.el. It has been a long time since last time I used latex in emacs, I almost forgot how things go. I think you can try to find if the value ofTeX-command-extra-optionswas passed to tex engine first. – Ynjxsjmh Dec 12 '23 at 14:56%%% -*- mode: latex; reftex-mode: true; coding: mule-utf-8; TeX-command-extra-options: "-synctex=1"; -*-but when I xelatex compile by running 'C-c C-cemacs issuesxelatex \nonstopmode\input lecture.texin thetex-shell` buffer. – Oskar Limka Dec 13 '23 at 09:17;mean in your first line, the format looks werid to me. I use it like this. – Ynjxsjmh Dec 13 '23 at 10:58