Sandbox
$$ \left\| x \right\| \text{hello ıȷπ∂+-=/<>×÷±−≠≈≤≥∞} \qquad \degree C $$Standard Examples
$$ \begin{aligned} \vec{\nabla} \cdot \vec{B} &= 0 \\ \vec{\nabla} \times \vec{E} + \frac{\partial B}{\partial t} &= 0 \\ \vec{\nabla} \cdot \vec{E} &= \frac{\rho}{\epsilon_0} \\ \vec{\nabla} \times \vec{B} - \frac{1}{c^2} \, \frac{\partial E}{\partial t} &= \mu_0 \vec{J} \end{aligned} $$ $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ $$ f(a) = \frac{1}{2\pi i} \oint\frac{f(z)}{z-a}dz $$ $$ \cos(\theta+\phi)=\cos(\theta)\cos(\phi) - \sin(\theta)\sin(\phi) $$ $$ \int_D ({\nabla\cdot} F)dV=\int_{\partial D} F\cdot ndS $$ $$ \vec{\nabla} \times \vec{F} = \left( \frac{\partial F_z}{\partial y} - \frac{\partial F_y}{\partial z} \right) \mathbf{i} + \left( \frac{\partial F_x}{\partial z} - \frac{\partial F_z}{\partial x} \right) \mathbf{j} + \left( \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right) \mathbf{k} $$ $$ \sigma = \sqrt{ \frac{1}{N} \sum_{i=1}^N (x_i -\mu)^2} $$ $$ (\nabla_X Y)^k = X^i (\nabla_i Y)^k = X^i \left( \frac{\partial Y^k}{\partial x^i} + \Gamma_{im}^k Y^m \right) $$TeXZilla 2 has four layers of processing. The first layer walks the DOM tree finding strings of TeX code that need converting to MathML. It calls the other layers to convert them into strings of MathML code which it then injects back into the DOM tree.
The second layer takes a TeX string and converts it into a stream of tokens according to the venerable TeX syntax rules, expanding macro's along the way.
The stream of tokens is passed to the third layer, the interpreter which carries out any special syntax parsing required. It reduces the stream of about 900 different TeX tokens down to a more manageable 30 odd MathML tree building commands.
The fourth layer takes the stream of commands and builds a MathML-like tree. It then serializes the tree to a string of MathML code and passes the results back to the first layer.
Greek Letters
Greek letters are taken from the TeXBook, the LaTeX unicode package and the Unicode Mathematical Alphanumeric Symbols block.
There are var commands for the italic versions of the non Latin-like Greek capital letters.
$$ \varDelta \varGamma \varLambda \varOmega \varPhi \varPi \varPsi \varSigma \varTheta \varUpsilon \varXi $$All the Latin-like Greek capital letters except Digamma render identical to their Latin counterparts.
$$ \mathrm{A\Alpha B\Beta E\Epsilon F\Digamma H\Eta I\Iota K\Kappa M\Mu N\Nu O\Omicron P\Rho T\Tau X\Chi Z\Zeta} $$Accents
$$ \acute x \quad \bar x \quad \breve x \quad \check x \quad \dot x \quad \ddot x \quad \dddot x \quad \ddddot x \quad \grave x \quad \hat x \quad \mathring x \quad \tilde x \quad \vec x$$Check that non-wide accents are not erroneously made wide.
$$ \acute{abc} \quad \bar{abc} \quad \breve{abc} \quad \check{abc} \quad \dot{abc} \quad \ddot{abc} \quad \dddot{abc} \quad \ddddot{abc} \quad \grave{abc} \quad \hat{abc} \quad \mathring{abc} \quad \tilde{abc} \quad \vec{abc} $$Math fonts do not have stretchy versions of accent glyphs. If the browser doesn't implement a workaround they are rendered in SVG.
$$ \widehat| \quad \widehat\imath \quad \widehat\jmath \qquad \widehat{x} \quad \widecheck{x} \quad \widetilde{x} \quad \utilde{x} \qquad \widehat{abc} \quad \widecheck{abc} \quad \widetilde{abc} \quad \utilde{abc} \qquad \widehat{0123456789} \quad \widecheck{0123456789} \quad \widetilde{0123456789} \quad \utilde{0123456789} $$ $$ \overleftarrow{ABC} \quad \overleftrightarrow{12345} \quad \overline{x + y} \quad \overparen{x \ldots z} \quad \overrightarrow{abc} $$ $$ \underleftarrow{ABC} \quad \underleftrightarrow{12345} \quad \underline{x + y} \quad \underparen{x \ldots z} \quad \underrightarrow{abc} $$Alphabets
Normal
The default alphabet follows the TeX italicization rules: all Latin and Greek letters are italic except uppercase Greek is upright.
This includes \nabla ∇ which is upright and \partial ∂ which is italic.
This rule can be changed with the italics configuration parameter.
Roman
The Roman alphabet has all letters upright except Greek lowercase which are italic.
$$ \mathrm{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz \enspace \imath \jmath} $$ $$ \mathrm{\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \Thetasym \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega \nabla \Digamma \enspace \alpha \beta \gamma \delta \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon \varphi \chi \psi \omega \partial \epsilon \vartheta \varkappa \phi \varrho \varpi \digamma} $$Upright
$$ \mathup{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz \enspace \imath\jmath} $$ $$ \mathup{\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \Thetasym \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega \nabla \Digamma \enspace \alpha \beta \gamma \delta \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon \varphi \chi \psi \omega \partial \epsilon \vartheta \varkappa \phi \varrho \varpi \digamma} $$
All the following math alphabets are generated by mapping latin letters and numbers according to the Mathematical Alphanumeric Symbols unicode block.
They are near identical to the alphabets defined in the now obsolete latex stix package.
Italic
$$ \mathit{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz \enspace \imath\jmath} $$ $$ \mathit{\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \Thetasym \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega \nabla \enspace \alpha \beta \gamma \delta \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon \varphi \chi \psi \omega \partial \epsilon \vartheta \varkappa \phi \varrho \varpi} $$Bold
$$ \mathbf{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathbf{\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \Thetasym \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega \nabla \Digamma \enspace \alpha \beta \gamma \delta \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon \varphi \chi \psi \omega \partial \epsilon \vartheta \varkappa \phi \varrho \varpi \digamma} $$Bold Italic
$$ \mathbfit{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathbfit{\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \Thetasym \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega \nabla \enspace \alpha \beta \gamma \delta \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon \varphi \chi \psi \omega \partial \epsilon \vartheta \varkappa \phi \varrho \varpi} $$Sans Serif
$$ \mathsf{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$The sans-serif upright Greek glyphs come from the STIX Two Math private use area.
$$ \mathsf{\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \Thetasym \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega \nabla \enspace \alpha \beta \gamma \delta \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon \varphi \chi \psi \omega \partial \epsilon \vartheta \varkappa \phi \varrho \varpi} $$Sans Serif Italic
$$ \mathsfit{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$The sans-serif italic Greek glyphs come from the STIX Two Math private use area.
$$ \mathsfit{\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \Thetasym \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega \nabla \enspace \alpha \beta \gamma \delta \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon \varphi \chi \psi \omega \partial \epsilon \vartheta \varkappa \phi \varrho \varpi} $$Bold Sans Serif
$$ \mathbfsf{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathbfsf{\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \Thetasym \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega \nabla \enspace \alpha \beta \gamma \delta \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon \varphi \chi \psi \omega \partial \epsilon \vartheta \varkappa \phi \varrho \varpi} $$Bold Sans Serif Italic
$$ \mathbfsfit{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathbfsfit{\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta \Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi \Rho \Thetasym \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega \nabla \enspace \alpha \beta \gamma \delta \varepsilon \zeta \eta \theta \iota \kappa \lambda \mu \nu \xi \omicron \pi \rho \varsigma \sigma \tau \upsilon \varphi \chi \psi \omega \partial \epsilon \vartheta \varkappa \phi \varrho \varpi} $$Blackboard
$$ \mathbb{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$There are four double-struck Greek glyphs outside the Mathematical Alphanumeric Symbols block.
$$ \mathbb{\Pi \Gamma \pi \gamma} $$Blackboard Italic
The following double-struck italic glyphs come from the STIX Two Math private use area (except Ddeij which are from the Letterlike Symbols block).
$$ \mathbbit{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$Fraktur
$$ \mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$Bold Fraktur
$$ \mathbffrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$The script style glyphs come in two style variants Chancery and Roundhand which share the same unicodes. They are distinguished using a font-specific font variant style.
Calligraphic
$$ \mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$Bold Calligraphic
$$ \mathbfcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$Script
$$ \mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$Bold Script
$$ \mathbfscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$Teletype
$$ \mathtt{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$Special Font Effects
Bold
Bold symbols are a font style generated by mapping all the glyphs in the Mathematical Alphanumeric Symbols unicode block to their bold counterparts.
$$ \boldsymbol {0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz\imath\jmath} $$ $$ \boldsymbol { \mathup{ABCDEFGHIJKLMN} \enspace \mathsfit{OPQRSTUVWXYZ \enspace abcdefghijklmn} \enspace \mathup{opqrstuvwxyz} } $$ $$ \boldsymbol {\Alpha\Beta\Gamma\Delta\Epsilon\Zeta\Eta\Theta\Iota\Kappa\Lambda\Mu\Nu \Xi\Omicron\Pi\Rho\Thetasym\Sigma\Tau\Upsilon\Phi\Chi\Psi\Omega\nabla\Digamma \enspace \varDelta\varGamma\varLambda\varOmega\varPhi\varPi\varPsi\varSigma\varUpsilon\varXi} $$ $$ \boldsymbol {\alpha\beta\gamma\delta\varepsilon\zeta\eta\theta\iota\kappa\lambda\mu\nu \xi\omicron\pi\rho\varsigma\sigma\tau\upsilon\varphi\chi\psi\omega \enspace \partial\epsilon\vartheta\varkappa\phi\varrho\varpi\digamma} $$Old Style Numerals
Old style numerals are taken from the current math font if it has them (most including STIX Two Math do not). Otherwise they are taken from the system cursive font.
$$ 0123456789 \qquad \oldstyle 0123456789 $$Marker Pen
Experimental marker pen simulation obtained by combining a math and non-math font together.
Letters in the \mathnormal alphabet and text in \text and a few other math symbols are rendered in the marker font.
Select Caveat Brush to see this effect.
Big Operators, Integrals And Limits
$$ \sum_{i=1}^n X_i \quad \prod_{i=1}^n X_i \quad \coprod_{i=1}^n X_i \quad \bigcap_{i=1}^n X_i \quad \bigcup_{i=1}^n X_i \quad \biguplus_{i=1}^n X_i $$ $$ \bigsqcup_{i=1}^n X_i \quad \bigwedge_{i=1}^n X_i \quad \bigvee_{i=1}^n X_i \quad \bigoplus_{i=1}^n X_i \quad \bigotimes_{i=1}^n X_i \quad \bigodot_{i=1}^n X_i $$Additional big operators are defined in the unicode standard.
$$ \bigtimes_{i=1}^n V_i \quad \bigcupdot_{i=1}^n X_i \quad \bigsqcap_{i=1}^n X_i \quad \bigtalloblong_{i=1}^n X_i \quad \Bbbsum_{i=1}^n X_i $$ $$ \int_0^\infty dx \quad \iint_R dx dy \quad \iiint_R dx dy dz \quad \iiiint_R dw dx dy dz \quad \idotsint $$ $$ \oint_C dx \quad \ointctrclockwise_C dx \quad \varointclockwise_C dx \quad \pointint_C dx \quad \oiint_C dx dy \quad \oiiint_C dx dy dz \quad \intop_R dx \quad \ointop_R dx $$ $$ \lim_{n\rightarrow\infty} x_i \quad \inf_{n\rightarrow\infty} x_i \quad \sup_{n\rightarrow\infty} x_i \quad \limsup_{n\rightarrow\infty} x_i \quad \liminf_{n\rightarrow\infty} x_i $$ $$ \displaystyle \sum_{i=1}^n \enspace \sum\limits_{i=1}^n \enspace \sum\nolimits_{i=1}^n \qquad \textstyle \sum_{i=1}^n \enspace \sum\limits_{i=1}^n \enspace \sum\nolimits_{i=1}^n $$ $$ \displaystyle \mathop{\operatorname{Op}}_{i=1}^n \enspace \mathop{\operatorname{Op}}\limits_{i=1}^n \enspace \mathop{\operatorname{Op}}\nolimits_{i=1}^n \qquad \textstyle \mathop{\operatorname{Op}}_{i=1}^n \enspace \mathop{\operatorname{Op}}\limits_{i=1}^n \enspace \mathop{\operatorname{Op}}\nolimits_{i=1}^n $$KaTeX has a command to create large operators.
$$ \operatornamewithlimits{limit}_{x \rightarrow \infty} f(x) \qquad \textstyle \operatornamewithlimits{limit}_{x \rightarrow \infty} f(x) $$Brackets
$$ {\tiny\Bigg(\bigg(\Big(\big((Aa)\big)\Big)\bigg)\Bigg) } {\scriptsize Aa} {\small Aa } {\normalsize Aa} {\large Aa} {\Large Aa} {\LARGE Aa} {\huge Aa} {\Huge\Bigg(\bigg(\Big(\big((Aa)\big)\Big)\bigg)\Bigg)} $$ $$ ( \big( \Big( \bigg( \Bigg( $$ $$ \left| \left\langle \left\| \left\{ \left[ \left( {\large \sqrt[3]{x \over y}} \right) \right] \right\} \right\| \right\rangle \right| $$Bracket spacing test - on Chrome there is too much spacing especially for ( and ). This is a bug in Chrome MathML which could be worked around by setting negative margins ...
$$ 2^{\left(x\right)} \enspace 2^{\left[x\right]} \enspace 2^{\left|x\right|} \enspace 2^{\left\{x\right\}} \enspace 2^{\left\|x\right\|} \enspace 2^{\left\langle x \right\rangle} $$ $$ \bra{\phi} \quad \ket{\psi} \quad \braket{ \phi | \partial^2 / \partial t^2 | \psi }\quad \braket{ \phi \| \partial^2 / \partial t^2 \| \psi } \quad \set{ x \in \R^2 | 0 \lt {|x|} \lt 5 } $$ $$ \Bra{\phi} \quad \Ket{\psi} \quad \Braket{ \phi | \frac{\partial^2}{\partial t^2} | \psi } \quad \Braket{ \phi \| \frac{\partial^2}{\partial t^2} \| \psi } \quad \Set{ x \in \R^2 | 0 \lt {|x| \over 5} \lt 1 } $$
Check that \vert is not mis-interpreted as Braket divider.
Environments
TeX and AMS pseudo-environments
$$ \displaylines {x + 2y = 3 \cr x = y - 4} $$ $$ \eqalign {x + 2y &= 3 \cr x &= y - 4} $$ $$ g_2 = 60 \sum_{\substack{\omega \ne 0 \\ \omega \in \Omega}} \frac 1 {\omega^4} $$AMS environments excluding matrices and arrays
$$ |x| = \begin{cases} x & \text{if } x\ge 0\\ -x & \text{if } x\lt 0 \end{cases} $$ $$ f(x) = \begin{cases} x & \text{if } x\ge \sum_i y_i \\ -x & \text{if } x\lt \sum_i y_i \end{cases} $$ $$ f(x) = \begin{dcases} x & \text{if } x\ge \sum_i y_i \\ -x & \text{if } x\lt \sum_i y_i \end{dcases} $$ $$ \begin{aligned} x + 2y &= 3 \\ x &= y - 4 \end{aligned} $$ $$ \begin{gathered} x + 2y = 3 \\ x = y - 4 \end{gathered} $$ $$ \begin{multline} x = 3 + 6a_1 + 7a_2 + 8a_3 + \\ 19b_1 - 20b_2 - 14b_3 + \\ \shoveright + 1999c_1 + 47c_2 - c_3 \\ \shoveleft y = 99 - 123d_1 - 321d_2 + 111d_3 - \\ 100e_1 + 200e_2 + 300e_3 \end{multline} $$Fractions
$$ \genfrac \{\} {2pt} {0} ab \quad \genfrac [ ] {} {1} ab \quad \genfrac [ ) {} {2} ab \quad \genfrac ( ] {} {3} ab $$ $$ \frac{2}{1+\frac{2}{1+\frac{2}{1}}} \quad \cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}} $$ $$ { a + b \over c + d} \quad \binom n 3 \quad { n+m \choose k} \quad \frac a b \quad \tfrac a b \quad {a \atop b} \quad {a \brace b} \quad {a \brack b} \quad { a \above {1pt} b } $$ $$ \left\langle a \over b \middle| c \over d \right\rangle $$Logo's
$$ \TeX \quad \LaTeX \quad \KaTeX \quad \TeXZilla $$Matrices
TeX
$$ \left| \matrix{1 & 23 & 456 & 4 \\ 789 & 0 & 12345 & 5 \\ 789 & 0 & 12345 & 5 \\ 789 & 0 & 12345 & 5} \right| \qquad \pmatrix{1 & 23 & 456 \\ 789 & 0 & 12345} $$AMS
$$ \begin{matrix} a & b \\ c & d \end{matrix} \qquad \begin{bmatrix} a & b \\ c & d \end{bmatrix}^3 \qquad \begin{pmatrix} a & b \\ c & d \end{pmatrix}^3 \qquad \begin{vmatrix} a & b \\ c & d \end{vmatrix}^3 \qquad \begin{Bmatrix} a & b \\ c & d \end{Bmatrix}^3 \qquad \begin{Vmatrix} a & b \\ c & d \\ \end{Vmatrix}^3 \qquad $$ $$ \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \quad \left( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \right) \quad \left| \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \right|^2 $$Not And Cancel
Check that not'd glyphs are being correctly mapped to their unicode "not" versions.
$$ =\not= \lt\not\lt \leq\not\leq \gt\not\gt \geq\not\geq \equiv\not\equiv \in\not\in \ni\not\ni \mid\not\mid \parallel\not\parallel \approx\not\approx \exists\not\exists \checkmark\not\checkmark $$Check that not'd glyphs which don't have unicode versions are overlayed with a slash.
$$ \not \alpha \quad \not A \quad \not {\bar X} \quad \bar {\not X} \quad \not 2 \quad \not {\tfrac 12} $$
Unlike the \not command the \centernot command is always an overlay.
The <menclose> element is deprecated in MathML Core.
The effect is now implemented with an SVG overlay.
Number Coalescing
Consecutive digits are coalesced in the interpreter so that the generated MathML puts them all in a single <mn> node.
This test is to check that it doesn't break the somewhat unintuitive LaTeX bracketing rules.
Operators With Special Spacing
$$ |x| = a / b \backslash c \quad x\_y \quad A \setminus B $$ $$ F \iff G \quad F \implies G \quad G \impliedby F $$Primes
Special unicode characters are used for 1 to 4 primes, but for 5 and above they are typeset separately.
$$ d' e'' f''' g'''' h''''' \quad d_1' e_1'' f_1''' g_1'''' h_1''''' \quad d_1'^2 e_1''^2 f_1'''^2 g_1''''^2 h_1'''''^2 $$To typeset exponents at the same level as the primes put them together in a superscript.
$$ d_1^{\prime 2} e_1^{\prime\prime 2} f_1^{\prime\prime\prime 2} g_1^{\prime\prime\prime\prime 2} h_1^{\prime\prime\prime\prime\prime 2} $$
Double, triple and quadruple \prime's can be abbreviated to \dprime, \trprime and \qprime.
This is how TeXBook primes a summation operator but it doesn't work very well when converted to MathML (and is especially bad in Chrome).
$$ \mathop{ {\sum}'}_{x \in A} f(x) $$TeXZilla has implemented it's own notation that is simple to write and takes advantage of special heuristics in MathML
$$ \sum'_{x \in A} f(x) $$Problematic Glyphs
These not'd glyphs do not have assigned unicodes.
$$ \begin{array}{} \approxeq&\not\approxeq&\centernot\approxeq\\ \bumpeq&\not\bumpeq&\centernot\bumpeq\\ \Bumpeq&\not\Bumpeq&\centernot\Bumpeq\\ \ggg&\not\ggg&\centernot\ggg\\ \geqq&\ngeqq&\centernot\geqq\\ \geqslant&\ngeqslant&\centernot\geqslant\\ \gg&\not\gg&\centernot\gg\\ \leqq&\nleqq&\centernot\leqq\\ \leqslant&\nleqslant&\centernot\leqslant\\ \ll&\not\ll&\centernot\ll\\ \lll&\not\lll&\centernot\lll\\ \sqsubset&\not\sqsubset&\centernot\sqsubset\\ \sqsupset&\not\sqsupset&\centernot\sqsupset\\ \subseteqq&\nsubseteqq&\centernot\subseteqq\\ \supseteqq&\nsupseteqq&\centernot\supseteqq\\ \end{array} $$These glyphs have the same unicodes as their variants.
$$ \lneqq \quad \lvertneqq \quad \gneqq \quad \gvertneqq \quad \emptyset \quad \varnothing \quad \propto \quad \varpropto $$ $$ A \smile B \quad A \smallsmile B \quad A \frown B \quad A \smallfrown B \quad A \setminus B \quad A \smallsetminus B$$ $$ A \mid B \quad A \shortmid B \quad A \nmid B \quad A \nshortmid B \quad A \parallel B \quad A \shortparallel B \quad A \nparallel B \quad A \nshortparallel B \quad A \not\shortparallel B $$ $$ \left\Vvert a \over b \right\Vvert \quad \Bbbsum_i x_i \quad \textstyle \Bbbsum_i x_i $$Size
$$ \rm \tiny tiny \scriptsize ~scriptsize \small ~small \normalsize ~normalsize \large ~large \Large ~Large \LARGE ~LARGE \huge ~huge \Huge ~Huge $$ $$ \Huge \TeX \enspace\LaTeX \enspace\KaTeX \enspace\TeXZilla $$Spaces and Phantom
$$ A \hspace{-1em} A \! A \, A \> A \; A \enspace A \quad A \qquad A \hspace{4em} A \ A$$ $$ \boxed{aA} \space \boxed{a\phantom{A}} \space \boxed{a\vphantom{A}} \space \boxed{a\hphantom{A}} $$Subscript / Superscript
$$ {^{sup}} \quad {_{sub}} \quad {_{sub}^{sup}} \quad X_{sub} \quad X^{sup} \quad X_{sub}^{sup} \quad X^{sup}_{sub} $$ $$ \sideset {_1^2} {} X \quad \sideset {} {_1^2} X \quad \sideset {^2} {_3^4} X \quad \sideset {_1} {_3^4} X \quad \sideset {_1^2} {^4} X \quad \sideset {_1^2} {_3} X \quad \sideset {_1^2} {_3^4} X \quad \sideset {_{12}^{34}} {_{56}^{78}} X $$Tables
$$ \begin{array}{lcr} a & b & c \\ xxx & yyy & zzz \end{array} $$ $$ \begin{array}{|lcr} \hline a & b & c \\ xxx & yyy & zzz \end{array} $$ $$ \begin{array}{l:cr} a & b & c \\ \hline xxx & yyy & zzz \end{array} $$ $$ \begin{array}{lcr|} a & b & c \\ \hdashline xxx & yyy & zzz \end{array} $$ $$ \begin{array}{|l|c|r|} \hline a & b & c \\ \hline xxx & yyy & zzz \\ \hline \end{array} $$ $$ \begin{array}{:l:c:r:} \hdashline a & b & c \\ \hdashline xxx & yyy & zzz \\ \hdashline \end{array} $$ $$ \begin{subarray}{lcr} a & b & c \\ xxx & yyy & zzz \end{subarray} $$Text
The \text command uses the current math font to render any unicode characters as normal text.
OpenType math fonts have a good repertoire of European characters and fall back seemlessly to system fonts for CJK etc.
The \textit, \textbf etc. commands are different. They are only suitable for rendering a short string of Latin and Greek letters and numbers with the same "look and feel" as the math font.
They use the Mathematical Alphanumeric Symbols unicode block with the current math font to obtain the different font styles.
The one exception is \textsf with a marker pen font will render the same as \text.
Text accented using unicode diacritics.
$$ \text{x̀ x́ x̂ x̃ x̄ x̅ x̆ ẋ ẍ x̉ x̊ x̋ x̌ x̍ x̎ x̏ Å} $$Symbols that are rendered as text.
$$ 5.76\Angstrom \quad 10\celsius \quad 72\fahrenheit \quad 143\kelvin \quad 12.3\ohm \quad 10\cent \quad \$20 \quad \euro50 \quad \pounds100 \quad \yen200 $$
All \text... commands interpret all input, including space, as unicode text except that ^ can be used as a convenience to create numeric superscripts.
Also for technical reasons {, } and $ must be preceded by a \.
Under / Over
$$ \overset {over} {ABCDEFGHI} \quad \underset {under} {ABCDEFGHI} \quad \overunderset {over} {under} {ABCDEFGHI} $$ $$ \overbrace {ABCDEFGHI}_{under}^{over} \quad \overbracket {ABCDEFGHI}_{under}^{over} $$ $$ \underbrace {ABCDEFGHI}_{under}^{over} \quad \underbracket {ABCDEFGHI}_{under}^{over} $$ $$ F \xmapsto[under]{over} G\quad F \xrightarrow[under]{over} G \quad F \xleftarrow[under]{over} G\quad a \xleftrightarrow[{\tiny under \space very \space long}]{over} b \quad A \xLeftarrow[under]{over} B \quad B \xRightarrow[under]{over} C\quad C \xLeftrightarrow[under]{over} D $$ $$ D \xhookleftarrow[under]{over} E \quad E \xhookrightarrow[under]{over} F \quad F \xtofrom[under]{over} G \quad G \xtwoheadleftarrow[under]{over} H \quad H \xtwoheadrightarrow[under]{over} I \quad I \xlongequal[under]{over} J $$Unicode
About 75% of LaTeX commands map directly to a unicode code point. Those codepoints can be used as a synonym for the corresponding LaTeX command. When a unicode does not map to a known LaTeX command, a best guess is generated based on the unicode block.
$$ \sin(𝛼+𝛽) = \sin𝛼\cos𝛽 + \cos𝛼\sin𝛽 $$ $$ 𝒙 = 𝒚 × 𝒛 $$ $$ ∀ 𝑥 ∈ ℂ ~~~ ∃ 𝑦 ∈ ℝ ~~ ∍ ~~ 𝑦^2 ≤ |𝑥| $$
In this formula the Σ is U+2211 N-ARY SUMMATION.
Special Font Features
For testing purposes \text takes an optional argument used to specify font feature settings.
For example to check if the current math font supports old style numbers (eg. Lete Sans Math)
To check if it supports both Chancery and Roundhand scripts (eg. New Computer Modern Math)
$$ \text{𝒜ℬ𝒞} \quad \text["ss01"]{𝒜ℬ𝒞} $$