#header,next=MISC.html,prev=TZ2_COMMANDS.html

Sandbox

$$ \begin{gathered} 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{gathered} $$

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.

Accents

$$ \acute x_1 \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 $$ $$ \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} $$ $$ \widehat{abc} \quad \widetilde{abc} $$ $$ \underbar x \quad \widecheck{abc} \quad \utilde{abc} $$ $$ \overbrace {ABCDEFGHI}^{over} \quad \overbracket {ABCDEFGHI}^{over} \quad \overleftarrow{ABC} \quad \overleftrightarrow{12345}_{under}^{over} \quad \overline{x + y}_{under}^{over} \quad \overparen{x \ldots z} \quad \overrightarrow{ABC} $$ $$ \underbrace {ABCDEFGHI}_{under}^{over} \quad \underbracket {ABCDEFGHI}_{under}^{over} \quad \underleftarrow{ABC} \quad \underleftrightarrow{12345}_{under}^{over} \quad \underline{x + y} \quad \underparen{x \ldots z} \quad \underrightarrow{ABC} $$ $$ 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 $$

Normal Alphabet

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. For example TexZilla.configure('Concrete Math', 'ISO') configures TeXZilla to use the Concrete Math font and ISO italicization style.

$$ \mathnormal{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz\imath\jmath} $$ $$ \mathnormal{ \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} $$

The Roman alphabet has all letters upright except Greek lowercase which are italic.

$$ \mathrm{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz\imath\jmath} $$

Mathematical Alphanumeric Symbols

The following math alphabets are generated by mapping latin letters and numbers according to the Mathematical Alphanumeric Symbols unicode block using the current math font.

$$ \mathit{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz\imath\jmath} $$ $$ \mathup{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz\imath\jmath} $$ $$ \mathbf{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz\imath\jmath} $$ $$ \mathbfit{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz\imath\jmath} $$ $$ \mathsf{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathsfit{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathbfsf{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathbfsfit{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathbb{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$

There are also a small number of additional double-struck glyphs outside the Mathematical Alphanumeric Symbols block.

$$ \mathbb{\Pi\Gamma\pi\gamma} $$

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} $$ $$ \mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathbfcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathbffrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathbfscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$ $$ \mathtt{0123456789 \enspace ABCDEFGHIJKLMNOPQRSTUVWXYZ \enspace abcdefghijklmnopqrstuvwxyz} $$

The following math alphabets are generated by mapping greek letters according to the Mathematical Alphanumeric Symbols unicode block using the current math font.

$$ \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\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} $$ $$ \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} $$ $$ \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} $$ $$ \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\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} $$ $$ \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} $$ $$ \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} $$

The following 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} $$

The following 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 Symbols And Old Style Numbers

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 numbers 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.

$$ {\oldstyle 0123456789} $$

Experimental Alphabet

Using non-OpenType math font to render all glyphs - except stretchy ones ...

