View source: R/cff-read-bib-text.R
| cff_read_bib_text | R Documentation |
cff_ref_lst objectConvert one or more complete BibTeX entries supplied as a character vector
into a cff_ref_lst object.
cff_read_bib_text(x, encoding = "UTF-8", ...)
x |
A |
encoding |
Encoding to be assumed for |
... |
Arguments passed to |
This function writes x to a temporary *.bib file and reads it using
cff_read_bib().
This function requires bibtex (>= 0.5.0) and uses
bibtex::read.bib() for parsing.
An object of classes cff_ref_lst, cff as defined by the
definitions.reference specified in the following guide:
Citation File Format schema guide.
Each element of the cff_ref_lst object has classes
cff_ref, cff.
cff_read_bib() for reading *.bib files.
Work with BibTeX metadata:
as_bibentry(),
cff_read(),
cff_write_bib(),
encoded_utf_to_latex()
Read external citation metadata:
cff_read()
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.