Move viewer setup into different file
This commit is contained in:
parent
dc40fa36d3
commit
39e03f4cf1
1 changed files with 22 additions and 0 deletions
22
modules/lang/latex/+viewers.el
Normal file
22
modules/lang/latex/+viewers.el
Normal 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))
|
Loading…
Add table
Add a link
Reference in a new issue