1
0
Fork 0

fix(emacs): introduce align keybinds for latex

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2024-04-01 11:17:37 -04:00
parent 867fb9f6f9
commit f0178e56f7
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47

View file

@ -84,6 +84,12 @@
(insert "\\frac{" content "}{}")
(backward-char)))
(defun latex-tab ()
"Multi-purpose tab for LaTeX."
(interactive)
(align-current)
(cdlatex-tab))
(defun configure-latex ()
"Configure my custom LaTex environment."
(electric-indent-mode -1)
@ -95,7 +101,8 @@
(setq-local flycheck-disabled-checkers
'(tex-chktex))
(keymap-local-set "C-c C-a" #'align-current)
(keymap-local-set "C-c C-c" #'custom-compile-latex)
(keymap-local-set "C-c C-z" #'open-out-pdf)
(keymap-local-set "C-c C-b" #'latex-insert-block)
@ -104,6 +111,7 @@
(keymap-local-set "/" #'math-insert-frac)
;; For cases where we actually do want `/' in math...
(keymap-local-set "M-/" #'insert-raw-slash)
(keymap-local-set "C-TAB" #'latex-tab)
(keymap-substitute cdlatex-mode-map 'cdlatex-dollar 'cdlatex-math-symbol)
(setq cdlatex-math-symbol-prefix ?$)