Next: Misplaced previews, Previous: The Emacs interface, Up: For advanced users
preview-image-type
preview-image-creators
preview-gs-image-type-alist
preview-image-type
. What to do for each of the various settings
is specified in the variable preview-image-creators
. The options
to pass into GhostScript and what Emacs image type to use is specified
in preview-gs-image-type-alist
.
preview-image-type
defaults to png
. For this to work,
your version of GhostScript needs to support the png16m device.
If you are experiencing problems here, you might want to reconfigure
gs-image-type-alist
or preview-image-type
. Reconfiguring
preview-image-creators
is only necessary for adding additional
image types.
Most devices make preview-latex start up a single GhostScript process
for the entire preview run (as opposed to one per image) and feed it
either sections of a PDF file (if PDFLaTeX was used), or
(after running Dvips) sections of a single PostScript file or separate
EPS files in sequence for conversion into PNG format
which can be displayed much faster by Emacs. Actually, not in sequence
but backwards since you are most likely editing at the end of the
document. And as an added convenience, any preview that happens to be
on-screen is given higher priority so that preview-latex will first
cater for the images that are displayed. There are various options
customizable concerning aspects of that operation, see the customization
group Preview Gs
for this.
Another noteworthy setting of preview-image-type
is
`dvipng': in this case, the `dvipng'will get run on DVI output (see below for PDF).
This is in general much faster than Dvips and GhostScript. In that
case, the option
preview-dvipng-command
preview-dvipng-image-type
preview-gs-image-type-alist
contains an entry for dvipng
: this actually has nothing to with
`dvipng' itself but specifies the image type and GhostScript device
option to use when `dvipng' can't be used. This will obviously be
the case for PDF output by PDFLaTeX, but it will also happen
if the DVI file contains PostScript specials in which case the
affected images will get run through Dvips and GhostScript once
`dvipng' finishes.
preview-gs-options
Running and feeding GhostScript from preview-latex happens asynchronously again: you can resume editing while the images arrive. While those pretty pictures filling in the blanks on screen tend to make one marvel instead of work, rendering the non-displayed images afterwards will not take away your attention and will eventually guarantee that jumping around in the document will encounter only prerendered images.