Presentation Template

A template

Jens Wiesehahn

Slide 1.1

Alternative image text

Alternative image text

Slide 1.2

Quarto syntax examples

Attribution

With the Attribution extension we can display attributions on the right side.

::: {.attribution}
by [Jens Wiesehahn](https://wiesehahn.github.io/)
:::

Text Formatting

Markdown Syntax Output
*italics*, **bold**, ***bold italics***
italics, bold, bold italics
superscript^2^ / subscript~2~
superscript2 / subscript2
~~strikethrough~~
strikethrough
`verbatim code`
verbatim code

Headings

Markdown Syntax Output
# Header 1

Header 1

## Header 2

Header 2

### Header 3

Header 3

#### Header 4

Header 4

##### Header 5
Header 5
###### Header 6
Header 6

Lists

Markdown Syntax Output
* unordered list
    + sub-item 1
    + sub-item 2
        - sub-sub-item 1
  • unordered list
    • sub-item 1
    • sub-item 2
      • sub-sub-item 1
*   item 2

    Continued (indent 4 spaces)
  • item 2

    Continued (indent 4 spaces)

1. ordered list
2. item 2
    i) sub-item 1
         A.  sub-sub-item 1
  1. ordered list
  2. item 2
    1. sub-item 1
      1. sub-sub-item 1
(@)  A list whose numbering

continues after

(@)  an interruption
  1. A list whose numbering

continues after

  1. an interruption
::: {}
1. A list
:::

::: {}
1. Followed by another list
:::
  1. A list
  1. Followed by another list
term
: definition
term
definition

Note that unlike other Markdown renderers (notably Jupyter and GitHub), lists in Quarto require an entire blank line above the list. Otherwise the list will not be rendered in list form, rather it will all appear as normal text along a single line.

Tables

Markdown Syntax

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

Output

Right Left Default Center
12 12 12 12
123 123 123 123
1 1 1 1

Source Code

Use ``` to delimit blocks of source code:

Add a language to syntax highlight code blocks:

```python
1 + 1
```

Pandoc supports syntax highlighting for over 140 different languages. If your language is not supported then you can use the default language to get a similar visual treatment:

```default
code
```

Naming code blocks like

```{.r filename="script.r"}
1+1
```

gives

script.r
1+1

Highlight certain lines with e.g. {.python code-line-numbers="6-8"}

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

You can collapse code with

#| code-fold: true
#| code-summary: "Code"
#| code-fold: true
#| code-summary: "Code"

1+1

Equations

Use $ delimiters for inline math and $$ delimiters for display math. For example:

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

$$E = mc^{2}$$

display math:

\[E = mc^{2}\]

Diagrams

Quarto has native support for embedding Mermaid and Graphviz diagrams. This enables you to create flowcharts, sequence diagrams, state diagrams, Gantt charts, and more using a plain text syntax inspired by markdown.

For example, here we embed a flowchart created using Mermaid:

Show the code
```{mermaid}
flowchart LR
    A[Hard edge] --> B(Round edge)
    B --> C{Decision}
    C --> D[Result one]
    C --> E[Result two]
```

flowchart LR
    A[Hard edge] --> B(Round edge)
    B --> C{Decision}
    C --> D[Result one]
    C --> E[Result two]

Videos

You can include videos in documents using the {{< video >}} shortcode. For example, here we embed a YouTube video:

{{< video https://www.youtube.com/embed/wo9vZccmqwc >}}

Divs and Spans

You can add classes, attributes, and other identifiers to regions of content using Divs and Spans (you’ll see an example of this below in Callout Blocks).

For example, here we add the “border” class to a region of content using a div (:::):

::: {.second-color}
This content can be styled with a border
:::

This content can be styled with a border

[This is *some text*]{.third-color}

This is some text

Callout Blocks

Markdown Syntax

:::{.callout-note}
Note that there are five types of callouts, including: 
`note`, `tip`, `warning`, `caution`, and `important`.
:::

Output

Note

Note that there are five types of callouts, including note, tip, warning, caution, and important.

Tip

Note that there are five types of callouts, including note, tip, warning, caution, and important.

Warning

Note that there are five types of callouts, including note, tip, warning, caution, and important.

Caution

Note that there are five types of callouts, including note, tip, warning, caution, and important.

Important

Note that there are five types of callouts, including note, tip, warning, caution, and important.

Other Blocks

Markdown Syntax Output
> Blockquote

Blockquote

::: {.classname}
Div
:::

Div

| Line Block
|   Spaces and newlines
|   are preserved
Line Block
   Spaces and newlines
   are preserved

Final Slide


some conclusion remarks

  • nice presentation


wiesehahn.jens@gmail.com

JensWiesehahn

Slides available at:

wiesehahn.github.io/quarto_presentation_template


References

Wiesehahn, Jens. 2023. “A Template Repository to Provide a Starting Point for My Presentations.” Quarto_presentation_template. https://wiesehahn.github.io/quarto_presentation_template/.