6

I know that it is required to first create a database of references stored in a .bib file. Mendeley exports my reference list in .bib format. But how can I know what to write in curly brackets in \cite{} to refer to a particular author? Do I need to keep the .bib file open and find the relevant name to cite? Or am I missing something? What is your recommendation for referencing in LaTeX?

  • I have answered a very similar question here: tex.stackexchange.com/a/173034/32374 If you turn on the "Citation Key" field, it will show in the main Mendeley interface. I look at this field when I try to find papers to cite. – darthbith May 24 '14 at 3:10
7

You have several options here. One is, as you suggest, to simply keep the .bib file open in the text editor and search for the cite key as you need it. Another is to use some software such as JabRef or BibDesk to manage the .bib file, which will be somewhat complicated since Mendeley overwrites the auto-generated .bib file every time a reference is updated.

Thus, I prefer to use the better searching capabilities of Mendeley, so I usually look up the citation key there. Unfortunately, Mendeley have decided that citation keys should not be visible by default, so you have to turn them on. Here I'll copy from my answer to a different question: Go to the menu->Tools->Options->Document Details, then choose the document type (for instance, Journal Article), then check the Citation Key box. Then, a field for Citation Key should be visible in the details pane on the right hand side of the window.

Options Box Document Pane

8

Another simple way is to select the file in Mendeley list, then right-click and select "copy as", then "LaTex citation command" (which corresponds to ctrl+K), and last paste the thing inside the brackets of \cite{}

  • This solved a different problem for me! Some of the citation keys were blank, but by selecting all files and doing the "copy as" that @user92514 described, it also fills in all the blank citation keys. – Tom Anderson Dec 20 '16 at 7:21
1

The other answers work but I've found it much easier to use the LaTeXing plugin for Sublime text editor. From within Sublime you can search the titles and authors of all the papers in your online Mendeley account whenever you use \cite{}.

http://docs.latexing.com/stable/tutorials/setup-mendeley-with-latexing.html

It automatically creates a .bib file containing just the papers you have added using Sublime. Unlimited (so far) free trials are available for both Sublime and LaTeXing.

  • Is there a spellcheck you can combine with this? The reason I use TeXMaker is that it has a spellcheck which is very useful. – fbence Feb 13 '18 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.