Abstract
Docutils supports mathematical content with a "math" directive and role. The input format is LaTeX math syntax[1] with support for Unicode symbols.
Contents
The math role can be used for inline mathematical expressions: :math:`\psi(r) = \exp(-2r)` will produce ψ(r) = exp( − 2r). Inside the backtics you can write anything you would write between dollar signs in a LaTeX document. [1]
Tip
If you put .. default-role:: math at the top of your document, you can write `x^2` instead of the longer version: :math:`x^2`. You can also introduce an abbreviation like this .. role:: m(math). That will allow you to write :m:`x^2` or `x^2`:m:.
The math directive is used for displayed equations. It corresponds to an equation* or align* environment in a LaTeX document. If you write:
.. math:: \psi(r) = e^{-2r}
you will get:
A more complex example is the definition of the Fourier transform:
.. math:: :name: Fourier transform (\mathcal{F}f)(y) = \frac{1}{\sqrt{2\pi}^{\ n}} \int_{\mathbb{R}^n} f(x)\, e^{-\mathrm{i} y \cdot x} \,\mathrm{d} x.
which is rendered as:
The :name: option puts a label on the equation that can be linked to by hyperlink references.
Displayed equations can use \\ and & for line shifts and alignments:
.. math:: a &= (x + y)^2 & b &= (x - y)^2 \\ &= x^2 + 2xy + y^2 & &= x^2 - 2xy + y^2
LaTeX output will wrap it in an align* environment. The result is:
[1] | (1, 2) The supported LaTeX commands include AMS extensions (see, e.g., the Short Math Guide). Some of the shown symbols require the "amssymb" LaTeX package (or another package providing the AMS symbol macros) when exported with the "latex" writer. The support is limited to a subset of LaTeX math by the conversion required for many output formats. For HTML, the math_output configuration setting (or the corresponding --math-output command line option) selects between alternative output formats with different subsets of supported elements. If a writer does not support math typesetting, the content is inserted verbatim. |
The following tables are adapted from the first edition of "The LaTeX Companion" (Goossens, Mittelbach, Samarin) and the AMS Short Math Guide.
The "narrow" accents are intended for a single-letter base.
x́ | \acute{x} | ṫ | \dot{t} | x̂ | \hat{x} |
‒v | \bar{v} | ẗ | \ddot{t} | x̊ | \mathring{x} |
x̆ | \breve{x} | ⋯t | \dddot{t} | ñ | \tilde{n} |
x̌ | \check{x} | x̀ | \grave{x} | →x | \vec{x} |
When adding an accent to an i or j in math, dotless variants can be obtained with \imath and \jmath: ı̂, →ȷ.
For embellishments that span multiple symbols, use:
~gbi | \widetilde{gbi} | ^gbi | \widehat{gbi} |
gbi | \overline{gbi} | gbi | \underline{gbi} |
gbi | \overbrace{gbi} | gbi | \underbrace{gbi} |
⟵gbi | \overleftarrow{gbi} | ⟵gbi | \underleftarrow{gbi} |
⟶gbi | \overrightarrow{gbi} | ⟶gbi | \underrightarrow{gbi} |
⟷gbi | \overleftrightarrow{gbi} | ⟷gbi | \underleftrightarrow{gbi} |
* | * | ⊛ | \circledast | ⊖ | \ominus |
+ | + | ⊚ | \circledcirc | ⊕ | \oplus |
− | - | ⊝ | \circleddash | ⊘ | \oslash |
: | : | ∪ | \cup | ⊗ | \otimes |
⋒ | \Cap | ⋎ | \curlyvee | ± | \pm |
⋓ | \Cup | ⋏ | \curlywedge | ⋌ | \rightthreetimes |
⨿ | \amalg | † | \dagger | ⋊ | \rtimes |
∗ | \ast | ‡ | \ddagger | ⧵ | \setminus |
◯ | \bigcirc | ⋄ | \diamond | ∖ | \smallsetminus |
▽ | \bigtriangledown | ÷ | \div | ⊓ | \sqcap |
△ | \bigtriangleup | ⋇ | \divideontimes | ⊔ | \sqcup |
⊡ | \boxdot | ∔ | \dotplus | ⋆ | \star |
⊟ | \boxminus | ⩞ | \doublebarwedge | × | \times |
⊞ | \boxplus | ⋗ | \gtrdot | ◃ | \triangleleft |
⊠ | \boxtimes | ⊺ | \intercal | ▹ | \triangleright |
• | \bullet | ⋋ | \leftthreetimes | ⊎ | \uplus |
∩ | \cap | ⋖ | \lessdot | ∨ | \vee |
⋅ | \cdot | ⋉ | \ltimes | ⊻ | \veebar |
⬝ | \centerdot | ∓ | \mp | ∧ | \wedge |
∘ | \circ | ⊙ | \odot | ≀ | \wr |
Unless you indicate otherwise, delimiters in math formulas remain at the standard size regardless of the height of the enclosed material. To get adaptable sizes, use \left and \right prefixes, for example g(A, B, Y) = f(A, B, X = h[X](Y)) or
Use . for "empty" delimiters:
See also the commands for fixed delimiter sizes below.
The following symbols extend when used with \left and \right:
() | ( ) | ⟨⟩ | \langle \rangle |
[] | [ ] | ⌈⌉ | \lceil \rceil |
{} | \{ \} | ⌊⌋ | \lfloor \rfloor |
|| | \lvert \rvert | ⟮⟯ | \lgroup \rgroup |
‖‖ | \lVert \rVert | ⎰⎱ | \lmoustache \rmoustache |
| | | | | | \vert | ⏐ | \arrowvert |
‖ | \| | ‖ | \Vert | ‖ | \Arrowvert |
⁄ | / | \ | \backslash | ⎪ | \bracevert |
The use of | and \| for pairs of vertical bars may produce incorrect spacing, e.g., |k|=|-k| produces |k| = | − k| and |\sin(x)| produces |sin(x)|. The pairing delimiters, e.g. | − k| and |sin(x)|, prevent this problem (in LaTeX and MathJax).
↑ \uparrow | ⇑ \Uparrow |
↓ \downarrow | ⇓ \Downarrow |
↕ \updownarrow | ⇕ \Updownarrow |
arccos | \arccos | gcd | \gcd | Pr | \Pr |
arcsin | \arcsin | hom | \hom | proj lim | \projlim |
arctan | \arctan | inf | \inf | sec | \sec |
arg | \arg | inj lim | \injlim | sin | \sin |
cos | \cos | ker | \ker | sinh | \sinh |
cosh | \cosh | lg | \lg | sup | \sup |
cot | \cot | lim | \lim | tan | \tan |
coth | \coth | lim inf | \liminf | tanh | \tanh |
csc | \csc | lim sup | \limsup | \varlimsup | \varlimsup |
deg | \deg | ln | \ln | \varliminf | \varliminf |
det | \det | log | \log | \varprojlim | \varprojlim |
dim | \dim | max | \max | \varinjlim | \varinjlim |
exp | \exp | min | \min |
Named operators outside the above list can be typeset with \operatorname{name}, e.g.
The \DeclareMathOperator command can only be used in the LaTeX preamble.
Greek letters that have Latin look-alikes are rarely used in math formulas and not supported by LaTeX.
Γ | \Gamma | α | \alpha | μ | \mu | ω | \omega |
Δ | \Delta | β | \beta | ν | \nu | ϝ | \digamma |
Λ | \Lambda | γ | \gamma | ξ | \xi | ε | \varepsilon |
Φ | \Phi | δ | \delta | π | \pi | ϰ | \varkappa |
Π | \Pi | ϵ | \epsilon | ρ | \rho | φ | \varphi |
Ψ | \Psi | ζ | \zeta | σ | \sigma | ϖ | \varpi |
Σ | \Sigma | η | \eta | τ | \tau | ϱ | \varrho |
Θ | \Theta | θ | \theta | υ | \upsilon | ς | \varsigma |
Υ | \Upsilon | ι | \iota | ϕ | \phi | ϑ | \vartheta |
Ξ | \Xi | κ | \kappa | χ | \chi | ||
Ω | \Omega | λ | \lambda | ψ | \psi |
In LaTeX, the default font for capital Greek letters is upright/roman. Italic capital Greek letters can be obtained by loading a package providing the "ISO" math style. They are used by default in MathML.
Individual Greek italic capitals can also be achieved preceding the letter name with var like \varPhi: 𝛤 𝛥 𝛬 𝛷 𝛱 𝛹 𝛴 𝛩 𝛶 𝛯 𝛺
∀ | \forall | ℵ | \aleph | ħ | \hbar | ℓ | \ell |
∁ | \complement | ℶ | \beth | ℏ | \hslash | ℘ | \wp |
∃ | \exists | ℷ | \gimel | ℑ | \Im | ℜ | \Re |
Ⅎ | \Finv | ℸ | \daleth | ı | \imath | Ⓡ | \circledR |
⅁ | \Game | ∂ | \partial | ȷ | \jmath | Ⓢ | \circledS |
℧ | \mho | ð | \eth | 𝕜 | \Bbbk |
Mathematical alphabets select a combination of font attributes (shape, weight, family) [2]. They are intended for mathematical variables where style variations are important semantically.
command | example | result |
---|---|---|
\mathbf | \mathbf{r}^2=x^2+y^2+z^2 | r2 = x2 + y2 + z2 |
\mathbb | \mathbb{R \subset C} | R ⊂ C |
\mathcal | \mathcal{F}f(x) | ℱf(x) |
\mathfrak | \mathfrak{a} | a |
\mathit | \mathit{\Gamma} | Γ |
\mathrm | s_\mathrm{out} | sout |
\mathsf | \mathsf x | x |
\mathtt | \mathtt{0.12} | 0.12 |
[2] | TeX’s math alphabets correspond to the mathematical alphanumeric symbols block in Unicode and the "mathvariant" style attribute in MathML. |
Additional alphabets are defined in LaTeX packages, e.g.
TeX command | LaTeX package | MathML "mathvariant" |
---|---|---|
mathbfit | isomath | bold-italic |
mathsfit | isomath | sans-serif-italic |
mathsfbfit | isomath | sans-serif-bold-italic |
mathscr | mathrsfs | script |
This can be used to typeset vector symbols in bold italic in line with the International Standard [ISO-80000-2].
The package mathrsfs (and some drop-in replacements) define the \mathscr macro that selects a differently shaped "script" alphabet. Compare A, B, …, Z, a, b, …, z with A, B, …, Z, a, b, …, z.
In contrast to the math alphabet selectors, \boldsymbol only changes the font weight. In LaTeX, it can be used to get a bold version of any mathematical symbol (for other output formats, results are mixed):
# | \# | ♣ | \clubsuit | ¬ | \neg |
& | \& | ♢ | \diamondsuit | ∄ | \nexists |
∠ | \angle | ∅ | \emptyset | ′ | \prime |
‵ | \backprime | ∃ | \exists | ♯ | \sharp |
★ | \bigstar | ♭ | \flat | ♠ | \spadesuit |
⧫ | \blacklozenge | ∀ | \forall | ∢ | \sphericalangle |
◼ | \blacksquare | ♡ | \heartsuit | ◻ | \square |
▴ | \blacktriangle | ∞ | \infty | √ | \surd |
▾ | \blacktriangledown | ◊ | \lozenge | ⊤ | \top |
⊥ | \bot | ∡ | \measuredangle | △ | \triangle |
⟍ | \diagdown | ∇ | \nabla | ▽ | \triangledown |
⟋ | \diagup | ♮ | \natural | ⌀ | \varnothing |
. | . | ! | ! | ⋮ | \vdots |
⁄ | / | ? | ? | ⋯ | \dotsb |
| | | | : | \colon [3] | … | \dotsc |
’ | ' | ⋯ | \cdots | ⋯ | \dotsi |
; | ; | ⋱ | \ddots | ⋯ | \dotsm |
: | : | … | \ldots | … | \dotso |
[3] | Punctuation (not ratio): Compare spacing in a: b → c to a : b = c. |
↺ | \circlearrowleft | ↻ | \circlearrowright |
↶ | \curvearrowleft | ↷ | \curvearrowright |
↩ | \hookleftarrow | ↪ | \hookrightarrow |
← | \leftarrow | → | \rightarrow |
⇐ | \Leftarrow | ⇒ | \Rightarrow |
↢ | \leftarrowtail | ↣ | \rightarrowtail |
↽ | \leftharpoondown | ⇁ | \rightharpoondown |
↼ | \leftharpoonup | ⇀ | \rightharpoonup |
⇇ | \leftleftarrows | ⇉ | \rightrightarrows |
↔ | \leftrightarrow | ⇔ | \Leftrightarrow |
⇆ | \leftrightarrows | ⇄ | \rightleftarrows |
⇋ | \leftrightharpoons | ⇌ | \rightleftharpoons |
↭ | \leftrightsquigarrow | ⇝ | \rightsquigarrow |
⇚ | \Lleftarrow | ⇛ | \Rrightarrow |
⟵ | \longleftarrow | ⟶ | \longrightarrow |
⟸ | \Longleftarrow | ⟹ | \Longrightarrow |
⟷ | \longleftrightarrow | ⟺ | \Longleftrightarrow |
↫ | \looparrowleft | ↬ | \looparrowright |
↰ | \Lsh | ↱ | \Rsh |
↦ | \mapsto | ⟼ | \longmapsto |
⊸ | \multimap | ||
↚ | \nleftarrow | ↛ | \nrightarrow |
⇍ | \nLeftarrow | ⇏ | \nRightarrow |
↮ | \nleftrightarrow | ⇎ | \nLeftrightarrow |
↖ | \nwarrow | ↗ | \nearrow |
↙ | \swarrow | ↘ | \searrow |
↞ | \twoheadleftarrow | ↠ | \twoheadrightarrow |
↿ | \upharpoonleft | ↾ | \upharpoonright |
⇃ | \downharpoonleft | ⇂ | \downharpoonright |
⇈ | \upuparrows | ⇊ | \downdownarrows |
Synonyms: ← \gets, → \to, ↾ \restriction.
< | < | ≥ | \geq | ≪ | \ll | ≺ | \prec |
= | = | ≧ | \geqq | ⋘ | \lll | ⪷ | \precapprox |
> | > | ⩾ | \geqslant | ⪉ | \lnapprox | ≼ | \preccurlyeq |
≈ | \approx | ≫ | \gg | ⪇ | \lneq | ⪯ | \preceq |
≊ | \approxeq | ⋙ | \ggg | ≨ | \lneqq | ⪹ | \precnapprox |
≍ | \asymp | ⪊ | \gnapprox | ⋦ | \lnsim | ⪵ | \precneqq |
∽ | \backsim | ⪈ | \gneq | ≇ | \ncong | ⋨ | \precnsim |
⋍ | \backsimeq | ≩ | \gneqq | ≠ | \neq | ≾ | \precsim |
≏ | \bumpeq | ⋧ | \gnsim | ≱ | \ngeq | ≓ | \risingdotseq |
≎ | \Bumpeq | ⪆ | \gtrapprox | ≧̸ | \ngeqq | ∼ | \sim |
≗ | \circeq | ⋛ | \gtreqless | ⩾̸ | \ngeqslant | ≃ | \simeq |
≅ | \cong | ⪌ | \gtreqqless | ≯ | \ngtr | ≻ | \succ |
⋞ | \curlyeqprec | ≷ | \gtrless | ≰ | \nleq | ⪸ | \succapprox |
⋟ | \curlyeqsucc | ≳ | \gtrsim | ≦̸ | \nleqq | ≽ | \succcurlyeq |
≐ | \doteq | ≤ | \leq | ⩽̸ | \nleqslant | ⪰ | \succeq |
≑ | \doteqdot | ≦ | \leqq | ≮ | \nless | ⪺ | \succnapprox |
≖ | \eqcirc | ⩽ | \leqslant | ⊀ | \nprec | ⪶ | \succneqq |
≂ | \eqsim | ⪅ | \lessapprox | ⋠ | \npreceq | ⋩ | \succnsim |
⪖ | \eqslantgtr | ⋚ | \lesseqgtr | ≁ | \nsim | ≿ | \succsim |
⪕ | \eqslantless | ⪋ | \lesseqqgtr | ⊁ | \nsucc | ≈ | \thickapprox |
≡ | \equiv | ≶ | \lessgtr | ⋡ | \nsucceq | ∼ | \thicksim |
≒ | \fallingdotseq | ≲ | \lesssim | ≜ | \triangleq |
The commands \lvertneqq and \gvertneqq are not supported by LateX2MathML, as there is no corresponding Unicode character.
Synonyms: ≠ \ne, ≤ \le, ≥ \ge, ≑ \Doteq, ⋘ \llless, ⋙ \gggtr.
Symbols can be negated prepending \not, e.g. ≠ \not=, ≢ \not\equiv, ≹ \not\gtrless, ≸ \not\lessgtr.
∍ | \backepsilon | ⋬ | \ntrianglelefteq | ⊆ | \subseteq |
∵ | \because | ⋫ | \ntriangleright | ⫅ | \subseteqq |
≬ | \between | ⋭ | \ntrianglerighteq | ⊊ | \subsetneq |
◂ | \blacktriangleleft | ⊬ | \nvdash | ⫋ | \subsetneqq |
▸ | \blacktriangleright | ⊮ | \nVdash | ⊃ | \supset |
⋈ | \bowtie | ⊭ | \nvDash | ⋑ | \Supset |
⊣ | \dashv | ⊯ | \nVDash | ⊇ | \supseteq |
⌢ | \frown | ∥ | \parallel | ⫆ | \supseteqq |
∈ | \in | ⟂ | \perp | ⊋ | \supsetneq |
∣ | \mid | ⋔ | \pitchfork | ⫌ | \supsetneqq |
⊧ | \models | ∝ | \propto | ∴ | \therefore |
∋ | \ni | ∣ | \shortmid | ⊴ | \trianglelefteq |
∤ | \nmid | ∥ | \shortparallel | ⊵ | \trianglerighteq |
∉ | \notin | ⌢ | \smallfrown | ∝ | \varpropto |
∦ | \nparallel | ⌣ | \smallsmile | ▵ | \vartriangle |
∤ | \nshortmid | ⌣ | \smile | ⊲ | \vartriangleleft |
∦ | \nshortparallel | ⊏ | \sqsubset | ⊳ | \vartriangleright |
⊈ | \nsubseteq | ⊑ | \sqsubseteq | ⊢ | \vdash |
⫅̸ | \nsubseteqq | ⊐ | \sqsupset | ⊩ | \Vdash |
⊉ | \nsupseteq | ⊒ | \sqsupseteq | ⊨ | \vDash |
⫆̸ | \nsupseteqq | ⊂ | \subset | ⊪ | \Vvdash |
⋪ | \ntriangleleft | ⋐ | \Subset |
Synonyms: ∋ \owns.
Symbols can be negated prepending \not, e.g. ∉ \not\in, ∌ \not\ni.
The commands \varsubsetneq, \varsubsetneqq, \varsupsetneq, and \varsupsetneqq are not supported by LateX2MathML, as there is no corresponding Unicode character.
∑ \sum | ∏ \prod | ⋂ \bigcap | ⨀ \bigodot |
∫ \int | ∐ \coprod | ⋃ \bigcup | ⨁ \bigoplus |
∮ \oint | ⋀ \bigwedge | ⨄ \biguplus | ⨂ \bigotimes |
∫ \smallint | ⋁ \bigvee | ⨆ \bigsqcup |
Larger symbols are used in displayed formulas, sum-like symbols have indices above/below the symbol (see also scripts and limits):
xleftarrow and xrightarrow produce arrows that extend automatically to accommodate unusually wide subscripts or superscripts. These commands take one optional argument (the subscript) and one mandatory argument (the superscript, possibly empty):
A \xleftarrow{n+\mu-1} B \xrightarrow[T]{n\pm i-1} C
results in
In addition to the standard accents and embellishments, other symbols can be placed above or below a base symbol with the \overset and \underset commands. The symbol is set in "scriptstyle" (smaller font size). For example, writing \overset{*}{X} becomes \overset*X and \underset{+}{M} becomes \underset + M.
The matrix and cases environments can also contain \\ and &:
.. math:: \left ( \begin{matrix} a & b \\ c & d \end{matrix}\right)
Result:
The environments pmatrix, bmatrix, Bmatrix, vmatrix, and Vmatrix have (respectively) ( ), [ ], { }, | |, and ‖ ‖ delimiters built in, e.g.
To produce a small matrix suitable for use in text, there is a smallmatrix environment ( a b c d ) that comes closer to fitting within a single text line than a normal matrix.
For piecewise function definitions there is a cases environment:
Horizontal spacing of elements can be controlled with the following commands:
3 4 | 3\qquad 4 | = 2em | |
3 4 | 3\quad 4 | = 1em | |
3 4 | 3~4 | 3\nobreakspace 4 | |
3 4 | 3\ 4 | escaped space | |
3 4 | 3\;4 | 3\thickspace 4 | |
3 4 | 3\:4 | 3\medspace 4 | |
3 4 | 3\,4 | 3\thinspace 4 | |
34 | 3 4 | regular space [4] | |
3\!4 | 3\!4 | 3\negthinspace 4 | |
3\negmedspace4 | 3\negmedspace 4 | ||
3\negthickspace4 | 3\negthickspace 4 | ||
3 4 | 3\hspace{1ex}4 | custom length | |
3\mspace20mu4 | 3\mspace{20mu}4 | custom length [5] |
[4] | Whitespace characters are ignored in LaTeX math mode. |
[5] | Unit must be 'mu' (1 mu = 1/18em). |
Negative spacing does not work with MathML (in Firefox 78).
There are also three commands that leave a space equal to the height and width of its argument. For example \phantom{XXX} results in space as wide and high as three X’s:
The commands \hphantom and \vphantom insert space with the width or height of the argument. They are not supported with math_output MathML.
command | example | result |
---|---|---|
\sqrt | \sqrt{x^2-1} | √(x2 − 1) |
\sqrt[3n]{x^2-1} | 3n√(x2 − 1) | |
\sqrt\frac{1}{2} | √((1)/(2)) |
Besides the automatic scaling of extensible delimiters with \left and \right, there are four commands to manually select delimiters of fixed size:
Sizing | no | \left | \bigl | \Bigl | \biggl | \Biggl |
command | \right | \bigr | \Bigr | \biggr | \Biggr | |
Result | (b)((c)/(d)) | (b)⎛⎝(c)/(d)⎞⎠ | (b)((c)/(d)) | (b)((c)/(d)) | (b)((c)/(d)) | (b)((c)/(d)) |
There are two or three situations where the delimiter size is commonly adjusted using these commands:
The first kind of adjustment is done for cumulative operators with limits, such as summation signs. With \left and \right the delimiters usually turn out larger than necessary, and using the Big or bigg sizes instead gives better results:
The second kind of situation is clustered pairs of delimiters, where left and right make them all the same size (because that is adequate to cover the encompassed material), but what you really want is to make some of the delimiters slightly larger to make the nesting easier to see.
The third kind of situation is a slightly oversize object in running text, such as ||(b’)/(d’)|| where the delimiters produced by \left and \right cause too much line spreading. [6] In that case \bigl and \bigr can be used to produce delimiters that are larger than the base size but still able to fit within the normal line spacing: |(b’)/(d’)|.
[6] | With MathML, an example would be parentheses around a smallmatrix environment ⎛⎜⎝ a b c d ⎞⎟⎠ vs. ( a b c d ). |
The main use of the command \text is for words or phrases in a display. It is similar to \mbox in its effects but, unlike \mbox, automatically produces subscript-size text if used in a subscript, k_{\text{B}}T becomes kBT.
Whitespace is kept inside the argument:
The text may contain math commands wrapped in $ signs, e.g.
The limits on integrals, sums, and similar symbols are placed either to the side of or above and below the base symbol, depending on convention and context. In inline formulas and fractions, the limits on sums, and similar symbols like
move to index positions: limn → ∞∑n1(1)/(n).
The commands \intop and \ointop produce integral signs with limits as in sums and similar: ∫10, ∮c and
The commands \limits and \nolimits override the default placement of the limits for any operator; \displaylimits forces standard positioning as for the sum command. They should follow immediately after the operator to which they apply.
Compare the same term with default positions, \limits, and \nolimits in inline and display mode: limx → 0f(x), lim\limitsx → 0f(x), limx → 0f(x), vs.
The declarations [7] \displaystyle, \textstyle, \scriptstyle, and \scriptscriptstyle, select a symbol size and spacing that would be applied in (respectively) display math, inline math, first-order subscript, or second-order subscript, even when the current context would normally yield some other size.
For example :math:`\displaystyle \sum_{n=0}^\infty \frac{1}{n}` is printed as ∑∞n = 0(1)/(n) rather than ∑∞n = 0(1)/(n) and
\frac{\scriptstyle\sum_{n > 0} z^n} {\displaystyle\prod_{1\leq k\leq n} (1-q^k)}
yields
[7] | "Declarations" are commands that affect processing of the current "group". In particular, notice where the braces fall that delimit the effect of the command: Right: {\displaystyle ...} Wrong: \displaystyle{...}. With math_output MathML, the declaration must be the first element after the opening bracket. |
Math alphabet macros change the default alphabet ("mathvariant" in MathML), leaving some symbols unchanged:
normal: | abs(x)±α ≈ 3Γ ∀x ∈ R |
---|---|
mathrm: | abs(x)±α ≈ 3Γ ∀x ∈ R |
mathit: | abs(x)±α ≈ 3Γ ∀x ∈ R |
mathsf: | abs(x)±α ≈ 3Γ ∀x ∈ R |
mathbb: | abs(x)±α ≈ 3Γ ∀x ∈ R |
mathbf: | abs(x)±α ≈ 3Γ ∀x ∈ R |
mathcal: | abs(x)±α ≈ 3Γ ∀x ∈ R |
mathscr: | abs(x)±α ≈ 3Γ ∀x ∈ R |
Unicode supports the following blackboard-bold characters: a…zA…Z0…9ΓΠΣγπ.
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: a = √(2) + x, b = √(1 + x2), c = √((sin(x))/(23)).
Accents should be nearer to the base (in MathML Firefox 78, it's vice versa!): ‒aa, ‒ll, ‒ii, →r ⟶r.
Sub- and superscript may be given in any order: xji = xji and ∫10 = ∫10.
Double exponent: x104, rTin and xn2i.
tex-token returns "{" for nested groups:
Compare automatic sizing with fixed sizes:
And in text:
(): | (3)(f(x))(‒x)(x)(ni)(∑)(∑0)(∏) |
---|---|
(big): | |
(x)(32)(32)⎛⎜⎝ a b c d ⎞⎟⎠(⨂) | |
(Big): | |
(√(3))(√(32))⎛⎝(3)/(2)⎞⎠⎛⎝(32)/(24)⎞⎠⎛⎝(√(2))/(2)⎞⎠(∫)(∫0)(∫1)(∫10)(∑1)(∑10)⎛⎜⎜⎝((1)/(x))/((1)/(n))⎞⎟⎟⎠ |
Test \left, \right, and the bigl/bigr, … size commands with all extensible delimiters.
Variable-sized operators:
Inline: ∫ ∬ ∭ ⨌ ∫⋯∫∮ ∫ ∑ ∏ ∐ ⋀ ⋁ ⋂ ⋃ ⨄ ⨆ ⨀ ⨁ ⨂ and Display:
The text may contain non-ASCII characters: nStoß.
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 çéèëêñůžc⃝.