ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial
Web Hosting by 1&1

29.9 TeX Mode

Emacs provides special major modes for editing files written in TeX and its related formats. TeX is a powerful text formatter written by Donald Knuth; like GNU Emacs, it is free software. LaTeX is a simplified input format for TeX, implemented using TeX macros. DocTeX is a special file format in which the LaTeX sources are written, combining sources with documentation. SliTeX is an obsolete special form of LaTeX.1

TeX mode has four variants: Plain TeX mode, LaTeX mode, DocTeX mode, and SliTeX mode. These distinct major modes differ only slightly, and are designed for editing the four different formats. Emacs selects the appropriate mode by looking at the contents of the buffer. (This is done by the tex-mode command, which is normally called automatically when you visit a TeX-like file. See Choosing Modes.) If the contents are insufficient to determine this, Emacs chooses the mode specified by the variable tex-default-mode; its default value is latex-mode. If Emacs does not guess right, you can select the correct variant of TeX mode using the command M-x plain-tex-mode, M-x latex-mode, M-x slitex-mode, or doctex-mode.

Emacs also provides BibTeX mode, a major mode for editing BibTeX files. BibTeX is a tool for storing and formatting bibliographic references, which is commonly used together with LaTeX. In addition, the RefTeX package provides a minor mode which can be used in conjunction with LaTeX mode to manage bibliographic references. see Top.

Footnotes

[1] It has been replaced by the ‘slides’ document class, which comes with LaTeX.

blog comments powered by Disqus