Skip to article content

Working with MyST in Jupyter Lab

MyST has full support in Jupyter

πŸ›  Throughout the tutorial, whenever you're supposed to do something you will see a πŸ› 

See the video tutorial πŸ“Ί
πŸ›  Install JupyterLab Locally

For this tutorial you must have installed JupyterLab locally (use a version greater than 3.0).

πŸ›  Install JupyterLab, following the guide at https://​​jupyter​​.org​​/install

To follow along on without installing anything, you can try to Launch on Binder, however the install process may take up to ten minutes.

Install JupyterLab MySTΒΆ

πŸ›  Install the JupyterLab MyST extension version: PyPI

pip install jupyterlab_myst

See the GitHub repository, jupyterlab-myst for full installation instructions.

πŸ›  Verify the installation

To verify that the extension is registered with Jupyter, use:

jupyter labextension list

You should see the following text in the output:

jupyterlab-myst v1.x.x enabled OK

Download quickstart contentΒΆ

We are going to download an example project that includes notebooks for use in JupyterLab with the MyST extension installed. Our goal will be to try out some of the main features of jupyterlab-myst, including frontmatter, MyST syntax, and inline execution.

πŸ›  Download the example content, and navigate into the folder:

git clone
cd jupyterlab-myst-quickstart

Explore the NotebooksΒΆ

πŸ›  Launch JupyterLab with jupyterlab-myst activated Launch on Binder

jupyter lab
MyST in JupyterLab, showing frontmatter and admonitions that are natively rendered! πŸŽ‰

Figure 1:MyST in JupyterLab, showing frontmatter and admonitions that are natively rendered! πŸŽ‰

More Coming Soonβ„’

  • showing frontmatter
  • advanced user interface elements like tabs, grids, and cards
  • citations

Inline ExpressionsΒΆ

JupyterLab MyST allows you to create and evaluate inline expressions using the {eval} role. These turn your markdown cells into places that you can quickly evaluate a simple expression, such as:

  • The value of the variable x: {eval}`x`
  • Expand a sympy equation polynomial: {eval}`expand(polynomial)`

Use the {eval}`x` role to evaluate an expression, which can be text, an image, an equation, or even an ipywidgets slider.

Working with ipywidgetsΒΆ

Most widgets will work directly inline, allowing you to place widgets or controls inside of callouts, these can be linked together as normal.

Embed interactive ipywidgets in your markdown cells.

Task ListsΒΆ

The MyST extension also makes it very easy to edit task lists directly in the rendered view. Then you click a task item, the markdown is automatically updated.

Edit task lists with the jupyterlab-myst plugin directly in the rendered view.

Conclusion πŸ₯³ΒΆ

For now, that's it for this quickstart tutorial, please see the content in the notebooks or help contribute to the docs to help document these features! Other tutorials to explore are:

MyST Documents πŸ“‘

Learn the basics of MyST Markdown, and export to a Word document, PDF, and LaTeX\LaTeX!

MyST Markdown Guide πŸ“–

See an overview of MyST Markdown syntax with inline demos and examples.

MyST MarkdownMyST Markdown
Community-driven tools for the future of technical communication and publication