micimize / jupyterlab-wikify

Use Markdown-It to render markdown, and implement svgbob and mermaid rendering.
6 stars 0 forks source link

embed variables #2

Open micimize opened 3 years ago

micimize commented 3 years ago

we can programmatically be able to pull markdown from the current notebook and rewrite `{{expressions}} with the context (saving the original text in metadata):

from IPython.display import display, Markdown, Latex
display(Markdown('*some markdown* $\phi$ [[nutrition]]'))
# If you particularly want to display maths, this is more direct:
display(Latex('\phi'))

One massive problem with this would be that going back to editing it would break.

Probably the best way to do it is a reactive wrapper for python symbols and a variable substitution parser on the client that requests the variable from the kernel

micimize commented 3 years ago

we want something like https://github.com/vidartf/jupyterlab-kernelspy to grab a symbol value from the kernel

micimize commented 3 years ago

https://jupyter-client.readthedocs.io/en/stable/messaging.html

agoose77 commented 2 years ago

Related (as a PoC) - https://github.com/agoose77/jupyterlab-imarkdown :)