A fast way to produce a reference list in an r-markdown document from a
lib_df
object.
This function may or may not produce intermediate files (bib and Rmd) and the
result can be assigned to an object for further edition
(see yamlme::update()
).
A html file will be written by write_rmd()
and render_rmd()
in the
working directory and displayed by browseURL()
.
Usage
reflist(x, ...)
# S3 method for character
reflist(
x,
output_file,
delete_source = TRUE,
title = "Automatic Reference List",
output = "html_document",
nocite = "'@*'",
urlcolor = "blue",
encoding = "UTF-8",
...
)
# S3 method for lib_df
reflist(x, filename, delete_source = TRUE, ...)
Arguments
- x
A
lib_df
object to produce the reference list. In the character method, a character value indicating the path of a bibtex file (passed toread_bib()
).- ...
Further arguments passed to the yaml header in the intermediate Rmarkdown document.
- output_file
A character value with the name for the written Rmarkdown file.
- delete_source
A logical value indicating whether written bib file should be deleted after rendering html or not.
- title, output, nocite, urlcolor
Arguments used for the yaml-header in r-markdown and passed to
write_rmd()
. They can be cancelled using the value NULL (not recommended for nocite).- encoding
A character value indicating the encoding string. It is passed to
write_bib()
.- filename
A character value with the name for the written Rmd file, without file extension.
Value
An invisible object of class rmd_doc
. A Rmd file will be written by
write_rmd()
as well.