Chinaunix首页 | 论坛 | 博客
  • 博客访问: 504294
  • 博文数量: 137
  • 博客积分: 3874
  • 博客等级: 中校
  • 技术积分: 1475
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-05 10:50
文章分类

全部博文(137)

文章存档

2011年(37)

2010年(100)

分类: LINUX

2010-09-07 23:01:19

Latex/Emacs tex mode

A big advantage of latex is that .tex is plain text file so that you can edit latex source files with any text editor. Although vim provides latex syntax-awareness editing, emacs is more widely used because of its tex/latex mode.

The tex mode is installed with emacs and you need to add

(setq tex-dvi-view-command "xdvi")
to your .emacs file so that emacs know how to display dvi file. Two important shortcuts are C-c C-f and C-c C-v. The first shortcut calls latex to compile your tex file and the latter call the xdvi to display the generated dvi file. Note that emacs use its own temporary files and you will have to compile your tex file outside of emacs to get a real dvi file.

There is another tex mode called UltraTex provides some very useful features such as latex command auto completion. (You type \b, if \begin is the only latex command in your tex tree, a term used by UltraTex, \begin will be inserted automatically.) This package is available under helpdesk. To make use of this, add the following lines to your .emacs file:

(setq load-path (cons "/home/helpdesk/trial/ultratex/lisp" load-path))   
(require 'light)   
(require 'ultex-setup)
You then can start Emacs and customize the packages as desired, by using the commands

M-x customize-group lightning-completion  
M-x customize-group ultra-tex
You may need to load the ultex package, say by typing M-x load-library ultex or by opening up a TEX file, before you can do the second customization. Please refer to UltraTex webpage for more information.

阅读(1142) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-09-10 20:15:57

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com