TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I upgraded to Ubuntu Linux 11.04 yesterday, and I realize that Quick View (C-c C-v) in Emacs, which opened pdf with okular, does not work anymore. C-c C-v does nothing now; I also try to launch it via menu bar: Command -> Quick View, it shows "menu-bar Command Quick View", that is it.

I could observe that the pdf file is actually generated (by C-c C-c), but oddly it could not be opened from Emacs. Here is the related part of my .emacs:

(add-hook 'LaTeX-mode-hook 'TeX-PDF-mode) 
(defun pdf-with-okular ()
(add-to-list 'TeX-output-view-style
(quote ("^pdf$" "." "okular %o %(outpage)"))))
(add-hook 'LaTeX-mode-hook 'pdf-with-okular t)

 '(LaTeX-command "latex -synctex=1")
 '(cua-mode t nil (cua-base))
 '(show-paren-mode t))

Could anyone help? Thank you very much

share|improve this question
I would ask this question on our sister site askubuntu.com or in a emacs forum. – Martin Scharrer Apr 30 '11 at 16:05
Probably irrelevant - but I've noticed that when Okular updates, I've needed to restart the Emacs server in order to get forward search to work. But presumably you restarted your computer when you updated, so the Emacs server would have been restarted. – emacsomancer Apr 30 '11 at 16:06
Hopefully more helpful: after something updated (emacs, auctex, ubuntu, okular, I'm not sure which), I found that I needed to add okular-search.el to get it to work (see the code here: inthearmchair.wordpress.com/2010/11/15/… ) – emacsomancer Apr 30 '11 at 16:12
up vote 4 down vote accepted

Do M-x and then type customize-variable. And then press enter. Then type TeX-view-program-selection and make sure it is set to okular. I don't use okular, so I'm not sure I can be of much more use if that doesn't work.

share|improve this answer
Thanks for your help. Indeed, it is related to TeX-view-program-selection. I have added these 2 lines in my .emacs file: – SoftTimur May 1 '11 at 17:37
(setq TeX-view-program-list '(("Okular" "okular --unique %u"))) (setq TeX-view-program-selection '((output-pdf "Okular") (output-dvi "Okular"))) – SoftTimur May 1 '11 at 17:38
However, it does not solve the problem totally. Here is a detailed description. Hope you could help, thank you. – SoftTimur May 1 '11 at 17:40
The problem is finally solved here – SoftTimur May 1 '11 at 21:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.