rmarkdown into Word - change a title in toc

I use rmarkdown in order to create Word document. Default title in toc is just: Table of contents. How to change that title?

In the yaml header, The first field in title, which you can change.

For example see section 3.1.1 here

The title of this html doc with a table of contents is “Habits”

---
title: "Habits"
output:
  html_document:
    toc: true
    toc_depth: 2
---

No. That's a title of document. I want to change the default phrase: "Table of contents" into something different. Actually I want to write the same but not in English :-).
toc_title: doesn't work.

---
title: "Mixture distributions"
output: 
    word_document:
        toc: yes
        toc_title: "Article Outline"
---

I don't have MS Word installed, so I haven't tested this, but you could try saving a template with your preferred TOC title and using that as your markdown template. Good luck, this seems like a tricky problem! :face_with_raised_eyebrow:

@EeethB: Doesn't work.

I found a solution. Such a simple solution.


---
title: "Mixture distributions"
output: 
    word_document:
        toc: yes
toc-title: Article Outline
---
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.