OSX 安装MacTex Emacs+Auctex
从stackoverflow上找到的,已经安装成功,借此留存下
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 the
elisp
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:(setenv "PATH" (concat "/usr/texbin:/usr/local/bin:" (getenv "PATH"))) (setq exec-path (append ‘("/usr/texbin" "/usr/local/bin") exec-path)) (load "auctex.el" nil t t) (load "preview-latex.el" nil t t)
-
Auctex and preview-latex should work now. One thing to keep in mind: with older versions of Auctex, the
ps
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 --cocoa
brew install auctex
The other steps are still correct. The Emacs "Generate PDF" option now works for me
注意,其中在安装Auctex前,要先准备好环境变量,不然没法编译AucTex:
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。