Display Math Equations (Without extensions)

IMPORTANT UPDATE: I have implemented KaTeX in the Markdown guide.
I recommend following this to have a tool that renders everything.


Thanks to a post from another user here in the community,

I studied a way to display complex mathematical equations in a Kodular app :nerd_face:, and I thought it might be helpful to share with the community.


I’ve found a solution using WebViewer.EvaluateJS and :raising_hands:KaTeX:raising_hands:, with no extra extensions required and a very small footprint, the entire setup takes up less than 1MB of space!

This allows you to render advanced math expressions (fractions, roots, integrals, powers, etc.) beautifully and efficiently inside your app.
Everything runs locally or with minimal external resources, so it’s fast and lightweight.


Examples

immagine

immagine

immagine


Please note, I’m not an expert in Kodular, HTML, or JavaScript, so if you spot any mistakes or improvements, I’m open to advice and ready to make corrections :heart_hands:.


This is probably a terrible solution, I know, but I really couldn’t find another way to prevent Kodular from messing up with \n \r \t characters. It might just be my lack of knowledge, maybe there’s a smarter way (without extensions).
I apologize in advance for this mess :sweat_smile:.


This project contains several examples to demonstrate the full potential of this approach.
MathEquationsWE.aia (409.3 KB)


KaTeX supported functions

KaTeX documentations

4 Likes

Great work man​:clap::clap::clap: