Quick answer
Use the semantic LaTeX structure shown below instead of arranging individual Unicode characters with spaces.
\begin{equation}E=mc^2\label{eq:energy}\end{equation}
Use \label and \ref; do not type equation numbers manually.
Build the expression
- Start with the outer structure: operator, environment, delimiter, or relation.
- Put complete multi-token arguments inside braces.
- Add limits, scripts, conditions, and text labels only after the structure renders correctly.
- Preview the expression in the same renderer or document class used for publication.
Working example
The source \begin{equation}E=mc^2\label{eq:energy}\end{equation} keeps the mathematical grouping explicit. Copy it into the LaTeX editor, change one component at a time, and compare the rendered result after every structural edit.
Common errors
- Using spaces to simulate alignment instead of an environment designed for alignment.
- Omitting braces around a numerator, denominator, limit, index, or exponent containing several tokens.
- Typing the name of a mathematical operator as ordinary italic letters.
- Copying only the rendered result and losing the editable source.
Portability checks
Keep a minimal test expression beside the full document. Compile with the intended packages, reopen the exported PDF, and verify line breaks, numbering, fonts, copy-and-paste behavior, and alternative text where required.
Build a minimal test before the full expression
For equation numbering latex, start with the smallest source that contains the required command or environment. Render it with the same engine used by the final document, then add bounds, labels, alignment, and surrounding text one change at a time. This makes a missing brace, unsupported package, or environment error easy to isolate.
% Minimal test: keep only the structure being checked
\[ x^2 + y^2 = z^2 \]
Verify structure rather than appearance
- Confirm that every multi-token argument is grouped with braces.
- Check that operators, limits, and text labels use semantic commands rather than manual spacing.
- Compile with the intended packages and document class.
- Copy from the exported result and confirm that the editable source remains available.
Portability boundary
A command that works in a full TeX distribution may not work in KaTeX, MathJax, Word, or a Markdown renderer. Keep a fallback expression and record any required package. Convert to MathML only after the LaTeX structure is correct; conversion cannot recover semantics that were omitted from the source.
How this guide was checked
Review method: Intent alignment review, notation/source verification, worked-example check, cross-format rendering review, and duplicate-content comparison for How to Number Equations in LaTeX
Verified against: Official standards, primary documentation, and the page-specific sources listed below
What changed: Removed repeated sitewide boilerplate and added content-type-specific decision, verification, and applicability guidance for this exact task.
Page purpose: equation numbering latex — Understand and apply the topic in mathematical or scientific writing
Automated quality check: Passed critical indexing checks.
Verification references
These primary standards and official documentation pages were used to check character identity, syntax, or platform behavior described above.
- LaTeX Project DocumentationThe LaTeX Project — LaTeX syntax, authoring model, and official documentation links.
- Comprehensive TeX Archive NetworkCTAN — Package documentation and command requirements.
- amsmath packageCTAN — Aligned equations, matrices, cases, operators, and advanced mathematical typesetting.
- KaTeX Supported FunctionsKaTeX — Browser-renderer command compatibility.