【问题标题】:Floating TOC doesn't work in interactive RMarkdown浮动目录在交互式 RMarkdown 中不起作用
【发布时间】:2019-08-13 22:34:17
【问题描述】:

我有一个交互式 RMarkdown 文档。目录 (TOC) 可与 rmarkdown::render() 一起正常工作,但不适用于 rmarkdown::run()

这是我的测试代码:

---
title: "Testing shiny Rmd"
output:
  html_document:
    toc: true
    toc_float: true
    number_sections: true
    theme: united
    highlight: textmate
runtime: shiny
---

# Section A

This is some text

# Section B

And some more text.

```{r,eval=FALSE}
data(iris)
plot(iris$Sepal.Length,iris$Sepal.Width)
```

这里是rmarkdown::render()

这里是rmarkdown::run()

R version 3.5.3 (2019-03-11)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

rmarkdown_1.12
shiny_1.2.0 

【问题讨论】:

  • 你试过什么浏览器?
  • 我用的是火狐。在您发表评论后,我也在 Chrome 中尝试过,但它不起作用。
  • 同样的问题。你终于找到解决办法了吗?
  • 尚无解决方案:(

标签: r shiny r-markdown


【解决方案1】:

这似乎是 1.12 版本的 rmarkdown(以及新发布的 1.13 版本)的问题。我遇到了同样的问题,并看到了解决我的问题的解决方案here

现在通过以下方式安装 rmarkdown 的开发版本:

remotes::install_github('rstudio/rmarkdown')

【讨论】:

    猜你喜欢
    • 2022-12-01
    • 2017-09-17
    • 1970-01-01
    • 1970-01-01
    • 2012-04-27
    • 1970-01-01
    • 2018-10-14
    • 2019-03-06
    • 1970-01-01
    相关资源
    最近更新 更多