-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.qmd
More file actions
242 lines (160 loc) · 4.04 KB
/
test.qmd
File metadata and controls
242 lines (160 loc) · 4.04 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
---
title: "Template slides"
author: "Fabricio Oliveira"
institute: "Aalto University"
department: "Department of Mathematics and Systems Analysis"
from: markdown+emoji
format:
revealjs:
theme: [assets/gamma-opt.scss]
footer: "Location, date, email"
logo: assets/gamma-opt.svg
toc: true
toc-depth: 1 #use two to have slide titles. Doesn't work with animations
toc-title: "Outline"
transition: slide
bibliography: assets/references.bib
jupyter: julia-1.10
---
# First Section
<!-- Creates a slide -->
## First slide
## Second slide
<!-- Incremental lists -->
::: {.incremental}
- One
- Two
- Three
:::
In than fade-out requires quite a lot of work and is annooying, but can be done
::: {.fragment .fade-in-then-semi-out}
- Three
:::
::: {.fragment .fade-in-then-semi-out}
- Two
:::
::: {.fragment .fade-in-then-semi-out}
- One
:::
<!-- How to add alerts and reference figures that are code generated -->
## Third slide
For a [demonstration](alert) of a line plot on a polar axis, see @fig-polar.
```{julia}
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis"
using Plots
x = collect(1:0.1:100)
f(x) = x^3 - 2*x + 5
plot(f.(x), legend=false)
```
<!-- Displaying code -->
## Fourth slide: code
```julia
using Plots
x = collect(1:0.1:100)
f(x) = x^3 - 2*x + 5
plot(f.(x), legend=false)
```
# New section
## Math!
Testing inline equation $x \in \mathbb{R}^n$
:::{math}
\begin{align}
Ax & = b \\
Bx + Dy & = e
\end{align}
:::
# Third section
<!-- Multi-column layout -->
## Multi-column layout, aside and footnotes
::: aside
Some additional commentary of more peripheral interest.
:::
:::: {.columns}
::: {.column width="40%"}
Left column^[A footnote on left column]
:::
::: {.column width="60%"}
Right column
:::
::::
<!-- Using callouts is a nice feature this allows -->
## Admonitions (call outs)
::: {.callout-note}
Note that there are five types of callouts, including:
`note`, `warning`, `important`, `tip`, and `caution`.
:::
::: {.callout-warning}
## Warning with Title
This is an example of a callout with a title.
:::
Other types:
::: {.callout-important }
## Important
:::
::: {.callout-tip }
## Tip
:::
::: {.callout-caution }
## Caution
:::
<!-- Adding a figure -->
## Image and text
Here is an image (@fig-chameleon):
{#fig-chameleon .lightbox}
The image is clickable (lightbox)
<!-- Animations -->
## Animations {auto-animate=true}
Animations are automatically generated, by matching element between two successive slides.
::: {style="margin-top: 100px;"}
Make this big and red
:::
## Animations {auto-animate=true}
Animations are automatically generated, by matching element between two successive slides.
::: {style="margin-top: 100px; font-size: 3em; color: red;"}
Make this big and red
:::
For it to work it must have the sme words, otherwise it reverts to a simple, appearance effect, like this
## Animations {auto-animate=true}
It matches where previous text went and auto-animate
## Animations {auto-animate=true}
It matches where previous text went and auto-animate
It also works with text and math
:::{math}
\begin{align*}
\min & f(x) \\
& g(x) \le 0
\end{align*}
:::
## Animations {auto-animate=true}
It matches where previous text went and auto-animate
It also works with text and math
But not increments, only fade-in and displacement
:::{math}
\begin{align*}
\min & f(x) \\
& g(x) \le 0
\end{align*}
:::
## Animations with code {auto-animate=true}
Code envs are automatically picked up for a nicer animation transition
```julia
using Plots
x = collect(1:0.1:100)
```
## Animations with code {auto-animate=true}
Code envs are automatically picked up for a nicer animation transition
```julia
using Plots
x = collect(1:0.1:100)
f(x) = x^3 - 2*x + 5
plot(f.(x), legend=false)
```
<!-- Using citations and bibtex.bib -->
## Citations
Fill the file in `assets/reference.bib` and use
- `@bertsimas2004price` to get this: @bertsimas2004price
- `[@bertsimas2004price]` to get this: [@bertsimas2004price]
## Bibliography
::: {#refs}
:::