## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set(collapse = FALSE, comment = "") # Console colour carries no meaning on a rendered page. pkgdown turns it on for # its own build, and the escape sequences then reach the reader as literal text, # so colour is switched off here for a plain vignette render and a site build # alike. The fixed width keeps tibbles inside the documentation column. options(cli.num_colors = 1, cli.hyperlink = FALSE, crayon.enabled = FALSE, width = 80) ## ----bibtex, echo = FALSE, results = "asis"----------------------------------- # Build the BibTeX entry from the installed version so it never drifts, then # render it with a copy button and a download link. The button uses the browser # clipboard API and the link is a self-contained data URI, so neither depends on # a static file being shipped alongside the site. ver <- as.character(utils::packageVersion("scopusflow")) bib <- paste( "@Manual{scopusflow,", " title = {{scopusflow}: A reproducible workflow layer for '{Scopus}' bibliographic searches},", " author = {Pablo Bernabeu},", " year = {2026},", sprintf(" note = {R package version %s},", ver), " doi = {10.5281/zenodo.21252669},", " url = {https://doi.org/10.5281/zenodo.21252669},", "}", sep = "\n" ) esc <- function(x) { x <- gsub("&", "&", x, fixed = TRUE) x <- gsub("<", "<", x, fixed = TRUE) gsub(">", ">", x, fixed = TRUE) } uri <- paste0( "data:application/x-bibtex;charset=utf-8,", utils::URLencode(bib, reserved = TRUE) ) cat(sprintf( '
', esc(bib), uri))