bib_parser: Functions for parsing .bib files

Description Usage Arguments Details

Description

Functions for parsing .bib files

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

Arguments

file.bib

.bib file.

check.dup.keys

If TRUE, the default, return error if any bib keys are duplicates.

strip.braces

If TRUE, the default, braces in fields are removed.

check.unescaped.percent

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.

.bib_expected

(logical, default: TRUE) Should file.bib be expected to have file extension .bib? If expectation violated, a warning is emitted.

halt

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.

rstudio

(logical, default: FALSE) If TRUE, pop the RStudio session to the location in file.bib of the first error.

.report_error

A function like report2console to handle errors.

to_sort

Include only author, title, year, and date.

outfile.bib

File to write the reordered bib to. Defaults to file.bib.

Details

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.


TeXCheckR documentation built on Nov. 17, 2020, 9:08 a.m.