Skip to content

Commit

Permalink
Merge pull request #149 from stargaser/markdown-nb-instructions
Browse files Browse the repository at this point in the history
Add a section about handling Markdown notebooks
  • Loading branch information
bsipocz authored Dec 13, 2023
2 parents 6eb2209 + e6b539b commit 7997ff6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions 00_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,33 @@ From the directory containing the notebooks:
```console
jupyter lab
```

## 8. Handling Notebooks in MyST-Markdown format

The Jupyter notebooks in this repository are in
[MyST-Markdown format](https://myst-nb.readthedocs.io/en/v0.13.2/use/markdown.html).
The [jupytext](https://jupytext.readthedocs.io/en/latest/index.html) package is
included in your `navo-env` environment to work with these notebooks. Note that
the `jupytext` package has to be installed before your Jupyterlab session starts.

To open one of these notebooks (in the `content/reference_notebooks` and the
`content/use_case_notebooks` subdirectories), in the Jupyterlab file panel,
right-click on the notebook, choose "Open With", and select "Notebook" or
"Jupytext Notebook" from the drop-down menu. See the screenshot below.

![Right-click on Markdown notebook](_static/jupytext_rightclick.png "Open With Notebook")

It is possible to change your Jupyterlab settings to allow double-clicking on a
Markdown notebook to open automatically as a Jupytext Notebook. In Jupyterlab,
navigate from the top-level menu item "Settings" and select "Settings Editor"
in the drop-down. In the left sidebar of the Setting Editor tab, select
"Document Manager". The display should look like the image included below. In
the "Default Viewers" section, add a `newKey` of `markdown` and a `New Value`
of `Jupytext Notebook`. This will allow a double-click to open the Markdown
notebooks appropriately.

![Jupyterlab Document Manager settings](_static/jupytext_settings.png "Open Notebooks with Jupytext")

## Additional Resources

- [Set up git](https://help.github.com/articles/set-up-git/)
Expand Down
Binary file added _static/jupytext_rightclick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/jupytext_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7997ff6

Please sign in to comment.