toBiblatex: Convert BibEntry objects to BibTeX or BibLaTeX

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/toBiblatex.R

Description

toBiblatex converts a BibEntry object to character vectors with BibLaTeX markup. toBibtex will convert a BibEntry object to character vectors with BibTeX markup, converting some BibLaTeX fields and all entry types that are not supported by BibTeX to ones that are supported.

Usage

1
2
3
4
5
toBiblatex(object, ...)

## S3 method for class 'BibEntry'
toBibtex(object, note.replace.field = c("urldate",
  "pubsate", "addendum"), extra.fields = NULL, ...)

Arguments

object

an object of class BibEntry to be converted

...

ignored

note.replace.field

a character vector of BibLaTeX fields. When converting an entry to BibTeX, the first field in the entry that matches one specified in this vector will be added to the note field, if the note field is not already present

extra.fields

character vector; fields that are not supported in standard BibTeX styles are by default dropped in the result return by the toBibtex function. Any fields specified in extra.fields will not be dropped if present in an entry.

Details

toBiblatex converts the BibEntry object to a vector containing the corresponding BibLaTeX file, it ensures the name list fields (e.g. author and editor) are formatted properly to be read by bibtex and biber and otherwise prints all fields as is, thus it is similar to toBibtex.

toBibtex will attempt to convert BibLaTeX entries to a format that can be read by bibtex. Any fields not supported by bibtex are dropped unless they are specified in extra.fields. The fields below, if they are present, are converted as described and added to a bibtex supported field, unless that field is already present.

If no note field is present, the note.replace.field can be used to specified BibLaTeX fields that can be looked for and added to the note field if they are present.

BibLaTeX entry types that are not supported by bibtex are converted by toBibtex as follows "mvbook" = "Book", "bookinbook" = "InBook", "suppbook" = "InBook",

Value

an object of class “Bibtex” - character vectors where each element holds one line of a BibTeX or BibLaTeX file

Author(s)

McLean, M. W. [email protected]

See Also

toBibtex, BibEntry, print.BibEntry

Examples

1
2
3
4
file.name <- system.file("Bib", "biblatexExamples.bib", package="RefManageR")
bib <- suppressMessages(ReadBib(file.name))
toBiblatex(bib[70:72])
toBibtex(bib[70:72])

RefManageR documentation built on April 26, 2018, 1:05 a.m.