NotebooksPalmer Penguins








Quarto 1.3 Feature



This post is part of a series highlighting new features in the 1.3 release of Quarto. Get the latest release at https://quarto.org/docs/download.


Starting in Quarto 1.3, you can include the output of an external Jupyter notebook in a Quarto document with the embed shortcode. To embed a notebook cell, provide the path to a Jupyter Notebook and a cell identifier. For example, this notebook called penguins.ipynb has a cell labelled fig-bill-scatter:

You can use the following shortcode to embed the output of this cell:

This will embed the plot as follows:






Figure 1: A scatterplot of bill dimensions for penguins, made with Altair.



Source: Palmer Penguins
A link to the source notebook is automatically provided beneath the plot. Following the link takes users to a rendered version of the notebook, allowing them to explore the notebook without having to download and run it locally. For example, clicking on the link to penguins.ipynb gets you to a page that looks like the following:

Beyond this basic usage, head to the Jupyter Cell Embedding highlight docs to learn how to:

Specify cells in multiple ways, see Specifying Cells.
Control the output using code cell options in the source Notebook, including things like figure captions, figure layout, and code display, see Code Cell Options.
Include the cell code along with the output by adding an echo option to the shortcode, see Embedding Code.
Customize or exclude the link to the source notebook, see Links to Source Notebooks.

 



Subscribe
Enjoy this blog? Get notified of new posts by email: