patricmutwiri / symja

Automatically exported from code.google.com/p/symja
0 stars 0 forks source link

toMathMl(x^-1) #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
public String getMathMl(String anExpression)
{
        StringWriter stringWriter = new StringWriter();
        new MathMLUtilities(new EvalEngine(),
        false).toMathML(anExpression, stringWriter);
        return stringWriter.toString();
}

getMathMl("x^-1"); or getMathMl("x^(-1)");

Produces:

<math>
    <msup>
        <mi>x</mi>
        <mo>(</mo>
        <mn>-1</mn>
        <mo>)</mo>
    </msup>
</math>

Expected is:
<math>
    <msup>
        <mi>x</mi>
        <mrow>
            <mo>(</mo>
            <mn>-1</mn>
            <mo>)</mo>
        </mrow>
    </msup>

</math>

Using:

commons-logging-1.1.1.jar
google-collect-1.0-rc3.jar
jsr305.jar
log4j-1.2.11.jar
meconsole009.jar

Tested in FireFox 3.6.3

Original issue reported on code.google.com by sanity_...@hotmail.com on 18 Jun 2010 at 5:22

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed with:
http://code.google.com/p/symja/source/detail?r=487

Original comment by axelclk@gmail.com on 20 Jun 2010 at 11:24

GoogleCodeExporter commented 9 years ago

Original comment by axelclk@gmail.com on 20 Jun 2010 at 11:25

GoogleCodeExporter commented 9 years ago
Thanks axelclk!

Original comment by sanity_...@hotmail.com on 20 Jun 2010 at 7:56