Rmarkdown/Bookdown: Separate figure numbering for Supplemental Section



Certain kinds of documents, such as journal articles, often have a Supplemental Section, where the numbering of figures is different from the main body.

For example, in the main body, you might have Fig 1-5. But then, for the Supplemental section, the numbering restarts as Fig S1, S2, S3, etc.

Bookdown allows cross-referencing (\@ref(fig:label) but I'm not sure how to restart the numbering in a separate section. Is there a good way to do this?

Cross-posted at SO: https://stackoverflow.com/questions/50223141/rmarkdown-bookdown-separate-figure-numbering-for-supplemental-section