0

I have align environments in each section of my TeX file and I use \numberthis\label to label the last equation in the align environment. But this labels or numbers the equations in the order they are in the file. Can I have a sectionwise numbering of the equations in the align environments? For example, the last equations of the 1st and 2nd align environments(assuming I have only got 'align' environments) in section A to be labeled as A.1 and A.2?

MWE-

\documentclass[english,aps,amsmath,amssymb]{revtex4-1} 
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\begin{document}


 \section{section1}

 \begin{align*}
  x&= 1\\
   &= 21313\numberthis\label{eqn}
 \end{align*}

\begin{align*}
 x&=    1\\
  &=    2324\numberthis\label{eqn}
 \end{align*}


 \section{section2}

 \begin{align*}
  x&=   1\\
   &=   34\numberthis\label{eqn}
 \end{align*}

 \begin{align*}
 x&=    2\\
  &=    345\numberthis\label{eqn}
 \end{align*}


 \end{document}

In this example, I have 4 equations and they get numbered from 1 to 4. I want to keep using the align environment and \numberthis command. And want to have numbering based on section like 1.1 and 1.2 (or A.1 and A.2) for the equations in the first section. How do I change the scope of numbering with \numberthis?

marked as duplicate by Mico equations Jul 31 '17 at 15:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.