【问题标题】:Adding a table of contents in an r notebook在 r 笔记本中添加目录
【发布时间】:2018-01-31 05:26:46
【问题描述】:

当我将目录添加到 r markdown 文件时似乎没有问题,但是当我将其添加到 r 笔记本时没有任何反应:

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

是否可以将目录添加到 R 笔记本,或者我也必须将其制作成 markdown 文件?

【问题讨论】:

    标签: r rnotebook


    【解决方案1】:

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

    output: 
      html_notebook:
        theme: united
        toc: yes
    

    【讨论】:

      【解决方案2】:

      尝试如下格式:

      title: "Title"
      output:
        html_notebook:
          theme: united
          toc: yes
      

      【讨论】:

      • 另外,看起来像 this question 的副本
      • 我看到了这个问题,但它是关于 R 降价的,我在添加 TOC 而不是 R 笔记本时没有问题。
      【解决方案3】:

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

      要么删除html_document:,要么在它下面指定一些属性。

      【讨论】:

      • html_notebook: 之前声明toc: yes 代表html_document 可以覆盖您的主题。
      猜你喜欢
      • 2014-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-30
      • 2020-12-11
      • 2020-11-27
      • 2019-05-04
      • 2017-08-16
      相关资源
      最近更新 更多