Skip to contents

Given that rmd and qmd chunks are normally run sequentially, figures should be generated in order that they are presented in the document. Therefore, we should be able to roughly match them up with numbering generated by cross-referencing using the modified times.

Usage

ft_add_figure_numbers(
  figure_directory = ".",
  start_count = 1,
  count_location = "prefix",
  skip_numbers = NULL,
  regexp = "jpg$|png$|svg$"
)

Arguments

figure_directory

the directory containing figure files

start_count

what number starts the counting

count_location

should the count be a prefix or suffix?

skip_numbers

should any numbers be skipped due to inserting from a different location?

regexp

what regex should be used to grab files