RefTeX gives out the following error when trying to insert a citation:
No valid bibliography in this document, and no default available
I keep a master .bib
file in ~/Library/texmf/bibtex/bib/master_bib.bib
. Biblatex-biber recognize the file when I run it, so a bibliography is generated. The problem is that RefTeX does not recognize the file and yields the above error. I have also placed the .bib
file in the same directory as the .tex
file, with the same results.
This post seemed promising https://tex.stackexchange.com/questions/23780/reftex-wont-detect-my-bib-file but that one self-resolved automagically.
The RefTeX manual (p.20) says that
If you do not use BibTEX, but the document contains an explicit
thebibliography
environment, RefTEX will collect its information from there.
however, I don't see where or how I could include this.
How can I get this to work?
Here's a MWE:
\documentclass{article}
\usepackage[
backend=biber,
style=authoryear,
maxcitenames=2,
sorting=nyt,
backref=true
]{biblatex}
\addbibresource{master_bib.bib}
\begin{document}
Some text. \parencite{Mays:2005, Chow:1998}
\printbibliography
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-engine: xetex
%%% End:
I'm running Emacs 24, with AUCTeX 11.86, TeX Live 2011 from MacTeX.
\bibliography
instead of\addbibresource
? I suspect that RefTeX is looking for that (or maybe\bibliographystyle
) to work, so it may be worth a try.(setq reftex-default-bibliography '("~/Library/texmf/bibtex/bib/master_bib.bib"))
\bibliography
but RefTeX still does not find the.bib
file. Wouldn't\bibliographystyle
be BibTex syntax?.bib
files in the same directory as the.tex
file. Also, once it failed to work once, it would keep failing to work unless I restarted Emacs. Reopening the buffer after setting the correct.bib
file did not change that it didn't work.