1
votes

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:

enter image description here 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!

2

2 Answers

1
votes

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

0
votes

I could fix the problem by changing the preamble.tex to this:

\usepackage[ngerman]{babel}
\selectlanguage{ngerman}