13

I am hoping to draw upon the expertise of other LaTeX/BibTeX user to help improve a common workflow of mine.

Currently, I download and import BibTex citations from the likes of IEEE/Springer/ScienceDirect and then cut and paste the citation into JabRef. That is, it goes something like this:

  • (In firefox) IEEE/Springer/Whatever -> Export as BibTeX
  • Open export.bib in gedit
  • Create new article in JabRef
  • Copy-paste citation text from gedit into Jabref.

Trying to open the export.bib file into Jabref has it open the BibTeX file as a new database and I have to copy and paste the citation anyway.

I would like to improve this workflow to a one-click "Open With" when I save the .bib from Firefox and it gets added to my BibTeX database.

I currently use JabRef, but would be willing to switch BibTeX managers if something else (in Linux) offers this feature. Of course, a script with cat $FILE >> /path/to/my_database.bib might work, but I then still have to find that reference to link it to the paper I just saved :)

3
  • 1
    JabRef can import files into a bib-file: File --> Import into current database. Oct 27, 2012 at 8:36
  • 3
    You might also consider using a different tool, e.g. Zotero or Mendeley both have a "one-click savo-to-database button" for all major browsers, including Firefox. Web-based alternatives are Connotea, citeulike or BibSonomy. All of the mentioned programs allow export to .bib files which can be used directly or manipulated using JabRef.
    – matth
    Oct 27, 2012 at 10:08
  • 1
    You might also consider switching to biblatex+biber as biber can open remote .bib data sources directly with no importing or downloading at all.
    – PLK
    May 3, 2013 at 19:36

6 Answers 6

10

You can set up Jabref to automatically import a reference from Firefox into the current database, but it's somewhat arcane. Here is my solution under Linux:

1) Select Options -> Preferences -> Advanced -- and check "Listen for remote operation ..." I don't think it matters which port.

2) Create a small bash script (text file) named "jabref-import" that looks like this:

#!/usr/bin/env bash
java -jar ~/local/jabref/JabRef-2.8.1.jar -i --importToOpen "$*"

Replace "~/local/jabref/JabRef-2.8.1.jar" with the path to your Jabref .jar file on your machine. Or if you have a working executable called "jabref", you can replace everything before the "-i" with "jabref". Just make sure your executable accepts command-line options (mine didn't).

In Ubuntu 13.04, the following variant of the script works:

#!/usr/bin/env bash
jabref -i --importToOpen "$*"

3) Make the file executable:

chmod ugo+x jabref-import

4) Make sure Jabref is already open. Go to Firefox, download a citation file. It could be a .bib or .ris or .ref or whatever. Select the "Open with..." option in the dialog, and select the jabref-import executable that you just made. The import dialog should pop up in Jabref with your citation.

3
  • 1
    Thank you for providing a solution about 6 months after I first asked :) It is precisely what I was looking for.
    – Damien
    May 4, 2013 at 0:18
  • For WIndows Batch this translates to "C:\Program Files\JabRef\JabRef.exe" --importToOpen "%1"
    – Robin Koch
    Dec 23, 2016 at 15:19
  • Also check out JabFox below; it is cleaner than this solution, though this one remains as the accepted answer for historical reasons.
    – Damien
    Jan 3, 2017 at 3:25
17

If you have the BibTeX-Code available and copy that to your clipboard (either by opening the export.bib or by copying it from the homepage) and you click on the JabRef window (so that it has the focus) you can just paste (Ctrl+V) it as a new entry.

I knew that from BibDesk (Mac OS) which I am using and found the same for JabRef here http://sourceforge.net/projects/jabref/forums/forum/318825/topic/1653744

3
  • Quite helpful. Reduces the workflow by a step or two. To find the article quickly again, sort by timestamp.
    – Damien
    Oct 28, 2012 at 0:41
  • Wonderful answer. Extremely useful.
    – Echeban
    Nov 28, 2014 at 22:36
  • i think this is still the best answer in 2021 but you need to use BibItNow on Firefox or a similar extension for easy access to the bibtex code. Otherwise, there's 3 or 4 additional steps in there and this becomes impractical.
    – Fons MA
    Nov 3, 2021 at 22:02
5

Here is my workflow.

  1. Get the DOI of the article to cite. You find the DOI on the download page of the paper and it is also usually printed on the first page of the paper.
  2. Paste the DOI into the Jabref search plugin DOI to BibTeX and press "fetch".
  3. You will get a "list" of the search results, which is in most cases only one item. Click "OK" to import them.
  4. Check the new entry in your bib file.

The benefit is that you need less time to import a new article. The DOI is also often easier to spot then the Export button on the web page.

2
  • I realized that using DOI import does not return the correct entry type. For example, I had a lot of Inproceeding entries that were recognized as articles by DOI import. Do you encounter similar issues?
    – tc88
    Sep 4, 2015 at 10:40
  • @tc88, most if not all proceeding articles, which I have cited, were published in a citable journal, so I did not bother to change the bib entry type from @ARTICLE to @INPROCEEDING.
    – quinmars
    Sep 4, 2015 at 12:17
3

I typically create a BibTeX file with very basic information, e.g., just the title,

@article{ocv,
  title={The optimal centroidal Voronoi tessellations and the gersho's conjecture in the three-dimensional space},
}

and then run betterbib on it:

betterbib my.bib out.bib
%comment{This file was created with BetterBib v2.1.0.}

@article{ocv,
  author = {Du, Qiang and Wang, Desheng},
  publisher = {Elsevier BV},
  doi = {10.1016/j.camwa.2004.12.008},
  title = {The optimal centroidal Voronoi tessellations and the gersho's conjecture in the three-dimensional space},
  url = {http://dx.doi.org/10.1016/j.camwa.2004.12.008},
  journal = {Computers & Mathematics with Applications},
  number = {9-10},
  month = may,
  volume = {49},
  source = {CrossRef},
  year = {2005},
  pages = {1355-1373}
}
3

Today there is a AddOn for Firefox called JabFox. It uses functionality of Zotero (which should be installed) to 1-click-import things into JabRef. Works fine.

1
  • 1
    Aside from some minor formatting issues with the import, this works really well.
    – Damien
    Jan 3, 2017 at 3:24
1

My answer is a variation to Damien's for KDE (4.14):

1) the same - check "Listen for remote operation ..."

2) Go to the KDE System settings > File Assosiations.

3) Create new file type (button "+ Add..." in the bottom):

  • group - text
  • type name - bibliography

4) Select bibliography and in the right part of window "Add...":

  • Filename Patterns: *.ris, *.bib, *.ref, *.enw and so on.
  • Application Preference Order: Education > Science > JabRef
    (or write here command like /usr/local/bin/jabref %f - this is for PC-BSD)

5) Apply.

Now you can click on file in browser and select "Open..." - import window will arise (you should start JabRef firstly!).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .