2019-10-14 17:38:14 +02:00
|
|
|
;;; latex.el --- Settings for LaTeX. -*- lexical-binding: t; -*-
|
|
|
|
|
2020-03-18 15:00:17 +01:00
|
|
|
;; Time-stamp: <2020-03-18T14:59:09+0100>
|
2019-10-14 17:38:14 +02:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
2020-03-18 15:00:17 +01:00
|
|
|
(require 'basics/package-management)
|
|
|
|
|
2019-10-14 17:38:14 +02:00
|
|
|
(use-package tex-site
|
2020-03-15 23:38:06 +01:00
|
|
|
:straight auctex
|
2019-10-14 17:38:14 +02:00
|
|
|
: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
|
2019-12-26 08:44:45 +01:00
|
|
|
("\\.tex$" . LaTeX-mode)
|
2019-10-14 17:38:14 +02:00
|
|
|
|
|
|
|
: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
|
2020-02-18 17:18:57 +01:00
|
|
|
:after (auctex company)
|
2019-10-14 17:38:14 +02:00
|
|
|
|
|
|
|
:hook
|
|
|
|
(LaTeX-mode . company-auctex-init)
|
|
|
|
)
|
|
|
|
|
|
|
|
(provide 'text/latex)
|
|
|
|
;;; latex.el ends here
|