# Separate numbering for problems in two different sections

So I am trying to find a way to number my problems from one section to another. Like I want

[section 1: Problem 1-5] ; [section 2: Problem 1-5]

Instead, I keep on getting the following when I finish writing

[Section 1: Problem 1-5] ; [section 2: Problem 6-10]

Like I want a new set of numberings every time a start a section. Write now I only know how to use the multialign environment, if you guys have new methods I would be very pleased if you show me how. Well here are my codes:

\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}&&\\

\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}


Here's a picture of what I mean:

• Which packages do you use? A MWE would be welcomed. Commented Aug 23, 2014 at 22:16
• Please indent your code by 4 spaces so that it is formatted as code. The easy way is to highlight and use the code formatting button when editing your question.
– cfr
Commented Aug 23, 2014 at 22:20
• I really didn't know about indenting, i'll do that next time. As for package, i don't use package, but I use the newenivornment{multialign} Commented Aug 23, 2014 at 22:26
• And how do you define newenivornment{multialign}? Please post full code from \documentclass{} to \end{document} as requested by Bernard.
– user11232
Commented Aug 23, 2014 at 22:30
• And how is defined this environment? Commented Aug 23, 2014 at 22:43

I just found out the answers after tweeking the codes here and there. So here's the old one:

\newcounter{multialign}
\makeatletter
\newenvironment{multialign}

  \newcounter{multialignn}