W3C home > Mailing lists > Public > www-math@w3.org > January 2012

RE: Styles of using p-MathML

From: Paul Topping <pault@dessci.com>
Date: Tue, 24 Jan 2012 16:06:11 -0800
Message-ID: <8F5CC1B027A79E4EB4DB2154060CF638E20133@DRAKE.corp.dessci>
To: "Wendell P" <wendellp@operamail.com>, <www-math@w3.org>
One of the choices equation editors have to make is whether to generate
MathML that reflects the fonts and styles assigned within their editing
window. This seems to be the choice made by MathMagic whereas Formulator
and MathType (my product) leaves this out. Since the MathML is not
likely to be rendered in a context where those choices make sense or can
be controlled easily, I believe leaving this out makes more sense.
Perhaps MathMagic figures it is best to generate it so you can remove it
if you don't want it.

After a quick glance, MathType and Formulator output look similar.
MathType uses numerical character references (eg, &#x005E;) whereas
Formulator uses character names (eg, &circ;). The names are more
readable but numerical refs are more reliable. To be fair though, &circ;
might be ok everywhere and perhaps Formulator uses numbers for those
references that are not usually supported in web browsers.

Hope this helps.

Paul

> -----Original Message-----
> From: Wendell P [mailto:wendellp@operamail.com]
> Sent: Tuesday, January 24, 2012 3:55 PM
> To: www-math@w3.org
> Subject: Styles of using p-MathML
> 
> I used the MathType, Math+Magic, and Formulator equation editors to
> render this as MathML:
> 
> $$ \hat G^{(T)} = \frac{1}{T} \sum_{t=m+1}^{T} \pi^t $$
> http://img36.imageshack.us/img36/8418/codecogseqn.png
> 
> Below is the slightly cleaned-up code from each. They seem to
represent
> quite different ideas of how things should be done. The different
> versions render the same in most environments I have tried, so I would
> lean toward using the simplest markup, like Formulator. In what
> situations would I want to use heavier markup like Math+Magic?
> 
> --------------------------------
> FORMULATOR
> <math display='block' xmlns='http://www.w3.org/1998/Math/MathML'>
>  <mrow>
>   <msup>
>    <mover>
>     <mi>G</mi>
>     <mo stretchy='true'>&circ;</mo>
>    </mover>
>    <mrow>
>     <mo stretchy='false'>(</mo>
>     <mi>T</mi>
>     <mo stretchy='false'>)</mo>
>    </mrow>
>   </msup>
>   <mo>=</mo>
>   <mfrac>
>    <mn>1</mn>
>    <mi>T</mi>
>   </mfrac>
>   <mrow>
>   <munderover>
>    <mo>&sum;</mo>
>    <mrow>
>     <mi>t</mi>
>     <mo>=</mo>
>     <mi>m</mi>
>     <mo>&plus;</mo>
>     <mn>1</mn>
>    </mrow>
>    <mi>T</mi>
>   </munderover>
>   <msup>
>    <mi>&pi;</mi>
>    <mi>t</mi>
>   </msup>
>   </mrow>
>  </mrow>
> </math>
> --------------------------------
> MATHTYPE
> <math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
>  <mrow>
>   <msup>
>    <mover accent='true'>
>     <mi>G</mi>
>     <mo>&#x005E;</mo>
>    </mover>
>    <mrow>
>     <mo stretchy='false'>(</mo>
>     <mi>T</mi>
>     <mo stretchy='false'>)</mo>
>    </mrow>
>   </msup>
>   <mo>=</mo>
>   <mfrac>
>    <mn>1</mn>
>    <mi>T</mi>
>   </mfrac>
>   <mstyle displaystyle='true'>
>    <munderover>
>     <mo>&#x2211;</mo>
>     <mrow>
>      <mi>t</mi>
>      <mo>=</mo>
>      <mi>m</mi>
>      <mo>+</mo>
>      <mn>1</mn>
>     </mrow>
>     <mi>T</mi>
>    </munderover>
>    <mrow>
>     <msup>
>      <mi>&#x03C0;</mi>
>      <mi>t</mi>
>     </msup>
>    </mrow>
>   </mstyle>
>  </mrow>
> </math>
> 
> --------------------------------
> MATH+MAGIC
> <math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
>  <semantics>
>   <mstyle mathcolor="#000000" mathsize="12.0pt">
>    <msup>
>     <mover>
>      <mi mathvariant="italic">G</mi>
>      <mo accent="true">&#x005E;</mo>
>     </mover>
>     <mrow>
>      <mi mathsize="50.0%">(</mi>
>      <mi mathsize="50.0%" mathvariant="italic">T</mi>
>      <mi mathsize="50.0%">)</mi>
>     </mrow>
>    </msup>
>    <mo>=</mo>
>    <mfrac>
>     <mn>1</mn>
>     <mi mathvariant="italic">T</mi>
>    </mfrac>
>    <mrow>
>    <munderover>
>     <mo>&#x2211;</mo>
>     <mrow>
>      <mi mathsize="50.0%" mathvariant="italic">t</mi>
>      <mo mathsize="50.0%">=</mo>
>      <mi mathsize="50.0%" mathvariant="italic">m</mi>
>      <mo mathsize="50.0%">+</mo>
>      <mn mathsize="50.0%">1</mn>
>      </mrow>
>     <mi mathsize="50.0%" mathvariant="italic">T</mi>
>    </munderover>
>    <msup>
>     <mo mathvariant="italic">&#x03C0;</mo>
>     <mi mathsize="50.0%" mathvariant="italic">t</mi>
>    </msup>
>    </mrow>
>   </mstyle>
>  </semantics>
> </math>
> 
> --
> http://www.fastmail.fm - Email service worth paying for. Try it for
> free
> 
Received on Wednesday, 25 January 2012 00:06:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 January 2012 00:06:45 GMT