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

MathJax subset to PNG #1199

Open
rgbkrk opened this issue May 30, 2024 · 1 comment
Open

MathJax subset to PNG #1199

rgbkrk opened this issue May 30, 2024 · 1 comment
Labels
support A support query, not a bug report

Comments

@rgbkrk
Copy link

rgbkrk commented May 30, 2024

I'm working on Jupyter notebook support in Zed (zed-industries/zed#9778). I know many researchers that would love to have math formatting via $$. The best interface for me to use in GPUI (what Zed is written with) would be a function that takes a &str and returns raw PNG data. That PNG data can be a Vec<u8> or an ImageBuffer from the image crate. As an example, check out crates/repl/src/outputs.rs from zed-industries/zed#12062.

Is there a subset here that would be on par with MathJax, at least at the level supported in Jupyter notebooks?

@CraftSpider
Copy link
Contributor

I believe using the in-memory IO provider should allow you to drive the engine without doing any file IO. That should allow you to generate a PDF file as a Vec<u8>, after which you would need to use an in-memory PDF-to-image converter.

If you try this and find any APIs lacking, please follow up here or in a new issue with the problems you ran into.

@CraftSpider CraftSpider added the support A support query, not a bug report label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support A support query, not a bug report
Projects
None yet
Development

No branches or pull requests

2 participants