Skip to content

Instantly share code, notes, and snippets.

@aplaice
Created March 9, 2019 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aplaice/266b092bc48afbbdd46cdbd0ca811da8 to your computer and use it in GitHub Desktop.
Save aplaice/266b092bc48afbbdd46cdbd0ca811da8 to your computer and use it in GitHub Desktop.
Slightly nicer

The original source is on wikipedia. Unicode and named entities are used instead of hex entities with comments. (A unicode character could also have been used for InvisibleTimes, but it would not be readable.)

<math mode="display" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mi>x</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mo form="prefix">−</mo>
<mi>b</mi>
<mo>±</mo>
<msqrt>
<msup>
<mi>b</mi>
<mn>2</mn>
</msup>
<mo>−</mo>
<mn>4</mn>
<mo>&InvisibleTimes;</mo>
<mi>a</mi>
<mo>&InvisibleTimes;</mo>
<mi>c</mi>
</msqrt>
</mrow>
<mrow>
<mn>2</mn>
<mo>&InvisibleTimes;</mo>
<mi>a</mi>
</mrow>
</mfrac>
</mrow>
<annotation encoding="TeX">
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
</annotation>
<annotation encoding="StarMath 5.0">
x={-b plusminus sqrt {b^2 - 4 ac}} over {2 a}
</annotation>
</semantics>
</math>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment