Article directory
Problem Description
Sometimes we want to define the number of the formula ourselves and do not want to use the default number (1) (2)..., what should we do?
It only takes one minute to read this article to solve it.
Save money
Load the amsmath package at the beginning, and then add \tag{1-1} after the formula to modify the default number of the formula, as shown below
\usepackage{amsmath}
\begin{equation}
y = x^2 \tag{1-1}
\end{equation}
At this time, the output is as follows. The formula number will become (1-1) instead of the default (1).
y = x 2 \begin{equation} y = x^2 \tag{1-1} \end{equation}y=x2(1-1)
Among them, modify the formula number you want in the curly brackets after \tag.
Error demonstration
amsmath package not loaded
The default output formula number is (1) (2)..., as shown below
Adding \tag at this time cannot change the formula number, and an error will be reported, as shown below
Load amsmath package
By importing the amsmath package, you can add \tag{xx} after the formula to freely define the number of the formula.
Summarize
By importing the amsmath package in latex and adding \tag {xx} after the formula, you can change the number of the formula.