Ubuntu 使用emacs+auctex编译tex文档
2009-12-02 17:00
423 查看
首先是安装emacs
sudo apt-get install emacs
搞定。
然后安装auctex
由于我下载安装了texlive 2008,而没有使用源里的旧版本,所以不能直接apt-get install auctex了,因为这样会要求你从源里
安装texlive。下载安装之。
从gnu网站下载auctex-11.85(http://www.gnu.org/software/auctex/
),例如下载到主目录下,解压。
cd auctex-11.85
./config --
make
make install
安装完成。
编辑~/.emacs文件(没有的话,自己新建),令emacs加载auctex
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
这时用emacs打开一个.tex文件,会看到菜单栏上多了Preview、LaTeX、Command菜单项(auctex成功安装)
设置xelatex为默认编辑命令,evince为pdf文件阅读器
再在~/.emacs中添加以下命令:
(setq TeX-output-view-style (quote (("^pdf$" "." "evince %o %(outpage)"))))
(add-hook 'LaTeX-mode-hook
(lambda()
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))
(setq TeX-command-default "XeLaTeX")))
就可以使用C-c C-c编译tex文件,使用C-c C-v使用evince阅读生成的pdf文件。
参照:
http://bbs.ctex.org/viewthread.php?tid=39584
http://forum.ubuntu.org.cn/viewtopic.php?f=68&t=11052&p=1450124
(8楼)
http://bbs.ctex.org/viewthread.php?tid=51336
sudo apt-get install emacs
搞定。
然后安装auctex
由于我下载安装了texlive 2008,而没有使用源里的旧版本,所以不能直接apt-get install auctex了,因为这样会要求你从源里
安装texlive。下载安装之。
从gnu网站下载auctex-11.85(http://www.gnu.org/software/auctex/
),例如下载到主目录下,解压。
cd auctex-11.85
./config --
with-emacs #(注意--with-emacs参数,如果不使用此参数,emacs找不到auctex)
make
make install
安装完成。
编辑~/.emacs文件(没有的话,自己新建),令emacs加载auctex
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
这时用emacs打开一个.tex文件,会看到菜单栏上多了Preview、LaTeX、Command菜单项(auctex成功安装)
设置xelatex为默认编辑命令,evince为pdf文件阅读器
再在~/.emacs中添加以下命令:
(setq TeX-output-view-style (quote (("^pdf$" "." "evince %o %(outpage)"))))
(add-hook 'LaTeX-mode-hook
(lambda()
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))
(setq TeX-command-default "XeLaTeX")))
就可以使用C-c C-c编译tex文件,使用C-c C-v使用evince阅读生成的pdf文件。
参照:
http://bbs.ctex.org/viewthread.php?tid=39584
http://forum.ubuntu.org.cn/viewtopic.php?f=68&t=11052&p=1450124
(8楼)
http://bbs.ctex.org/viewthread.php?tid=51336
相关文章推荐
- ubuntu下使用code::blocks编译运行一个简单的gtk+2.0项目
- ubuntu 下 编译ffmpeg , 并且使用其中的库的配置
- 在ubuntu上使用交叉编译工具链编译arm64版busybox
- Ubuntu 使用 Android Studio 编译 TensorFlow android demo
- ubuntu下动态链接库的编译和使用实例
- Ubuntu系统使用Doxygen生成文档
- 使用Ubuntu编译Android4.0源码
- Ubuntu下使用Eclipse编译、调试嵌入式程序的方法(上)
- Ubuntu 10.10 64bit下使用Android NDK r6编译FFmpeg 0.8.1
- Ubuntu编译安装boost并在eclipse C/C++中使用
- Ubuntu(Linux)使用Eclipse搭建C/C++编译环境
- Ubuntu10.04搭建linux-0.11编译环境(1.bochs安装和使用)
- 在 Ubuntu 下使用 Android NDK r4b 编译 FFmpeg 0.6.3
- Ubuntu 10.04修改内核并编译后有线网卡无法使用问题解决
- OSX 安装MacTex Emacs+Auctex
- ubuntu 11.10 使用 emacs-23.4 开发 erlang 整理之 安装 ESense
- Ubuntu下QT使用CMake编译Opencv程序
- ubuntu下使用脚本交叉编译windows下使用的ffmpeg
- Ubuntu+NDK编译openssl(为了Android上使用libcurl且支持HTTPS协议)
- 编译utf8编码的tex文件使用中文truetype