How to change table of content header in knitr?
问题 I am using the following options to produce a pdf document with knitr: --- title: "Test" author: "Paulo Miramor" date: "13-07-2015" output: pdf_document toc: yes --- I would like to change the header of the table of contents (which is "Contents"), since I am producing a document in Portuguese. Is there any way to customize it? 回答1: Thanks to @Molx and @Chris in the comments I could find a solution. Solution 1 Add \renewcommand{\contentsname}{Índice} to the document so that the .Rmd header is: