【发布时间】:2018-01-31 05:26:46
【问题描述】:
当我将目录添加到 r markdown 文件时似乎没有问题,但是当我将其添加到 r 笔记本时没有任何反应:
output:
html_document:
html_notebook:
toc: true
depth: 3
theme: united
是否可以将目录添加到 R 笔记本,或者我也必须将其制作成 markdown 文件?
【问题讨论】:
当我将目录添加到 r markdown 文件时似乎没有问题,但是当我将其添加到 r 笔记本时没有任何反应:
output:
html_document:
html_notebook:
toc: true
depth: 3
theme: united
是否可以将目录添加到 R 笔记本,或者我也必须将其制作成 markdown 文件?
【问题讨论】:
最后我不得不这样格式化:
output:
html_notebook:
theme: united
toc: yes
【讨论】:
尝试如下格式:
title: "Title"
output:
html_notebook:
theme: united
toc: yes
【讨论】:
html_document: 后面没有任何属性,这就是html_notebook 设置无法正确执行的原因。
要么删除html_document:,要么在它下面指定一些属性。
【讨论】:
html_notebook: 之前声明toc: yes 代表html_document 可以覆盖您的主题。