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

support {glue} directive

Open marnec opened this issue 3 years ago • 2 comments

Context

The {glue} role directive let you reference computed content from code cells to markdown cells across multilpe documents

Proposal

{glue} directive used in markdown cells show content that was glued in code cells.

I would suggest to initially constraint references to same-notebook as it seems to me that cross-notebook references would add to much complexity

Tasks and updates

No response

marnec avatar Jun 10 '22 17:06 marnec

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar Jun 10 '22 17:06 welcome[bot]

I think, in theory, we can implement glue within jupyterlab-myst, particularly within the current notebook. Doing something for all notebooks would be more work - we'd probably need a server extension and have to deal with state management.

To support per-notebook glue, we would want to walk the outputs of the current notebook, and to do that the Markdown renderer would need this context. This is possible, but it might be a bit hacky. I won't be able to work on it any time soon, though.In the mean time, eval does work, which might be an acceptable stop gap.

agoose77 avatar Jun 11 '22 12:06 agoose77