Extension:Math/MathJax testing

When you click a MathJax formula, you get an instantly zoomed version of it for improved readability. MathJax formulas can also copied and pasted, and scaled without loss of quality for printing, higher resolution displays, or better readability.

MathJax is a JavaScript display engine for mathematics. It's an alternative to PNG rendering for Wikimedia sites. MathJax is slower to render, but more scalable (infinite zoom) and manipulable than PNG.

MathJax is currently enabled on this wiki (mediawiki.org), but you have to explicitly enable it in your user preferences (under Appearance -> Math). Otherwise you'll still see the old-school PNG images.

How to test:

Examples and testsEdit

Most of the following examples were copied from the English Wikipedia math help page.

Quadratic polynomialEdit

 
<math>ax^2 + bx + c = 0</math>

Quadratic polynomial (force PNG rendering)Edit

 
<math>ax^2 + bx + c = 0\,\!</math>

Quadratic formulaEdit

 
<math>x={-b\pm\sqrt{b^2-4ac} \over 2a}</math>

Tall parentheses and fractionsEdit

 
<math>2 = \left(
 \frac{\left(3-x\right) \times 2}{3-x}
 \right)</math>
 
 <math>S_{\text{new}} = S_{\text{old}} - \frac{ \left( 5-T \right) ^2} {2}</math>
 
 

IntegralsEdit

 
<math>\int_a^x \!\!\!\int_a^s f(y)\,dy\,ds
 = \int_a^x f(y)(x-y)\,dy</math>

SummationEdit

 
<math>\sum_{i=0}^{n-1} i</math>
 
<math>\sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n}
 {3^m\left(m\,3^n+n\,3^m\right)}</math>

Differential equationEdit

 
<math>u'' + p(x)u' + q(x)u=f(x),\quad x>a</math>

Complex numbersEdit

 
<math>|\bar{z}| = |z|,
 |(\bar{z})^n| = |z|^n,
 \arg(z^n) = n \arg(z)</math>

LimitsEdit

 
<math>\lim_{z\rightarrow z_0} f(z)=f(z_0)</math>

Integral equationEdit

 
<math>\phi_n(\kappa) =
 \frac{1}{4\pi^2\kappa^2} \int_0^\infty
 \frac{\sin(\kappa R)}{\kappa R}
 \frac{\partial}{\partial R}
 \left[R^2\frac{\partial D_n(R)}{\partial R}\right]\,dR</math>

ExampleEdit

 
<math>\phi_n(\kappa) = 
 0.033C_n^2\kappa^{-11/3},\quad
 \frac{1}{L_0}\ll\kappa\ll\frac{1}{l_0}</math>

Continuation and casesEdit

 
<math>
 f(x) =
 \begin{cases}
 1 & -1 \le x < 0 \\
 \frac{1}{2} & x = 0 \\
 1 - x^2 & \text{otherwise}
 \end{cases}
 </math>

Prefixed subscriptEdit

 
<math>{}_pF_q(a_1,\dots,a_p;c_1,\dots,c_q;z)
 = \sum_{n=0}^\infty
 \frac{(a_1)_n\cdots(a_p)_n}{(c_1)_n\cdots(c_q)_n}
 \frac{z^n}{n!}</math>

Fraction and small fractionEdit

 
<math>\frac{a}{b}\ \tfrac{a}{b}</math>

Area of a quadrilateralEdit

 
<math>S=dD\,\sin\alpha\!</math>

Volume of a sphere-standEdit

 
<math>V=\tfrac16\pi h\left[3\left(r_1^2+r_2^2\right)+h^2\right]</math>

Multiple equationsEdit

 
 
<math>{\begin{aligned}q_{1}&=\cos 
\left({\frac {\phi -\psi }{2}}\right)\sin \left({\frac {\theta 
}{2}}\right)\\q_{2}&=\sin \left({\frac {\phi -\psi }{2}}\right)\sin 
 \left({\frac {\theta }{2}}\right)\\q_{3}&=\sin \left({\frac {\phi 
+\psi }{2}}\right)\cos \left({\frac {\theta 
}{2}}\right)\\q_{4}&=\cos \left({\frac {\phi +\psi }{2}}\right)\cos 
 \left({\frac {\theta }{2}}\right)\end{aligned}}</math>

task T38059Edit

 
 

Failed to parse (unknown function "\upgamma"): {\displaystyle {{\upgamma}_{\text{S}}}={{\uprho}_{\text{S}}}\cdot \text{g}\quad[\text{kN}/\text{m}^\text{3}}

Equation referencesEdit

Failed to parse (unknown function "\begin{equation}"): {\displaystyle \begin{equation}\label{eq1} x = \sin(y) \end{equation}}

The above has label Failed to parse (unknown function "\ref"): {\displaystyle \ref{eq1}}

<math>\begin{equation}\label{eq1}
 x = \sin(y)
 \end{equation}</math>
The above has label <math>\ref{eq1}</math>

CJKEdit

Failed to parse (syntax error): {\displaystyle 中文}
 (<math>\text{中文}</math> displays nothing)
Failed to parse (syntax error): {\displaystyle 中\text{文}}

TextstylesEdit

 
 
 
  should render as Failed to parse (unknown function "\tt"): {\displaystyle {\tt teletype\ text}}
  should render as Failed to parse (unknown function "\sf"): {\displaystyle {\sf sanserif\ text}}
Failed to parse (Conversion error. Server ("https://wikimedia.org/api/rest_") reported: "Cannot get mml. TeX parse error: Undefined control sequence \emph"): {\displaystyle {\emph {emphasizedtext}}}

Also in Latex 2e

Failed to parse (unknown function "\textmd"): {\displaystyle \textmd{midsize text}} should render as Failed to parse (unknown function "\md"): {\displaystyle {\md midsize\ text}}
Failed to parse (unknown function "\textup"): {\displaystyle \textup{upper case text}} should render as Failed to parse (unknown function "\up"): {\displaystyle {\up upper\ case\ text}}
Failed to parse (unknown function "\textsl"): {\displaystyle \textsl{slanted text}} should render as Failed to parse (unknown function "\sl"): {\displaystyle {\sl slanted\ text}}
Failed to parse (unknown function "\textsc"): {\displaystyle \textsc{small cap text}} should render as Failed to parse (unknown function "\sc"): {\displaystyle {\sc small\ cap\ text}}

Nesting

 
 
Failed to parse (unknown function "\upgamma"): {\displaystyle \textbf{\upgamma{Mathroman}}}

Math font styles

 
 
 
 
 
Failed to parse (unknown function "\mathnormal"): {\displaystyle \mathnormal{normal\ text}}
 
 


Sizes

Failed to parse (unknown function "\tiny"): {\displaystyle \tiny tiny}
Failed to parse (unknown function "\scriptsize"): {\displaystyle \scriptsize scriptsize}
Failed to parse (unknown function "\footnotesize"): {\displaystyle \footnotesize footnotesize}
Failed to parse (unknown function "\small"): {\displaystyle \small small}
Failed to parse (unknown function "\normalsize"): {\displaystyle \normalsize normalsize}
Failed to parse (unknown function "\large"): {\displaystyle \large large}
Failed to parse (unknown function "\Large"): {\displaystyle \Large Large}
Failed to parse (unknown function "\LARGE"): {\displaystyle \LARGE LARGE}
Failed to parse (unknown function "\huge"): {\displaystyle \huge huge}
Failed to parse (unknown function "\Huge"): {\displaystyle \Huge Huge}