# Math Conversion Tests

## Math alphabet / Mathvariant

TeX's math alphabet macros change font features of (some) letters and digits. Non-alphanumerical symbols, function names, and mathematical text are left unchanged.

default:

  V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 13)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1.

mathrm:

  \mathrm{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 15)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1.

mathbf:

  \mathbf{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 17)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1.

mathit:

  \mathit{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 19)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1.

mathbfit:

  \mathbfit{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 21)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbfit in equation, Line 1. Unknown command \mathbb in equation, Line 1.

mathbb:

  \mathbb{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 23)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1. Unknown command \mathbb in equation, Line 1.

mathcal:

  \mathcal{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 25)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1.

mathscr:

  \mathscr{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 27)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathscr in equation, Line 1. Unknown command \mathbb in equation, Line 1.

mathfrak:

  \mathfrak{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 29)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathfrak in equation, Line 1. Unknown command \mathbb in equation, Line 1.

mathsf:

  \mathsf{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 31)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1.

mathsfit:

  \mathsfit{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 33)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathsfit in equation, Line 1. Unknown command \mathbb in equation, Line 1.

mathsfbfit:

  \mathsfbfit{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 35)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathsfbfit in equation, Line 1. Unknown command \mathbb in equation, Line 1.

mathbfsfit:

  \mathbfsfit{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 37)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbfsfit in equation, Line 1. Unknown command \mathbb in equation, Line 1.

mathtt:

  \mathtt{V_R x \pm \cos(\alpha_\text{out}) \approx 3 \Gamma \quad \forall x \in \mathbb{R}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 39)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1.

MathML 4 defines the mathvariant style attribute, in MathML core, characters from the Mathematical Alphanumeric Symbols Unicode block are used.

The mathvariants bold-script, bold-fraktur, and sans-bold are rarely used. They are currently not supported by Docutils's native MathML output. In LaTeX, \mathbfscr and \mathbffrac is supported by the mathalpha package.

Bold variants of any symbol can be achieved in combination with the \boldsymbol command, e.g.

bold-fraktur:

  \boldsymbol{\mathfrak{V_R x}}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 54)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathfrak in equation, Line 1.

Note, that \boldsymbol emboldens also non-alphanumerical symbols.

### Complex Example

From the baskervaldx package documentation:

Simplest form of the Central Limit Theorem:

  Let X 1 , X 2 ,… be a sequence of iid random variables with mean 0 and variance 1 on a probability space (\Omega,\mathcal{F},\mathbb{P}). Then

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 65)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1.

      \mathbb{P}\left(\frac{X_1+\cdots+X_n}{\sqrt{n}} \le y\right)
      \to\mathfrak{N}(y)
      \coloneq \int_{-\infty}^y
        \frac{\mathrm{e}^{-t^2/2}}{\sqrt{2\mathrm{\pi}}}\, \mathrm{d}t
      \quad\mbox{as $n\to\infty$,}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 69)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1. Unknown command \mathfrak in equation, Line 1. Unknown command \coloneq in equation, Line 2.

  or, equivalently, letting S_n\coloneq\sum_1^n X_k,

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 75)

  TeX to MathML converter `ttm` failed:

  Unknown command \coloneq in equation, Line 1.

      \mathbb{E} f\left(S_n/\sqrt{n}\right)
      \to \int_{-\infty}^\infty f(t)
        \frac{\mathrm{e}^{-t^2/2}}{\sqrt{2\mathrm{\pi}}}\, \mathrm{d}t
      \quad\mbox{as $n\to\infty$,
        for every $f\in\mathrm{b} \mathcal{C}(\mathbb{R})$.}

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 77)

  TeX to MathML converter `ttm` failed:

  Unknown command \mathbb in equation, Line 1. Unknown command \mathbb in equation, Line 4.

## Inferred <mrow>s in MathML

The elements <msqrt>, <mstyle>, <merror>, <mpadded>, <mphantom>, <menclose>, <mtd>, <mscarry>, and <math> treat their contents as a single inferred mrow formed from all their children.

