bibliography: Generate the bibliography

Description Usage Arguments Details Value Examples

View source: R/bibliography.R

Description

Generate the bibliography

Usage

1
bibliography(style = NULL, ...)

Arguments

style

the name of the journal style, e.g. "mla", "nature", "methods-in-ecology-and-evolution", etc. See details.

...

additional arguments passed to PrintBibliography,

Details

Not that style will use the ordering rule set in BibOptions, but not the other formatting options (which will come from the CSL sheet instead). NOTE that csl formatting works only if reference has a DOI.

For non-trivial bibliographies, knitcitations recommends authors use pandoc format, see cite_options(cite_format="pandoc"), and allow pandoc to generate the references list rather than rely on the bibliography() function. Pandoc has rich CSL support using any provided CSL file (see Pandoc documentation for details) and is integrated into recent version of RStudio.

Value

a list of works cited

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
citet(citation("httr"))
citet(citation("digest"))
bibliography()
bibliography(sorting = 'ynt') # sort by year, then name, title
bibliography(sorting = 'ydnt') # sort by year, descending, then name, title
cleanbib()


# these examples require an internet connection 
citet("Vos NeXML 2012")
citet("Boettiger Ross Hastings 2013")
bibliography(style="nature")
bibliography(style="nature", sorting = 'ynt') # obeys sorting rule 

knitcitations documentation built on July 4, 2017, 9:31 a.m.