summaryrefslogtreecommitdiffstats
path: root/init.el
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-01-07 11:49:08 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-01-07 11:49:08 +0000
commit09a10dafec4020b8b4a95c4d4d4dd5c66c0a52e5 (patch)
tree9ee986cb42ed29e60277d1b7cf85e8aff40e5b06 /init.el
parent8f54e3a348a32e59c6171b24ae087d25cf07fff1 (diff)
auctex added
Diffstat (limited to 'init.el')
-rw-r--r--init.el25
1 files changed, 25 insertions, 0 deletions
diff --git a/init.el b/init.el
index 74b011b..c5bb39c 100644
--- a/init.el
+++ b/init.el
@@ -135,6 +135,31 @@
(setq beacon-color "OrangeRed")
(beacon-mode 1))
+;; AUCTeX
+(use-package tex
+ :ensure auctex
+ :defer t
+ :custom
+ (TeX-auto-save t)
+ (TeX-parse-self t)
+ (TeX-master nil)
+ ;; to use pdfview with auctex
+ (TeX-view-program-selection '((output-pdf "pdf-tools"))
+ TeX-source-correlate-start-server t)
+ (TeX-view-program-list '(("pdf-tools" "TeX-pdf-tools-sync-view")))
+ (TeX-after-compilation-finished-functions #'TeX-revert-document-buffer)
+ :hook
+ (LaTeX-mode . (lambda ()
+ (turn-on-reftex)
+ (setq reftex-plug-into-AUCTeX t)
+ (reftex-isearch-minor-mode)
+ (setq TeX-PDF-mode t)
+ (setq TeX-source-correlate-method 'synctex)
+ (setq TeX-source-correlate-start-server t)))
+ :config
+ (when (version< emacs-version "26")
+ (add-hook LaTeX-mode-hook #'display-line-numbers-mode)))
+
;; kill other buffers
(defun kill-other-buffers ()
"Kill all other buffers."