如何将 Okular 与 Emacs Auctex 一起使用?

如何将 Okular 与 Emacs Auctex 一起使用?

当我关注苏巴姆·索尼将 emacs 与 Okular 连接起来的说明,当 emacs 尝试调用查看器“命令:(默认视图)”时,我收到错误消息“符号的函数定义是 void:nil”知道为什么会发生这种情况吗?

我的完整 .emacs 文件如下:

(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.  
 '(TeX-source-correlate-method (quote synctex))
 '(TeX-source-correlate-mode t)
 '(TeX-source-correlate-start-server t)
 '(TeX-view-program-list (quote (("Okular" ("okular %o") "okular --unique %o#src:%n%b"))))
 '(TeX-view-program-selection (quote (((output-dvi has-no-display-manager) "dvi2tty") ((output-dvi style-pstricks) "dvips and gv") (output-pdf "Okular") (output-dvi "xdvi") (output-pdf "Evince") (output-html "xdg-open"))))
 '(delete-selection-mode nil)
 '(mark-even-if-inactive t)
 '(scroll-bar-mode (quote right))
 '(transient-mark-mode 1))
(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.
 )

答案1

删除行

'(TeX-view-program-list (quote (("Okular" ("okular %o") "okular --unique %o#src:%n%b"))))

它的格式错误,而且如果你使用最新的 AUCTeX 版本(11.88 或更高版本),它就是无用的,Okular 开箱即用且配置正确。

相关内容