title: Generating a table of contents (toc) when using knitr's spin()
body: <p>I use knitr's spin() function to generate html reports.</p>
  
  <p>Is there a way to make spin() generate a table of contents (toc) for headings embedded in the comments somehow?</p>
  
  <p>(Note: I cannot use pandoc for that and have to use the markdown &amp; html generator provided by knitr.)</p>