Parse python code output as MyST instead of CommonMark #1134
-
Hi all, I'm using JupyterBook to write documentation for a parametric design framework for the modelling of certain chemical processes. The inputs, outputs and calculations of the different models are described in YAML files that are used by the web based UI as well as the python package. I would like to add tables with the parameters and their options/definitions/units/etc. in the JupyterBook documentation, preferably with the MyST list-table directive. Something like this:
This however does not work for MyST directives or MyST Markdown, as the code cell directive currently only supports parsing CommonMark. Any ideas on how to achieve what I want? I can of course make a separate python script that generates all the specific model markdown files with the required data, but that feels a bit cumbersome. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is because myst-nb (the Sphinx extension that handles executable notebooks in JB) defaults to CommonMark. You can configure this setting (see the docs) to change this to MyST Markdown on a document-wide or per-cell level. |
Beta Was this translation helpful? Give feedback.
This is because myst-nb (the Sphinx extension that handles executable notebooks in JB) defaults to CommonMark. You can configure this setting (see the docs) to change this to MyST Markdown on a document-wide or per-cell level.