test blog

Qingyu2026/02/13 04:19:20

Here’s a collection of LaTeX math formulas you can use to test different features (inline, display, fractions, matrices, integrals, sums, etc.).


🔹 Inline Math

This is an inline formula: eiπ+1=0e^{i\pi} + 1 = 0

Another one with fractions and roots: a2+b2c2+d2\frac{a^2 + b^2}{\sqrt{c^2 + d^2}}


🔹 Display Math (Centered)

01x2,dx=13\int_0^1 x^2 , dx = \frac{1}{3} i=1ni=n(n+1)2\sum_{i=1}^{n} i = \frac{n(n+1)}{2} limx0sinxx=1\lim_{x \to 0} \frac{\sin x}{x} = 1

🔹 Matrix

A=(123456789)A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}

🔹 Cases / Piecewise Function

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

🔹 Align Environment

(a+b)2=a2+2ab+b2(ab)2=a22ab+b2\begin{aligned} (a+b)^2 &= a^2 + 2ab + b^2 \\ (a-b)^2 &= a^2 - 2ab + b^2 \end{aligned}

🔹 Advanced (Competitive Programming Style 😄)

(nk)=n!k!(nk)!\binom{n}{k} = \frac{n!}{k!(n-k)!} gcd(a,b)=gcd(b,amodb)\gcd(a,b) = \gcd(b, a \bmod b) E[X]=ixiPr(X=xi)\mathbb{E}[X] = \sum_{i} x_i \cdot \Pr(X = x_i)

If you'd like, I can also give you:

  • A stress test with very nested formulas
  • TikZ diagram example
  • Number theory heavy formulas
  • Or Lean-style math notation examples

评论 (3)

请先登录后发表评论