Search code examples
r-markdownpandoc

Missing tittle and author


I have a Rmd (see bellow) file and when I execute the file without toc and pandoc I am able to get the title and author, but with them I am not able to see them. How can I get my title and author name to appear with numbered sections and toc?

---
title: "Design"
author: "Jen"
output:
  html_document:
    toc: true
    pandoc_args: [
      "--number-sections"
    ]
  
---

# plots

Solution

  • You should give rmarkdown full control over the pandoc arguments:

    ---
    title: "Design"
    author: "Jen"
    output:
      html_document:
        toc: true
        number_sections: true
    ---
    
    # plots
    

    Source: https://bookdown.org/yihui/rmarkdown/html-document.html#section-numbering