0

I'm using rmarkdown in RStudio to create a dynamic pdf document.

Where and how can I define the prefixes to be used by Pandoc in a rmarkdown, knitr pdf output generation in place of those default values automatically being assumed?

For instance, in the table of contents automatically created, I don´t want the default value assumed as "Contents". The same for the automatic prefix added for each chapter created, instead of "Chapter 'X'" I want to use my own language for that.

Is that possible to set this globally by any pandoc-args passed thru the YAML? Is there any ChapterPrefix and/or equivalent "TOCPrefix"?

Molx
  • 6,816
  • 2
  • 31
  • 47
Fábio Salles
  • 345
  • 4
  • 14
  • 3
    possible duplicate of [How to change table of content header in knitr?](http://stackoverflow.com/questions/31396414/how-to-change-table-of-content-header-in-knitr) – Molx Sep 15 '15 at 01:22
  • @Molx, yes same question, but although having the babel in my MikTek when setting the lang: Portuguese it is not working in my case. – Fábio Salles Sep 15 '15 at 18:12
  • 1. Why isn't it working? You should all what you've tried in your question and explain why it didn't work. 2. There are two solutions there, did you try both? – Molx Sep 15 '15 at 18:18
  • @Molx, I have tried both. Neither the lang: Portuguese (same language I´m looking for) nor by option 1 by setting header-includes in YAML. This latter, to have no error on the knit pdf execution, I needed to define inside pandoc_args, otherwise execution would not conclude. But for both case when working up to the end, no changes in the default "Chapter" caption. – Fábio Salles Sep 15 '15 at 18:28
  • Ok. Thanks @Molx. Now it is working with header-includes: - \renewcommand{\contentsname}{NewName} – Fábio Salles Sep 15 '15 at 18:40
  • Closing my question and sharing my conclusion. By header-includes it is possible to redefine also "Chapter" by - \renewcommand{\chaptername}{NewName} other fixed names in Latex are possible to change by the same way. See http://www.tex.ac.uk/FAQ-fixnam.html – Fábio Salles Sep 15 '15 at 18:50

0 Answers0