我想在我的降价文档中使用标签。我可以将.tabset类属性应用于我的标题,这没有问题。但是,我想将它应用到我的头衔。假设我有以下代码:
---
title: 'Header 1'
author: "Homer Simpson"
date: "4/26/2017"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Header 1 {.tabset}
## Header 2
因此标题1出现两次。但我想从标题2开始,不再重复标题1。我该怎么做?谢谢!
答案 0 :(得分:2)
避免给tabset命名可以解决问题:
---
title: 'Header 1'
author: "Homer Simpson"
date: "4/26/2017"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# {.tabset}
## Header 2
## Header 3
或类似地避开文档title
:
---
author: "Homer Simpson"
date: "4/26/2017"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Header 1 {.tabset}
## Header 2
## Header 3