jupyterlab-myst icon indicating copy to clipboard operation
jupyterlab-myst copied to clipboard

Support include & literalinclude

Open nthiery opened this issue 2 years ago • 4 comments

The literalinclude directive offered by myst-parser and sphinx -- with its subsection selection mechanisms (start-after, ...) -- is very handy in teaching context for displaying fragments of code, while maintaining these fragments in code files together with tests. This guarantees that the fragments are actually correct; a desirable feature in general which becomes critical when authoring exams.

Proposal

Support the same feature in jupyterlab-myst.

nthiery avatar Sep 15 '23 22:09 nthiery

Thanks @nthiery - I have added the first part of the directive that works with the MyST CLI. There is still a bit more work to do to bring it over to jupyter lab.

All of the start-at/after, lines, lineno-match etc. are now implemented as well.

rowanc1 avatar Sep 19 '23 18:09 rowanc1

Oh wow, that was amazingly quick!

nthiery avatar Sep 19 '23 19:09 nthiery

Hey! any updates with this issue?

agatafilipczak avatar Feb 14 '24 08:02 agatafilipczak

I'd like to +1 on this request, would be a very helpful addition indeed
from the referenced issues and PRs it feels like most of the heavy lifting has been done, when can we expect this to be widely available ?

as far as I can tell, I can use the literalinclude directive in jupyter-book (although it renders without the filename, but that's a minor issue), but in jupyterlab it just silently renders nothing..

parmentelat avatar May 01 '24 10:05 parmentelat