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

Add LaTeX rendering support #5265

Open
daweth opened this issue Jun 2, 2022 · 14 comments · May be fixed by #6037
Open

Add LaTeX rendering support #5265

daweth opened this issue Jun 2, 2022 · 14 comments · May be fixed by #6037

Comments

@daweth
Copy link

daweth commented Jun 2, 2022

I'm trying to use excalidraw to express mathematical models more easily.

It's very useful, but lacks in supporting math symbols.

@DanielJGeiger
Copy link
Collaborator

@daweth I have an open PR for exactly this: #2993. While we wait for @dwelle @ad1992 @excalidraw to review #2993, you can use the preview releases. The previews are quite mature; I have used them in my teaching for several semesters now. I would like for #2993 to land in https://excalidraw.com for the convenience of my students.

@OkelleyDevelopment
Copy link

Having just found this epic tool in the last week, I support this ^^

@desk7
Copy link

desk7 commented Aug 30, 2022

I support this!

@DanielJGeiger
Copy link
Collaborator

Review of #2993 is underway. Eg, PR #5449 which @ad1992 just merged was part of #2993. Next up is #5620.

MathJax support per se is stable. Now, I have done a lot of underlying structural work so Excalidraw can properly support such extensions. The review of that underlying work is an ongoing process. Once that concludes, the idea is for MathJax support to live on subdomains of excalidraw.com (like math.excalidraw.com). cc @baptiste

@kunaltyagi
Copy link

kunaltyagi commented Feb 16, 2023

Is there support for exporting diagrams to LaTeX (with math and Tikz)?

https://www.mathcha.io seems quite impressive in what they achieve (corrected link. Thanks cben)

@cben
Copy link

cben commented Feb 21, 2023

^the correct link is https://www.mathcha.io/

No support currently in preview https://math.preview.excalidraw.com/. There is the usual "Save to..." which can export Excalidraw's own JSON, and "Export image..." which can emit PNG or SVG.

The code needed for new formats of export of the existing vector drawings is very different from rendering math, which this issue was about (though I agree the title here is ambiguous).
So I recommend openning a separate issue.

@PGreatness
Copy link

I support this! This would be really helpful for creating diagrams for physics classes.

@Dentarthurdent42
Copy link

I would find this incredibly useful. I suppose I could brush up on my JS

@DanielJGeiger
Copy link
Collaborator

Use #5265 to report any bugs you find while using https://math.preview.excalidraw.com/. Comments posted here are easier to track while #6037 awaits thorough review.

Interested parties may also test previews of #6037 at the deployment of #6936 before they arrive at https://math.preview.excalidraw.com/.

@DanielJGeiger DanielJGeiger changed the title Add LaTeX support Add LaTeX rendering support Sep 23, 2023
@DanielJGeiger
Copy link
Collaborator

@juliosilvaebx In response to your question in #6037 (comment), I believe the size-check failures are due to a current bug in the GH action.

@juliosilvaebx
Copy link

Thank you @DanielJGeiger! I thought that's what's been stalling this issue. I have to commend you for the extensive work you've expended into this feature.

@DanielJGeiger
Copy link
Collaborator

Thank you @juliosilvaebx. Do report any bugs you might find here. I think I've pretty much fixed them already, having used #2993/#6037 in my classrooms for two and a half years. But let me know if I overlooked something.

@krzentner
Copy link

Use #5265 to report any bugs you find while using https://math.preview.excalidraw.com/.
Thanks for working on this! Having Math support directly in excalidraw would be very helpful.

I noticed a small bug today: When typing in "Mixed Text" mode, the rendering of the text box would move over after each typed character.

I was also a little bit surprised by how the math tool and text tool interact. I was expecting the Math tool to be separate from the text tool, but instead it toggles whether the next created text will have the "font family" control or the "math mode" control.

@DanielJGeiger
Copy link
Collaborator

@krzentner Thank you for the report! Are you using a high-density screen (eg HiDPI/Retina)?

You are correct that the "math tool" is not a tool per se, but rather a subtype toggle. Excalidraw permits pasting clipboard text directly, without editing existing text. The subtype toggle allows automatically interpreting pasted text as LaTeX-enabled.

You raise a good point about subtype toggles resembling regular tools in their current placement. I have pushed a commit to the LaTeX staging branch (#6936) to address this.

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

Successfully merging a pull request may close this issue.

10 participants