-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: Support Latex-like math rendering with Typst instead of pdflatex #26098
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
Comments
I doubt that "instead" will ever be the case (too many people rely on and know LaTeX already), but not impossible to add it as an alternative rendering engine. It may want to start as a third-party package though(?). |
Typst is still very new and changing rapidly. I'm not opposed to including it in some way, but think it may not be quite ready for it yet. Typst currently will only output in
pdf is a complicated enough format that extracting vectors out of it is rather challenging, I believe, making that likely a poor candidate for the intermediate form. perhaps in the narrow case of a single page, single equation as it would be here, it is not too bad, but I don't know. Much of the internals for Matplotlib TeX rendering is done via The other implementation detail that I think may be hard to deal with is background color. We want transparent background, but I was unable (in quick testing) to get Typst to do that. PDF doesn't support a transparent background at all, but PNG should be able to (it still had a white background if I set the The ability to have auto sized pages is cool, and may help any Typst implementation avoid some pitfalls of TeX such as #24166 if the bounding box given to us by Typst can be trusted more than the page size of TeX. |
See also #22715 re: alternate TeX-like engines and #4880 (comment) (and the rest of that issue's thread) re: speed. |
Agreed this is basically #22715 and given the state of typst getting something to work that has a parsable dvi-like output seems more likely. |
Problem
Latex compilers are very slow.
Proposed solution
Typst is orders of magnitude faster than any latex compiler (runs in milliseconds) and has a much easier to use syntax than latex (subjective but I think most agree). I'd like to request support for it as a rendering engine for math in figures.
I'm not sure how rendering is currently done, but here's an example of a 0-margin document with math using typst:
Live preview on typst.app
The text was updated successfully, but these errors were encountered: