Is it possible to access YAML metadata of the current R Markdown document inside an output format function? I tried to use rmarkdown::metadata for this purpose but the returned list is empty at the time the format function is run.
The motivation for this is, for example, to adjust "width" in opts_knit according to fontsize specified in the YAML header.