Search code examples
latexrstudior-markdownbookdownmiktex

Remove table of contents from a R bookdown to pdf_book or pdf_document2


I compiling a short document using bookdown in Rstudio. I would simply like to drop the table of contents at the beginning of the document. I could "knit to pdf" instead of "knit to pdf_book" or "knit to pdf_document2", but then would loose a lot of the bookdown functions (cross references etc.).

Should be fairly easy, isn't it?


Solution

  • ---
    title: "MWE"
    output:
      bookdown::pdf_book:
        toc: false
    ---
    

    It also works with pdf_document2:

    ---
    title: "MWE"
    output:
      bookdown::pdf_document2:
        toc: false
    ---