From 86cb44e2b15b64666820efc6ee7b546d33dcfdba Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Fri, 21 Jul 2023 00:33:24 -0700 Subject: [PATCH] feat: add `auctex` and custom `latexconfig` to emacs Signed-off-by: Lucas Sta Maria --- .emacs.d/include/latexconfig.el | 19 +++++++++++++++++++ .emacs.d/init.el | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 .emacs.d/include/latexconfig.el 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)