What’s new in ?

Charlotte Wickham

Developer Educator @ Posit

A Guide to Quarto Versions

Current: https://quarto.org/docs/download/, reflected in docs, stable

Check your version with:

Terminal
quarto --version

Content

Embed Outputs from Other Documents

Source Document

Destination Document

Embed Outputs from Other Documents

source.qmd
```{{r}}
#| label: fig-scatter
#| fig-cap: A scatterplot embedded from another .qmd document
#| warning: false

ggplot(penguins, 
       aes(x = flipper_length_mm, y = bill_length_mm)) +
  geom_point(aes(color = species, shape = species)) +
  scale_color_manual(values = c("darkorange","purple","cyan4")) +
  labs(
    title = "Flipper and bill length",
    subtitle = "Dimensions for penguins at Palmer Station LTER",
    x = "Flipper length (mm)", y = "Bill length (mm)",
    color = "Penguin species", shape = "Penguin species"
  ) +
  theme_minimal()
```
destination.qmd
---
title: Destination Document
format: html
---

{{< embed source.qmd#fig-scatter >}}

Embed Outputs from Other Documents

Embed from Jupyter Notebooks (.ipynb) v1.3 or,
Quarto documents (.qmd) v1.4

Cross Reference Anything

::: {#fig-example1}

Reference-able Content

This is a caption.

:::

@fig-example1 shows ...

Reference-able Content

Figure 1: This is a caption.

Figure 1 shows …

Cross Reference Anything

::: {#fig-example2}

```{r}
library(tidyverse)
```

This is a caption.

:::

@fig-example2 shows ...
```{r}
library(tidyverse)
```
Figure 2: This is a caption.

Figure 2 shows …

Cross Reference Anything

::: {#tbl-example}

![](table.png)

This is a caption.

:::

@tbl-example shows ...
Table 1: This is a caption.

Table 1 shows …

Cross Reference Anything

Define new types of cross reference in YAML options

---
crossref-custom: 
  - kind: float 
    ref_type: dia
    prefix: Diagram
    name: Diagram
    latex_env: diagram 
    latex_list_of_name: lod
---

Cross Reference Anything

::: {#dia-example}
![](table.png)

This is a caption.

:::

@dia-example shows ...
Diagram 1: This is a caption.

Diagram 1 shows …

Inline Execution for Jupyter

The radius is 10.

```{python}
radius = 10
```


```{python}
#| echo: false
from IPython.display import display, Markdown
display(Markdown("""
The radius of the circle is {radius}.
""".format(radius = radius)))
```

v1.3

Inline Execution for Jupyter

The radius is 10.

```{python}
radius = 10
```


The radius is `{python} x`.

v1.4

Inline Execution for Jupyter

The radius is 10.

```{julia}
radius = 10
```


The radius is `{julia} x`.

v1.4

Add Context to Code

project: 
  type: website
  
website:
  title: "Quarto"
```{.yaml}
project: 
  type: website
  
website:
  title: "Quarto"
```

Add Context to Code

_quarto.yml
project: 
  type: website
  
website:
  title: "Quarto"
```{.yaml filename="_quarto.yml"}
project: 
  type: website
  
website:
  title: "Quarto"
```

Add the where with the filename attribute (v1.2)

Add Context to Code

_quarto.yml
project:          # <1>
  type: website   # <1>
  
website:          # <2>
  title: "Quarto" # <2>
  1. General Quarto project options
  2. Website specific options
```{.yaml filename="_quarto.yml"}
project:          # <1>
  type: website   # <1>
  
website:          # <2>
  title: "Quarto" # <2>
```
1. General Quarto project options
2. Website specific options

Add line context with the code annotation (v1.3)

Projects

Create Projects Quickly

Create Projects Quickly

Terminal
quarto create project website test-website

Generate Variations with Project Profiles

report.qmd
---
title: Report
---

## For Everyone
_quarto.yml
project:
  title: "Project Profiles"
  output-dir: external


external/report.html

Generate Variations with Project Profiles

Create a new profile, by creating a new Quarto config file.


Activate a profile:

Terminal
quarto render --profile internal
_quarto-internal.yml
project:
  output-dir: internal

internal/report.html

Generate Variations with Project Profiles

Create a new profile, by creating a new Quarto config file.


Activate a profile:

Terminal
quarto render --profile internal
_quarto-internal.yml
project:
  output-dir: internal

format:
  html:
    theme: solar

internal/report.html

Generate Variations with Project Profiles

report.qmd
---
title: Report
---

## For Everyone


## Internal Eyes Only  

Generate Variations with Project Profiles

report.qmd
---
title: Report
---

## For Everyone

::: {.content-visible when-profile="internal"}
## Internal Eyes Only  
:::

Generate Variations with Project Profiles

external/report.html

internal/report.html

Tools

Visual Studio Code Extension

Now has a Visual Editor

JupyterLab Extension

Interprets Quarto markdown

Wrapping Up

Other features in 1.4

  • Manuscripts for scholarly writing

  • Typst an alternative to LaTeX

Keeping Up to Date

Keeping Up to Date

Changelogs

Keeping Up to Date

Keeping Up to Date