我正在使用 R 包 slidify 来创建revealjs 幻灯片。我想使用 RMarkdown 逐步显示代码片段(而不是编辑生成的 HTML),但似乎无法找到方法。
在下面的示例中,我有两个代码块,我希望第二个代码块仅出现在上一段之后。我可以进入生成的 HTML 并添加class=fragment
到pre
标签中,但这非常低效!
建议
---
title : RevealJS with Bootstrap
framework : revealjs
---
```{r}
mean(1:3)
```
<div class="fragment">
This works fine, the div does not appear until you click forward in the deck. But you can't put the div tags around a code fragment.
</div>
```{r}
mean(1:3)
```