LinwoodDev / Butterfly

🎨 Powerful, minimalistic, cross-platform, opensource note-taking app
https://butterfly.linwood.dev
GNU Affero General Public License v3.0
948 stars 62 forks source link

[Enhancement]: Latex Support #725

Open jianlong-liu opened 1 month ago

jianlong-liu commented 1 month ago

Which feature is your request related to?

markdown

Describe your request for enhancements!

When text is wrapped by $ or $$, render it in Latex (either through Katex or MathJax).

Additional context

No response

Code of Conduct

CodeDoctorDE commented 1 month ago

Good idea. Maybe also add it in rich text mode, but I'm currently not sure how

CodeDoctorDE commented 1 month ago

I searched a bit how we could make it and found this:

Adding a javascript engine could also help the app adding new libraries, maybe enhancing the current pdf status. Then we could use pdf.js directly and support more features. But it also adds up the app size (~ 5mb)

axiomtutor commented 2 weeks ago

Just a note (not sure if notes like this are appreciated or annoying?):

I would make heavy use of LaTeX if it were available. I'm planning on using Butterfly to make a collection of math courses on YouTube.

CodeDoctorDE commented 2 weeks ago

Yeah, I'm currently evaluating how I could add it on all platforms without having any difference. I think the javascript version with katex is the best option on all platforms combined with https://crates.io/crates/boa_engine. I'm just thinking if this could also be the option to add extension support for butterfly.

axiomtutor commented 2 weeks ago

If I understood these things more deeply I'd offer to help -- but I think all I can do is promise to test it if you ever get it working! In any case I appreciate the work.

But I've used KaTeX directly in web pages and it works great. So if it can be integrated, I'd be very happy with that.