5

I'm trying to get preview of math formulas to work in AUCTeX. When running M-x preview-buffer on simple test document I get the following error:

Preview-DviPS finished at Wed Dec 28 00:53:14
DviPS sentinel: Searching for program: no such file or directory, GSWIN32C.EXE

However gswin32c.exe does exist in my path. It works from Cygwin and I have also added the path to Emacs exec-path variable. Maybe it is a problem with case? But I couldn't find a way to redefine the program name in emacs.

I'm using Emacs 23.3, AUCTeX 11.86 and MikTeX 2.9 on Windows 7. I followed these Instructions when installing AUCTeX.

1

4 Answers 4

3

You can specify the executable that preview uses by Preview->Customize->Browse Options->Preview Gs->Preview Gs Command

also

Ensure you use ghostscript 8.71, as later versions have a file interface change that prevents preview from doing file io. See thread below:

http://comments.gmane.org/gmane.emacs.auctex.bugs/1785

3
  • I had exact the same problem as the original poster described. The solution was changing from ghostscript 9.05 back to 8.71 just as John suggested. Thanks John!
    – user14010
    Commented Apr 27, 2012 at 10:07
  • I didn't have exact problem, but this gs version change worked. I'm using emacs 24.1. installed auctex using the package manager after installing all prerequisites. Commented Jul 7, 2012 at 16:12
  • 1
    The latest version as of now (Ghostscript 9.06) works fine on my Windows 7 system (In addition, I had to put some dll files to the Emacs bin directory to enable PNG support but that's another story)
    – Jisang Yoo
    Commented Dec 16, 2013 at 15:00
1

I have similar environment, the only difference is my Emacs is 23.4.1. I followed instructions here: Installing AucTeX and Preview LaTeX on Windows. Basically you need to install AUCTeX from sources and use Cygwin's versions of make, perl, gs, etc. After I was done I found that I am getting empty boxes in previews which was solved by applying this advice.

The next (minor) problem was the too small a font used for previews. The font size is configurable in customization section for preview (Preview->Customize->Browse Options->Preview Appearance->Preview Scale Function, set it to Number: 2.0).

Finally, I only use Preview Section or Preview Buffer commands at the moment. Preview Document results in "LaTeX found no preview images" error which I guess is related to multi-file documents and needs to be dealt with separately (the link you have has some helpful discussion on the TeX-master variable).

1

I found that 'gs' worked from the Cygwin command line perfectly well, and didn't want to have to install Ghostscript again since Cygwin already had it.

For me, putting this in my preview-latex.el fixed it:

(setq preview-gs-command "gs")

Presuming your Emacs is set up to handle Cygwin commands.

I hope this helps anybody else with the same problem.

0

Here is what worked for me(on windows 7 32 bit):

Emacs 24.3.1 auctex auctex-11.87-e24.2-msw.zip gs9.07

  1. add gs path to path environment
  2. in file site-start.d/preview-latex.el at the end add(if there was error about png image)

    (setq preview-image-type 'pnm)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .