How to make MathML 's "×" work in a .xml file

27 Views Asked by At

When I use MathML in the main body of my HTML file, it works 100% of the time in my Chrome browser.

But for some unknown reason, when I put the code into an .xml file and create a link to it from the HTML file, it doesn't work properly.

Code for link:

<p> <object type="image/svg+xml" data="MathMLfile.xml"></object></p>

One example is: If I use

<mo>&times;</mo> or <mo>×</mo> or <mo>&# 215;</mo> 

an error occurs.

Is it because I use Chrome? Or is it because MathML always works better/properly in Firefox?

An example of working code is:

<math>
  <mrow>
    <mfrac linethickness="1">
      <mrow>
        <mn>10</mn>
        <mo>&#215;</mo>
        <mn>10</mn>
      </mrow>
      <mrow>
        <mn>2</mn>
      </mrow>
    </mfrac>
    <mo>=</mo>
    <mn>50</mn>
  </mrow>
</math>

Here the &#215; creates an error when it's in an .xml file but not when it's in the HTML body.

0

There are 0 best solutions below