I open a LaTeX file in Emacs, and press C-c C-p C-b (M-x preview-buffer) to generate math/graphics previews for the entire buffer. I find that a PDF file is generated with each page containing a math formula.

I then move cursor to the beginning of an equation, press C-c C-p C-p (M-x preview-at-point), but the equation gets folded up! Here are screenshots before and after pressing C-c C-p C-p:

enter image description here

enter image description here

Am I using preview-latex correctly? Why is there no equation rendered for the first line?

When moving cursor inside an align environment, I don't get a preview either, and it says:

GPL Ghostscript 9.05: Unrecoverable error, exit code 1
Preview-PDF2DSC exited abnormally with code 1 at Sun Sep 28 10:19:53
PDF2DSC sentinel: Opening input file: no such file or directory,  ./_region_.prv/tmp19610wh0/preview.dsc

I installed AucTeX and TeXLive on my Ubuntu 12.04.

  • TeXlive 2009-15
  • AUCTeX 11.86-2ubuntu1
  • preview-latex 11.86-2ubuntu1

I use TeX-PDF-mode.

After installing the latest auctex, the problem solved.

However, when C-c C_p C-d, there is an error at the end:

(see the transcript file for additional information)</usr/share/texmf-texlive/f
Output written on hw.pdf (135 pages, 204905 bytes).
Transcript written on hw.log.

Preview-LaTeX exited as expected with code 1 at Sun Sep 28 17:21:07
LaTeX: LaTeX found no preview images

When C-c C-p C-p, I can see the preview:

Preview-LaTeX exited as expected with code 1 at Sun Sep 28 17:22:06
Running `Preview-PDF2DSC' with ``pdf2dsc _region_.pdf _region_.prv/tmp32202-vH/preview.dsc''

Preview-PDF2DSC finished at Sun Sep 28 17:22:07
Running `Preview-Ghostscript' with ``gs -dOutputFile\=\(_region_.prv/tmp32202-vH/pr1-\%d.png\) -q -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r96x96.0504''

Preview-Ghostscript finished at Sun Sep 28 17:22:21
  • 1
    The red icons usually imply that emacs cannot render the images. Check and customize the variable preview-image-type by M-x customize-variable preview-image-type and set it to pnm and try previews again. Also it might help to give details about your OS and auctex version.
    – Vamsi
    Sep 28, 2014 at 4:53
  • 2
    Please edit your question and include information about how you installed LaTeX and AUCTeX.
    – user227
    Sep 28, 2014 at 8:13
  • @Vamsi: thanks. I changed that from png to pnm, but it still does not work
    – Tim
    Sep 28, 2014 at 14:09
  • @lunaryorn: yes, just added.
    – Tim
    Sep 28, 2014 at 14:10
  • @Tim And your Emacs version?
    – user227
    Sep 28, 2014 at 14:12

1 Answer 1


Auctex 11.86 has known issues with Ghostscript ver >=9.0. Either downgrading ghostscript or updating Auctex will fix the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.