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] Please use either cff_read_bib() or cff_read_bib_text() instead.

Usage

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

Arguments

x

The source that would be used for generating the cff object. Must be character object indicating either:

  • The path to a BibTeX file.

  • A vector of characters with the full BibTeX string. See Examples.

encoding

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

...

Other arguments passed to bibtex::read.bib().

Value

See cff_read_bib() from reading ⁠*.bib⁠ files and cff_read_bib_text() for reading a character object representing a BibTeX entry.

See Also

Other 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 April 3, 2025, 9:33 p.m.