title: How to create doubly-nested tabs in R Markdown?
body: <p>I would like to create an R Markdown HTML document with doubly-nested tabs.</p>
  
  <p>I have tried to extend the method given as an answer for the question <a href="https://stackoverflow.com/questions/49276336/rmarkdown-cant-seem-to-produce-tabs-in-tabs">RMarkdown can&#39;t seem to produce Tabs in Tabs</a> with the following code:</p>
  
  <pre><code>---
  output:
    html_document:
      theme: paper
      highlight: tango
      number_sections: false
      toc: false
      toc_float: false
  ---
  # Result Discussion {.tabset}
  We will discuss results here
  
  ## Quarterly Results {.tabset}
  This content pertains to Quarterly Results
  
  
  &lt;div id="quarterly-product" class="section level3"&gt;
  ### By Product
  
  Quarterly perfomance by Products
  
  &lt;div id="quarterly-product-a" class="section level4"&gt;
  #### Case A
  
  Quarterly perfomance by Products in Case A
  &lt;/div&gt;
  
  &lt;div id="quarterly-product-b" class="section level4"&gt;
  #### Case B
  
  Quarterly perfomance by Products in Case B
  &lt;/div&gt;
  
  End of section quarterly perfomance by Products
  &lt;/div&gt;
  
  
  &lt;div id="quarterly-region" class="section level3"&gt;
  ### By Region
  
  Quarterly perfomance by Region
  
  &lt;div id="quarterly-region-a" class="section level4"&gt;
  #### Case A
  
  Quarterly perfomance by Region in Case A
  &lt;/div&gt;
  
  &lt;div id="quarterly-region-b" class="section level4"&gt;
  #### Case B
  
  Quarterly perfomance by Region in Case B
  &lt;/div&gt;
  
  End of section quarterly perfomance by Region
  &lt;/div&gt;
  
  Final Words about Quarterly Results
  
  
  ## Yearly Results {.tabset}
  This content pertains to Yearly Results
  
  &lt;div id="yearly-product" class="section level3"&gt;
  ### By Product
  
  Yearly perfomance by Products
  &lt;/div&gt;
  
  &lt;div id="yearly-region" class="section level3"&gt;
  ### By Region
  
  Yearly perfomance by Region
  &lt;/div&gt;
  
  Final Words about Yearly Results
  </code></pre>
  
  <p>Here, I added subsections Case A and Case B in the sections Quarterly results by Product and Quarterly results by Region. However, adding level4 sections using the &lt; div> tags doesn't seem to work. Is it possible to have a third layer of tabs in this way?</p>