emacs 菜单栏中的 RefTex
如果有人能提供有关在 GNU emacs 的菜单栏中创建参考菜单的建议,我将非常感激。
问:如何让 RefTeX 在 emacs 的菜单栏中创建 Ref 菜单?或者这在 Windows 上可能吗? RefTeX 手册说“在支持此功能的系统上”,但没有指出是哪些系统。之前我一直在 Mac OSX 上工作,使用 Aquamacs,并且在菜单栏中有这个参考。
非常感谢任何建议。
旁白:Windows 7、emacs 版本 23.1、AUCTeX、LaTeX 安装。
我已将以下内容插入到我的 .emacs 文件中(我从 EmacsWiki 获取了此代码并更改了路径):
(require 'tex-site)
(autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase Mode" t)
(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
;; (add-hook 'reftex-load-hook 'imenu-add-menubar-index)
(add-hook 'LaTeX-mode-hook '(lambda () (require 'latex-units)
(turn-on-reftex)
(turn-on-auto-fill)
(LaTeX-math-mode)
(load "preview-latex.el" nil t t)))
(setq LaTeX-eqnarray-label "eq"
LaTeX-equation-label "eq"
LaTeX-figure-label "fig"
LaTeX-table-label "tab"
TeX-auto-save t
TeX-newline-function 'reindent-then-newline-and-indent
TeX-parse-self t
TeX-style-path
'("style/" "auto/"
"C:/emacs/emacs-23.3/site-lisp/auctex/style/"
"C:/emacs/emacs-23.3/var/auctex/"
"C:/emacs/emacs-23.3/site-lisp/auctex/style/")
LaTeX-section-hook
'(LaTeX-section-heading
LaTeX-section-title
LaTeX-section-toc
LaTeX-section-section
LaTeX-section-label))
(setq reftex-cite-format 'natbib
reftex-default-bibliography
'("~/Desktop/References/MyLibrary.bib")
reftex-extra-bindings t
reftex-plug-into-AUCTeX t
reftex-sort-bibtex-matches 'year
reftex-toc-mode-hook nil)
I would be very grateful if anyone can give advice on creating a Ref menu in the menu bar in GNU emacs.
Q: How do I get RefTeX to create a Ref menu in the menu bar in emacs? Or is this possible on windows? The RefTeX manual says "on systems which support this", but it does not indicate which systems. Previously I have been working on a Mac OSX, using Aquamacs and have this ref in the menubar.
Any advice is greatly appreciated.
Aside: Windows 7, emacs version 23.1, AUCTeX, LaTeX installed.
I have inserted the following into my .emacs file (I got this code from EmacsWiki and changed the path):
(require 'tex-site)
(autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase Mode" t)
(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
;; (add-hook 'reftex-load-hook 'imenu-add-menubar-index)
(add-hook 'LaTeX-mode-hook '(lambda () (require 'latex-units)
(turn-on-reftex)
(turn-on-auto-fill)
(LaTeX-math-mode)
(load "preview-latex.el" nil t t)))
(setq LaTeX-eqnarray-label "eq"
LaTeX-equation-label "eq"
LaTeX-figure-label "fig"
LaTeX-table-label "tab"
TeX-auto-save t
TeX-newline-function 'reindent-then-newline-and-indent
TeX-parse-self t
TeX-style-path
'("style/" "auto/"
"C:/emacs/emacs-23.3/site-lisp/auctex/style/"
"C:/emacs/emacs-23.3/var/auctex/"
"C:/emacs/emacs-23.3/site-lisp/auctex/style/")
LaTeX-section-hook
'(LaTeX-section-heading
LaTeX-section-title
LaTeX-section-toc
LaTeX-section-section
LaTeX-section-label))
(setq reftex-cite-format 'natbib
reftex-default-bibliography
'("~/Desktop/References/MyLibrary.bib")
reftex-extra-bindings t
reftex-plug-into-AUCTeX t
reftex-sort-bibtex-matches 'year
reftex-toc-mode-hook nil)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有一个类似的问题......但我通过将下面的行插入我的 site-start.el 解决了它
(add-hook 'LaTeX-mode-hook
(拉姆达()
(打开 reftex)
(setq reftex-plug-into-AUCTeX t)))
这在工具栏中放置了一个“Ref”菜单。
对于进一步的 RefTex 自定义,我已将它们放入我的 .emacs 文件中
HTH
Erica
I had a similar problem.... but I solved it by inserting the lines below into my site-start.el
(add-hook 'LaTeX-mode-hook
(lambda ()
(turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)))
This placed a 'Ref' menu in the toolbar.
For further RefTex customizations, I have put these in my .emacs file
HTH
Erica