Configuring AUCTeX to use Zathura as pdf viewer
For years I could not figure out how to tell emacs »No, I do not want evince as my pdf viewer, use something else« -- except by editing the default command line by hand each time.
But, mark your calendars, today is the day where I found it.
These are the magic lines to add to your
(custom-set-variables ;; Your other configuration here ;; ... '(TeX-view-program-list (quote (("Zathura" "zathura %o")))) ;  '(TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips and gv") (output-dvi "xdvi") (output-pdf "Zathura") ;  (output-html "xdg-open")))))
Of course the same thing can be configured via
[RET] auctex [RET] and then choosing TeX Command > TeX View.
The trick is: First  you tell emacs about your new viewer by
adding a list of its name and the command to execute to
Then  you have to tell emacs to actually use your newly defined
program by setting the given name as the second part of the
output-pdf predicate in the
This works for emacs version 24.4 with auctex version 11.88, next version might be different, who knows.Tags: emacs howto
This text by Ludger Sandig is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.