Skip to content

Instantly share code, notes, and snippets.

@laclefyoshi
Created October 13, 2012 06:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laclefyoshi/3883443 to your computer and use it in GitHub Desktop.
Save laclefyoshi/3883443 to your computer and use it in GitHub Desktop.
an example of MathML
<?xml version="1.0" encoding="UTF-8"?>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mtable>
<mtr>
<mtd>
<mrow>
<mrow>
<msup>
<mfenced open="(" close=")">
<mrow>
<mrow>
<mn>1</mn>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>2</mn>
</mrow>
</mfrac>
</mrow>
</mrow>
</mfenced>
<mrow>
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">=</mo>
<mrow>
<mrow>
<mn>1</mn>
<mo stretchy="false">+</mo>
<mi>x</mi>
</mrow>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<mn>4</mn>
</mrow>
</mfrac>
</mrow>
</mrow>
<msup>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>2</mn>
</mrow>
</msup>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mrow>
<msup>
<mfenced open="(" close=")">
<mrow>
<mrow>
<mn>1</mn>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>3</mn>
</mrow>
</mfrac>
</mrow>
</mrow>
</mfenced>
<mrow>
<mn>3</mn>
</mrow>
</msup>
<mo stretchy="false">=</mo>
<mrow>
<mrow>
<mn>1</mn>
<mo stretchy="false">+</mo>
<mi>x</mi>
</mrow>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<mn>3</mn>
</mrow>
</mfrac>
</mrow>
</mrow>
<mrow>
<msup>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<mn>27</mn>
</mrow>
</mfrac>
</mrow>
<msup>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>3</mn>
</mrow>
</msup>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mrow>
<msup>
<mfenced open="(" close=")">
<mrow>
<mrow>
<mn>1</mn>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>4</mn>
</mrow>
</mfrac>
</mrow>
</mrow>
</mfenced>
<mrow>
<mn>4</mn>
</mrow>
</msup>
<mo stretchy="false">=</mo>
<mrow>
<mrow>
<mn>1</mn>
<mo stretchy="false">+</mo>
<mi>x</mi>
</mrow>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mn>3</mn>
</mrow>
<mrow>
<mn>8</mn>
</mrow>
</mfrac>
</mrow>
</mrow>
<mrow>
<msup>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<mn>16</mn>
</mrow>
</mfrac>
</mrow>
<mrow>
<msup>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>3</mn>
</mrow>
</msup>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<mn>256</mn>
</mrow>
</mfrac>
</mrow>
<msup>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>4</mn>
</mrow>
</msup>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mi/>
<mo stretchy="false">⋮</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mrow>
<msup>
<mfenced open="(" close=")">
<mrow>
<mrow>
<mn>1</mn>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>100</mn>
</mrow>
</mfrac>
</mrow>
</mrow>
</mfenced>
<mrow>
<mn>100</mn>
</mrow>
</msup>
<mo stretchy="false">=</mo>
<mrow>
<mrow>
<mn>1</mn>
<mo stretchy="false">+</mo>
<mi>x</mi>
</mrow>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<mrow>
<mrow>
<mn>2</mn>
</mrow>
<mo stretchy="false">!</mo>
</mrow>
</mrow>
</mfrac>
</mrow>
</mrow>
<mfenced open="(" close=")">
<mrow>
<mfrac>
<mrow>
<mn>99</mn>
</mrow>
<mrow>
<mn>100</mn>
</mrow>
</mfrac>
</mrow>
</mfenced>
<mrow>
<msup>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>2</mn>
</mrow>
</msup>
<mo stretchy="false">+</mo>
<mfrac>
<mrow>
<mn>1</mn>
</mrow>
<mrow>
<mrow>
<mrow>
<mn>3</mn>
</mrow>
<mo stretchy="false">!</mo>
</mrow>
</mrow>
</mfrac>
</mrow>
<mfenced open="(" close=")">
<mrow>
<mrow>
<mrow>
<mfrac>
<mrow>
<mn>99</mn>
</mrow>
<mrow>
<mn>100</mn>
</mrow>
</mfrac>
</mrow>
<mo stretchy="false">⋅</mo>
<mrow>
<mfrac>
<mrow>
<mn>98</mn>
</mrow>
<mrow>
<mn>100</mn>
</mrow>
</mfrac>
</mrow>
</mrow>
</mrow>
</mfenced>
<mrow>
<msup>
<mrow>
<mi>x</mi>
</mrow>
<mrow>
<mn>3</mn>
</mrow>
</msup>
<mo stretchy="false">+</mo>
<mo stretchy="false">⋯</mo>
</mrow>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mrow>
<mi/>
<mo stretchy="false">⋮</mo>
</mrow>
</mtd>
</mtr>
</mtable>
<annotation encoding="StarMath 5.0">left (1 + {x} over {2} right )^{2} = 1 + x + {1} over {4}{x}^{2}
newline
left (1 + {x} over {3} right )^{3} = 1 + x + {1} over {3}{x}^{2} + {1} over {27}{x}^{3}
newline
left (1 + {x} over {4} right )^{4} = 1 + x + {3} over {8}{x}^{2} + {1} over {16}{x}^{3} + {1} over {256}{x}^{4}
newline
~~dotsvert
newline
left (1 + {x} over {100} right )^{100} = 1 + x + {1} over {fact {2}}left ({99} over {100} right ){x}^{2} + {1} over {fact {3}}left ({{99} over {100}} cdot {{98} over {100}} right ){x}^{3} + dotsaxis
newline
~~dotsvert
</annotation>
</semantics>
</math>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment