码迷,mamicode.com
首页 > 系统相关 > 详细

OSX 安装MacTex Emacs+Auctex

时间:2014-12-03 23:31:35      阅读:531      评论:0      收藏:0      [点我收藏+]

标签:osx   emacs   auctex   

从stackoverflow上找到的,已经安装成功,借此留存下

Here‘s how I got Auctex to work with pure Emacs:

  1. Install the MacTeX distribution package
  2. Download OS X emacs, place in /Applications
  3. Download the Auctex tarball
  4. 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
    
  5. Execute:

    make; sudo make install
    

    to install the elisp files inside the Emacs.app, the info files to /usr/local/share/info, etc.

  6. 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)
    
  7. 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 than pdf; 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:

bubuko.com,布布扣

OSX 安装MacTex Emacs+Auctex

标签:osx   emacs   auctex   

原文地址:http://blog.csdn.net/wdkirchhoff/article/details/41704027

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!