Template Revealjs Quarto site

Your Name

Employers Name

Scan This

ns-rse.github.io/quarto-revealjs-template

Quarto RevealJS Slides

This is a Quarto template for creating RevealJS 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.

Markdown Syntax Output
*italics*, **bold**, ***bolditalics*** italics, bold, bold italics
superscript^1^, subscript~2~ superscript1, subscript2
~~strikethrough~~ strikethrough
code code
[Quarto](https://quarto.org) Quarto

Columns and Lists

Slides can have columns and you can create lists of different types.

ToDo (code)

+ Learn Markdown
+ Create Quarto Slides
+ Publish on GitHub

ToDo (Rendered)

  • Learn Markdown
  • Create Quarto Slides
  • Publish on GitHub

Columns and Lists (cont.)

Ordered (code)

1. A comes before
2. B which is followed by
3. C

Ordered (Rendered)

  1. A comes before
  2. B which is followed by
  3. C

Tables

You can manually add tables.

| Right | Left | Default | Center |
|------:|:-----|---------|:------:|
|   12  |  12  |    12   |    12  |
|  123  |  123 |   123   |   123  |
|    1  |    1 |     1   |     1  |
Right Left Default Center
12 12 12 12
123 123 123 123
1 1 1 1

Equations

Markdown Syntax Output
inline math $E = mc^{2}$ inline math \(E = mc^{2}\)
display math: $$E = mc^{2}$$ display math: \[E = mc^{2}\]

Embed Images

Figures can be embeded using a URL and resized.

![Relaxing in the Julian Alps](https://live.staticflickr.com/65535/53144704609_c5e6fa8c77_k.jpg){width=700}

Relaxing in the Julian Alps

Embed Images (cont.)

You can also include images locally.1 and make them hyperlinks.

![[OSC Sheffield](https://osc-international.com/osc-sheffield)](img/OSC_Sheffield.png){width=300}

R code

Include R code and output with automatic referencing (see Figure 1)

library(ggplot2)

ggplot(airquality, aes(Temp, Ozone)) +
  geom_point() +
  geom_smooth(method = "loess")
Figure 1: Temperature and ozone level.

Python code

Include Python code and output too

#| 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()
#| 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()

::::

General code

There are lots of options for showing, hiding, highlighting code blocks.

#| 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.

Extensions

Extensions for themes and other functionality (press c whilst viewing these slides 😉 ).

This Template…

Quarto RevealJS Template