Search code examples
rr-markdowndocxtableofcontents

changing rmarkdown "table of contents" default title


I am using RMarkdown to write my MSc thesis, in a language different than English. The thesis shall be rendered in .docx format. Reading around SO, I found that it is possible to provide some pandoc arguments among which toc-title could address my issue. Nevertheless I was not able to do it. My current YAML header is:

output:
  word_document:
    reference_docx: stile_tesi.docx
    toc: yes
    fig_caption: true
    #pandoc_args: [
    # "--toc-title", "INDICE"
    #]

Thanks in advance


Solution

  • ---
    title: "Untitled"
    output: 
      word_document: 
        toc: yes
    toc-title: "INDICE"
    ---
    

    Important: Watch out the correct indention!