LaTeX Math Examples

May 18, 2026 · View on GitHub

This file demonstrates LaTeX math support in the viewer, rendered via KaTeX.

Use $...$ for inline math and $$...$$ for block (display) math.

Inline Math

From ISO 13703:2000:

NPSHa=hphvpa+hsthfhvhhaNPSH_a = h_p - h_{vpa} + h_{st} - h_f - h_{vh} - h_a

Where:

  • hph_p is the absolute pressure head
  • hvpah_{vpa} is the absolute vapour pressure of the liquid at suction temperature
  • hsth_{st} is the static head, positive or negative
  • hfh_f is the friction head
  • hvhh_{vh} is the velocity head
  • hah_a is the acceleration head

Block Math

Quadratic formula:

x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Euler's identity:

eiπ+1=0e^{i\pi} + 1 = 0

Common Constructs

Fractions and exponents: n!k!(nk)!=(nk)\frac{n!}{k!(n-k)!} = \binom{n}{k}

Greek letters: α,β,γ,Δ,Ω\alpha, \beta, \gamma, \Delta, \Omega

Sums and integrals:

i=1ni=n(n+1)20ex2dx=π2\sum_{i=1}^{n} i = \frac{n(n+1)}{2} \qquad \int_{0}^{\infty} e^{-x^2} \, dx = \frac{\sqrt{\pi}}{2}

Matrices:

A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}

Escaping

Currency works as plain text — $5 and \$10 renders untouched because the delimiters require non-whitespace adjacent to the $.

To force a literal $ inside math, escape it: $\$$.