excalidraw icon indicating copy to clipboard operation
excalidraw copied to clipboard

Add LaTeX support

Open daweth opened this issue 2 years ago • 6 comments

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

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

daweth avatar Jun 02 '22 07:06 daweth

@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.

DanielJGeiger avatar Jun 02 '22 17:06 DanielJGeiger

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

OkelleyDevelopment avatar Jun 09 '22 16:06 OkelleyDevelopment

I support this!

desk7 avatar Aug 30 '22 09:08 desk7

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

DanielJGeiger avatar Aug 30 '22 18:08 DanielJGeiger

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)

kunaltyagi avatar Feb 16 '23 08:02 kunaltyagi

^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.

cben avatar Feb 21 '23 09:02 cben

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

PGreatness avatar Sep 21 '23 12:09 PGreatness

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

Dentarthurdent42 avatar Sep 23 '23 03:09 Dentarthurdent42

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 avatar Sep 23 '23 15:09 DanielJGeiger

@juliosilvaebx In response to your question in https://github.com/excalidraw/excalidraw/pull/6037#issuecomment-1732410340, I believe the size-check failures are due to a current bug in the GH action.

DanielJGeiger avatar Sep 24 '23 20:09 DanielJGeiger

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.

juliosilvaebx avatar Oct 04 '23 19:10 juliosilvaebx

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.

DanielJGeiger avatar Oct 12 '23 01:10 DanielJGeiger

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.

krzentner avatar Nov 12 '23 09:11 krzentner

@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.

DanielJGeiger avatar Nov 22 '23 17:11 DanielJGeiger