Releases: executablebooks/MyST-NB
Add glue and paste functionality
This adds a prototype functionality for "glue and paste" with MyST-NB. It closes #4
You glue things into a notebook's metadata like this:
from myst_nb import glue
glue("your-key", an_object)And it will run IPython's display on the object, then store the mimebundle
at the key you specify.
When the notebooks are parsed with MyST-NB, it builds up a registry of all
the keys across all notebooks, so that you can then refer to them in the following ways:
You can paste it in markdown with a directive like this:
```{paste} your-key
```
Or you can add it in-line like this:
{paste}`your-key`
optionally:
{paste}`your-key:format-string`
See documentation for more details: https://myst-nb.readthedocs.io/en/latest/use/glue.html
CSS Improvements
v0.2.2 bump version
Make package name lower case
So that its pip install myst-nb rather than pip install MyST-NB
Refactor Parsing Process
With the shiny new mistletoe-ebp API (see https://mistletoe-ebp.readthedocs.io/en/latest/using/intro.html#programmatic-use), the parsing process has been refactored to be more inline with how it will occur for the text based representation:
- The full notebook is converted to an 'intermediate' mistletoe/markdown AST (before inline text is processed), in order to collect all link/footnote definitions
- This AST is then walked to 'expand'
SpanContainer(see https://mistletoe-ebp.readthedocs.io/en/latest/using/intro.html#the-parse-process) - The
SphinxNBRendereris applyed once on the full AST (rather than for each cell as was done previously).
This involved creating a specific CodeCell mistletoe token, then adding an extra render method to SphinxRenderer that knows how to deal with it, basically using the code from https://github.com/ExecutableBookProject/MyST-NB/blob/d089de3c1140f72daf7c579be7637164ee548028/myst_nb/parser.py#L98
Note: this logic has been removed: https://github.com/ExecutableBookProject/MyST-NB/blob/d089de3c1140f72daf7c579be7637164ee548028/myst_nb/parser.py#L89
Since it is not compatible with the new process, as already discussed in #30
Initial PyPi release
v0.1.0 Add Travis PyPi Deployment