My problem is that I do not know how to change the numbering style for algorithms. I have created an algoritm and its number is "Algorithm 1", but I want to have "Algorithm N.1", where N is the number of current chapter.
Let assume I have something like below
\begin{algorithm}
\begin{algorithmic}
\FOR{$i = 1$ till end}
\STATE do something
\ENDFOR
\end{algorithmic}
\label{aForLoop}
\caption{some caption}
\end{algorithm}
Any help will appreciated.
As in the documentation:
The numbering of algorithms can be influenced by providing the name of the document component within which numbering should be recommenced. The legal values for this option are: part, chapter, section, subsection, subsubsection or nothing. The default value is nothing which causes algorithms to be numbered sequentially throughout the document.
So, I think it will be enough determining the section
value, like that:
\begin{algorithm}[section]
...
Didn't test, but should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With