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}$\ce H 2 S O 4 Isotope $\ce{^{14}_{6}C}$\ce 6 14 C Ions $\ce{Ca^2+}$\ce C a 2 + $\ce{Cl-}$\ce C l − Reaction $\ce{2H2 + O2 -> 2H2O}$\ce 2 H 2 + O 2 − > 2 H 2 O Reaction Conditions $\ce{N2 + 3H2 ->[\Delta] 2NH3}$\ce N 2 + 3 H 2 − > [ Δ ] 2 N H 3 Reversible Reaction $\ce{A <=> B}$\ce A <=> B Equilibrium Constant $K_{eq} = \frac{\ce{[C][D]}}{\ce{[A][B]}}$K e q = \ce [ A ] [ B ] \ce [ C ] [ D ] Precipitation $\ce{Ag+ + Cl- -> AgCl v}$\ce A g + + C l − − > A g C l v Physical Units $\pu{8.314 J mol-1 K-1}$\pu 8.314 J m o l − 1 K − 1 Bonds $\ce{A\bond{~}B\bond{~-}C}$\ce A \bond B \bond − C Radical Dot $\ce{OCO^{.-}}$\ce O C O . − Arrow with Text $\ce{A ->[{text above}][{text below}] B}$\ce A − > [ t e x t ab o v e ] [ t e x t b e l o w ] B Escaped Braces $\ce{[\{(X2)3\}2]^3+}$\ce [{( X 2 ) 3 } 2 ] 3 +
Links