I'm using Mendeley to manage references for a paper I'm writing in Overleaf. If I export a bibtex file from Mendeley, the citation keys match what I see in the program [AuthorYear]. However, if I sync my references directly from Mendeley using Overleaf, the citation keys of most are changed to [AuthorYearFirstLast] where First and Last are the first and last words of the title. Is this a bug with Overleaf? Is there a workaround either to change the default citation key for Mendeley or change how Overleaf imports citations?
I found a workaround for this from the desktop version of Mendeley:
- (I think this is optional, but useful) Go to Tools > Options > Document Details tab. For each relevant "Document type", or all, enable the Citation Key field and Apply.
- Select all your documents and press Ctrl-K (copy as latex citation command). Now all your documents have a fixed citation key with the AuthorYear format.
- Sync your changes
And that's it. If you now reimport the references from Overleaf all citation keys should be in the correct format.
(Disclosure: I'm on support staff at Overleaf.)
.bib files via an export API provided by Mendeley, and unfortunately this does not send all the same data as when you download the
.bib file directly using Mendeley's own web exporter or desktop application.
This can't be changed from the Overleaf side; we don't have any way to customize the data we request from Mendeley. In the meantime, it is probably simplest to sync with the downloaded version (where you have more control over the cite keys) via Dropbox.
A convenient way that automatically adds new references (in addition to generating keys for your existing library) is given by @birch's suggestion which had the described behavior for. This is my preferred method.
The citation key is only generated if you have Bibtex syncing enabled.
To enable it, go to Tools->Options and the BibTex menu. Tick the checkbox next to "Enable BibTex syncing" and the radio button for "Create one BibTex file for my whole library." Choose a location for the BibTex file, then hit "Ok" or "Apply" and Mendeley will generate Citation Keys for all entries and continue to do so for new entries added to your database.