Testing KaTeX

2025-09-17

KaTeX Math Formula Testing

Inline Formula Example

This is an inline formula example: E=mc2E = mc^2, demonstrating Einstein’s mass-energy equation.

Another inline formula example: i=1nxi=X\sum_{i=1}^{n} x_i = X, representing the sum of n numbers.

Block-Level Formula Example

Below is a block-level formula example:

tΨ(r,t)=iHΨ(r,t)\frac{\partial}{\partial t}\Psi(\mathbf{r},t) = \frac{i}{\hbar}H\Psi(\mathbf{r},t)

This is the time-dependent form of the Schrödinger equation.

Complex Formula Example

×B1cEt=4πcjE=4πρ×E+1cBt=0B=0\begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned}

This is the differential form of Maxwell’s equations.

Matrix Example

(abcdefghi)\begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix}

This is an example of a 3x3 matrix.

Piecewise Function Example

f(x)={x2if x0x2if x<0f(x) = \begin{cases} x^2 & \text{if } x \geq 0 \\ -x^2 & \text{if } x < 0 \end{cases}

This is an example of a piecewise function.

Limit Example

limx0sin(x)x=1\lim_{x \to 0} \frac{\sin(x)}{x} = 1

This is the famous limit formula.

Integral Example

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}

This is an example of the Gaussian integral.

Testing KaTeX
https://momo.motues.top/en/blog/test/test-katex/
Author
Momo
Published on
2025-09-17
License
CC BY-NC-SA 4.0

Enter keywords to start searching