Metamatics Metamatics - 2 months ago 13
R Question

RMarkdown: How to change headline in table of contents in R Markdown?

When I'm using the

toc: yes
command, the document contains "Content" as the headline of the table of contents. Due to the fact that I want to write this document in german, I also want to change the headline of the table of contents to the equivalent german word. Any suggestions on how to change this?

Answer

With this YAML header that includes LaTeX-Package babel, it works for me:

---
title: "TOC in German"
header-includes:
  - \usepackage[ngerman]{babel}
output: 
  pdf_document:
    toc: true
    number_sections: yes
---