Skip to contents

split BibTex references

Usage

split_bibtex_references(bib_path)

Arguments

bib_path

path to the bibtex file to be read

Value

list of references separated as types and names based on indices

Examples

dir.create(your_article_folder <- file.path(tempdir(), "exampledir"))
example_files <-  system.file("article", package = "rebib")
x <- file.copy(from = example_files,to=your_article_folder,recursive = TRUE)
your_article_path <- paste(your_article_folder,"article",sep="/")
bib_path <- paste0(your_article_path,"/example.bib")
rebib::handle_bibliography(your_article_path)
#> No Bib files found !
#> BibTeX file does not exist
#> will parse for bibliography
#> bibtex file created
references <- rebib::split_bibtex_references(bib_path)
references
#> $types
#> [1] "book" "book" "book"
#> 
#> $names
#> [1] "{ihaka:1996}"    "{R}"             "{Tremblay:2012}"
#> 
unlink(your_article_folder,recursive = TRUE)