prev  ( testsuite > Presentation > GeneralLayout > mfrac > mfracSscriptlevel15  )  next

Alternatives: (mml file)  (full) (simple) (plain) (form) (slideshow)
File:Presentation/GeneralLayout/mfrac/mfracSscriptlevel15
CVS-ID:
Author:Robert Miner and Jeff Schaefer, Geometry Technologies
Description:This example tests that <mfrac> interacts properly with the displaystyle attribute. In particular, it should set displaystyle to false for its children, or if it was already false, increase the scriptlevel for its children.

Sample Rendering:

Created by: webeq

Your browser's rendering:

1 2 + 1 2 + 1 1 + x 3 + 1 1 + x 3 + 1 1 + x 3

Source Code:

<math xmlns="http://www.w3.org/1998/Math/MathML"> 
  <mfrac> 
    <mn>1</mn> 
    <mn>2</mn> 
  </mfrac> 
  <mo>+</mo> 
  <mstyle displaystyle="true"> 
    <mfrac> 
      <mn>1</mn> 
      <mn>2</mn> 
    </mfrac> 
  </mstyle> 
  <mo>+</mo> 
  <mfrac> 
    <mn>1</mn> 
    <mrow> 
      <mn>1</mn> 
      <mo>+</mo> 
      <mfrac> 
        <mi>x</mi> 
        <mn>3</mn> 
      </mfrac> 
    </mrow> 
  </mfrac> 
  <mo>+</mo> 
  <mstyle displaystyle="true"> 
    <mfrac> 
      <mn>1</mn> 
      <mrow> 
        <mn>1</mn> 
        <mo>+</mo> 
        <mfrac> 
          <mi>x</mi> 
          <mn>3</mn> 
        </mfrac> 
      </mrow> 
    </mfrac> 
  </mstyle> 
  <mo>+</mo> 
  <mstyle displaystyle="true"> 
    <mfrac> 
      <mn>1</mn> 
      <mrow> 
        <mn>1</mn> 
        <mo>+</mo> 
        <mstyle displaystyle="true"> 
          <mfrac> 
            <mi>x</mi> 
            <mn>3</mn> 
          </mfrac> 
        </mstyle> 
      </mrow> 
    </mfrac> 
  </mstyle> 
</math>