3

I do my homework with LaTeX and it is often just a few pages, so I don't have different sections or anything like that. I would just like to be able to reset the equation counter after each exercise that I do.

Is it possible for me to type in a command, such as \reset whenever I want in the document, and have the equation counter reset to 1?

1
  • You can also have the equation counter reset every time you increnent another counter, like the exercise number. Something like \@addtoreset{equaton}{exercise} Commented Nov 14, 2019 at 3:45

1 Answer 1

3

Sure!

Your \reset would be equivalent to \setcounter{equation}{0}. Perhaps you want to add

\newcommand{\eqnumreset}{\setcounter{equation}{0}}

somewhere in your preamble. This would allow you to use \eqnumreset before any equation you want to have starting from (1) again.

Note that this might be problematic if you are using hyperref, together with \labels and \refs to the equations. A work-around is possible though.

1
  • Thanks! ..........
    – Ovi
    Commented Nov 13, 2019 at 23:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .