53 lines
1.2 KiB
EmacsLisp
53 lines
1.2 KiB
EmacsLisp
;;; latex.el --- Settings for LaTeX. -*- lexical-binding: t; -*-
|
|
|
|
;; Time-stamp: <2019-10-14T15:25:22+00:00>
|
|
|
|
;;; Commentary:
|
|
|
|
;;; Code:
|
|
|
|
(use-package tex-site
|
|
:ensure auctex
|
|
:if (executable-find "xetex")
|
|
:after (pdf-tools)
|
|
: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)
|
|
;; To use pdf-tools with auctex.
|
|
;; <https://emacs.stackexchange.com/a/21764/21935>
|
|
(TeX-view-program-selection '((output-pdf "PDF Tools")))
|
|
(TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view)))
|
|
|
|
: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)
|
|
)
|
|
|
|
;; View PDF files.
|
|
(use-package pdf-tools
|
|
:custom
|
|
(pdf-misc-print-programm "/usr/bin/lpr")
|
|
|
|
:mode
|
|
("\\.pdf\\'" . pdf-tools-install)
|
|
)
|
|
|
|
(provide 'text/latex)
|
|
;;; latex.el ends here
|