Why exporting when exporting bibtex with files provides twice the same pdf in the File bibtex field?

Hi everyone,
sorry if this seems trivial but I have the following situation. When I export an entry which contains some files to bibtex I've noticed that the path to the files in the File bibtex field value are added twice.

For instance:
title = {A {Tutorial} on {Bayesian} {Optimization}},
month = dec,
year = {2010},
file = {adams_a_tutorial_on_bayesian_optimization_for_machine_learning.pdf:files/1804/adams_a_tutorial_on_bayesian_optimization_for_machine_learning.pdf:application/pdf;brochu_a_tutorial_on_bayesian_optimization_of_expensive_cost_functions,_with.pdf:files/1800/brochu_a_tutorial_on_bayesian_optimization_of_expensive_cost_functions,_with.pdf:application/pdf}

As you can see the file contains the following:
1) adams_a_tutorial_on_bayesian_optimization_for_machine_learning.pdf
3) brochu_a_tutorial_on_bayesian_optimization_of_expensive_cost_functions,_with.pdf
4) files/1800/brochu_a_tutorial_on_bayesian_optimization_of_expensive_cost_functions,_with.pdf:application/pdf

Also if I try to export bibtex only without the files I get the following
file = {adams_a_tutorial_on_bayesian_optimization_for_machine_learning.pdf:/home/kirk/papers/pdfs/adams_a_tutorial_on_bayesian_optimization_for_machine_learning.pdf:application/pdf;brochu_a_tutorial_on_bayesian_optimization_of_expensive_cost_functions,_with.pdf:/home/kirk/papers/pdfs/brochu_a_tutorial_on_bayesian_optimization_of_expensive_cost_functions,_with.pdf:application/pdf}

I don't understand I've set relative paths and I would like the file to contain only the following values:

file = {adams_a_tutorial_on_bayesian_optimization_for_machine_learning.pdf;brochu_a_tutorial_on_bayesian_optimization_of_expensive_cost_functions,_with.pdf}

How can I achieve that, what am I missing?


  • Bibtex's file export ones exports the label of the file, followed by a colon, and the its path. Since your item has two attachments it does that twice. While the "file" field isn't strictly bibtex, this is by far the most common behavior across apps.

    Why is the look of the file field important to you? What Zotero does maximizes compatibility with other software.
  • Is there any possibility to export only the path to the files and not any labels? This messes with my workflow, although the file is common across apps, it's not that common on the mac world where I use bibdesk and now I'll have to change my script which was translating file values into equivalent bibdesk-file fields in order to accommodate for the label. There must be some kind of configuration to choose only the path to be stored and not the label or at least during the export one should be able to choose to export only the paths to the files and not the labels.
  • No configuration, no. I think you may literally be the first person to ask for this.
    Only way to do this is to modify the bibtex export script (or use a postprocessing script via the better bibtex add-on).
  • AFAIK the 3-part file field is JabRef-specific (if I'm wrong on this, please do correct me), so if you set Include JabRef-specific metadata to no in BBT, you get only filenames, no title/mimetype.
  • JabRef originated the format, but other tools (such as Mendeley) have also embraced it.
  • Alright, that's good to know. As it stands currently, BBT will turn it off if you turn jabref-specific stuff off.
  • (not the first person to ask in BBT -- don't remember exactly, but someone was using an emacs-integrated refmanager that didn't like attachments the jabref way)
  • I'm using that as well, the only thing that I'm missing is accurate automatic metadata extraction and I have programmed that as well but the wall that I'm currently against is the fucking google that blocks multiple queries to scholar.
  • Thanks, I'll have a look at it.
Sign In or Register to comment.