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

29 lines
827 B
EmacsLisp

;;; latex.el --- Settings for LaTeX. -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:
(require 'basics/package-management)
(require 'misc/completion)
(use-package tex-site
:straight 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 (add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer))
;; Auto complete for LaTeX.
(use-package company-auctex
:after (auctex company)
:hook (LaTeX-mode . company-auctex-init))
(provide 'text/latex)
;;; latex.el ends here