-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmy-slides.qmd
More file actions
332 lines (224 loc) · 6.02 KB
/
my-slides.qmd
File metadata and controls
332 lines (224 loc) · 6.02 KB
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
---
execute:
echo: true
format:
revealjs:
output-file: "slides-template-quarto"
width: 1245
height: 700
embed-resources: false
preview-links: false
toc: false
menu: false
controls: true
slide-number: false
transition: fade
theme:
- simple
- style/style_background.scss
auto-stretch: false
center: true
filters:
- pyodide
---
## Use the arrows to navigate the presentation.
---
## { .custom-title }
This shows the .custom-title class defined on style/style_background.scss.
Any personalization should be applied directly there.
---
## { .custom-title }
::: {style="position: absolute; left: 700px; top: 550px; width:2000px; background-color: #ffffff; padding: 10px; border-radius: 5px;"}
[Some title]{style="font-size: 20px; margin: 0px;"} <br>
[Some author]{style="font-size: 25px;"}
:::
::: {.notes}
This are the speaker notes. They are not shown. Press "S" to activate them.
:::
---
## Requirements for conference slides
1. Slide theme & transitions
2. Slide creation
3. Text customization (color, size, fragments)
4. Control on text alignment
5. Images & videos
6. Columns
7. Export to pdf and html
8. Displaying and executing code
9. Speaker notes
10. Background customization
---
On quarto there are two important chars:
- Backtick (`) - Allow to define chars and blocks of markdown/code.
- Dots (`:`) - Allow to define blocks and pass them attributes.
---
## 1. Slide theme & transitions
Easy! Right on the YAML header:
```yaml
revealjs:
...
transition: fade
theme: simple
...
```
Transition options: fade, slide, convex, concave, zoom
Theme options: simple, black, beige, blood, dark, default, league, moon, night, serif, simple, sky, solarized
---
## 2. Slide creation
Easy! Slides are separated by `---`.
Titles are created with `#` and section titles with `##`, and so on.
```markdown
## A section without content
---
## Another slide with content
This is a very important content...
```
---
## 3. Text customization: color, size, etc.
Use markdown and standard html/css properties to customize text.
```markdown
[Text]{style="color: red"} can be [personalized]{style="font-size: 50px;"}
with standard html/css properties
```
[Text]{style="color: red"} can be [personalized]{style="font-size: 50px;"}
with standard html/css properties
---
## 3. Text customization: color, size, etc.
Use `incremental` and `fragment` to control the text flow.
::: {.incremental}
* Items
* Shown
* Incrementally
:::
You can [use]{.fragment} [fragments]{.fragment} [within]{.fragment} [incrementals]{.fragment}.
---
* First
* Second
* [Third]{.fragment}
* [Fourth]{.fragment}
(partially, and a slide without a title)
---
* [Fourth]{.fragment fragment-index=4}
* [Second]{.fragment fragment-index=2}
* [Third]{.fragment fragment-index=3}
* [First]{.fragment fragment-index=1}
(user defined order)
---
## 4. Control on text alignment: horizontal
Use text-align to control the text horizontal alignment: left, center, right.
::: {style="text-align: left"}
This is a left-aligned text.
:::
::: {style="text-align: center"}
This is a centered text.
:::
::: {style="text-align: right"}
This is a right-aligned text.
:::
---
## 4. Control on text alignment: vertical
<br><br><br><br><br>
I have not found a better way than just inserting a lot of line breaks: `<br>`
---
## 5. Images & videos
Use markdown to insert images and videos.
---
## 6. Columns
You can have multiple columns in a single slide, with different widths.
::: columns
::: {.column width="60%"}
Some content:
- markdown
- image
- video
- etc.
:::
::: {.column width="40%"}
Some content:
- markdown
- image
- video
- etc.
:::
:::
---
## 7. Export to pdf and html
- The html is generated by default when rendering the slides. Make sure to define to include/not include the resources to make it self-contained.
- The pdf can be generated by opening the html file and pressing "E" to enable the print screen. Then, print the page and export as a pdf.
---
## 8. Displaying and executing code
You have 3 options:
- `python`
- `{python}`
- `pyodide-python`
## `python`
Just a regular block of markdown, highlighted with python syntax.
The code must be wrapped between **```python** and **```**
```python
def fib(a,b):
return a+b
x = fib(2,2)
print(x)
```
It is not executed. It might contain errors!
---
## `{python}`
Executes the code when rendering on a python environment, and shows the results.
The code must be wrapped between **```{python}** and **```**
```{python}
def fib(a,b):
return a+b
x = fib(2,2)
print(x)
```
It's not interactive, but it's 100% python!
It will be run before rendering the slides - if there are errors, there will be consequences...
---
## `{pyodide-python}`
It's interactive using pyscript (javascript port).
Setting up non-standard libraries can be tricky.
It must be wrapped between **```{pyodide-python}** and **```**
```{pyodide-python}
def fib(a,b):
return a+b
x = fib(2,2)
print(x)
```
It will be executed when rendering the slides.
---
## pyodide considerations
Must add 2 lines to the yaml header:
```yaml
filters:
- pyodide
```
And must install with quarto:
```bash
quarto add coatless-quarto/pyodide
```
It's great to demo a library or function, and change some parameters while presenting.
It'st not a programming environment: large blocks or codes or complex libraries might break.
---
## 9. Speaker notes
To open the speaker notes, press "S" on the slides.
---
## 10. Background customization
You can customize the background of the slides, using regular html/css.
Example:
```html
<style>
.slide-background-content {
background-image: none !important;
background-color: #AA0000 !important;
color: white !important;
}
</style>
```
---
## 10. Background customization
This can be conveniently done in a css file, loaded into the yaml header, used when needed on a particular slide.
```yaml
theme:
- simple
- style/style_background.scss
```