diff --git a/config.org b/config.org index 21d39bb..412bc82 100644 --- a/config.org +++ b/config.org @@ -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