1

When using the algorithm package it is possible to prefix algorithm numbers with a string (in this example Cool.) like so:

\renewcommand\thealgorithm{Cool.\arabic{algorithm}}

(This works for a bunch of other elements as well as explained in detail at https://www.stat.berkeley.edu/~paciorek/computingTips/Customizing_numbering_pages.html)

The same setting does not work with the algorithm2e package. Is there another way to prefix algorithm numbers with algorithm2e?

Update: It's possible to provide a custom reference name using \SetAlgoRefName{XYZ} but that requires manual setting of every reference name. I am wondering if it's possible to automatically / globally prefix all algorithm numbers.

1 Answers1

1

Thanks to this post, I found out algorithm2e's correct counter name. The following allows customizing the enumeration of algorithm2e numbers:

\renewcommand{\thealgocf}{S\arabic{algocf}}

I.e., the first algorithm's number is now S1 instead of 1