2

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.

0

1 Answer 1

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

You must log in to answer this question.

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