jupyter-book / jupyterlab-myst

Use MyST Markdown directly in Jupyter Lab
https://jupyter-book.github.io/jupyterlab-myst/
BSD 3-Clause "New" or "Revised" License
146 stars 18 forks source link

🎨 Update for showing exercises #147

Closed rowanc1 closed 1 year ago

rowanc1 commented 1 year ago

@mmcky this PR adds support in JupyterLab-MyST for exercises/solutions. We have also added unknown directives, and fixed a citation.

image

The gated directives should also render in a degraded form, which allows you to have the notebook cells editable in the notebook and then when you use myst/jupyterbook it will stitch them together for rendering.

image

github-actions[bot] commented 1 year ago

Binder :point_left: Launch a Binder on branch executablebooks/jupyterlab-myst/feat/exercise

rowanc1 commented 1 year ago

@agoose77 I will let you have a look if you want in the next few days, but I think this is probably good enough for another patch/minor release. Hopefully easy to merge into your JLab4 branch (minus the yarn-lock).

psychemedia commented 1 year ago

This looks really interesting... Is there any mechanism for being able to style the background of all the exercise cells? Eg in our course materials, which don't use Sphinx exercise, we use cell tags to style all the cells associated with an exercise or activity.

image
agoose77 commented 1 year ago

If we add classes to our rendered exercises, then one can use jupyterlab-plugin-playground to customise the styles in JupyterLab. @rowanc1 thoughts?

psychemedia commented 1 year ago

@agoose77 A minimal JupyterLab extension that pretty much just imports custom CSS can also then be used to apply styling to added classes.

agoose77 commented 1 year ago

@psychemedia that's the thought. Using jupyterlab-plugin-playground allows you to avoid distributing this extension yourself (it can be a simple gist file), but it's the same end result.