forked from Sparrow0hawk/quarto-revealjs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.qmd
338 lines (254 loc) · 7.86 KB
/
index.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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
---
title: "Template Revealjs Quarto site"
# format: revealjs
author:
- name: Your Name
orcid: 0000-0000-0000-0000
email: [email protected]
affiliations: Employers Name
from: markdown+emoji
format:
clean-revealjs:
incremental: false
slide-number: true
show-slide-number: speaker
auto-stretch: false
chalkboard: true
# embed-resources: true
# standalone: true
header: Quarto RevealJS Template
revealjs-plugins:
- confetti
footer: "**Slides** : [**github-username.github.io/<repository>**](https://github-username.github.io/<repository>)"
project:
preview:
port: 7864
host: localhost
watch-inputs: true
filters:
- openlinksinnewpage
- reveal-header
---
## Scan This
{{< qrcode <https://ns-rse.github.io/quarto-revealjs-template> qr1 width=400 height=400 >}}
[ns-rse.github.io/quarto-revealjs-template](https://ns-rse.github.io/quarto-revealjs-template)
## Quarto RevealJS Slides
This is a [Quarto](https://quarto.org/) template for creating [RevealJS](https://revealjs.com/) slides.
The template can be used as a starting point for your own slides and includes a number of different layouts and examples
of Markdown syntax, slide layout, links, embedding images and configuration options.
## Formatting
Quarto slides are written in [Markdown](https://quarto.org/docs/authoring/markdown-basics.html).
| Markdown Syntax | Output |
|:---------------------------------------------|:--------------------------------------|
| `*italics*`, `**bold**`, `***bolditalics***` | *italics*, **bold**, **bold italics** |
| `superscript^1^`, `subscript~2~` | superscript^1^, subscript~2~ |
| `~~strikethrough~~` | ~~strikethrough~~ |
| ```code``` | `code` |
| `[Quarto](https://quarto.org)` | [Quarto](https://quarto.org) |
::: {.notes}
Speaker Notes can be added to each slide. **Formatting** can be used here too.
:::
## Columns and Lists
Slides can have columns and you can create [lists](https://quarto.org/docs/authoring/markdown-basics.html#lists) of
different types.
:::: {.columns}
::: {.column width="50%"}
**ToDo** (code)
```markdown
+ Learn Markdown
+ Create Quarto Slides
+ Publish on GitHub
```
:::
::: {.column width="50%"}
**ToDo** (Rendered)
+ Learn Markdown
+ Create Quarto Slides
+ Publish on GitHub
:::
::::
::: {.notes}
Slides can have columns and we can create unordered lists.
:::
## Columns and Lists (cont.)
:::: {.columns}
::: {.column width="50%"}
**Ordered** (code)
```markdown
1. A comes before
2. B which is followed by
3. C
```
:::
::: {.column width="50%"}
**Ordered** (Rendered)
1. A comes before
2. B which is followed by
3. C
:::
::::
::: {.notes}
Or ordered lists.
:::
## Tables
You can manually add [tables](https://quarto.org/docs/authoring/markdown-basics.html#tables).
:::: {.columns}
::: {.column width="50%"}
```markdown
| Right | Left | Default | Center |
|------:|:-----|---------|:------:|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |
```
:::
::: {.column width="50%"}
| Right | Left | Default | Center |
|------:|:-----|---------|:------:|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |
:::
::::
::: {.notes}
Tables can be added, but there is a better way to include these programatically
:::
## Equations
| Markdown Syntax | Output |
|:----------------------------------:|:-----------------------------|
| `inline math $E = mc^{2}$` | inline math $E = mc^{2}$ |
| ```display math: $$E = mc^{2}$$``` | display math: $$E = mc^{2}$$ |
::: {.notes}
You can write equations if you need to.
:::
## Embed Images
[Figures](https://quarto.org/docs/authoring/figures.html) can be embeded using a URL and resized.
```markdown
![Relaxing in the Julian Alps](https://live.staticflickr.com/65535/53144704609_c5e6fa8c77_k.jpg){width=700}
```
![Relaxing in the Julian Alps](https://live.staticflickr.com/65535/53144704609_c5e6fa8c77_k.jpg){width=700}
::: {.notes}
:::
## Embed Images (*cont.*)
You can also include images locally.^[Make sure to `git add` them otherwise they won't publish] and make them hyperlinks.
```markdown
![[OSC Sheffield](https://osc-international.com/osc-sheffield)](img/OSC_Sheffield.png){width=300}
```
![[OSC Sheffield](https://osc-international.com/osc-sheffield)](img/OSC_Sheffield.png){width=300}
::: {.notes}
:::
## R code
:::: {.columns}
::: {.column width="50%"}
Include [R code and output](https://quarto.org/docs/computations/r.html) with automatic referencing (see @fig-airquality2)
```{r}
#| label: fig-airquality
#| fig-cap: "Temperature and ozone level."
#| warning: false
#| eval: false
#| echo: true
library(ggplot2)
ggplot(airquality, aes(Temp, Ozone)) +
geom_point() +
geom_smooth(method = "loess")
```
:::
::: {.column width="50%"}
```{r}
#| label: fig-airquality2
#| fig-cap: "Temperature and ozone level."
#| warning: false
library(ggplot2)
ggplot(airquality, aes(Temp, Ozone)) +
geom_point() +
geom_smooth(method = "loess")
```
:::
::::
::: {.notes}
[R](https://www.r-project.org/) code can be embeded and executed to produce tables and figures.
:::
## Python code
::: {.column width="50%"}
Include [Python code and output](https://quarto.org/docs/computations/python.html) too
```{.python}
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis."
#| warning: false
#| eval: false
#| echo: true
import numpy as np
import matplotlib.pyplot as plt
r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
subplot_kw = {'projection': 'polar'}
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```
:::
::: {.column width="50%"}
```{.python}
#| label: fig-polar2
#| fig-cap: "A line plot on a polar axis."
#| warning: false
#| eval: true
#| echo: true
import numpy as np
import matplotlib.pyplot as plt
r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
subplot_kw = {'projection': 'polar'}
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```
:::
::::
::: {.notes}
You can include [Python](https://www.python.org) code too
:::
## General code
There are lots of options for showing, hiding, highlighting [code
blocks](https://quarto.org/docs/presentations/revealjs/#code-blocks).
```{.python code-line-numbers="6-8"}
#| eval: true
#| echo: true
import numpy as np
import matplotlib.pyplot as plt
r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(subplot_kw={'projection': 'polar'})
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```
## The Documentation is Good
The official documentation is really good.
+ [Get Started](https://quarto.org/docs/get-started/)
+ [Markdown Basics](https://quarto.org/docs/authoring/markdown-basics.html)
+ [Guide](https://quarto.org/docs/guide/) with many sections on [Presentations](https://quarto.org/docs/presentations/)
[Website](https://quarto.org/docs/websites/), [Books](https://quarto.org/docs/books/) and more.
## Extensions
:::: {.columns}
::: {.column width="70%"}
[Extensions](https://quarto.org/docs/extensions/) for themes and other functionality
(press `c` whilst viewing these slides :wink: ).
+ [Shortcode/Filter](https://quarto.org/docs/extensions/listing-filters.html)
+ [Journal Articles](https://quarto.org/docs/extensions/listing-journals.html)
+ [Custom Formats](https://quarto.org/docs/extensions/listing-formats.html)
+ [**RevealJS**](https://quarto.org/docs/extensions/listing-revealjs.html)
+ [awesome-quarto](https://github.com/mcanouil/awesome-quarto) - Quarto tools & examples
:::
::: {.column width=30%}
This Template...
{{< qrcode <https://ns-rse.github.io/quarto-revealjs-template> qr2 width=400 height=400 >}}
:::
::::