Variable: preview-pdf-color-adjust-method
preview-pdf-color-adjust-method is a customizable variable defined in
preview.el.
Value
t
Documentation
Method to adjust colors of images generated from PDF.
It is not consulted when the latex command produces DVI files.
The valid values are:
t: preview-latex transfers the foreground and background colors of Emacs to the generated images. This option requires that Ghostscript has working DELAYBIND feature, thus is invalid with gs 9.27 (and possibly < 9.27).
compatible: preview-latex uses another mothod to transfer
colors. This option is provided for compatibility with older gs.
See the below explanation for detail.
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:
- 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.
- 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.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/preview.el
(defcustom preview-pdf-color-adjust-method t
"Method to adjust colors of images generated from PDF.
It is not consulted when the latex command produces DVI files.
The valid values are:
t: preview-latex transfers the foreground and background colors
of Emacs to the generated images. This option requires that
Ghostscript has working DELAYBIND feature, thus is invalid with
gs 9.27 (and possibly < 9.27).
`compatible': preview-latex uses another mothod to transfer
colors. This option is provided for compatibility with older gs.
See the below explanation for detail.
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:
- 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.
- 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."
:group 'preview-appearance
:type '(choice
(const :tag "Adjust to Emacs color (gs > 9.27)" t)
(const :tag "Compatibility for gs =< 9.27" compatible)
(const :tag "No adjustment (B/W, for gs 9.27)" nil)))