[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.5 No images are displayed with gs 9.27 and earlier

preview-latex tries to adjust the foreground and background colors of generated images to those of Emacs. Unfortunately, incompatible changes introduced in Ghostscript 9.27 breaks the traditional method partially, and preview-latex can display no images under certain circumstances.

A new method implemented alternatively works only with Ghostscript > 9.27. If you are using Ghostscript 9.27 or earlier, customize the option preview-pdf-adjust-color-method.

User Option: preview-pdf-adjust-color-method

Method to adjust colors of images generated from PDF. It is not consulted when the LaTeX command produces DVI files.

When the option is t (default), preview-latex adjusts the FG and BG colors of the generated images by the new method. This method requires that Ghostscript has working DELAYBIND feature, thus is invalid with gs 9.27 (and possibly < 9.27).

When it is compatible, preview-latex uses traditional method. This option is provided for backward compatibility with older gs. See the below explanation for detail.

When nil, no adjustment is done and “black on white” image is generated regardless of Emacs color. This is provided for fallback for gs 9.27 users with customized foreground color. See the below explanation for detail.

When the LaTeX command produces PDF rather than DVI and Emacs has non-trivial foreground color, the traditional method (compatible) makes gs >= 9.27 to stop with error. Here, “non-trivial foreground color” includes customized themes.

If you use such non-trivial foreground color and the version of Ghostscript equals to 9.27, you have two options:

  1. Choose the value compatible and customize preview-reference-face to have default (black) foreground color. This makes the generated image almost non-readable on dark background, so the next option would be your only choice in that case.
  2. Choose the value nil, which forces plain “black on white” appearance for the generated image. You can at least read what are written in the image although they may not match with your Emacs color well.

The default value used to be compatible for short period before Ghostscript 9.50 was released but now is t.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October 18, 2020 using texi2html 1.82.