title: Auto-Numbering of Figure and Table Captions for HTML Output in R Markdown
body: <p>Is there a way to automatically number the figures in captions when I knit R Markdown document into an HTML format?</p>
  
  <p>What I would like is for my output to be the following:</p>
  
  <blockquote>
    <p>Figure 1: Here is my caption for this amazing graph.</p>
  </blockquote>
  
  <p>However, I am currently getting the following:</p>
  
  <blockquote>
    <p>Here is my caption for this amazing graph.</p>
  </blockquote>
  
  <p>Here is my MWE:</p>
  
  <pre><code>---
  title: "My title"
  author: "Me"
  output: 
    html_document:
    number_sections: TRUE
    fig_caption: TRUE
  ---
  
  ```{r setup}
  knitr::opts_chunk$set(echo=FALSE)
  ```
  
  ```{r plot1,fig.cap="Here is my caption for this amazing graph."}
  x &lt;- 1:10
  y &lt;- rnorm(10)
  plot(x,y)
  ```
  
  ```{r table1, fig.cap="Here is my caption for an amazing table."}
  head(mtcars, 2)
  ```
  </code></pre>
  
  <p>I have read that this issue is resolved with Bookdown but I've read the Definitive Guide to Bookdown, cover to cover, and can't find it. </p>