Equation numbering is a crucial feature in LaTeX for organizing and referencing mathematical expressions in scientific and technical documents. It allows authors to easily cite equations throughout their work, enhancing readability and structure.
LaTeX provides automatic equation numbering through the equation
environment. This environment assigns a unique number to each equation, displayed on the right side by default.
\begin{equation}
E = mc^2
\end{equation}
This code produces a numbered equation. The numbering is sequential and automatically managed by LaTeX.
For more control over equation numbers, use the \tag{}
command within an equation*
environment:
\begin{equation*}
F = ma \tag{1}
\end{equation*}
This approach allows you to assign custom numbers or labels to equations.
To reference equations in your document, use the \label{}
and \ref{}
commands:
\begin{equation}
\label{eq:einstein}
E = mc^2
\end{equation}
As shown in Equation \ref{eq:einstein}, energy and mass are equivalent.
This technique creates clickable links in the PDF output, enhancing navigation within your document.
LaTeX offers various ways to customize equation numbering:
amsmath
packageMastering equation numbering in LaTeX enhances the professionalism and clarity of your mathematical documents. It's an essential skill for anyone working with complex formulas or writing scientific papers.
For more information on working with mathematical content in LaTeX, explore our guides on LaTeX Math Modes and LaTeX Basic Math Symbols.