Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LateX rendering for outputs #1420

Open
rholinshead opened this issue Mar 8, 2024 · 0 comments
Open

Support LateX rendering for outputs #1420

rholinshead opened this issue Mar 8, 2024 · 0 comments
Labels

Comments

@rholinshead
Copy link
Contributor

From a discord user request -- https://discord.com/channels/1089284610329952357/1090134407588884513/1214807249437065246

It would be neat to update the rendering for outputs to support LateX / math rendering. Ideally we can implement it in the aiconfig editor and propagate the solution to the website.

I time-boxed looking into this and was not able to get it working with a nice solution. I first looked at the ideal solution (as proposed by react-markdown itself): https://github.com/remarkjs/react-markdown?tab=readme-ov-file#use-remark-and-rehype-plugins-math

But, latest version of rehype-katex is not a compatible plugin for the rehypePlugins prop of our current markdown component, and updating our react-markdown package surfaced a lot of errors in the implementation (i.e. we would need to upgrade and refactor/fix before trying rehype-katex plugin). Installing an earlier version of rehype-katex surfaced some other module error (@ungap/structured-clone) which prevented the app from building at all.

There are some other solutions I saw online, like using react-mathjax but it would also require a significant refactor to our markdown component and seems heavy-weight to wrap our markdown plugin with mathjax context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant