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:
-
- mathrm:
-
- mathbf:
-
- mathit:
-
- mathbfit:
-
- mathbb:
-
- mathcal:
-
- mathscr:
-
- mathfrak:
-
- mathsf:
-
- mathsfit:
-
- mathsfbfit:
-
- mathbfsfit:
-
- mathtt:
-
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:
-
Note, that \boldsymbol emboldens also non-alphanumerical symbols.
Complex Example
From the baskervaldx package documentation:
- Simplest form of the Central Limit Theorem:
Let be a sequence of iid random variables with mean
and variance on a probability space .
Then
or, equivalently, letting ,
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.
inline: .
Scripts and Limits
Accents should be nearer to the base:
,
.
Sub- and superscript may be given in any order:
and .
Double exponent: , and .
Nested groups
tex-token returns "{" for nested groups:
Big delimiters and symbols
Compare automatic sizing with fixed sizes:
And in text:
- :
-
- :
-
- :
-
Test \left, \right, and the bigl/bigr, … size commands
with all extensible delimiters.
pairing:
non-pairing:
Variable-sized operators:
Inline: and Display:
Text
The text may contain non-ASCII characters: .
Some text-mode LaTeX commands are supported with math_output "html".
In other output formats, use literal Unicode:
to get the result of the accent macros
.