R/collect-citations.R

Defines functions collect_citations

collect_citations <- function(x, .from = 'markdown') {
  tf <- tempfile()
  xfun::write_utf8(x, tf)
  rmarkdown::pandoc_convert(
    input = tf,
    to = "markdown",
    from = .from,
    output = tf,
    citeproc = FALSE,
    options = lua("cite.lua"),
    wd = getwd()
  )
  paste(readLines(tf), collapse = "")
}

Try the ftExtra package in your browser

Any scripts or data that you put into this service are public.

ftExtra documentation built on Sept. 29, 2023, 9:06 a.m.