R markdown ioslides 代码块增量模式

2024-01-11

如何让 R 代码块逐渐出现?

例如,我在标题中添加了以下选项:

---
...other configurations...
output:
  ioslides_presentation:
    incremental: true
---

但增量模式仅适用于项目符号而不适用于代码块

## Slide 1
  * this bullet point appears first
  * this bullet point appears second
```{r eval=FALSE}
# This chunk is there from the beginning
```

所以我的问题是: 如何使该块出现在第二个项目符号之后?


您可以使用.build属性

## Slide 1 {.build}
  * this bullet point appears first
  * this bullet point appears second
```{r eval=FALSE}
# This chunk appears third
```

此解决方案有一个小问题:在这张幻灯片上第一次前进时,不会显示任何内容。您必须前进两次才能出现第一个要点。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

R markdown ioslides 代码块增量模式 的相关文章

随机推荐