Functions for parsing .bib files
fread_bib(
file.bib,
check.dup.keys = TRUE,
strip.braces = TRUE,
check.unescaped.percent = TRUE,
.bib_expected = TRUE,
halt = TRUE,
rstudio = FALSE,
.report_error
)bib2DT(file.bib, to_sort = FALSE)
reorder_bib(file.bib, outfile.bib = file.bib)
.bib
file.
If TRUE
, the default, return error if any bib keys are duplicates.
If TRUE
, the default, braces in fields are removed.
If TRUE
, the default, fields with unescaped
percent signs are an error. (Unescaped percent signs in URLs are permitted.) Set
to FALSE
to skip this check.
(logical, default: TRUE
) Should file.bib
be expected to
have file extension .bib
? If expectation violated, a warning is emitted.
Whether to halt on error. If NULL
, the default, the value
getOption("TeXCheckR.halt_on_error")
is used. Otherwise, TRUE
or
FALSE
to halt
regardless of the value of the option.
(logical, default: FALSE
) If TRUE
, pop the RStudio session
to the location in file.bib
of the first error.
A function like report2console
to handle errors.
Include only author, title, year, and date.
File to write the reordered bib to. Defaults to file.bib
.
bib2DT
returns a data.table
of the entries in file.bib
. The function
reorder_bib
rewrites file.bib
, to put it in surname, year, title, line number order.