Next: , Previous: Build/install, Up: Installation


2.4 Loading the package

First you should make sure that AUCTeX gets loaded. You then need to place a few lines in your personal .emacs file (or a site-wide configuration file).

For XEmacs, if you specified a valid package directory during installation, or none at all, then XEmacs installation should do everything necessary in order to install preview-latex as a package and activate it. Restarting XEmacs should then make the package visible, and C-c C-p C-d should produce previews.

If you used --with-packagedir, you have to make sure that the directory lisp/preview under the directory you specified is in XEmacs' load-path variable.

For GNU Emacs, the recommended way to activate preview-latex is to copy the file preview-latex.el (which is generated during the installation) to a place where your installation keeps automatically loaded startup files. Alternatively, you can copy it to some place on your load-path and load it with

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

That is all. There are other ways of achieving the equivalent thing, but we don't mention them here any more since they are not better, and people got confused into trying everything at once.

preview-latex.el itself is rather short, and loaded quite fast. When you first load a LaTeX file, preview.el itself gets loaded (if you have AUCTeX up and working). C-c C-p C-d should then give you a graphics preview. You can customize the default option set and other settings of the Emacs package by entering M-x customize-group <RET> preview <RET>.

There is a sample file circ.tex which you can use for testing around a bit, and which serves as sort of a reference for initial bug reports. See Known problems for a list of known problems.