Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use AucTeX in my Mac Emacs, which is Aquamac 23.1.

Typically in AucTeX, when I type C-c C-c it runs pdflatex, then C-c C-c again and it opens it in a PDF viewer. But in this Aquamac emacs version, it renders the PDF right in the emacs buffer.

How can I change that? I just want it to open the PDF in a PDF viewer (ideally, Skim) when I press C-c C-c.

share|improve this question
    
I think that Aquamacs (version 2.0 (or 2.1?) by the way: 23.1 is the GNU Emacs version on which it is based) should read the system's default application to open PDF files out of the box without any need for customisation. –  José Figueroa-O'Farrill Aug 16 '10 at 0:47

3 Answers 3

I don't know whether it is going to work, but try the following:

M-x customize-apropos RET

then write:

tex-view-program RET

This will bring two customisable options:

tex-view-program-selection and tex-view-program-list.

This is how I have set them

alt text

The most important, I think, is the one I circled in red. If you click on the button value menu it should give you the option to put Skim.

Remember to save your options by clicking on set for current session and set for future sessions, on the top of this same screen. If it doesn't work, try re-starting Emacs (after having saved the options, of course).

EDIT: If you can't find it using the customize-apropos command, you can use the menu as shown here:

alt text

Then scroll down until you find the options I mentioned above, i.e. tex-view-program-selection and tex-view-program-list, and change then accordingly.

share|improve this answer
    
Thanks for the detailed description. I don't have tex-view-program though: No customizable items matching tex-view-program. –  Frank Aug 16 '10 at 13:34
    
@dehmann: are you sure you wrote it exactly as it is? with the hyphens rather than space, and with no space at the end? In any case, I have updated my answer, that should work for you. –  Vivi Aug 16 '10 at 19:34

You need to customize Auctex: LaTeX -> Customize AucTeX -> TeX Command -> TeX Output View Style

Click view, change the viewer for ^pdf extension, "safe" for future sessions on the top and you are done.

share|improve this answer
    
Hmm, where is the LaTeX menu? I only see a TeX menu, with items TeX File, TeX Buffer, Validate Buffer etc. –  Frank Aug 16 '10 at 13:37
    
@dehmann: Are you sure you are using AucTeX and not the default TeX mode bundled with emacs? –  Dima Aug 16 '10 at 22:41
    
Hmm, I'm not sure anymore. I thought it's automatically using AucTex, because the C-c C-c command kind of works, although in a different way than I'm used to. I'll check ... –  Frank Aug 26 '10 at 1:15

AUCTeX actually has code for handling viewers on darwin system but somehow it is commented out. I have been using the following patch in AUCTeX: http://paste.pocoo.org/show/250752/ and haven't found a problem. I will find time to encourage upstream to do the same.

share|improve this answer

Your Answer

 
discard

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.