[Tex/LaTex] Renaming Algorithm to Heuristic in algorithm2e package

algorithm2ealgorithmsnaming

I am trying to write some heuristics for a problem using the algorithm2e package.

However as you may know, when you write :

\begin{algorithm}
\caption{Heuristic 1: Name of Heuristic}
 ...
\end{algorithm}

The output says


Algorithm 1: Heuristic 1: Name of Heuristic


Do someone know how do I get it to write:


Heuristic 1: Name of Heuristic


instead ?

PS. I don't know if this command does the trick: \SetAlgoRefName{} I could not get it to work, anyone has an example where they used it?

Related topics are:

In different packages:

Best Answer

\SetAlgorithmName requires three arguments:

\SetAlgorithmName{algorithmname}{algorithmautorefname}{list of algorithms name}

such as

\SetAlgorithmName{Heuristic}{heuristic}{List of Heuristics}

You could also directly redefine the macros of the algorithm2e package:

\renewcommand*{\listalgorithmcfname}{List of Heuristics}
\renewcommand*{\algorithmcfname}{Heuristic}
\renewcommand*{\algorithmautorefname}{heuristic}