emacs和latex两大神器的结合,想想都有点小激动呢,之前在Linux上配置latex中文一直失败,所以一直搁置了latex的学习,今日再战latex。学习工具最快的方式就是使用,所以这次要在使用中学习emacs和latex。闲话少叙,折腾一下在os x上配置emacs+latex。
安装
1.安装MacTex:MacTex distribution packages
2.安装Emacs:Download OS X emacs,拷贝到/Applications目录下,或者参考之前博客使用home-brew安装Emacs.
注意在终端运行emacs时很可能会运行OS X默认安装的emacs程序,/usr/bin/emacs,在~/.bash_profile中添加
alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs"
source ~/.bash_profile
来定位emacs命令到自己安装的emacs上
3.安装Auctex:Download the Auctex tarball
Auctex是一个用于在Gnu Emacs和Emacs编辑Tex文件的扩展包。
下载auctex的同时会下载.sig签名文件用于校验文件的完整性。校验方法如下:
gpg --verify grub-2.00.tar.gz.sig grub-2.00.tar.gz
在OS X上要安装gpg:brew install gpg
下载公约gpg –recv-keys
4.进入Auctex目录,运行
./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