alan-turing-institute / bio-Turing-Way

Experimenting with JupyterBooks, Sphinx, and training materials for biomed/life sciences from the Turing Way.
https://the-turing-way-personas.netlify.app/welcome
Other
4 stars 5 forks source link

Init markdown with Jupytertext metadata #6

Closed myyong closed 2 years ago

myyong commented 3 years ago

I ran

jupyter-book myst init --kernel python3 jupyter_book/book_template/markdown.md

which added the following text to the markdown file.


jupytext: cell_metadata_filter: -all formats: md:myst text_representation: extension: .md format_name: myst format_version: 0.13 jupytext_version: 1.11.5 kernelspec: display_name: Python 3 (ipykernel) language: python name: python3

Now the markdown file can execute code cells

```{code-cell}
print("1+1=", 1+1)

>1+1= 2