RefTex in emacs menu bar
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)
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
精彩评论