Hi Tassilo,

> I've just tried it with emacs 24.3 and this sample document:
> 
> \documentclass{article}
> \begin{document}
> \bibliography{bib1,bib2}
> \end{document}

Thanks.  This indeed works if both bib1.bib and bib2.bib are files in the
same directory or on the BIBINPUT path.  Sorry: the comma was
a red herring.

What is actually failing is reftex finding a bibliography in the standard
user location:

~/Library/texmk/bibtex/bib/

on Mac OS X.  (Not sure the exact place on other OS's.  Maybe this
is a bug only on Mac OS X) Putting bib2.bib there works find for
bibtex (kpsewhich finds it without problem) but causes reftex to miss it.

In my previous case, I had bib2.bib (called master.bib in my example)
in this location, but had also specified the equivalent of 

(setq reftex-default-bibliography '("~/Library/texmf/bibtex/bib/bib2.bib"))

With this set, \bibliography{bib2} works, but \bibliography{bib1,bib2} fails.
If this is not set, then using bib2 is simply not found.  

Steps to reproduce:

1) Create the following bib files:

bib1.bib
~/Library/texmkf/bibtex/bib/bib2.bib

2) Try editing the following tex file:

\documentclass{article}
\begin{document}
\bibliography{bib2}
\end{document}

RefTeX is not finding bib2.bib, even though it is found by kpsewhich.

3) Add the following to emacs startup file:

(setq reftex-default-bibliography '("~/Library/texmf/bibtex/bib/bib2.bib"))

Now the RefTeX works with the previous document, but
\bibliography{bib1,bib2} fails to find information in bib2.bib.
(Somehow in this case, reftex-default-bibliography is not used).

I also tried setting the following, but it did not change any behaviour:

(setq reftex-external-file-finders
      '(("tex" . "/usr/texbin/kpsewhich -format=.tex %f")
        ("bib" . "/usr/texbin/kpsewhich -format=.bib %f")))

Thanks,
Michael.

>> Is there a workaround?
> 
> If you first had just \bibliography{bib2} and then add the other file
> manually, reftex can't know that.  To make it pick up the new file, just
> run `TeX-normal-mode' (C-c C-n).
> 
> Bye,
> Tassilo


_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to