开发者

Autocompleting \cite{} with emacs + auctex gives "cite: no such database entry"

I am running Emacs 23.1.1 and AucTeX 11.85 in an Ubuntu 8.10 machine. After opening a tex file, the first time I try to use the autocompletion of the \cite{} command, I get

"cite: info not available, use `C-c &' to get it."

in the minibuffer. After doing the 'C-c &', I get

"byte-code: No BibTeX entry with citation key".

Subsequent calls to \cite gives me the message

"cite: no such database entry" .

I have a \bibliography{library} in my tex file, and the \cite{} entries that I did manually work as expected.

I have the following in my .emacs

(require 'reftex)
(setq-default TeX-master nil)
(add-hook 'LaTeX-mode-hook 'TeX-PDF-mode) ;turn on pdf-mode.  AUCTeX
                                          ;will call pdflatex to
                                          ;compile instead of latex.
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) ;tur开发者_运维问答n on math-mode by
                                             ;default
(add-hook 'LaTeX-mode-hook 'reftex-mode) ;turn on REFTeX mode by
                                         ;default
(add-hook 'LaTeX-mode-hook 'flyspell-mode) ;turn on flyspell mode by
                                           ;default

(setq reftex-plug-into-AUCTeX t)
(setq TeX-auto-save t)
(setq TeX-save-query nil)
(setq TeX-parse-self t)
(setq-default TeX-master nil)

I also tried the suggestions in Suggestion for \cite in Emacs with AUCTeX, but it didn't work either.

Alejandro.


C-c [ works. (I am not sure if after typing \cite{ I should get the completion, but I am happy with the other solution.)


I followed the previously mentioned steps and found that C-c [ works well. I was also able to view the available citations by using the following commands:

1.) C-c <enter>
2.) type: \cite <enter>
3.) type: searchTerm <enter>

Where searchTerm is a regular expression for an item in your .bib file. As previously mentioned, make sure you run bibtex and latex before attempting the \cite auto-complete.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