5

There doesn't seem to be a problem when I add a table of contents to an r markdown file but nothing happens when I add this to an r notebook:

output: 
   html_document:
   html_notebook:
      toc: true
      depth: 3
      theme: united

Is it possible to add a table of contents to an R notebook or do I have to make this into a markdown file too?

4

3 回答 3

3

最后我不得不像这样格式化它:

output: 
  html_notebook:
    theme: united
    toc: yes
于 2017-08-22T20:27:56.880 回答
2

尝试像这样格式化:

title: "Title"
output:
  html_notebook:
    theme: united
    toc: yes
于 2017-08-22T20:07:31.983 回答
1

html_document:后面没有任何属性,这就是html_notebook设置未正确执行的原因。

删除html_document:或指定它下面的一些属性。

于 2020-03-31T21:32:41.333 回答