XEmacs and LaTeX

In this article I will show how to set up the XEmacs (which is my preferred editor in such things like editing..) with the AucTeX and RefTeX mode. These packages are very helpful if you want to edit LaTeX documents.

Package description

AucTeX is an auxiliary package to provide easy to use commands for editing the LaTeX documents. The RefTeX package can be seen as an additional mode to AucTeX which extends it to easy navigation and referencing tools. It provides an overview over the created sections and subsections and manages the references in figures, (external) bibliography files and anything else. Multiple documents in a LaTeX project are supported.

XEmacs configuration

To use the packages (modes) you have to install the auctex package with your preferred system package manager (synaptic, aptitude, yast, apt-get, etc.). The RefTex mode is already a build-in mode in your XEmacs (try M-x reftex-mode in the XEmacs window).

To load the modes every time you open an LaTeX document in your XEmacs editor, you have to add the following lines to your XEmacs configuration file in .xemacs/custom.el:

;enable AUCTEX mode
(require 'tex-site)

;added by myself
(setq Tex-auto-save t)
(setq Tex-parse-self t)

;concerning insertion and references
(autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
;;; end for reftex ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(autoload 'turn-on-bib-cite "bib-cite")
(add-hook 'LaTeX-mode-hook 'turn-on-bib-cite)

;;; end for bib-cite;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill) 

If the file does not exist, create them by hand.

Additional documentation

I have uploaded two reference cards to use the XEmacs in general and the AucTeX and RefTex modes while editing the LaTeX documents. See below.

Section Blog: Available Downloads

 
filefile sizecomments
A2pdf.sh545 Bnone
A2ps.sh445 Bnone
XEmacs_quickref.pdf80 KBfeatured by this article
auctex-ref.pdf96.25 KBfeatured by this article
createIEEEPDF.sh622 Bnone
createWinVid.sh800 Bnone
ctags.zip241 Bnone
vpnclient-linux-2.6.19+-rev1.diff3.54 KBnone
Author: Christoph Hermes, published: 2007-07-11 13:21:27