Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have (apparently) correctly installed MacTex 2010 and I am able to use it from the terminal and with Texmate.

But when I try to compile a Latex file using emacs in the AUC Tex mode it have an error.

Apparently the path to pdflatex is unknown although I added /usr/texbin in my .bash_profile file.

I tried to add this path to /etc/paths and to /etc/bash_profile but it is not working... Also, when I launch a bash terminal under emacs (with M-x term) I also have a very incomplete path.

How should I do to make this work ?

share|improve this question
Try this solution to a previous similar SU question. Specifically, edit/create a file ~/.MacOSX/environment.plist. – fideli Nov 17 '10 at 21:43
That's exactly what is was looking for. I didn't know about the difference between GUI and terminal app for environment variables. – Cedric H. Nov 17 '10 at 22:42
up vote 1 down vote accepted

I tried using the environment.plist solution above (did it a few years ago, haven't reinstalled my computer in a while), but couldn't make it work at some point. So I simply inserted the missing paths into emacs, like this:

(setenv "PATH" (concat "/opt/local/bin:/opt/local/sbin:" (getenv "PATH")))
(setq exec-path (append '("/opt/local/bin" "/opt/local/sbin") exec-path))

In this case, I'm adding the paths to the Macports binaries. Probably not the most beautiful solution, but at least it works :)

share|improve this answer

I don't know the actual error and apparently I am too low level to ask you by a comment, so I'll make a wild guess.

With the auctex mode loaded, try C-cC-tC-p. This will change the settings to create a pdf.

share|improve this answer
Thanks, but I really think I have a problem with the path, so it does not change the problem. – Cedric H. Nov 17 '10 at 21:39

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.