2

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 ?

2
  • 2
    Try this solution to a previous similar SU question. Specifically, edit/create a file ~/.MacOSX/environment.plist.
    – fideli
    Nov 17, 2010 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, 2010 at 22:42

2 Answers 2

1

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 :)

-1

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.

1
  • 1
    Thanks, but I really think I have a problem with the path, so it does not change the problem.
    – Cedric H.
    Nov 17, 2010 at 21:39

You must log in to answer this question.

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