Skip to main content

1.2.4 Loading 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.

With Emacs (or if you explicitly disabled use of the package system), the startup files ‘auctex.el’ and ‘preview-latex.el’ may already be in a directory of the ‘site-start.d/’ variety if your Emacs installation provides it. In that case they should be automatically loaded on startup and nothing else needs to be done. If not, they should at least have been placed somewhere in your load-path. You can then load them by placing the lines

(load "auctex.el" nil t t) (load "preview-latex.el" nil t t) 

into your init file.

If you explicitly used --with-lispdir, you may need to add the specified directory into Emacs’ load-path variable by adding something like

(add-to-list 'load-path "~/elisp") 

before the above lines into your Emacs startup file.

For site-wide activation in GNU Emacs, see See Advice for package providers.

Once activated, the modes provided by AUCTeX are used per default for all supported file types. If you want to change the modes for which it is operative instead of the default, use

M-x customize-variable <RET> TeX-modes <RET> 

If you want to remove a preinstalled AUCTeX completely before any of its modes have been used,

(unload-feature 'tex-site) 

should accomplish that.