a=2+x, b=1+ x 2 , c= sin(x) 23 ,

inline: a=2+x, b=1+ x 2 ,c= sin(x) 23 .

## Scripts and Limits

Accents should be nearer to the base: a ‾ a ‾ , l ‾ l ‾ , i ‾ i ‾ , r → r → .

Sub- and superscript may be given in any order: x i j = x i j and ∫0 1 = ∫0 1 .

Double exponent: x 10 4 , r T in and x i n 2 .

## Nested groups

tex-token returns "{" for nested groups:

das ist ein tollertext (unescaped { and } is ignored by LaTeX)

## Big delimiters and symbols

Compare automatic sizing with fixed sizes:

    \left( 3                          \right)
    \left( f(x)                       \right)
    \left( \bar x                     \right)
    \left( \overline x                \right)
    \left( n_i                        \right) &= () \\
    \left( \underline x               \right) &= \bigl(\text{big}\bigr)\\
    \left( 3^2                        \right)
    \left( \sqrt{3}                   \right)
    \left( \sqrt{3^2}                 \right)
    \left( \sum                       \right)
    \left( \bigotimes                 \right)
    \left( \prod                      \right) &= \Bigl(\text{Big}\Bigr)\\
    \left( \frac{3  }{2}              \right)
    \left( \frac{3^2}{2^4}            \right)
    \binom{3  }{2}
    \begin{pmatrix} a & b \\ c & d \end{pmatrix}
    \left( \frac{1}{\sqrt 2}          \right)
    \left( \int                       \right)
    \left( \int_0                     \right)
    \left( \int^1                     \right)
    \left( \int_0^1                   \right) &= \biggl(\text{bigg}\biggr)\\
    \left( \frac{\sqrt 2}{2}          \right)
    \left( \sum_0                     \right)
    \left( \sum^1                     \right)
    \left( \sum_0^1                   \right)
    \left( \frac{\frac1x}{\frac{1}{n}}\right) &= \Biggl(\text{Bigg}\Biggr)\\
    \left( \intop_0                   \right)
    \left( \intop^1                   \right)
    \left( \intop_0^1                 \right)

System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 127)

TeX to MathML converter `ttm` failed:

Unknown or ignored environment: \begin{align*} Line 1. Unknown command \left, (0 user-defined) Line 2. Unknown command \right, (0 user-defined) Line 2. Unknown command \bar, (0 user-defined) Line 4. Unknown command \overline, (0 user-defined) Line 5. Unknown command \bigl, (0 user-defined) Line 7. Unknown command \bigr, (0 user-defined) Line 7. Unknown command \sqrt, (0 user-defined) Line 9. Unknown command \sum, (0 user-defined) Line 11. Unknown command \bigotimes, (0 user-defined) Line 12. Unknown command \prod, (0 user-defined) Line 13. Unknown command \Bigl, (0 user-defined) Line 13. Unknown command \Bigr, (0 user-defined) Line 13. Unknown command \binom, (0 user-defined) Line 16. Unknown or ignored environment: \begin{pmatrix} Line 17. Unknown command \int, (0 user-defined) Line 19. Unknown command \biggl, (0 user-defined) Line 22. Unknown command \biggr, (0 user-defined) Line 22. Unknown command \Biggl, (0 user-defined) Line 27. Unknown command \Biggr, (0 user-defined) Line 27. Unknown command \intop, (0 user-defined) Line 28.

And in text:

():

  (3)(f(x))( x ‾ )( x ‾ )( n i )(∑)( ∑0 )(Π)

( big ):

  \left(\underline x \right) \left( 3^2 \right) \binom{3}{2} \left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \right) \left( \bigotimes \right)

  System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 170)

  TeX to MathML converter `ttm` failed:

  Unknown command \binom in equation, Line 1. Unknown or ignored environment: \begin{smallmatrix} Line 1. Improper \\ or \cr outside array environment ignored, Line ~1..

