Next: , Previous: Loading the package, Up: Installation


2.5 Providing preview-latex as a package

As a package provider, you should make sure that your users will be served best according to their intentions, and keep in mind that a system might be used by more than one user, with different preferences. The use of packages should in general not impact performance negatively if a user chooses not to employ it, but should be as convenient as possible. For example, the policy with regard to AUCTeX typically has been to refrain from activating it automatically when it is installed as a package. This is reasonable because

In contrast, preview-latex does not affect operation of AUCTeX unless you exercise its features. The recommended invocation (see above), also provided in the autogenerated file preview-latex.el, will delay loading and activating preview-latex until the first LaTeX file gets loaded. For this reason, should a user decide that he does not want to get preview-latex loaded and activated, placing the line

     (remove-hook 'LaTeX-mode-hook 'LaTeX-preview-setup)

in his personal configuration file will be completely sufficient to keep his personal setup free from any impact of preview-latex's presence.

For this reason we recommend installing the invocation provided in the file preview-latex.el at a place where it gets executed during the site startup phase of Emacs. This will result in a default behavior of loading preview-latex whenever AUCTeX gets loaded.

XEmacs uses a package system. The default preview-latex installation should cater for everything necessary in that case.

For RPM files we include a preview-latex.spec file in the tarball distribution, suitable for recent RedHat systems, that should do just that.