Citation from DOI
This is a bit of a Quarto tip and a bit of an RStudio Visual Editor tip that will also work with R Markdown documents.
To add a citation, let’s say from a DOI,
- Go to Insert > Citation
- Choose DOI from the left menu
- Paste the DOI of the journal article or book you want to cite in the search box and click search
- Once the work you want to cite is located, click on Insert
That’s it, you’re done! This will automatically create a bib file in your working directory, or if you already have one, add to it. It will also add a bibliography
field to the YAML of your document, which will automatically insert your references at the end.
A few more tips about citations and references:
- If you want your references to be in a new section, add that section header to the end of your document and your references will be placed after it.
- This method works with Quarto documents regardless of the
format
, so you can insert citations the same way into a journal article and a presentation. With presentations you’ll probably want your references on the last slide. Adding a H2 level heading like “References” will place them on a new slide. - To insert an in-text citation, check the box “Use in-text citation”.
- The same menu can be used to insert citations from a variety of sources, including your Zotero library.