-
Notifications
You must be signed in to change notification settings - Fork 41
/
appendix-c-html-extensions.Rmd
46 lines (31 loc) · 1.05 KB
/
appendix-c-html-extensions.Rmd
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
# HTML document extensions
Some common options for HTML include:
- Adding tab sets
- floating table of contents
### Adding Tab sets
A tab set looks like the following:
````markdown
#### Example tab set {.tabset}
##### Tab 1
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed eleifend velit. Sed porta pulvinar lorem ut rutrum. Etiam quis cursus libero. Donec nibh nisl, auctor quis sem in, feugiat convallis odio. Ut at euismod ligula. Nullam vitae quam non lacus scelerisque tempus. Sed tincidunt massa non nunc tincidunt feugiat. In hac habitasse platea dictumst.
##### Tab 2
```{r tab-plot}` r''
plot(iris$Sepal.Length, iris$Sepal.Width)
```
````
To add a tab set, you include `{.tabset}` after your heading
### Floating table of contents
A floating table of contents can be added with the following lines in the YAML header:
```YAML
---
title: "Your title"
author: "Your name"
output:
html_document:
toc: true
toc_float: true
---
```
## Your turn {.exercise}
1. Add tab sets to your document
1. Add a floating table of contents