Writing a bib file

1) Find your references

Navigate to https://zbib.org/ and enter in the URL (or ISBN, DOI, or title) for each of your references one at a time. Hit the "Cite" button after you find each of your references. Once you are finished, scroll to the bottom of the screen to the section titled "Export". Select the option to "Download BibTex" as show below:

 

 

 

 

 

 

 

 

2) Save your bib file

Save the file with the name "my_references" (you don't need to add the .bib extension) and make sure you save this file to the same location as your R Markdown file (this is what the red box in the image below shows).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3) Open your bib file

Open the file "my_references.bib" with a text editor by right-clicking on the file and selecting the text editing program you'd like to use. (I use a Mac and recommend Sublime as a text editor.)

 

4) Find your citation keys

Once you open the bib file, you will find the citation key for each item in your bibliography in the very first line of each item entry. In this example, I have two references. The first is an article with citation key "ponuwei_bleb_2016" and the second is a work in collection with citation key "andrich_contributors_1996". Feel free to customize your citation keys but do not start these keys with a number or symbol or include any periods in them.

5) Reference your citations

You can reference each of these items in your R Markdown report by writing [@citation_key] or @citation_key.