Search code examples
parenthesesfractionsmathml

Fraction including parentheses in MathmL


How can I make the fraction like the second formula?

my sample formula

  <math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>D</mi><mi>e</mi></msub><mo>=</mo><mrow><mn>1</mn><mo>,</mo><mn>3</mn></mrow><mi>&middot;</mi><mfrac><mfenced><msup><mrow><mi>a</mi><mo>&middot;</mo><mi>b</mi></mrow><mn>0,625</mn></msup></mfenced><msup><mfenced><mrow><mi>a</mi><mo mathsize="small">+</mo><mi>b</mi></mrow></mfenced><mn>0,25</mn></msup></mfrac><mtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [m]</mtext><mtext mathcolor="DodgerBlue"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Formel 1.3</mtext>
    </math> 

Solution

  • <math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
    <mrow>
    <msub><mi>D</mi><mi>e</mi></msub>
    <mo>=</mo>
    <mn>1,3</mn>
    <mo>.</mo>
    <mfrac>
    <mrow><mo stretchy="false" form="prefix">(</mo><mi>a</mi><mo>.</mo><mi>b</mi><msup><mo stretchy="false" form="postfix">)</mo><mn>0,625</mn></msup></mrow>
    <mrow><mo stretchy="false" form="prefix">(</mo><mi>a</mi><mo>+</mo><mi>b</mi><msup><mo stretchy="false" form="postfix">)</mo><mn>0,25</mn></msup></mrow>
    </mfrac>
    </mrow>
    </math>