Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggestion for \cite in Emacs with AUCTeX

Tags:

emacs

auctex

I would like to know how can I get the suggestion when I do a \cite in Emacs-AUCTeX. The minibuffer tells me when I do C-c [ that:

No valid bibliography in this document, and no default available

So how can I set this default? I have a separated file with my bibtex references that is called by a master document, and I want the suggestion for any of the other files included.

like image 624
mjsr Avatar asked Apr 23 '10 13:04

mjsr


3 Answers

Have you tried: Ref -> Parse Dokument -> Entire Document? That solved the problem for me.

like image 175
Judith Avatar answered Nov 10 '22 12:11

Judith


The variable reftex-default-bibliography is what defines the default bibliography to use. I don't do much with mult-file documents, do you have reftex-plug-into-AUCTeX turned on?

like image 20
Ivan Andrus Avatar answered Nov 10 '22 12:11

Ivan Andrus


Yes, modifying this variable is a solution (I don't know if it is the "best solution"). I go to the ref menu -> Customize -> Browse Reftex Group -> Reftex Citacion Support -> Reftex Default Bibliography and then I add the path to the bib file (without the .bib extension) and it works!! These options create this in the init file:

(custom-set-variables

 '(reftex-default-bibliography (quote ("D:/mybibdirectory/mybibfile"))))
(custom-set-faces

 )

Well, perhaps that it works now that suggestions are going to appear in every document that I write. It would be good have a solution only for this document.

Reading the help file of reftex (reftex->finding files) also mentions make the next modifications in order to get the suggestions:

(setq reftex-bibpath-environment-variables
                '("D:/mybibdirectory/"))
like image 4
mjsr Avatar answered Nov 10 '22 13:11

mjsr