Kavin Smk
Kavin Smk

Reputation: 800

View Mathml Equations in browser

I hava a data which is stored in database using Wyris Editor for math equations.

<p><math xmlns="http://www.w3.org/1998/Math/MathML">  
     <mfrac><mn>2</mn><mn>2</mn></mfrac></math></p>

if i echo this data, i need to view it as equation as 2/2..but the chrome browser just shows 22.

How to view this equations?

Upvotes: 0

Views: 1676

Answers (2)

Raniere Silva
Raniere Silva

Reputation: 2697

If i echo

<p><math xmlns="http://www.w3.org/1998/Math/MathML">  
     <mfrac><mn>2</mn><mn>2</mn></mfrac></math></p>

i need to view it as equation as 2/2 but the chrome browser just shows 22.

To have MathML render properly the layout rendering engine used by your web browser need to support MathML. Gecko, used by Firefox, support it. WebKit, used by Chrome < 28, Safari and Epiphany, also support it but most of the time are disable at compilation time. Blink, used by Chrome > 28, does not support MathML at all. Internet Explorer and Edge also does not support MathML.

If you want to have MathML rendering across all web browsers you can use MathJax and you should check their API about adding new MathML elements.

Upvotes: 3

Salix alba
Salix alba

Reputation: 7824

MathJax is the system may websites used. If you have firefox, they can display MathML natively.

Upvotes: 1

Related Questions