[OS X Emacs] On Aquamacs 2.2, preview-latex images go to pdf, and not to screen

Jim Wise jwise at draga.com
Wed Apr 6 11:42:35 EDT 2011


David Reitter <david.reitter at gmail.com> writes:

> On Apr 6, 2011, at 11:21 AM, Michael Braun wrote:

>> I have ghostscript 8.71 installed.  I did try installing 9.01 from
>> MacPorts, but I hate MacPorts (slows down my computer, hard to maintain
>> compatibility with other files, etc).  I could try installing gs 9.0.1
>> again, but it sounds like that is the cause of some of the problems.  But
>> the problem should not be due to a difference between gs 8.71 and gs
>> 9.0.1.  It just seems like preview-latex doesn't know to send the images
>> to ghostscript (the screen), and not the pdf file.
>
> I'm mildly surprised that you get a PDF file in the first place.  I was
> under the impression that the preview mechanism used Ghostscript to generate
> raster images (png? tiff?) rather than PDFs.  Perhaps there's a bug in
> AUCTeX, and/or installing the latest Ghostscript would help.
> It might be worth checking if the latest MacTeX distribution has it.

This was the failure mode I saw as well.  It appears that in correct
operation, preview-mode:

  a.) creates an ersatz LaTeX file with a preamble and just the parts of
     the document it wants to preview (all in one document), with some
     pdf specials to indicate the extent of each one

  b.) runs pdflatex to generate a pdf of this file

  c.) runs pdf2dsc (from ghostscript) to generate a .dsc file containing
      the bounding information from information in the pdf file (from
      b.) ) resulting from the pdf specials embedded in a.)

  d.) runs gs to generate a png file corresponding to each bounding box
      selected in c.), containing the bounded part of the pdf generated
      in b.)

There's a similar workflow for dvi mode, using latex -> dvips in stage
b.).

As mentioned, deleting the older compiled elisp for preview mode fixed
the problem here.  Before this, steps a.), b.), and c.) were running
fine, but step d.) was exiting without actually generating any png files
(the patch in preview.el updates the arguments gs is called with).
         
-- 
				Jim Wise
				jwise at draga.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 192 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20110406/d605331e/attachment.asc>


More information about the MacOSX-Emacs mailing list