![对两个不同部分的问题进行单独编号](https://linux22.com/image/296565/%E5%AF%B9%E4%B8%A4%E4%B8%AA%E4%B8%8D%E5%90%8C%E9%83%A8%E5%88%86%E7%9A%84%E9%97%AE%E9%A2%98%E8%BF%9B%E8%A1%8C%E5%8D%95%E7%8B%AC%E7%BC%96%E5%8F%B7.png)
因此,我尝试找到一种方法来将问题从一个部分编号到另一个部分。就像我想要的那样
[第 1 部分:问题 1-5];[第 2 部分:问题 1-5]
相反,当我写完后,我不断得到以下信息
[第 1 部分:问题 1-5];[第 2 部分:问题 6-10]
就像每次开始一个部分时我都想要一组新的编号。现在我只知道如何使用多对齐环境,如果你们有新方法,我会非常高兴,如果你能告诉我如何做。好吧,这是我的代码:
\section*{Solutions to Problems}
\begin{multialign}
\item
&10(4-5)^2-5+10 && \\
&= 10(-1)^2-5+10 && \text{Parentheses} && \\
& = 10(1)-5+10 && \text{Exponents}&& \\
&= 10-5+10 && \text{Multiplication}&& \\
& = 5 +10 && \text{Subtraction}&&\\
&= 15 && \text{Addition}&& \\
\item
& \frac{(5-2)^2}{9}+5 && \\
&= \frac{3^2}{9}+5 && \text{Parentheses}&& \\
&=\frac{9}{9} +5 && \text{Exponents}&& \\
&=1+5 && \text{Division} && \\
&= 6 && \text{Addition} && \\
\item
& (3-0)^3-9 && \\
&= 3^3-9 && \text{Parentheses}&& \\
&= 27-9 && \text{Exponents}&& \\
&= 18 && \text{Subtraction} && \\
\item
& (10-8)^3*1+8-16 && \\
&=2^3+8-16 && \text{Parentheses}&&\\
& = 8 + 8 - 16 && \text{Exponent}&& \\
& = 16-16 && \text{Addition}&& \\
& = 0 && \text{Subtraction}&& \\
\item
& 0.5(2-5)^4-\frac{81}{2} && \\
&= 0.5(-3)^4-\frac{81}{2} && \text{Parentheses}&& \\
&= 0.5(81) - \frac{81}{2} && \text{Exponents}&& \\
&= 0 && \text{Subtraction}&& \\
\end{multialign}
\section*{New Section}
\begin{multialign}
\item
& \text{Let $(9,8)=(x_1,y_1)$ and $(10,6)=(x_2,y_2)$}\\
& m= \frac{y_1-y_2}{x_1-x_2}&&&& \text{Write out the Slope equation}\\
& m= \frac{8-6}{9-10}&&&&\text{ Plug points into equation}\\
& m= \frac{2}{-1}=-2 &&&& \text{Simplify}\\
& y-y_1=m(x-x_1) &&&& \text{Write out the Point-slope form}\\
& y-8= -2(x-9) &&&& \text{Plug in the values}\\
& y-8= -2x+18 &&&& \text{Distribute the $-2$}\\
& y-8+8 = -2x +18+8 &&&& \text{Add 8 to both side}\\
& y= -2x+26 &&&& \text{Simplify}\\
\item
& \text{Let $(7,2)=(x_1,y_1)$ and $(11,3)=(x_2,y_2)$}\\
& m= \frac{y_1-y_2}{x_1-x_2}&&&& \text{Write out the Slope equation}\\
& m= \frac{2-3}{7-11}&&&&\text{ Plug points into equation}\\
& m= \frac{-1}{-4}=\frac{1}{4} &&&& \text{Simplify}\\
& y-y_1=m(x-x_1) &&&& \text{Write out the Point-slope form}\\
& y-2= \frac{1}{4}(x-7) &&&& \text{Plug in the values}\\
& y-2= \frac{1}{4}x - \frac{7}{4} &&&& \text{Distribute the $\frac{1}{4}$}\\
& y-2+2 = \frac{1}{4}x - \frac{7}{4} +2 &&&& \text{Add 2 to both side}\\
& y= \frac{1}{4}x - \frac{7}{4} +\frac{8}{4} &&&& \text{Find the LCD}\\
& y= \frac{1}{4}x + \frac{1}{4} &&&& \text{Simplify}\\
\end{multialign}
下面是一张可以说明我的意思的图片:
答案1
我刚刚在修改了代码后找到了答案。以下是旧答案:
\newcounter{multialign}
\makeatletter
\newenvironment{multialign}
{\def\item{\refstepcounter{multialign}\themultialign.\qquad}
\start@align\tw@\st@rredtrue\m@ne}
{\endalign}
这是我所做的:
\newcounter{multialignn}
\makeatletter
\newenvironment{multialignn}
{\def\item{\refstepcounter{multialignn}\themultialignn.\qquad}
\start@align\tw@\st@rredtrue\m@ne}
{\endalign}