-
Notifications
You must be signed in to change notification settings - Fork 1
/
tex-settings.el
53 lines (46 loc) · 1.97 KB
/
tex-settings.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
;;; -*- lexical-binding: t; use-package-always-ensure: t; -*-
;;; LaTeX with AUCTeX
(use-package tex-site ; AUCTeX initialization
:ensure auctex)
(use-package tex ; TeX editing/processing
:ensure auctex
:config
(setf TeX-parse-self t ; Parse documents to provide completion
; for packages, etc.
TeX-auto-save t ; Automatically save style information
TeX-electric-sub-and-superscript t ; Automatically insert braces after
; sub- and superscripts in math mode
TeX-electric-math '("\\(" "\\)")
;; Don't insert magic quotes right away.
TeX-quote-after-quote t
;; Don't ask for confirmation when cleaning
TeX-clean-confirm nil
;; Provide forward and inverse search with SyncTeX
TeX-source-correlate-mode t
TeX-source-correlate-method 'synctex
TeX-engine 'xelatex)
;; Move to chktex
(setcar (cdr (assoc "Check" TeX-command-list)) "chktex -v6 %s"))
(use-package tex-buf ; TeX buffer management
:ensure auctex
;; Don't ask for confirmation when saving before processing
:config (setq TeX-save-query nil))
(use-package tex-style ; TeX style
:ensure auctex
:config
;; Enable support for csquotes
(setq LaTeX-csquotes-close-quote "}"
LaTeX-csquotes-open-quote "\\enquote{"))
(use-package tex-fold ; TeX folding
:ensure auctex
:init (add-hook 'TeX-mode-hook #'TeX-fold-mode))
(use-package tex-mode ; TeX mode
:ensure auctex
:config
(font-lock-add-keywords 'latex-mode
`((,(rx "\\"
symbol-start
"fx" (1+ (or (syntax word) (syntax symbol)))
symbol-end)
. font-lock-warning-face))))
(provide 'tex-settings)