Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 275
Metamatics Avatar asked Mar 16 '15 15:03

Metamatics


People also ask

How do you add a header in R Markdown?

We can insert headings and subheadings in R Markdown using the pound sign # . There are six heading/subheading sizes in R Markdown. The number of pound signs before your line of text determines the heading size, 1 being the largest heading and 6 being the smallest.

How do you bold a title in R Markdown?

**text** is used to make the title bold and <br> to break the line.

How do you bold and italicize in R Markdown?

To write text in italic font, use a single underscore or asterix before and after the text. To write text in bold font, use a double asterix or underscores before and after the text.

What is TOC in R Markdown?

1 Table of contents. You can add a table of contents (TOC) using the toc option and specify the depth of headers that it applies to using the toc_depth option. For example: --- title: "Habits" output: html_document: toc: true toc_depth: 2 ---


1 Answers

This in your YAML should also work:

header-includes: \renewcommand{\contentsname}{Inhalt}

like image 65
RobertMyles Avatar answered Oct 15 '22 05:10

RobertMyles