[Tex/LaTex] AUCTeX, “preview image not supported”

auctexemacslive preview

I'm trying to set up Emacs 24.3.1 to work with AUCTeX on Win7. When I try to use the Preview feature on the testing 'circ.tex' file I get the following error:

TeX Output exited as expected with code 1 at Mon Aug 24 18:40:57
LaTeX: preview-image-type setting 'png unsupported by this Emacs

What does that mean? I have GSView, GhostScript 9.09, TeXMaker and TeXLIve 2015 updated from 2013.
I have so far followed Sacha Chua's installation instructions and I have created a path called C:\homemacs\. Inside this folder are the .emacs file and the directory .emacs.d. Using M-x package-list I've installed YASnippet 0.8.0, org-mode 8.3.1 and AUCTeX 11.88.7. This is the .emacs file:

;; -*- mode: elisp -*-

;; Disable splash screen (to enable it again, replace t with 0)
(setq inhibit-splash-screen t)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
 '(custom-enabled-themes (quote (tsdh-dark))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "outline" :family "DejaVu Sans Mono")))))

I'm totally new to Emacs so can you PLEASE give me some instructions as to how to configure it to Preview equations on the same buffer? I've downloaded and installed SumatraPDF– has it got anything to do with the error in question?

Best Answer

I got the correct *.dll files and put them in emacs' binaries. I also had to make a clean install of emacs (emacs-24.4-bin-i686-pc-mingw32.zip) and install AUCTeX with M-x package-install RET auctex RET. My emacs file is constructed from different people's emacs.

;;; Schlosser's .emacs
(server-start)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
(setq-default ispell-program-name "aspell")


;;; Brent.Longborough's .emacs
(setq inhibit-splash-screen t); Disable splash screen
(setq visible-bell t); Flashes on error
;(set-face-background hl-line-face "#f2f1f0"); Same color as greyness in gtk
(show-paren-mode 1); Matches parentheses and such in every mode


;;; AUCTeX
;; Customary Customization, p. 1 and 16 in the manual, and http://www.emacswiki.org/emacs/AUCTeX#toc2
(setq TeX-parse-self t); Enable parse on load.
(setq TeX-auto-save t); Enable parse on save.
(setq-default TeX-master nil)

(setq TeX-PDF-mode t); PDF mode (rather than DVI-mode)

(add-hook 'TeX-mode-hook 'flyspell-mode); Enable Flyspell mode for TeX modes such as AUCTeX. Highlights all misspelled words.
(add-hook 'emacs-lisp-mode-hook 'flyspell-prog-mode); Enable Flyspell program mode for emacs lisp mode, which highlights all misspelled words in comments and strings.
(setq ispell-dictionary "english"); Default dictionary. To change do M-x ispell-change-dictionary RET.
(add-hook 'TeX-mode-hook
          (lambda () (TeX-fold-mode 1))); Automatically activate TeX-fold-mode.
(setq LaTeX-babel-hyphen nil); Disable language-specific hyphen insertion.

;; " expands into csquotes macros (for this to work babel must be loaded after csquotes).
(setq LaTeX-csquotes-close-quote "}"
      LaTeX-csquotes-open-quote "\\enquote{")

;; LaTeX-math-mode http://www.gnu.org/s/auctex/manual/auctex/Mathematics.html
(add-hook 'TeX-mode-hook 'LaTeX-math-mode)


(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(preview-default-document-pt 12))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

This is what I have now:emacs with AUCTeX and preview-latex working fine now