I am starting to fully write my notebooks in MyST to be used with jupyter-book. For that, I create a markdown file, attach a Console Editor to my file, and do my thing, and it is working pretty well. However, in order to instruct jupyter-book to run a cell, the syntax used is:
```{code-cell} python3
print("Hello World");
```
Jupyterlab Markdown editor doesn’t understand that this is a python cell, and doesn’t highlight the code. However, it does if I instead of {code-cell} python3 use just python:
Is there any way to tell the editor that {code-cell} python3 should be highlighted as python?
I have the same issue. I want to publish my jupyter-notebooks using jupyterbook. At the same time, I want to be able to show them in jupyter lab. This works perfectly fine as long as I don’t use MyST syntax.
However, using MyST syntax, to eg. create a figure with a caption, looks good in the published jupyterbook but bad in jupyter lab:
```{figure} image.jpg
:height: 300px
:name: Tree
Caption text here...
```
This is how it looks in jupyterbook:
In jupyter lab it only shows this:
:height: 300px
:name: Tree
Caption text here...
Is there a way, to make jupyter lab show markdown-cells using MyST syntax correctly? (Like in jupyterbooks)?
Yeh so basically the VS Code extension is currently a bit “further on” in terms of rendering ability of MyST Markdown: MyST-Markdown - Visual Studio Marketplace, and allows for things like displaying figures (you can even play around with some of the rendering online with e.g. markdown-it-docutils - demonstrator)
and then hopefully we will soon be working on parity and even more improvements with the jupyterlab-myst extension
On the topic of syntax highlighting, this is something we need to look at in ‘jupyterlab-markup’. I can’t recall having checked, but doesn’t the directives plugin handle things like figures already?