[Tex/LaTex] LaTeX locally change equation numbering


I want my document to look like this:

Normal document text.

equation (1)

Definition Definition text.

equation (D1)

More definition text.

Normal document text.

equation (2)

More document text.

So the numbering changes inside the definition, and remains unaltered outside the definition.

Best Answer

If you only want a temporary change, use the \tag command, loaded by the amsmath package. Here's the code:


Equation the first, normally numbered.

A special equation.

A second, normally numbered equation.


If you use \label to reference the equations later, \tag doesn't have to have the same argument as \label. This is the result:

enter image description here