From 29b6f5502f897abbc7fe8748dd6b84bbaed105c6 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 3 Apr 2019 14:21:56 +0200 Subject: [PATCH] Only install auctex if xelatex is found. --- init.el | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/init.el b/init.el index dcc42ea..4c3d4bc 100644 --- a/init.el +++ b/init.el @@ -1,5 +1,5 @@ ;;; init.el --- tastytea's Emacs init file. -;;; Time-stamp: <2019-04-02 15:16:18 CEST> +;;; Time-stamp: <2019-04-03 14:21:51 CEST> ;;; Commentary: ;;; I am using this file with Emacs 26, but most of it will probably work with @@ -676,24 +676,24 @@ (find-file . auto-insert)) ;;;;;;;;;;;;;;;;;;;; LaTeX ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(use-package tex-site - :if (executable-find "xelatex") - :ensure auctex - :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 'xelatex) - ;; 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)) +(if (executable-find "xelatex") + (use-package tex-site + :ensure auctex + :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 'xelatex) + ;; 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