( Big ):

  (3)( 3 2 )( 3 2 )( 3 2 2 4 )( 2 2 )(∫)( ∫0 )( ∫1 )( ∫0 1 )( ∑1 )( ∑0 1)( 1 x 1 n )

Test \left, \right, and the bigl/bigr, … size commands with all extensible delimiters.

pairing:

(b) (b ) (b ) [b] [b ] [b ] {b} {b } {b } ⟨b⟩ ⟨b ⟩ ⟨b ⟩

    \left.\lceil  b \right\rceil  \ \bigl\lceil  b \Bigr\rceil  \ \biggl\lceil  b \Biggr\rceil
    \quad
    \left.\lfloor b \right\rfloor \ \bigl\lfloor b \Bigr\rfloor \ \biggl\lfloor b \Biggr\rfloor
    \quad
    \left.\lvert  b \right\rvert  \ \bigl\lvert  b \Bigr\rvert  \ \biggl\lvert  b \Biggr\rvert
    \quad
    \left.\lVert  b \right\rVert  \ \bigl\lVert  b \Bigr\rVert  \ \biggl\lVert  b \Biggr\rVert

System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 199)

TeX to MathML converter `ttm` failed:

Unknown command \lvert in equation, Line 1. Unknown command \rvert in equation, Line 1. Unknown command \lvert in equation, Line 1. Unknown command \rvert in equation, Line 1. Unknown command \lvert in equation, Line 1. Unknown command \rvert in equation, Line 1. Unknown command \lVert in equation, Line 2. Unknown command \rVert in equation, Line 2. Unknown command \lVert in equation, Line 2. Unknown command \rVert in equation, Line 2. Unknown command \lVert in equation, Line 2. Unknown command \rVert in equation, Line 2.

    \left.\lgroup b \right\rgroup \ \bigl\lgroup b \Bigr\rgroup \ \biggl\lgroup b \Biggr\rgroup
    \quad
    \left.\lmoustache b \right\rmoustache \ \bigl\lmoustache b \Bigr\rmoustache \ \biggl\lmoustache b \Biggr\rmoustache
    \quad
    \left./           b \right\backslash  \ \bigl/           b \Bigr\backslash  \ \biggl/           b \Biggr\backslash

System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 199)

TeX to MathML converter `ttm` failed:

Unknown command \lgroup in equation, Line 1. Unknown command \rgroup in equation, Line 1. Unknown command \lgroup in equation, Line 1. Unknown command \rgroup in equation, Line 1. Unknown command \lgroup in equation, Line 1. Unknown command \rgroup in equation, Line 1. Unknown command \lmoustache in equation, Line 2. Unknown command \rmoustache in equation, Line 2. Unknown command \lmoustache in equation, Line 2. Unknown command \rmoustache in equation, Line 2. Unknown command \lmoustache in equation, Line 2. Unknown command \rmoustache in equation, Line 2.

non-pairing:

|b| |b | |b | |b| |b | |b | ‖b‖ ‖b ‖ ‖b ‖ ‖b‖ ‖b ‖ ‖b ‖

    \left.\arrowvert b \right\arrowvert \ \bigl\arrowvert b \Bigr\arrowvert \ \biggl\arrowvert b \Biggr\arrowvert
    \quad
    \left.\Arrowvert b \right\Arrowvert \ \bigl\Arrowvert b \Bigr\Arrowvert \ \biggl\Arrowvert b \Biggr\Arrowvert
    \quad
    \left.\bracevert b \right\bracevert \ \bigl\bracevert b \Bigr\bracevert \ \biggl\bracevert b \Biggr\bracevert

System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 224)

TeX to MathML converter `ttm` failed:

