[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-AUCTeX] RefTeX cannot manage multiple "bibliography" macros

From: Mosè Giordano
Subject: Re: [Bug-AUCTeX] RefTeX cannot manage multiple "bibliography" macros
Date: Mon, 4 Nov 2013 21:42:33 +0100

Hi Tassilo,

2013/11/4 Tassilo Horn <address@hidden>:
> Mosè Giordano <address@hidden> writes:
> Hi!
>> actually your change does fix the problem for me, and now I can add
>> keys from both database files :-) `LaTeX-bibliography-list' has both
>> files and `LaTeX-bibitem-list' contains keys from both files.  The
>> only, minor, problem is that one has to revert the buffer to fill
>> `LaTeX-bibitem-list' after the database files are added with `C-c RET
>> bibliography/addbibresource RET'.
> Hm, when I find the existing file
> --8<---------------cut here---------------start------------->8---
> \documentclass{article}
> \usepackage{biblatex}
> \addbibresource{texbook1.bib}
> \addbibresource{texbook2.bib}
> \begin{document}
> \printbibliography
> \end{document}
> --8<---------------cut here---------------end--------------->8---
> `LaTeX-bibliography-list' contains both bib files, but
> `LaTeX-bibitem-list' is nil.  Thus, C-c [ completes nothing (but the bib
> menu is correct).  After picking one entry from that, the next C-c [
> completes only the chosen entry.

You have to get the parsed files associated to the the bibliography
files first (just edit and save them).

>> Maybe we can add a `TeX-run-style-hooks' inside `TeX-arg-bibliography'
>> and `LaTeX-arg-addbibresource', what do you think?
> Could you elaborate what and why that would achieve?

I suggest to add
    (mapc 'TeX-run-style-hooks styles)
to the end of `TeX-arg-bibliography' (and something similar to
`LaTeX-arg-addbibresource'), just like style files of LaTeX packages
are run inside `LaTeX-arg-usepackage'.  If there is already the parsed
file associated to the bibliography file, `LaTeX-bibitem-list' will be
immediately filled without the need to revert the document.  And of
course we need to hope that the bibliography file has a different name
from the main document (it's not uncommon to use the same base name),
but this is a restriction intrinsic to AUCTeX, for the moment.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]