diff --git a/.emacs.d/include/latexconfig.el b/.emacs.d/include/latexconfig.el new file mode 100644 index 0000000..7fdf896 --- /dev/null +++ b/.emacs.d/include/latexconfig.el @@ -0,0 +1,19 @@ +;;; latex.el --- Configuration for LaTeX +;;; Commentary: +;; Custom configuration for LaTeX editing +;;; Code: + +(defun custom-compile-latex () + "Run the `just' command -- the command I use to compile my environment." + (interactive) + (save-buffer) + (shell-command-to-string "just")) + +(defun configure-latex () + "Configure my custom LaTex environment." + (local-set-key (kbd "C-c C-z") #'custom-compile-latex)) + +(add-hook 'LaTeX-mode-hook #'configure-latex) + +(provide 'latex) +;;; latex.el ends here diff --git a/.emacs.d/init.el b/.emacs.d/init.el index df27c03..75f7998 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -58,6 +58,7 @@ (straight-use-package 'justl) (straight-use-package 'scribble-mode) (straight-use-package 'go-mode) +(straight-use-package 'auctex) ;; ====== Custom ============================= @@ -69,6 +70,7 @@ (load-library "orgconfig") (load-library "mu4econfig") (load-library "racket") +(load-library "latexconfig") ;; ====== Hooks ============================== (add-hook 'after-init-hook 'global-company-mode)