我正在使用rmarkdown生成单词(.docx)报告。我想更改目录的标题。pandoc_args
对于doc文件(1),这似乎可以作为yaml标头中的选项传递。但是我做的不对。谁能提供一个可行的例子?
(1)pandoc.args包含在rmarkdown可能的选项中,并且在pandoc手册中,有toc-title选项
---
title: "yaml header"
author: "cedric"
output:
word_document:
toc: true
pandoc_args: toc-title="Table des matières"
---
# One section
# Another
这将产生:
目录的标题是文档元数据,因此可以使用YAML元数据块进行设置。
---
title: "yaml header"
author: "cedric"
output:
word_document:
toc: true
toc-title: "Table des matières"
---
或通过-M
命令行标志将其传递。
---
title: "yaml header"
author: "cedric"
output:
word_document:
toc: true
pandoc_args: [
"-M", "toc-title=Table des matières"
]
---
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句