我一直在使用 rmarkdown 和 knitr 来创建 html 输出。突然之间,{.tabset}
函数似乎在编织时停止工作,并且文档会像没有此选项时一样呈现。
这是一个在我的系统上无法正常工作的简单示例。
---
title: "Plot Tabs"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
## Title {.tabset .tabset-fade .tabset-pills}
### tab 1
```{r}
plot(cars)
```
### tab 2
```{r}
plot(pressure)
```
我已经在另一个系统上测试过了,它工作正常。我还重新安装了 R 并更新了我的所有软件包以及 RStudio。
有没有人知道任何类似的问题,或者任何可能导致问题的原因?
最佳答案
这是 a known bug并且一直是fixed 2017 年 11 月 21 日在 rmarkdown 的当前开发版本中。请测试开发版本:
devtools::install_github('rstudio/rmarkdown')
关于html - 将 rmarkdown 编织到 html 时标签不呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47639445/