extract_label_from_figure_filename: Extract chunk label for the knitr chunk containing...

View source: R/utils-extract-label-from-figure-filename.R

extract_label_from_figure_filenameR Documentation

Extract chunk label for the knitr chunk containing includegraphics and a filename

Description

Extract chunk label for the knitr chunk containing includegraphics and a filename

Usage

extract_label_from_figure_filename(fn)

Arguments

fn

The figure file name to match (no extension)

Details

  1. Starts by parsing the ⁠_bookdown.yml⁠ file to extract the names of all uncommented rmd files in the current build.

  2. Searches all those files for any lines starting with (ref:variable). Preceding spaces are ignored

  3. Extracts the chunkname given the filename loaded within the chunk that chunkname belongs to

Value

The chunk label found for the chunk which includes the figure file fn


pacific-hake/hake-assessment documentation built on Nov. 8, 2024, 1:16 p.m.