bbt_bib_selected: Fetch bibliographical information from Zotero

View source: R/bbt.R

bbt_bib_selectedR Documentation

Fetch bibliographical information from Zotero

Description

Fetch bibliographical information from your Zotero library. bbt_bib() fetches information for a vector of citation keys; bb_bib_selected() fetches information for the currently selected items in the Zotero pane.

Usage

bbt_bib_selected(
  translator = getOption("rbbt.default.translator", "biblatex"),
  .action = bbt_print
)

bbt_bib(
  keys,
  translator = getOption("rbbt.default.translator", "biblatex"),
  library_id = getOption("rbbt.default.library_id", 1),
  .action = bbt_print
)

Arguments

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.

.action

Use bbt_return() to return the value without printing.

keys

A character vector of citation keys.

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.

Value

The result of .action.

Note

Most users should use CSL-JSON format (.json) for their bibliographies.

RMarkdown's citation formatting uses CSL styles. These styles require CSL-JSON data. RMarkdown converts other data formats (e.g., BibLaTeX) to CSL-JSON. This is not lossless, and references other than journal articles may be inaccurate. This is the case even if outputting to PDF or TeX format.

Only use BibLaTeX or BibTeX if you are using pandoc arguments to specify an alternative citation engine for raw TeX output.

The default translator can be changed. For example: options(rbbt.default.translator = "json")


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