# [Tex/LaTex] LaTeX locally change equation numbering

equationsnumbering

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.

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

\documentclass{article}
\usepackage{amsmath}
\begin{document}

Equation the first, normally numbered.
$$a=b+c$$

A special equation.
$$\tag{D1} d=e+f$$

A second, normally numbered equation.
$$g=h+i$$

\end{document}


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