microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.02k stars 28.79k forks source link

Custom Markdown Math Mode renderer #228644

Closed reteps closed 2 weeks ago

reteps commented 2 weeks ago

Problem: I want to create a Python notebook (.ipynb) alongside Typst instead of LaTeX.

Research: Polyglot notebooks (.NET interactive) doesn't support Typst either, and would be harder to add support there.

VSCode uses KaTeX to provide Math Mode rendering inside markdown. I am asking for the ability to hook into the renderWithKatex(math_text) call in markdown mode.

Alternatively, any solution in which I would be able to:

At the same time.

image

mjbvz commented 2 weeks ago

This is possible using a markdown notebook extension (this is how the katex rendering is also implemented). See https://github.com/microsoft/vscode-extension-samples/tree/main/notebook-extend-markdown-renderer-sample for an example