Found on the StackOverflow, has been installed successfully, to retain the next
Here's how I got Auctex to work with pure Emacs:
- Install the MacTeX distribution package
- Download OS X emacs, place in
/Applications
- Download the Auctex tarball
Go to the Auctex directory, configure with the command:
./configure--with-emacs=/applications/emacs.app/contents/macos/emacs--with-lispdir=/ Applications/emacs.app/contents/resources/site-lisp--with-texmf-dir=/usr/local/texlive/texmf-local
Execute:
make; sudo make install
To install theelisp
Files inside theEmacs.app
, the info files to/usr/local/share/info
, etc.
Edit your ~/.emacs
file to load Auctex/preview-latex, and point Emacs to your latex executables:
Auctex and Preview-latex should work now. One thing to keep in mind:with older versions of Auctex, theps
Pathway seems to work better thanpdf
; If Preview-latex images aren ' t appearing with the error "/typecheck in--setfileposition--", try disabling "Generate PDF" Via "menu Bar, Command-texing option".
Update: Steps (2--5) can be replaced with the Homebrew Package Manager:
brew install emacs--cocoabrew Install Auctex
The other steps is still correct. The Emacs "Generate PDF" option now works for me
Note that before installing Auctex, you should prepare the environment variables before you can compile the Auctex:
OSX installation MacTeX Emacs+auctex