Subject: bug#20661: What prevents me from getting a preview?

From: Reinhard Kotucha <[email-masked]>
Date: Wed, 27 May 2015 00:12:02 +0200

On 2015-05-26 at 16:32:04 +0200, Markus Pötzlberger wrote:

 > gswin64c is in the path. unzipped some png .dll files into the
 > emacs folder.
 > 
 > LaTex works fine, but the conversion to pictures fails somehow...
 > 
 > I had to change the "preview-gs-command" from "nil" to the current
 > setting "gswin64c.exe"

What makes you think that you had to change preview-gs-command?

preview-latex uses the "hidden" Ghostscript packages shipped with TeX
Live or MIKTeX by default.  You don't even have to install Ghostscript
at all.  You can check whether rungs (TeX Live) or mgv (MiKTeX) is in
PATH and working:

  rungs -help   (TeX Live)
  mgv -help     (MiKTeX)

Did you get an error message?  It's unclear whether Ghostscript is the
culprit or one of the image libs you installed separately.  If you've
got any error message, please post it here.

 > Is it necessary to use "gswin32" instead of "gswin64"?

No.  preview-latex looks for gswin32c.exe by default if no Ghostscript
provided by a TeX distribution is found.  Theoretically you have to
specify gswin64c.exe explicitly only if you have a 64-bit version of
Ghostscript.  Maybe a future version of preview-latex could add
(executable-find "GSWIN64C.EXE") so that even less people have to
touch preview-gs-command.  But IMO there is something wrong if you
have a TeX distribution installed and auctex/preview-latex doesn't
find the provided Ghostscript.

As I said before, without any error message it's hard to find out
what's going on.

BTW, it would be very helpful if you use the command

  M-x TeX-submit-bug-report RET

It provides useful information about your installation.

Which TeX distribution are you using?

Instead of assembling emacs, auctex, and a bunch of libraries
yourself, you could also try

  http://ctan.org/tex-archive/support/win32-emacs-auctex

This is hopefully easier to install, especially since it already
contains all the necessary libraries (.DLLs).  I strongly encourage
Windows users to give it a try.  I need more feedback in order to
maintain it properly.  ATM I have the impression that only very few
people are aware of this distribution.

Please note that another installation of Emacs shares the same
initialization file (.emacs) as the one you installed already.
Therefore it's better to remove or comment out customizations you
alraedy did so that we can start with a fresh setup.

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:[email-masked]
------------------------------------------------------------------