0

I am using auctex in Emacs, and upon running Preview->Buffer (C-c C-p C-b), what happens is:

  1. Triangles with red borders and white interiors replace every math formula
  2. A white and empty Ghostscript command prompt pops up
  3. Back in Emacs, the bottom line suggests "Type 'C-c C-l' to display results of compilation."
  4. So I do "C-c C-l", and I see many sections like

[6] !Preview: Snippet 7 started. <-><-> l.49 \item An observer can go from $p$ to $q$ !Preview: Snippet 7 ended. (338603+152916x386477). <-><->

It ends with

Output written on _region_.dvi (35 pages, 7212 bytes). Transcript written on _region_.log.

TeX Output exited as expected with code 1

Preview-DviPS finished at Sun Jul 3 00:47:34 Running `Preview-Ghostscript' with ``"c:\Program Files\gs\gs9.19\bin\gswin64.exe" ^"-dOutputFile=^(_region_.prv/tmp6592tSU/pr1-^%d.png^)^" "-q" "-dDELAYSAFER" "-dNOPAUSE" "-DNOPLATFONTS" "-dPrinted" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-sDEVICE=png16m" "-r103.431x103.742"''

After this, if I close the white Ghostscript command prompt, then the buffer updates and says that Ghostscript exited abnormally with code 255.

What should I do to solve this problem?

1

I found the solution to my problem: My Ghostscript executables are located at C:\Program Files\gs\gs9.19\bin, and it happens that gs9.19 installs two executables, one called gswin64, the other called gswin64c. Initially, in my .emacs file, I had

(setq preview-gs-command (executable-find "gswin64"))

which produced the errors that I described above, whereas if I changed it to "gswin64c", then the LaTeX symbols appear correctly in the preview. I'm not sure what the difference is between gswin64 and gswin64c.

  • To quote ghostscript documentation Section 4.2, "General Windows configuration", GSWIN64C.EXE Ghostscript as a 64-bit Windows command line program. This is usually the preferred executable. and GSWIN64.EXE 64-bit Ghostscript using its own window for commands – gboffi Jul 18 '16 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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