So, on Windows 8, emacs, trying to use preview-latex. Each time I get the same error:

Preview-PDF2DSC finished at Mon Oct 13 12:55:42
PDF2DSC sentinel: Searching for program: permission denied, GSWIN32C.EXE

I'm new to both latex and emacs, Googling around I can't find anyone with a similar error. Most of the ideas I've tried from that are unlikely things like checking the permissions on the gs folder in Program Files. Any ideas?

EDIT: Everything compiles; I can for example get it to give me a pdf of the tex with C-c C-c. Also, if I try to get a preview, the log includes the following

Output written on _region_.pdf (1 page, 42052 bytes).
Transcript written on _region_.log.
Preview-LaTeX exited as expected with code 1 at Mon Oct 13 15:48:49
Running `Preview-PDF2DSC' with ``pdf2dsc "_region_".pdf "_region_.prv/tmp4804YjF"/preview.dsc''

If I go open _region_.pdf it contains the compiled math as it should. The log immediately above is then immediately followed by the error message I posted originally.

emacs and auctex were set up using the installation wizard from this source http://vgoulet.act.ulaval.ca/en/emacs/windows/

I installed gs 9.15 and gswin32c.exe is a folder listed in PATH. I can view the various examples that the installation includes.

Also, it's Windows 8, not 8.1.

  • Does only gs refuse to work? Do your files compile? And how did you set up emacs and auctex? Is it windows 8 or 8.1 ? Give us more information.
    – Keks Dose
    Oct 13, 2014 at 20:40
  • Your initial test should be to simply open a *.pdf file in a buffer without using AUCTeX to see if you can correctly use ghostscript. Once you can open *.pdf files using ghostscript and display them as *.png images in a buffer, then you will be ready to go to the next step which is playing with AUCTeX. I spent several hours a week or so ago tracking down the missing *.dll files, which you must have in addition to a proper installation of ghostscript. To see the required *.dll files for your version of Emacs, M-x describe-variable RET dynamic-library-alist RET. *.dll files go in the bin
    – lawlist
    Oct 14, 2014 at 6:03
  • You should also check the path to ghostscript that Emacs uses -- e.g., M-x describe-variable RET doc-view-ghostscript-program RET and make sure your path is correct -- e.g., "c:/Program Files/gs/gs9.15/bin/gswin32c.exe" FYI: The vgoulet install comes with the required .dll files for that particular Emacs version -- this is one advantage of using that particular build. However, I've only tried Windows 7 and Windows XP.
    – lawlist
    Oct 14, 2014 at 6:09

1 Answer 1


lawlist's second suggestion (in comments above) ended up being correct. I will document exactly what I did here for anyone that ends up with the same problem.

To troubleshoot, I cut and pasted the gs folder out of Program Files to see what would happen. Got the same error message. So I figured emacs was not using the path I had hoped I provided it (I repeat that the correct path was in the PATH environment variable all along).

lawlist in the comment suggested that I check the path emacs was using for ghostscript. Perhaps it's because I'm so new to emacs and did something wrong without realizing but the commands he mentions did not work for me (emacs returns [no match]). But I was able to find the path being used with the following:

Preview dropdown menu -> customize -> Browse options

Select Preview Gs.

Preview Gs Command was set to GSWIN32C.EXE. I replaced this with the full path where GSWIN32C.EXE is located. Now preview works.

Thanks to lawlist and Keks Dose for the help!

You must log in to answer this question.

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