Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

MathML Demo: <mfrac> - fractions

 

 
  1. Inline, auto, normal line sin θ π , numerator and denominator should render script size.
  2. Inline, display style, normal line ln x y , numerator and denominator should render normal size.
  3. Inline, text style, normal line tan θ 67 , numerator and denominator should render script size.
  4. Inline, auto, thick line x 2 + 1 x , the superscripted 2 should be script-script size.
  5. Inline, display style, thick line x - 1 0.98 × 10 2 + y , the superscripted 2 should be script size.
  6. Inline, text style, thick line x 2 + 1 x x 2 + 1 x the end.
  7. Inline, auto, no line x 2 + 1 x the end.
  8. Inline, display style, no line 1.234567 89 + x the end.
  9. Inline, text style, no line x 2 + 1 x the end.
  10. Inline binomial, auto, no line ( 5 8 ) the end.
  11. Inline binomial, display style, no line ( n - k n ) the end.
  12. Inline binomial, text style, no line ( log x y ) the end.
  13. Inline built-in verts, auto, no line | sin θ M | the end.
  14. Inline up arrows, display style, no line sin θ M the end.
  15. Inline down arrows, text style, no line sin θ M the end.
  16. Inline floor, auto, normal line sin θ M the end.
  17. Inline ceiling, display style, normal line sin θ M the end.
  18. Inline updown arrows, text style, normal line sin θ M the end.
  19. Inline double up arrows, auto, thick line sin θ M the end.
  20. Inline double down arrows, display style, thick line sin θ M the end.
  21. Inline double up down arrows, text style, thick line sin θ M the end.
  22. Inline, styles auto, display and text 1 2 - 1 2 + 1.23456 7890 , the rendering should be script-size, normal-size and script-size in this example. Fraction lines should align vertically with the math axis.
  23. The same expression 1 2 - 1 2 + 1.23456 7890 in a display.
  24. Inline fenced nested fractions [ sin θ + 1 11 - x x 2 a 1 ] + [ 1.0 ] etc.
  25. The same expression [ sin θ + 1 11 - x x 2 a 1 ] + [ 1.0 ] in a display.
  26. LaTeX renders continued fractions 1 2 + 1 3 + 1 4 + 1 5 + 1 6 + normal size at all levels in all contexts
  27. 1 2 + 1 3 + 1 4 + 1 5 + 1 6 +
  28. Inline nested fracs 1 6 2 + 1 3 + 1 4 + 1 5 + 1 6 + are script size at the first level and decrease to script script size for all more nested levels.
  29. Displayed nested fractions are normal size at the first level, 1 6 2 + 1 3 + 1 4 + 1 5 + 1 6 + script size at second level, and script-script size at all more nested levels.
  30. HypergeomDist ( x ; M , K , n ) = k = 0 x ( K k ) ( M - K n - k ) ( M n )
  31. Here's a display F ( t , y ) = ( 1 , y t ) ( 1 , y t ) with some real math in it.
  32. And this is an example where the bevelled attribute is set inside the radical y 2 - t 2 1 ( 1 + | y 2 - t 2 | 2 )
  33. And this shows a combination with a background image at a desired opacity

    MathML Background Image

    HTML Content

    <div class="background"></div>
    <math display="block">
    <mrow>
    <msub>
    <mi>Z</mi>
    <mi>&alpha;</mi>
    </msub>
    <mrow>
    <mo>(</mo>
    <mi>f</mi>
    <mo>)</mo>
    </mrow>
    <mo>=</mo>
    
    <mfrac>
    <mn>1</mn>
    <mrow>
    <mn>2</mn>
    <mi>i</mi>
    <mo>&ThinSpace;</mo>
    <mi>cos</mi>
    <mo>(</mo>
    <mfrac>
    <mrow>
    <mi>&alpha;</mi>
    <mi>&pi;</mi>
    </mrow>
    <mn>2</mn>
    </mfrac>
    <mo>)</mo>
    </mrow>
    </mfrac>
    
    <mrow>
    <msub>
    <mo>&int;</mo>
    <mi>C</mi>
    </msub>
    <mfrac>
    <mrow>
    <mi>f</mi>
    <mo stretchy='false'>(</mo>
    <mi>i</mi>
    <mi>z</mi>
    <mo stretchy='false'>)</mo>
    <msup>
    <mrow>
    <mo>(</mo>
    <mo>-</mo>
    <mi>z</mi>
    <mo>)</mo>
    </mrow>
    <mi>&alpha;</mi>
    </msup>
    </mrow>
    <mrow>
    <msup>
    <mi>e</mi>
    <mrow>
    <mn>2</mn>
    <mi>&pi;</mi>
    <mi>z</mi>
    </mrow>
    </msup>
    <mo>-</mo>
    <mn>1</mn>
    </mrow>
    </mfrac>
    </mrow>
    <mi>d</mi>
    <mi>z</mi>
    </mrow>
    </math>

    CSS Content

    [class="background"] {
      background-image: url(https://www.mozilla.org/images/mozilla-banner.gif);
      opacity: 0.2;
      position: absolute;
      left: 0;
      width: 100%;
      height: 58px;
    }
    

     

 

Document Tags and Contributors

Tags: 
 Contributors to this page: fscholz, fred.wang
 Last updated by: fscholz,