MathJax Cheat Sheet

Aus Matts Wiki
Version vom 3. Mai 2026, 16:07 Uhr von Matt (Diskussion | Beiträge)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

This is a cheat sheet on which code / markdown notation leads to which MathJax output.

MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.

MathJax in Obsidian.md

When using MathJax inside Obsidian.md the markdown code representing the MathJax formula needs start and end with the dollar sign, i.e.: $a_1..a_n$

In order to show fractions a little bit bigger and centered use two dollar signs, i.e.: $$a = \frac{\sqrt{b^2 + c^2}}{2}$$

Printing little bigger works too with $\displaystyle$ ahead of the fraction

Cheatsheet

Formatting

Description Example LaTeX Code / Markdown
Fractions kmh \frac{km}{h}
Text with spaces kilometers or miles \text{kilometers or miles}
Superscript / Exponent a2+b2=c2 a^2 + b^2 = c^2
Subscript a1..an a_1..a_n
Double Subscript r01+r02+...+r0n {r_{0_1}​​ + r_{0_2} ​+ ... + r_{0_n}

Arithmetic

Description Example LaTeX Code / Markdown
times ab a \cdot b
times a×b a \times b
divided by a÷b a \div b
plus minus ±x \pm x
minus plus x \mp x
equal = \=
not equal \neq
around \approx
less than or equal ab a \le b or a \leq b
less than or equal ab a \leqq b
greater than or equal ab a \ge b or a \geq b
greater than or equal ab a \geqq b

Symbols

Description Example LaTeX Code / Markdown
Infinity \infty
Absolute |x| \vert x \vert
Overline one character a \overline a
Overline multiple characters AB \overline {AB}
Hat over one character a^ \hat a
Hat over two characters ab^ \widehat {ab}
Summation of a set i=1nai \sum_{i=1}^n a_i
Summation of a set (printed larger) i=1nai \displaystyle \sum_{i=1}^n a_i

Greek Alphabet

Letter Greek Notation LaTeX Code / Markdown
Alpha
Beta
Gamma
Delta
Epsilon E,ϵ \Epsilon , \epsilon
Zeta
Eta
Theta
Iota
Kappa
Lambda
Mu
Nu
Xi
Omicron
Pi Π,π \Pi , \pi
Rho
Sigma Σ,σ,ς \Sigma , \sigma , \varsigma
Tau
Upsilon
Phi Φ,ϕ \Phi , \phi
Chi
Psi
Omega

Constants

Description Example LaTeX Code / Markdown
Pi π \pi
Euler's Number e \mathrm{e}

Matrices

Description Example LaTeX Code / Markdown
Matrix with Parentheses (0110)
\begin{pmatrix}
0 & 1 \\ 
1 & 0
\end{pmatrix}
Matrix with Brackets [0110]
\begin{bmatrix}
0 & 1 \\ 
1 & 0
\end{bmatrix}
Complex Matrix with Parentheses (BobAliceBob01Alice10)
\begin{pmatrix}
 & ​Bob & Alice \\
Bob & 0 & 1 \\
Alice & 1 & 0  
\end{pmatrix}


Sources

I found the following sources which helped me out: