Latex modifies the default number of formulas

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

Insert image description here

Adding \tag at this time cannot change the formula number, and an error will be reported, as shown below

Insert image description here

Load amsmath package

By importing the amsmath package, you can add \tag{xx} after the formula to freely define the number of the formula.

Insert image description here

Summarize

By importing the amsmath package in latex and adding \tag {xx} after the formula, you can change the number of the formula.

Guess you like

Origin blog.csdn.net/qq_36693723/article/details/132747289