How to embed content from Jupyter Notebook into a separated Markdown file? #1062
-
Exploring Myst Markdown and found https://mystmd.org/guide/reuse-jupyter-outputs which is something I would like to do with my data analysis.
I was exploring the documentation but in addition to the link above about reuse jupyter outputs, did not find an example to follow. I was also exploring Quarto https://quarto.org/docs/authoring/notebook-embed#code-cell-options which seems to support this method, however, I would like to try Myst. Any pointers to examples I really appreciate. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
Hey @lgonzalezsa - I think you are on the right track. There is another mention in the docs here: https://mystmd.org/guide/cross-references#targeting-cells - but I don't think it adds much to the other page you found. All you should need is:
A rich example that includes this feature can be found here: https://github.com/Notebooks-Now/submission-myst-full In this example there is a labelled cell in Hopefully that gets you a little further? Please let me know how it goes and if you run into more trouble! |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your response and pointers. First thing I noticed was during the Now, I am experimenting with the embed directive because i need to use the output of a cell but not as a figure but got an error, see the video attached. myst_embed_issue.mp4 |
Beta Was this translation helpful? Give feedback.
Hey @lgonzalezsa - I think you are on the right track. There is another mention in the docs here: https://mystmd.org/guide/cross-references#targeting-cells - but I don't think it adds much to the other page you found. All you should need is:
myst.yml
file (created withmyst init
)#| label: my-label
A rich example that includes this feature can be found here: https://github.com/Notebooks-Now/submission-myst-full
In this example there is a labelled cell in
notebooks/visualization-fig…