mactex 配置emacs和auctex

无意中发掘的一个好东东
http://superuser.com/questions/171681/installing-auctex-1-86-over-emacs-app-in-os-x

狂赞作者!
  1. Install the MacTeX-2010 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:

  1. ./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
texmf-local改成相应的最新的texmf地址。这一步最重要。
最后稍微修改preview-latex的指令。

大功告成。睡觉去也!

“bin/sh: latex: command not found”问题解决方案:

I had to set the path for Emacs: it was different from the one that was being used from the terminal. What I did was:

  • In Terminal I looked at then value for env (specifically PATH)%导入PATH值
  • In Emacs, I typed M-x setenv, variable = PATH%设置emacs环境变量名:PATH
  • I pasted in the same value that I had in terminal and now I can compile with no problems.%把环境变量PATH的值复制进去即可。;
    ;;
    ;;改变默认路径
    (setenv "HOME" "/Users/baby")
    (setenv "PATH" "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin:/usr/texbin:/usr/local/texlive/2013/bin/x86_64-darwin")
    ;;set the default file path
    (setq default-directory "~/")

你可能感兴趣的:(mactex 配置emacs和auctex)