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 🛠

Install JupyterLab MyST

🛠 Install the JupyterLab MyST extension version: PyPI

pip install jupyterlab_myst

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

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 https://github.com/executablebooks/jupyterlab-myst-quickstart.git
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)`

Figure 2: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