Hi,
Im new to latex,and I want to know if there is an automatic way to label equation.
I write my thesis in latex and I have a lot of equations.
everytime i write an eq I label it as eq1, eq2 and etc.
but when I want to write an eq between two old eqs, I have to change manually the labels i already gave.
is there a simple way to do so?
Im using winedt or led.
Math & Science ⇒ Labeling many equations
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Labeling many equations
The equations will be numbered automatically, but the labels could be set freely. Why do you use numbers in labels? You've already noticed that there could be changes later. I suggest use meaningful labels like \label{Einstein} or \label{CantorsTheorem} etc.
Stefan
Stefan
LaTeX.org admin
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Labeling many equations
Your way of labeling equations reduces LaTeX's system of automatic numbering to absurdity. Put logical labels to your equations as Stefan already suggested.
More stuff concerning math expressions can be found in the amsmath manual and the »Math mode« document.
Best regards
Thorsten
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{amsmath}
\begin{document}
\chapter{First chapter}
\section{First section}
\begin{equation}\label{eqn:einstein}
E=mc^2
\end{equation}
as we see in equation \eqref{eq:einstein} \ldots
\begin{subequations}\label{eqn:binomi}
\begin{align}
(a+b)^2 &= a^2+2ab+b^2 \label{subeqn-1:binomi} \\
(a-b)^2 &= a^2-2ab+b^2 \label{subeqn-2:binomi} \\
(a+b)(a-b) &= a^2-b^2 \label{subeqn-3:binomi}
\end{align}
The \textsc{Binomi} equations \eqref{eq:binomi} devided into equation \label{subeq-1:binomi}, \label{subeq-2:binomi} and \label{subeq-3:binomi}.
\end{document}
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10