Change compile-command for tex-mode
This commit is contained in:
parent
f316065c93
commit
745d704eb7
11
init.el
11
init.el
@ -819,7 +819,16 @@ COMMAND and COMINT are like `compile'."
|
|||||||
|
|
||||||
;; (La)TeX
|
;; (La)TeX
|
||||||
(use-package tex-mode
|
(use-package tex-mode
|
||||||
:hook (latex-mode . eglot-ensure)
|
:hook ((latex-mode . eglot-ensure)
|
||||||
|
(tex-mode . my/-setup-tex-mode-compile-command))
|
||||||
|
:init
|
||||||
|
(defun my/-setup-tex-mode-compile-command ()
|
||||||
|
"Setup `compile-command' for `tex-mode'."
|
||||||
|
(let ((quoted-name (shell-quote-argument buffer-file-name)))
|
||||||
|
(setq-local compile-command
|
||||||
|
(concat "latexmk -pdf "
|
||||||
|
"-auxdir=" quoted-name "-build"
|
||||||
|
" " quoted-name))))
|
||||||
:config
|
:config
|
||||||
(add-to-list 'auto-mode-alist '("/\\.latexmkrc\\'" . perl-mode)))
|
(add-to-list 'auto-mode-alist '("/\\.latexmkrc\\'" . perl-mode)))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user