Your friendly neighbor from Sublime Text, Latexing, allows you to connect to your Mendeley account and get citations directly from your Mendeley library. It's possible getting a similar flow using Latex Workshop and the Mendeley Desktop client using the sync feature, but direct API integration would be even better.
More info at: http://dev.mendeley.com/
Looks like there's a javascript SDK available: https://github.com/Mendeley/mendeley-javascript-sdk
This feature would be useful. However, I have some problems in terms of the security part.
Suppose the extension allowed users to input their Mendeley/Zotero credentials to download a cloud-synced .bib file. There are two options for subsequent updates of the file:
We have a problem here. The first option is obviously insecure, especially when the setting file is somehow github-ed. However the second one seems to be too repetitive for the users.
Any idea?
That's an aspect I didn't consider, but very important indeed.
I would go for a combination, with a "Remember me" option which would explain the implication of such an operation. Storing the keys in a dedicated file (latex-workshop-secrets.json) would limit the risk of accidental git adding, as this would need to be done explicitly.
Would it be possible to give the user an option to automatically add the to-be-created file to the .gitignore file?
Just as context, the Latexing plugin for Sublime saves the OAuth token in a global settings file.
This could maybe be done like this:
As far as I understand, this extension implemented a way to store an access token outside the user settings: https://github.com/dbankier/vscode-gist/issues/15
The other nice thing about having this feature directly from LaTeX Workshop is that the bib file can be created automatically by pulling from Mendeley/Zotero while writing.
Latexing allows one to define the format of the citation keys, making them greatly consistent. This way one can start writing and pulling from their big library without thinking in advance which files should go into the reference list. It almost never works out, and going back and forth to add more references takes a lot more time, much less convenient.
Latexing appears to be dead/abandoned, much to my dismay: the domain lapsed a few months ago, the github page hasn't been touched in a year, and i'm looking about for other tools now.
This feature would be dearly appreciated by many: reference management is the most onerous part of the work cycle for me (followed closely by manually formatting tables).
Just because I am curious, what is the advantage over using the bibtex files exported and synced from the Mendeley desktop application?
For me, it's one less manual step to have to care about.
versus
The LaTeXing plugin for Sublime Text generated a bibfile dynamically in your LaTeX project root and synched it for you. Only the references you actually cite in the work were present in it.
I have about 6,000 entries in my Mendeley catalogue -- a big bibfile of all of them per document/project feels awkward and unduly heavy, especially since i usually cite <20 things.
Ok, my workflow is a bit different
I use biblatex, so I can manually set the path to the bibtex file like
\addbibresource{/home/jarno/Documents/Mendeley/BibTex/Masterthesis.bib}
In Mendeley I set options to Enable BibTeX syncing and Create one BibTeX file per group. This way single bibtex files are created for each folder and subfolder, so running bibtex is still fast.
With this workflow I basically have the one time setup you described first.
Interesting, i didn't know mendeley had that option now. (I'm staying on 1.18.x because going higher breaks zotero 馃槨 )
I should add that your workflow does limit you to one machine, or machines that are similarly provisioned so that your paths are the same. I'd prefer to pin the bibfile within the document repo, and update it externally with no particular path requirements that aren't captured by git.
An update of sorts: LaTeX Utils now provides Zotero integration.
Ok, my workflow is a bit different
I use biblatex, so I can manually set the path to the bibtex file like
\addbibresource{/home/jarno/Documents/Mendeley/BibTex/Masterthesis.bib}In Mendeley I set options to
Enable BibTeX syncingandCreate one BibTeX file per group. This way single bibtex files are created for each folder and subfolder, so running bibtex is still fast.
With this workflow I basically have the one time setup you described first.
... unless you're on multiple machines with different directory structures / platforms.
You could still tell mendeley to export your .bib file into your project on each machine or symlink it into the project.
I would like to point out that Mendeley started to encrypt your local database in 2018 just so you are locked in and can not easily move to a different bibliography management. It's also made by Elsevier, a major opponent of Open Access which would provide free access to many scientific publications.
Especially the former really got up my nose.
Zotero, which was mentioned previously, is a great (in my eyes even superior) alternative. It handles websites better and has a far superior automatic .bib export. It also keeps copies of websites and PDFs and whatever you throw into it just like Mendeley does. Also the Mac App is great.
If I recall correctly I migrated my Mendeley database by installing an older client, deleting my local encrypted db and having it synced back from the cloud. Then Zotero can easily import it.
Considering for how long this issue has been open and that the companion extension LaTeX Utilities provides Zotero integration, I think we can close this issue.