qwt-mml-dev icon indicating copy to clipboard operation
qwt-mml-dev copied to clipboard

Unable to load partial derivatives dx/dy in FormulaView *d_view

Open ganimede opened this issue 6 years ago • 1 comments

Hi, for some reason the dx/dy doesn't load properly with this mathml expression:

<math>
    <mrow>
        <mrow>
            <mfrac>
                <mrow>
                    <mo>
                         &part;
                    </mo>
                     <mi>
                         f
                     </mi>
                </mrow>
                <mrow>
                    <mo>
                        &part;
                    </mo>
                    <mi>
                        x
                   </mi>
                </mrow>
           </mfrac>
        </mrow>
    </mrow>
</math>

This is what i'm seeking to achieve: Image of Derivative

but this is what I get: Image of Derivative

Any help would be greatly appreciated, thank you!

ganimede avatar Jan 21 '19 01:01 ganimede

Hi @ganimede. Your MathML code contains some entity references (&part;) and QDomDocument, which is used to read your MathML code, doesn't recognise it as such. You can see that by loading your code in Qt's simpledommodel example:

screen shot 2019-01-22 at 9 52 07 am

As you can see, &part; is considered as being the element part rather than the entity reference &part;.

So, although qwt-mml does recognise &part; (see here), I must confess that I don't know how to get QDomDocument to recognise them, assuming that it can be done at all.

agarny avatar Jan 21 '19 21:01 agarny