More Features: Citing

Citing sources

You can generally follow the Bookdown instructions about citations, but you don’t need to add the additional bibliography argument at the top of the Rmd.

To add a new reference source, add to the book.bib file, keeping your new entry in alphabetical order.

For articles (or anything with a DOI), go to doi2bib.org or ZoteroBib to get a BibTex-formatted reference that you can copy and paste the reference to the book.bib file.

You can also use programs like Zotero or Endnote to export a .bib file and either combine with the book.bib or manage your references from there.

Other sources can be added using this template:

@website{citekey,
    author = {First Last},
    title = {Title},
    url  = {www.website.com},
}

To reference the citations in your writing follow the bookdown instructions:

Items can be cited directly within the documentation using the syntax @key where key is the citation key in the first line of the entry, e.g., @R-base. To put citations in parentheses, use [@key]. To cite multiple entries, separate the keys by semicolons, e.g., [@key-1; @key-2; @key-3]. To suppress the mention of the author, add a minus sign before @, e.g., [-@R-base].

See Chapter 2 of this template course for examples.

This will automatically list references at the bottom of each chapter included in your course, as well as at the end of your course. Thus it is important to keep the References.Rmd file and to keep this as the last part of the _bookdown.yml file as it is in the template, so that this full list of references will be listed in a place that makes sense.

Alternatively, you can add a header for this list of references as the last header in any other Rmd file that is listed as the final file of the _bookdown.yml file.

If you would like to suppress having references listed at the end of each chapter, you can add a line that says split_bib: false to your _output.yml file.