Uncover code chunk in Rmarkdown and beamer
Asked Answered
L

1

3

is it possible to reveal code chunks when using beamer and Rmarkdown? The following gives an error because of the # around the output, I think.

---
title: "test"
output: beamer_presentation
---

# Test Reveal
Text

\visible<2->{
Code
```{r}
print(2 + 2)
```
}
Lowspirited answered 22/8, 2020 at 15:53 Comment(0)
S
1

You can achieve a very similar effect by using a \pause before your code block:

---
title: "test"
output: beamer_presentation
---

# Test Reveal
Text

\pause
Code
```{r}
print(2 + 2)
```
Scouting answered 24/8, 2020 at 9:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.