bbt_update_bib: Update bibliography file

View source: R/update.R

bbt_update_bibR Documentation

Update bibliography file

Description

This function takes an RMarkdown file location and a bibliography file as inputs and updates the bibliography file.

Usage

bbt_update_bib(
  path_rmd,
  path_bib = bbt_guess_bib_file(path_rmd),
  ignore = character(0),
  translator = bbt_guess_translator(path_bib),
  library_id = getOption("rbbt.default.library_id", 1),
  overwrite = TRUE,
  filter = identity,
  quiet = FALSE
)

bbt_guess_bib_file(path_rmd, encoding = "UTF-8")

Arguments

path_rmd

The path to the RMarkdown file.

path_bib

The path to the bibliography file.

ignore

A character vector of keys to disregard (useful if bbt_detect_citations() gives spurious output).

translator

Type of bibliography file to create. Options are json (CSL-JSON), biblatex (BibLaTeX), bibtex (BibTeX), and yaml (CSL YAML). CSL-JSON is recommended if users are not specifically using a LaTeX citation processor.

library_id

You may have to pass a specific library ID if your options are not set to use globally unique keys. Set the rbbt.default.library_id to ensure this value is used by the addin. You can use bbt_library_id() to look up this value by name.

overwrite

Use TRUE to overwrite an existing file at path

filter

Pass a function that can be used to modify the output of bbt_bib() before it is written to path.

quiet

Use TRUE to suppress message on successful write.

encoding

Passed to rmarkdown::yaml_front_matter()

Value

path_bib, invisibly


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