-
Notifications
You must be signed in to change notification settings - Fork 14
/
xaringan-metropolis.Rmd
126 lines (83 loc) · 2.05 KB
/
xaringan-metropolis.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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
---
title: "xaringan"
subtitle: "Metropolis theme"
author: "Your Name"
date: "2099/12/12"
output:
xaringan::moon_reader:
css:
- default
- mtheme.css
- fonts_mtheme.css
nature:
beforeInit: "macros.js"
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
```
# How to use it
Specify `metropolis` and `metropolis-fonts` in the `css` argument of `moon_reader()`
```yaml
output:
xaringan::moon_reader:
css: [default, metropolis, metropolis-fonts]
```
---
class: inverse, mline, center, middle
# Get Started
---
# Orange break lines
An orange break line is automatically added for you under the subtitle in the title slide. If you want an orange break line in a slide with class `inverse`, you need to add the class `mline` too. E.g.,
```yaml
class: inverse, mline, center, middle
```
You can also manually insert an orange break line anywhere with
```html
<hr>
```
Simply put this code directly in the `title` field of the YAML header or in the body of any slide. E.g.,
<hr>
---
# Additional tweaks
## Changing font sizes
This css comes with some classes that let you change the font-size of the coding font:
.code60[
```{r, eval = FALSE}
.code60[some R code with 60 % font size]
```
]
.code100[
```{r, eval = FALSE}
.code100[some R code with 100 % font size]
```
]
The same applies to the non-coding font by using e.g. `.font60[]`:
.font60[
xaringan is so powerful!
]
... or `.font150[]`
.font150[
xaringan is so powerful!
]
---
# Additional tweaks
## Inline code highlighting
I've set the look of inline code highlighting similar to the one used at `Github` with a grey background.
---
# Differences to Metropolis Beamer
* No support of incremental orange break lines in break slides
* Style of slide numbering
---
# Header 1
## Header 2
Header 2
### Header 3
Header 3
#### Header 4
Header 4
---
class: clear
If you use `class: clear` for a slide, you can have a slide without the colored top.