Move viewer setup into different file

This commit is contained in:
Patrick Elliott 2018-07-18 12:12:04 +02:00
parent dc40fa36d3
commit 39e03f4cf1

View file

@ -0,0 +1,22 @@
;;; lang/latex/+viewers.el -*- lexical-binding: t; -*-
(when (featurep! +okular)
;; Configure Okular as viewer. Including a bug fix
;; (https://bugs.kde.org/show_bug.cgi?id=373855)
(add-to-list 'TeX-view-program-list '("Okular" ("okular --unique file:%o" (mode-io-correlate "#src:%n%a"))))
(add-to-list 'TeX-view-program-selection '(output-pdf "Okular")))
;; Or Skim
(when (featurep! +skim)
(add-to-list 'TeX-view-program-selection 'output-pdf '("Skim")))
;; Or Zathura
(when (featurep! +zathura)
(add-to-list 'TeX-view-program-selection '(output-pdf "Zathura")))
;; Or PDF-tools, but only if the module is also loaded
(when (and (featurep! :tools pdf)
(featurep! +pdf-tools))
(add-to-list 'TeX-view-program-selection '(output-pdf "PDF Tools"))
;; Enable auto reverting the PDF document with PDF Tools
(add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer))