Variable: TeX-view-program-selection
TeX-view-program-selection is a customizable variable defined in
tex.el.
Value
(((output-dvi has-no-display-manager) "dvi2tty")
((output-dvi style-pstricks) "dvips and gv") (output-dvi "xdvi")
(output-pdf "Evince") (output-html "xdg-open"))
Documentation
Alist of predicates and viewers.
Each entry consists of a list with two elements. The first
element is a symbol or list of symbols referring to predicates as
defined in TeX-view-predicate-list or
TeX-view-predicate-list-builtin. The second element is a
string referring to the name of a viewer as defined in
TeX-view-program-list or TeX-view-program-list-builtin.
(Note: Viewers added to TeX-view-program-list in the current
Emacs session will not show up in the customization interface of
TeX-view-program-selection until you restart Emacs.)
When a viewer is called for, the entries are evaluated in turn and the viewer related to the first entry all predicates of which are evaluated positively is chosen.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defcustom TeX-view-program-selection
(cond
((eq system-type 'windows-nt)
'(((output-dvi style-pstricks) "dvips and start")
(output-dvi "Yap")
(output-pdf "start")
(output-html "start")))
((eq system-type 'darwin)
'((output-dvi "open")
(output-pdf "open")
(output-html "open")))
(t
'(((output-dvi has-no-display-manager) "dvi2tty")
((output-dvi style-pstricks) "dvips and gv")
(output-dvi "xdvi")
(output-pdf "Evince")
(output-html "xdg-open"))))
"Alist of predicates and viewers.
Each entry consists of a list with two elements. The first
element is a symbol or list of symbols referring to predicates as
defined in `TeX-view-predicate-list' or
`TeX-view-predicate-list-builtin'. The second element is a
string referring to the name of a viewer as defined in
`TeX-view-program-list' or `TeX-view-program-list-builtin'.
\(Note: Viewers added to `TeX-view-program-list' in the current
Emacs session will not show up in the customization interface of
`TeX-view-program-selection' until you restart Emacs.)
When a viewer is called for, the entries are evaluated in turn
and the viewer related to the first entry all predicates of which
are evaluated positively is chosen."
:group 'TeX-view
:type `(alist :key-type
;; Offer list of defined predicates.
,(let (list)
(mapc (lambda (spec)
(cl-pushnew `(const ,(car spec)) list :test #'equal))
(append TeX-view-predicate-list
TeX-view-predicate-list-builtin))
(setq list (sort list
(lambda (a b)
(string<
(downcase (symbol-name (cadr a)))
(downcase (symbol-name (cadr b)))))))
`(choice (choice :tag "Single predicate" ,@list)
(repeat :tag "Multiple predicates"
(choice ,@list))))
:value-type
;; Offer list of defined viewers.
(group (choice :tag "Viewer"
,@(let (list)
(mapc (lambda (spec)
(cl-pushnew `(const ,(car spec))
list :test #'equal))
(append TeX-view-program-list
TeX-view-program-list-builtin))
(sort list
(lambda (a b)
(string< (downcase (cadr a))
(downcase (cadr b))))))))))