Unknown command \arrowvert in equation, Line 1. Unknown command \arrowvert in equation, Line 1. Unknown command \arrowvert in equation, Line 1. Unknown command \arrowvert in equation, Line 1. Unknown command \arrowvert in equation, Line 1. Unknown command \arrowvert in equation, Line 1. Unknown command \Arrowvert in equation, Line 2. Unknown command \Arrowvert in equation, Line 2. Unknown command \Arrowvert in equation, Line 2. Unknown command \Arrowvert in equation, Line 2. Unknown command \Arrowvert in equation, Line 2. Unknown command \Arrowvert in equation, Line 2. Unknown command \bracevert in equation, Line 3. Unknown command \bracevert in equation, Line 3. Unknown command \bracevert in equation, Line 3. Unknown command \bracevert in equation, Line 3. Unknown command \bracevert in equation, Line 3. Unknown command \bracevert in equation, Line 3.

Variable-sized operators:

Inline: \int\ \iint\ \iiint\ \iiiint\ \idotsint \oint\ \smallint\ \sum\ \prod\ \coprod\ \bigwedge\ \bigvee\ \bigcap\ \bigcup\ \biguplus\ \bigsqcup\ \bigodot\ \bigoplus\ \bigotimes and Display:

System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 241)

TeX to MathML converter `ttm` failed:

Unknown command \iiiint in equation, Line 1. Unknown command \idotsint in equation, Line 1. Unknown command \smallint in equation, Line 1.

    \int\ \iint\ \iiint\ \iiiint\ \idotsint\ \oint\ \smallint\
    \sum\ \prod\ \coprod\ \bigwedge\ \bigvee\ \bigcap\ \bigcup\
    \biguplus\ \bigsqcup\ \bigodot\ \bigoplus\ \bigotimes

System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 245)

TeX to MathML converter `ttm` failed:

Unknown command \iiiint in equation, Line 1. Unknown command \idotsint in equation, Line 1. Unknown command \smallint in equation, Line 1.

    \int_1 f\ \intop_1 f\ \iint_1 f\ \smallint_1 f\ \sum_1\
    \prod_1\ \bigwedge_1\ \bigcap_1\ \biguplus_1\ \bigodot_1\ \int^N\
    \intop^N\ \iiiint^N\ \oint^N\ \smallint^N\ \sum^N\ \coprod^N\
    \bigvee^N\ \bigcup^N\ \bigsqcup^N\ \bigotimes^N

System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 249)

TeX to MathML converter `ttm` failed:

Unknown command \intop in equation, Line 1. Unknown command \smallint in equation, Line 1. Unknown command \intop in equation, Line 3. Unknown command \iiiint in equation, Line 3. Unknown command \smallint in equation, Line 3.

    \int_1^N\ \intop_1^N\ \iint_1^N\ \iiint_1^N\ \iiiint_1^N\
    \idotsint_1^N\ \oint_1^N\ \smallint_1^N\ \sum_1^N\ \prod_1^N\
    \coprod_1^N\ \bigwedge_1^N\ \bigvee_1^N\ \bigcap_1^N\ \bigcup_1^N
    \ \biguplus_1^N\ \bigsqcup_1^N\ \bigodot_1^N\ \bigoplus_1^N\
    \bigotimes_1^N

System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 254)

TeX to MathML converter `ttm` failed:

Unknown command \intop in equation, Line 1. Unknown command \iiiint in equation, Line 1. Unknown command \idotsint in equation, Line 2. Unknown command \smallint in equation, Line 2.

## Text

The text may contain non-ASCII characters: n_ Stoß .

Some text-mode LaTeX commands are supported with math_output "html". In other output formats, use literal Unicode: \text{ç é è ë ê ñ ů ž ©} to get the result of the accent macros \text{\c{c} \'e \`e \"e \^e \~n \r{u} \v{z} \textcircled{c}}.

System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 266)

'latin-1' codec can't encode character '\u016f' in position 19: ordinal not in range(256)

System Message: WARNING/2 (../../functional/input/data/math_experiments.rst, line 266)

TeX to MathML converter `ttm` failed:

Unknown command \r, (0 user-defined) Line 1. Unknown command \textcircled, (0 user-defined) Line 1.