Equation numbering in LaTeX
An equation with its number on the right is written with the equation environment. Give it a \label and refer to it in the text with \eqref, which adds the parentheses for you. The number updates automatically when you add an equation earlier in the document.
Equation with a label
\begin{equation}
T = 2\pi \sqrt{\frac{L}{g}} \label{eq:period}
\end{equation}Reference in the text
From equation \eqref{eq:period} we determine the gravitational acceleration.Common mistakes
- Typing the number by hand, e.g. "(3)": once you add an equation, every reference is off.
- "??" in the PDF: the document has to be compiled twice for references to resolve.
See also
Don't want to memorize commands?
Draw a formula or paste a screenshot, and CamteX turns it into ready LaTeX.