-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.qmd
249 lines (187 loc) · 4.16 KB
/
template.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
---
title: "The title of my talk:"
subtitle: "Also has a subtitle"
author: "Your Name"
date: last-modified
format:
uaz-revealjs: default
editor: visual
---
## Welcome
This University of Arizona themed presentation was developed by the [CCT Data Science](https://datascience.cct.arizona.edu/) team at University of Arizona.
When you click the **Render** button a document will be generated that includes:
- Content authored with markdown
- Output from executable code
## Sample Slide
Here's a bulleted list:
- First item
- sub item
- Second item
Here's a numbered list:
1. First item
1. Sub item
2. Second item
## Custom logo
To override the logo in the lower right corner, you can add your own in the YAML header
``` yaml
---
title: "The title of my talk:"
subtitle: "Also has a subtitle"
author: "Your Name"
date: last-modified
format:
uaz-revealjs:
logo: mylogo.png
editor: visual
---
```
Just make sure the image file (in this example "mylogo.png") is in the same folder as your presentation.
## Logo size
To adjust the size of the logo, create a `custom.scss` file with the following content
``` scss
/*-- scss:defaults --*/
$logo-height: 3.5rem;
```
and adjust the number
Include this style in your YAML header:
``` yaml
---
title: "The title of my talk:"
subtitle: "Also has a subtitle"
author: "Your Name"
date: last-modified
format:
uaz-revealjs:
theme:
- custom.scss
editor: visual
---
```
# Section Break
Use the level 1 header for a section break slide
## Blockquotes
The theme includes custom blockquotes
> Women belong in all places where decisions are being made.
> It shouldn't be that women are the exception.
>
> \- *Ruth Bader Ginsburg*
## Code
When you click the **Render** button a presentation will be generated that includes both content and the output of embedded code.
You can embed code like this:
```{r}
#| echo: true
library(ggplot2)
1 + 1
p <- ggplot(mpg, aes(class, hwy)) + geom_line()
m <- lm(hwy ~ class, data = mpg)
```
Here's a formatted but unevaluated code block
``` r
print("Hello!")
```
## Code with output
output is by default below code
```{r}
#| echo: true
print("Hello")
```
But can also be on the side
```{r}
#| echo: true
#| output-location: column
print("Hello")
```
## "Fenced" Code
If you're teaching about Quarto or RMarkdown, it's helpful to show the whole code chunk, including options.
That's pretty easy with the `echo: fenced` chunk option:
```{r}
#| echo: fenced
#| eval: false
library(ggplot2)
ggplot(mpg, aes(cty, hwy)) +
geom_point(aes(color = cyl)) +
scale_color_viridis_c() +
theme_bw()
```
## Code Output
```{r}
#| echo: true
library(dplyr)
starwars %>%
mutate(name, bmi = mass / ((height/100)^2)) %>%
select(name:mass, bmi)
```
## Equations
Here are some equations:
$$
y = \alpha_i + \beta_1x_1
$$
This is an inline equation $e = MC^2$
## Multiple columns
::: columns
::: {.column width="40%"}
Left column with text
- text here
- more text
:::
::: {.column width="60%"}
![Anatomy of the "A" logo](https://marcom.arizona.edu/sites/default/files/styles/az_natural/public/2023-11/Block%20A%20Anatomy%20Graphic.png?itok=Nxc_47cw){#fig-logo}
:::
:::
## Callout boxes {.smaller}
::: callout-note
A note
:::
::: callout-tip
A tip
:::
::: callout-important
Important!
:::
::: callout-caution
Caution!
:::
::: callout-warning
A warning
:::
## Flowcharts
```{mermaid}
%%| fig-align: center
flowchart TD
c["Event"]-->ubuntu
c --> mac
subgraph ubuntu [runs-on: ubuntu-latest]
subgraph Job
direction TB
a1["Step 1: Checkout Repo"]--> a2["Step2: Install R"]
a2 --> a3["Step 3: Run Script"]
a3 --> a4["..."]
end
end
subgraph mac [runs-on: macos-latest]
subgraph Job2
direction TB
b1["Step 1: Checkout Repo"]--> b2["Step2: Install R"]
b2 --> b3["Step 3: Run Script"]
b3 --> b4["..."]
end
end
```
## GitGraph
```{mermaid}
gitGraph
commit
commit
branch person_1
commit
commit
commit
checkout main
branch person_2
commit
commit
checkout main
merge person_1
merge person_2
commit
```