Why is Docear not recognizing Zotero’s BibTeX file, or producing exceptions?

Some users occasionally report that Docear has problems with recognizing the BibTeX file that they exported from Zotero (or from one of Zotero’s add-ons). Sometimes, the reason is that Zotero (or the add-ons) produce invalid BibTeX code. For instance, sometimes, closing brackets ‘}’ or commas ‘,’ are missing. Here is, how a valid entry should look like (we highlighted some pairs of opening and closing brackets, and commas):

Currently, Docear does not tell you were in the BibTeX file an error occurs but just ignores the BibTeX file (we are planning to implement a more informative error message). Therefore, to check your BibTeX file for validity, do one of the following options:

  1. Locate the problem in the BibTeX file
    1. Open your BibTeX file with JabRef (you don’t have to install JabRef, you could just use the WebStart version). If your BibTeX file is not valid, you will get an error message like this:
    2. Alternatively, open your BibTeX file with Docear4Word. To do so, specify your BibTeX file in the settings.
      Then, Docear4Word will tell you at which line the error occurs.
  2. Fix the error: Open the BibTeX file with a text editor (e.g. Notepad), go to the line with the problematic code, and fix it. If you want us to fix the problem, please read here. However, the problem most likely will always re-occur when you freshly export your Zotero data to BibTeX. A workaround might be that you delete the problematic entry from Zotero’s database. You probably don’t have to delete the entire entry but only the problematic field (e.g. the abstract).

In other cases, Docear itself causes the problem. Because Zotero’s BibTeX format is not 100% compatible with Docear’s BibTeX format, Docear does some parsing and changes some minor formatting of the BibTeX file. However, in some situations, this may lead to errors. We are not 100% sure when the errors occur but the problem most likely relates to line breaks in your Zotero annotations. For instance, if you have an annotation in Zotero that looks like this when exported to BibTeX…

annote = {{Docear} is
an academic literature suite
download it at www.docear.org.

… then Docear will parse the BibTeX file incorrectly. To fix the problem, remove the line breaks directly in Zotero and re-export your data.  Please note that we are planning for a more robust BibTeX handling.

Posted in: Working with Docear and other reference managers at the same time

Comments are closed.