algorithm2e provides no option to use e.g. the subsection counter to number the algorithms. It only provides an option to create a new counter within e.g. the section counter. This counter will then be independent of the subsection counter, though.
Asked
Active
Viewed 413 times
2
Sergio
- 31
- 2
1 Answers
1
If I read this correctly the solution is to just overwrite the algocf counter that algorithm2e uses.
\makeatletter
\let\c@algocf\c@subsection
\makeatother
To have the counter displayed as chapter.section.subsection I did:
\renewcommand{\thealgocf}
{\arabic{chapter}.\arabic{section}.\arabic{algocf}}
I found the answer in Defining shared counters for theorem environments *after* environments are defined
Sergio
- 31
- 2