Re: Ann> maje, a MathML generator

It is nice to see other people writing MathML generators.

In addition to David's comments about the capitalization, I have two
additional comments:

1.  Consider the following input to maje:

{
    a+b+c < d
}

maje generates a single <mrow> for this:
<MATH>  
<MROW>  
  <MI> a </MI>
  <MO> + </MO>
  <MI> b </MI>
  <MO> + </MO>
  <MI> c </MI>
  <MO> &gt; </MO>
  <MI> d </MI>
</MROW>  
</MATH>  

Although this is legal output (once you convert to lower case), it is
not the recommended output mentioned in the spec.  It is preferable to
generate nested <mrow>s that reflect the structure of the expression.
This will allow MathML renderers to do a better job with indentation
and linebreak of larger expressions.  It would be better to output:

<math>  
<mrow>  
  <mrow>  
    <mi> a </mi>
    <mo> + </mo>
    <mi> b </mi>
    <mo> + </mo>
    <mi> c </mi>
  </mrow>  
  <mo> &gt; </mo>
  <mi> d </mi>
</mrow>  
</math>  


Given that you are using a parser, this change should be relatively
easy to implement.  Appendix C (www.w3.org/TR/REC-MathML/appendixC.html)
lists the operators and their default properties, in default order of
increasing precedence.



2.  '<mrow>'s which consist of a single element are equivalent to the
single element.  It is cleaner to output just that element.
Several of your examples have examples of this extra complexity.


As one who does not speak French, let me put in a plug for translating your
documentation into English.  It will probably increase your user base.

	Neil Soiffer

Received on Friday, 16 April 1999 21:02:21 UTC