Aquamacs with dvips + ps2pdf

I spent about 3 hours in the last two days trying to figure out how to switch from TeXShop’s terrible editor to Aquamacs, because Aquamacs has AUCTeX support. Unfortunately, I use dvips and psp2df since I do figures in pstricks, and AUCTeX comes in two modes — just latex with xdvi and pdftex. What’s even stupider is that if I do C-c C-c view it won’t even properly call the external DVI viewer (, so I have to futz around with the AUCTeX configurations, which still doesn’t seem to do anything. Furthermore, I don’t get any diagnostic information, and if I just bind the xdvi command to dvips it fails to even run that. This suggests to me that something even more screwed up is going on…

It seemed for a bit that this guy was trying to do the same thing as me, but when I tried applying his solutions I still got nothing. I really don’t see why this should be difficult, but it’s now well-exceeded the amount of time I’m willing to spend on it. Are my needs too niche? Does everyone use pdftex these days?


13 thoughts on “Aquamacs with dvips + ps2pdf

  1. I use pdflatex… and I count as everyone. :-p

    Actually, most people in my lab don’t use latex at all… they use word and then get all panicked and have to consult with me when they submit a paper to a conference that requires tex. (More and more conferences seem to be allowing Microsoft Word generated pdfs, even though they strongly recommend using latex.)

    I also got funny looks from my advisor when I explained that I didn’t use powerpoint to generate slides.

  2. pdflatex is nice except you have to use jpeg/pdf figures. I you started with .eps figures, its a pain to switch over.

    Thanks to the comments, I just spent three hours installing and fiddling with asymptote. I was attracted to the support for embedding latex math in the figures without using xfig. However, I’m too old to learn a new way to write code to draw figures. Maybe when there is an easy graphical interface to support it, I will switch to that.

    I suppose I’ll stick with my old solution. I draw with coreldraw, mostly because I learned (more or less) how to use it. The eps and jpeg conversion (for pdflatex) is OK, but there’s no latex math.

    Its funny how everyone’s solutions are different. Not in a million years would I consider the powerpoint -> eps -> pdf route for figures. I don’t recall ever being happy with either ppt to eps conversion or the eps to pdf conversion for inclusion in a pdflatex file.

  3. For conversion from ppt to eps, I’ve been very satisfied with Method 3 on this page. For the eps to pdf conversion, I just use epstopdf. If you want to embed latex math, you can use TexPoint. Coreldraw may have richer drawing functionality than Powerpoint, though.

  4. Aquamacs works fine with the MacTeX distribution, out of the box. To get xdvi working properly, you have to launch before starting Aquamacs.

  5. Try this:

    Go to your home directory and then to “~/Library/Preferences/Aquamacs Emacs”.

    There will be a file customizations.el (if not create it) and add this to it

    ‘(TeX-output-view-style (quote ((“^dvi$” “.” “open -a %o”) (“^pdf$” “.” “open -a %o”) (“^html?$” “.” “open %o”))))

    If the file exists you should only add the three lines of the middle in the appearing custom-set-variable… As you can see I’ve Skim for viewing the PDF’s too… For inverse search it’s very nice… If you prefer you can delete “-a” so the PDf will be opened with the default viewer.

    Probably this could be done in Preferences.el… Moreover, probably that file is the right place to do that but I’m not a Emacs Master…


  6. Hi,
    I’m not sure you care anymore, but I wanted to do exactly what you wanted to do. I use xfig to make figures with latex text in them, so I export them as combined postscript/latex files. I know I can do a pdf/latex combo, but I had strange offset text with that. This is what I put in my Preferences.el file:

    (setq TeX-view-style ‘((“.” “dvipdf %d; open -a %s.pdf”)))

    I also turned off the default PdfLatex command in the Auxtex preference settings within Aquamacs. You’ll note that I call dvipdf first, then open PDFView. This has the advantage of automatically refreshing every time you do a C-c C-c. Of course, you have to do the C-c C-c sequence at least twice in a row since the first time compiles and the second time views.

    Now I can compile my .tex files with just one step. I insert my figures via \input{figName.pstex_t}.

    It took me a long time to sort this out. I hope it helps someone!


  7. I was facing the same problem, and saw the discussion in this forum. For me, what finally worked is the solution proposed by Evirho, but I had to tweak it slightly. When I put that line in my Preferences.el, it did not work for some reason. I tried manually putting that in my customizations.el (in ~/Library/Preferences/Aquamacs\Emacs/) but that also gave me error (my editor got messed up by the quotes “,’,“ etc.). finally what worked is the following: In Aquamacs, type

    M-x customize-variable RET TeX-view-style

    which brings up a “customization buffer”. Now change the entries to look like, for example,

    Regexp: ^letterpaper$
    Command: dvipdf %d; open -a %s.pdf

    I am using Skim as a PDF viewer instead of PDFView, otherwise it is same as Evilrho’s.

    • Maybe it’s not from interest anymore, but I stumbled upon the problem to integrate the right command into aquamacs for my environment.
      I’m working with Mac and I’ve installed TeX Live 2009 + Aquamacs 2.2

      I went into LaTeX options -> Customize AUCTEX -> Tex command -> Tex command list and inserted a new “Tex-run-command”

      %`%l%(mode)%’ %t && dvips -Ppdf %d -o && ps2pdf %f && open -a %s.pdf

      I activated modes LaTeX and DocTeX for my needs.

      the last command is optional and will open skim for preview.


  8. some update on the same issue a few years hence:
    it looked like things were working fine but after I installed MacTex2012 and updated my Aquamacs, things started gradually misbehaving. Finally it really broke when I tried to compile beamer slides with Copenhagen theme. There were no fatal errors but the output was really weird. Couldn’t find anyone online who had the same issue, but then after retrying things in my old mac, I realized that the command sequence dvips – ps2pdf – then open in Skim were not being executed, still a mystery how it was still showing the pdf in skim. By this time auctex has been updated too, so the manus for customization were different. Finally, I updated the “View” command in “Tex Command List” in Auctex (Modify auctex through aquamacs’s menus: “Latex–>Customize Auctex” if you have MacTex installed, otherwise use other nerdy options)

    The field after “Command” in the “View” command under “tex-command-list” was previously “%V”, which I changed to

    dvips %s.dvi; ps2pdf; open -a %.pdf

    and now everything was as before!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.