Tabs not rendering when knitting rmarkdown to html

ⅰ亾dé卋堺 提交于 2021-02-13 16:04:25

问题


I've been using rmarkdown and knitr to create html output. Quite suddenly, the {.tabset} function seems to have stopped working when knitting, and documents render as they would without this option.

Here is a simple example that does not work as it should on my system.

---
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)
```

I've tested this on another system, and it works fine. I've also reinstalled R and updated all my packages as well as RStudio.

Does anyone know of any similar issues, or anything that could be causing the problem?


回答1:


This is a known bug and has been fixed in the current development version of rmarkdown on Nov 21, 2017. Please test the development version:

devtools::install_github('rstudio/rmarkdown')


来源:https://stackoverflow.com/questions/47639445/tabs-not-rendering-when-knitting-rmarkdown-to-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!