Fig.cap in R notebooks

rmarkdown

#1

Does anyone know if there are plans to change the default behavior of fig.cap in code chunk headers for R notebook? Currently the captions knit nicely with auto numbering and labeling only for pdf output. For html output the captions are there, but there is no auto numbering. For nb.html output, the captions are ignored altogether. If there is a way to use fig.cap that outputs consistently across output options, I would love to learn of it.


#2

For automatic numbering, I think the change would need to occur within the rmarkdown package. https://github.com/rstudio/rmarkdown/issues/1226 sounds related, but that might just be for captions altogether (and not numbering).

For caption support in R Notebooks, would you be willing to file a request at https://github.com/rstudio/rstudio/issues? We effectively have to re-implement support for each of the knitr chunk options individually in Notebook mode, so a few options (e.g. fig.cap) have not yet received support.