yml_citations {ymlthis}R Documentation

Set citation-related YAML options

Description

yml_citations() sets citation-related YAML fields, such as specifying a bibliography file or style. For controlling the citation engine in PDF documents, see the citation_package argument in rmarkdown::pdf_document().

Usage

yml_citations(
  .yml,
  bibliography = yml_blank(),
  biblio_style = yml_blank(),
  biblio_title = yml_blank(),
  csl = yml_blank(),
  citation_abbreviations = yml_blank(),
  link_citations = yml_blank(),
  nocite = yml_blank(),
  suppress_bibliography = yml_blank()
)

Arguments

.yml

a yml object created by yml(), as_yml(), or returned by a ⁠yml_*()⁠ function

bibliography

a path to a bibliography file, such as a .bib file

biblio_style

bibliography style, when used with natbib and biblatex. Note that the actual YAML field is biblio-style

biblio_title

bibliography title, when used with natbib and biblatex. Note that the actual YAML field is biblio-title

csl

a path to a Citation Style Language (CSL) file. CSL files are used to specify the citation style; see the CSL repository for the CSL files of dozens of journals.

citation_abbreviations

Path to a CSL abbreviations JSON file. See the pandoc-citeproc documentation. Note that the actual YAML field is citation-abbreviations.

link_citations

Logical. Add citations hyperlinks to the corresponding bibliography entries? Note that the actual YAML field is link-citations.

nocite

Citation IDs ("@item1") to include in the bibliography even if they are not cited in the document. Including the wildcard pattern "@*" will include all citations in the bibliography regardless of if they're cited in the document.

suppress_bibliography

Logical. Suppress bibliography?

Value

a yml object

See Also

Other yml: asis_yaml_output(), bib2yml(), draw_yml_tree(), has_field(), read_json(), use_yml_defaults(), use_yml_file(), use_yml(), yml_author(), yml_blogdown_opts(), yml_bookdown_opts(), yml_clean(), yml_distill_opts(), yml_latex_opts(), yml_output(), yml_pagedown_opts(), yml_params(), yml_pkgdown(), yml_reference(), yml_replace(), yml_resource_files(), yml_rsconnect_email(), yml_rticles_opts(), yml_runtime(), yml_site_opts(), yml_toc(), yml_vignette()

Other citations: bib2yml(), yml_reference()

Examples


yml() %>%
  yml_citations(bibliography = "references.bib", csl = "aje.csl")


[Package ymlthis version 0.1.7 Index]