0

I would like to know a method to write a mathematical formula in angular. Specifically:

a) How to include non-English characters? b) How to include multi-line text (above and below the 'divided by' symbol)

I came across MathML. However, there are a lot of markups involved to write a formula. I would like to know if there is an 'angular' way of handing mathematical formula?

I would like to visualise the formula in a webpage, and not execute it.

Vinay
  • 88
  • 1
  • 10
  • 2
    Use Typescript? – Natasha Kurian Dec 05 '20 at 07:03
  • Could you elaborate on what exactly you want to achieve? Do you want to visualize math formulas or execute math formulas? Where exactly do you get stuck? What formulas do you want to calculate/visualize? – Ruben Szekér Dec 05 '20 at 07:14
  • Thank you @NatashaKurian. Can you tell me how to use typescript for this? – Vinay Dec 05 '20 at 07:17
  • @RubenSzekér, I would like to visualise a mathematical formula, not execute it. – Vinay Dec 05 '20 at 07:18
  • Thank you @RubenSzekér, I haved edited the question to include the word visualise. – Vinay Dec 05 '20 at 07:26
  • 1
    You gave the answer yourself: There’s MathML to express a formular. And for non-English characters, you have the whole world of Unicode at your hands. – lxg Dec 05 '20 at 08:42
  • Thank you @lxg. I will use Unicode for the non-English characters. I found that MathML is not supported by many browsers (https://caniuse.com/mathml). Is MathML a good solution? – Vinay Dec 05 '20 at 09:01
  • 1
    Well, then use either a polyfill (if it works good enough for your use case), or SVG or a PNG screenshot as alternative content. Come on, do some research on your own, you’re not the first person with this problem. – lxg Dec 05 '20 at 09:04
  • 1
    Are you looking for a Mathjax? take a look to this SO: https://stackoverflow.com/questions/55125544/mathjax-in-angular-6 or this another link https://medium.com/kongsberg-digital/how-to-render-mathml-in-browser-using-angular-and-mathjax-3-along-with-lazy-loading-83f791911cfd – Eliseo Dec 05 '20 at 11:17
  • Thank you @Eliseo, the links are useful. – Vinay Dec 05 '20 at 13:23

0 Answers0