KaTeX 公式顯示效果測試

Documentation Testing

本文檔是一個 KaTeX 公式顯示效果的測試頁面,展示了多種數學公式的渲染範例。文件中包含了行內公式如 E=mc²,塊級公式如積分和導數公式,以及複雜的求和公式、分段函數、矩陣和表格公式。每個公式都配有簡要說明,旨在驗證 KaTeX 在不同場景下的正確顯示能力。文件以「請確保以上公式均能正確顯示」結尾,強調了其測試目的。
📅 --
  • KaTeX
  • 數學公式
  • 公式測試
  • LaTeX
  • 數學渲染
  • 文件測試

KaTeX 公式顯示效果測試

這是一個行內公式測試: E=mc2E = mc^2

這是一個塊級公式測試:

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

這是另一個塊級公式測試:

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

這是一個複雜的公式測試:

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

帶有 cases 的公式測試:

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

表格公式:

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

矩陣公式:

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

含有 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}

廣義凱利公式:

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

請確保以上公式均能正確顯示。

See Also