# MathML Demo: <mfrac> - fractions

1. Inline, auto, normal line $\frac{{\mathrm{sin}}\theta }{\pi }$, numerator and denominator should render script size.
2. Inline, display style, normal line $\frac{{\mathrm{ln}}x}{y}$, numerator and denominator should render normal size.
3. Inline, text style, normal line $\frac{{\mathrm{tan}}\theta }{67}$, numerator and denominator should render script size.
4. Inline, auto, thick line $\genfrac{}{}{1pt}{}{{x}^{2}+1}{x}$, the superscripted 2 should be script-script size.
5. Inline, display style, thick line $\genfrac{}{}{1pt}{}{x-1}{0.98×{10}^{2}+y}$, the superscripted 2 should be script size.
6. Inline, text style, thick line $\genfrac{}{}{1pt}{}{{x}^{2}+1}{x}\genfrac{}{}{1pt}{}{{x}^{2}+1}{x}$ the end.
7. Inline, auto, no line $\genfrac{}{}{0}{}{{x}^{2}+1}{x}$ the end.
8. Inline, display style, no line $\genfrac{}{}{0}{}{1.234567}{89+x}$ the end.
9. Inline, text style, no line $\genfrac{}{}{0}{}{{x}^{2}+1}{x}$ the end.
10. Inline binomial, auto, no line $\left(\genfrac{}{}{0}{}{5}{8}\right)$ the end.
11. Inline binomial, display style, no line $\left(\genfrac{}{}{0}{}{n-k}{n}\right)$ the end.
12. Inline binomial, text style, no line $\left(\genfrac{}{}{0}{}{{\mathrm{log}}x}{y}\right)$ the end.
13. Inline built-in verts, auto, no line $|\genfrac{}{}{0}{}{{\mathrm{sin}}\theta }{M}|$ the end.
14. Inline up arrows, display style, no line $↑\genfrac{}{}{0}{}{{\mathrm{sin}}\theta }{M}↑$ the end.
15. Inline down arrows, text style, no line $↓\genfrac{}{}{0}{}{{\mathrm{sin}}\theta }{M}↓$ the end.
16. Inline floor, auto, normal line $⌊\frac{{\mathrm{sin}}\theta }{M}⌋$ the end.
17. Inline ceiling, display style, normal line $⌈\frac{{\mathrm{sin}}\theta }{M}⌉$ the end.
18. Inline updown arrows, text style, normal line $↕\frac{{\mathrm{sin}}\theta }{M}↕$ the end.
19. Inline double up arrows, auto, thick line $⇑\genfrac{}{}{1pt}{}{{\mathrm{sin}}\theta }{M}⇑$ the end.
20. Inline double down arrows, display style, thick line $⇓\genfrac{}{}{1pt}{}{{\mathrm{sin}}\theta }{M}⇓$ the end.
21. Inline double up down arrows, text style, thick line $⇕\genfrac{}{}{1pt}{}{{\mathrm{sin}}\theta }{M}⇕$ the end.
22. Inline, styles auto, display and text $\frac{1}{2}-\frac{1}{2}+\frac{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 $\left[\frac{\parallel \frac{{\mathrm{sin}}\theta +1}{11}\parallel -x}{\frac{{x}^{2}}{{a}_{1}}}\right]+\left[1.0\right]$ etc.
25. The same expression $[ ∥ sin ⁡ θ + 1 11 ∥ - x x 2 a 1 ] + [ 1.0 ]$ in a display.
26. LaTeX renders continued fractions $\frac{1}{\sqrt{2}+\frac{1}{\sqrt{3}+\frac{1}{\sqrt{4}+\frac{1}{\sqrt{5}+\frac{1}{\sqrt{6}+\dots }}}}}$ normal size at all levels in all contexts
27. $1 2 + 1 3 + 1 4 + 1 5 + 1 6 + …$
28. Inline nested fracs $\frac{{1}^{\sqrt{6}}}{\sqrt{2}+\frac{1}{\sqrt{3}+\frac{1}{\sqrt{4}+\frac{1}{\sqrt{5}+\frac{1}{\sqrt{6}+\dots }}}}}$ 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>
[/itex]```

### CSS Content

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