deprecated_cff_from_bib: Previous API: create a 'cff' object from BibTeX entries

cff_from_bibtexR Documentation

Previous API: create a cff object from BibTeX entries

Description

[Deprecated] Use either cff_read_bib() or cff_read_bib_text().

Usage

cff_from_bibtex(x, encoding = "UTF-8", ...)

Arguments

x

The source used to generate the cff object. It must be a character object indicating either:

  • The path to a BibTeX file.

  • A vector of characters with a complete BibTeX string. See Examples.

encoding

Encoding to be assumed for x. See base::readLines().

...

Arguments passed to cff_read_bib().

Value

A cff_ref_lst object. See cff_read_bib() for reading ⁠*.bib⁠ files and cff_read_bib_text() for reading BibTeX entries supplied as a character vector.

See Also

Deprecated functions: cff_extract_to_bibtex(), cff_parse_citation(), cff_parse_person(), write_bib()

Examples

if (requireNamespace("bibtex", quietly = TRUE)) {
  x <- c(
    "@book{einstein1921,
    title        = {Relativity: The Special and the General Theory},
    author       = {Einstein, Albert},
    year         = 1920,
    publisher    = {Henry Holt and Company},
    address      = {London, United Kingdom},
    isbn         = 9781587340925
}",
    "@misc{misc-full,
    title        = {Handing out random pamphlets in airports},
    author       = {Joe-Bob Missilany},
    year         = 1984,
    month        = oct,
    note         = {This is a full MISC entry},
    howpublished = {Handed out at O'Hare}
}"
  )

  cff_read_bib_text(x)

  # From a file.

  x2 <- system.file("examples/example.bib", package = "cffr")
  cff_read_bib(x2)
}

cffr documentation built on Aug. 24, 2026, 5:11 p.m.