The existing markup provision in JupyterLab, like most notebook tools, is plain-old-commonmark. This is fine, but unsuitable for authoring complex documents such as those with references, or figures.
MyST Markdown is an ambitious superset of CommonMark that includes document-level features such as references. It is incredibly useful for authoring rich documents, and the current primitive implementation in JupyterLab (jupyterlab-myst
) has already proven invaluable to me in writing such content.
@stevejpurves and @rowanc1 are re-writing jupyterlab-myst
as a stand-alone extension to better address the needs of a MyST renderer, and also to leverage the current JS direction of MyST, which is based upon the unifiedjs
pipeline. There’s an ongoing discussion here: Alignment with mystjs · Issue #57 · executablebooks/jupyterlab-myst · GitHub
One of the main uses for MyST is in Jupter Book, for which there is support for Jupyter Notebooks as MyST documents; content (e.g. figures) can be generated from cell outputs, and cell-metadata can be used to guide the subsequent transformations (e.g adding a caption to a figure generated by a code-cell).
@choldgraf noted that we would like to improve the cell-metadata editing experience, which I’ve also found to be highly frustrating (escaping captions for JSON, losing content if the [1]). is not pressed before losing focus, etc.
A very simple improvement would be a stateful UI that converts the JSON to YAML. This is fairly niche; Jupyter Book already uses YAML extensively, so it would naturally map to our use case. But, a longer-term solution would directly address the problem. In executable-books/jupyterlab-myst#57 I wrote:
Notebook metadata editing is notoriously bad. JupyterLab has added a JSONSchema-derived UX for settings management, I wonder whether the next logical extension is for JupyterLab extensions to be able to declare a metadata schema (and JupyterLab provides the UX for free?
In this thread, I wanted to see what’s already out there, and get a sense of any immediate obstacles to replicating schema-based settings UX in the metadata view. I’m fairly sure that this must have come up before, but I couldn’t find anything. @fcollonval / @bollwyvl you are two people I suspect might have an idea about this?
I note that this topic overlaps with the planned Jupyter Notebook format workshop!