No Markup
x = (a + b - c) * d / e
Code language: TeX (tex)
\[
x = (a + b - c) * d / e
\]
Simple Operations and Comments
% This line is a comment.
x = (a + b - c) \times d \div e
Code language: TeX (tex)
\[
% This line is a comment.
x = (a + b - c) \times d \div e
\]
Fractions
x = \frac{a}{b}
Code language: TeX (tex)
\[
x = \frac{a}{b}
\]
Full-size Brackets
x = ( \frac{a}{b} )
x = \left( \frac{a}{b} \right)
Code language: TeX (tex)
\[
x = ( \frac{a}{b} )
\]
\[
x = \left( \frac{a}{b} \right)
\]
Powers and Superscripts
x = 2^n
x = 2^{n-1}
f(x) = \frac{\sin^2(x)}{x^2}
X(z) = 1 + 2z^{-1} + 3(z^{-1})^2
Code language: TeX (tex)
\[
x = 2^n
\]
\[
x = 2^{n-1}
\]
\[
f(x)=\frac{\sin^2(x)}{x^2}
\]
\[
X(z) = 1 + 2z^{-1} + 3(z^{-1})^2
\]
Subscripts
x_0 = x_n + 1
x_n = x_{n-1} + 1
A_{core} = \pi r_{core}^2
y = \log_2 x
y = \log_{10} x
Code language: TeX (tex)
\[
x_0 = x_n + 1
\]
\[
x_n = x_{n-1} + 1
\]
\[
A_{core} = \pi r_{core}^2
\]
\[
y = \log_2 x
\]
\[
y = \log_{10} x
\]
Square Root
x = \sqrt{2}
r = \sqrt{x^2 + y^2}
Code language: TeX (tex)
\[
x = \sqrt{2}
\]
\[
r = \sqrt{x^2 + y^2}
\]
N-th Root
x = \sqrt[12]{2}
Code language: TeX (tex)
\[
x = \sqrt[12]{2}
\]
Greek Symbols
C = \pi d
\rho = m / V
\Delta L = \frac{F}{k}
Code language: TeX (tex)
\[
C = \pi d
\]
\[
\rho = m / V
\]
\[
\Delta L = \frac{F}{k}
\]
Quadratic Roots
0 = ax^2 + bx + c
x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}
Code language: TeX (tex)
\[
0 = ax^2 + bx + c
\]
\[
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\]
Bars, Hats and Accents
\bar{x} = \hat{x}
Code language: TeX (tex)
\[
\bar{x} = \hat{x}
\]
Basic Spacing
ab
a\ b
a\,b
a~b
Code language: TeX (tex)
\[ab\]
\[a\ b\]
\[a\,b\]
\[a~b\]
Sum, Product and Integral
\sum\limits_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}
\sum\limits_{n=0}^{\infty} e^{\sigma n} z^{-n}
\prod\limits_{i=1}^n x = x^n
f(x)=\int_1^{\infty}\frac{1}{x^2}\,\mathrm{d}x=1
A_{sum} = \sqrt{\left( \sum_{i=1}^{n} A_i \cos(\phi_i) \right)^2 + \left( \sum_{i=1}^{n} A_i \sin(\phi_i)\right)^2}
A_{sum} = \sqrt{\left( \Sigma_{i=1}^{n} A_i \cos(\phi_i) \right)^2 + \left( \Sigma{i=1}^{n} A_i \sin(\phi_i)\right)^2}
Code language: TeX (tex)
\[
\sum\limits_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}
\]
\[
\sum\limits_{n=0}^{\infty} e^{\sigma n} z^{-n}
\]
\[
\prod\limits_{i=1}^n x = x^n
\]
\[
f(x)=\int_1^{\infty}\frac{1}{x^2}\,\mathrm{d}x=1
\]
\[
A_{sum} = \sqrt{\left( \sum_{i=1}^{n} A_i \cos(\phi_i) \right)^2 + \left( \sum_{i=1}^{n} A_i \sin(\phi_i)\right)^2}
\]
\[
A_{sum} = \sqrt{\left( \Sigma_{i=1}^{n} A_i \cos(\phi_i) \right)^2 + \left( \Sigma{i=1}^{n} A_i \sin(\phi_i)\right)^2}
\]
Alignment
\begin{align*}
x^2 + y^2 &= 1 \\
y &= \sqrt{1 - x^2}
\end{align*}
Code language: TeX (tex)
\begin{align*}
x^2 + y^2 &= 1 \\
y &= \sqrt{1 - x^2}
\end{align*}