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.
1 Answer
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