.emacs.d/init/text/latex.el

39 lines
856 B
EmacsLisp
Raw Normal View History

2019-10-14 17:38:14 +02:00
;;; latex.el --- Settings for LaTeX. -*- lexical-binding: t; -*-
2019-11-15 00:33:32 +01:00
;; Time-stamp: <2019-11-14T23:33:19+00:00>
2019-10-14 17:38:14 +02:00
;;; Commentary:
;;; Code:
(use-package tex-site
:ensure auctex
:if (executable-find "xetex")
:functions (TeX-revert-document-buffer)
:custom
(TeX-parse-self t) ; Enable parse on load.
(TeX-auto-save t) ; Enable parse on save
(TeX-PDF-mode t) ; PDF mode (rather than DVI-mode)
(TeX-engine 'xetex)
:mode
("\\.tex\\'" . LaTeX-mode)
:config
;; To have the buffer refresh after compilation.
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer)
)
;; Auto complete for LaTeX.
(use-package company-auctex
:after (auctex)
:hook
(LaTeX-mode . company-auctex-init)
)
(provide 'text/latex)
;;; latex.el ends here