-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.qmd
58 lines (41 loc) · 858 Bytes
/
template.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
title: Revealjs Code Focus
format:
codefocus-revealjs:
bgcolor: '#A9F9D1'
# scrollToFocused: false
author: shafayetShafee
date: last-modified
execute:
echo: true
---
## Introduction
```{r}
# this is some comment
# this is more comment
```
::: {.fragment data-code-focus="1"}
When this fragment is shown, the first line of code will have the `focus` class added to it and it gets highlighted.
:::
::: {.fragment data-code-focus="1-2"}
Another fragment. This time, both lines will now have the `focus` class.
:::
## More Examples
```{r}
a <- 1
b <- 2
c <- 1 + 2
```
Then,
```{r}
print(c)
```
::: {.fragment data-code-focus="1-2"}
Here we have declared two variables
:::
::: {.fragment data-code-focus="3"}
Then added them and passed them to c
:::
::: {.fragment data-code-focus="1" data-code-block="2"}
Then print the c
:::