diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2024-04-27 16:46:22 -0700 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2024-04-27 16:46:22 -0700 |
| commit | e950b705540c5371ef1d7efd6bce9d8e36d62f3f (patch) | |
| tree | 1bf043689c8b78c188636e9cc75c7ecbd88f1805 /emacs/personal-lisp/tex-conf.el | |
| parent | e421309a69747803731c15e913d1ff8a37a0cc69 (diff) | |
emacs config cleanup
Diffstat (limited to 'emacs/personal-lisp/tex-conf.el')
| -rw-r--r-- | emacs/personal-lisp/tex-conf.el | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/emacs/personal-lisp/tex-conf.el b/emacs/personal-lisp/tex-conf.el new file mode 100644 index 0000000..4592ce5 --- /dev/null +++ b/emacs/personal-lisp/tex-conf.el @@ -0,0 +1,47 @@ +;; latex stuff +(require 'tex-mode) +(define-key latex-mode-map (kbd "C-c m") (lambda () (interactive) + (push-mark) + (insert "\\[\n\n\\]") + (indent-region (mark) (point)) + (pop-mark) + (previous-line) + (indent-for-tab-command) + )) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;;;;;;;;;;;;;;;; LaTeX ;;;;;;;;;;;;;;;;; +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; ##### Don't forget to configure +;; ##### Okular to use emacs in +;; ##### "Configuration/Configure Okular/Editor" +;; ##### => Editor => Emacsclient. (you should see +;; ##### emacsclient -a emacs --no-wait +%l %f +;; ##### in the field "Command". + +(add-hook 'LaTeX-mode-hook 'turn-on-reftex) +(setq reftex-plug-into-AUCTeX t) + +;; ##### Always ask for the master file +;; ##### when creating a new TeX file. +(setq-default TeX-master nil) + +;; ##### Enable synctex correlation. From Okular just press +;; ##### Shift + Left click to go to the good line. +(setq TeX-source-correlate-mode t + TeX-source-correlate-start-server t) + +;; ### Set Okular as the default PDF viewer. +(eval-after-load "tex" + '(setcar (cdr (assoc 'output-pdf TeX-view-program-selection)) "Okular")) + +(add-hook 'tex-mode-hook (lambda () + (setq spell-fu-faces-exclude + '(tex-math + font-lock-builtin-face + font-lock-keyword-face + font-lock-function-name-face + font-lock-variable-name-face + font-latex-sedate-face)) + (outline-minor-mode 1))) |
