vspinu / zotelo

Manage zotero collections from emacsemacs.
121 stars 8 forks source link

Zotelo support for BibLaTeX #7

Open arbox opened 11 years ago

arbox commented 11 years ago

Hello,

it would be great if Zotelo could support the directive \addbibresource{} from the package BibLaTeX.

This directive is a newer feature by BibLaTeX to uniformly add different kinds of reference sources.

Zotelo doesn't recognize it and instantiates a new .bib file.

It would be sufficient to update the zotelo-bibliography-commands variable:

(defcustom zotelo-bibliography-commands '("bibliography" "nobibliography" "zotelo" "addbibresource")
  "List of commands which specify databases to use.

For example \\bibliography{file1,file2} or \\zotelo{file1,file2}
both specify that file1 is a primary database and file2 is the
secondary one. 
"
  :group 'zotelo
  :type 'list)

But in this case we should handle the file extension .bib which must be using with the \addbibresource directive. Many thanks in advance!

vspinu commented 11 years ago

Well, that means handling addbibresource separately. Does it work for you if you proceed by adding addbibresource to commands? What is the caveat?

arbox commented 11 years ago

Simple adding \addbibresource does the work, but I don't find the right place where to handle file extensions. That means if the file had the extension .bib do not add another one.

mlt commented 10 years ago

Would it be possible to just use reftex-get-bibfile-list along with reftex-bibliography-commands customization to include addbibresource?

(defun zotelo--locate-bibliography-files ()
  ;; Scan buffer for bibliography macro and return as a list.
  ;; Modeled after the corresponding reftex function
  (reftex-get-bibfile-list))