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 am trying to setup a pdf preview command in emacs. Stumbling around the web I found the following which I thought I would try.

(eval-after-load "tex"
  '(add-to-list 'TeX-command-list
  '("pdfview" "open -a TeXShop %s.pdf" 'TeX-run-command nil t) t))

Unfortunately, the command does not show up in the command list when I type C-c C-c. Is there something fundamentally different I need to do?

Also, I am not running auctex, just using the vanilla latex-mode.

share|improve this question
Could you please provide a link for where you found those configuration lines? – N.N. Feb 21 '12 at 19:14
up vote 2 down vote accepted

You need to be running AUCTeX—that's where TeX-command-list is defined. The builtin tex-mode.el uses tex-compile-commands instead (though the format is different). But you really need to be running AUCTeX because it's much better. It's worth it just for preview-latex.

For the vanilla latex mode the comparable code would be (untested):

(eval-after-load "tex-mode"
  '(add-to-list 'tex-compile-commands
                '("open -a TeXShop %r.pdf") t))
share|improve this answer

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.