Reputation: 420
I am using bookdown to render a PDF book using the documentclass "scrreprt" from koma script. This works so far, however the book is in German and the table of contents has a title "Contents" instead of a german "Inhaltsverzeichnis".
The "header" of my index.rmd:
---
title: "Mein Buchtitel"
author: "Jens Laufer"
date: "`r Sys.Date()`"
documentclass: scrreprt
---
The output of table of contents looks like this:
I tried also to add a preamble.tex in index.Rmd:
---
title: "Mein Buchtitel"
author: "Jens Laufer"
date: "`r Sys.Date()`"
documentclass: scrreprt
output:
bookdown::pdf_book:
includes:
in_header: preamble.tex
---
preamble.tex
\renewcommand{\contentsname}{Inhaltsverzeichnis}
However this doesn't help.
Any ideas? Thanks!
Upvotes: 2
Views: 1769
Reputation: 420
I could fix the problem by changing the preamble.tex to this:
\usepackage[ngerman]{babel}
\selectlanguage{ngerman}
Upvotes: 1
Reputation: 30114
You can set the variable toc-title
in the YAML metadata, e.g.,
toc-title: "Table of Contents"
See the Pandoc Manual for more info: https://pandoc.org/MANUAL.html
Upvotes: 2