8

Newbie here. I have just installed emacs/auctex on my mac. I don't like xdvi to view the dvis, I like to use emacs' builtin pdf viewer to view pdf on its own split window on the right. It used to be so with emacs if I remember correctly, but after I installed the auctex, it seems it by default is using the xdvi. How can I switch back to use doc-view-mode to view my pdf then? Thanks

17
  • 1
    Do you mean to see that AUCTeX's compilation keystrokes are producing DVI output? Set TeX-PDF-mode to t (or just call it as a function, or use C-c C-t C-p). You may also be interested in tex.stackexchange.com/a/165645/17423. Commented Jun 26, 2014 at 23:25
  • 1
    Oh, I see. Why then it by default is using evince on mac? How to change it back to doc-view? Sorry, I'm completely newbie on this
    – Daniel
    Commented Jun 26, 2014 at 23:38
  • 1
    Don't worry about it—I was right there with you a year or two ago. There might be a way to customize TeX-view-program-list to use find-file on the PDF (normally given by the format string %o). Commented Jun 26, 2014 at 23:50
  • @SeanAllred, would you pls elaborate on the TeX-view-program-list, like step-1, step-2, step-3... Thanks. And beside, what's frustrating is to see the pdf file though C-x C-f, is not width fit. And I can't find any button to make it fit width...
    – Daniel
    Commented Jun 27, 2014 at 0:15
  • 1
    @SeanAllred If your cooking experiments will fail, I'll try to check it out ;-)
    – giordano
    Commented Jun 28, 2014 at 17:58

1 Answer 1

2

Try the following:

  1. Customize Tex View Program List

    • insert a new entry, with name set to Emacs (or any other meaningful word)
    • for the associated value menu, choose Command, and set the value to emacsclient %o
    • you may need to kill and restart Emacs for this to take effect
    • you will definitely need to start an Emacs server: either start emacs as emacs --daemon, or add (server-start) to your .emacs.
  2. Customize TeX View Program Selection

    • look for the entry for output-pdf
    • from the value menu for that entry, select Emacs

This works for me here on Emacs 24.4.50.1 with Auctex 2014-02-04 from Melpa.

1
  • I did as instructed, but cannot find Emacs in the final value menu. Commented Jun 14, 2018 at 16:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .