LaTeX is a markup-based typesetting system where you write plain text with formatting commands, and a TeX engine compiles it into a polished PDF.

I use LaTeX in many of my classes to take down formulae in my notes, and I have recently been trying to improve my efficiency in writing in LaTeX so as to be a better note-taker for my Math-heavy content.

Useful Triggers:

Based on my current LaTeX Suite snippets. Most triggers below expand automatically inside math mode. Triggers are case-sensitive. In the examples, □ marks a field to fill in; it is not literal output. Use Tab to move through snippet fields. Entries marked manual require snippet expansion rather than expanding automatically.

Math mode and text

TriggerResult / use
mkInline math: ${}□{}$ in normal text; \(□\) in a text environment inside math
dmDisplay math between $$ on separate lines; also handles text before it and indentation in lists
text or "\text{□} inside math
beg\begin{□} … \end{□} with linked environment names; the regex requires a preceding character

Powers, roots, fractions and subscripts

TriggerResult / example
sr, cb^{2}, ^{3} — e.g. xsr → x^{2}
rd^{□}
__{□}
sts_\text{□} for a text subscript
sq\sqrt{□}
3rt\sqrt[3]{□}; any single digit works before rt
//\frac{□}{□}
eee^{□} at a word boundary
invs^{-1}
conj^{*}
x3, x34Automatically become x_{3}, x_{34}; also works with Greek letters and accented variables
xnn, xjj, xp1x_{n}, x_{j}, x_{n+1}
\xiix_{i} — this trigger includes a leading backslash
ynn, yii, yjjy_{n}, y_{i}, y_{j}

Greek letters

TriggerResultUppercase triggerResult
@a——
@b——
@g@G
@d@D
@e, :e, ——
@z——
@t, :t, @T
@i——
@k——
@l@L
@s@S
@u@U
@o or ome@O or Ome

Accents and fonts

TriggerResult / example
xhat, xbar, xtilde\hat{x}, \bar{x}, \tilde{x}
xdot, xddot\dot{x}, \ddot{x}
xvec, xund\vec{x}, \underline{x}
hat, bar, tilde, dot, ddot, vec, undThe same accents with an empty field to fill in
\alpha hat\hat{\alpha}; Greek letters also support space + dot, bar, vec, tilde, und
x,. or x.,\mathbf{x}; Greek macros use \boldsymbol, e.g. \alpha,.
bf, rm\mathbf{□}, \mathrm{□}
Re, Im, trace\mathrm{Re}, \mathrm{Im}, \mathrm{Tr}

Operators, relations and arrows

TriggerResult
ooo
sum\sum_{□}^{□}
prod\prod
\sum, \prod (manual)Indexed templates with defaults: \sum_{i=1}^{N} □, \prod_{i=1}^{N} □
lim\lim_{n \to \infty} □ with editable fields
+-, -+,
xx, ** or cdot,
..., nabl,
para, deg\parallel, \degree
===, !=,
>=, <=, >>, <<, , ,
simm, sim=, prop, ,
->, <->, !>, ,
=>, =<,
pmod\pmod{n} with editable modulus

Sets and number systems

TriggerResult
and, orr, (and requires a word boundary)
inn, notin,
\\\ (three backslashes)
sub=, sup=,
eset, set\emptyset, \{ □ \} (set requires a word boundary)
RR, NN, ZZ, QQ, CC, , , ,
LL, HH,

Calculus

TriggerResult / example
par (manual)\frac{\partial y}{\partial x} with editable fields
par2\frac{\partial^{2} y}{\partial x^{2}}; any single digit works
parnGeneral partial derivative with editable order, function and variable
payx (manual)\frac{\partial y}{\partial x}; pattern is pa + function letter + variable letter
ddt\frac{d}{dt}
\int (manual)\int □ \, dx with editable variable
dint\int_{0}^{1} □ \, dx with editable bounds and variable
oint, iint, iiint\oint, \iint, \iiint
oinf\int_{0}^{\infty} □ \, dx
infi\int_{-\infty}^{\infty} □ \, dx
taylTaylor expansion of f(x+h) through the second-order term, followed by \dots; f, x and h are linked editable fields

Brackets and environments

TriggerResult / use
avg\langle □ \rangle
norm, Norm\lvert □ \rvert (absolute value), \lVert □ \rVert (norm)
modA pair of plain vertical bars; use pmod for modular arithmetic
ceil, floor\lceil □ \rceil, \lfloor □ \rfloor
(, [, {Insert a matching closing bracket and a field inside
lr(, lr[, lr{Automatically sized brackets using \left and \right
lr + a vertical barAutomatically sized absolute-value bars
lra\left< □ \right>
pmat, bmat, Bmat, vmat, VmatMatrix environments with parentheses, square brackets, braces, single bars or double bars
matrix, cases, align, arrayMatching \begin{…} and \end{…}; display math uses new lines, inline math stays on one line
iden3A filled-in identity matrix in a pmatrix; accepts a single-digit size

Operations on selected math

Select the expression first, then use the visual trigger.

TriggerWrap selection in
U, OAn underbrace with a label below, or an overbrace with a label above
B\underset{□}{selection}
C, K\cancel{selection}, \cancelto{□}{selection}
S\sqrt{selection}
(, [, {Matching brackets

Physics and chemistry

TriggerResult
kbt, msunk_{B}T, M_{\odot}
dag, o+, ox^{\dagger}, \oplus, \otimes (ox requires a word boundary)
bra, ket, brk\bra{□}, \ket{□}, \braket{□ \vert □} (the snippet uses a literal vertical bar)
outer\ket{\psi} \bra{\psi} with the state linked between both fields
pu, cee\pu{□}, \ce{□}
he4, he3{}^{4}_{2}He, {}^{3}_{2}He
iso{}^{4}_{2}He with editable mass number, atomic number and element

Automatic helpers

  • Recognised Greek names and symbols get a backslash automatically when preceded by a non-backslash character. Similar rules handle exp, log, ln, det, int and standard trig functions such as sin, cos, tan and their listed inverses.
  • arccsc, arcsec and arccot expand using \operatorname{…}.
  • After a Greek or symbol macro, space + sr, cb or rd applies a power without retaining the space: \alpha sr → \alpha^{2}.
  • Digits after variables and Greek letters become subscripts; digits after other macros get a separating space, e.g. \leq1 → \leq 1. The digit rule excludes \pu and \ce.
  • Macro protection helps prevent snippets from expanding partway through recognised commands. A separating space is inserted when an appended letter no longer matches a known macro prefix.