Re: getting started with MathML; clueless and having problems.

gjovaag <[email protected]> Sat, 27 Dec 2008 13:07:06 -0800 (PST)
Newsgroups gmane.comp.mozilla.devel.mathml
Organization http://groups.google.com
Message-ID <37665108-8546-4463-9977-418fca97a0c3@d42g2000prb.googlegroups.com>
On Dec 26, 4:34 pm, gjovaag <[email protected]> wrote:
> I am trying to create a .htm file with imbedded MathML and render it
> with FireFox 3.0.5.  I checked that this browser was MathML enabled by
> running the sample files suggested inhttp://www.w3.org/Math/XSL/and
> they rendered properly.
>
> I downloaded the requested files mathml.xsl, pmathml.xsl, ctop.xsl and
> pmathmlcss.xsl and copied the source of the filehttp://www.w3.org/Math/XSL/pmathml2.xml
> onto my local machine.  I modified the stylesheet declaration in the
> source to be
>
> <?xml-stylesheet type="text/xsl" href="mathml.xsl"?>
>
> as suggested by the  http://www.w3.org/Math/XSL/page.  I also
> installed the STIX fonts on my machine (Windows XP Professional, 2002,
> Service Pack 2).
>
> When I invoke the modified source file, the equations do not render
> properly.  Specifically the simple example with brackets and
> superscripts renders as a+b260+a+bi.
>
> I have almost no information to begin diagnosing the problem, so I
> appeal to wiser minds to give me a gentle pointer to where to start.
>
> Thanks.
>
>   Jack Gjovaag


For clarification, the contents of the file I am trying to render is
as follows:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="pmathml.xsl"?>
<!--
Copyright David Carlisle 2001, 2002.

Use and distribution of this code are permitted under the terms of the
<a
href="http://www.w3.org/Consortium/Legal/copyright-software-19980720"
>W3C Software Notice and License</a>.
-->
<!--
  pref:renderer="techexplorer-plugin"
  pref:renderer="techexplorer"
  pref:renderer="css"
  pref:renderer="mathplayer"
  pref:renderer="mathplayer-dl"
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html" />
  <title>Presentation Examples</title>
</head>

<body>
<h2>Can your browser display Presentation MathML?</h2>

<p>Below you should see an equation inlined within some text</p>

<p>some text, some text,
<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow>
    <msup>
      <mfenced open="[" close="]">
        <mrow>
          <mi>a</mi>
          <mo>+</mo>

          <mi>b</mi>
        </mrow>
      </mfenced>
      <mn>260</mn>
    </msup>
    <mo>+</mo>
    <msub>

      <mfenced open="{" close="}">
        <mrow>
          <mi>a</mi>
          <mo>+</mo>
          <mi>b</mi>
        </mrow>
      </mfenced>

      <mi>i</mi>
    </msub>
  </mrow>
</math>
 some text.</p>

<p>This picture shows a possible rendering of it:</p>

<p><img src="snapshot1.png" alt="Snapshot of formula above" /></p>

<p>Below is an equation with a radical:</p>

<p>
<math xmlns="http://www.w3.org/1998/Math/MathML">
  <msup>
    <msqrt>
      <mrow>
        <mi>a</mi>
        <mo>+</mo>

        <mi>b</mi>
      </mrow>
    </msqrt>
    <mn>27</mn>
  </msup>
</math>
</p>

<p>a rendering of which is shown below:</p>

<p><img src="snapshot2.png" alt="Rendering of example 2" /></p>

<p>If your browser displays those equations correctly, it is enabled
to
display Presentation MathML.</p>

<hr />
<img src="/Math/mathmlSmall.png" alt="MathML inside!"/>
</body>
</html>

This is the example file mentioned above in http://www.w3.org/Math/XSL
except that the second line has been changed to
<?xml-stylesheet type="text/xsl" href="pmathml.xsl"?>
since this seems to be the recommended approach when I am trying to
render a file offline.

  Jack Gjovaag