Skip to contents

Writes Markdown to include the images created by compare_figures in the certificate, one per figure with a caption. Use it in a chunk with results = "asis".

Usage

render_figure_comparisons(
  files,
  captions = basename(files),
  width = "85%",
  base_dir = quarto_document_dir()
)

Arguments

files

Paths to the comparison images, relative to the certificate source file.

captions

Captions of the figures; default is the file name.

width

Width of the figures in the certificate.

base_dir

Directory to link the images relative to, or NULL to link them by files. Defaults to the document's directory when Quarto renders it, and NULL otherwise.

Value

NULL (outputs directly via cat() for knitr/rmarkdown)

Examples

if (FALSE) { # \dontrun{
render_figure_comparisons(comparisons$file,
  captions = paste("Figure", 1:2, "of the article: published (top) and reproduced (bottom)."))
} # }