Cat pandoc command to include a figure
quartorsv_cat_pandoc_fig(
path,
caption = NULL,
label = NULL,
args = NULL,
force_cross_ref = TRUE,
force_exists = TRUE
)
character. Path to the figure.
character. Caption of the figure.
character. Label of the figure.
Need not supply #fig-
prefix (but it
will not be repeated if you do).
character. Additional arguments to be passed to pandoc.
logical.
If TRUE
, then will throw an error if either caption
or label
are NULL
as these are both required for
cross-referenceable figures in quarto
.
Default is TRUE
.
logical.
Will throw an error if the file at path
does not exist.
Default is TRUE
.
quartorsv_cat_pandoc_fig(
path = "path/to/fig.png",
caption = "Incredible hist() plot",
label = "hist-plot",
args = "width=50%",
force_exists = FALSE
)
#> ![Incredible hist() plot](path/to/fig.png){#fig-hist-plot width=50%}