AUCTeX,“不支持预览图像”?

AUCTeX,“不支持预览图像”?

我正在尝试设置 Emacs 24.3.1 以在 Win7 上使用 AUCTeX。当我尝试使用预览测试“circ.tex”文件上的功能时出现以下错误:

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

这是什么意思?我有 GSView、GhostScript 9.09、TeXMaker 和 TeXLIve 2015,均是从 2013 版更新而来的。到目前为止,我一直关注Sacha Chua 的安装说明我创建了一个名为 的路径C:\homemacs\。此文件夹中有.emacs文件和目录.emacs.dM-x package-list我已使用 安装了 YASnippet 0.8.0、org-mode 8.3.1 和 AUCTeX 11.88.7。这是文件.emacs

;; -*- 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")))))

我对 Emacs 完全陌生,所以您能否给我一些说明,告诉我如何配置它以在同一个缓冲区上预览方程式?我已经下载并安装了 SumatraPDF——这与所讨论的错误有什么关系吗?

答案1

我得到了正确的 *.dll 文件并将它们放入 emacs 的二进制文件中。我还必须全新安装 emacs ( emacs-24.4-bin-i686-pc-mingw32.zip) 并使用 安装 AUCTeX M-x package-install RET auctex RET。我的 emacs 文件是由不同人的 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.
 )

这就是我现在所拥有的:emacs 与 AUCTeX 和 preview-latex 现在可以正常工作

相关内容