Skip to content

Activating the package

You can detect the successful activation of AUCTeX and preview-latex in the menus after loading a LaTeX file like circ.tex: AUCTeX then gives you a ‘Command’ menu, and preview-latex gives you a ‘Preview’ menu.

For site-wide activation in GNU Emacs, see See Providing AUCTeX as a package.

Once activated, the modes provided by AUCTeX are used per default for all supported file types, namely plain-tex-mode, latex-mode, doctex-mode and texinfo-mode. This might not match your preference. You can have control over which AUCTeX mode is activated per file types by TeX-modes option. For example, you can use Emacs built-in plain-tex-mode for plain TeX files while you can use AUCTeX LaTeX-mode for LaTeX files.

User Option: TeX-modes

List of Emacs built-in TeX modes redirected to AUCTeX modes. If you prefer a particular built-in mode over AUCTeX mode, remove it from this list. Type

kbd
M-x customize-option RET TeX-modes RET

to manipulate the contents of TeX-modes.

Don’t remove tex-mode from TeX-modes unless you set TeX-modes empty to disable AUCTeX completely, otherwise it results in inconsistent behavior.

On Emacs 29 and later, AUCTeX uses either major-mode-remap-defaults or major-mode-remap-alist for redirection. But we recommend not to customize them directly because the customization code for TeX-modes takes care of some other compatibility issues.

When there is a site-wide installation of AUCTeX and you don’t want to use it, you can disable it by

emacs-lisp
(push '(auctex nil) package-load-list)

in your early init file (see (emacs)Early Init File). (We recommend this treatment over setting TeX-modes to nil, because it doesn’t leave unused autoloads persisted.)

It is no longer possible to disable the site-wide installation by

emacs-lisp
(unload-feature 'tex-site)

, so don’t use it. This was the instruction described in former versions of this document, but now it causes error.