Why can Docear4Word not load my BibTeX file (Unexpected error at line x, column y)?

If you try to add a reference in MS-Word, and your BibTeX file is invalid, you will receive an error message like this:

If you receive such an error message, there are three potential solutions

1. Install the latest Docear4Word version

2. Fix the problem yourself

To fix the problem, open your BibTeX file with a text editor, e.g. Notepad and go to the line with the erroneous entry (the error message contains the line number, e.g. 4)

If you have an error in a large BibTeX file at e.g. line 1312, and you don’t want to count the lines manually, activate the status bar in Notepad. This will display the line and column of your cursor in the bottom right corner.

Alternatively, install a text editor like NotePad++, which displays the lines by default.

There are two reasons that lead to corrupt BibTeX files.

A) Invalid BibTeX keys

Each reference has a unique BibTeX key, i.e. the string after e.g. @ARTICLE{. Certain characters are not allowed as BibTeX key. These characters are # & / \ ‘ : ? < > (and maybe some others). If you see such a character, delete it, save your BibTeX file, and everything should work fine again (unless you have more entries with invalid characters, but Docear4Word will tell you). If you are using Mendeley, you should change the BibTeX key (citation key) directly in Mendeley, and not in the BibTeX file.

 

B) Missing brackets

Each entry in your BibTeX file has a number of attributes (e.g. author, title, journal name, pages, …) and the value of each attribute is enclosed by {  }. If such a bracket is missing, Docear4Word cannot read the file.

This is how a correct entry looks like

This entry would be corrupt (a closing bracket is missing at line 6789).

If you find such an error, add the enclosing brackets at the correct positions (and don’t forget a comma after the bracket if it’s not the last attribute), save the file and that’s it. If you have used a reference manager other than Docear (e.g. Zotero or Mendeley), and this reference manager exported an incorrect BibTeX file, please contact the developers and ask them to fix this bug (it’s definitely a bug if some entries are created without enclosing brackets).

3. Let us fix the problem

If you have tried all the previous steps but failed, we might fix the file for you.

  • If you created your BibTeX file with Docear (and do not use Zotero, Mendeley, BibDesk, etc.) please send your BibTeX file to help@docear.org and let us know that you have read this FAQ
  • If you created your BibTeX file with a reference manager other than Docear, please donate 5$, and then send us your BibTeX file to help@docear.org letting us know that you donated. If you have previously donated, just let us know the date, you don’t need to make a new donation to receive support.

Posted in: Docear4Word

Comments are closed.