Next: , Up: Known problems


5.1 Problems with GhostScript

Most of the problems encountered come from interaction with GhostScript. It is a good idea to have a fairly recent version of GhostScript installed. One problem occurs if you have specified the wrong executable under Windows: the command line version of GhostScript is called GSWIN32C.EXE, not GSWIN32.EXE.

When GhostScript fails, the necessary information and messages from Ghostscript go somewhere. If GhostScript fails before starting to process images, you'll find the information at the end of the process buffer you can see with C-c C-l. If GhostScript fails while processing a particular image, this image will be tagged with clickable buttons for the error description and for the corresponding source file.

Important note: Various versions of GhostScript have a security bug which could seriously affect preview-latex. Current versions of preview-latex should work around this bug. The symptom would be that one out of two previews will fail, and previews get generated quite slowly since preview-latex starts a new GhostScript process after each failure. Please report any reoccurence of the problem.

The default options configurable with

     M-x customize-variable <RET> preview-gs-options <RET>

include the options -dTextAlphaBits=4 and -dGraphicsAlphaBits=4. These options have been reported to make GhostScript 5.50 fail, but should work under GhostScript 6.51 and later. If you are experiencing problems, it might help to customize them away. Of course, this also takes away the joy of antialiasing, so upgrading GhostScript might not be the worst idea after all.

The device names have changed over time, so when using an old GhostScript, you may have problems with the devices demanded by the customizable variable preview-image-creators. In that case, make sure they fit your version of GhostScript, at least the entry corresponding to the current value of preview-image-type. While not being best in file size and image quality, setting preview-image-creators to jpeg should probably be one of the best bets for the purpose of checking basic operation, since that device name has not changed in quite some time. But JPEG is not intended for text, but for photographic images. On a more permanent time scale, the best choice is to use PNG and complain to your suppliers if either Emacs or GhostScript fail to properly accommodate this format.