LAH-tehk
Usage in Markdown
Surround notation with single $ for inline display. Place $$ in line before and after notation for block display.
Inline: $a+b$ becomes a + b
Block:
$$
a + b
$$
a + b
Syntax/Terminology
control sequences — prefixed with \
also called “commands” or “macros”
two kinds:
Control words — backslash \ + some word: \begin, \frac, \times
Control symbols — backslash \ + some symbol: \\, \,, \!
Grouping
curly braces {} group content as a single unit
required when a subscript or superscript is more than one character
without braces, $x^10$ renders as x 1 0 where only the 1 is superscript
Spacing
Command ⇅ Size ⇅ Example ⇅ Output ⇅ \,Thin space $\int f(x)\,dx$∫ f ( x ) d x \quadMedium space $a \quad b$a b \qquadLarge space $a \qquad b$a b \!Negative thin space $a\!b$a b
Text & Style
Command ⇅ Purpose ⇅ Example ⇅ Output ⇅ \text{}Normal text $x \text{ if } x > 0$x if x > 0 \mathbf{}Bold face $\mathbf{v}$v \mathrm{}Upright (“roman”) $\mathrm{pH}$pH \mathbb{}Blackboard bold $\mathbb{R}$R \displaystyleFull-size in inline mode $\displaystyle\sum_{k=1}^n$k = 1 ∑ n
Auto-Sizing Delimiters
\left and \right scale delimiters to fit content
they must always be paired
use . as an invisible match if necessary
Example ⇅ Output ⇅ $\left(\frac{a}{b}\right)$( b a ) $\left.\frac{df}{dx}\right\rvert_{a}$d x df a
Other
usually used to highlight final answer or key result
$\boxed{x=5}$ → x = 5
Alignment
aligned
use \begin{aligned} ... \end{aligned} to align multiple lines
& marks the alignment point(s)
\\ marks end of each line
except the last line, adds extra blank space
ex. place & before the = character to align all equations
$$
\ begin { aligned }
2 x + 3 y & = 7 \\
x - y & = 1
\ end { aligned }
$$
2 x + 3 y x − y = 7 = 1
gathered
Notation
Arithmetic
Notation ⇅ Example ⇅ Output ⇅ Multiplication $a \times b$a × b $a \ast b$a ∗ b $a \cdot b$a ⋅ b Division $a / b$a / b $a \div b$a ÷ b $\frac{a}{b}$b a Plus or Minus $\pm a$± a Roots $\sqrt{a}$a $\sqrt[n]{a}$n a
Equality
Notation ⇅ Example ⇅ Output ⇅ Not Equal $a \neq b$a = b Equivalent $a \equiv b$a ≡ b Proportional $a \propto b $a ∝ b Approx. $a \approx b$a ≈ b
Comparison
Notation ⇅ Example ⇅ Output ⇅ Less Than or Equal $a \leq b$a ≤ b Greater than or Equal $a \geq b$a ≥ b Much Smaller Than $a \ll b$a ≪ b Much Larger Than $a \gg b$a ≫ b
Algebra
Notation ⇅ Example ⇅ Output ⇅ Absolute Value $\lvert a \rvert$∣ a ∣ Function Of $f(x)=x^2$f ( x ) = x 2 Delta $\Delta x$Δ x Pi $\pi$π Sum $\sum_{k=3}^5$∑ k = 3 5 $\displaystyle\sum_{k=3}^5$k = 3 ∑ 5 Product $\prod_{x=2}^4$∏ x = 2 4 $\displaystyle\prod_{x=2}^4$x = 2 ∏ 4
Angles
Notation ⇅ Example ⇅ Output ⇅ Angle $\angle$∠ Degree $30\degree45\rq40\rq\rq$30°4 5 ′ 4 0 ′′ Radians $2\pi rad$2 π r a d
Probability & Statistics
Notation ⇅ Example ⇅ Output ⇅ Probability $P(A)$, $\Pr(A)$P ( A ) , Pr ( A ) Intersection $P(A \cap B)$P ( A ∩ B ) Union $P(A \cup B)$P ( A ∪ B ) Conditional $P(A \mid B)$P ( A ∣ B ) Median $\tilde{x}$x ~ Population Mean $\overline{x}$x $\langle x \rangle$⟨ x ⟩
Linear Algebra
Vectors
Notation ⇅ Example ⇅ Output ⇅ Vector $\mathbf{v}$v $\vec{v}$v Column Vector $\mathbf{v}=\begin{pmatrix}4\cr5\cr6\end{pmatrix}$v = 4 5 6 Row Vector $\mathbf{v}^T = \begin{pmatrix}1&2&3\end{pmatrix}$v T = ( 1 2 3 ) Norm $\lVert \mathbf{v} \rVert$∥ v ∥
Matrices
Notation ⇅ Example ⇅ Output ⇅ Matrix $A=\begin{bmatrix}1&2&3\cr4&5&6\end{bmatrix}$A = [ 1 4 2 5 3 6 ] Hadamard Product $A \circ B$A ∘ B Kronecker Product $A \otimes B$A ⊗ B
Calculus
Notation ⇅ Example ⇅ Output ⇅ Limit $\lim_{x \to \infty} f(x)$lim x → ∞ f ( x ) Derivative Definition $\lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$lim h → 0 h f ( x + h ) − f ( x ) Partial Derivative $\frac{\partial f}{\partial x}$∂ x ∂ f Evaluated At $\left. \frac{df}{dx} \right\rvert_{x=a}$d x df x = a Evaluated Between $\left. F(x) \right\rvert_a^b$F ( x ) ∣ a b Integration $\int f(x) \, dx$∫ f ( x ) d x Definite Integral $\int_a^b f(x) \, dx$∫ a b f ( x ) d x Double Integral $\iint f \, dA$∬ f d A Triple Integral $\iiint f \, dV$∭ f d V Closed Line Integral $\oint \mathbf{F} \cdot d\mathbf{r}$∮ F ⋅ d r Gradient $\nabla f$∇ f Infinity $\infty$∞ Piecewise Function $f(x) = \begin{cases} x^2 & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$f ( x ) = { x 2 − x if x ≥ 0 if x < 0 Dot Notation (Time) $\dot{f}$ $\ddot{f}$f ˙ f ¨ Primes $f'$ $f''$f ′ f ′′
Chemistry
Requires the mhchem LaTex extension . Standard LaTeX treats letters as italic variables and requires verbose workarounds like adding \text{} around every element symbol.
Notation ⇅ Example ⇅ Output ⇅ Chemical Formula $\ce{H2SO4}$H X 2 SO X 4 Isotope $\ce{^{14}_{6}C}$X 6 14 X 2 6 2 14 C Ions $\ce{Ca^2+}$Ca X 2 + $\ce{Cl-}$Cl X − Reaction $\ce{2H2 + O2 -> 2H2O}$2 H X 2 + O X 2 2 H X 2 O Reaction Conditions $\ce{N2 + 3H2 ->[\Delta] 2NH3}$N X 2 + 3 H X 2 Δ 2 NH X 3 Reversible Reaction $\ce{A <=> B}$A B Equilibrium Constant $K_{eq} = \frac{\ce{[C][D]}}{\ce{[A][B]}}$K e q = [ A ] [ B ] [ C ] [ D ] Precipitation $\ce{Ag+ + Cl- -> AgCl v}$Ag X + + Cl X − AgCl ↓ Physical Units $\pu{8.314 J mol-1 K-1}$8.314 J mo l − 1 K − 1 Bonds $\ce{A\bond{~}B\bond{~-}C}$A − - - - B − − - - - C Radical Dot $\ce{OCO^{.-}}$OCO X ∙ − Arrow with Text $\ce{A ->[{text above}][{text below}] B}$A text above text below B Escaped Braces $\ce{[\{(X2)3\}2]^3+}$[{( X X 2 ) X 3 } X 2 ] X 3 +