Monday, December 14, 2015

When it comes to MathML, Firefox does a much better job than Microsoft Edge

This is just the view point looking at just one example and must not be construed to apply to whole of MathML. You may review some basic MathML information here.

Here is an example of displaying a matrix using the presentation elements of MathML. Browsers do not support MathML the same way, some do better than others. Generally speaking browsers that support HTML5 should support MathML to some extent. This post considers only the latest versions of Firefox and Microsoft Edge at present.

This page can be hosted on a web server(in this case on the local ISS, IIS Version 10.0.10586) on Windows 10 Pro)

<!DOCTYPE html>
<html>
<head><!--<script src="http://fred-wang.github.io/mathml.css/mspace.js"></script>-->
<title>Page Title</title>
</head>
<body>

<h1>Matrix Display with MathML </h1>
<p>Matrix A</p>
 <math>
      <mrow>
  <mi>A</mi>
  <mo>=</mo>
  <mfenced open='['; close=']'>
    <mtable>
      <mtr>
         <mtd><mi>x</mi></mtd>
         <mtd><mi>y</mi></mtd>
      </mtr>
      <mtr>
         <mtd><mi>z</mi></mtd>
         <mtd><mi>w</mi></mtd>
      </mtr>
    </mtable>
  </mfenced>
</mrow>
    </math>

</body>
</html>

This is a very simple page but there are differences how the browsers display them. The MathML is highlighted in yellow in the HTML page.

Firefox 42
Firefox displays as shown here without any modification. This is the correct way of displaying a matrix.




Microsoft Edge 25

The HTML code used as is (with the <script/> item commented out) will display as shown.

 

This one with <script/> included:

No comments:

DMCA.com Protection Status