jsvine / notebookjs

Render Jupyter/IPython notebooks on the fly, in the browser. (Or on the command line, if you'd like.)
MIT License
274 stars 48 forks source link

Render Latex in text/latex output fields #48

Closed roman-mibex-2 closed 8 months ago

roman-mibex-2 commented 1 year ago

Latex in Markdown fields is already converted. Do the same conversion for text/latex output fields, if the Katex AutoConvert library is present.

roman-mibex-2 commented 1 year ago

Alternatives not taken: My first attempt was to make the Latex function user configurable, so a library user can plug in the Latex renderer. Then I've noticed that the library already does Katex/AutoKatex detection and support. So, if feels more natural to build upon that support, instead of each library user having to wire up functions.

Note: This contains the XSS fix of this PR https://github.com/jsvine/notebookjs/pull/47. Can rebase it against that if that is merged first.