$$ \newmathfont{\mathmkr}{caveat-brush} $$ $$ \mathmkr{x = {-b \pm \sqrt{b^2-4ac} \over 2a}} $$ $$ \mathmkr{\log \left| x / y \right| \le {\small 1/2}} $$ $$ \mathmkr{\vec{\nabla} \times \vec{F} = \left( \frac{\partial F_z}{\partial y} - \frac{\partial F_y}{\partial z} \right) \mathmkr{i} + \left( \frac{\partial F_x}{\partial z} - \frac{\partial F_z}{\partial x} \right) \mathmkr{j} + \left( \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right) \mathmkr{k}} $$ $$ \mathmkr{f(a) = \frac{1}{2\pi i} \oint\frac{f(z)}{z-a}dz} $$ $$ \mathmkr{\cos(\theta+\phi)=\cos(\theta)\cos(\phi) - \sin(\theta)\sin(\phi)} $$ $$ \mathmkr{\sigma = \sqrt{ \frac{1}{N} \sum_{i=1}^N (x_i -\mu)^2}} $$ $$ \mathmkr{(\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)} $$

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 \quad \bigsqcap_{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 \quad \bigtimes_{i=1}^n V_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 \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 $$

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| $$ $$ \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.

$$ \Braket{ \phi \vert \frac{\partial^2}{\partial t^2} \vert \psi } $$

Environments

TeX and AMS pseudo-environments

$$ |x| = \cases {x & if $x\ge 0$ \\ -x & if $x\lt 0$ } $$ $$ \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 $$

Greek Letters

Following the unicode package the Latin-like Greek capital letters are included as separate symbols. Note \Theta has a detached bar, while \ThetaSym is the form with a solid bar.

$$ \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 \epsilon\vartheta\varkappa\phi\varrho\varpi\digamma \enspace \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\Digamma \enspace \varDelta\varGamma\varLambda\varOmega\varPhi\varPi\varPsi\varSigma\varTheta\varUpsilon\varXi $$

In all Math fonts tested, the Latin-like Greek capital letters render identical to their Latin counterparts.

$$ \mathup{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} $$

Logo's

$$ \TeX \quad \LaTeX \quad \KaTeX \quad \TeXZilla $$

Matrices

TeX

$$ \left| \matrix{1 & 23 & 456 \\ 789 & 0 & 12345} \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.

$$ = \quad \not= \quad \centernot= $$

The <menclose> element is deprecated in MathML Core. The effect is now implemented with an SVG overlay.

$$ {\color{red} \sout{\color{black} E = m^2c}} \qquad \xcancel{\underset a b \quad \overset a b} \quad \cancel{\color {red} \underset a b \quad \overset a b} \quad {\color {blue} \bcancel{\overset a b \quad \underset a b}} $$

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.

$$ 12^34 \quad {12}^{34} \quad \frac 12 34 \quad \frac 1 234 \quad \frac {12} {34} \quad -123 \quad {−123} $$

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, Subscripts And Superscripts

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.

$$ d^{\prime} e^{\dprime} f^{\trprime} g^{\qprime} h^{\trprime\dprime} $$ $$ \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 $$

Problematic Glyphs

These glyphs do not have assigned unicodes.

$$ \not\ll \quad \not\gg \quad \not\lll \quad \not\ggg \quad \nleqq \quad \ngeqq \quad \nleqslant \quad \ngeqslant \quad \nsubseteqq \quad \nsupseteqq $$

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 \bbSigma \quad \bbsum_i x_i $$

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}} $$

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.

$$ \text{Bonjour Frédéric this is Japanese こんにちは and this isn't Добар дан} \quad \fbox{ \{\mystery\} \$100 } $$

The \textit 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.

$$ \textit{textit} \quad \textbf{textbf} \quad \textbfit{textbfit} \quad \textsf{textsf} \quad \textsfit{textsfit} \quad \textbfsf{textbfsf} \quad \textbfsfit{textbfsfit} \quad \texttt{texttt} $$ $$ \textbb{TEXTbb} \quad \textbbit{TEXTbbit} \quad \textcal{TEXTcal} \quad \textbfcal{TEXTbfcal} \quad \textfrak{TEXTfrak} \quad \textbffrak{TEXTbffrak} \quad \textscr{TEXTscr} \quad \textbfscr{TEXTbfscr}$$

More general font styles can be obtained by defining a custom text font:

$$ \newtextfont{\textmrk}{caveat-brush} \newtextfont{\textsans}{sans-serif} $$ $$ \textmrk{This text is using the Caveat Brush font!} $$ $$ \textsans{This text is using the system sans-serif font!} $$

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 $$ $$ \mathmkr{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 \.

$$ g = 9.8 \space \text{m/s^2} \qquad g = 9.8 \textsfit{ ms^-2} $$

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)

$$ \text{0123456789} \quad \text["onum"]{0123456789} $$

To check if it supports both Chancery and Roundhand scripts (eg. New Computer Modern Math)

$$ \text{𝒜ℬ𝒞} \quad \text["ss01"]{𝒜ℬ𝒞} $$

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.

$$ ℘(z) = {1 \over z^2} + ∑_{𝜔 ≠ 0} \left[ {1 \over (z+𝜔)^2} − {1 \over 𝜔^2} \right] $$ $$ \unicode{0x1F60E} $$