4.10 Numbered figure captions
Section 4.7 demonstrates how this works for other elements such as tables and equations, and how to cross-reference the numbered elements within the text. Besides
html_document2, there are several other similar functions for other output formats, such as
You can add this feature to R Markdown output formats outside bookdown, too. The key is to use those formats as the “base formats” of bookdown output formats. For example, to number and cross-reference figures in the
rticles::jss_article format, you can use:
Please read the help pages of the bookdown output format functions to see if they have the
base_format argument (e.g.,
Xie, Yihui. 2020c. Bookdown: Authoring Books and Technical Documents with R Markdown. https://github.com/rstudio/bookdown.