added shell escape toggle for LaTeX to Doom Emacs

This commit is contained in:
paul-loedige
2024-04-04 16:27:33 +02:00
parent 7247ed04a2
commit 92ccc46529
+11
View File
@@ -2104,6 +2104,17 @@ This function could also become useful if we ever want to extend the compile com
(lambda ()
(add-hook 'after-save-hook #'custom-tex-compile nil t)))
#+end_src
**** Add shell-escape Toggle Command
#+begin_src emacs-lisp :tangle ~/.config/doom/config.el
(defun TeX-command-toggle-shell-escape ()
(interactive)
(setq TeX-command-extra-options
(cond ((string-match-p "\\_<--shell-escape\\_>" TeX-command-extra-options )
(replace-regexp-in-string "\\_<--shell-escape\\_>" "" TeX-command-extra-options))
((string-empty-p TeX-command-extra-options)"--shell-escape")
(t(format "--shell-escape %s" TeX-command-extra-options))))
(message "TeX-command-extra-options : `%s'" TeX-command-extra-options))
#+end_src
*** Org Mode
**** Dependencies