next up previous contents index
Next: Latex/Lyx Up: Word Processing Previous: Latex/WinEdit/Scientific Workplace   Contents   Index


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 http://www.math.washington.edu/ palmieri/Emacs/ultratex.html which 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.


next up previous contents index
Next: Latex/Lyx Up: Word Processing Previous: Latex/WinEdit/Scientific Workplace   Contents   Index
Statistics Helpdesk 2004-08-17