Equation numbering

111 views
Skip to first unread message

k y Fung

unread,
Nov 7, 2018, 1:51:33 AM11/7/18
to LaTeX Users Group
Hello,
What command should I use so that my equation number will start from 1 for every new section in my article. I do not want to reset my equation counter to zero at the beginning of every section. Any help is appreciated. Thanks.
Regards,
K Fung

Werner Grundlingh

unread,
Nov 7, 2018, 11:24:04 AM11/7/18
to latexus...@googlegroups.com
You can add

\makeatletter
\@addtoreset{equation}{section}
\makeatother

to your preamble in order to reset the equation counter with every new section. The above usage doesn't change the representation of the equation counter. Alternatively, the chngcntr package provides

\usepackage{chngcntr}
\counterwithin{equation}{section}


which will do the same, but also ensure that the equation counter has a <section>.<equation> format. Similarly, if you're already using amsmath, you can do

\usepackage{amsmath}
\numberwithin{equation}{section}
Reply all
Reply to author
Forward
0 new messages