clean_bib: Clean up a latex bibliography file

Description Usage Arguments Value Examples

Description

In particular one exported from Mendeley

Usage

1
2
3
4
5
6
7
clean_bib(
  raw_bib_file,
  max_line_length = 1000,
  strip_fields = c("abstract", "file", "keywords", "url", "doi", "issn", "isbn",
    "month", "number"),
  strip_mendeley_header = TRUE
)

Arguments

raw_bib_file

Path to raw .bib file; this function is designed in particular to clean .bib files produced by Mendeley.

max_line_length

Integer. Lines greater than this length will be removed from the bibliography.

strip_fields

Fields to remove from the bibliography. Note that "number" is issue number.

strip_mendeley_header

Logical; should the header added by Mendeley be removed?

Value

Character vector.

Examples

1
2
3
4
5
6
7
## Not run: 
# Clean bibliography.
clean_bib <- clean_bib("mendeley_refs.bib")
# Write out cleaned bibliography.
write_lines(clean_bib, "references.bib")

## End(Not run)

joelnitta/jntools documentation built on Jan. 17, 2022, 3:05 p.m.