Use "file" field in Bibtex for PDF file path

Bug #632709 reported by m4cph1sto on 2010-09-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Referencer stores file locations for each reference, but does not write them to managed or exported Bibtex .bib files. Other popular reference manager programs use a Bibtex "file" field, with the format:

  file = {:/path/to/file.pdf:PDF}

It would be very helpful for Referencer to write a "file" field to managed/exported Bibtex files, so that file locations are not lost, for example when moving work back and forth via a .bib file between a Linux computer and a Windows computer that does not have Referencer.

Mads Chr. Olesen (shiyee) wrote :

I can't seem to find any information on the Bibtex "file" field on Google: it might be a non-standard extension.
Which other reference manager programs use it?
Is the file path relative or absolute? In case it is absolute I doubt it will help when moving between a Linux and a Windows computer.

Changed in referencer:
status: New → Incomplete
m4cph1sto (dlreid) wrote :

The "file" field I referenced came from Mendeley Desktop, I believe. It is an absolute path. In the latest version of Mendeley the field looks like: file = {:home/username/path/to/file.pdf:pdf}. It looks like they got rid of the leading "/".

Kbibtex uses a "localfile" field, and it's a relative path:

localfile = "path/to/file.pdf"

The important thing is that these other popular reference managers write, in some manner, the file location for each entry to the Bibtex .bib file, but Referencer does not. This limits the usefulness of Referencer. Actually, we risk losing our entire file database if for whatever reason we can no longer use Referencer. Even though the "file" field is non-standard and varies between managers, a simple script or even find/replace in a text editor could quickly convert one format to the other, or to a Windows-readable format.

Mads Chr. Olesen (shiyee) wrote :

I'm not sure I understand your motivation. What will the benefit of adding the field be?
If it is to be able to migrate to other reference managers, then why not just read the Referencer xml file? It has _all_ the information and is easily machine parseable.

m4cph1sto (dlreid) wrote :

I don't think the average user should have to deal with the xml file on a regular basis. Most users won't have the ability/patience to do that at all. I'll give you a couple usage scenarios I've encountered.

Different reference managers are good at different things. I use Referencer as my main reference manager. I like its simple interface and tagging system. But Mendeley is much better at extracting bibliography data from PDF files. So when adding a large number of PDFs, it would save me a lot of time to open my Referencer-generated .bib file in Mendeley, add the PDFs and have Mendeley automatically generate the bib data, then open the new, updated .bib in Referencer and add my tags. Right now I can't do that because Referencer does not save a "file" field in the .bib.

Here's another scenario. Some journals require references to use the full journal names, and some require abbreviated journal names. Referencer does not have the ability to abbreviate journal names. KBibTex, however, is well-suited for this task (but not for the things Referencer is good at). So when I'm near the final stages of writing a paper, I open my .bib in KBibTex, have it automatically abbreviate all the journal names, and save the new .bib. From this point onward, if I do any work using Referencer, it overwrites the .bib with the full journal names again. But if I keep working in KBibTex, it does not have links to open the local files. It's annoying.

Are there other solutions to the above usage scenarios? Maybe. But it would be really simple to have Referencer save some kind of "file" field that can be read by other Bibtex management software. Preferably, it should have the ability to write the "file" field in various formats that are compatible with other popular software. In my opinion, compatibility and inter-portability with other software is always a positive feature.

Mads Chr. Olesen (shiyee) wrote :

Ahh, I see your point now.
I'm not completely happy about adding all the "file" fields any Bibtex management software might use.
Could you do a minor survey, checking what behaviour, is the most desirable?
E.g. does Mendeley read the localfile field? Does Kbibtex read the file field?

What I'm interested in, is if the behaviour across Bibtex managers could be standardised.

Changed in referencer:
status: Incomplete → Confirmed
tags: added: wishlist
m4cph1sto (dlreid) wrote :

I agree, standardization would be preferable. I'll do some digging.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers