-
Notifications
You must be signed in to change notification settings - Fork 1
/
session-tabs.qmd
77 lines (55 loc) · 1.31 KB
/
session-tabs.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
title: "Tabset panels"
subtitle: "Session - tabs"
editor_options:
chunk_output_type: inline
---
```{r}
#| label: packages
#| eval: true
#| include: false
library(countdown)
library(knitr)
```
## Breaking up long reports in HTML
::: {.incremental}
- Allows users to toggle between sections and breakup very long HTML
- Cannot be used in reports that are static like Word or pdf
:::
## Tabsets rely upon on few features
As a reminder, in markdown there is a hierarchy of hashes for tabs
```markdown
# Country analysis
## Overview
## Covid cases
```
. . .
And Quarto specific code is denoted by `:::` at the start and end of code to be affected.
For example
```markdown
# Country analysis
::: {.panel-tabset}
## Overview
## Covid cases
:::
```
## Let's try this
First of all we'll install a GitHub package which changes RStudio to have an add in menu:
```{r}
#| echo: true
# install.packages("remotes") # if not yet installed
remotes::install_github("matt-dray/quartostamp")
```
. . .
Then we'll `Insert Tabset` from the Addins menu (under Help) and then copy the header code over the `Tab A` and `Tab B`
## Styling tabs
It's possible to change the view of the tabs by adding `.nav-pills`:
. . .
```markdown
# Country analysis
::: {.panel-tabset .nav-pills}
## Overview
## Covid cases
:::
```
## Next Section