bbt_detect_citations: Detect pandoc-style citations

View source: R/detect-citations.R

bbt_detect_citationsR Documentation

Detect pandoc-style citations

Description

By default, this omits any references within code chunks, inline R code, or URLs. To force the inclusion of a reference in the output, include it in an HTML comment or the nocite front matter field.

Usage

bbt_detect_citations(
  path = bbt_guess_citation_context(),
  locale = readr::default_locale()
)

bbt_guess_citation_context()

Arguments

path

A character vector, file or URL whose contents may contain citation keys. Multiple files can be passed in as a vector (e.g., from list.files()).

locale

See readr::default_locale(). Use if encoding might be a problem.

Value

A character vector of unique citation keys.

Examples

bbt_detect_citations("\n@citation1 and [@citation2] but not \\@citation3")


paleolimbot/rbbt documentation built on Nov. 16, 2024, 5:25 p.m.