KaTeX Formula Display Test

Documentation Testing

This document is a test page for KaTeX formula display, showcasing rendering examples of various mathematical formulas. It includes inline formulas such as E=mc², block-level formulas like integral and derivative formulas, as well as complex summation formulas, piecewise functions, matrices, and table formulas. Each formula is accompanied by a brief description, aiming to verify KaTeX's ability to display correctly in different scenarios. The document concludes with 'Please ensure all the above formulas are displayed correctly,' emphasizing its testing purpose.
📅 --
  • KaTeX
  • Mathematical Formulas
  • Formula Testing
  • LaTeX
  • Math Rendering
  • Document Testing

KaTeX Formula Display Test

This is an inline formula test: E=mc2E = mc^2.

This is a block-level formula test:

abf(x)dx=F(b)F(a)\int_a^b f(x) \, dx = F(b) - F(a)

This is another block-level formula test:

ddxex=ex\frac{d}{dx}e^x = e^x

This is a complex formula test:

n=11n2=π26\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}

Formula test with cases:

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

Table formula:

abc123456\begin{array}{c|c|c} a & b & c \\ \hline 1 & 2 & 3 \\ 4 & 5 & 6 \\ \end{array}

Matrix formula:

(1234)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}

Formula test containing text:

E=mc2where m is mass and c is the speed of lightE = mc^2 \quad \text{where } m \text{ is mass and } c \text{ is the speed of light}

Generalized Kelly formula:

f=arg maxfiXPiln(1+fRi)f^* = \argmax_f \sum_{i \in X} P_i \ln (1 + f \cdot R_i)

Please ensure all the above formulas are displayed correctly.

See Also