title: How to add list of figures and list of tables to the table of content with R markdown and bookdown
body: <p>I have a report (pdf output) where I want to add bibliography, list of figures and list of tables to the appendix. And I want those three elements to appear in the table of content.</p>
  
  <p>I add the <em>bibliography</em> by adding <code>bibliography: bibliography.bib</code> to my yaml header. The list of figures and the list of tables I add with LaTex directly.</p>
  
  <p>My appendix therefore looks like:</p>
  
  <pre><code># Literature {-}
  
  \listoffigures
  
  \listoftables
  </code></pre>
  
  <p>This <em>nearly</em> works: bibliography, list of figures and list of tables are rendered correctly.</p>
  
  <p><strong>The only problem is, the table of content does only show an entry <em>Literature</em>. The list of figures and list of tables does not appear.</strong></p>
  
  <p><strong>How can I fix this?</strong></p>
  
  <hr>
  
  <p><em>I tried with <code>lof: yes</code> and <code>lot: yes</code> in various places of the yaml header (idea from <a href="https://bookdown.org/yihui/bookdown/publishers.html" rel="nofollow noreferrer">here</a> as well as with <code>toc_appendix: yes</code> (from the same source)</em></p>
  
  <p>What am I missing?</p>
  
  <hr>
  
  <p>My complete header looks like:</p>
  
  <pre><code>---
  title: something
  header-includes: \usepackage{graphicx} \usepackage{float} \usepackage{xcolor} \usepackage{framed} \usepackage{longtable} \definecolor{shadecolor}{RGB}{240,240,240} \pagenumbering{roman} \usepackage{caption} \captionsetup{font=footnotesize}
  output:
    bookdown::pdf_book:
      fig_caption: yes
      highlight: kate
      number_sections: yes
      toc: yes
  date: | 
      |  
      | `r format(Sys.time(), '%B %d, %Y')`
  documentclass: report
  geometry: margin=1in
  fontfamily: mathpazo
  fontsize: 11pt
  bibliography: bibliography.bib
  preamble: |
    % Any extra latex you need in the preamble
  ---
  </code></pre>