General ⇒ Equation numbering problem
Equation numbering problem
I have a problem with the equation numbering of my document.
At some point in my document, the counter {equation} will not "update" and the equations are all numbered (8.0), (8.0)...
I am using \renewcommand{\theequation}{\arabic{section}.\arabic{equation}} and have been setting the counter to zero before each section by \setcounter{equation}{0}.
I have also tried to use the \numberwithin{equation}{section} instead, but it gives the same result. No "update" of the equation number...
Can anyone help me on this topic?
Kind regards
Andy
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Equation numbering problem
I don't see the problem in the code snippets that you posted.
Can you provide a minimal working example that shows the problem?
Stefan
Re: Equation numbering problem
It will be rather difficult to make a working example with the error, since it is working fine for the first 7 sections.
I am using
\begin{eqnarray}
math..
\end{eqnarray}
as the last working and right numbered equation. All equations after this gets the number "0". Is there an issue using eqnarray togheter with the command \setcounter{equation}{0}? My equations are quite long, so I have to use eqnarray to breake them in pieces.
Regards
Andy
Equation numbering problem
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Equation numbering problem
I completely agree with gmedina: you should use environments of amsmath. He gave the link to the user guide, just have a look: amsmath is highly recommendable.
If you want to create an mwe: make a copy of your document, reduce it step by step, that helps to extract the problem. If there are a lot of sections, no problem, empty the contents of the sections. Narrow it down, encircle it. We cannot guess, what code you wrote, we should have a look to it. The less, the better - we don't need content, just code.
Stefan
Re: Equation numbering problem
Thanks a lot for the help

The equnarray was the problem. After i removed them and replaced them with \begin{equation}\begin{split} the numbering worked again.
Thanks again for the quick responses!!
\Andy